class Amazon::Transaction::Request

Public Instance Methods

get_details(order_id, &block) click to toggle source

Retrieve a transaction order ID (order_id may be an Array, or a space or comma-separated string). This returns an Array of Amazon::Transaction objects, passing them to a block, if given.

# File lib/amazon/transaction.rb, line 84
def get_details(order_id, &block)

  url = AWS_PREFIX + "?t=%s&dev-t=%s&TransactionDetails=ShortSummary" +
        "&OrderId=%s&f=xml"

  order_id.gsub!(/ /, ',') if order_id.is_a? String
  order_id = order_id.join(',') if order_id.is_a? Array

  if order_id.count(',') >= MAX_ORDER_IDS
    raise OrderIdError, "too many order IDs"
  end

  search(url % [@id, @token, order_id], &block)
end