-
Notifications
You must be signed in to change notification settings - Fork 16
Sale_List
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
You must specify your API username and password using the Twocheckout.apiusername & Twocheckout.apipassword class variables before calling this method.
##Method
###list
Use to retrieve a summary of all sales or only those matching a variety of sale attributes.
####Arguments
- hash Parameters
- Hash containing list_sale parameters. Parameters -> API List Sales
####Returns
Returns a SaleList object.
####Example Usage:
HashMap<String, String> params = new HashMap<String, String>();
params.put("pagesize", "3");
SaleList response = TwocheckoutSale.list(params);####Example Response (toJson):
{
"page_info": {
"cur_page": 1,
"first_entry": 1,
"first_page": 1,
"first_page_url": "https://www.2checkout.com/api/sales/list_sales?cur_page=1&pagesize=3",
"last_entry": 3,
"last_page": 14,
"last_page_url": "https://www.2checkout.com/api/sales/list_sales?cur_page=14&pagesize=3",
"next_page": 2,
"pagesize": 3,
"previous_page": 0,
"total_entries": 42
},
"sale_summary": [
{
"sale_id": "4832772521",
"date_placed": "2012-10-16",
"customer_name": "Craig P Christenson",
"recurring": false,
"usd_total": 0.03,
"sale_url": "https://www.2checkout.com/api/sales/detail_sale?sale_id=4832772521"
},
{
"sale_id": "4832744420",
"date_placed": "2012-10-16",
"customer_name": "Craig P Christenson",
"recurring": false,
"usd_total": 0.06,
"sale_url": "https://www.2checkout.com/api/sales/detail_sale?sale_id=4832744420"
},
{
"sale_id": "4832573649",
"date_placed": "2012-10-16",
"customer_name": "Craig P Christenson",
"recurring": false,
"usd_total": 0.03,
"sale_url": "https://www.2checkout.com/api/sales/detail_sale?sale_id=4832573649"
}
]
}Please feel free to contact 2Checkout directly for assistance with your integration.