diff --git a/README.md b/README.md index 49ab4aa..04a8311 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,98 @@ [![Gem Version](https://badge.fury.io/rb/ruby-jet.svg)](https://badge.fury.io/rb/ruby-jet) [Jet API](https://developer.jet.com/) service calls implemented in Ruby. + + + +Getting started + +1)Add it to your Gemfile with: + + gem 'ruby-jet' + +2)Then run bundle install + + +3)Create Jet client object + + Example + + jet_client_attrs = { + merchant_id: "your jet merchant id", + api_user: "your jet api_user", + secret: "your jet secret" + } + + client = Jet.client(jet_client_attrs) + +4)Now you can call methods with client object like: + + token = client.token + +5)For the product related API, create object of product like: + + product_client = client.products + +now you can call all the product api methods with product_client object. + example: + + product_client.update_inventory(merchant_sku, body) + product_client.get_inventory(merchant_sku) + ete... + +6)For the order related API, create object of order like: + + jet_order = client.orders + +now you can call all the product api methods with product_client object. + + example: + + jet_order.get_orders(status) + jet_order.get_order(order_url) + ete... + +7)Do same thing for all other APIS (Refunds, Returns and Taxonomy). + +8)Here is all APIS list + + a)Product APIS + 1)update_inventory(merchant_sku, body) + 2)get_inventory(merchant_sku) + 3)update_product(merchant_sku, body) + 4)get_product(merchant_sku) + 5)update_price(merchant_sku, body) + 6)get_price(merchant_sku) + 7)update_image(merchant_sku, body) + 8)get_products(params) + + b)Order APIS + 1)get_orders(status) + 2)get_order(order_url) + 3)get_order_by_id(order_id) + 4)acknowledge_order(order_id, body) + 5)ship_order(order_id, body) + 6)get_directed_cancel + + c)File APIS + 1)upload_token + 2)file_upload(url, body) + 3)uploaded_files(url, file_type, file_name) + 4)jet_file_id(file_id) + + d)Returns + 1)get_returns(status = :created) + 2)get_return(return_url) + 3)get_return_by_id(return_id) + 4)complete_return(return_id, body) + + e)Refunds + 1)create_merchant_initiated_refund(order_id, alt_refund_id) + 2)check_refund_state(refund_authorization_id) + 3)check_for_created_refunds(status) + + f)Taxonomy + 1)get_links(limit, offset, version) + 2)get_node(node_url) + 3)get_node_attributes(node_url) +