Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
README updates, bump the version and date
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwells committed Jun 2, 2017
1 parent 3c80cc7 commit c92e897
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 56 deletions.
108 changes: 54 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![Build Status](https://travis-ci.org/jasonwells/ruby-jet.svg)](https://travis-ci.org/jasonwells/ruby-jet)
[![CircleCI](https://circleci.com/gh/jasonwells/ruby-jet.svg?style=shield)](https://circleci.com/gh/jasonwells/ruby-jet)
[![Dependency Status](https://gemnasium.com/jasonwells/ruby-jet.svg)](https://gemnasium.com/jasonwells/ruby-jet)
[![Code Climate](https://codeclimate.com/github/jasonwells/ruby-jet/badges/gpa.svg)](https://codeclimate.com/github/jasonwells/ruby-jet)
[![Test Coverage](https://codeclimate.com/github/jasonwells/ruby-jet/badges/coverage.svg)](https://codeclimate.com/github/jasonwells/ruby-jet/coverage)
[![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.
Expand All @@ -13,25 +11,26 @@

require 'Jet'

jet_client = Jet.client(merchant_id: "your_merch_id", api_user: "your_api_user", secret: "your_secret")
jet_client = Jet.client(merchant_id: 'your_merch_id', api_user: 'your_api_user', secret: 'your_secret')

## Products
[Jet Products API](https://developer.jet.com/docs/merchant-sku)

Product Attributes

```ruby
attrs = {product_title: 'My Product',
ASIN: '12345ABCDE',
brand: "My Product's Brand",
manufacturer: "My Product's Manufacturer",
main_image_url: 'https://c2.q-assets.com/images/products/p/asj/asj-077_1z.jpg',
bullets: [ "This is bullet line 1",
"This is bullet line 2",
],
product_description: "This is a terrific product that everyone should own.",
multipack_quantity: 1,
}
attrs = {
product_title: 'My Product',
ASIN: '12345ABCDE',
brand: "My Product's Brand",
manufacturer: "My Product's Manufacturer",
main_image_url: 'https://c2.q-assets.com/images/products/p/asj/asj-077_1z.jpg',
bullets: [ 'This is bullet line 1',
'This is bullet line 2',
],
product_description: 'This is a terrific product that everyone should own.',
multipack_quantity: 1
}
```

Call products.update_product to add a new product or update an existing one.
Expand All @@ -56,11 +55,13 @@ response = jet_client.products.update_price('MyNewSku123', price: 30.95)
Update the inventory

```ruby
response = jet_client.products.update_inventory('MyNewSku123',
fulfillment_nodes: [
{fulfillment_node_id: 'node1234', quantity: 100},
{fulfillment_node_id: 'node5678', quantity: 20}
])
response = jet_client.products.update_inventory(
'MyNewSku123',
fulfillment_nodes: [
{ fulfillment_node_id: 'node1234', quantity: 100 },
{ fulfillment_node_id: 'node5678', quantity: 20 }
]
)
```

## Retrieve Orders
Expand Down Expand Up @@ -102,45 +103,44 @@ order = jet_client.orders.get_order(order_url)

```ruby
jet_order_id = order['merchant_order_id']
response = jet_client.orders.acknowledge_order(jet_order_id,
acknowledgement_status: 'accepted',
alt_order_id: '232145', # optional
order_items: [
{ order_item_acknowledgement_status: 'fulfillable',
order_item_id: 'b81f073b18f548b892f6d4497af16297',
alt_order_item_id: '554443322' # optional
}
]
)
response = jet_client.orders.acknowledge_order(
jet_order_id,
acknowledgement_status: 'accepted',
alt_order_id: '232145', # optional
order_items: [
{ order_item_acknowledgement_status: 'fulfillable',
order_item_id: 'b81f073b18f548b892f6d4497af16297',
alt_order_item_id: '554443322' # optional
}
]
)
```

Mark Order as shipped
[Jet Ship Order API](https://developer.jet.com/docs/ship-order)

```ruby
response = jet_client.orders.ship_order(jet_order_id,
alt_order_id: '232145', # optional
shipments: [
{ alt_shipment_id: '11223344', #optional
shipment_tracking_number: '1Z12342452342',
response_shipment_date: 0.days.from_now,
response_shipment_method: 'ups_ground',
expected_delivery_date: 4.days.from_now,
ship_from_zip_code: '12061',
carrier_pick_up_date: 1.days.from_now,
carrier: 'UPS',
shipment_items: [
{ shipment_item_id: '76-s2507-i1810',
alt_shipment_item_id: '129900120', # optional
merchant_sku: 'MyNewSku123',
response_shipment_sku_quantity: 1
}
]
}
]
)
response = jet_client.orders.ship_order(
jet_order_id,
alt_order_id: '232145', # optional
shipments: [
{
alt_shipment_id: '11223344', #optional
shipment_tracking_number: '1Z12342452342',
response_shipment_date: 0.days.from_now,
response_shipment_method: 'ups_ground',
expected_delivery_date: 4.days.from_now,
ship_from_zip_code: '12061',
carrier_pick_up_date: 1.days.from_now,
carrier: 'UPS',
shipment_items: [
{ shipment_item_id: '76-s2507-i1810',
alt_shipment_item_id: '129900120', # optional
merchant_sku: 'MyNewSku123',
response_shipment_sku_quantity: 1
}
]
}
]
)
```




4 changes: 2 additions & 2 deletions ruby-jet.gemspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Gem::Specification.new do |gem|
gem.name = 'ruby-jet'
gem.version = '0.9.0'
gem.date = '2016-11-03'
gem.date = '2017-06-02'
gem.summary = 'Jet API for Ruby'
gem.description = 'Jet API service calls implemented in Ruby'
gem.authors = ['Jason Wells','Mike Ball']
gem.authors = ['Jason Wells']
gem.email = ['[email protected]', '[email protected]']
gem.files = Dir.glob('lib/**/*.rb') + %w(LICENSE README.md)
gem.homepage = 'https://github.com/jasonwells/ruby-jet'
Expand Down

0 comments on commit c92e897

Please sign in to comment.