Sha256: 5d25ac585946a00084d562307abd1cfc9cf9518a57f4fffaf0ca1c33bdcaa1dd
Contents?: true
Size: 867 Bytes
Versions: 1
Compression:
Stored size: 867 Bytes
Contents
module LedgerSync module Adaptors module Test module Vendor module Operations class Find < Operation::Find class Contract < LedgerSync::Adaptors::Contract params do required(:ledger_id).filled(:string) optional(:display_name).maybe(:string) optional(:first_name).maybe(:string) optional(:last_name).maybe(:string) optional(:email).maybe(:string) end end private def operate return failure(nil) if resource.ledger_id.nil? response = adaptor.find( resource: 'vendor', 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/vendor/operations/find.rb |