muffin_man 1.5.12 → 2.0.0
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/CHANGELOG.md +5 -0
- data/lib/muffin_man/notifications/v1.rb +19 -10
- data/lib/muffin_man/version.rb +1 -1
- data/muffin_man.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6a23fde4189af4c23e82ceecce92bc1c04a823b1425654d1ea6c2201a4560e3
|
4
|
+
data.tar.gz: ed9e5d6702dbb1c968d0d1d025c25f95b2964a9237a826adcb8eacc441a5d737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52b0b85823c119e7a625cdbb18bc256a3758e60be2abed558e95ff91a148d434ef0a217208bf9c4b72adf71f9b48166f6b3a3f7b59c26b2a945fe19c34db8464
|
7
|
+
data.tar.gz: 415a81fc29205f8b49883a9460558c364a4217f87475388d1221200b34d57fcc0e51e0c53eb44dd173892202c6424977654f0087170193da42b573678f65486a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 2.0.0 [#47](https://github.com/patterninc/muffin_man/pull/47)
|
2
|
+
|
3
|
+
- BREAKING CHANGES: Changed signature of processing_directive check as it was confusing and was not working. processing_directive is a nested structure. It has marketplace_ids. Having marketplace_ids as an independent parameter was confusing.
|
4
|
+
- Added new endpoint support - delete_subscription.
|
5
|
+
|
1
6
|
# 1.5.12 [#45](https://github.com/patterninc/muffin_man/pull/45)
|
2
7
|
|
3
8
|
- Small update to putTransportDetails
|
@@ -43,17 +43,12 @@ module MuffinMan
|
|
43
43
|
params = params.transform_keys(&:to_s)
|
44
44
|
subscription_params = { "destinationId" => params["destination_id"] }
|
45
45
|
# currently SP-API's `processingDirective` only supports ANY_OFFER_CHANGED notification type.
|
46
|
-
if
|
47
|
-
subscription_params
|
48
|
-
|
49
|
-
|
50
|
-
unless params["aggregation_time_period"].nil?
|
51
|
-
subscription_params["processingDirective"]["eventFilter"]
|
52
|
-
.merge!("aggregationSettings" => {
|
53
|
-
"aggregationTimePeriod" => params["aggregation_time_period"]
|
54
|
-
})
|
55
|
-
end
|
46
|
+
if include_processing_directive?(notification_type, params)
|
47
|
+
subscription_params.merge!(
|
48
|
+
"processingDirective" => params["processing_directive"]
|
49
|
+
)
|
56
50
|
end
|
51
|
+
|
57
52
|
subscription_params.merge!("payloadVersion" => params["payload_version"]) unless params["payload_version"].nil?
|
58
53
|
@request_body = subscription_params
|
59
54
|
@request_type = "POST"
|
@@ -80,6 +75,20 @@ module MuffinMan
|
|
80
75
|
@request_type = "DELETE"
|
81
76
|
call_api
|
82
77
|
end
|
78
|
+
|
79
|
+
def delete_destination(destination_id)
|
80
|
+
@local_var_path = "#{NOTIFICATION_PATH}/destinations/#{destination_id}"
|
81
|
+
@scope = NOTIFICATION_SCOPE
|
82
|
+
@request_type = "DELETE"
|
83
|
+
call_api
|
84
|
+
end
|
85
|
+
|
86
|
+
private
|
87
|
+
|
88
|
+
def include_processing_directive?(notification_type, params)
|
89
|
+
PROCESSING_DIRECTIVE_SUPPORTED_NOTIFICATIONS.include?(notification_type) &&
|
90
|
+
params["processing_directive"].present?
|
91
|
+
end
|
83
92
|
end
|
84
93
|
end
|
85
94
|
end
|
data/lib/muffin_man/version.rb
CHANGED
data/muffin_man.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "rspec", "~> 3.2"
|
22
22
|
spec.add_development_dependency 'webmock', '~> 2.1'
|
23
|
-
spec.add_development_dependency 'byebug'
|
23
|
+
spec.add_development_dependency 'byebug', '~> 11.1.3'
|
24
24
|
spec.add_development_dependency 'mock_redis', '>=0.14'
|
25
25
|
spec.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
26
26
|
spec.add_runtime_dependency 'aws-sigv4', '>= 1.1'
|
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:
|
4
|
+
version: 2.0.0
|
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: 2023-
|
13
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -44,16 +44,16 @@ dependencies:
|
|
44
44
|
name: byebug
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "
|
47
|
+
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: 11.1.3
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - "
|
54
|
+
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
56
|
+
version: 11.1.3
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: mock_redis
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|