fuse_client 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 628afaeb261c0f8ccd640b9db4ee825377761444dd444fb64d68846a4ab8ab7a
4
- data.tar.gz: 37cb4afb9961af40906da1e336609ce9639f128a1983bd3bdaa4f5ea27e209a2
3
+ metadata.gz: b5ab4bcad1e077369f53b10495f0c7a2be709b2a862da495ba1d6502a4f6f5ad
4
+ data.tar.gz: 5737c20e7db454995272474c999aff92a02fe952bfbaca85efe3cc24a6290343
5
5
  SHA512:
6
- metadata.gz: 88d208df41f9955707ebe5d5b3face7a1397fa889cf6e504dec198d4b471d796ba41e3569255013d2bbf11ba80365f86f915f06f3439a559909c8084f7e7315d
7
- data.tar.gz: e632699c37f9153ac118c4d0c9d95763e3dca283409500dae80ca9b671a2523ce2dafa6fbb2af04842da602fd70e7a63975023d22820bb67ecf64d8bc3fe73e5
6
+ metadata.gz: 2ec84b3690610e4ae64199c9741c5090480db5c952918162ef1eb8da23aad79ba3912cbf5d5c88e7a5f1f6aec60dcd5c84ca8ca5efe0a2017559eb8c565d3423
7
+ data.tar.gz: 3bf641df89309718ec8724518fcef5dc5909fd2a2dc8b9c93fc6a57551f505f36989ae8be85dbb774382abadd58e2d6ed54c27e99b83468ed0d6d8fe4e848274
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuse_client (1.0.1)
4
+ fuse_client (1.0.2)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -4,12 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **institution_id** | **String** | An id that is unique for an institution. | [optional] |
8
- | **entity_id** | **String** | Unique identifier for the user or business account. | |
9
- | **entity_name** | **String** | The name of the user or business account. | [optional] |
10
- | **entity_email** | **String** | Email address associated with the user or business account. | [optional] |
7
+ | **institution_id** | **String** | An id that is unique for an institution. | |
8
+ | **entity** | [**Entity**](Entity.md) | | |
11
9
  | **reconnection_url** | **String** | This field is used to provide the user with a link to reconnect their financial account. It may be included in an automated email sent by Fuse to the entity's registered email address. It's important to note that the reconnection_url should be a valid URL and can only be used once to reconnect the disconnected account. | [optional] |
12
- | **client_name** | **String** | The name of your application. | [optional] |
10
+ | **client_name** | **String** | The name of your application. | |
13
11
  | **session_client_secret** | **String** | The session client secret created from the 'Create session client secret' endpoint | |
14
12
  | **mx** | [**CreateLinkTokenRequestMx**](CreateLinkTokenRequestMx.md) | | [optional] |
15
13
  | **plaid** | [**CreateLinkTokenRequestPlaid**](CreateLinkTokenRequestPlaid.md) | | [optional] |
@@ -21,9 +19,7 @@ require 'fuse_client'
21
19
 
22
20
  instance = FuseClient::CreateLinkTokenRequest.new(
23
21
  institution_id: null,
24
- entity_id: null,
25
- entity_name: null,
26
- entity_email: null,
22
+ entity: null,
27
23
  reconnection_url: null,
28
24
  client_name: null,
29
25
  session_client_secret: null,
data/docs/Entity.md ADDED
@@ -0,0 +1,22 @@
1
+ # FuseClient::Entity
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Unique identifier for the user or business account. | |
8
+ | **name** | **String** | Name for the user or business account. | [optional] |
9
+ | **email** | **String** | Email address associated with the user or business account. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'fuse_client'
15
+
16
+ instance = FuseClient::Entity.new(
17
+ id: null,
18
+ name: null,
19
+ email: null
20
+ )
21
+ ```
22
+
data/docs/FuseApi.md CHANGED
@@ -205,7 +205,7 @@ end
205
205
 
206
206
  api_instance = FuseClient::FuseApi.new
207
207
  opts = {
208
- create_link_token_request: FuseClient::CreateLinkTokenRequest.new({entity_id: 'entity_id_example', session_client_secret: 'session_client_secret_example'}) # CreateLinkTokenRequest |
208
+ create_link_token_request: FuseClient::CreateLinkTokenRequest.new({institution_id: 'institution_id_example', entity: FuseClient::Entity.new({id: 'id_example'}), client_name: 'client_name_example', session_client_secret: 'session_client_secret_example'}) # CreateLinkTokenRequest |
209
209
  }
210
210
 
211
211
  begin
Binary file
@@ -18,14 +18,7 @@ module FuseClient
18
18
  # An id that is unique for an institution.
19
19
  attr_accessor :institution_id
20
20
 
21
- # Unique identifier for the user or business account.
22
- attr_accessor :entity_id
23
-
24
- # The name of the user or business account.
25
- attr_accessor :entity_name
26
-
27
- # Email address associated with the user or business account.
28
- attr_accessor :entity_email
21
+ attr_accessor :entity
29
22
 
30
23
  # This field is used to provide the user with a link to reconnect their financial account. It may be included in an automated email sent by Fuse to the entity's registered email address. It's important to note that the reconnection_url should be a valid URL and can only be used once to reconnect the disconnected account.
31
24
  attr_accessor :reconnection_url
@@ -44,9 +37,7 @@ module FuseClient
44
37
  def self.attribute_map
45
38
  {
46
39
  :'institution_id' => :'institution_id',
47
- :'entity_id' => :'entity_id',
48
- :'entity_name' => :'entity_name',
49
- :'entity_email' => :'entity_email',
40
+ :'entity' => :'entity',
50
41
  :'reconnection_url' => :'reconnection_url',
51
42
  :'client_name' => :'client_name',
52
43
  :'session_client_secret' => :'session_client_secret',
@@ -64,9 +55,7 @@ module FuseClient
64
55
  def self.openapi_types
65
56
  {
66
57
  :'institution_id' => :'String',
67
- :'entity_id' => :'String',
68
- :'entity_name' => :'String',
69
- :'entity_email' => :'String',
58
+ :'entity' => :'Entity',
70
59
  :'reconnection_url' => :'String',
71
60
  :'client_name' => :'String',
72
61
  :'session_client_secret' => :'String',
@@ -100,16 +89,8 @@ module FuseClient
100
89
  self.institution_id = attributes[:'institution_id']
101
90
  end
102
91
 
103
- if attributes.key?(:'entity_id')
104
- self.entity_id = attributes[:'entity_id']
105
- end
106
-
107
- if attributes.key?(:'entity_name')
108
- self.entity_name = attributes[:'entity_name']
109
- end
110
-
111
- if attributes.key?(:'entity_email')
112
- self.entity_email = attributes[:'entity_email']
92
+ if attributes.key?(:'entity')
93
+ self.entity = attributes[:'entity']
113
94
  end
114
95
 
115
96
  if attributes.key?(:'reconnection_url')
@@ -137,8 +118,16 @@ module FuseClient
137
118
  # @return Array for valid properties with the reasons
138
119
  def list_invalid_properties
139
120
  invalid_properties = Array.new
140
- if @entity_id.nil?
141
- invalid_properties.push('invalid value for "entity_id", entity_id cannot be nil.')
121
+ if @institution_id.nil?
122
+ invalid_properties.push('invalid value for "institution_id", institution_id cannot be nil.')
123
+ end
124
+
125
+ if @entity.nil?
126
+ invalid_properties.push('invalid value for "entity", entity cannot be nil.')
127
+ end
128
+
129
+ if @client_name.nil?
130
+ invalid_properties.push('invalid value for "client_name", client_name cannot be nil.')
142
131
  end
143
132
 
144
133
  if @session_client_secret.nil?
@@ -151,7 +140,9 @@ module FuseClient
151
140
  # Check to see if the all the properties in the model are valid
152
141
  # @return true if the model is valid
153
142
  def valid?
154
- return false if @entity_id.nil?
143
+ return false if @institution_id.nil?
144
+ return false if @entity.nil?
145
+ return false if @client_name.nil?
155
146
  return false if @session_client_secret.nil?
156
147
  true
157
148
  end
@@ -162,9 +153,7 @@ module FuseClient
162
153
  return true if self.equal?(o)
163
154
  self.class == o.class &&
164
155
  institution_id == o.institution_id &&
165
- entity_id == o.entity_id &&
166
- entity_name == o.entity_name &&
167
- entity_email == o.entity_email &&
156
+ entity == o.entity &&
168
157
  reconnection_url == o.reconnection_url &&
169
158
  client_name == o.client_name &&
170
159
  session_client_secret == o.session_client_secret &&
@@ -181,7 +170,7 @@ module FuseClient
181
170
  # Calculates hash code according to all attributes.
182
171
  # @return [Integer] Hash code
183
172
  def hash
184
- [institution_id, entity_id, entity_name, entity_email, reconnection_url, client_name, session_client_secret, mx, plaid].hash
173
+ [institution_id, entity, reconnection_url, client_name, session_client_secret, mx, plaid].hash
185
174
  end
186
175
 
187
176
  # Builds the object from hash
@@ -0,0 +1,245 @@
1
+ =begin
2
+ #Fuse
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class Entity
18
+ # Unique identifier for the user or business account.
19
+ attr_accessor :id
20
+
21
+ # Name for the user or business account.
22
+ attr_accessor :name
23
+
24
+ # Email address associated with the user or business account.
25
+ attr_accessor :email
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'name' => :'name',
32
+ :'email' => :'email'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'id' => :'String',
45
+ :'name' => :'String',
46
+ :'email' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::Entity` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::Entity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'id')
72
+ self.id = attributes[:'id']
73
+ end
74
+
75
+ if attributes.key?(:'name')
76
+ self.name = attributes[:'name']
77
+ end
78
+
79
+ if attributes.key?(:'email')
80
+ self.email = attributes[:'email']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if @id.nil?
89
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ return false if @id.nil?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ id == o.id &&
108
+ name == o.name &&
109
+ email == o.email
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [id, name, email].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ new.build_from_hash(attributes)
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ attributes = attributes.transform_keys(&:to_sym)
137
+ self.class.openapi_types.each_pair do |key, type|
138
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
139
+ self.send("#{key}=", nil)
140
+ elsif type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
144
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
145
+ end
146
+ elsif !attributes[self.class.attribute_map[key]].nil?
147
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ end
149
+ end
150
+
151
+ self
152
+ end
153
+
154
+ # Deserializes the data based on type
155
+ # @param string type Data type
156
+ # @param string value Value to be deserialized
157
+ # @return [Object] Deserialized data
158
+ def _deserialize(type, value)
159
+ case type.to_sym
160
+ when :Time
161
+ Time.parse(value)
162
+ when :Date
163
+ Date.parse(value)
164
+ when :String
165
+ value.to_s
166
+ when :Integer
167
+ value.to_i
168
+ when :Float
169
+ value.to_f
170
+ when :Boolean
171
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
172
+ true
173
+ else
174
+ false
175
+ end
176
+ when :Object
177
+ # generic object (usually a Hash), return directly
178
+ value
179
+ when /\AArray<(?<inner_type>.+)>\z/
180
+ inner_type = Regexp.last_match[:inner_type]
181
+ value.map { |v| _deserialize(inner_type, v) }
182
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
183
+ k_type = Regexp.last_match[:k_type]
184
+ v_type = Regexp.last_match[:v_type]
185
+ {}.tap do |hash|
186
+ value.each do |k, v|
187
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
188
+ end
189
+ end
190
+ else # model
191
+ # models (e.g. Pet) or oneOf
192
+ klass = FuseClient.const_get(type)
193
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
194
+ end
195
+ end
196
+
197
+ # Returns the string representation of the object
198
+ # @return [String] String presentation of the object
199
+ def to_s
200
+ to_hash.to_s
201
+ end
202
+
203
+ # to_body is an alias to to_hash (backward compatibility)
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_body
206
+ to_hash
207
+ end
208
+
209
+ # Returns the object in the form of hash
210
+ # @return [Hash] Returns the object in the form of hash
211
+ def to_hash
212
+ hash = {}
213
+ self.class.attribute_map.each_pair do |attr, param|
214
+ value = self.send(attr)
215
+ if value.nil?
216
+ is_nullable = self.class.openapi_nullable.include?(attr)
217
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
+ end
219
+
220
+ hash[param] = _to_hash(value)
221
+ end
222
+ hash
223
+ end
224
+
225
+ # Outputs non-array value in the form of hash
226
+ # For object, use to_hash. Otherwise, just return the value
227
+ # @param [Object] value Any valid value
228
+ # @return [Hash] Returns the value in the form of hash
229
+ def _to_hash(value)
230
+ if value.is_a?(Array)
231
+ value.compact.map { |v| _to_hash(v) }
232
+ elsif value.is_a?(Hash)
233
+ {}.tap do |hash|
234
+ value.each { |k, v| hash[k] = _to_hash(v) }
235
+ end
236
+ elsif value.respond_to? :to_hash
237
+ value.to_hash
238
+ else
239
+ value
240
+ end
241
+ end
242
+
243
+ end
244
+
245
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.3.0
11
11
  =end
12
12
 
13
13
  module FuseClient
14
- VERSION = '1.0.1'
14
+ VERSION = '1.0.2'
15
15
  end
data/lib/fuse_client.rb CHANGED
@@ -28,6 +28,7 @@ require 'fuse_client/models/create_link_token_request_plaid'
28
28
  require 'fuse_client/models/create_link_token_response'
29
29
  require 'fuse_client/models/create_session_request'
30
30
  require 'fuse_client/models/create_session_response'
31
+ require 'fuse_client/models/entity'
31
32
  require 'fuse_client/models/exchange_financial_connections_public_token_request'
32
33
  require 'fuse_client/models/exchange_financial_connections_public_token_response'
33
34
  require 'fuse_client/models/financial_connections_account'
@@ -31,19 +31,7 @@ describe FuseClient::CreateLinkTokenRequest do
31
31
  end
32
32
  end
33
33
 
34
- describe 'test attribute "entity_id"' do
35
- it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
- end
38
- end
39
-
40
- describe 'test attribute "entity_name"' do
41
- it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
- end
44
- end
45
-
46
- describe 'test attribute "entity_email"' do
34
+ describe 'test attribute "entity"' do
47
35
  it 'should work' do
48
36
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
37
  end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Fuse
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.3.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for FuseClient::Entity
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe FuseClient::Entity do
21
+ let(:instance) { FuseClient::Entity.new }
22
+
23
+ describe 'test an instance of Entity' do
24
+ it 'should create an instance of Entity' do
25
+ expect(instance).to be_instance_of(FuseClient::Entity)
26
+ end
27
+ end
28
+ describe 'test attribute "id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "name"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "email"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuse_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -73,6 +73,7 @@ files:
73
73
  - docs/CreateLinkTokenResponse.md
74
74
  - docs/CreateSessionRequest.md
75
75
  - docs/CreateSessionResponse.md
76
+ - docs/Entity.md
76
77
  - docs/ExchangeFinancialConnectionsPublicTokenRequest.md
77
78
  - docs/ExchangeFinancialConnectionsPublicTokenResponse.md
78
79
  - docs/FinancialConnectionsAccount.md
@@ -135,6 +136,7 @@ files:
135
136
  - docs/TransactionCommonModel.md
136
137
  - docs/UpdateEntityRequest.md
137
138
  - docs/UpdateEntityResponse.md
139
+ - fuse_client-1.0.1.gem
138
140
  - fuse_client.gemspec
139
141
  - git_push.sh
140
142
  - lib/fuse_client.rb
@@ -153,6 +155,7 @@ files:
153
155
  - lib/fuse_client/models/create_link_token_response.rb
154
156
  - lib/fuse_client/models/create_session_request.rb
155
157
  - lib/fuse_client/models/create_session_response.rb
158
+ - lib/fuse_client/models/entity.rb
156
159
  - lib/fuse_client/models/exchange_financial_connections_public_token_request.rb
157
160
  - lib/fuse_client/models/exchange_financial_connections_public_token_response.rb
158
161
  - lib/fuse_client/models/financial_connections_account.rb
@@ -229,6 +232,7 @@ files:
229
232
  - spec/models/create_link_token_response_spec.rb
230
233
  - spec/models/create_session_request_spec.rb
231
234
  - spec/models/create_session_response_spec.rb
235
+ - spec/models/entity_spec.rb
232
236
  - spec/models/exchange_financial_connections_public_token_request_spec.rb
233
237
  - spec/models/exchange_financial_connections_public_token_response_spec.rb
234
238
  - spec/models/financial_connections_account_balance_spec.rb
@@ -344,6 +348,7 @@ test_files:
344
348
  - spec/models/get_transactions_response_spec.rb
345
349
  - spec/models/financial_connections_owner_addresses_inner_spec.rb
346
350
  - spec/models/refresh_asset_report_request_spec.rb
351
+ - spec/models/entity_spec.rb
347
352
  - spec/models/sync_transactions_response_spec.rb
348
353
  - spec/models/create_link_token_response_spec.rb
349
354
  - spec/models/transaction_common_model_spec.rb