Sha256: 040503c1c4666bc7854ffaae401d7be8f9cbf802d30788e0e90a55f08e6ec746
Contents?: true
Size: 822 Bytes
Versions: 1
Compression:
Stored size: 822 Bytes
Contents
module LedgerSync module Adaptors module Test module Payment module Operations class Find < Operation::Find class Contract < LedgerSync::Adaptors::Contract schema do required(:ledger_id).filled(:string) optional(:amount).maybe(:integer) optional(:currency).maybe(:string) optional(:customer).maybe(Types::Reference) end end private def operate return failure(nil) if resource.ledger_id.nil? response = adaptor.find( resource: 'payment', id: resource.ledger_id ) success(response: response) end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ledger_sync-1.1.1 | lib/ledger_sync/adaptors/test/payment/operations/find.rb |