muffin_man 1.5.7 → 1.5.9
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 +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +8 -0
- data/lib/muffin_man/fulfillment_inbound/v0.rb +24 -0
- data/lib/muffin_man/merchant_fulfillment/v0.rb +1 -1
- data/lib/muffin_man/product_pricing/v0.rb +11 -5
- data/lib/muffin_man/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 508e823b7d850ccf559d34bf7513454175da5bd22d3db5af73295ec69a897ce6
|
4
|
+
data.tar.gz: 7c0d8fbf5ee47ed27984184da07a2d4c400341675f2386b43372b26a48057d1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6789260d3c36a868196e3d982031789759a73f85c490003f10cf66a70eb8ea60a5a69a0492fd7fe0e19a72ad504beb090c1d065f199509d8fbd2e06b7c348a09
|
7
|
+
data.tar.gz: 8d4998c06367c2e471d16dfcae1abfa0cc62965eca15ad128c217bce88bf91b78873230980507d3c00181b320ba9a2a3cbb59cadd9e584dc9b1957bf6d074f6c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 1.5.9
|
2
|
+
|
3
|
+
- Support for estimateTransport, getTransportDetails, confirmTransport, and voidTransport [#44](https://github.com/patterninc/muffin_man/pull/44)
|
4
|
+
|
5
|
+
# 1.5.8
|
6
|
+
|
7
|
+
- Add batch functionality to competitive price
|
8
|
+
|
1
9
|
# 1.5.7
|
2
10
|
|
3
11
|
- Fix sandbox support for create shipments in Merchant Fulfillment
|
@@ -99,6 +99,30 @@ module MuffinMan
|
|
99
99
|
@request_type = "PUT"
|
100
100
|
call_api
|
101
101
|
end
|
102
|
+
|
103
|
+
def estimate_transport(shipment_id)
|
104
|
+
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate"
|
105
|
+
@request_type = "POST"
|
106
|
+
call_api
|
107
|
+
end
|
108
|
+
|
109
|
+
def get_transport_details(shipment_id)
|
110
|
+
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/"
|
111
|
+
@request_type = "GET"
|
112
|
+
call_api
|
113
|
+
end
|
114
|
+
|
115
|
+
def confirm_transport(shipment_id)
|
116
|
+
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/confirm"
|
117
|
+
@request_type = "POST"
|
118
|
+
call_api
|
119
|
+
end
|
120
|
+
|
121
|
+
def void_transport(shipment_id)
|
122
|
+
@local_var_path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/void"
|
123
|
+
@request_type = "POST"
|
124
|
+
call_api
|
125
|
+
end
|
102
126
|
end
|
103
127
|
end
|
104
128
|
end
|
@@ -45,7 +45,7 @@ module MuffinMan
|
|
45
45
|
@request_body = JSON.parse(
|
46
46
|
File.read(
|
47
47
|
File.expand_path(
|
48
|
-
|
48
|
+
"../sandbox_helpers/merchant_fulfillment/create_shipment_body.json",
|
49
49
|
File.dirname(__FILE__)
|
50
50
|
)
|
51
51
|
)
|
@@ -6,14 +6,20 @@ module MuffinMan
|
|
6
6
|
GET_COMPETITIVE_PRICE_PARAMS = %w[Asins Skus CustomerType].freeze
|
7
7
|
|
8
8
|
def get_competitive_pricing(marketplace_id, item_type='Asin', params = {})
|
9
|
-
@
|
10
|
-
@
|
11
|
-
@
|
12
|
-
|
13
|
-
@query_params.merge!(@params.slice(*GET_COMPETITIVE_PRICE_PARAMS))
|
9
|
+
@local_var_path = '/products/pricing/v0/competitivePrice'
|
10
|
+
@params = { 'MarketplaceId' => marketplace_id, 'ItemType' => item_type }
|
11
|
+
@params.merge! params.slice(*GET_COMPETITIVE_PRICE_PARAMS)
|
12
|
+
@query_params = hash_to_sp_api_uri_params(@params)
|
14
13
|
@request_type = "GET"
|
15
14
|
call_api
|
16
15
|
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
# SP APIs expect param array on the form of Asins=Asin1%2CAsin2 (%2C is url escaped for ,) ...
|
20
|
+
def hash_to_sp_api_uri_params(params)
|
21
|
+
params.keys.map { |k| "#{k}=#{params[k].is_a?(Array) ? params[k].join("%2C") : params[k]}" }.join('&')
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
19
25
|
end
|
data/lib/muffin_man/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muffin_man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|