You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
products=FetchAppAPI::Product.find(:all,:per_page=>10,:page=>3)product=FetchAppAPI::Product.find("CJ0001")product=FetchAppAPI::Product.create(:sku=>"CJ0001",:name=>"Carrot Juice")product.update(:name=>"Tomato Juice")product.destroyproduct.stats# Returns a FetchAppAPI::Product with only statistical fields filled indownloads=product.downloads# Returns an array of FetchAppAPI::Download for this productfiles=product.files# Returns an array of FetchAppAPI::File for this product
Orders
all_orders=FetchAppAPI::Order.find(:all)current_orders=FetchAppAPI::Order.find(:current,:page=>3)manual_orders=FetchAppAPI::Order.find(:manual,:per_page=>10)expired_orders=FetchAppAPI::Order.find(:expired,:per_page=>10,:page=>3)order=FetchAppAPI::Order.find("1001")order=FetchAppAPI::Order.create(:id=>"1015",:title=>"Test Order",:first_name=>"Donald",:last_name=>"Duck",:email=>"donald@duck.com",:order_items=>[{:sku=>'ABC0001',:price=>10.0},{:sku=>'ABC0002'}])order.update(:first_name=>"Daffy")order.destroyorder.expire# Expires the orderorder.send_email# Reopens the order and sends out an email to the customerorder.stats# Returns a FetchAppAPI::Order with only statistical fields filled inorder_items=order.order_items# Returns an array of FetchAppAPI::OrderItem for this orderdownloads=order.downloads# Returns an array of FetchAppAPI::Download for this order
OrderItems
order_items=order.order_items# Returns an array of FetchAppAPI::OrderItem for this orderorder_item=FetchAppAPI::Order.find("445566")order_item.expire# Expires the OrderItemdownloads=order_item.downloads# Returns an array of FetchAppAPI::Download for this order itemfiles=order_item.files# Returns an array of FetchAppAPI::File for this order item
About
Integrate your site with http://fetchapp.com for seamless digital storage + delivery