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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c2a575430d09f4af5bb3e2bf4053a8d4da34b3d14a4184ca18c352e17dae8de
4
- data.tar.gz: c8288eb2af176ac471c6fbf76703c5defd444884bfe1061b495f2693f755b6cf
3
+ metadata.gz: 2232efb82324373026a66792ac9c2a421d295fd5be23d8f115dc54bc72649565
4
+ data.tar.gz: 36db3f76d2f1db72ad87ba4161f7434b317b5240940562ed127377cb3fde8a30
5
5
  SHA512:
6
- metadata.gz: 33e200888db947536f6c81f0e7797784c6fcc9fd0c18cfb5cbedf22fe6717506aa15179532de2c003eaae24ca14783928523352554039b007092659f8e9923de
7
- data.tar.gz: cc2dd1e86449dd40b5e601f7f2035500d1c0ead077024c79bb024d0973d64edc2f966c18af23045e90aec023dfeb411c07adc313f0d03350ca00d47428f7a173
6
+ metadata.gz: 1f3eaaa8eff333ac9bb5166175d7776050397b91b69ac62797c76dd2e87e9ba94198746b4a0ea17cdab3676455082ff0e2ebfb92d2ac77e49c718b1000126827
7
+ data.tar.gz: 53ea2655047fdbe962abd20d0f63c3afd7abb4f64a4ced118d81cc17c7aaa8a31c2fc4640d85f934383077977c71a206f34ee91ebf695dea1fe1ab081082058c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jamm (1.0.12)
4
+ jamm (1.0.13)
5
5
  rest-client (~> 2.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
data/lib/jamm/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jamm
4
- VERSION = '1.0.12'
4
+ VERSION = '1.0.13'
5
5
  end
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[:content] = Jamm::OpenAPI::ChargeMessage.new(json[:content])
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[:content] = Jamm::OpenAPI::ChargeMessage.new(json[:content])
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[:content] = Jamm::OpenAPI::ChargeMessage.new(json[:content])
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[:content] = Jamm::OpenAPI::ChargeMessage.new(json[:content])
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[:content] = Jamm::OpenAPI::ContractMessage.new(json[:content])
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.12
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-09 00:00:00.000000000 Z
11
+ date: 2025-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client