Sha256: 7f8d5cd8d58e7fd8cc7deb3c7ac457f66495012b2ec65879221c7d373328b746

Contents?: true

Size: 628 Bytes

Versions: 2

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

require_relative '../operation'

module LedgerSync
  module Adaptors
    module QuickBooksOnline
      module Operation
        class Find
          include QuickBooksOnline::Operation::Mixin

          private

          def operate
            return failure(
              Errors::OperationError::LedgerIDRequired.new(
                operation: self
              )
            ) if resource.ledger_id.nil?

            result(
              response: adaptor.find(
                path: ledger_resource_path
              )
            )
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ledger_sync-1.3.2 lib/ledger_sync/adaptors/quickbooks_online/operation/find.rb
ledger_sync-1.3.1 lib/ledger_sync/adaptors/quickbooks_online/operation/find.rb