Language

2Checkout Documentation

Update

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

Method

update

Use to update and existing product.

Arguments

  • hash Parameters

Returns

Returns a Product object.

Example Usage:

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

product = Twocheckout::Product.find({:product_id => 4839045783})
product = product.update({:name => "new name"})

Example Response:

#{
    "approved_url"=>nil,
    "assigned_product_id"=>"450",
    "categories"=>[
        
    ],
    "commission"=>0,
    "commission_amount"=>nil,
    "commission_type"=>nil,
    "description"=>nil,
    "duration"=>nil,
    "handling"=>nil,
    "images"=>[
        
    ],
    "long_description"=>nil,
    "name"=>"new name",
    "options"=>[
        
    ],
    "pending_url"=>nil,
    "price"=>"1.00",
    "product_id"=>"4839045783",
    "recurrence"=>nil,
    "recurrence_p"=>nil,
    "recurring"=>"0",
    "startup_fee"=>nil,
    "tangible"=>"0",
    "vendor_id"=>"1817037",
    "vendor_product_id"=>"",
    "weight"=>nil
}