fuse_client 0.3.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +70 -0
- data/LICENSE +21 -0
- data/README.md +1 -258
- data/docs/Aggregator.md +15 -0
- data/docs/CreateAssetReportRequest.md +3 -1
- data/docs/CreateEntityRequest.md +24 -0
- data/docs/CreateEntityResponse.md +24 -0
- data/docs/CreateLinkTokenRequest.md +5 -5
- data/docs/CreateLinkTokenRequestMx.md +1 -1
- data/docs/CreateLinkTokenRequestPlaid.md +1 -1
- data/docs/CreateSessionRequest.md +3 -5
- data/docs/FinancialConnectionsAccountDetails.md +1 -3
- data/docs/FinancialConnectionsHolding.md +2 -0
- data/docs/FuseApi.md +307 -1
- data/docs/GetEntityResponse.md +24 -0
- data/docs/GetInvestmentHoldingsRequest.md +3 -1
- data/docs/GetInvestmentHoldingsResponse.md +1 -3
- data/docs/GetInvestmentTransactionsResponse.md +1 -3
- data/docs/GetLiabilitiesResponse.md +1 -3
- data/docs/GetTransactionsResponseDataInner.md +1 -3
- data/docs/Product.md +15 -0
- data/docs/RefreshAssetReportRequest.md +22 -0
- data/docs/UpdateEntityRequest.md +22 -0
- data/docs/UpdateEntityResponse.md +24 -0
- data/fuse_client-0.3.4.gem +0 -0
- data/lib/fuse_client/api/fuse_api.rb +261 -0
- data/lib/fuse_client/configuration.rb +2 -2
- data/lib/fuse_client/models/aggregator.rb +42 -0
- data/lib/fuse_client/models/create_asset_report_request.rb +16 -4
- data/lib/fuse_client/models/{create_session_request_mx.rb → create_entity_request.rb} +50 -29
- data/lib/fuse_client/models/create_entity_response.rb +268 -0
- data/lib/fuse_client/models/create_link_token_request.rb +21 -20
- data/lib/fuse_client/models/create_link_token_request_mx.rb +1 -1
- data/lib/fuse_client/models/create_link_token_request_plaid.rb +3 -2
- data/lib/fuse_client/models/create_session_request.rb +36 -39
- data/lib/fuse_client/models/financial_connections_account_details.rb +4 -14
- data/lib/fuse_client/models/financial_connections_holding.rb +11 -1
- data/lib/fuse_client/models/{create_link_token_request_plaid_config.rb → get_entity_response.rb} +57 -14
- data/lib/fuse_client/models/get_investment_holdings_request.rb +14 -4
- data/lib/fuse_client/models/get_investment_holdings_response.rb +4 -14
- data/lib/fuse_client/models/get_investment_transactions_response.rb +4 -14
- data/lib/fuse_client/models/get_liabilities_response.rb +4 -14
- data/lib/fuse_client/models/get_transactions_response_data_inner.rb +4 -14
- data/lib/fuse_client/models/product.rb +44 -0
- data/lib/fuse_client/models/refresh_asset_report_request.rb +275 -0
- data/lib/fuse_client/models/{create_session_request_plaid.rb → update_entity_request.rb} +41 -21
- data/lib/fuse_client/models/update_entity_response.rb +268 -0
- data/lib/fuse_client/version.rb +1 -1
- data/lib/fuse_client.rb +8 -3
- data/spec/api/fuse_api_spec.rb +45 -0
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/aggregator_spec.rb +28 -0
- data/spec/models/create_asset_report_request_spec.rb +6 -0
- data/spec/models/{create_session_request_mx_spec.rb → create_entity_request_spec.rb} +10 -10
- data/spec/models/create_entity_response_spec.rb +52 -0
- data/spec/models/create_link_token_request_spec.rb +5 -5
- data/spec/models/create_session_request_spec.rb +1 -11
- data/spec/models/financial_connections_account_details_spec.rb +0 -6
- data/spec/models/financial_connections_holding_spec.rb +6 -0
- data/spec/models/get_entity_response_spec.rb +52 -0
- data/spec/models/get_investment_holdings_request_spec.rb +6 -0
- data/spec/models/get_investment_holdings_response_spec.rb +0 -6
- data/spec/models/get_investment_transactions_response_spec.rb +0 -6
- data/spec/models/get_liabilities_response_spec.rb +0 -6
- data/spec/models/get_transactions_response_data_inner_spec.rb +0 -6
- data/spec/models/product_spec.rb +28 -0
- data/spec/models/refresh_asset_report_request_spec.rb +46 -0
- data/spec/models/update_entity_request_spec.rb +46 -0
- data/spec/models/update_entity_response_spec.rb +52 -0
- metadata +37 -14
- data/docs/CreateLinkTokenRequestPlaidConfig.md +0 -18
- data/docs/CreateSessionRequestMx.md +0 -24
- data/docs/CreateSessionRequestPlaid.md +0 -18
- data/spec/models/create_link_token_request_plaid_config_spec.rb +0 -34
- data/spec/models/create_session_request_plaid_spec.rb +0 -34
data/lib/fuse_client/models/{create_link_token_request_plaid_config.rb → get_entity_response.rb}
RENAMED
@@ -14,14 +14,25 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module FuseClient
|
17
|
-
|
18
|
-
|
19
|
-
attr_accessor :
|
17
|
+
class GetEntityResponse
|
18
|
+
# Id of the entity
|
19
|
+
attr_accessor :id
|
20
|
+
|
21
|
+
# Email of the entity
|
22
|
+
attr_accessor :email
|
23
|
+
|
24
|
+
# These will force the user to connect through all of these aggregators
|
25
|
+
attr_accessor :aggregators
|
26
|
+
|
27
|
+
attr_accessor :institution_ids
|
20
28
|
|
21
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
30
|
def self.attribute_map
|
23
31
|
{
|
24
|
-
:'
|
32
|
+
:'id' => :'id',
|
33
|
+
:'email' => :'email',
|
34
|
+
:'aggregators' => :'aggregators',
|
35
|
+
:'institution_ids' => :'institution_ids'
|
25
36
|
}
|
26
37
|
end
|
27
38
|
|
@@ -33,7 +44,10 @@ module FuseClient
|
|
33
44
|
# Attribute type mapping.
|
34
45
|
def self.openapi_types
|
35
46
|
{
|
36
|
-
:'
|
47
|
+
:'id' => :'String',
|
48
|
+
:'email' => :'String',
|
49
|
+
:'aggregators' => :'Array<Aggregator>',
|
50
|
+
:'institution_ids' => :'Array<String>'
|
37
51
|
}
|
38
52
|
end
|
39
53
|
|
@@ -47,19 +61,35 @@ module FuseClient
|
|
47
61
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
62
|
def initialize(attributes = {})
|
49
63
|
if (!attributes.is_a?(Hash))
|
50
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::GetEntityResponse` initialize method"
|
51
65
|
end
|
52
66
|
|
53
67
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
68
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
69
|
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::GetEntityResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
71
|
end
|
58
72
|
h[k.to_sym] = v
|
59
73
|
}
|
60
74
|
|
61
|
-
if attributes.key?(:'
|
62
|
-
self.
|
75
|
+
if attributes.key?(:'id')
|
76
|
+
self.id = attributes[:'id']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'email')
|
80
|
+
self.email = attributes[:'email']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'aggregators')
|
84
|
+
if (value = attributes[:'aggregators']).is_a?(Array)
|
85
|
+
self.aggregators = value
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'institution_ids')
|
90
|
+
if (value = attributes[:'institution_ids']).is_a?(Array)
|
91
|
+
self.institution_ids = value
|
92
|
+
end
|
63
93
|
end
|
64
94
|
end
|
65
95
|
|
@@ -67,8 +97,8 @@ module FuseClient
|
|
67
97
|
# @return Array for valid properties with the reasons
|
68
98
|
def list_invalid_properties
|
69
99
|
invalid_properties = Array.new
|
70
|
-
if
|
71
|
-
invalid_properties.push('invalid value for "
|
100
|
+
if !@aggregators.nil? && @aggregators.length < 1
|
101
|
+
invalid_properties.push('invalid value for "aggregators", number of items must be greater than or equal to 1.')
|
72
102
|
end
|
73
103
|
|
74
104
|
invalid_properties
|
@@ -77,16 +107,29 @@ module FuseClient
|
|
77
107
|
# Check to see if the all the properties in the model are valid
|
78
108
|
# @return true if the model is valid
|
79
109
|
def valid?
|
80
|
-
return false if
|
110
|
+
return false if !@aggregators.nil? && @aggregators.length < 1
|
81
111
|
true
|
82
112
|
end
|
83
113
|
|
114
|
+
# Custom attribute writer method with validation
|
115
|
+
# @param [Object] aggregators Value to be assigned
|
116
|
+
def aggregators=(aggregators)
|
117
|
+
if !aggregators.nil? && aggregators.length < 1
|
118
|
+
fail ArgumentError, 'invalid value for "aggregators", number of items must be greater than or equal to 1.'
|
119
|
+
end
|
120
|
+
|
121
|
+
@aggregators = aggregators
|
122
|
+
end
|
123
|
+
|
84
124
|
# Checks equality by comparing each attribute.
|
85
125
|
# @param [Object] Object to be compared
|
86
126
|
def ==(o)
|
87
127
|
return true if self.equal?(o)
|
88
128
|
self.class == o.class &&
|
89
|
-
|
129
|
+
id == o.id &&
|
130
|
+
email == o.email &&
|
131
|
+
aggregators == o.aggregators &&
|
132
|
+
institution_ids == o.institution_ids
|
90
133
|
end
|
91
134
|
|
92
135
|
# @see the `==` method
|
@@ -98,7 +141,7 @@ module FuseClient
|
|
98
141
|
# Calculates hash code according to all attributes.
|
99
142
|
# @return [Integer] Hash code
|
100
143
|
def hash
|
101
|
-
[
|
144
|
+
[id, email, aggregators, institution_ids].hash
|
102
145
|
end
|
103
146
|
|
104
147
|
# Builds the object from hash
|
@@ -18,10 +18,14 @@ module FuseClient
|
|
18
18
|
# Access token for authentication
|
19
19
|
attr_accessor :access_token
|
20
20
|
|
21
|
+
# The ISO-4217 currency code to convert the holding to.
|
22
|
+
attr_accessor :iso_currency_code
|
23
|
+
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
25
|
def self.attribute_map
|
23
26
|
{
|
24
|
-
:'access_token' => :'access_token'
|
27
|
+
:'access_token' => :'access_token',
|
28
|
+
:'iso_currency_code' => :'iso_currency_code'
|
25
29
|
}
|
26
30
|
end
|
27
31
|
|
@@ -33,7 +37,8 @@ module FuseClient
|
|
33
37
|
# Attribute type mapping.
|
34
38
|
def self.openapi_types
|
35
39
|
{
|
36
|
-
:'access_token' => :'String'
|
40
|
+
:'access_token' => :'String',
|
41
|
+
:'iso_currency_code' => :'String'
|
37
42
|
}
|
38
43
|
end
|
39
44
|
|
@@ -61,6 +66,10 @@ module FuseClient
|
|
61
66
|
if attributes.key?(:'access_token')
|
62
67
|
self.access_token = attributes[:'access_token']
|
63
68
|
end
|
69
|
+
|
70
|
+
if attributes.key?(:'iso_currency_code')
|
71
|
+
self.iso_currency_code = attributes[:'iso_currency_code']
|
72
|
+
end
|
64
73
|
end
|
65
74
|
|
66
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -86,7 +95,8 @@ module FuseClient
|
|
86
95
|
def ==(o)
|
87
96
|
return true if self.equal?(o)
|
88
97
|
self.class == o.class &&
|
89
|
-
access_token == o.access_token
|
98
|
+
access_token == o.access_token &&
|
99
|
+
iso_currency_code == o.iso_currency_code
|
90
100
|
end
|
91
101
|
|
92
102
|
# @see the `==` method
|
@@ -98,7 +108,7 @@ module FuseClient
|
|
98
108
|
# Calculates hash code according to all attributes.
|
99
109
|
# @return [Integer] Hash code
|
100
110
|
def hash
|
101
|
-
[access_token].hash
|
111
|
+
[access_token, iso_currency_code].hash
|
102
112
|
end
|
103
113
|
|
104
114
|
# Builds the object from hash
|
@@ -21,16 +21,12 @@ module FuseClient
|
|
21
21
|
|
22
22
|
attr_accessor :securities
|
23
23
|
|
24
|
-
# The exact data from the aggregator (ie plaid) that we retrieved the information from.
|
25
|
-
attr_accessor :remote_data
|
26
|
-
|
27
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
25
|
def self.attribute_map
|
29
26
|
{
|
30
27
|
:'accounts' => :'accounts',
|
31
28
|
:'holdings' => :'holdings',
|
32
|
-
:'securities' => :'securities'
|
33
|
-
:'remote_data' => :'remote_data'
|
29
|
+
:'securities' => :'securities'
|
34
30
|
}
|
35
31
|
end
|
36
32
|
|
@@ -44,8 +40,7 @@ module FuseClient
|
|
44
40
|
{
|
45
41
|
:'accounts' => :'Array<FinancialConnectionsInvestmentAccount>',
|
46
42
|
:'holdings' => :'Array<FinancialConnectionsHolding>',
|
47
|
-
:'securities' => :'Array<FinancialConnectionsInvestmentSecurity>'
|
48
|
-
:'remote_data' => :'Object'
|
43
|
+
:'securities' => :'Array<FinancialConnectionsInvestmentSecurity>'
|
49
44
|
}
|
50
45
|
end
|
51
46
|
|
@@ -87,10 +82,6 @@ module FuseClient
|
|
87
82
|
self.securities = value
|
88
83
|
end
|
89
84
|
end
|
90
|
-
|
91
|
-
if attributes.key?(:'remote_data')
|
92
|
-
self.remote_data = attributes[:'remote_data']
|
93
|
-
end
|
94
85
|
end
|
95
86
|
|
96
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -113,8 +104,7 @@ module FuseClient
|
|
113
104
|
self.class == o.class &&
|
114
105
|
accounts == o.accounts &&
|
115
106
|
holdings == o.holdings &&
|
116
|
-
securities == o.securities
|
117
|
-
remote_data == o.remote_data
|
107
|
+
securities == o.securities
|
118
108
|
end
|
119
109
|
|
120
110
|
# @see the `==` method
|
@@ -126,7 +116,7 @@ module FuseClient
|
|
126
116
|
# Calculates hash code according to all attributes.
|
127
117
|
# @return [Integer] Hash code
|
128
118
|
def hash
|
129
|
-
[accounts, holdings, securities
|
119
|
+
[accounts, holdings, securities].hash
|
130
120
|
end
|
131
121
|
|
132
122
|
# Builds the object from hash
|
@@ -21,16 +21,12 @@ module FuseClient
|
|
21
21
|
|
22
22
|
attr_accessor :securities
|
23
23
|
|
24
|
-
# The exact data from the aggregator (ie plaid) that we retrieved the information from.
|
25
|
-
attr_accessor :remote_data
|
26
|
-
|
27
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
25
|
def self.attribute_map
|
29
26
|
{
|
30
27
|
:'accounts' => :'accounts',
|
31
28
|
:'investment_transactions' => :'investment_transactions',
|
32
|
-
:'securities' => :'securities'
|
33
|
-
:'remote_data' => :'remote_data'
|
29
|
+
:'securities' => :'securities'
|
34
30
|
}
|
35
31
|
end
|
36
32
|
|
@@ -44,8 +40,7 @@ module FuseClient
|
|
44
40
|
{
|
45
41
|
:'accounts' => :'Array<FinancialConnectionsInvestmentAccount>',
|
46
42
|
:'investment_transactions' => :'Array<FinancialConnectionsInvestmentTransaction>',
|
47
|
-
:'securities' => :'Array<FinancialConnectionsInvestmentSecurity>'
|
48
|
-
:'remote_data' => :'Object'
|
43
|
+
:'securities' => :'Array<FinancialConnectionsInvestmentSecurity>'
|
49
44
|
}
|
50
45
|
end
|
51
46
|
|
@@ -87,10 +82,6 @@ module FuseClient
|
|
87
82
|
self.securities = value
|
88
83
|
end
|
89
84
|
end
|
90
|
-
|
91
|
-
if attributes.key?(:'remote_data')
|
92
|
-
self.remote_data = attributes[:'remote_data']
|
93
|
-
end
|
94
85
|
end
|
95
86
|
|
96
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -113,8 +104,7 @@ module FuseClient
|
|
113
104
|
self.class == o.class &&
|
114
105
|
accounts == o.accounts &&
|
115
106
|
investment_transactions == o.investment_transactions &&
|
116
|
-
securities == o.securities
|
117
|
-
remote_data == o.remote_data
|
107
|
+
securities == o.securities
|
118
108
|
end
|
119
109
|
|
120
110
|
# @see the `==` method
|
@@ -126,7 +116,7 @@ module FuseClient
|
|
126
116
|
# Calculates hash code according to all attributes.
|
127
117
|
# @return [Integer] Hash code
|
128
118
|
def hash
|
129
|
-
[accounts, investment_transactions, securities
|
119
|
+
[accounts, investment_transactions, securities].hash
|
130
120
|
end
|
131
121
|
|
132
122
|
# Builds the object from hash
|
@@ -17,14 +17,10 @@ module FuseClient
|
|
17
17
|
class GetLiabilitiesResponse
|
18
18
|
attr_accessor :liabilities
|
19
19
|
|
20
|
-
# The exact data from the aggregator (ie plaid) that we retrieved the information from.
|
21
|
-
attr_accessor :remote_data
|
22
|
-
|
23
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
21
|
def self.attribute_map
|
25
22
|
{
|
26
|
-
:'liabilities' => :'liabilities'
|
27
|
-
:'remote_data' => :'remote_data'
|
23
|
+
:'liabilities' => :'liabilities'
|
28
24
|
}
|
29
25
|
end
|
30
26
|
|
@@ -36,8 +32,7 @@ module FuseClient
|
|
36
32
|
# Attribute type mapping.
|
37
33
|
def self.openapi_types
|
38
34
|
{
|
39
|
-
:'liabilities' => :'Array<FinancialConnectionsAccountLiability>'
|
40
|
-
:'remote_data' => :'Object'
|
35
|
+
:'liabilities' => :'Array<FinancialConnectionsAccountLiability>'
|
41
36
|
}
|
42
37
|
end
|
43
38
|
|
@@ -67,10 +62,6 @@ module FuseClient
|
|
67
62
|
self.liabilities = value
|
68
63
|
end
|
69
64
|
end
|
70
|
-
|
71
|
-
if attributes.key?(:'remote_data')
|
72
|
-
self.remote_data = attributes[:'remote_data']
|
73
|
-
end
|
74
65
|
end
|
75
66
|
|
76
67
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -91,8 +82,7 @@ module FuseClient
|
|
91
82
|
def ==(o)
|
92
83
|
return true if self.equal?(o)
|
93
84
|
self.class == o.class &&
|
94
|
-
liabilities == o.liabilities
|
95
|
-
remote_data == o.remote_data
|
85
|
+
liabilities == o.liabilities
|
96
86
|
end
|
97
87
|
|
98
88
|
# @see the `==` method
|
@@ -104,7 +94,7 @@ module FuseClient
|
|
104
94
|
# Calculates hash code according to all attributes.
|
105
95
|
# @return [Integer] Hash code
|
106
96
|
def hash
|
107
|
-
[liabilities
|
97
|
+
[liabilities].hash
|
108
98
|
end
|
109
99
|
|
110
100
|
# Builds the object from hash
|
@@ -44,9 +44,6 @@ module FuseClient
|
|
44
44
|
# Type of the transaction, ie adjustment
|
45
45
|
attr_accessor :type
|
46
46
|
|
47
|
-
# The exact data from the aggregator (ie plaid) that we retrieved the information from
|
48
|
-
attr_accessor :remote_data
|
49
|
-
|
50
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
48
|
def self.attribute_map
|
52
49
|
{
|
@@ -59,8 +56,7 @@ module FuseClient
|
|
59
56
|
:'category' => :'category',
|
60
57
|
:'merchant' => :'merchant',
|
61
58
|
:'status' => :'status',
|
62
|
-
:'type' => :'type'
|
63
|
-
:'remote_data' => :'remote_data'
|
59
|
+
:'type' => :'type'
|
64
60
|
}
|
65
61
|
end
|
66
62
|
|
@@ -81,8 +77,7 @@ module FuseClient
|
|
81
77
|
:'category' => :'Array<String>',
|
82
78
|
:'merchant' => :'GetTransactionsResponseDataInnerMerchant',
|
83
79
|
:'status' => :'String',
|
84
|
-
:'type' => :'String'
|
85
|
-
:'remote_data' => :'Object'
|
80
|
+
:'type' => :'String'
|
86
81
|
}
|
87
82
|
end
|
88
83
|
|
@@ -148,10 +143,6 @@ module FuseClient
|
|
148
143
|
if attributes.key?(:'type')
|
149
144
|
self.type = attributes[:'type']
|
150
145
|
end
|
151
|
-
|
152
|
-
if attributes.key?(:'remote_data')
|
153
|
-
self.remote_data = attributes[:'remote_data']
|
154
|
-
end
|
155
146
|
end
|
156
147
|
|
157
148
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -181,8 +172,7 @@ module FuseClient
|
|
181
172
|
category == o.category &&
|
182
173
|
merchant == o.merchant &&
|
183
174
|
status == o.status &&
|
184
|
-
type == o.type
|
185
|
-
remote_data == o.remote_data
|
175
|
+
type == o.type
|
186
176
|
end
|
187
177
|
|
188
178
|
# @see the `==` method
|
@@ -194,7 +184,7 @@ module FuseClient
|
|
194
184
|
# Calculates hash code according to all attributes.
|
195
185
|
# @return [Integer] Hash code
|
196
186
|
def hash
|
197
|
-
[id, remote_id, remote_account_id, amount, date, description, category, merchant, status, type
|
187
|
+
[id, remote_id, remote_account_id, amount, date, description, category, merchant, status, type].hash
|
198
188
|
end
|
199
189
|
|
200
190
|
# Builds the object from hash
|
@@ -0,0 +1,44 @@
|
|
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.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module FuseClient
|
17
|
+
class Product
|
18
|
+
ACCOUNT_DETAILS = "account_details".freeze
|
19
|
+
BALANCE = "balance".freeze
|
20
|
+
OWNERSHIP = "ownership".freeze
|
21
|
+
TRANSACTIONS = "transactions".freeze
|
22
|
+
LIABILITIES = "liabilities".freeze
|
23
|
+
INVESTMENTS = "investments".freeze
|
24
|
+
|
25
|
+
def self.all_vars
|
26
|
+
@all_vars ||= [ACCOUNT_DETAILS, BALANCE, OWNERSHIP, TRANSACTIONS, LIABILITIES, INVESTMENTS].freeze
|
27
|
+
end
|
28
|
+
|
29
|
+
# Builds the enum from string
|
30
|
+
# @param [String] The enum value in the form of the string
|
31
|
+
# @return [String] The enum value
|
32
|
+
def self.build_from_hash(value)
|
33
|
+
new.build_from_hash(value)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Builds the enum from string
|
37
|
+
# @param [String] The enum value in the form of the string
|
38
|
+
# @return [String] The enum value
|
39
|
+
def build_from_hash(value)
|
40
|
+
return value if Product.all_vars.include?(value)
|
41
|
+
raise "Invalid ENUM value #{value} for class #Product"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|