modulr-api 0.0.24 → 0.0.25

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: 4c1dc8aa140f6be1d96ad9b068a6d9a1020b3c1e553aa332598915699e657f99
4
- data.tar.gz: af067bdb4a8cd588b71e86e43aa6f0bf5f1a2c9af22fe6792a6a3c6055875c05
3
+ metadata.gz: 23c622f4bb224ae3aa56fcf4bdb541c7685647652c839fb3dbfac5de5cb0cbb2
4
+ data.tar.gz: 0b400b25d04689905dcbbbf0794008c5d592739d729eae06e28e7fbd07693004
5
5
  SHA512:
6
- metadata.gz: 34cada4ed145c82954fd8e9d2206eb7814d1fb3d4c49de1a5949ad99783c7a7dd8f47626c8a11b7a2cf6feee2b1c3c3cb548d0fd8df6e24ef3a98a98f101a07e
7
- data.tar.gz: b455c299a24441b12d3cbe79fe4c3b2d34e845a0fe32db391a1592ad60d29b77a5b51271969e4d767b7007420874eb46cd818309e59fb79f34cef2099f6552b0
6
+ metadata.gz: 99a99459d32a6574236d7e2382060ae22b7619b0a665a88aef30a7d223afc7102d3fa6d8e82251cbb0e40e9a7a56fb3d037b7cdecba5f8d69af3009209fad92e
7
+ data.tar.gz: c5c58c43b9be20d922dbcd43baa41056d4760756e268f486822e8f29eaf7d9fa4126eaf59e6e0aaf10dcbaeb3c2993b811d5791f291074abee055ff5136d2807
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modulr-api (0.0.24)
4
+ modulr-api (0.0.25)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
@@ -5,6 +5,7 @@ module Modulr
5
5
  module Accounts
6
6
  class Identifier < Base
7
7
  map :type
8
+ map :id
8
9
  map :iban
9
10
  map :bic
10
11
  map :currency
@@ -37,6 +37,7 @@ require_relative "notifications/collection"
37
37
  require_relative "payments/payment"
38
38
  require_relative "payments/counterparty"
39
39
  require_relative "payments/details/incoming/general"
40
+ require_relative "payments/details/incoming/internal"
40
41
  require_relative "payments/details/outgoing/general"
41
42
  require_relative "payments/destination"
42
43
  require_relative "payments/collection"
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Modulr
4
+ module Resources
5
+ module Payments
6
+ module Details
7
+ module Incoming
8
+ class Internal < Base
9
+ attr_reader :destination
10
+
11
+ map :sourceAccountId, :source_account_id
12
+ map :currency
13
+ map :amount
14
+ map :reference
15
+
16
+ def initialize(raw_response, attributes = {})
17
+ super(raw_response, attributes)
18
+ @destination = Destination.new(nil, attributes[:destination])
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -21,9 +21,11 @@ module Modulr
21
21
  private def parse_details(attributes)
22
22
  details = attributes[:details]
23
23
 
24
- case details&.dig(:type)
24
+ case details&.dig(:type) || details&.dig(:destinationType)
25
25
  when "PI_SECT", "PI_SEPA_INST", "PI_FAST", "PI_REV"
26
26
  Details::Incoming::General.new(nil, details)
27
+ when "ACCOUNT"
28
+ Details::Incoming::Internal.new(nil, details)
27
29
  else
28
30
  Details::Outgoing::General.new(nil, details)
29
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulr
4
- VERSION = "0.0.24"
4
+ VERSION = "0.0.25"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulr-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aitor García Rey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -226,6 +226,7 @@ files:
226
226
  - lib/modulr/resources/payments/counterparty.rb
227
227
  - lib/modulr/resources/payments/destination.rb
228
228
  - lib/modulr/resources/payments/details/incoming/general.rb
229
+ - lib/modulr/resources/payments/details/incoming/internal.rb
229
230
  - lib/modulr/resources/payments/details/outgoing/general.rb
230
231
  - lib/modulr/resources/payments/payment.rb
231
232
  - lib/modulr/resources/transactions/collection.rb