jamm 1.0.12 → 1.0.13
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/Gemfile.lock +1 -1
- data/lib/jamm/version.rb +1 -1
- data/lib/jamm/webhook.rb +6 -12
- 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: 2232efb82324373026a66792ac9c2a421d295fd5be23d8f115dc54bc72649565
|
4
|
+
data.tar.gz: 36db3f76d2f1db72ad87ba4161f7434b317b5240940562ed127377cb3fde8a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f3eaaa8eff333ac9bb5166175d7776050397b91b69ac62797c76dd2e87e9ba94198746b4a0ea17cdab3676455082ff0e2ebfb92d2ac77e49c718b1000126827
|
7
|
+
data.tar.gz: 53ea2655047fdbe962abd20d0f63c3afd7abb4f64a4ced118d81cc17c7aaa8a31c2fc4640d85f934383077977c71a206f34ee91ebf695dea1fe1ab081082058c
|
data/Gemfile.lock
CHANGED
data/lib/jamm/version.rb
CHANGED
data/lib/jamm/webhook.rb
CHANGED
@@ -10,33 +10,27 @@ module Jamm
|
|
10
10
|
# Parse command is for parsing the received webhook message.
|
11
11
|
# It does not call anything remotely, instead returns the suitable object.
|
12
12
|
def self.parse(json)
|
13
|
-
out =
|
14
|
-
id: json[:id],
|
15
|
-
signature: json[:signature],
|
16
|
-
event_type: json[:event_type],
|
17
|
-
content: nil,
|
18
|
-
created_at: json[:created_at]
|
19
|
-
}
|
13
|
+
out = Jamm::OpenAPI::MerchantWebhookMessage.new(json)
|
20
14
|
|
21
15
|
case json[:event_type]
|
22
16
|
when Jamm::OpenAPI::EventType::CHARGE_CREATED
|
23
|
-
out
|
17
|
+
out.content = Jamm::OpenAPI::ChargeMessage.new(json[:content])
|
24
18
|
return out
|
25
19
|
|
26
20
|
when Jamm::OpenAPI::EventType::CHARGE_UPDATED
|
27
|
-
out
|
21
|
+
out.content = Jamm::OpenAPI::ChargeMessage.new(json[:content])
|
28
22
|
return out
|
29
23
|
|
30
24
|
when Jamm::OpenAPI::EventType::CHARGE_SUCCESS
|
31
|
-
out
|
25
|
+
out.content = Jamm::OpenAPI::ChargeMessage.new(json[:content])
|
32
26
|
return out
|
33
27
|
|
34
28
|
when Jamm::OpenAPI::EventType::CHARGE_FAIL
|
35
|
-
out
|
29
|
+
out.content = Jamm::OpenAPI::ChargeMessage.new(json[:content])
|
36
30
|
return out
|
37
31
|
|
38
32
|
when Jamm::OpenAPI::EventType::CONTRACT_ACTIVATED
|
39
|
-
out
|
33
|
+
out.content = Jamm::OpenAPI::ContractMessage.new(json[:content])
|
40
34
|
return out
|
41
35
|
end
|
42
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jamm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|