Sha256: 79596bb4c715da628c82ad499d7831442d7e7d39c8a2deb62e02a7f1d1e7142e

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

# frozen_string_literal: true

require_relative '../operation'

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

          private

          def operate
            response = adaptor.post(
              resource: quickbooks_online_resource_type,
              payload: ledger_serializer.to_ledger_hash
            )

            success(
              resource: ledger_serializer.deserialize(hash: response),
              response: response
            )
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ledger_sync-1.1.3 lib/ledger_sync/adaptors/quickbooks_online/operation/create.rb
ledger_sync-1.1.2 lib/ledger_sync/adaptors/quickbooks_online/operation/create.rb