shopify_api 4.3.2 → 4.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24e19e9fbb84f843138e83e0f0ba8ce3b0bf2f61
4
- data.tar.gz: c09a186d959fff8e964e2ed1b67baf2060ec3337
3
+ metadata.gz: 7dca094e5f7ccf2da9550944633cf38e5c0c8cab
4
+ data.tar.gz: a7418ed1edea504c03d484f6b2ba57aa2f672424
5
5
  SHA512:
6
- metadata.gz: 9a542d767f044cd1cd2c3b6cea86859588f418f375992f919a448e25b7ee2a234c50300485050306cac60c5bd1ac480e18ba3523ed64d0392ff3959010beb30c
7
- data.tar.gz: ef47467053c8344df5ac1d948028a5bf72b7515a75ec59dfe639d7b5414db51088a4e332977864d127be201b67d2e92d10005b8a01862db073e457e575d3b0f6
6
+ metadata.gz: efcb9714f45426ddab3e895e919329fda0b66c7b920780180e9624d494ad4b5cb523f371ee336edeaced6850e7758b7840dd2db3a38b79fd12166cf59d805319
7
+ data.tar.gz: 04202532fef99c805d47946a62095636b0bb1e3fe03d9671a23e7126432411eebd0cad2acf7ea1e45da73c6b9b268fec4dd2fece6ac04bfbe1d407157c5d5ac4
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == Version 4.3.3
2
+
3
+ * Added `ShopifyAPI::StorefrontAccessToken`
4
+
1
5
  == Version 4.3.2
2
6
 
3
7
  * Relax Ruby version requirement to >= `2.0`
@@ -0,0 +1,4 @@
1
+ module ShopifyAPI
2
+ class StorefrontAccessToken < Base
3
+ end
4
+ end
@@ -1,3 +1,3 @@
1
1
  module ShopifyAPI
2
- VERSION = "4.3.2"
2
+ VERSION = "4.3.3"
3
3
  end
@@ -0,0 +1,9 @@
1
+ {
2
+ "storefront_access_token": {
3
+ "id": 1,
4
+ "access_token": "477697f16c722efd66918cff7b3657a7",
5
+ "access_scope": "unauthenticated_read_product_listings",
6
+ "created_at": "2016-11-15T14:15:10-05:00",
7
+ "title": "Test"
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "storefront_access_tokens": [
3
+ {
4
+ "id": 1,
5
+ "access_token": "477697f16c722efd66918cff7b3657a7",
6
+ "access_scope": "unauthenticated_read_product_listings",
7
+ "created_at": "2016-11-15T14:15:10-05:00",
8
+ "title": "Test 1"
9
+ },
10
+ {
11
+ "id": 2,
12
+ "access_token": "477697f16c722efd66918cff7b3657a7",
13
+ "access_scope": "unauthenticated_read_product_listings",
14
+ "created_at": "2016-11-15T14:15:10-05:00",
15
+ "title": "Test 2"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,32 @@
1
+ require 'test_helper'
2
+
3
+ class StorefrontAccessTokenTest < Test::Unit::TestCase
4
+
5
+ def test_create_storefront_access_token
6
+ fake "storefront_access_tokens", :method => :post, :body => load_fixture('storefront_access_token')
7
+ storefront_access_token = ShopifyAPI::StorefrontAccessToken.create(title: 'Test')
8
+ assert_equal 1, storefront_access_token.id
9
+ assert_equal "Test", storefront_access_token.title
10
+ end
11
+
12
+ def test_delete_storefront_access_token
13
+ fake 'storefront_access_tokens/1', method: :get, status: 200, body: load_fixture('storefront_access_token')
14
+ fake 'storefront_access_tokens/1', method: :delete, status: 200, body: 'destroyed'
15
+
16
+ storefront_access_tokens = ShopifyAPI::StorefrontAccessToken.find(1)
17
+ assert storefront_access_tokens.destroy
18
+ end
19
+
20
+ def test_get_storefront_access_tokens
21
+ fake "storefront_access_tokens", method: :get, status: 201, body: load_fixture('storefront_access_tokens')
22
+
23
+ tokens = ShopifyAPI::StorefrontAccessToken.all
24
+
25
+ assert_equal 2, tokens.size
26
+ assert_equal 1, tokens.first.id
27
+ assert_equal 2, tokens.last.id
28
+ assert_equal 'Test 1', tokens.first.title
29
+ assert_equal 'Test 2', tokens.last.title
30
+ end
31
+
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -189,6 +189,7 @@ files:
189
189
  - lib/shopify_api/resources/shipping_zone.rb
190
190
  - lib/shopify_api/resources/shop.rb
191
191
  - lib/shopify_api/resources/smart_collection.rb
192
+ - lib/shopify_api/resources/storefront_access_token.rb
192
193
  - lib/shopify_api/resources/tax_line.rb
193
194
  - lib/shopify_api/resources/tax_service.rb
194
195
  - lib/shopify_api/resources/theme.rb
@@ -272,6 +273,8 @@ files:
272
273
  - test/fixtures/shipping_zones.json
273
274
  - test/fixtures/shop.json
274
275
  - test/fixtures/smart_collection.json
276
+ - test/fixtures/storefront_access_token.json
277
+ - test/fixtures/storefront_access_tokens.json
275
278
  - test/fixtures/tags.json
276
279
  - test/fixtures/tax_service.json
277
280
  - test/fixtures/transaction.json
@@ -304,6 +307,7 @@ files:
304
307
  - test/shipping_zone_test.rb
305
308
  - test/shop_test.rb
306
309
  - test/smart_collection_test.rb
310
+ - test/storefront_access_token_test.rb
307
311
  - test/tax_service_test.rb
308
312
  - test/test_helper.rb
309
313
  - test/transaction_test.rb