fuse_client 1.0.33 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +6 -1
  4. data/docs/AddAccountEventsRequest.md +18 -0
  5. data/docs/AddAccountEventsRequestEventsInner.md +51 -0
  6. data/docs/{AddSpendPowerTransactionResponse.md → AddAccountEventsResponse.md} +2 -2
  7. data/docs/AssetReportTransaction.md +1 -1
  8. data/docs/CreateSessionRequest.md +1 -1
  9. data/docs/CreateSpendPowerCustomizationRequest.md +22 -0
  10. data/docs/CreateSpendPowerRequest.md +5 -5
  11. data/docs/CreateSpendPowerResponse.md +1 -1
  12. data/docs/DeleteSpendPowerResponse.md +2 -2
  13. data/docs/EnrichTransactionsRequest.md +18 -0
  14. data/docs/EnrichTransactionsResponse.md +18 -0
  15. data/docs/EnrichedTransaction.md +46 -0
  16. data/docs/EnrichedTransactionLogo.md +18 -0
  17. data/docs/EvalSpendPowerRequest.md +22 -0
  18. data/docs/EvalSpendPowerRequestEventsInner.md +20 -0
  19. data/docs/EvalSpendPowerResponse.md +20 -0
  20. data/docs/ExternalTransactionEvent.md +36 -0
  21. data/docs/ExternalTransactionEventStatus.md +15 -0
  22. data/docs/FinancialConnectionsAccountBalance.md +2 -2
  23. data/docs/FinancialConnectionsAccountCachedBalance.md +2 -2
  24. data/docs/FinancialConnectionsHolding.md +3 -3
  25. data/docs/FinancialConnectionsInvestmentSecurity.md +1 -1
  26. data/docs/FinancialConnectionsInvestmentTransaction.md +5 -3
  27. data/docs/FinancialConnectionsInvestmentTransactionSubtype.md +15 -0
  28. data/docs/FuseApi.md +193 -35
  29. data/docs/GetFinanceScoreResponse.md +20 -0
  30. data/docs/GetInvestmentTransactionsRequest.md +4 -4
  31. data/docs/GetSpendPowerCustomizationResponse.md +20 -0
  32. data/docs/InAppTransactionEvent.md +34 -0
  33. data/docs/InAppTransactionEventStatus.md +15 -0
  34. data/docs/SpendPower.md +6 -6
  35. data/docs/SpendPowerApi.md +87 -44
  36. data/docs/SpendPowerCustomization.md +5 -3
  37. data/docs/SpendPowerTimeFrame.md +15 -0
  38. data/docs/Transaction.md +1 -1
  39. data/docs/TransactionCategory.md +20 -0
  40. data/docs/TransactionCategoryDetailed.md +15 -0
  41. data/docs/TransactionCategoryPrimary.md +15 -0
  42. data/docs/TransactionEventType.md +15 -0
  43. data/docs/TransactionToEnrich.md +26 -0
  44. data/docs/UpdateSpendPowerCustomizationRequest.md +22 -0
  45. data/docs/UpdatedBalanceEvent.md +26 -0
  46. data/lib/fuse_client/api/fuse_api.rb +176 -31
  47. data/lib/fuse_client/api/spend_power_api.rb +78 -52
  48. data/lib/fuse_client/models/add_account_events_request.rb +254 -0
  49. data/lib/fuse_client/models/add_account_events_request_events_inner.rb +106 -0
  50. data/lib/fuse_client/models/{add_spend_power_transaction_response.rb → add_account_events_response.rb} +3 -3
  51. data/lib/fuse_client/models/asset_report_transaction.rb +1 -1
  52. data/lib/fuse_client/models/country_code.rb +2 -1
  53. data/lib/fuse_client/models/create_session_request.rb +1 -1
  54. data/lib/fuse_client/models/create_spend_power_customization_request.rb +314 -0
  55. data/lib/fuse_client/models/create_spend_power_request.rb +22 -22
  56. data/lib/fuse_client/models/create_spend_power_response.rb +1 -1
  57. data/lib/fuse_client/models/delete_spend_power_response.rb +11 -10
  58. data/lib/fuse_client/models/enrich_transactions_request.rb +226 -0
  59. data/lib/fuse_client/models/enrich_transactions_response.rb +222 -0
  60. data/lib/fuse_client/models/enriched_transaction.rb +397 -0
  61. data/lib/fuse_client/models/enriched_transaction_logo.rb +220 -0
  62. data/lib/fuse_client/models/eval_spend_power_request.rb +296 -0
  63. data/lib/fuse_client/models/eval_spend_power_request_events_inner.rb +239 -0
  64. data/lib/fuse_client/models/eval_spend_power_response.rb +230 -0
  65. data/lib/fuse_client/models/external_transaction_event.rb +384 -0
  66. data/lib/fuse_client/models/external_transaction_event_status.rb +40 -0
  67. data/lib/fuse_client/models/financial_connections_account_balance.rb +2 -2
  68. data/lib/fuse_client/models/financial_connections_account_cached_balance.rb +2 -2
  69. data/lib/fuse_client/models/financial_connections_holding.rb +3 -3
  70. data/lib/fuse_client/models/financial_connections_investment_security.rb +1 -1
  71. data/lib/fuse_client/models/financial_connections_investment_transaction.rb +13 -4
  72. data/lib/fuse_client/models/financial_connections_investment_transaction_subtype.rb +87 -0
  73. data/lib/fuse_client/models/fuse_api_error_code.rb +3 -1
  74. data/lib/fuse_client/models/get_finance_score_response.rb +240 -0
  75. data/lib/fuse_client/models/get_investment_transactions_request.rb +37 -9
  76. data/lib/fuse_client/models/get_spend_power_customization_response.rb +239 -0
  77. data/lib/fuse_client/models/in_app_transaction_event.rb +364 -0
  78. data/lib/fuse_client/models/in_app_transaction_event_status.rb +41 -0
  79. data/lib/fuse_client/models/spend_power.rb +18 -18
  80. data/lib/fuse_client/models/spend_power_customization.rb +54 -14
  81. data/lib/fuse_client/models/spend_power_time_frame.rb +41 -0
  82. data/lib/fuse_client/models/transaction.rb +1 -1
  83. data/lib/fuse_client/models/transaction_category.rb +260 -0
  84. data/lib/fuse_client/models/transaction_category_detailed.rb +135 -0
  85. data/lib/fuse_client/models/transaction_category_primary.rb +59 -0
  86. data/lib/fuse_client/models/transaction_event_type.rb +65 -0
  87. data/lib/fuse_client/models/{add_spend_power_transaction_request.rb → transaction_to_enrich.rb} +47 -27
  88. data/lib/fuse_client/models/update_spend_power_customization_request.rb +291 -0
  89. data/lib/fuse_client/models/updated_balance_event.rb +308 -0
  90. data/lib/fuse_client/version.rb +1 -1
  91. data/lib/fuse_client.rb +26 -2
  92. data/spec/api/fuse_api_spec.rb +33 -7
  93. data/spec/api/spend_power_api_spec.rb +14 -17
  94. data/spec/models/add_account_events_request_events_inner_spec.rb +31 -0
  95. data/spec/models/add_account_events_request_spec.rb +34 -0
  96. data/spec/models/{add_spend_power_transaction_response_spec.rb → add_account_events_response_spec.rb} +6 -6
  97. data/spec/models/create_spend_power_customization_request_spec.rb +46 -0
  98. data/spec/models/create_spend_power_request_spec.rb +2 -2
  99. data/spec/models/delete_spend_power_response_spec.rb +1 -1
  100. data/spec/models/enrich_transactions_request_spec.rb +34 -0
  101. data/spec/models/enrich_transactions_response_spec.rb +34 -0
  102. data/spec/models/enriched_transaction_logo_spec.rb +34 -0
  103. data/spec/models/enriched_transaction_spec.rb +122 -0
  104. data/spec/models/eval_spend_power_request_events_inner_spec.rb +40 -0
  105. data/spec/models/eval_spend_power_request_spec.rb +46 -0
  106. data/spec/models/eval_spend_power_response_spec.rb +40 -0
  107. data/spec/models/external_transaction_event_spec.rb +92 -0
  108. data/spec/models/external_transaction_event_status_spec.rb +28 -0
  109. data/spec/models/financial_connections_investment_transaction_spec.rb +6 -0
  110. data/spec/models/financial_connections_investment_transaction_subtype_spec.rb +28 -0
  111. data/spec/models/get_finance_score_response_spec.rb +40 -0
  112. data/spec/models/get_spend_power_customization_response_spec.rb +40 -0
  113. data/spec/models/in_app_transaction_event_spec.rb +86 -0
  114. data/spec/models/in_app_transaction_event_status_spec.rb +28 -0
  115. data/spec/models/spend_power_customization_spec.rb +6 -4
  116. data/spec/models/spend_power_spec.rb +1 -1
  117. data/spec/models/spend_power_time_frame_spec.rb +28 -0
  118. data/spec/models/transaction_category_detailed_spec.rb +28 -0
  119. data/spec/models/transaction_category_primary_spec.rb +28 -0
  120. data/spec/models/transaction_category_spec.rb +40 -0
  121. data/spec/models/transaction_event_type_spec.rb +28 -0
  122. data/spec/models/{add_spend_power_transaction_request_spec.rb → transaction_to_enrich_spec.rb} +23 -11
  123. data/spec/models/update_spend_power_customization_request_spec.rb +46 -0
  124. data/spec/models/updated_balance_event_spec.rb +62 -0
  125. metadata +106 -10
  126. data/docs/AddSpendPowerTransactionRequest.md +0 -22
