Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
lindseytruong committed Nov 26, 2024
1 parent b437397 commit bebfa1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/lightspeed_restaurant/operations/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ def create(attributes, configuration = nil)
private

def handle_create_response(response, attributes)
case when response == Numeric
if response == Numeric
attributes.merge(id: response)
when LightspeedRestaurantClient::ExternalPaymentProvider
attributes.merge(id: response["data"].first["id"])
elsif LightspeedRestaurantClient::ExternalPaymentProvider
attributes.merge(id: response['data'].first['id'])
else
response
end
Expand Down
14 changes: 7 additions & 7 deletions spec/lightspeed_restaurant/external_payment_provider_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ module LightspeedRestaurantClient
it 'includes external payment providers' do
result = described_class.find(resource_id)
expect(result.data).to eq({
'companyID' => 1,
'creationDate' => '2024-11-17:28:02.467Z',
'id' => 1,
'name' => 'House Account (External)',
'updateDate' => '2024-11-17:28:02.467Z',
'url' => 'https://dummy-payment-url.com'
})
'companyID' => 1,
'creationDate' => '2024-11-17:28:02.467Z',
'id' => 1,
'name' => 'House Account (External)',
'updateDate' => '2024-11-17:28:02.467Z',
'url' => 'https://dummy-payment-url.com'
})
end
end
end
Expand Down

0 comments on commit bebfa1b

Please sign in to comment.