Sha256: 735b7aaf6e3b8bf1393136631e931450a40e0e14b73718337b413aea528ce133
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
module LedgerSync module Adaptors module Test module Account module Operations class Find < Operation::Find class Contract < LedgerSync::Adaptors::Contract params do required(:external_id).maybe(:string) required(:ledger_id).filled(:string) required(:name).maybe(:string) required(:classification).maybe(:string) required(:account_type).maybe(:string) required(:account_sub_type).maybe(:string) required(:number).maybe(:integer) required(:currency).maybe(:hash, Types::Reference) required(:description).maybe(:string) required(:active).maybe(:bool) end end private def operate return failure(nil) if resource.ledger_id.nil? response = adaptor.find( resource: 'account', id: resource.ledger_id ) success( resource: Test::LedgerSerializer.new(resource: resource).deserialize(hash: response), response: response ) end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ledger_sync-1.3.2 | lib/ledger_sync/adaptors/test/account/operations/find.rb |