Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (19 sloc) 0.781 kB
#!/usr/bin/ruby -w
#
# $Id: transaction_lookup1,v 1.1 2008/04/27 21:24:21 ianmacd Exp $
require 'amazon/aws'
require 'amazon/aws/search'
include Amazon::AWS
include Amazon::AWS::Search
tl = TransactionLookup.new( '103-5663398-5028241' )
rg = ResponseGroup.new( 'TransactionDetails' )
req = Request.new
req.locale = 'us'
resp = req.search( tl, rg )
trans = resp.transaction_lookup_response.transactions.transaction
printf( "Transaction date was %s.\n", trans.transaction_date )
printf( "It was in the amount of %s and the seller was %s.\n",
trans.totals.total.formatted_price, trans.seller_name )
printf( "The shipping charge was %s and the package was sent by %s.\n",
trans.totals.shipping_charge.formatted_price,
trans.shipments.shipment.delivery_method )
Jump to Line
Something went wrong with that request. Please try again.