muffin_man 1.5.6 → 1.5.8

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
  SHA256:
3
- metadata.gz: 13ceb91a7ccf4877d5f956f95b024b02e4debef9c6de7095404430c2faa68ce3
4
- data.tar.gz: 692982d4def515e28d7d1493349095b33ad9ea8a215a9b5c3ea16b0bda5e4623
3
+ metadata.gz: 23aa73b6bbde8a83e5f715048e13e5abb5512373935270da0310162d9baccc49
4
+ data.tar.gz: ca5a93e882e3162498be0dd4843c5d74ab8df19d48b7bb4aa020d4f1869ac80a
5
5
  SHA512:
6
- metadata.gz: b447651efebcbba439158667a5bc0e36d726beccb866ba8a6f94208db878c33e96ba75400891548174e8c935e20514faf36b31c948018fe8e7d06b5466b7c028
7
- data.tar.gz: f881d61487f0933c645483b2b63ab7b9e2d2ae5c8dabaeb71067b7d6f8f62738541c7fef9c713adfa1134c27eabf8359e164438351a0867a1b0c2a5bc76f4a63
6
+ metadata.gz: a6ccca43b4e84396271b01fc9b4a6360f3c298bdd76d47d4a41c890e9a107616afb3585e7e11a633003f79369444bd9b716f416ef8c61e0ee34c4916d4330332
7
+ data.tar.gz: f5fb4e499fb511ff02a239a8e6e3b83667f36f8fdbf174569ef650079f25eee272445f066e7b3e53a31e6f9fc401612d547720b451cd4a4b91e96b2fe76b9f04
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.5.7
2
+
3
+ - Fix sandbox support for create shipments in Merchant Fulfillment
4
+
1
5
  # 1.5.6
2
6
 
3
7
  - Sandbox support for create/delete shipments in Merchant Fulfillment [#42](https://github.com/patterninc/muffin_man/pull/42)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module MuffinMan
4
4
  module Feeds
5
- require "sp_api_helpers"
5
+ require "sp_api_helpers" # Wat?
6
6
  class V20210630 < SpApiClient
7
7
  FEED_PATH = "/feeds/2021-06-30"
8
8
 
@@ -43,7 +43,12 @@ module MuffinMan
43
43
  end
44
44
  if sandbox
45
45
  @request_body = JSON.parse(
46
- File.read("./lib/muffin_man/sandbox_helpers/merchant_fulfillment/create_shipment_body.json")
46
+ File.read(
47
+ File.expand_path(
48
+ "../sandbox_helpers/merchant_fulfillment/create_shipment_body.json",
49
+ File.dirname(__FILE__)
50
+ )
51
+ )
47
52
  )
48
53
  end
49
54
  @request_type = "POST"
@@ -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
- @params = params
10
- @local_var_path = "/products/pricing/v0/competitivePrice"
11
- @query_params = { "MarketplaceId" => marketplace_id,
12
- "ItemType" => item_type }
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuffinMan
4
- VERSION = "1.5.6"
4
+ VERSION = "1.5.8"
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muffin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin
8
8
  - Jason
9
9
  - Nate
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-11-10 00:00:00.000000000 Z
13
+ date: 2022-11-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -130,7 +130,7 @@ dependencies:
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
- description:
133
+ description:
134
134
  email:
135
135
  - gavin@pattern.com
136
136
  - jason@pattern.com
@@ -190,7 +190,7 @@ homepage: https://github.com/patterninc/muffin_man
190
190
  licenses:
191
191
  - MIT
192
192
  metadata: {}
193
- post_install_message:
193
+ post_install_message:
194
194
  rdoc_options: []
195
195
  require_paths:
196
196
  - lib
@@ -205,8 +205,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
207
  requirements: []
208
- rubygems_version: 3.0.3
209
- signing_key:
208
+ rubygems_version: 3.2.22
209
+ signing_key:
210
210
  specification_version: 4
211
211
  summary: Amazon Selling Partner API client
212
212
  test_files: []