modulr-api 0.0.29 → 0.0.31

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: c8c9dbb9dd8e49d7371b05d2e68e7222d5e37c654ffe46e389d6d5d113ebffbd
4
- data.tar.gz: 37a5c32437eaedaad272ae831543be0626b2334438692a6a483ba78af6cdd6fa
3
+ metadata.gz: 3a04fe4ec976453a135e2388d53dd5dc143ff75236b1d2422d6c3f5890abcf34
4
+ data.tar.gz: 38950add527426a6cbd2e70a6ceef4d47461742a6c43f72bed49b17b8787d9bb
5
5
  SHA512:
6
- metadata.gz: 7626340f7c17049a55fce43f692b69309427327d16e6b23d4419201c73eeee433520732847ebcd0060c8c1970ac88c58b79bc92faf7436a6d3c2a0d35b1e1075
7
- data.tar.gz: '078b0409afa38715e68dbc9421df171f8068595f90cddc70776bf36d682f2c03545c0cf8e22ee7a45793501d9ec9d6723df4390b155cab08c50bc0a48dfca26e'
6
+ metadata.gz: 24e8fa1c452260a4ea01fdacd58798a3d117d2aaf90a00bbc9beb0ab5b7be9d17a51713be887f01c1f7d6544984a06b2324175728c6a4bbc1560249fa78e3744
7
+ data.tar.gz: f4e31be0c3f3e7c83fccb9c97ba31d7c108da5c14a013a4a5729c42859721400e52f955f1fbf0105bb6b32f6a61b0801fec806cc1073f13da570ad34f44ab3e8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modulr-api (0.0.29)
4
+ modulr-api (0.0.31)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
@@ -74,13 +74,14 @@ module Modulr
74
74
  end
75
75
 
76
76
  private def payment_type
77
- if incoming?
78
- @attr_details[:type]
79
- elsif internal?
80
- @attr_details[:destinationType]
81
- else
82
- outgoing_type
83
- end
77
+ @type = if incoming?
78
+ @attr_details[:type]
79
+ elsif internal?
80
+ "INT_INTERC"
81
+ else
82
+ outgoing_type
83
+ end
84
+ @type
84
85
  end
85
86
 
86
87
  private def parse_scheme
@@ -91,7 +92,7 @@ module Modulr
91
92
  sepa_instant
92
93
  when "PI_FAST", "PO_FAST"
93
94
  faster_payments
94
- when "ACCOUNT"
95
+ when "INT_INTERC"
95
96
  internal
96
97
  else
97
98
  raise "Unable to find network and scheme for payment with ID: #{id} and Type: #{type}"
@@ -146,7 +147,9 @@ module Modulr
146
147
  end
147
148
 
148
149
  private def internal?
149
- @attr_details[:sourceAccountId] && @attr_details[:destinationId]
150
+ (@attr_details[:sourceAccountId] && @attr_details.key?(:destinationId)) ||
151
+ !@attributes.key?(:schemeInfo) ||
152
+ @attributes[:schemeInfo].empty?
150
153
  end
151
154
  end
152
155
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulr
4
- VERSION = "0.0.29"
4
+ VERSION = "0.0.31"
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.29
4
+ version: 0.0.31
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-07-04 00:00:00.000000000 Z
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday