shopify_client 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +30 -0
- data/Rakefile +11 -0
- data/lib/shopify_client.rb +10 -0
- data/lib/shopify_client/api/custom_collection.rb +22 -0
- data/lib/shopify_client/api/order.rb +22 -0
- data/lib/shopify_client/api/product.rb +21 -0
- data/lib/shopify_client/api/recurring_application_charge.rb +43 -0
- data/lib/shopify_client/api/script_tag.rb +35 -0
- data/lib/shopify_client/api/shop.rb +16 -0
- data/lib/shopify_client/api/smart_collection.rb +22 -0
- data/lib/shopify_client/api/webhook.rb +34 -0
- data/lib/shopify_client/base.rb +57 -0
- data/lib/shopify_client/client.rb +91 -0
- data/lib/shopify_client/custom_collection.rb +28 -0
- data/lib/shopify_client/error.rb +13 -0
- data/lib/shopify_client/error/client_error.rb +23 -0
- data/lib/shopify_client/error/server_error.rb +15 -0
- data/lib/shopify_client/image.rb +13 -0
- data/lib/shopify_client/order.rb +29 -0
- data/lib/shopify_client/product.rb +22 -0
- data/lib/shopify_client/recurring_application_charge.rb +20 -0
- data/lib/shopify_client/request/content_type.rb +20 -0
- data/lib/shopify_client/response/parse_json.rb +22 -0
- data/lib/shopify_client/response/raise_error.rb +23 -0
- data/lib/shopify_client/script_tag.rb +19 -0
- data/lib/shopify_client/shop.rb +22 -0
- data/lib/shopify_client/smart_collection.rb +28 -0
- data/lib/shopify_client/version.rb +3 -0
- data/lib/shopify_client/webhook.rb +21 -0
- data/shopify_client.gemspec +28 -0
- data/test/fixtures/custom_collection.json +18 -0
- data/test/fixtures/custom_collections.json +19 -0
- data/test/fixtures/order.json +274 -0
- data/test/fixtures/orders.json +276 -0
- data/test/fixtures/product.json +140 -0
- data/test/fixtures/products.json +170 -0
- data/test/fixtures/recurring_application_charge.json +18 -0
- data/test/fixtures/recurring_application_charges.json +34 -0
- data/test/fixtures/script_tag.json +9 -0
- data/test/fixtures/script_tags.json +18 -0
- data/test/fixtures/shop.json +37 -0
- data/test/fixtures/smart_collection.json +25 -0
- data/test/fixtures/smart_collections.json +26 -0
- data/test/fixtures/webhook.json +10 -0
- data/test/fixtures/webhooks.json +20 -0
- data/test/shopify_client/api/custom_collection_spec.rb +54 -0
- data/test/shopify_client/api/order_spec.rb +68 -0
- data/test/shopify_client/api/product_spec.rb +66 -0
- data/test/shopify_client/api/recurring_application_charge_spec.rb +138 -0
- data/test/shopify_client/api/script_tag_spec.rb +109 -0
- data/test/shopify_client/api/shop_spec.rb +30 -0
- data/test/shopify_client/api/smart_collection_spec.rb +54 -0
- data/test/shopify_client/api/webhook_spec.rb +109 -0
- data/test/shopify_client/base_spec.rb +12 -0
- data/test/shopify_client/client_spec.rb +12 -0
- data/test/shopify_client/custom_collection_spec.rb +41 -0
- data/test/shopify_client/error/client_error_spec.rb +19 -0
- data/test/shopify_client/error/server_error_spec.rb +20 -0
- data/test/shopify_client/order_spec.rb +30 -0
- data/test/shopify_client/product_spec.rb +21 -0
- data/test/shopify_client/recurring_application_charge_spec.rb +20 -0
- data/test/shopify_client/script_tag_spec.rb +22 -0
- data/test/shopify_client/shop_spec.rb +14 -0
- data/test/shopify_client/smart_collection_spec.rb +41 -0
- data/test/shopify_client/webhook_spec.rb +22 -0
- data/test/shopify_client_spec.rb +10 -0
- data/test/test_helper.rb +13 -0
- metadata +235 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
require 'shopify_client/image'
|
3
|
+
|
4
|
+
module ShopifyClient
|
5
|
+
|
6
|
+
class CustomCollection < Base
|
7
|
+
|
8
|
+
hattr_reader :body_html, :handle, :id, :products_count, :published_at,
|
9
|
+
:published_scope, :sort_order, :template_suffix, :title, :updated_at
|
10
|
+
|
11
|
+
def self.single_name
|
12
|
+
:custom_collection
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.plural_name
|
16
|
+
:custom_collections
|
17
|
+
end
|
18
|
+
|
19
|
+
def image
|
20
|
+
if attributes[:image]
|
21
|
+
@image ||= Image.new(attributes[:image])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'shopify_client/error'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
class Error
|
5
|
+
|
6
|
+
class ClientError < ShopifyClient::Error
|
7
|
+
|
8
|
+
def self.from_response(response)
|
9
|
+
new parse_error(response[:body]), response[:status]
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.parse_error(body)
|
13
|
+
if body.nil?
|
14
|
+
''
|
15
|
+
else
|
16
|
+
body[:error]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class Order < Base
|
6
|
+
|
7
|
+
hattr_reader :billing_address, :browser_ip, :buyer_accepts_marketing, :cancel_reason,
|
8
|
+
:cancelled_at, :cart_token, :checkout_id, :checkout_token,
|
9
|
+
:client_details, :closed_at, :confirmed, :created_at, :currency,
|
10
|
+
:customer, :discount_codes, :email, :financial_status, :fulfillment_status,
|
11
|
+
:gateway, :id, :landing_site, :landing_site_ref, :line_items, :location_id,
|
12
|
+
:name, :note, :note_attributes, :number, :order_number, :payment_details,
|
13
|
+
:processing_method, :reference, :referring_site, :shipping_address, :shipping_lines,
|
14
|
+
:source, :subtotal_price, :tax_lines, :taxes_included, :test, :token, :total_discounts,
|
15
|
+
:total_line_items_price, :total_price, :total_price_usd, :total_tax, :total_weight,
|
16
|
+
:updated_at, :user_id
|
17
|
+
|
18
|
+
def self.single_name
|
19
|
+
:order
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.plural_name
|
23
|
+
:orders
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class Product < Base
|
6
|
+
|
7
|
+
hattr_reader :body_html, :created_at, :handle, :id, :image, :images,
|
8
|
+
:options, :product_type, :published_at, :published_scope,
|
9
|
+
:tags, :template_suffix, :title, :updated_at, :variants,
|
10
|
+
:vendor
|
11
|
+
|
12
|
+
def self.single_name
|
13
|
+
:product
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.plural_name
|
17
|
+
:products
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class RecurringApplicationCharge < Base
|
6
|
+
|
7
|
+
hattr_reader :activated_on, :billing_on, :cancelled_on, :confirmation_url,
|
8
|
+
:created_at, :id, :name, :price, :return_url, :status, :test,
|
9
|
+
:trial_days, :trial_ends_on, :updated_at
|
10
|
+
def self.single_name
|
11
|
+
:recurring_application_charge
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.plural_name
|
15
|
+
:recurring_application_charges
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'multi_json'
|
3
|
+
|
4
|
+
module ShopifyClient
|
5
|
+
module Request
|
6
|
+
|
7
|
+
class ContentType < Faraday::Middleware
|
8
|
+
|
9
|
+
def call(env)
|
10
|
+
if env[:body] and env[:body].is_a? Hash
|
11
|
+
env[:body] = MultiJson.dump(env[:body])
|
12
|
+
env[:request_headers]["Content-Type"] ||= "application/json"
|
13
|
+
end
|
14
|
+
@app.call env
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'multi_json'
|
3
|
+
|
4
|
+
module ShopifyClient
|
5
|
+
module Response
|
6
|
+
|
7
|
+
class ParseJson < Faraday::Response::Middleware
|
8
|
+
|
9
|
+
def parse(body)
|
10
|
+
if body
|
11
|
+
MultiJson.load(body, :symbolize_keys => true)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def on_complete(env)
|
16
|
+
env[:body] = parse(env[:body]) unless [204, 301, 302, 304].include?(env[:status])
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'shopify_client/error/client_error'
|
3
|
+
require 'shopify_client/error/server_error'
|
4
|
+
|
5
|
+
module ShopifyClient
|
6
|
+
module Response
|
7
|
+
|
8
|
+
class RaiseError < Faraday::Response::Middleware
|
9
|
+
|
10
|
+
def on_complete(env)
|
11
|
+
case env[:status]
|
12
|
+
when 400..499
|
13
|
+
raise ShopifyClient::Error::ClientError.from_response(env)
|
14
|
+
when 500..599
|
15
|
+
raise ShopifyClient::Error::ServerError.from_response(env)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class ScriptTag < Base
|
6
|
+
|
7
|
+
hattr_reader :created_at, :event, :id, :src, :updated_at
|
8
|
+
|
9
|
+
def self.single_name
|
10
|
+
:script_tag
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.plural_name
|
14
|
+
:script_tags
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class Shop < Base
|
6
|
+
|
7
|
+
hattr_reader :address1, :city, :country, :country_code, :country_name,
|
8
|
+
:created_at, :currency, :customer_email, :domain, :email,
|
9
|
+
:google_apps_domain, :google_apps_login_enabled, :id,
|
10
|
+
:latitude, :longitude, :money_format, :money_in_emails_format,
|
11
|
+
:money_with_currency_format, :money_with_currency_in_emails_format,
|
12
|
+
:myshopify_domain, :name, :phone, :plan_display_name, :plan_name,
|
13
|
+
:province, :province_code, :public, :shop_owner, :source,
|
14
|
+
:tax_shipping, :taxes_included, :timezone, :zip
|
15
|
+
|
16
|
+
def self.single_name
|
17
|
+
:shop
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
require 'shopify_client/image'
|
3
|
+
|
4
|
+
module ShopifyClient
|
5
|
+
|
6
|
+
class SmartCollection < Base
|
7
|
+
|
8
|
+
hattr_reader :body_html, :handle, :id, :products_count,
|
9
|
+
:published_at, :published_scope, :rules, :sort_order,
|
10
|
+
:template_suffix, :title, :updated_at
|
11
|
+
|
12
|
+
def self.single_name
|
13
|
+
:smart_collection
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.plural_name
|
17
|
+
:smart_collections
|
18
|
+
end
|
19
|
+
|
20
|
+
def image
|
21
|
+
if attributes[:image]
|
22
|
+
@image ||= Image.new(attributes[:image])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'shopify_client/base'
|
2
|
+
|
3
|
+
module ShopifyClient
|
4
|
+
|
5
|
+
class Webhook < Base
|
6
|
+
|
7
|
+
hattr_reader :address, :created_at, :format, :id, :topic, :updated_at
|
8
|
+
|
9
|
+
def self.single_name
|
10
|
+
:webhook
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.plural_name
|
14
|
+
:webhooks
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'shopify_client/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "shopify_client"
|
8
|
+
spec.version = ShopifyClient::VERSION
|
9
|
+
spec.authors = ["Esteban Pastorino"]
|
10
|
+
spec.email = ["ejpastorino@gmail.com"]
|
11
|
+
spec.summary = %q{Shopify API client.}
|
12
|
+
spec.description = %q{Intented to be a thread-safe replacement of shopify_api.}
|
13
|
+
spec.homepage = "https://github.com/kitop/shopify_client"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "faraday", "~> 0.8"
|
22
|
+
spec.add_dependency "multi_json", "~> 1.5"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "minitest", "~> 5.0.6"
|
27
|
+
spec.add_development_dependency "webmock", "~> 1.13.0"
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"custom_collection": {
|
3
|
+
"body_html": "<p>The best selling ipod ever</p>",
|
4
|
+
"handle": "ipods",
|
5
|
+
"id": 841564295,
|
6
|
+
"products_count": 1,
|
7
|
+
"published_at": "2008-02-01T19:00:00-05:00",
|
8
|
+
"published_scope": "global",
|
9
|
+
"sort_order": "manual",
|
10
|
+
"template_suffix": null,
|
11
|
+
"title": "IPods",
|
12
|
+
"updated_at": "2008-02-01T19:00:00-05:00",
|
13
|
+
"image": {
|
14
|
+
"created_at": "2013-07-18T13:55:42-04:00",
|
15
|
+
"src": "http://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?0"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"custom_collections": [
|
3
|
+
{
|
4
|
+
"body_html": "<p>The best selling ipod ever</p>",
|
5
|
+
"handle": "ipods",
|
6
|
+
"id": 841564295,
|
7
|
+
"published_at": "2008-02-01T19:00:00-05:00",
|
8
|
+
"published_scope": "global",
|
9
|
+
"sort_order": "manual",
|
10
|
+
"template_suffix": null,
|
11
|
+
"title": "IPods",
|
12
|
+
"updated_at": "2008-02-01T19:00:00-05:00",
|
13
|
+
"image": {
|
14
|
+
"created_at": "2013-07-18T13:55:42-04:00",
|
15
|
+
"src": "http://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?0"
|
16
|
+
}
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
@@ -0,0 +1,274 @@
|
|
1
|
+
{
|
2
|
+
"order": {
|
3
|
+
"buyer_accepts_marketing": false,
|
4
|
+
"cancel_reason": null,
|
5
|
+
"cancelled_at": null,
|
6
|
+
"cart_token": "68778783ad298f1c80c3bafcddeea02f",
|
7
|
+
"checkout_token": null,
|
8
|
+
"closed_at": null,
|
9
|
+
"confirmed": false,
|
10
|
+
"created_at": "2008-01-10T11:00:00-05:00",
|
11
|
+
"currency": "USD",
|
12
|
+
"email": "bob.norman@hostmail.com",
|
13
|
+
"financial_status": "authorized",
|
14
|
+
"fulfillment_status": null,
|
15
|
+
"gateway": "authorize_net",
|
16
|
+
"id": 450789469,
|
17
|
+
"landing_site": "http://www.example.com?source=abc",
|
18
|
+
"location_id": null,
|
19
|
+
"name": "#1001",
|
20
|
+
"note": null,
|
21
|
+
"number": 1,
|
22
|
+
"reference": "fhwdgads",
|
23
|
+
"referring_site": "http://www.otherexample.com",
|
24
|
+
"source": null,
|
25
|
+
"subtotal_price": "398.00",
|
26
|
+
"taxes_included": false,
|
27
|
+
"test": false,
|
28
|
+
"token": "b1946ac92492d2347c6235b4d2611184",
|
29
|
+
"total_discounts": "0.00",
|
30
|
+
"total_line_items_price": "398.00",
|
31
|
+
"total_price": "409.94",
|
32
|
+
"total_price_usd": "409.94",
|
33
|
+
"total_tax": "11.94",
|
34
|
+
"total_weight": 0,
|
35
|
+
"updated_at": "2008-01-10T11:00:00-05:00",
|
36
|
+
"user_id": null,
|
37
|
+
"browser_ip": null,
|
38
|
+
"landing_site_ref": "abc",
|
39
|
+
"order_number": 1001,
|
40
|
+
"discount_codes": [
|
41
|
+
{
|
42
|
+
"code": "TENOFF",
|
43
|
+
"amount": "10.00"
|
44
|
+
}
|
45
|
+
],
|
46
|
+
"note_attributes": [
|
47
|
+
{
|
48
|
+
"name": "custom engraving",
|
49
|
+
"value": "Happy Birthday"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"name": "colour",
|
53
|
+
"value": "green"
|
54
|
+
}
|
55
|
+
],
|
56
|
+
"processing_method": "direct",
|
57
|
+
"checkout_id": 450789469,
|
58
|
+
"line_items": [
|
59
|
+
{
|
60
|
+
"fulfillment_service": "manual",
|
61
|
+
"fulfillment_status": null,
|
62
|
+
"grams": 200,
|
63
|
+
"id": 466157049,
|
64
|
+
"price": "199.00",
|
65
|
+
"product_id": 632910392,
|
66
|
+
"quantity": 1,
|
67
|
+
"requires_shipping": true,
|
68
|
+
"sku": "IPOD2008GREEN",
|
69
|
+
"title": "IPod Nano - 8gb",
|
70
|
+
"variant_id": 39072856,
|
71
|
+
"variant_title": "green",
|
72
|
+
"vendor": null,
|
73
|
+
"name": "IPod Nano - 8gb - green",
|
74
|
+
"variant_inventory_management": "shopify",
|
75
|
+
"properties": [
|
76
|
+
{
|
77
|
+
"name": "Custom Engraving",
|
78
|
+
"value": "Happy Birthday"
|
79
|
+
}
|
80
|
+
],
|
81
|
+
"product_exists": true
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"fulfillment_service": "manual",
|
85
|
+
"fulfillment_status": null,
|
86
|
+
"grams": 200,
|
87
|
+
"id": 518995019,
|
88
|
+
"price": "199.00",
|
89
|
+
"product_id": 632910392,
|
90
|
+
"quantity": 1,
|
91
|
+
"requires_shipping": true,
|
92
|
+
"sku": "IPOD2008RED",
|
93
|
+
"title": "IPod Nano - 8gb",
|
94
|
+
"variant_id": 49148385,
|
95
|
+
"variant_title": "red",
|
96
|
+
"vendor": null,
|
97
|
+
"name": "IPod Nano - 8gb - red",
|
98
|
+
"variant_inventory_management": "shopify",
|
99
|
+
"properties": [
|
100
|
+
|
101
|
+
],
|
102
|
+
"product_exists": true
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"fulfillment_service": "manual",
|
106
|
+
"fulfillment_status": null,
|
107
|
+
"grams": 200,
|
108
|
+
"id": 703073504,
|
109
|
+
"price": "199.00",
|
110
|
+
"product_id": 632910392,
|
111
|
+
"quantity": 1,
|
112
|
+
"requires_shipping": true,
|
113
|
+
"sku": "IPOD2008BLACK",
|
114
|
+
"title": "IPod Nano - 8gb",
|
115
|
+
"variant_id": 457924702,
|
116
|
+
"variant_title": "black",
|
117
|
+
"vendor": null,
|
118
|
+
"name": "IPod Nano - 8gb - black",
|
119
|
+
"variant_inventory_management": "shopify",
|
120
|
+
"properties": [
|
121
|
+
|
122
|
+
],
|
123
|
+
"product_exists": true
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"shipping_lines": [
|
127
|
+
{
|
128
|
+
"code": "Free Shipping",
|
129
|
+
"price": "0.00",
|
130
|
+
"source": "shopify",
|
131
|
+
"title": "Free Shipping"
|
132
|
+
}
|
133
|
+
],
|
134
|
+
"tax_lines": [
|
135
|
+
{
|
136
|
+
"price": "11.94",
|
137
|
+
"rate": 0.06,
|
138
|
+
"title": "State Tax"
|
139
|
+
}
|
140
|
+
],
|
141
|
+
"payment_details": {
|
142
|
+
"avs_result_code": null,
|
143
|
+
"credit_card_bin": null,
|
144
|
+
"cvv_result_code": null,
|
145
|
+
"credit_card_number": "XXXX-XXXX-XXXX-4242",
|
146
|
+
"credit_card_company": "Visa"
|
147
|
+
},
|
148
|
+
"billing_address": {
|
149
|
+
"address1": "Chestnut Street 92",
|
150
|
+
"address2": "",
|
151
|
+
"city": "Louisville",
|
152
|
+
"company": null,
|
153
|
+
"country": "United States",
|
154
|
+
"first_name": "Bob",
|
155
|
+
"last_name": "Norman",
|
156
|
+
"latitude": "45.41634",
|
157
|
+
"longitude": "-75.6868",
|
158
|
+
"phone": "555-625-1199",
|
159
|
+
"province": "Kentucky",
|
160
|
+
"zip": "40202",
|
161
|
+
"name": "Bob Norman",
|
162
|
+
"country_code": "US",
|
163
|
+
"province_code": "KY"
|
164
|
+
},
|
165
|
+
"shipping_address": {
|
166
|
+
"address1": "Chestnut Street 92",
|
167
|
+
"address2": "",
|
168
|
+
"city": "Louisville",
|
169
|
+
"company": null,
|
170
|
+
"country": "United States",
|
171
|
+
"first_name": "Bob",
|
172
|
+
"last_name": "Norman",
|
173
|
+
"latitude": "45.41634",
|
174
|
+
"longitude": "-75.6868",
|
175
|
+
"phone": "555-625-1199",
|
176
|
+
"province": "Kentucky",
|
177
|
+
"zip": "40202",
|
178
|
+
"name": "Bob Norman",
|
179
|
+
"country_code": "US",
|
180
|
+
"province_code": "KY"
|
181
|
+
},
|
182
|
+
"fulfillments": [
|
183
|
+
{
|
184
|
+
"created_at": "2013-07-18T13:55:42-04:00",
|
185
|
+
"id": 255858046,
|
186
|
+
"order_id": 450789469,
|
187
|
+
"service": "manual",
|
188
|
+
"status": "failure",
|
189
|
+
"tracking_company": null,
|
190
|
+
"updated_at": "2013-07-18T13:55:42-04:00",
|
191
|
+
"tracking_number": "1Z2345",
|
192
|
+
"tracking_numbers": [
|
193
|
+
"1Z2345"
|
194
|
+
],
|
195
|
+
"tracking_url": "http://www.google.com/search?q=1Z2345",
|
196
|
+
"tracking_urls": [
|
197
|
+
"http://www.google.com/search?q=1Z2345"
|
198
|
+
],
|
199
|
+
"receipt": {
|
200
|
+
"testcase": true,
|
201
|
+
"authorization": "123456"
|
202
|
+
},
|
203
|
+
"line_items": [
|
204
|
+
{
|
205
|
+
"fulfillment_service": "manual",
|
206
|
+
"fulfillment_status": null,
|
207
|
+
"grams": 200,
|
208
|
+
"id": 466157049,
|
209
|
+
"price": "199.00",
|
210
|
+
"product_id": 632910392,
|
211
|
+
"quantity": 1,
|
212
|
+
"requires_shipping": true,
|
213
|
+
"sku": "IPOD2008GREEN",
|
214
|
+
"title": "IPod Nano - 8gb",
|
215
|
+
"variant_id": 39072856,
|
216
|
+
"variant_title": "green",
|
217
|
+
"vendor": null,
|
218
|
+
"name": "IPod Nano - 8gb - green",
|
219
|
+
"variant_inventory_management": "shopify",
|
220
|
+
"properties": [
|
221
|
+
{
|
222
|
+
"name": "Custom Engraving",
|
223
|
+
"value": "Happy Birthday"
|
224
|
+
}
|
225
|
+
],
|
226
|
+
"product_exists": true
|
227
|
+
}
|
228
|
+
]
|
229
|
+
}
|
230
|
+
],
|
231
|
+
"client_details": {
|
232
|
+
"accept_language": null,
|
233
|
+
"browser_ip": "0.0.0.0",
|
234
|
+
"session_hash": null,
|
235
|
+
"user_agent": null
|
236
|
+
},
|
237
|
+
"customer": {
|
238
|
+
"accepts_marketing": false,
|
239
|
+
"created_at": "2013-07-18T13:55:42-04:00",
|
240
|
+
"email": "bob.norman@hostmail.com",
|
241
|
+
"first_name": "Bob",
|
242
|
+
"id": 207119551,
|
243
|
+
"last_name": "Norman",
|
244
|
+
"last_order_id": null,
|
245
|
+
"multipass_identifier": null,
|
246
|
+
"note": null,
|
247
|
+
"orders_count": 0,
|
248
|
+
"state": "disabled",
|
249
|
+
"total_spent": "0.00",
|
250
|
+
"updated_at": "2013-07-18T13:55:42-04:00",
|
251
|
+
"verified_email": true,
|
252
|
+
"tags": "",
|
253
|
+
"last_order_name": null,
|
254
|
+
"default_address": {
|
255
|
+
"address1": "Chestnut Street 92",
|
256
|
+
"address2": "",
|
257
|
+
"city": "Louisville",
|
258
|
+
"company": null,
|
259
|
+
"country": "United States",
|
260
|
+
"first_name": null,
|
261
|
+
"id": 207119551,
|
262
|
+
"last_name": null,
|
263
|
+
"phone": "555-625-1199",
|
264
|
+
"province": "Kentucky",
|
265
|
+
"zip": "40202",
|
266
|
+
"name": null,
|
267
|
+
"province_code": "KY",
|
268
|
+
"country_code": "US",
|
269
|
+
"country_name": "United States",
|
270
|
+
"default": true
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|