spiffy_stores_api 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.gitignore +10 -0
  4. data/.travis.yml +14 -0
  5. data/CHANGELOG +3 -0
  6. data/Gemfile +5 -0
  7. data/Gemfile_ar40 +5 -0
  8. data/Gemfile_ar41 +5 -0
  9. data/Gemfile_ar50 +5 -0
  10. data/Gemfile_ar_master +5 -0
  11. data/README.md +200 -0
  12. data/Rakefile +39 -0
  13. data/lib/active_resource/base_ext.rb +21 -0
  14. data/lib/active_resource/connection_ext.rb +10 -0
  15. data/lib/active_resource/detailed_log_subscriber.rb +19 -0
  16. data/lib/active_resource/disable_prefix_check.rb +36 -0
  17. data/lib/active_resource/json_errors.rb +31 -0
  18. data/lib/active_resource/to_query.rb +10 -0
  19. data/lib/spiffy_stores_api.rb +29 -0
  20. data/lib/spiffy_stores_api/connection.rb +33 -0
  21. data/lib/spiffy_stores_api/countable.rb +14 -0
  22. data/lib/spiffy_stores_api/json_format.rb +18 -0
  23. data/lib/spiffy_stores_api/limits.rb +86 -0
  24. data/lib/spiffy_stores_api/metafields.rb +19 -0
  25. data/lib/spiffy_stores_api/resources.rb +2 -0
  26. data/lib/spiffy_stores_api/resources/address.rb +4 -0
  27. data/lib/spiffy_stores_api/resources/article.rb +20 -0
  28. data/lib/spiffy_stores_api/resources/base.rb +86 -0
  29. data/lib/spiffy_stores_api/resources/blog.rb +9 -0
  30. data/lib/spiffy_stores_api/resources/collect.rb +5 -0
  31. data/lib/spiffy_stores_api/resources/country.rb +4 -0
  32. data/lib/spiffy_stores_api/resources/customer.rb +24 -0
  33. data/lib/spiffy_stores_api/resources/image.rb +16 -0
  34. data/lib/spiffy_stores_api/resources/metafield.rb +12 -0
  35. data/lib/spiffy_stores_api/resources/order.rb +23 -0
  36. data/lib/spiffy_stores_api/resources/page.rb +5 -0
  37. data/lib/spiffy_stores_api/resources/product.rb +32 -0
  38. data/lib/spiffy_stores_api/resources/province.rb +5 -0
  39. data/lib/spiffy_stores_api/resources/script_tag.rb +4 -0
  40. data/lib/spiffy_stores_api/resources/standard_collection.rb +18 -0
  41. data/lib/spiffy_stores_api/resources/store.rb +18 -0
  42. data/lib/spiffy_stores_api/resources/super_collection.rb +14 -0
  43. data/lib/spiffy_stores_api/resources/variant.rb +8 -0
  44. data/lib/spiffy_stores_api/resources/webhook.rb +4 -0
  45. data/lib/spiffy_stores_api/session.rb +145 -0
  46. data/lib/spiffy_stores_api/version.rb +3 -0
  47. data/spiffy_stores_api.gemspec +34 -0
  48. data/test/active_resource/json_errors_test.rb +19 -0
  49. data/test/article_test.rb +73 -0
  50. data/test/base_test.rb +112 -0
  51. data/test/blog_test.rb +8 -0
  52. data/test/collect_test.rb +9 -0
  53. data/test/countable_test.rb +13 -0
  54. data/test/customer_test.rb +50 -0
  55. data/test/fixtures/article.json +15 -0
  56. data/test/fixtures/articles.json +39 -0
  57. data/test/fixtures/asset.json +9 -0
  58. data/test/fixtures/assets.json +136 -0
  59. data/test/fixtures/authors.json +1 -0
  60. data/test/fixtures/blog.json +12 -0
  61. data/test/fixtures/blogs.json +13 -0
  62. data/test/fixtures/collect.json +10 -0
  63. data/test/fixtures/custom_collection.json +17 -0
  64. data/test/fixtures/customers.json +64 -0
  65. data/test/fixtures/customers_search.json +66 -0
  66. data/test/fixtures/image.json +10 -0
  67. data/test/fixtures/images.json +20 -0
  68. data/test/fixtures/metafield.json +13 -0
  69. data/test/fixtures/metafields.json +26 -0
  70. data/test/fixtures/o_auth_revoke.json +5 -0
  71. data/test/fixtures/order.json +297 -0
  72. data/test/fixtures/orders.json +299 -0
  73. data/test/fixtures/product.json +116 -0
  74. data/test/fixtures/redirect.json +7 -0
  75. data/test/fixtures/script_tag.json +10 -0
  76. data/test/fixtures/script_tags.json +18 -0
  77. data/test/fixtures/smart_collection.json +21 -0
  78. data/test/fixtures/store.json +35 -0
  79. data/test/fixtures/tags.json +1 -0
  80. data/test/fixtures/transaction.json +29 -0
  81. data/test/fixtures/variant.json +23 -0
  82. data/test/fixtures/variants.json +88 -0
  83. data/test/fixtures/webhook.json +10 -0
  84. data/test/fixtures/webhooks.json +18 -0
  85. data/test/metafield_test.rb +46 -0
  86. data/test/store_test.rb +58 -0
  87. data/test/test_helper.rb +90 -0
  88. metadata +219 -0
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+ class BlogTest < Test::Unit::TestCase
3
+ test "blog creation" do
4
+ fake "blogs", :method => :post, :status => 202, :body => load_fixture('blog')
5
+ blog = SpiffyStoresAPI::Blog.create(:title => "Test Blog")
6
+ assert_equal '{"blog":{"title":"Test Blog"}}', FakeWeb.last_request.body
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class CollectTest < Test::Unit::TestCase
4
+ test "#create should create a collect" do
5
+ fake "collects", :method => :post, :status => 201, :body => load_fixture('collect')
6
+ link = SpiffyStoresAPI::Collect.create(:product_id => 921728736, :collection_id => 841564295)
7
+ assert_equal 841564295, link.id
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class CountableTest < Test::Unit::TestCase
4
+ def setup
5
+ super
6
+ fake "products/count", :body => '{"count": 16}'
7
+ end
8
+
9
+ def test_count_products
10
+ count = SpiffyStoresAPI::Product.count
11
+ assert_equal 16, count
12
+ end
13
+ end
@@ -0,0 +1,50 @@
1
+ require 'test_helper'
2
+
3
+ class CustomerTest < Test::Unit::TestCase
4
+ def setup
5
+ super
6
+
7
+ fake 'customers/207119551', body: load_fixture('customers')
8
+
9
+ @customer = SpiffyStoresAPI::Customer.find(207119551)
10
+ end
11
+
12
+ test "search should get a customers collection" do
13
+ fake "customers/search.json?query=Bob+country%3AUnited+States", :extension => false, :body => load_fixture('customers_search')
14
+
15
+ results = SpiffyStoresAPI::Customer.search(query: 'Bob country:United States')
16
+ assert_equal 'Bob', results.first.first_name
17
+ end
18
+
19
+ # test "account_activation_url should create an account activation url" do
20
+ # fake "customers/207119551/account_activation_url", :method => :post, :body => load_fixture('customers_account_activation_url')
21
+ #
22
+ # activation_url = "http://apple.myshopify.com/account/activate/207119551/86688abf23572680740b1c062fa37111-1458248616"
23
+ # assert_equal activation_url, @customer.account_activation_url
24
+ # end
25
+ #
26
+ # test "#send_invite with no params" do
27
+ # customer_invite_fixture = load_fixture('customer_invite')
28
+ # customer_invite = ActiveSupport::JSON.decode(customer_invite_fixture)
29
+ # fake 'customers/207119551/send_invite', method: :post, body: customer_invite_fixture
30
+ #
31
+ # customer_invite_response = @customer.send_invite
32
+ #
33
+ # assert_equal '{"customer_invite":{}}', FakeWeb.last_request.body
34
+ # assert_kind_of SpiffyStoresAPI::CustomerInvite, customer_invite_response
35
+ # assert_equal customer_invite['customer_invite']['to'], customer_invite_response.to
36
+ # end
37
+ #
38
+ # test "#send_invite with params" do
39
+ # customer_invite_fixture = load_fixture('customer_invite')
40
+ # customer_invite = ActiveSupport::JSON.decode(customer_invite_fixture)
41
+ # fake 'customers/207119551/send_invite', method: :post, body: customer_invite_fixture
42
+ #
43
+ #
44
+ # customer_invite_response = @customer.send_invite(SpiffyStoresAPI::CustomerInvite.new(customer_invite['customer_invite']))
45
+ #
46
+ # assert_equal customer_invite, ActiveSupport::JSON.decode(FakeWeb.last_request.body)
47
+ # assert_kind_of SpiffyStoresAPI::CustomerInvite, customer_invite_response
48
+ # assert_equal customer_invite['customer_invite']['to'], customer_invite_response.to
49
+ # end
50
+ end
@@ -0,0 +1,15 @@
1
+ {
2
+ "article": {
3
+ "id": 6242736,
4
+ "blog_id": 1008414260,
5
+ "title": "First Post",
6
+ "handle": "first-post",
7
+ "author": "Spiffy Stores",
8
+ "body": "",
9
+ "body_html": "",
10
+ "created_at": "2012-07-06T13:57:28-04:00",
11
+ "updated_at": "2012-07-06T13:57:51-04:00",
12
+ "published": true,
13
+ "published_at": "2012-07-06T13:57:28-04:00"
14
+ }
15
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "articles": [{
3
+ "author": "Spiffy Stores",
4
+ "blog_id": 1008414260,
5
+ "body_html": "",
6
+ "body": "",
7
+ "created_at": "2012-07-06T13:57:28-04:00",
8
+ "id": 6242736,
9
+ "published_at": "2012-07-06T13:57:28-04:00",
10
+ "title": "First Post",
11
+ "handle": "first-post",
12
+ "updated_at": "2012-07-06T13:57:51-04:00",
13
+ "published": true
14
+ }, {
15
+ "author": "development shop",
16
+ "blog_id": 1008414260,
17
+ "body_html": "",
18
+ "body": "",
19
+ "created_at": "2013-04-21T18:10:35-04:00",
20
+ "id": 7739673,
21
+ "published_at": "2013-04-21T18:10:22-04:00",
22
+ "title": "My second blog post",
23
+ "handle": "my-second-blog-post",
24
+ "updated_at": "2013-04-21T18:10:35-04:00",
25
+ "published": true
26
+ }, {
27
+ "author": "development shop",
28
+ "blog_id": 1008414260,
29
+ "body_html": null,
30
+ "body": "",
31
+ "created_at": "2013-04-21T18:11:19-04:00",
32
+ "id": 7739683,
33
+ "published_at": "2013-04-21T18:10:45-04:00",
34
+ "title": "50% off sale",
35
+ "handle": "a-50-off-sale",
36
+ "updated_at": "2013-04-21T18:11:19-04:00",
37
+ "published": true
38
+ }]
39
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "asset": {
3
+ "created_at": "2010-07-12T15:31:50-04:00",
4
+ "updated_at": "2010-07-12T15:31:50-04:00",
5
+ "public_url": null,
6
+ "value": "<!-- LIST 3 PER ROW -->\n<h2>Featured Products</h2>\n<table id=\"products\" cellspacing=\"0\" cellpadding=\"0\">\n{% tablerow product in collections.frontpage.products cols:3 %}\n <a href=\"{{product.url}}\">{{ product.featured_image | product_img_url: 'small' | img_tag }}</a>\n <h3><a href=\"{{product.url}}\">{{product.title}}</a></h3>\n <ul class=\"attributes\">\n <li><span class=\"money\">{{product.price_min | money}}</span></li>\n </ul>\n{% endtablerow %}\n</table>\n<!-- /LIST 3 PER ROW -->\n\n <div id=\"articles\">\n \t{% assign article = pages.frontpage %}\n\n <div class=\"article\">\n {% if article.content != \"\" %}\n\t\t <h3>{{ article.title }}</h3>\n <div class=\"article-body textile\">\n \t\t {{ article.content }}\n \t\t</div>\n \t{% else %}\n <div class=\"article-body textile\">\n \t In <em>Admin &gt; Blogs &amp; Pages</em>, create a page with the handle <strong><code>frontpage</code></strong> and it will show up here.<br />\n \t {{ \"Learn more about handles\" | link_to \"http://wiki.spiffy.com/Handle\" }}\n </div>\n \t{% endif %}\n </div>\n\n </div>\n\n",
7
+ "key": "templates/index.liquid"
8
+ }
9
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "assets": [
3
+ {
4
+ "created_at": "2010-07-12T15:31:50-04:00",
5
+ "updated_at": "2010-07-12T15:31:50-04:00",
6
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-body-green.gif?1",
7
+ "key": "assets/bg-body-green.gif"
8
+ },
9
+ {
10
+ "created_at": "2010-07-12T15:31:50-04:00",
11
+ "updated_at": "2010-07-12T15:31:50-04:00",
12
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-body-orange.gif?1",
13
+ "key": "assets/bg-body-orange.gif"
14
+ },
15
+ {
16
+ "created_at": "2010-07-12T15:31:50-04:00",
17
+ "updated_at": "2010-07-12T15:31:50-04:00",
18
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-body-pink.gif?1",
19
+ "key": "assets/bg-body-pink.gif"
20
+ },
21
+ {
22
+ "created_at": "2010-07-12T15:31:50-04:00",
23
+ "updated_at": "2010-07-12T15:31:50-04:00",
24
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-body.gif?1",
25
+ "key": "assets/bg-body.gif"
26
+ },
27
+ {
28
+ "created_at": "2010-07-12T15:31:50-04:00",
29
+ "updated_at": "2010-07-12T15:31:50-04:00",
30
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-content.gif?1",
31
+ "key": "assets/bg-content.gif"
32
+ },
33
+ {
34
+ "created_at": "2010-07-12T15:31:50-04:00",
35
+ "updated_at": "2010-07-12T15:31:50-04:00",
36
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-footer.gif?1",
37
+ "key": "assets/bg-footer.gif"
38
+ },
39
+ {
40
+ "created_at": "2010-07-12T15:31:50-04:00",
41
+ "updated_at": "2010-07-12T15:31:50-04:00",
42
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-main.gif?1",
43
+ "key": "assets/bg-main.gif"
44
+ },
45
+ {
46
+ "created_at": "2010-07-12T15:31:50-04:00",
47
+ "updated_at": "2010-07-12T15:31:50-04:00",
48
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/bg-sidebar.gif?1",
49
+ "key": "assets/bg-sidebar.gif"
50
+ },
51
+ {
52
+ "created_at": "2010-07-12T15:31:50-04:00",
53
+ "updated_at": "2010-07-12T15:31:50-04:00",
54
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/shop.css?1",
55
+ "key": "assets/shop.css"
56
+ },
57
+ {
58
+ "created_at": "2010-07-12T15:31:50-04:00",
59
+ "updated_at": "2010-07-12T15:31:50-04:00",
60
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/shop.css.liquid?1",
61
+ "key": "assets/shop.css.liquid"
62
+ },
63
+ {
64
+ "created_at": "2010-07-12T15:31:50-04:00",
65
+ "updated_at": "2010-07-12T15:31:50-04:00",
66
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/shop.js?1",
67
+ "key": "assets/shop.js"
68
+ },
69
+ {
70
+ "created_at": "2010-07-12T15:31:50-04:00",
71
+ "updated_at": "2010-07-12T15:31:50-04:00",
72
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/sidebar-devider.gif?1",
73
+ "key": "assets/sidebar-devider.gif"
74
+ },
75
+ {
76
+ "created_at": "2010-07-12T15:31:50-04:00",
77
+ "updated_at": "2010-07-12T15:31:50-04:00",
78
+ "public_url": "http://asset1.spiffyserver.com/s/files/1/6909/3384/t/1/assets/sidebar-menu.jpg?1",
79
+ "key": "assets/sidebar-menu.jpg"
80
+ },
81
+ {
82
+ "created_at": "2010-07-12T15:31:50-04:00",
83
+ "updated_at": "2010-07-12T15:31:50-04:00",
84
+ "public_url": null,
85
+ "key": "config/settings.html"
86
+ },
87
+ {
88
+ "created_at": "2010-07-12T15:31:50-04:00",
89
+ "updated_at": "2010-07-12T15:31:50-04:00",
90
+ "public_url": null,
91
+ "key": "layout/theme.liquid"
92
+ },
93
+ {
94
+ "created_at": "2010-07-12T15:31:50-04:00",
95
+ "updated_at": "2010-07-12T15:31:50-04:00",
96
+ "public_url": null,
97
+ "key": "templates/article.liquid"
98
+ },
99
+ {
100
+ "created_at": "2010-07-12T15:31:50-04:00",
101
+ "updated_at": "2010-07-12T15:31:50-04:00",
102
+ "public_url": null,
103
+ "key": "templates/blog.liquid"
104
+ },
105
+ {
106
+ "created_at": "2010-07-12T15:31:50-04:00",
107
+ "updated_at": "2010-07-12T15:31:50-04:00",
108
+ "public_url": null,
109
+ "key": "templates/cart.liquid"
110
+ },
111
+ {
112
+ "created_at": "2010-07-12T15:31:50-04:00",
113
+ "updated_at": "2010-07-12T15:31:50-04:00",
114
+ "public_url": null,
115
+ "key": "templates/collection.liquid"
116
+ },
117
+ {
118
+ "created_at": "2010-07-12T15:31:50-04:00",
119
+ "updated_at": "2010-07-12T15:31:50-04:00",
120
+ "public_url": null,
121
+ "key": "templates/index.liquid"
122
+ },
123
+ {
124
+ "created_at": "2010-07-12T15:31:50-04:00",
125
+ "updated_at": "2010-07-12T15:31:50-04:00",
126
+ "public_url": null,
127
+ "key": "templates/page.liquid"
128
+ },
129
+ {
130
+ "created_at": "2010-07-12T15:31:50-04:00",
131
+ "updated_at": "2010-07-12T15:31:50-04:00",
132
+ "public_url": null,
133
+ "key": "templates/product.liquid"
134
+ }
135
+ ]
136
+ }
@@ -0,0 +1 @@
1
+ {"authors": ["Spiffy Stores", "development shop", "development shop"]}
@@ -0,0 +1,12 @@
1
+ {
2
+ "blog": {
3
+ "id": 1008414260,
4
+ "title": "Test Blog",
5
+ "handle": "test-blog",
6
+ "body": "",
7
+ "body_html": "",
8
+ "created_at": "2012-01-10T17:45:19-05:00",
9
+ "updated_at": "2012-01-10T17:45:19-05:00",
10
+ "published": true
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "blogs": [{
3
+ "handle": "test-blog",
4
+ "created_at": "2012-01-10T17:45:19-05:00",
5
+ "title": "Test Blog",
6
+ "template_suffix": null,
7
+ "updated_at": "2012-01-10T17:45:19-05:00",
8
+ "feedburner_location": null,
9
+ "id": 1008414260,
10
+ "feedburner": null,
11
+ "commentable": "no"
12
+ }]
13
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "collect": {
3
+ "id": 841564295,
4
+ "collection_id": 841564295,
5
+ "product_id": 632910392,
6
+ "created_at": null,
7
+ "updated_at": null,
8
+ "position": 1
9
+ }
10
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "custom_collection": {
3
+ "id": 1063001463,
4
+ "handle": "macbooks",
5
+ "title": "Macbooks",
6
+ "updated_at": "2016-03-17T16:58:37-04:00",
7
+ "body_html": null,
8
+ "published_at": "2016-03-17T16:58:37-04:00",
9
+ "sort_order": "alpha-asc",
10
+ "template_suffix": null,
11
+ "published_scope": "global",
12
+ "image": {
13
+ "created_at": "2016-03-17T16:58:37-04:00",
14
+ "src": "https:\/\/cdn.spiffyserver.com\/s\/files\/1\/0006\/9093\/3842\/collections\/fd43f2c8883f6e9b680e3295fd990d2c.gif?v=1458248317"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "customer": {
3
+ "id": 207119551,
4
+ "title": "Mr",
5
+ "first_name": "Bob",
6
+ "last_name": "Norman",
7
+ "name": "Mr Bob Norman",
8
+ "email": "bob.norman@hostmail.com",
9
+ "accepts_marketing": false,
10
+ "note": null,
11
+ "orders_count": 1,
12
+ "state": "disabled",
13
+ "total_spent": "41.94",
14
+ "created_at": "2016-03-17T17:04:13-04:00",
15
+ "updated_at": "2016-03-17T17:04:13-04:00",
16
+ "sign_in_count": 0,
17
+ "current_sign_in_at": null,
18
+ "current_sign_in_ip": null,
19
+ "last_sign_in_at": null,
20
+ "last_sign_in_ip": null,
21
+ "last_order_id": 450789469,
22
+ "wholesale": false,
23
+ "credit": 0,
24
+ "tags": "friend,discount10",
25
+ "default_address": {
26
+ "id": 207119551,
27
+ "title": "Mr",
28
+ "first_name": "Bob",
29
+ "last_name": "Norman",
30
+ "name": "Mr Bob Norman",
31
+ "company": "",
32
+ "address1": "Chestnut Street 92",
33
+ "address2": "",
34
+ "city": "Louisville",
35
+ "province": "Kentucky",
36
+ "province_code": "KY",
37
+ "country": "United States",
38
+ "country_code": "US",
39
+ "zip": "40202",
40
+ "phone": "555-625-1199",
41
+ "default": true
42
+ },
43
+ "addresses": [
44
+ {
45
+ "id": 207119551,
46
+ "title": "Mr",
47
+ "first_name": "Bob",
48
+ "last_name": "Norman",
49
+ "name": "Mr Bob Norman",
50
+ "company": "",
51
+ "address1": "Chestnut Street 92",
52
+ "address2": "",
53
+ "city": "Louisville",
54
+ "province": "Kentucky",
55
+ "province_code": "KY",
56
+ "country": "United States",
57
+ "country_code": "US",
58
+ "zip": "40202",
59
+ "phone": "555-625-1199",
60
+ "default": true
61
+ }
62
+ ]
63
+ }
64
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "customers": [
3
+ {
4
+ "id": 207119551,
5
+ "title": "Mr",
6
+ "first_name": "Bob",
7
+ "last_name": "Norman",
8
+ "name": "Mr Bob Norman",
9
+ "email": "bob.norman@hostmail.com",
10
+ "accepts_marketing": false,
11
+ "note": null,
12
+ "orders_count": 1,
13
+ "state": "disabled",
14
+ "total_spent": "41.94",
15
+ "created_at": "2016-03-17T17:04:13-04:00",
16
+ "updated_at": "2016-03-17T17:04:13-04:00",
17
+ "sign_in_count": 0,
18
+ "current_sign_in_at": null,
19
+ "current_sign_in_ip": null,
20
+ "last_sign_in_at": null,
21
+ "last_sign_in_ip": null,
22
+ "last_order_id": 450789469,
23
+ "wholesale": false,
24
+ "credit": 0,
25
+ "tags": "friend,discount10",
26
+ "default_address": {
27
+ "id": 207119551,
28
+ "title": "Mr",
29
+ "first_name": "Bob",
30
+ "last_name": "Norman",
31
+ "name": "Mr Bob Norman",
32
+ "company": "",
33
+ "address1": "Chestnut Street 92",
34
+ "address2": "",
35
+ "city": "Louisville",
36
+ "province": "Kentucky",
37
+ "province_code": "KY",
38
+ "country": "United States",
39
+ "country_code": "US",
40
+ "zip": "40202",
41
+ "phone": "555-625-1199",
42
+ "default": true
43
+ },
44
+ "addresses": [
45
+ {
46
+ "id": 207119551,
47
+ "title": "Mr",
48
+ "first_name": "Bob",
49
+ "last_name": "Norman",
50
+ "name": "Mr Bob Norman",
51
+ "company": "",
52
+ "address1": "Chestnut Street 92",
53
+ "address2": "",
54
+ "city": "Louisville",
55
+ "province": "Kentucky",
56
+ "province_code": "KY",
57
+ "country": "United States",
58
+ "country_code": "US",
59
+ "zip": "40202",
60
+ "phone": "555-625-1199",
61
+ "default": true
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }