active_fulfillment 3.2.4 → 3.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0f9b8104563234cb4c072ac8af4359437c39228
|
4
|
+
data.tar.gz: a2066097da1cac659bf2b8d1be352448ac08ebbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fe27cd0a146e3eb3595851d9d7b7dc22c473a8ae4609a6b2292f1d17e66fdc459f07f298a16d474ed1266ba825d1d51cf4f2d914368bedfad83d57219c64cd1
|
7
|
+
data.tar.gz: e4c6103a6053887a91294de1c8e3269b09a5a2983bc544d0985fb8969c04d02c70648f6f87e8b05bb8431e430467c0860780ab67c0891a77331d64f7daf408a5
|
@@ -18,15 +18,37 @@ module ActiveFulfillment
|
|
18
18
|
XML_FAILURE_RESPONSE = { :success => FAILURE }.freeze
|
19
19
|
|
20
20
|
ENDPOINTS = {
|
21
|
-
:
|
21
|
+
:au => 'mws.amazonservices.com.au',
|
22
|
+
:br => 'mws.amazonservices.com',
|
23
|
+
:ca => 'mws.amazonservices.com',
|
22
24
|
:cn => 'mws.amazonservices.com.cn',
|
23
|
-
:de => 'mws-eu.amazonservices.
|
24
|
-
:es => 'mws-eu.amazonservices.
|
25
|
-
:fr => 'mws-eu.amazonservices.
|
26
|
-
:
|
25
|
+
:de => 'mws-eu.amazonservices.com',
|
26
|
+
:es => 'mws-eu.amazonservices.com',
|
27
|
+
:fr => 'mws-eu.amazonservices.com',
|
28
|
+
:gb => 'mws-eu.amazonservices.com',
|
29
|
+
:in => 'mws.amazonservices.in',
|
30
|
+
:it => 'mws-eu.amazonservices.com',
|
27
31
|
:jp => 'mws.amazonservices.jp',
|
28
|
-
:
|
29
|
-
:
|
32
|
+
:mx => 'mws.amazonservices.com',
|
33
|
+
:uk => 'mws-eu.amazonservices.com',
|
34
|
+
:us => 'mws.amazonservices.com',
|
35
|
+
}.freeze
|
36
|
+
|
37
|
+
MARKETPLACE_IDS = {
|
38
|
+
:au => 'A39IBJ37TRP1C6',
|
39
|
+
:br => 'A2Q3Y263D00KWC',
|
40
|
+
:ca => 'A2EUQ1WTGCTBG2',
|
41
|
+
:cn => 'AAHKV2X7AFYLW',
|
42
|
+
:de => 'A1PA6795UKMFR9',
|
43
|
+
:es => 'A1RKKUPIHCS9HS',
|
44
|
+
:fr => 'A13V1IB3VIYZZH',
|
45
|
+
:gb => 'A1F83G8C2ARO7P',
|
46
|
+
:in => 'A21TJRUUN4KGV',
|
47
|
+
:it => 'APJ6JRA9NG5V4',
|
48
|
+
:jp => 'A1VC38T7YXB528',
|
49
|
+
:mx => 'A1AM78C64UM0Y8',
|
50
|
+
:uk => 'A1F83G8C2ARO7P',
|
51
|
+
:us => 'ATVPDKIKX0DER',
|
30
52
|
}.freeze
|
31
53
|
|
32
54
|
LOOKUPS = {
|
@@ -86,6 +108,10 @@ module ActiveFulfillment
|
|
86
108
|
ENDPOINTS[@options[:endpoint] || :us]
|
87
109
|
end
|
88
110
|
|
111
|
+
def marketplace_id
|
112
|
+
MARKETPLACE_IDS[@options[:endpoint] || :us]
|
113
|
+
end
|
114
|
+
|
89
115
|
def fulfill(order_id, shipping_address, line_items, options = {})
|
90
116
|
requires!(options, :order_date, :shipping_method)
|
91
117
|
with_error_handling do
|
@@ -339,7 +365,8 @@ module ActiveFulfillment
|
|
339
365
|
:SellerFulfillmentOrderId => order_id.to_s,
|
340
366
|
:DisplayableOrderId => order_id.to_s,
|
341
367
|
:DisplayableOrderDateTime => options[:order_date].utc.iso8601,
|
342
|
-
:ShippingSpeedCategory => options[:shipping_method]
|
368
|
+
:ShippingSpeedCategory => options[:shipping_method],
|
369
|
+
:MarketplaceId => marketplace_id,
|
343
370
|
}
|
344
371
|
params[:DisplayableOrderComment] = options[:comment] if options[:comment]
|
345
372
|
|
@@ -78,6 +78,11 @@ class AmazonMarketplaceWebServiceTest < Minitest::Test
|
|
78
78
|
assert_equal ActiveFulfillment::AmazonMarketplaceWebService::ENDPOINTS[:jp], service.endpoint
|
79
79
|
end
|
80
80
|
|
81
|
+
def test_endpoint_and_marketplace_ids_have_the_same_keys
|
82
|
+
assert_equal ActiveFulfillment::AmazonMarketplaceWebService::ENDPOINTS.keys,
|
83
|
+
ActiveFulfillment::AmazonMarketplaceWebService::MARKETPLACE_IDS.keys
|
84
|
+
end
|
85
|
+
|
81
86
|
def test_build_basic_api_query
|
82
87
|
options = {
|
83
88
|
"Action" => "SubmitFeed",
|
@@ -247,6 +252,7 @@ class AmazonMarketplaceWebServiceTest < Minitest::Test
|
|
247
252
|
def test_successful_fulfillment
|
248
253
|
@service.expects(:ssl_post).with do |uri, query, headers|
|
249
254
|
assert_equal 'https://mws.amazonservices.com/FulfillmentOutboundShipment/2010-10-01', uri
|
255
|
+
assert_equal 'ATVPDKIKX0DER', CGI.parse(query)['MarketplaceId'].first
|
250
256
|
end.returns(successful_fulfillment_response)
|
251
257
|
response = @service.fulfill('12345678', @address, @line_items, @options)
|
252
258
|
assert response.success?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_fulfillment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Fauser
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -199,14 +199,14 @@ specification_version: 4
|
|
199
199
|
summary: Framework and tools for dealing with shipping, tracking and order fulfillment
|
200
200
|
services.
|
201
201
|
test_files:
|
202
|
-
- test/
|
203
|
-
- test/remote/amazon_mws_test.rb
|
204
|
-
- test/remote/james_and_james_test.rb
|
205
|
-
- test/remote/shipwire_test.rb
|
206
|
-
- test/remote/webgistix_test.rb
|
202
|
+
- test/unit/base_test.rb
|
207
203
|
- test/unit/services/amazon_mws_test.rb
|
208
|
-
- test/unit/services/
|
204
|
+
- test/unit/services/webgistix_test.rb
|
209
205
|
- test/unit/services/shopify_api_test.rb
|
210
206
|
- test/unit/services/shipwire_test.rb
|
211
|
-
- test/unit/services/
|
212
|
-
- test/
|
207
|
+
- test/unit/services/james_and_james_test.rb
|
208
|
+
- test/test_helper.rb
|
209
|
+
- test/remote/amazon_mws_test.rb
|
210
|
+
- test/remote/webgistix_test.rb
|
211
|
+
- test/remote/shipwire_test.rb
|
212
|
+
- test/remote/james_and_james_test.rb
|