@@ -30,7 +30,7 @@ module FuseClient
30
30
  # The Committee on Uniform Securities Identification Procedures (CUSIP) number uniquely identifies the security, primarily used in the United States and Canada.
31
31
  attr_accessor :cusip
32
32
 
33
- # The closing price of the security at the end of the most recent trading day.
33
+ # The closing price of the security, in cents, at the end of the most recent trading day. The format of this value is a double.
34
34
  attr_accessor :close_price
35
35
 
36
36
  attr_accessor :currency
@@ -24,13 +24,13 @@ module FuseClient
24
24
  # The name of the account associated with the investment transaction
25
25
  attr_accessor :account_name
26
26
 
27
- # The amount of the investment transaction
27
+ # The amount of the investment transaction, in cents. The format of this value is a double.
28
28
  attr_accessor :amount
29
29
 
30
30
  # A description of the investment transaction
31
31
  attr_accessor :description
32
32
 
33
- # The fees associated with the investment transaction
33
+ # The fees associated with the investment transaction, in cents. The format of this value is a double.
34
34
  attr_accessor :fees
35
35
 
36
36
  attr_accessor :currency
@@ -41,10 +41,12 @@ module FuseClient
41
41
  # The type of the investment transaction (e.g., 'buy', 'sell', 'dividend')
