lib/ledger_sync/adaptors/test/customer/operations/find.rb in ledger_sync-1.1.1 vs lib/ledger_sync/adaptors/test/customer/operations/find.rb in ledger_sync-1.1.2
- old
+ new
@@ -4,10 +4,11 @@
module Customer
module Operations
class Find < Operation::Find
class Contract < LedgerSync::Adaptors::Contract
params do
+ required(:external_id).maybe(:string)
required(:ledger_id).filled(:string)
optional(:email).maybe(:string)
optional(:name).maybe(:string)
optional(:phone_number).maybe(:string)
end
@@ -21,10 +22,13 @@
response = adaptor.find(
resource: 'customer',
id: resource.ledger_id
)
- success(response: response)
+ success(
+ resource: Test::LedgerSerializer.new(resource: resource).deserialize(hash: response),
+ response: response
+ )
end
end
end
end
end