Skip to content

Product_Update

Jacob McConnell edited this page Jun 9, 2014 · 2 revisions

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 an existing product.

####Arguments

  • dictionary Parameters
  • Dictionary containing update_product parameters. Parameters -> API Update Product

####Returns

Returns a Product object.

####Example Usage:

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

params = {
    'product_id': 4837117980
    }

product = twocheckout.Product.find(params)

params = {
    'price': 0.01
    }

product = product.update(product)

print result

####Example Response:

{
   u'approved_url': None,
   u'assigned_product_id': u'21',
   u'categories': [],
   u'commission': 0,
   u'commission_amount': None,
   u'commission_type': None,
   u'description': None,
   u'duration': None,
   u'handling': None,
   u'images': [],
   u'long_description': None,
   u'name': u'test product',
   u'options': [],
   u'pending_url': None,
   u'price': u'0.01',
   u'product_id': u'4775359547',
   u'recurrence': None,
   u'recurrence_p': None,
   u'recurring': u'0',
   u'startup_fee': None,
   u'tangible': u'0',
   u'vendor_id': u'1817037',
   u'vendor_product_id': '',
   u'weight': None
}
Clone this wiki locally