42
42
  attr_accessor :type
43
43
 
44
+ attr_accessor :subtype
45
+
44
46
  # The number of units of the security involved in this transaction
45
47
  attr_accessor :quantity
46
48
 
47
- # The price of the security involved in this transaction
49
+ # The price of the security involved in this transaction, in cents. The format of this value is a double.
48
50
  attr_accessor :price
49
51
 
50
52
  attr_accessor :security
@@ -83,6 +85,7 @@ module FuseClient
83
85
  :'currency' => :'currency',
84
86
  :'date' => :'date',
85
87
  :'type' => :'type',
88
+ :'subtype' => :'subtype',
86
89
  :'quantity' => :'quantity',
87
90
  :'price' => :'price',
88
91
  :'security' => :'security'
@@ -106,6 +109,7 @@ module FuseClient
106
109
  :'currency' => :'Currency',
107
110
  :'date' => :'Time',
108
111
  :'type' => :'String',
112
+ :'subtype' => :'FinancialConnectionsInvestmentTransactionSubtype',
109
113
  :'quantity' => :'Float',
110
114
  :'price' => :'Float',
111
115
  :'security' => :'FinancialConnectionsInvestmentSecurity'
@@ -169,6 +173,10 @@ module FuseClient
169
173
  self.type = attributes[:'type']
