modulr-api 0.0.23 → 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: 7ed5184be01742b5215ab9a60f438b1b023606db4afab8dd1ab166131e8d20a3
4
- data.tar.gz: 5a559e09198c64c7187b5e928ce7cb03c2f364f448fad55fd25424a200e69aac
3
+ metadata.gz: 23c622f4bb224ae3aa56fcf4bdb541c7685647652c839fb3dbfac5de5cb0cbb2
4
+ data.tar.gz: 0b400b25d04689905dcbbbf0794008c5d592739d729eae06e28e7fbd07693004
5
5
  SHA512:
6
- metadata.gz: 5b4994a56d2b63bb2738a338073713210935f95f5f8d5fe038fe19faf99991b0f2a80c6bfd7d34753e6772f6c275ecb9ea86b4e997b2fd9c21c8ea92a011b4f9
7
- data.tar.gz: 01f5cdcaa5d32ec72c420e1161ef4441cd4260b4fa30435a66eece75f7f6bd4fba3a75e1363c4b5bcaac2aea9d631ec47bb1638172d5c3c584cd9862e016b6ce
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.23)
4
+ modulr-api (0.0.25)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
@@ -129,6 +129,7 @@ PLATFORMS
129
129
  arm64-darwin-20
130
130
  arm64-darwin-21
131
131
  x86_64-darwin-20
132
+ x86_64-darwin-22
132
133
  x86_64-linux
133
134
 
134
135
  DEPENDENCIES
@@ -10,7 +10,7 @@ module Modulr
10
10
  end
11
11
 
12
12
  def format_datetime(datetime)
13
- datetime.strftime("%Y-%m-%dT%l:%M:%S%z")
13
+ datetime.strftime("%Y-%m-%dT%H:%M:%S%z")
14
14
  end
15
15
  end
16
16
  end
@@ -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.23"
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.23
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-04-27 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