Language

2Checkout Documentation

List

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

Method

list

Use to retrieve a list of sales matching a variety of sale attributes.

Arguments

  • hash Parameters

Returns

Returns a List of sales.

Example Usage:

Twocheckout::API.credentials = { :username => 'APIuser1817037', :password => 'APIpass1817037' }

sale_list = Twocheckout::Sale.list(:pagesize => 3)

Example Response:

[
    {
        "customer_name"=>"Craig P Christenson",
        "date_placed"=>"2012-10-25",
        "decline_code"=>nil,
        "recurring"=>"1",
        "recurring_declined"=>nil,
        "sale_id"=>"4839284412",
        "sale_url"=>"https://www.2checkout.com/api/sales/detail_sale?sale_id=4839284412",
        "usd_total"=>"0.03"
    },
    {
        "customer_name"=>"Craig P Christenson",
        "date_placed"=>"2012-10-24",
        "decline_code"=>nil,
        "recurring"=>"0",
        "recurring_declined"=>nil,
        "sale_id"=>"4838678777",
        "sale_url"=>"https://www.2checkout.com/api/sales/detail_sale?sale_id=4838678777",
        "usd_total"=>"1.00"
    },
    {
        "customer_name"=>"Craig P Christenson",
        "date_placed"=>"2012-10-23",
        "decline_code"=>nil,
        "recurring"=>"1",
        "recurring_declined"=>nil,
        "sale_id"=>"4838212958",
        "sale_url"=>"https://www.2checkout.com/api/sales/detail_sale?sale_id=4838212958",
        "usd_total"=>"0.03"
    }
]