170
174
  end
171
175
 
176
+ if attributes.key?(:'subtype')
177
+ self.subtype = attributes[:'subtype']
178
+ end
179
+
172
180
  if attributes.key?(:'quantity')
173
181
  self.quantity = attributes[:'quantity']
174
182
  end
@@ -276,6 +284,7 @@ module FuseClient
276
284
  currency == o.currency &&
277
285
  date == o.date &&
278
286
  type == o.type &&
287
+ subtype == o.subtype &&
279
288
  quantity == o.quantity &&
280
289
  price == o.price &&
281
290
  security == o.security
@@ -290,7 +299,7 @@ module FuseClient
290
299
  # Calculates hash code according to all attributes.
291
300
  # @return [Integer] Hash code
292
301
  def hash
293
- [remote_id, remote_account_id, account_name, amount, description, fees, currency, date, type, quantity, price, security].hash
302
+ [remote_id, remote_account_id, account_name, amount, description, fees, currency, date, type, subtype, quantity, price, security].hash
294
303
  end
295
304
 
296
305
  # Builds the object from hash
@@ -0,0 +1,87 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class FinancialConnectionsInvestmentTransactionSubtype
18
+ ACCOUNT_FEE = "account_fee".freeze
19
+ ADJUSTMENT = "adjustment".freeze
20
+ ASSIGNMENT = "assignment".freeze
21
+ BUY = "buy".freeze
22
+ BUY_TO_COVER = "buy_to_cover".freeze
23
+ CONTRIBUTION = "contribution".freeze
24
+ DEPOSIT = "deposit".freeze
25
+ DISTRIBUTION = "distribution".freeze
26
+ DIVIDEND = "dividend".freeze
27
+ DIVIDEND_REINVESTMENT = "dividend_reinvestment".freeze
28
+ EXERCISE = "exercise".freeze
29
+ EXPIRE = "expire".freeze
30
+ FUND_FEE = "fund_fee".freeze
31
+ INTEREST = "interest".freeze
32
+ INTEREST_RECEIVABLE = "interest_receivable".freeze
33
+ INTEREST_REINVESTMENT = "interest_reinvestment".freeze
34
+ LEGAL_FEE = "legal_fee".freeze
35
+ LOAN_PAYMENT = "loan_payment".freeze
36
+ LONG_TERM_CAPITAL_GAIN = "long_term_capital_gain".freeze
37
+ LONG_TERM_CAPITAL_GAIN_REINVESTMENT = "long_term_capital_gain_reinvestment".freeze
38
+ MANAGEMENT_FEE = "management_fee".freeze
39
+ MARGIN_EXPENSE = "margin_expense".freeze
40
+ MERGER = "merger".freeze
41
+ MISCELLANEOUS_FEE = "miscellaneous_fee".freeze
42
+ NON_QUALIFIED_DIVIDEND = "non_qualified_dividend".freeze
43
+ NON_RESIDENT_TAX = "non_resident_tax".freeze
44
+ PENDING_CREDIT = "pending_credit".freeze
45
+ PENDING_DEBIT = "pending_debit".freeze
46
+ QUALIFIED_DIVIDEND = "qualified_dividend".freeze
47
+ REBALANCE = "rebalance".freeze
48
+ RETURN_OF_PRINCIPAL = "return_of_principal".freeze
49
+ REQUEST = "request".freeze
50
+ SELL = "sell".freeze
51
+ SELL_SHORT = "sell_short".freeze
52
+ SEND = "send".freeze
53
+ SHORT_TERM_CAPITAL_GAIN = "short_term_capital_gain".freeze
54
+ SHORT_TERM_CAPITAL_GAIN_REINVESTMENT = "short_term_capital_gain_reinvestment".freeze
55
+ SPIN_OFF = "spin_off".freeze
56
+ SPLIT = "split".freeze
57
+ STOCK_DISTRIBUTION = "stock_distribution".freeze
58
+ TAX = "tax".freeze
59
+ TAX_WITHHELD = "tax_withheld".freeze
60
+ TRADE = "trade".freeze
61
+ TRANSFER = "transfer".freeze
62
+ TRANSFER_FEE = "transfer_fee".freeze
63
+ TRUST_FEE = "trust_fee".freeze
64
+ UNQUALIFIED_GAIN = "unqualified_gain".freeze
65
+ WITHDRAWAL = "withdrawal".freeze
66
+ = "-".freeze
67
+
68
+ def self.all_vars
69
+ @all_vars ||= [ACCOUNT_FEE, ADJUSTMENT, ASSIGNMENT, BUY, BUY_TO_COVER, CONTRIBUTION, DEPOSIT, DISTRIBUTION, DIVIDEND, DIVIDEND_REINVESTMENT, EXERCISE, EXPIRE, FUND_FEE, INTEREST, INTEREST_RECEIVABLE, INTEREST_REINVESTMENT, LEGAL_FEE, LOAN_PAYMENT, LONG_TERM_CAPITAL_GAIN, LONG_TERM_CAPITAL_GAIN_REINVESTMENT, MANAGEMENT_FEE, MARGIN_EXPENSE, MERGER, MISCELLANEOUS_FEE, NON_QUALIFIED_DIVIDEND, NON_RESIDENT_TAX, PENDING_CREDIT, PENDING_DEBIT, QUALIFIED_DIVIDEND, REBALANCE, RETURN_OF_PRINCIPAL, REQUEST, SELL, SELL_SHORT, SEND, SHORT_TERM_CAPITAL_GAIN, SHORT_TERM_CAPITAL_GAIN_REINVESTMENT, SPIN_OFF, SPLIT, STOCK_DISTRIBUTION, TAX, TAX_WITHHELD, TRADE, TRANSFER, TRANSFER_FEE, TRUST_FEE, UNQUALIFIED_GAIN, WITHDRAWAL, ].freeze
70
+ end
71
+
72
+ # Builds the enum from string
73
+ # @param [String] The enum value in the form of the string
74
+ # @return [String] The enum value
75
+ def self.build_from_hash(value)
76
+ new.build_from_hash(value)
77
+ end
78
+
79
+ # Builds the enum from string
80
+ # @param [String] The enum value in the form of the string
81
+ # @return [String] The enum value
82
+ def build_from_hash(value)
83
+ return value if FinancialConnectionsInvestmentTransactionSubtype.all_vars.include?(value)
84
+ raise "Invalid ENUM value #{value} for class #FinancialConnectionsInvestmentTransactionSubtype"
85
+ end
86
+ end
87
+ end
@@ -25,6 +25,8 @@ module FuseClient
25
25
  ENTITY_NOT_FOUND = "entity_not_found".freeze
