shopify_api 4.3.5 → 4.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a735be75b2ea0f7c4762ee44ca3a8c2a2a2a4d22
4
- data.tar.gz: 6a8927da2492a41f0c3454925cae1c4ab1d2caeb
3
+ metadata.gz: 2255bd486a91f8b1900f6f793ed7ebaf9277c0a5
4
+ data.tar.gz: 62a56df1d53f48e963e1df0ed19170af6e0c7f24
5
5
  SHA512:
6
- metadata.gz: 1d894337c5a7297f935866ad69749e118e68959402dfd8ec276241a2af31adab03c8937c074bb5b10360e3ddf05221cddb52d445989bcfab323667c5ab42c176
7
- data.tar.gz: df8fec33376e1dc2b85660af9bd6d097fa251a15225011f0f840023ebc3be1125032dca99dc932250970a1f9754168e0b33ca3350e5c62f017b44d7a105b2b8a
6
+ metadata.gz: d60db8448a674113e459ea0409a531e0934f78f0ebd317dc24b33d36b07d82bae08f9de96b74a38b29d6b68ed51d7db25355cac0e0bbac3f4a0380414c57a42d
7
+ data.tar.gz: 2c902b762830958c3c3554115ab6295c1c35da45f61dd47d40960d0f0668fef0930c57b211d4495e068a0eafab0b0192927d212d86af260f70f95a5dc7525cfd
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == Version 4.3.6
2
+
3
+ * Fixed the `customer_saved_search_id` param in `ShopifyAPI::CustomerSavedSearch#customers`.
4
+
1
5
  == Version 4.3.5
2
6
 
3
7
  * Added support for online mode access tokens, token expiry, and associated_user information.
@@ -3,7 +3,7 @@ require 'shopify_api/resources/customer'
3
3
  module ShopifyAPI
4
4
  class CustomerSavedSearch < Base
5
5
  def customers(params = {})
6
- Customer.search(params.merge({:saved_search_id => self.id}))
6
+ Customer.search(params.merge({:customer_saved_search_id => self.id}))
7
7
  end
8
8
  end
9
9
  end
@@ -7,9 +7,9 @@ module ShopifyAPI
7
7
  end
8
8
 
9
9
  def mark_as_failed
10
- load_attributes_from_response(
11
- put(:mark_as_failed, message: failure_message)
12
- )
10
+ options = {}
11
+ options[:message] = failure_message if failure_message
12
+ load_attributes_from_response(put(:mark_as_failed, options))
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module ShopifyAPI
2
- VERSION = "4.3.5"
2
+ VERSION = "4.3.6"
3
3
  end
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class CountableTest < Test::Unit::TestCase
4
4
  def setup
5
+ super
5
6
  fake "products/count", :body => '{"count": 16}'
6
7
  end
7
8
 
@@ -7,13 +7,13 @@ class CustomerSavedSearchTest < Test::Unit::TestCase
7
7
  end
8
8
 
9
9
  def test_get_customers_from_customer_saved_search
10
- fake 'customers/search.json?saved_search_id=8899730', :body => load_fixture('customer_saved_search_customers'), :extension => false
10
+ fake 'customers/search.json?customer_saved_search_id=8899730', :body => load_fixture('customer_saved_search_customers'), :extension => false
11
11
  assert_equal 1, @customer_saved_search.customers.length
12
12
  assert_equal 112223902, @customer_saved_search.customers.first.id
13
13
  end
14
14
 
15
15
  def test_get_customers_from_customer_saved_search_with_params
16
- fake 'customers/search.json?saved_search_id=8899730&limit=1', :body => load_fixture('customer_saved_search_customers'), :extension => false
16
+ fake 'customers/search.json?customer_saved_search_id=8899730&limit=1', :body => load_fixture('customer_saved_search_customers'), :extension => false
17
17
  customers = @customer_saved_search.customers(:limit => 1)
18
18
  assert_equal 1, customers.length
19
19
  assert_equal 112223902, customers.first.id
@@ -2,20 +2,20 @@ require 'test_helper'
2
2
 
3
3
  class FulFillmentRequestTest < Test::Unit::TestCase
4
4
  def setup
5
- fake "orders/450789469/fulfillment_requests/255858046", method: :get, body: load_fixture('fulfillment_request')
5
+ super
6
+ fake "orders/450789469/fulfillment_requests/695890229", method: :get, body: load_fixture('fulfillment_request')
6
7
  end
