fuse_client 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/FinancialInstitution.md +24 -0
- data/docs/FinancialInstitutionLogo.md +22 -0
- data/docs/FuseApi.md +77 -0
- data/lib/fuse_client/api/fuse_api.rb +63 -0
- data/lib/fuse_client/models/financial_institution.rb +259 -0
- data/lib/fuse_client/models/financial_institution_logo.rb +296 -0
- data/lib/fuse_client/version.rb +1 -1
- data/lib/fuse_client.rb +2 -0
- data/spec/api/fuse_api_spec.rb +12 -0
- data/spec/models/financial_institution_logo_spec.rb +54 -0
- data/spec/models/financial_institution_spec.rb +52 -0
- metadata +10 -3
- data/fuse_client-1.0.1.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 997fd19ff36bff63d35b36f0d78d7a980e530c098021a2149439d1321499d213
|
4
|
+
data.tar.gz: 4be893793d8fdef485f03ff82f195284d95c89269c288dc50e7d898853759e11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf951f13b0160dd5572b1f787f446841a8156367a766dd580542e586940bfaceac574ff49a63ce8c868aeeb51dee5bf58336ddd292db2df051e86f642bfba45a
|
7
|
+
data.tar.gz: 219a8d714d6c397c06de168c6bb52497a0034edd6eb1612dee1328c9b5d539b771925870bb4fe45af2f19620f04828f581c094f1bc5678cdb4932cba11c6510f
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# FuseClient::FinancialInstitution
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Unique identifier for the financial institution id. | |
|
8
|
+
| **name** | **String** | Name for the financial institution. | |
|
9
|
+
| **logo** | [**FinancialInstitutionLogo**](FinancialInstitutionLogo.md) | | [optional] |
|
10
|
+
| **website** | **String** | Website of the financial institution. | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'fuse_client'
|
16
|
+
|
17
|
+
instance = FuseClient::FinancialInstitution.new(
|
18
|
+
id: null,
|
19
|
+
name: null,
|
20
|
+
logo: null,
|
21
|
+
website: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# FuseClient::FinancialInstitutionLogo
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **image** | **String** | Base64-encoded image data or URL for the image. | |
|
8
|
+
| **type** | **String** | Type of the image. | |
|
9
|
+
| **format** | **String** | Optional format of the image, if known. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'fuse_client'
|
15
|
+
|
16
|
+
instance = FuseClient::FinancialInstitutionLogo.new(
|
17
|
+
image: null,
|
18
|
+
type: null,
|
19
|
+
format: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/FuseApi.md
CHANGED
@@ -16,6 +16,7 @@ All URIs are relative to *https://sandbox-api.letsfuse.com*
|
|
16
16
|
| [**get_financial_connections_balances**](FuseApi.md#get_financial_connections_balances) | **POST** /v1/financial_connections/balances | Get balances |
|
17
17
|
| [**get_financial_connections_owners**](FuseApi.md#get_financial_connections_owners) | **POST** /v1/financial_connections/owners | Get account owners |
|
18
18
|
| [**get_financial_connections_transactions**](FuseApi.md#get_financial_connections_transactions) | **POST** /v1/financial_connections/transactions | Get transactions |
|
19
|
+
| [**get_financial_institution**](FuseApi.md#get_financial_institution) | **GET** /v1/financial_connections/institutions/{institution_id} | Get a financial institution |
|
19
20
|
| [**get_investment_holdings**](FuseApi.md#get_investment_holdings) | **POST** /v1/financial_connections/investments/holdings | Get investment holdings |
|
20
21
|
| [**get_investment_transactions**](FuseApi.md#get_investment_transactions) | **POST** /v1/financial_connections/investments/transactions | Get investment transactions |
|
21
22
|
| [**refresh_asset_report**](FuseApi.md#refresh_asset_report) | **POST** /v1/asset_report/refresh | |
|
@@ -933,6 +934,82 @@ end
|
|
933
934
|
- **Accept**: application/json
|
934
935
|
|
935
936
|
|
937
|
+
## get_financial_institution
|
938
|
+
|
939
|
+
> <FinancialInstitution> get_financial_institution(institution_id)
|
940
|
+
|
941
|
+
Get a financial institution
|
942
|
+
|
943
|
+
Receive metadata for a financial institution
|
944
|
+
|
945
|
+
### Examples
|
946
|
+
|
947
|
+
```ruby
|
948
|
+
require 'time'
|
949
|
+
require 'fuse_client'
|
950
|
+
# setup authorization
|
951
|
+
FuseClient.configure do |config|
|
952
|
+
# Configure API key authorization: fuseApiKey
|
953
|
+
config.api_key['fuseApiKey'] = 'YOUR API KEY'
|
954
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
955
|
+
# config.api_key_prefix['fuseApiKey'] = 'Bearer'
|
956
|
+
|
957
|
+
# Configure API key authorization: fuseClientId
|
958
|
+
config.api_key['fuseClientId'] = 'YOUR API KEY'
|
959
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
960
|
+
# config.api_key_prefix['fuseClientId'] = 'Bearer'
|
961
|
+
end
|
962
|
+
|
963
|
+
api_instance = FuseClient::FuseApi.new
|
964
|
+
institution_id = 'institution_id_example' # String |
|
965
|
+
|
966
|
+
begin
|
967
|
+
# Get a financial institution
|
968
|
+
result = api_instance.get_financial_institution(institution_id)
|
969
|
+
p result
|
970
|
+
rescue FuseClient::ApiError => e
|
971
|
+
puts "Error when calling FuseApi->get_financial_institution: #{e}"
|
972
|
+
end
|
973
|
+
```
|
974
|
+
|
975
|
+
#### Using the get_financial_institution_with_http_info variant
|
976
|
+
|
977
|
+
This returns an Array which contains the response data, status code and headers.
|
978
|
+
|
979
|
+
> <Array(<FinancialInstitution>, Integer, Hash)> get_financial_institution_with_http_info(institution_id)
|
980
|
+
|
981
|
+
```ruby
|
982
|
+
begin
|
983
|
+
# Get a financial institution
|
984
|
+
data, status_code, headers = api_instance.get_financial_institution_with_http_info(institution_id)
|
985
|
+
p status_code # => 2xx
|
986
|
+
p headers # => { ... }
|
987
|
+
p data # => <FinancialInstitution>
|
988
|
+
rescue FuseClient::ApiError => e
|
989
|
+
puts "Error when calling FuseApi->get_financial_institution_with_http_info: #{e}"
|
990
|
+
end
|
991
|
+
```
|
992
|
+
|
993
|
+
### Parameters
|
994
|
+
|
995
|
+
| Name | Type | Description | Notes |
|
996
|
+
| ---- | ---- | ----------- | ----- |
|
997
|
+
| **institution_id** | **String** | | |
|
998
|
+
|
999
|
+
### Return type
|
1000
|
+
|
1001
|
+
[**FinancialInstitution**](FinancialInstitution.md)
|
1002
|
+
|
1003
|
+
### Authorization
|
1004
|
+
|
1005
|
+
[fuseApiKey](../README.md#fuseApiKey), [fuseClientId](../README.md#fuseClientId)
|
1006
|
+
|
1007
|
+
### HTTP request headers
|
1008
|
+
|
1009
|
+
- **Content-Type**: Not defined
|
1010
|
+
- **Accept**: application/json
|
1011
|
+
|
1012
|
+
|
936
1013
|
## get_investment_holdings
|
937
1014
|
|
938
1015
|
> <GetInvestmentHoldingsResponse> get_investment_holdings(get_investment_holdings_request)
|
@@ -786,6 +786,69 @@ module FuseClient
|
|
786
786
|
return data, status_code, headers
|
787
787
|
end
|
788
788
|
|
789
|
+
# Get a financial institution
|
790
|
+
# Receive metadata for a financial institution
|
791
|
+
# @param institution_id [String]
|
792
|
+
# @param [Hash] opts the optional parameters
|
793
|
+
# @return [FinancialInstitution]
|
794
|
+
def get_financial_institution(institution_id, opts = {})
|
795
|
+
data, _status_code, _headers = get_financial_institution_with_http_info(institution_id, opts)
|
796
|
+
data
|
797
|
+
end
|
798
|
+
|
799
|
+
# Get a financial institution
|
800
|
+
# Receive metadata for a financial institution
|
801
|
+
# @param institution_id [String]
|
802
|
+
# @param [Hash] opts the optional parameters
|
803
|
+
# @return [Array<(FinancialInstitution, Integer, Hash)>] FinancialInstitution data, response status code and response headers
|
804
|
+
def get_financial_institution_with_http_info(institution_id, opts = {})
|
805
|
+
if @api_client.config.debugging
|
806
|
+
@api_client.config.logger.debug 'Calling API: FuseApi.get_financial_institution ...'
|
807
|
+
end
|
808
|
+
# verify the required parameter 'institution_id' is set
|
809
|
+
if @api_client.config.client_side_validation && institution_id.nil?
|
810
|
+
fail ArgumentError, "Missing the required parameter 'institution_id' when calling FuseApi.get_financial_institution"
|
811
|
+
end
|
812
|
+
# resource path
|
813
|
+
local_var_path = '/v1/financial_connections/institutions/{institution_id}'.sub('{' + 'institution_id' + '}', CGI.escape(institution_id.to_s))
|
814
|
+
|
815
|
+
# query parameters
|
816
|
+
query_params = opts[:query_params] || {}
|
817
|
+
|
818
|
+
# header parameters
|
819
|
+
header_params = opts[:header_params] || {}
|
820
|
+
# HTTP header 'Accept' (if needed)
|
821
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
822
|
+
|
823
|
+
# form parameters
|
824
|
+
form_params = opts[:form_params] || {}
|
825
|
+
|
826
|
+
# http body (model)
|
827
|
+
post_body = opts[:debug_body]
|
828
|
+
|
829
|
+
# return_type
|
830
|
+
return_type = opts[:debug_return_type] || 'FinancialInstitution'
|
831
|
+
|
832
|
+
# auth_names
|
833
|
+
auth_names = opts[:debug_auth_names] || ['fuseApiKey', 'fuseClientId']
|
834
|
+
|
835
|
+
new_options = opts.merge(
|
836
|
+
:operation => :"FuseApi.get_financial_institution",
|
837
|
+
:header_params => header_params,
|
838
|
+
:query_params => query_params,
|
839
|
+
:form_params => form_params,
|
840
|
+
:body => post_body,
|
841
|
+
:auth_names => auth_names,
|
842
|
+
:return_type => return_type
|
843
|
+
)
|
844
|
+
|
845
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
846
|
+
if @api_client.config.debugging
|
847
|
+
@api_client.config.logger.debug "API called: FuseApi#get_financial_institution\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
848
|
+
end
|
849
|
+
return data, status_code, headers
|
850
|
+
end
|
851
|
+
|
789
852
|
# Get investment holdings
|
790
853
|
# @param get_investment_holdings_request [GetInvestmentHoldingsRequest]
|
791
854
|
# @param [Hash] opts the optional parameters
|
@@ -0,0 +1,259 @@
|
|
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 FinancialInstitution
|
18
|
+
# Unique identifier for the financial institution id.
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# Name for the financial institution.
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
attr_accessor :logo
|
25
|
+
|
26
|
+
# Website of the financial institution.
|
27
|
+
attr_accessor :website
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'id' => :'id',
|
33
|
+
:'name' => :'name',
|
34
|
+
:'logo' => :'logo',
|
35
|
+
:'website' => :'website'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.openapi_types
|
46
|
+
{
|
47
|
+
:'id' => :'String',
|
48
|
+
:'name' => :'String',
|
49
|
+
:'logo' => :'FinancialInstitutionLogo',
|
50
|
+
:'website' => :'String'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
def self.openapi_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
if (!attributes.is_a?(Hash))
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::FinancialInstitution` initialize method"
|
65
|
+
end
|
66
|
+
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::FinancialInstitution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
|
+
end
|
72
|
+
h[k.to_sym] = v
|
73
|
+
}
|
74
|
+
|
75
|
+
if attributes.key?(:'id')
|
76
|
+
self.id = attributes[:'id']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'name')
|
80
|
+
self.name = attributes[:'name']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'logo')
|
84
|
+
self.logo = attributes[:'logo']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'website')
|
88
|
+
self.website = attributes[:'website']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properties with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
if @id.nil?
|
97
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
98
|
+
end
|
99
|
+
|
100
|
+
if @name.nil?
|
101
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
102
|
+
end
|
103
|
+
|
104
|
+
invalid_properties
|
105
|
+
end
|
106
|
+
|
107
|
+
# Check to see if the all the properties in the model are valid
|
108
|
+
# @return true if the model is valid
|
109
|
+
def valid?
|
110
|
+
return false if @id.nil?
|
111
|
+
return false if @name.nil?
|
112
|
+
true
|
113
|
+
end
|
114
|
+
|
115
|
+
# Checks equality by comparing each attribute.
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def ==(o)
|
118
|
+
return true if self.equal?(o)
|
119
|
+
self.class == o.class &&
|
120
|
+
id == o.id &&
|
121
|
+
name == o.name &&
|
122
|
+
logo == o.logo &&
|
123
|
+
website == o.website
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Integer] Hash code
|
134
|
+
def hash
|
135
|
+
[id, name, logo, website].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def self.build_from_hash(attributes)
|
142
|
+
new.build_from_hash(attributes)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
153
|
+
self.send("#{key}=", nil)
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = FuseClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -0,0 +1,296 @@
|
|
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 FinancialInstitutionLogo
|
18
|
+
# Base64-encoded image data or URL for the image.
|
19
|
+
attr_accessor :image
|
20
|
+
|
21
|
+
# Type of the image.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# Optional format of the image, if known.
|
25
|
+
attr_accessor :format
|
26
|
+
|
27
|
+
class EnumAttributeValidator
|
28
|
+
attr_reader :datatype
|
29
|
+
attr_reader :allowable_values
|
30
|
+
|
31
|
+
def initialize(datatype, allowable_values)
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
33
|
+
case datatype.to_s
|
34
|
+
when /Integer/i
|
35
|
+
value.to_i
|
36
|
+
when /Float/i
|
37
|
+
value.to_f
|
38
|
+
else
|
39
|
+
value
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def valid?(value)
|
45
|
+
!value || allowable_values.include?(value)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
50
|
+
def self.attribute_map
|
51
|
+
{
|
52
|
+
:'image' => :'image',
|
53
|
+
:'type' => :'type',
|
54
|
+
:'format' => :'format'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Returns all the JSON keys this model knows about
|
59
|
+
def self.acceptable_attributes
|
60
|
+
attribute_map.values
|
61
|
+
end
|
62
|
+
|
63
|
+
# Attribute type mapping.
|
64
|
+
def self.openapi_types
|
65
|
+
{
|
66
|
+
:'image' => :'String',
|
67
|
+
:'type' => :'String',
|
68
|
+
:'format' => :'String'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# List of attributes with nullable: true
|
73
|
+
def self.openapi_nullable
|
74
|
+
Set.new([
|
75
|
+
])
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
def initialize(attributes = {})
|
81
|
+
if (!attributes.is_a?(Hash))
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::FinancialInstitutionLogo` initialize method"
|
83
|
+
end
|
84
|
+
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
87
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::FinancialInstitutionLogo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
89
|
+
end
|
90
|
+
h[k.to_sym] = v
|
91
|
+
}
|
92
|
+
|
93
|
+
if attributes.key?(:'image')
|
94
|
+
self.image = attributes[:'image']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'type')
|
98
|
+
self.type = attributes[:'type']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'format')
|
102
|
+
self.format = attributes[:'format']
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
+
# @return Array for valid properties with the reasons
|
108
|
+
def list_invalid_properties
|
109
|
+
invalid_properties = Array.new
|
110
|
+
if @image.nil?
|
111
|
+
invalid_properties.push('invalid value for "image", image cannot be nil.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if @type.nil?
|
115
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
116
|
+
end
|
117
|
+
|
118
|
+
invalid_properties
|
119
|
+
end
|
120
|
+
|
121
|
+
# Check to see if the all the properties in the model are valid
|
122
|
+
# @return true if the model is valid
|
123
|
+
def valid?
|
124
|
+
return false if @image.nil?
|
125
|
+
return false if @type.nil?
|
126
|
+
type_validator = EnumAttributeValidator.new('String', ["base64", "url"])
|
127
|
+
return false unless type_validator.valid?(@type)
|
128
|
+
format_validator = EnumAttributeValidator.new('String', ["png", "jpeg", "gif", "svg+xml"])
|
129
|
+
return false unless format_validator.valid?(@format)
|
130
|
+
true
|
131
|
+
end
|
132
|
+
|
133
|
+
# Custom attribute writer method checking allowed values (enum).
|
134
|
+
# @param [Object] type Object to be assigned
|
135
|
+
def type=(type)
|
136
|
+
validator = EnumAttributeValidator.new('String', ["base64", "url"])
|
137
|
+
unless validator.valid?(type)
|
138
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
139
|
+
end
|
140
|
+
@type = type
|
141
|
+
end
|
142
|
+
|
143
|
+
# Custom attribute writer method checking allowed values (enum).
|
144
|
+
# @param [Object] format Object to be assigned
|
145
|
+
def format=(format)
|
146
|
+
validator = EnumAttributeValidator.new('String', ["png", "jpeg", "gif", "svg+xml"])
|
147
|
+
unless validator.valid?(format)
|
148
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
|
149
|
+
end
|
150
|
+
@format = format
|
151
|
+
end
|
152
|
+
|
153
|
+
# Checks equality by comparing each attribute.
|
154
|
+
# @param [Object] Object to be compared
|
155
|
+
def ==(o)
|
156
|
+
return true if self.equal?(o)
|
157
|
+
self.class == o.class &&
|
158
|
+
image == o.image &&
|
159
|
+
type == o.type &&
|
160
|
+
format == o.format
|
161
|
+
end
|
162
|
+
|
163
|
+
# @see the `==` method
|
164
|
+
# @param [Object] Object to be compared
|
165
|
+
def eql?(o)
|
166
|
+
self == o
|
167
|
+
end
|
168
|
+
|
169
|
+
# Calculates hash code according to all attributes.
|
170
|
+
# @return [Integer] Hash code
|
171
|
+
def hash
|
172
|
+
[image, type, format].hash
|
173
|
+
end
|
174
|
+
|
175
|
+
# Builds the object from hash
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
177
|
+
# @return [Object] Returns the model itself
|
178
|
+
def self.build_from_hash(attributes)
|
179
|
+
new.build_from_hash(attributes)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Builds the object from hash
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
184
|
+
# @return [Object] Returns the model itself
|
185
|
+
def build_from_hash(attributes)
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
188
|
+
self.class.openapi_types.each_pair do |key, type|
|
189
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
190
|
+
self.send("#{key}=", nil)
|
191
|
+
elsif type =~ /\AArray<(.*)>/i
|
192
|
+
# check to ensure the input is an array given that the attribute
|
193
|
+
# is documented as an array but the input is not
|
194
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
|
+
end
|
197
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
# Deserializes the data based on type
|
206
|
+
# @param string type Data type
|
207
|
+
# @param string value Value to be deserialized
|
208
|
+
# @return [Object] Deserialized data
|
209
|
+
def _deserialize(type, value)
|
210
|
+
case type.to_sym
|
211
|
+
when :Time
|
212
|
+
Time.parse(value)
|
213
|
+
when :Date
|
214
|
+
Date.parse(value)
|
215
|
+
when :String
|
216
|
+
value.to_s
|
217
|
+
when :Integer
|
218
|
+
value.to_i
|
219
|
+
when :Float
|
220
|
+
value.to_f
|
221
|
+
when :Boolean
|
222
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
223
|
+
true
|
224
|
+
else
|
225
|
+
false
|
226
|
+
end
|
227
|
+
when :Object
|
228
|
+
# generic object (usually a Hash), return directly
|
229
|
+
value
|
230
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
231
|
+
inner_type = Regexp.last_match[:inner_type]
|
232
|
+
value.map { |v| _deserialize(inner_type, v) }
|
233
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
234
|
+
k_type = Regexp.last_match[:k_type]
|
235
|
+
v_type = Regexp.last_match[:v_type]
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each do |k, v|
|
238
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
else # model
|
242
|
+
# models (e.g. Pet) or oneOf
|
243
|
+
klass = FuseClient.const_get(type)
|
244
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the string representation of the object
|
249
|
+
# @return [String] String presentation of the object
|
250
|
+
def to_s
|
251
|
+
to_hash.to_s
|
252
|
+
end
|
253
|
+
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
256
|
+
def to_body
|
257
|
+
to_hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the object in the form of hash
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
262
|
+
def to_hash
|
263
|
+
hash = {}
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
265
|
+
value = self.send(attr)
|
266
|
+
if value.nil?
|
267
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
268
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
269
|
+
end
|
270
|
+
|
271
|
+
hash[param] = _to_hash(value)
|
272
|
+
end
|
273
|
+
hash
|
274
|
+
end
|
275
|
+
|
276
|
+
# Outputs non-array value in the form of hash
|
277
|
+
# For object, use to_hash. Otherwise, just return the value
|
278
|
+
# @param [Object] value Any valid value
|
279
|
+
# @return [Hash] Returns the value in the form of hash
|
280
|
+
def _to_hash(value)
|
281
|
+
if value.is_a?(Array)
|
282
|
+
value.compact.map { |v| _to_hash(v) }
|
283
|
+
elsif value.is_a?(Hash)
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
286
|
+
end
|
287
|
+
elsif value.respond_to? :to_hash
|
288
|
+
value.to_hash
|
289
|
+
else
|
290
|
+
value
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
295
|
+
|
296
|
+
end
|
data/lib/fuse_client/version.rb
CHANGED
data/lib/fuse_client.rb
CHANGED
@@ -50,6 +50,8 @@ require 'fuse_client/models/financial_connections_owner_addresses_inner_data'
|
|
50
50
|
require 'fuse_client/models/financial_connections_owner_emails_inner'
|
51
51
|
require 'fuse_client/models/financial_connections_owner_names_inner'
|
52
52
|
require 'fuse_client/models/financial_connections_owner_phone_numbers_inner'
|
53
|
+
require 'fuse_client/models/financial_institution'
|
54
|
+
require 'fuse_client/models/financial_institution_logo'
|
53
55
|
require 'fuse_client/models/fuse_api_error'
|
54
56
|
require 'fuse_client/models/fuse_api_error_data'
|
55
57
|
require 'fuse_client/models/fuse_api_warning'
|
data/spec/api/fuse_api_spec.rb
CHANGED
@@ -164,6 +164,18 @@ describe 'FuseApi' do
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
+
# unit tests for get_financial_institution
|
168
|
+
# Get a financial institution
|
169
|
+
# Receive metadata for a financial institution
|
170
|
+
# @param institution_id
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [FinancialInstitution]
|
173
|
+
describe 'get_financial_institution test' do
|
174
|
+
it 'should work' do
|
175
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
167
179
|
# unit tests for get_investment_holdings
|
168
180
|
# Get investment holdings
|
169
181
|
# @param get_investment_holdings_request
|
@@ -0,0 +1,54 @@
|
|
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::FinancialInstitutionLogo
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FuseClient::FinancialInstitutionLogo do
|
21
|
+
let(:instance) { FuseClient::FinancialInstitutionLogo.new }
|
22
|
+
|
23
|
+
describe 'test an instance of FinancialInstitutionLogo' do
|
24
|
+
it 'should create an instance of FinancialInstitutionLogo' do
|
25
|
+
expect(instance).to be_instance_of(FuseClient::FinancialInstitutionLogo)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "image"' 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 "type"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
37
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["base64", "url"])
|
38
|
+
# validator.allowable_values.each do |value|
|
39
|
+
# expect { instance.type = value }.not_to raise_error
|
40
|
+
# end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'test attribute "format"' do
|
45
|
+
it 'should work' do
|
46
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
47
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["png", "jpeg", "gif", "svg+xml"])
|
48
|
+
# validator.allowable_values.each do |value|
|
49
|
+
# expect { instance.format = value }.not_to raise_error
|
50
|
+
# end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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::FinancialInstitution
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe FuseClient::FinancialInstitution do
|
21
|
+
let(:instance) { FuseClient::FinancialInstitution.new }
|
22
|
+
|
23
|
+
describe 'test an instance of FinancialInstitution' do
|
24
|
+
it 'should create an instance of FinancialInstitution' do
|
25
|
+
expect(instance).to be_instance_of(FuseClient::FinancialInstitution)
|
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 "logo"' 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 "website"' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
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.
|
4
|
+
version: 1.0.4
|
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-
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -95,6 +95,8 @@ files:
|
|
95
95
|
- docs/FinancialConnectionsOwnerEmailsInner.md
|
96
96
|
- docs/FinancialConnectionsOwnerNamesInner.md
|
97
97
|
- docs/FinancialConnectionsOwnerPhoneNumbersInner.md
|
98
|
+
- docs/FinancialInstitution.md
|
99
|
+
- docs/FinancialInstitutionLogo.md
|
98
100
|
- docs/FuseApi.md
|
99
101
|
- docs/FuseApiError.md
|
100
102
|
- docs/FuseApiErrorData.md
|
@@ -136,7 +138,6 @@ files:
|
|
136
138
|
- docs/TransactionCommonModel.md
|
137
139
|
- docs/UpdateEntityRequest.md
|
138
140
|
- docs/UpdateEntityResponse.md
|
139
|
-
- fuse_client-1.0.1.gem
|
140
141
|
- fuse_client.gemspec
|
141
142
|
- git_push.sh
|
142
143
|
- lib/fuse_client.rb
|
@@ -177,6 +178,8 @@ files:
|
|
177
178
|
- lib/fuse_client/models/financial_connections_owner_emails_inner.rb
|
178
179
|
- lib/fuse_client/models/financial_connections_owner_names_inner.rb
|
179
180
|
- lib/fuse_client/models/financial_connections_owner_phone_numbers_inner.rb
|
181
|
+
- lib/fuse_client/models/financial_institution.rb
|
182
|
+
- lib/fuse_client/models/financial_institution_logo.rb
|
180
183
|
- lib/fuse_client/models/fuse_api_error.rb
|
181
184
|
- lib/fuse_client/models/fuse_api_error_data.rb
|
182
185
|
- lib/fuse_client/models/fuse_api_warning.rb
|
@@ -254,6 +257,8 @@ files:
|
|
254
257
|
- spec/models/financial_connections_owner_names_inner_spec.rb
|
255
258
|
- spec/models/financial_connections_owner_phone_numbers_inner_spec.rb
|
256
259
|
- spec/models/financial_connections_owner_spec.rb
|
260
|
+
- spec/models/financial_institution_logo_spec.rb
|
261
|
+
- spec/models/financial_institution_spec.rb
|
257
262
|
- spec/models/fuse_api_error_data_spec.rb
|
258
263
|
- spec/models/fuse_api_error_spec.rb
|
259
264
|
- spec/models/fuse_api_warning_data_spec.rb
|
@@ -322,11 +327,13 @@ test_files:
|
|
322
327
|
- spec/api/fuse_api_spec.rb
|
323
328
|
- spec/api_client_spec.rb
|
324
329
|
- spec/configuration_spec.rb
|
330
|
+
- spec/models/financial_institution_spec.rb
|
325
331
|
- spec/models/financial_connections_owner_addresses_inner_data_spec.rb
|
326
332
|
- spec/models/get_asset_report_request_spec.rb
|
327
333
|
- spec/models/exchange_financial_connections_public_token_response_spec.rb
|
328
334
|
- spec/models/get_asset_report_response_report_accounts_inner_balances_spec.rb
|
329
335
|
- spec/models/financial_connections_owner_emails_inner_spec.rb
|
336
|
+
- spec/models/financial_institution_logo_spec.rb
|
330
337
|
- spec/models/create_link_token_request_mx_spec.rb
|
331
338
|
- spec/models/get_liabilities_response_spec.rb
|
332
339
|
- spec/models/get_financial_connections_balance_request_spec.rb
|
data/fuse_client-1.0.1.gem
DELETED
Binary file
|