-
Notifications
You must be signed in to change notification settings - Fork 16
Product_Retrieve
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 a method in this class.
##Methods
###retrieve
Use to retrieve a product.
####Arguments
- string product_id
- Parameters -> API Detail Product
####Returns
Returns a Product object.
####Example Usage:
Product product = TwocheckoutProduct.retrieve(product_id);
Assert.assertEquals(product_id, String.valueOf(product.getProductId()));####Example Response (toJson):
{
"approved_url" : null,
"assigned_product_id" : "2",
"categories" : [],
"commission" : null,
"commission_type" : null,
"description" : "",
"duration" : "Forever",
"handling" : "0.00",
"images" : [],
"long_description" : "",
"name" : "Example Product",
"options" : [],
"pending_url" : null,
"price" : "0.01",
"product_id" : "4774387610",
"recurrence" : "1 Week",
"startup_fee" : null,
"tangible" : "0",
"vendor_id" : "1817037",
"vendor_product_id" : "",
"weight" : "0.00"
}Please feel free to contact 2Checkout directly for assistance with your integration.