modulr-api 0.0.29 → 0.0.30

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: dfee429f389323b1d5272e26a6dd289ac0accfafa4364af2634d90596ff5bc04
4
+ data.tar.gz: df4e737338758aa5ec2a00dff6dfa66751da635d61e53f4b6f6b2973d8dc965f
5
5
  SHA512:
6
- metadata.gz: 7626340f7c17049a55fce43f692b69309427327d16e6b23d4419201c73eeee433520732847ebcd0060c8c1970ac88c58b79bc92faf7436a6d3c2a0d35b1e1075
7
- data.tar.gz: '078b0409afa38715e68dbc9421df171f8068595f90cddc70776bf36d682f2c03545c0cf8e22ee7a45793501d9ec9d6723df4390b155cab08c50bc0a48dfca26e'
6
+ metadata.gz: f4f43fbc7f0817edf67cff3d576fbf964b916fca83297c7dae1c60fb367be0b173c273c89a9fd67088a335fa9cb05478fc6bc955518e27406237928b407db714
7
+ data.tar.gz: 7bd2779a0bc733012a84598fc4492fb9ce8b3e4e62f54c15f81f442a5fb6afcc7b4bd67a129393751252e7f2d990ce6698c3bfde5ebaa510e33e8733d2ab1eaf
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.30)
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,8 @@ 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[:schemeInfo].empty?
150
152
  end
151
153
  end
152
154
  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.30"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aitor García Rey