Skip to content

Sale_Active

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

###active

Use to return the number of active recurring lineitems.

####Arguments

  • None
  • Must be called on a Sale instance.

####Returns

Returns result as Python object.

####Example Usage:

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

params = {
    'sale_id': 4834917619
    }

sale = twocheckout.Sale.find(params)

result = sale.active()

print result

####Example Response:

{
    'response_code': 'ACTIVE',
    'response_message': '3 active recurring lineitems'
}
Clone this wiki locally