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 +4 -4
- data/CHANGELOG +4 -0
- data/lib/shopify_api/resources/customer_saved_search.rb +1 -1
- data/lib/shopify_api/resources/fulfillment_request.rb +3 -3
- data/lib/shopify_api/version.rb +1 -1
- data/test/countable_test.rb +1 -0
- data/test/customer_saved_search_test.rb +2 -2
- data/test/fulfillment_request_test.rb +6 -6
- data/test/fulfillment_test.rb +1 -0
- data/test/limits_test.rb +1 -1
- data/test/session_test.rb +1 -0
- data/test/test_helper.rb +6 -1
- data/test/transaction_test.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2255bd486a91f8b1900f6f793ed7ebaf9277c0a5
|
4
|
+
data.tar.gz: 62a56df1d53f48e963e1df0ed19170af6e0c7f24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d60db8448a674113e459ea0409a531e0934f78f0ebd317dc24b33d36b07d82bae08f9de96b74a38b29d6b68ed51d7db25355cac0e0bbac3f4a0380414c57a42d
|
7
|
+
data.tar.gz: 2c902b762830958c3c3554115ab6295c1c35da45f61dd47d40960d0f0668fef0930c57b211d4495e068a0eafab0b0192927d212d86af260f70f95a5dc7525cfd
|
data/CHANGELOG
CHANGED
@@ -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({:
|
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
|
-
|
11
|
-
|
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
|
data/lib/shopify_api/version.rb
CHANGED
data/test/countable_test.rb
CHANGED
@@ -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?
|
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?
|
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
|
-
|
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(
|
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
|
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(
|
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
|
data/test/fulfillment_test.rb
CHANGED
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
|
-
|
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
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("
|
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
|
data/test/transaction_test.rb
CHANGED
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.
|
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-
|
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.
|
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
|