modulr-api 0.0.32 → 0.0.33

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: 9bff1a371f331732b18e8ea2219c12aa4502cfb587fe1bb3bfc21cc1ea04f01d
4
- data.tar.gz: 1ccbdd8b8b988e4e602dd1c0c3a4be676609c3568145f045c044d78b441ece87
3
+ metadata.gz: f18a9a4738ddda14b40cc77627da9f29e2a643f6dce53f0521d0dc3bdae126d4
4
+ data.tar.gz: d2b2f95e40bcd78b8092c9ac2e52df3711af21eec1998e8164ae9747467661b1
5
5
  SHA512:
6
- metadata.gz: 0dc02b155a382ba7b974d6d94f4d866d433c147d00f83686d82ea656e4376d7454a4c8da91400afd1286b9f318bfe46f252fb5747d2431378f93cbe2f5770e9f
7
- data.tar.gz: bb46276d1c33827c5fa50e381ecf057087a51833af731dc70adf55869ccdc2e6c816d9cd8199564441fc9b5e745edf45067ded2755e254fb71608a795958d1dd
6
+ metadata.gz: efeddc4731f875ef59ce4694795dbcc2cf12af8875b02534a2e25b3926ce043830935e019fa23e3e2e774f53577de564fc9b996a9cda17d3a241d08274249d4e
7
+ data.tar.gz: 7838cc0b1a79731e40f4a73badb46559182d366ef1cd41c4013d4b9d4f86bcfa8d8915b5db0ac53bf9b6e153a0ad46b7e3970a33dfd9ea0d94f0fdbad5308049
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modulr-api (0.0.32)
4
+ modulr-api (0.0.33)
5
5
  faraday (~> 1.0)
6
6
  faraday_middleware (~> 1.0)
7
7
 
@@ -78,10 +78,10 @@ module Modulr
78
78
  private def payment_type
79
79
  @type = if incoming?
80
80
  @attr_details[:type]
81
+ elsif outgoing?
82
+ outgoing_type
81
83
  elsif internal?
82
84
  "INT_INTERC"
83
- else
84
- outgoing_type
85
85
  end
86
86
  @type
87
87
  end
@@ -96,8 +96,6 @@ module Modulr
96
96
  faster_payments
97
97
  when "INT_INTERC"
98
98
  internal
99
- else
100
- raise "Unable to find network and scheme for payment with ID: #{id} and Type: #{type}"
101
99
  end
102
100
  end
103
101
 
@@ -148,10 +146,13 @@ module Modulr
148
146
  !@attr_details.key?(:sourceAccountId)
149
147
  end
150
148
 
149
+ private def outgoing?
150
+ @attributes.key?(:schemeInfo) && !@attributes[:schemeInfo].empty?
151
+ end
152
+
151
153
  private def internal?
152
154
  (@attr_details[:sourceAccountId] && @attr_details.key?(:destinationId)) ||
153
- !@attributes.key?(:schemeInfo) ||
154
- @attributes[:schemeInfo].empty?
155
+ (@attributes.key?(:schemeInfo) && @attributes[:schemeInfo].empty?)
155
156
  end
156
157
  end
157
158
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulr
4
- VERSION = "0.0.32"
4
+ VERSION = "0.0.33"
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.32
4
+ version: 0.0.33
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-14 00:00:00.000000000 Z
11
+ date: 2023-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday