synapse_pay_rest 3.2.6 → 3.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c72de6543bbbb47edefe1df209eaf2091f73c44
4
- data.tar.gz: b460b9fdce9f6585cfeb0168beeea3d7d6266b6e
3
+ metadata.gz: c438f641057f3ce3480e5f43a11c3a1109233100
4
+ data.tar.gz: a09df32bbbc228d9fe4b1d2647130d8734424546
5
5
  SHA512:
6
- metadata.gz: '0780e99faa813c86be03e05b2ee7082de33bf6a56b6a9a03c60ba7ff3f3d7f981a002476bdb4556424885a76b946c3d9f0aa4a1e9d4fe8ed78942a67295bb465'
7
- data.tar.gz: 46bd306c307582b55688cc7419382b0ef0659a3ef1a4230ee938518a83cd044ac8760f767caaf66dace5dbd0e5c3e596db6bbb0dd06f00bba30f7cfe3bef2b67
6
+ metadata.gz: ddee097e6b46c77bc0ba91b5354e2367fd5187f8db0d1cda69be77d8be9beb0a5340d0a7efc35ef49fd1628450557d788d44d9178e6e6e2acb0e66bb26f7068a
7
+ data.tar.gz: a75f236ced31c80948408e778a14284b02a5611e2f2a0a219593f858211ef63df28883fe7f53465f6b45c26c20a80fdf73d4908e44bb81a99f2910000f43d15a
data/README.md CHANGED
@@ -32,7 +32,7 @@ $ gem install synapse_pay_rest
32
32
 
33
33
  ## Contributing
34
34
 
35
- For minor issues, just open a pull request. For larger changes or features, please email steven@synapsepay.com. Please document and test any public constants/methods. Open an issue or email steven@synapsepay.com if you have any questions.
35
+ For minor issues, please open a pull request. For larger changes or features, please email hello@synapsepay.com. Please document and test any public constants/methods.
36
36
 
37
37
  ## Running the Test Suite
38
38
 
@@ -48,6 +48,7 @@ require 'synapse_pay_rest/models/node/reserve_us_node.rb'
48
48
  # triump subaccount
49
49
  require 'synapse_pay_rest/models/node/triumph_subaccount_us_node.rb'
50
50
  require 'synapse_pay_rest/models/node/subaccount_us_node.rb'
51
+ require 'synapse_pay_rest/models/node/deposit_us_node.rb'
51
52
 
52
53
  # iou
53
54
  require 'synapse_pay_rest/models/node/iou_node.rb'
@@ -0,0 +1,17 @@
1
+ module SynapsePayRest
2
+ # A Synapse node allowing any user to hold funds. You can use this node for
3
+ # storing reserves with Synapse.
4
+ class DepositUsNode < BaseNode
5
+ class << self
6
+ private
7
+
8
+ def payload_for_create(nickname:, **options)
9
+ args = {
10
+ type: 'DEPOSIT-US',
11
+ nickname: nickname
12
+ }.merge(options)
13
+ super(args)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -11,6 +11,7 @@ module SynapsePayRest
11
11
  'EFT-IND' => EftIndNode,
12
12
  'IOU' => IouNode,
13
13
  'RESERVE-US' => ReserveUsNode,
14
+ 'DEPOSIT-US' => DepositUsNode,
14
15
  'SYNAPSE-IND' => SynapseIndNode,
15
16
  'SYNAPSE-NP' => SynapseNpNode,
16
17
  'SYNAPSE-US' => SynapseUsNode,
@@ -11,7 +11,7 @@ module SynapsePayRest
11
11
  :address_street, :address_city, :address_subdivision,
12
12
  :address_postal_code, :address_country_code,
13
13
  :physical_documents, :social_documents, :virtual_documents,
14
- :alias, :day, :month, :year, :screening_results
14
+ :alias, :screening_results
15
15
  attr_reader :id, :permission_scope
16
16
 
17
17
  class << self
@@ -114,24 +114,24 @@ module SynapsePayRest
114
114
 
115
115
  args = {
116
116
  "user"=>user,
117
- "id"=>base_document_data['id'],
118
- "name"=>base_document_data['name'],
119
- "permission_scope"=>base_document_data['permission_scope'],
120
- "address_city"=>nil,
121
- "address_country_code"=>nil,
122
- "address_postal_code"=>nil,
123
- "address_street"=>nil,
124
- "address_subdivision"=>nil,
125
- "alias"=>nil,
126
- "day"=>nil,
127
- "email"=>nil,
128
- "entity_scope"=>nil,
129
- "entity_type"=>nil,
130
- "ip"=>nil,
131
- "month"=>nil,
132
- "phone_number"=>nil,
133
- "year"=>nil,
134
- "screening_results"=>nil,
117
+ "id"=>base_documents_data.first['id'],
118
+ "name"=>base_documents_data.first['name'],
119
+ "permission_scope"=>base_documents_data.first['permission_scope'],
120
+ "address_city"=>base_documents_data.first['address_city'],
121
+ "address_country_code"=>base_documents_data.first['address_country_code'],
122
+ "address_postal_code"=>base_documents_data.first['address_postal_code'],
123
+ "address_street"=>base_documents_data.first['address_street'],
124
+ "address_subdivision"=>base_documents_data.first['address_subdivision'],
125
+ "alias"=>base_documents_data.first['alias'],
126
+ "birth_day"=>base_documents_data.first['day'],
127
+ "email"=>base_documents_data.first['email'],
128
+ "entity_scope"=>base_documents_data.first['entity_scope'],
129
+ "entity_type"=>base_documents_data.first['entity_type'],
130
+ "ip"=>base_documents_data.first['ip'],
131
+ "birth_month"=>base_documents_data.first['month'],
132
+ "phone_number"=>base_documents_data.first['phone_number'],
133
+ "birth_year"=>base_documents_data.first['year'],
134
+ "screening_results"=>base_documents_data.first['screening_results'],
135
135
  "physical_documents"=>physical_docs,
136
136
  "social_documents"=>social_docs,
137
137
  "virtual_documents"=>virtual_docs
@@ -315,9 +315,9 @@ module SynapsePayRest
315
315
  'alias' => aka,
316
316
  'entity_type' => entity_type,
317
317
  'entity_scope' => entity_scope,
318
- 'day' => birth_day,
319
- 'month' => birth_month,
320
- 'year' => birth_year,
318
+ 'birth_day' => birth_day,
319
+ 'birth_month' => birth_month,
320
+ 'birth_year' => birth_year,
321
321
  'address_street' => address_street,
322
322
  'address_city' => address_city,
323
323
  'address_subdivision' => address_subdivision,
@@ -581,6 +581,19 @@ module SynapsePayRest
581
581
  SynapseUsNode.create(user: self, **options)
582
582
  end
583
583
 
584
+ # Creates a DEPOSIT-US node.
585
+ #
586
+ # @param nickname [String] nickname for the node
587
+ # @param supp_id [String] (optional)
588
+ # @param gateway_restricted [Boolean] (optional)
589
+ #
590
+ # @raise [SynapsePayRest::Error]
591
+ #
592
+ # @return [SynapsePayRest::SynapseUsNode]
593
+ def create_deposit_us_node(**options)
594
+ SynapseUsNode.create(user: self, **options)
595
+ end
596
+
584
597
  # Creates a SUBACCOUNT-US node.
585
598
  #
586
599
  # @param nickname [String] nickname for the node
@@ -1,4 +1,4 @@
1
1
  module SynapsePayRest
2
2
  # Gem version
3
- VERSION = '3.2.6'.freeze
3
+ VERSION = '3.2.8'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapse_pay_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.6
4
+ version: 3.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Broderick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-09-29 00:00:00.000000000 Z
12
+ date: 2017-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -162,6 +162,7 @@ files:
162
162
  - lib/synapse_pay_rest/models/institution/institution.rb
163
163
  - lib/synapse_pay_rest/models/node/ach_us_node.rb
164
164
  - lib/synapse_pay_rest/models/node/base_node.rb
165
+ - lib/synapse_pay_rest/models/node/deposit_us_node.rb
165
166
  - lib/synapse_pay_rest/models/node/eft_ind_node.rb
166
167
  - lib/synapse_pay_rest/models/node/eft_np_node.rb
167
168
  - lib/synapse_pay_rest/models/node/iou_node.rb