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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/modulr/resources/accounts/identifier.rb +1 -0
- data/lib/modulr/resources/base.rb +1 -0
- data/lib/modulr/resources/payments/details/incoming/internal.rb +25 -0
- data/lib/modulr/resources/payments/payment.rb +3 -1
- data/lib/modulr/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c622f4bb224ae3aa56fcf4bdb541c7685647652c839fb3dbfac5de5cb0cbb2
|
4
|
+
data.tar.gz: 0b400b25d04689905dcbbbf0794008c5d592739d729eae06e28e7fbd07693004
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a99459d32a6574236d7e2382060ae22b7619b0a665a88aef30a7d223afc7102d3fa6d8e82251cbb0e40e9a7a56fb3d037b7cdecba5f8d69af3009209fad92e
|
7
|
+
data.tar.gz: c5c58c43b9be20d922dbcd43baa41056d4760756e268f486822e8f29eaf7d9fa4126eaf59e6e0aaf10dcbaeb3c2993b811d5791f291074abee055ff5136d2807
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/modulr/version.rb
CHANGED
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.
|
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-
|
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
|