Skip to content

Sale_List

Craig Christenson edited this page Oct 26, 2012 · 1 revision

You must specify your API username and password using the twocheckout.Api.credentials method before calling a method in this class.

##Method

###retrieve

Use to retrieve a summary of all sales or only those matching a variety of sale attributes.

####Arguments

  • dictionary Parameters
  • Dictionary containing list_sale parameters. Parameters -> API List Sales

####Returns

Returns a Sales List.

####Example Usage:

twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})

params = {
    'pagesize': 3
    }

result = twocheckout.Sale.list(params)

print result

####Example Response:

[
   {
      u'customer_name': u'Craig P Christenson',
      u'date_placed': u'2012-10-19',
      u'decline_code': None,
      u'recurring': u'1',
      u'recurring_declined': None,
      u'sale_id': u'4834917619',
      u'sale_url': u'https://www.2checkout.com/api/sales/detail_sale?sale_id=4834917619',
      u'usd_total': u'0.03'
   },
   {
      u'customer_name': u'Craig P Christenson',
      u'date_placed': u'2012-10-19',
      u'decline_code': None,
      u'recurring': u'1',
      u'recurring_declined': None,
      u'sale_id': u'4834915113',
      u'sale_url': u'https://www.2checkout.com/api/sales/detail_sale?sale_id=4834915113',
      u'usd_total': u'0.03'
   }
]
Clone this wiki locally