26
26
  SESSION_NOT_FOUND = "session_not_found".freeze
27
27
  FINANCIAL_INSTITUTION_NOT_FOUND = "financial_institution_not_found".freeze
28
+ SPEND_POWER_NOT_FOUND = "spend_power_not_found".freeze
29
+ SPEND_POWER_CUSTOMIZATION_NOT_FOUND = "spend_power_customization_not_found".freeze
28
30
  MISSING_ACCESS_TOKEN = "missing_access_token".freeze
29
31
  MISSING_PLAID_CLIENT_ID_HEADER = "missing_plaid_client_id_header".freeze
30
32
  MISSING_PLAID_SECRET_HEADER = "missing_plaid_secret_header".freeze
@@ -55,7 +57,7 @@ module FuseClient
55
57
  OTHER = "other".freeze
56
58
 
57
59
  def self.all_vars
58
- @all_vars ||= [ASSET_REPORT_GENERATION_FAILED, ASSET_REPORT_NOT_READY, CLIENT_ERROR, INVALID_HEADERS, INVALID_REQUEST_BODY, INTERNAL_SERVER_ERROR, ORGANIZATION_NOT_FOUND, ENTITY_NOT_FOUND, SESSION_NOT_FOUND, FINANCIAL_INSTITUTION_NOT_FOUND, MISSING_ACCESS_TOKEN, MISSING_PLAID_CLIENT_ID_HEADER, MISSING_PLAID_SECRET_HEADER, MISSING_MX_CLIENT_ID_HEADER, MISSING_MX_API_KEY_HEADER, MISSING_TELLER_PRIVATE_KEY_HEADER, MISSING_TELLER_CERTIFICATE_HEADER, MISSING_TELLER_APPLICATION_ID_HEADER, MISSING_TELLER_SIGNING_SECRET_HEADER, MISSING_SNAPTRADE_CLIENT_ID_HEADER, MISSING_SNAPTRADE_CONSUMER_KEY_HEADER, MISSING_FLINKS_CA_CUSTOMER_ID_HEADER, MISSING_FLINKS_US_CUSTOMER_ID_HEADER, MISSING_FLINKS_CA_INSTANCE_ID_HEADER, MISSING_FLINKS_US_INSTANCE_ID_HEADER, MISSING_FUSE_VERIFICATION_HEADER, AGGREGATOR_ERROR, AGGREGATOR_DISCONNECTED_ERROR, AGGREGATOR_CONNECTION_FINISHED_ERROR, AGGREGATOR_RATE_LIMIT_ERROR, REQUEST_BODY_MISSING, REQUEST_CONTENT_TYPE_INVALID, REQUEST_BODY_INVALID_JSON, WEBHOOK_ERROR, TIMEOUT, INVALID_CERTIFICATE, INVALID_PRIVATE_KEY, OTHER].freeze
60
+ @all_vars ||= [ASSET_REPORT_GENERATION_FAILED, ASSET_REPORT_NOT_READY, CLIENT_ERROR, INVALID_HEADERS, INVALID_REQUEST_BODY, INTERNAL_SERVER_ERROR, ORGANIZATION_NOT_FOUND, ENTITY_NOT_FOUND, SESSION_NOT_FOUND, FINANCIAL_INSTITUTION_NOT_FOUND, SPEND_POWER_NOT_FOUND, SPEND_POWER_CUSTOMIZATION_NOT_FOUND, MISSING_ACCESS_TOKEN, MISSING_PLAID_CLIENT_ID_HEADER, MISSING_PLAID_SECRET_HEADER, MISSING_MX_CLIENT_ID_HEADER, MISSING_MX_API_KEY_HEADER, MISSING_TELLER_PRIVATE_KEY_HEADER, MISSING_TELLER_CERTIFICATE_HEADER, MISSING_TELLER_APPLICATION_ID_HEADER, MISSING_TELLER_SIGNING_SECRET_HEADER, MISSING_SNAPTRADE_CLIENT_ID_HEADER, MISSING_SNAPTRADE_CONSUMER_KEY_HEADER, MISSING_FLINKS_CA_CUSTOMER_ID_HEADER, MISSING_FLINKS_US_CUSTOMER_ID_HEADER, MISSING_FLINKS_CA_INSTANCE_ID_HEADER, MISSING_FLINKS_US_INSTANCE_ID_HEADER, MISSING_FUSE_VERIFICATION_HEADER, AGGREGATOR_ERROR, AGGREGATOR_DISCONNECTED_ERROR, AGGREGATOR_CONNECTION_FINISHED_ERROR, AGGREGATOR_RATE_LIMIT_ERROR, REQUEST_BODY_MISSING, REQUEST_CONTENT_TYPE_INVALID, REQUEST_BODY_INVALID_JSON, WEBHOOK_ERROR, TIMEOUT, INVALID_CERTIFICATE, INVALID_PRIVATE_KEY, OTHER].freeze
59
61
  end
