Language

2Checkout Documentation

Retrieve

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

Methods

instance, contact_info

Use to retrieve company & contact information..

Arguments

  • none

Returns

Returns a Company object.

Example Usage:

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

company = Twocheckout::Company.instance
company.inspect
contact_info = company.contact_info

Example Response:

{
    "affiliate_url"=>nil,
    "currency_code"=>"USD",
    "currency_name"=>"US Dollars",
    "currency_symbol"=>"$",
    "demo"=>"P",
    "pending_return_url"=>nil,
    "return_method"=>"2",
    "return_url"=>"http://localhost:3000/return",
    "secret_word"=>"tango",
    "site_category"=>"Other",
    "site_description"=>nil,
    "site_title"=>nil,
    "soft_descriptor"=>"D1817037",
    "url"=>"http://localhost/",
    "vendor_id"=>"1817037",
    "vendor_name"=>"Library Test Account"
}
{
    "2co_account_level_id"=>"1",
    "customer_service_email"=>"no-reply@2checkout.com",
    "customer_service_phone"=>"6149212450",
    "customer_service_phone_ext"=>"0",
    "mailing_address_1"=>"1785 Obrien Rd",
    "mailing_address_2"=>"1785 Obrien Rd",
    "mailing_address_id"=>"4774374395",
    "mailing_city"=>"Columbus",
    "mailing_country_code"=>"USA",
    "mailing_postal_code"=>"43228",
    "mailing_state"=>"OH",
    "mid"=>"BOFA",
    "office_email"=>"no-reply@2checkout.com",
    "office_phone"=>"6149212450",
    "office_phone_ext"=>"0",
    "physical_address_1"=>"1785 Obrien Rd",
    "physical_address_2"=>"1785 Obrien Rd",
    "physical_address_id"=>"4774374398",
    "physical_city"=>"Columbus",
    "physical_country_code"=>"USA",
    "physical_postal_code"=>"43228",
    "physical_state"=>"OH",
    "vendor_id"=>"1817037"
}