Sha256: 03967a903d557e000a68e65f2d29784cf41d06075d06ce26feb34202c3cf98d0
Contents?: true
Size: 704 Bytes
Versions: 10
Compression:
Stored size: 704 Bytes
Contents
module Braintree class TransactionLineItemGateway def initialize(gateway) @gateway = gateway @config = gateway.config @config.assert_has_access_token_or_keys end def find_all(transaction_id) raise ArgumentError, "transaction_id cannot be blank" if transaction_id.nil? || transaction_id.strip.to_s == "" response = @config.http.get("#{@config.base_merchant_path}/transactions/#{transaction_id}/line_items") response[:line_items].map do |line_item_params| TransactionLineItem._new(@gateway, line_item_params) end rescue NotFoundError raise NotFoundError, "transaction with id #{transaction_id.inspect} not found" end end end
Version data entries
10 entries across 10 versions & 1 rubygems