60
62
 
61
63
  # Builds the enum from string
@@ -0,0 +1,240 @@
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.5.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FuseClient
17
+ class GetFinanceScoreResponse
18
+ # A value between 0 and 1 where 1 is a perfect finance score and 0 is the worst finance score.
19
+ attr_accessor :finance_score
20
+
21
+ # An identifier that is exclusive to the request and can serve as a means for investigating and resolving issues.
22
+ attr_accessor :request_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'finance_score' => :'finance_score',
28
+ :'request_id' => :'request_id'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'finance_score' => :'Float',
41
+ :'request_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FuseClient::GetFinanceScoreResponse` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FuseClient::GetFinanceScoreResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'finance_score')
67
+ self.finance_score = attributes[:'finance_score']
68
+ end
69
+
70
+ if attributes.key?(:'request_id')
71
+ self.request_id = attributes[:'request_id']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @finance_score.nil?
80
+ invalid_properties.push('invalid value for "finance_score", finance_score cannot be nil.')
81
+ end
82
+
83
+ if @request_id.nil?
84
+ invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @finance_score.nil?
94
+ return false if @request_id.nil?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ finance_score == o.finance_score &&
104
+ request_id == o.request_id
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [finance_score, request_id].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = FuseClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -117,15 +117,31 @@ module FuseClient
117
117
  invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
118
118
  end
119
119
 
120
- if !@page.nil? && @page < 1
120
+ if @start_date.nil?
121
+ invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
122
+ end
123
+
124
+ if @end_date.nil?
125
+ invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
126
+ end
127
+
128
+ if @page.nil?
129
+ invalid_properties.push('invalid value for "page", page cannot be nil.')
130
+ end
131
+
132
+ if @page < 1
121
133
  invalid_properties.push('invalid value for "page", must be greater than or equal to 1.')
122
134
  end
123
135
 
124
- if !@records_per_page.nil? && @records_per_page > 100
136
+ if @records_per_page.nil?
137
+ invalid_properties.push('invalid value for "records_per_page", records_per_page cannot be nil.')
138
+ end
139
+
140
+ if @records_per_page > 100
125
141
  invalid_properties.push('invalid value for "records_per_page", must be smaller than or equal to 100.')
126
142
  end
127
143
 
128
- if !@records_per_page.nil? && @records_per_page < 10
144
+ if @records_per_page < 10
129
145
  invalid_properties.push('invalid value for "records_per_page", must be greater than or equal to 10.')
130
146
  end
131
147
 
@@ -136,16 +152,24 @@ module FuseClient
136
152
  # @return true if the model is valid
137
153
  def valid?
138
154
  return false if @access_token.nil?
139
- return false if !@page.nil? && @page < 1
140
- return false if !@records_per_page.nil? && @records_per_page > 100
141
- return false if !@records_per_page.nil? && @records_per_page < 10
155
+ return false if @start_date.nil?
156
+ return false if @end_date.nil?
157
+ return false if @page.nil?
158
+ return false if @page < 1
159
+ return false if @records_per_page.nil?
160
+ return false if @records_per_page > 100
161
+ return false if @records_per_page < 10
142
162
  true
143
163
  end
144
164
 
145
165
  # Custom attribute writer method with validation
146
166
  # @param [Object] page Value to be assigned
147
167
  def page=(page)
148
- if !page.nil? && page < 1
168
+ if page.nil?
169
+ fail ArgumentError, 'page cannot be nil'
170
+ end
171
+
172
+ if page < 1
149
173
  fail ArgumentError, 'invalid value for "page", must be greater than or equal to 1.'
150
174
  end
151
175
 
@@ -155,11 +179,15 @@ module FuseClient
155
179
  # Custom attribute writer method with validation
156
180
  # @param [Object] records_per_page Value to be assigned
157
181
  def records_per_page=(records_per_page)
158
- if !records_per_page.nil? && records_per_page > 100
182
+ if records_per_page.nil?
183
+ fail ArgumentError, 'records_per_page cannot be nil'
184
+ end
185
+
186
+ if records_per_page > 100
159
187
  fail ArgumentError, 'invalid value for "records_per_page", must be smaller than or equal to 100.'
160
188
  end
161
189
 
162
- if !records_per_page.nil? && records_per_page < 10
190
+ if records_per_page < 10
163
191
  fail ArgumentError, 'invalid value for "records_per_page", must be greater than or equal to 10.'
164
192
  end
165
193