7
8
 
8
9
  context "#mark_as_failed" do
9
10
  should "be able to mark_as_failed a fulfillment request" do
10
- fulfillment_request = ShopifyAPI::FulfillmentRequest.find(255858046, params: { order_id: 450789469 })
11
+ fulfillment_request = ShopifyAPI::FulfillmentRequest.find(695890229, params: { order_id: 450789469 })
11
12
 
12
13
  cancelled = ActiveSupport::JSON.decode(load_fixture('fulfillment_request'))
13
14
  cancelled['failure_message'] = 'failure reason'
14
15
  cancelled['message'] = nil
15
- fake "orders/450789469/fulfillment_requests/695890229/mark_as_failed.json?message=",
16
+ fake "orders/450789469/fulfillment_requests/695890229/mark_as_failed",
16
17
  method: :put,
17
- body: ActiveSupport::JSON.encode(cancelled),
18
- extension: false
18
+ body: ActiveSupport::JSON.encode(cancelled)
19
19
 
20
20
  assert fulfillment_request.failure_message.blank?
21
21
  assert fulfillment_request.mark_as_failed
@@ -25,7 +25,7 @@ class FulFillmentRequestTest < Test::Unit::TestCase
25
25
 
26
26
  context "#find" do
27
27
  should "be able to find fulfillment request" do
28
- fulfillment_request = ShopifyAPI::FulfillmentRequest.find(255858046, params: { order_id: 450789469 })
28
+ fulfillment_request = ShopifyAPI::FulfillmentRequest.find(695890229, params: { order_id: 450789469 })
29
29
  assert_equal 695890229, fulfillment_request.id
30
30
  assert_equal 450789469, fulfillment_request.order_id
31
31
  end
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class FulFillmentTest < Test::Unit::TestCase
4
4
  def setup
5
+ super
5
6
  fake "orders/450789469/fulfillments/255858046", :method => :get, :body => load_fixture('fulfillment')
6
7
  end
7
8
 
data/test/limits_test.rb CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class LimitsTest < Test::Unit::TestCase
4
4
  def setup
5
- ShopifyAPI::Base.site = "test.myshopify.com"
5
+ super
6
6
  @header_hash = {'http_x_shopify_shop_api_call_limit' => '100/300'}
7
7
  ShopifyAPI::Base.connection.expects(:response).at_least(0).returns(@header_hash)
8
8
  end
data/test/session_test.rb CHANGED
@@ -4,6 +4,7 @@ require 'timecop'
4
4
  class SessionTest < Test::Unit::TestCase
5
5
 
6
6
  def setup
7
+ super
7
8
  ShopifyAPI::Session.secret = 'secret'
8
9
  end
9
10
 
data/test/test_helper.rb CHANGED
@@ -17,7 +17,7 @@ end
17
17
 
18
18
  class Test::Unit::TestCase < Minitest::Unit::TestCase
19
19
  def self.test(string, &block)
20
- define_method("test:#{string}", &block)
20
+ define_method("test_#{string}", &block)
21
21
  end
22
22
 
23
23
  def self.should(string, &block)
@@ -46,6 +46,11 @@ class Test::Unit::TestCase < Minitest::Unit::TestCase
46
46
 
47
47
  def teardown
48
48
  FakeWeb.clean_registry
49
+
50
+ ShopifyAPI::Base.clear_session
51
+ ShopifyAPI::Base.site = nil
52
+ ShopifyAPI::Base.password = nil
53
+ ShopifyAPI::Base.user = nil
49
54
  end
50
55
 
51
56
  # Custom Assertions
@@ -2,6 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class TransactionTest < Test::Unit::TestCase
4
4
  def setup
5
+ super
5
6
  fake "orders/450789469/transactions/389404469", :method => :get, :body => load_fixture('transaction')
6
7
  end
7
8
 
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.5
4
+ version: 4.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-06 00:00:00.000000000 Z
11
+ date: 2017-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -366,7 +366,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
366
366
  version: '0'
367
367
  requirements: []
368
368
  rubyforge_project:
369
- rubygems_version: 2.5.1
369
+ rubygems_version: 2.5.2
370
370
  signing_key:
371
371
  specification_version: 4
372
372
  summary: ShopifyAPI is a lightweight gem for accessing the Shopify admin REST web