Sha256: f58e8155bc3bd3c1050fefd3f91bece5f86e6e5fbdc4eecb735f570c441d7902
Contents?: true
Size: 835 Bytes
Versions: 3
Compression:
Stored size: 835 Bytes
Contents
module LedgerSync module Adaptors module QuickBooksOnline module Product module Operations class Find < Operation::Find class Contract < LedgerSync::Adaptors::Contract params do required(:ledger_id).filled(:string) optional(:description).maybe(:string) optional(:name).maybe(:string) end end private def operate return failure(nil) if resource.ledger_id.nil? response = @adaptor.find( resource: 'item', id: resource.ledger_id ) success(response: response) rescue OAuth2::Error => e failure(e) end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems