synapse_pay_rest 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/synapse_pay_rest.rb +3 -1
- data/lib/synapse_pay_rest/error.rb +1 -0
- data/lib/synapse_pay_rest/http_client.rb +2 -0
- data/lib/synapse_pay_rest/models/node/ach_us_node.rb +11 -19
- data/lib/synapse_pay_rest/models/node/base_node.rb +88 -17
- data/lib/synapse_pay_rest/models/node/eft_ind_node.rb +7 -6
- data/lib/synapse_pay_rest/models/node/eft_np_node.rb +3 -4
- data/lib/synapse_pay_rest/models/node/iou_node.rb +6 -15
- data/lib/synapse_pay_rest/models/node/node.rb +18 -17
- data/lib/synapse_pay_rest/models/node/reserve_us_node.rb +5 -11
- data/lib/synapse_pay_rest/models/node/synapse_ind_node.rb +4 -8
- data/lib/synapse_pay_rest/models/node/synapse_np_node.rb +2 -8
- data/lib/synapse_pay_rest/models/node/synapse_us_node.rb +2 -8
- data/lib/synapse_pay_rest/models/node/triumph_subaccount_us_node.rb +17 -0
- data/lib/synapse_pay_rest/models/node/unverified_node.rb +1 -1
- data/lib/synapse_pay_rest/models/node/wire_int_node.rb +3 -4
- data/lib/synapse_pay_rest/models/node/wire_us_node.rb +1 -2
- data/lib/synapse_pay_rest/models/transaction/transaction.rb +9 -9
- data/lib/synapse_pay_rest/models/user/base_document.rb +12 -16
- data/lib/synapse_pay_rest/models/user/document.rb +2 -2
- data/lib/synapse_pay_rest/models/user/physical_document.rb +58 -17
- data/lib/synapse_pay_rest/models/user/user.rb +27 -10
- data/lib/synapse_pay_rest/models/user/virtual_document.rb +7 -8
- data/lib/synapse_pay_rest/version.rb +1 -1
- data/samples.md +41 -60
- data/synapse_pay_rest.gemspec +8 -8
- metadata +4 -6
- data/lib/synapse_pay_rest/models/node/eft_node.rb +0 -27
- data/lib/synapse_pay_rest/models/node/synapse_node.rb +0 -25
- data/lib/synapse_pay_rest/models/node/wire_node.rb +0 -38
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synapse_pay_rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Thomas Hipps
|
8
7
|
- Steven Broderick
|
8
|
+
- Thomas Hipps
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-12-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -145,18 +145,16 @@ files:
|
|
145
145
|
- lib/synapse_pay_rest/models/node/ach_us_node.rb
|
146
146
|
- lib/synapse_pay_rest/models/node/base_node.rb
|
147
147
|
- lib/synapse_pay_rest/models/node/eft_ind_node.rb
|
148
|
-
- lib/synapse_pay_rest/models/node/eft_node.rb
|
149
148
|
- lib/synapse_pay_rest/models/node/eft_np_node.rb
|
150
149
|
- lib/synapse_pay_rest/models/node/iou_node.rb
|
151
150
|
- lib/synapse_pay_rest/models/node/node.rb
|
152
151
|
- lib/synapse_pay_rest/models/node/reserve_us_node.rb
|
153
152
|
- lib/synapse_pay_rest/models/node/synapse_ind_node.rb
|
154
|
-
- lib/synapse_pay_rest/models/node/synapse_node.rb
|
155
153
|
- lib/synapse_pay_rest/models/node/synapse_np_node.rb
|
156
154
|
- lib/synapse_pay_rest/models/node/synapse_us_node.rb
|
155
|
+
- lib/synapse_pay_rest/models/node/triumph_subaccount_us_node.rb
|
157
156
|
- lib/synapse_pay_rest/models/node/unverified_node.rb
|
158
157
|
- lib/synapse_pay_rest/models/node/wire_int_node.rb
|
159
|
-
- lib/synapse_pay_rest/models/node/wire_node.rb
|
160
158
|
- lib/synapse_pay_rest/models/node/wire_us_node.rb
|
161
159
|
- lib/synapse_pay_rest/models/transaction/transaction.rb
|
162
160
|
- lib/synapse_pay_rest/models/user/base_document.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module SynapsePayRest
|
2
|
-
# Parent of all EFT nodes. Should not be instantiated directly.
|
3
|
-
#
|
4
|
-
# @todo Make this a module instead.
|
5
|
-
class EftNode < BaseNode
|
6
|
-
class << self
|
7
|
-
private
|
8
|
-
|
9
|
-
def payload_for_create(type:, nickname:, account_number:, **options)
|
10
|
-
payload = {
|
11
|
-
'type' => type,
|
12
|
-
'info' => {
|
13
|
-
'nickname' => nickname,
|
14
|
-
'account_num' => account_number
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
# optional payload fields
|
19
|
-
extra = {}
|
20
|
-
extra['supp_id'] = options[:supp_id] if options[:supp_id]
|
21
|
-
extra['gateway_restricted'] = options[:gateway_restricted] if options[:gateway_restricted]
|
22
|
-
payload['extra'] = extra if extra.any?
|
23
|
-
payload
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module SynapsePayRest
|
2
|
-
# Parent of all Synapse nodes. Should not be instantiated directly.
|
3
|
-
#
|
4
|
-
# @todo Make this a module instead.
|
5
|
-
class SynapseNode < BaseNode
|
6
|
-
class << self
|
7
|
-
private
|
8
|
-
|
9
|
-
def payload_for_create(type:, nickname:, **options)
|
10
|
-
payload = {
|
11
|
-
'type' => type,
|
12
|
-
'info' => {
|
13
|
-
'nickname' => nickname
|
14
|
-
}
|
15
|
-
}
|
16
|
-
# optional payload fields
|
17
|
-
extra = {}
|
18
|
-
extra['supp_id'] = options[:supp_id] if options[:supp_id]
|
19
|
-
extra['gateway_restricted'] = options[:gateway_restricted] if options[:gateway_restricted]
|
20
|
-
payload['extra'] = extra if extra.any?
|
21
|
-
payload
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module SynapsePayRest
|
2
|
-
# Parent of all Wire nodes. Should not be instantiated directly.
|
3
|
-
#
|
4
|
-
# @todo Make this a module instead.
|
5
|
-
class WireNode < BaseNode
|
6
|
-
class << self
|
7
|
-
private
|
8
|
-
|
9
|
-
def payload_for_create(type:, nickname:, bank_name:, account_number:, address:,
|
10
|
-
name_on_account:, **options)
|
11
|
-
payload = {
|
12
|
-
'type' => type,
|
13
|
-
'info' => {
|
14
|
-
'nickname' => nickname,
|
15
|
-
'name_on_account' => name_on_account,
|
16
|
-
'account_num' => account_number,
|
17
|
-
'bank_name' => bank_name,
|
18
|
-
'address' => address,
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
# optional payload fields
|
23
|
-
payload['info']['routing_num'] = options[:routing_number] if options[:routing_number]
|
24
|
-
correspondent_info = {}
|
25
|
-
correspondent_info['routing_num'] = options[:correspondent_routing_number] if options[:correspondent_routing_number]
|
26
|
-
correspondent_info['bank_name'] = options[:correspondent_bank_name] if options[:correspondent_bank_name]
|
27
|
-
correspondent_info['address'] = options[:correspondent_address] if options[:correspondent_address]
|
28
|
-
correspondent_info['swift'] = options[:correspondent_swift] if options[:correspondent_swift]
|
29
|
-
payload['info']['correspondent_info'] = correspondent_info if correspondent_info.any?
|
30
|
-
extra = {}
|
31
|
-
extra['supp_id'] = options[:supp_id] if options[:supp_id]
|
32
|
-
extra['gateway_restricted'] = options[:gateway_restricted] if options[:gateway_restricted]
|
33
|
-
payload['extra'] = extra if extra.any?
|
34
|
-
payload
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|