lib/promisepay/models/item.rb
# Get historical batch_transactions for the item.
#
# @see https://reference.promisepay.com/#list-item-batch-transactions
#
# @param options [Hash] Optional options.
# @option options [Integer] :limit Can ask for up to 200 transactions. default: 10
# @option options [Integer] :offset Pagination help. default: 0
#
# @return [Array<Promisepay::BatchTransaction>]
Get historical batch_transactions for the item.
Get historical batch_transactions for the item .
def batch_transactions(options = {})
      response = JSON.parse(@client.get("items/#{send(:id)}/batch_transactions", options).body)
      batch_transactions = response.key?('batch_transactions') ? response['batch_transactions'] : []
      batch_transactions.map { |attributes| Promisepay::BatchTransaction.new(@client, attributes) }
    end
def batch_transactions ( options = { } ) response = JSON . parse ( @client . get ( "items/#{send(:id)}/batch_transactions" , options ) . body ) batch_transactions = response . key? ( 'batch_transactions' ) ? response [ 'batch_transactions' ] : [ ] batch_transactions . map { | attributes | Promisepay :: BatchTransaction . new ( @client , attributes ) } end
Get historical batch_transactions for the item.
Get historical batch_transactions for the item .
None
Array<Promisepay::BatchTransaction>
options
:offset Pagination help. default: 0
: offset Pagination help . default : 0
see
None