apimatic-ak-sdk 0.0.1

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 (229) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +190 -0
  4. data/bin/console +15 -0
  5. data/lib/akoya/api_helper.rb +10 -0
  6. data/lib/akoya/client.rb +117 -0
  7. data/lib/akoya/configuration.rb +195 -0
  8. data/lib/akoya/controllers/account_information_controller.rb +93 -0
  9. data/lib/akoya/controllers/balances_controller.rb +92 -0
  10. data/lib/akoya/controllers/base_controller.rb +65 -0
  11. data/lib/akoya/controllers/customers_controller.rb +112 -0
  12. data/lib/akoya/controllers/investments_controller.rb +95 -0
  13. data/lib/akoya/controllers/payments_controller.rb +70 -0
  14. data/lib/akoya/controllers/statements_controller.rb +158 -0
  15. data/lib/akoya/controllers/tokens_controller.rb +122 -0
  16. data/lib/akoya/controllers/transactions_controller.rb +108 -0
  17. data/lib/akoya/exceptions/api_exception.rb +21 -0
  18. data/lib/akoya/exceptions/error_entity_exception.rb +54 -0
  19. data/lib/akoya/exceptions/error_response_exception.rb +53 -0
  20. data/lib/akoya/http/api_response.rb +19 -0
  21. data/lib/akoya/http/auth/basic_auth.rb +62 -0
  22. data/lib/akoya/http/auth/bearer_auth.rb +53 -0
  23. data/lib/akoya/http/http_call_back.rb +10 -0
  24. data/lib/akoya/http/http_method_enum.rb +10 -0
  25. data/lib/akoya/http/http_request.rb +10 -0
  26. data/lib/akoya/http/http_response.rb +10 -0
  27. data/lib/akoya/http/proxy_settings.rb +22 -0
  28. data/lib/akoya/logging/configuration/api_logging_configuration.rb +186 -0
  29. data/lib/akoya/logging/sdk_logger.rb +17 -0
  30. data/lib/akoya/models/account.rb +86 -0
  31. data/lib/akoya/models/account_category.rb +50 -0
  32. data/lib/akoya/models/account_contact_entity.rb +132 -0
  33. data/lib/akoya/models/account_holder_entity.rb +178 -0
  34. data/lib/akoya/models/account_holder_relationship.rb +110 -0
  35. data/lib/akoya/models/account_holder_relationship_account_holder_entity.rb +110 -0
  36. data/lib/akoya/models/account_information.rb +335 -0
  37. data/lib/akoya/models/action.rb +48 -0
  38. data/lib/akoya/models/address.rb +144 -0
  39. data/lib/akoya/models/akoya_account_info_product.rb +88 -0
  40. data/lib/akoya/models/an_array_of_statements.rb +95 -0
  41. data/lib/akoya/models/an_investment_holding.rb +493 -0
  42. data/lib/akoya/models/annual_increase_type.rb +40 -0
  43. data/lib/akoya/models/annuity_account.rb +370 -0
  44. data/lib/akoya/models/annuity_account_info.rb +86 -0
  45. data/lib/akoya/models/annuity_balance_details.rb +87 -0
  46. data/lib/akoya/models/annuity_balances.rb +477 -0
  47. data/lib/akoya/models/annuity_product_type.rb +36 -0
  48. data/lib/akoya/models/annuity_value_basis.rb +36 -0
  49. data/lib/akoya/models/array_of_account_payment_networks.rb +85 -0
  50. data/lib/akoya/models/asset_class.rb +95 -0
  51. data/lib/akoya/models/asset_class_an_investment_holding.rb +85 -0
  52. data/lib/akoya/models/asset_class_asset_class.rb +56 -0
  53. data/lib/akoya/models/asset_class_citi_bank_investment_holdings.rb +86 -0
  54. data/lib/akoya/models/balance_type.rb +37 -0
  55. data/lib/akoya/models/balance_type_investment_balance_list.rb +36 -0
  56. data/lib/akoya/models/balances.rb +88 -0
  57. data/lib/akoya/models/base_model.rb +110 -0
  58. data/lib/akoya/models/business_customer_entity.rb +127 -0
  59. data/lib/akoya/models/business_customer_entity_account_holder_entity.rb +126 -0
  60. data/lib/akoya/models/business_customer_entity_customer.rb +126 -0
  61. data/lib/akoya/models/call_type.rb +44 -0
  62. data/lib/akoya/models/citi_bank_investment.rb +535 -0
  63. data/lib/akoya/models/citi_bank_investment_details.rb +75 -0
  64. data/lib/akoya/models/citi_bank_investment_holdings.rb +210 -0
  65. data/lib/akoya/models/compounding_period.rb +56 -0
  66. data/lib/akoya/models/contribution_entity.rb +266 -0
  67. data/lib/akoya/models/coupon_mature_frequency.rb +48 -0
  68. data/lib/akoya/models/currency.rb +108 -0
  69. data/lib/akoya/models/currency_citi_bank_investment_holdings.rb +86 -0
  70. data/lib/akoya/models/currency_entity.rb +109 -0
  71. data/lib/akoya/models/current_customer.rb +75 -0
  72. data/lib/akoya/models/customer.rb +164 -0
  73. data/lib/akoya/models/customer_current_customer.rb +164 -0
  74. data/lib/akoya/models/customer_name.rb +127 -0
  75. data/lib/akoya/models/customer_name_account_holder_entity.rb +127 -0
  76. data/lib/akoya/models/customer_name_customer.rb +127 -0
  77. data/lib/akoya/models/debit_credit_memo.rb +37 -0
  78. data/lib/akoya/models/debt_class.rb +44 -0
  79. data/lib/akoya/models/debt_security.rb +137 -0
  80. data/lib/akoya/models/debt_security_entity.rb +216 -0
  81. data/lib/akoya/models/debt_type.rb +36 -0
  82. data/lib/akoya/models/delivery_address.rb +153 -0
  83. data/lib/akoya/models/deposit_account.rb +375 -0
  84. data/lib/akoya/models/deposit_account_info.rb +86 -0
  85. data/lib/akoya/models/deposit_balance_details.rb +87 -0
  86. data/lib/akoya/models/deposit_balances.rb +438 -0
  87. data/lib/akoya/models/deposit_transaction.rb +369 -0
  88. data/lib/akoya/models/deposit_transaction_details.rb +87 -0
  89. data/lib/akoya/models/domicile.rb +85 -0
  90. data/lib/akoya/models/equity_grant.rb +199 -0
  91. data/lib/akoya/models/error_entity_account_information.rb +97 -0
  92. data/lib/akoya/models/error_entity_annuity_account.rb +97 -0
  93. data/lib/akoya/models/error_entity_annuity_balances.rb +97 -0
  94. data/lib/akoya/models/error_entity_citi_bank_investment.rb +97 -0
  95. data/lib/akoya/models/error_entity_deposit_account.rb +97 -0
  96. data/lib/akoya/models/error_entity_deposit_balances.rb +97 -0
  97. data/lib/akoya/models/error_entity_insurance_account.rb +97 -0
  98. data/lib/akoya/models/error_entity_insurance_balances.rb +97 -0
  99. data/lib/akoya/models/error_entity_investment_account.rb +97 -0
  100. data/lib/akoya/models/error_entity_investment_balances.rb +97 -0
  101. data/lib/akoya/models/error_entity_line_of_credit_balances.rb +97 -0
  102. data/lib/akoya/models/error_entity_loan_account.rb +97 -0
  103. data/lib/akoya/models/error_entity_loan_balances.rb +97 -0
  104. data/lib/akoya/models/error_entity_us_bank_investment.rb +97 -0
  105. data/lib/akoya/models/fi_asset_class.rb +95 -0
  106. data/lib/akoya/models/fi_asset_class_an_investment_holding.rb +85 -0
  107. data/lib/akoya/models/fi_attribute.rb +95 -0
  108. data/lib/akoya/models/fi_attribute_entity.rb +95 -0
  109. data/lib/akoya/models/frequency.rb +56 -0
  110. data/lib/akoya/models/hateoas_link.rb +105 -0
  111. data/lib/akoya/models/held_in_account.rb +44 -0
  112. data/lib/akoya/models/holding_sub_type.rb +36 -0
  113. data/lib/akoya/models/holding_type.rb +56 -0
  114. data/lib/akoya/models/income_type.rb +41 -0
  115. data/lib/akoya/models/industry_code.rb +85 -0
  116. data/lib/akoya/models/insurance_account.rb +349 -0
  117. data/lib/akoya/models/insurance_account_info.rb +87 -0
  118. data/lib/akoya/models/insurance_balance_details.rb +87 -0
  119. data/lib/akoya/models/insurance_balances.rb +420 -0
  120. data/lib/akoya/models/insurance_transaction.rb +351 -0
  121. data/lib/akoya/models/insurance_transaction_details.rb +87 -0
  122. data/lib/akoya/models/interest_rate_type.rb +36 -0
  123. data/lib/akoya/models/inv401_k_source.rb +56 -0
  124. data/lib/akoya/models/inv401_k_source_open_order_entity.rb +57 -0
  125. data/lib/akoya/models/inv401_k_surce.rb +56 -0
  126. data/lib/akoya/models/investment_account.rb +411 -0
  127. data/lib/akoya/models/investment_account_annuity_balance.rb +87 -0
  128. data/lib/akoya/models/investment_account_deposit_balance.rb +87 -0
  129. data/lib/akoya/models/investment_account_info.rb +87 -0
  130. data/lib/akoya/models/investment_account_insurance_balance.rb +87 -0
  131. data/lib/akoya/models/investment_account_loan_balance.rb +86 -0
  132. data/lib/akoya/models/investment_account_loc_balance.rb +86 -0
  133. data/lib/akoya/models/investment_balance_details.rb +87 -0
  134. data/lib/akoya/models/investment_balance_list.rb +148 -0
  135. data/lib/akoya/models/investment_balances.rb +525 -0
  136. data/lib/akoya/models/investment_details.rb +88 -0
  137. data/lib/akoya/models/investment_loan_entity.rb +271 -0
  138. data/lib/akoya/models/investment_transaction.rb +783 -0
  139. data/lib/akoya/models/investment_transaction_details.rb +87 -0
  140. data/lib/akoya/models/investments.rb +88 -0
  141. data/lib/akoya/models/line_item.rb +156 -0
  142. data/lib/akoya/models/line_of_credit_balances.rb +601 -0
  143. data/lib/akoya/models/links.rb +95 -0
  144. data/lib/akoya/models/loan_account.rb +417 -0
  145. data/lib/akoya/models/loan_account_info.rb +86 -0
  146. data/lib/akoya/models/loan_balance_details.rb +86 -0
  147. data/lib/akoya/models/loan_balances.rb +556 -0
  148. data/lib/akoya/models/loan_payment_frequency.rb +68 -0
  149. data/lib/akoya/models/loan_transaction.rb +360 -0
  150. data/lib/akoya/models/loan_transaction_details.rb +87 -0
  151. data/lib/akoya/models/loc_account_info.rb +86 -0
  152. data/lib/akoya/models/loc_balance_details.rb +86 -0
  153. data/lib/akoya/models/loc_transaction.rb +372 -0
  154. data/lib/akoya/models/loc_transaction_details.rb +86 -0
  155. data/lib/akoya/models/mnext.rb +84 -0
  156. data/lib/akoya/models/mode.rb +36 -0
  157. data/lib/akoya/models/mutual_fund_security.rb +99 -0
  158. data/lib/akoya/models/mutual_fund_security_entity.rb +150 -0
  159. data/lib/akoya/models/mutual_fund_type.rb +40 -0
  160. data/lib/akoya/models/obtain_tokens.rb +99 -0
  161. data/lib/akoya/models/open_order_entity.rb +228 -0
  162. data/lib/akoya/models/option_security.rb +125 -0
  163. data/lib/akoya/models/option_security_entity.rb +127 -0
  164. data/lib/akoya/models/option_type.rb +36 -0
  165. data/lib/akoya/models/order_duration.rb +40 -0
  166. data/lib/akoya/models/order_type.rb +60 -0
  167. data/lib/akoya/models/other_security_entity.rb +77 -0
  168. data/lib/akoya/models/paginated_array.rb +75 -0
  169. data/lib/akoya/models/payment_details.rb +142 -0
  170. data/lib/akoya/models/payment_frequency.rb +56 -0
  171. data/lib/akoya/models/payment_frequency_annuity_account.rb +44 -0
  172. data/lib/akoya/models/payment_frequency_annuity_balances.rb +44 -0
  173. data/lib/akoya/models/payment_network_supported_by_account.rb +129 -0
  174. data/lib/akoya/models/pension_source_entity.rb +143 -0
  175. data/lib/akoya/models/period_certain_guarantee.rb +48 -0
  176. data/lib/akoya/models/policy_premium_term.rb +36 -0
  177. data/lib/akoya/models/position_type.rb +36 -0
  178. data/lib/akoya/models/postion_type.rb +36 -0
  179. data/lib/akoya/models/prev.rb +84 -0
  180. data/lib/akoya/models/refresh_tokens.rb +103 -0
  181. data/lib/akoya/models/secured.rb +36 -0
  182. data/lib/akoya/models/security_id_type.rb +52 -0
  183. data/lib/akoya/models/security_id_type_investment_transaction.rb +52 -0
  184. data/lib/akoya/models/security_type.rb +56 -0
  185. data/lib/akoya/models/statement_entity.rb +136 -0
  186. data/lib/akoya/models/status.rb +56 -0
  187. data/lib/akoya/models/status_deposit_transaction.rb +44 -0
  188. data/lib/akoya/models/status_insurance_transaction.rb +44 -0
  189. data/lib/akoya/models/status_investment_transaction.rb +44 -0
  190. data/lib/akoya/models/status_loan_transaction.rb +44 -0
  191. data/lib/akoya/models/status_loc_transaction.rb +44 -0
  192. data/lib/akoya/models/status_statement_entity.rb +40 -0
  193. data/lib/akoya/models/status_transaction.rb +44 -0
  194. data/lib/akoya/models/stock_security_entity.rb +137 -0
  195. data/lib/akoya/models/stock_type.rb +56 -0
  196. data/lib/akoya/models/sub_account.rb +44 -0
  197. data/lib/akoya/models/sub_account_fund.rb +44 -0
  198. data/lib/akoya/models/sub_account_sec.rb +44 -0
  199. data/lib/akoya/models/sweep_security_entity.rb +118 -0
  200. data/lib/akoya/models/tax_lot.rb +137 -0
  201. data/lib/akoya/models/tax_lot_an_investment_holding.rb +139 -0
  202. data/lib/akoya/models/telephone.rb +95 -0
  203. data/lib/akoya/models/telephone_number.rb +95 -0
  204. data/lib/akoya/models/token_example_response.rb +101 -0
  205. data/lib/akoya/models/transaction.rb +328 -0
  206. data/lib/akoya/models/transaction_reason.rb +41 -0
  207. data/lib/akoya/models/transaction_type.rb +84 -0
  208. data/lib/akoya/models/transaction_type_insurance_transaction.rb +44 -0
  209. data/lib/akoya/models/transaction_type_investment_transaction.rb +192 -0
  210. data/lib/akoya/models/transaction_type_loan_transaction.rb +44 -0
  211. data/lib/akoya/models/transaction_type_loc_transaction.rb +84 -0
  212. data/lib/akoya/models/transactions_entity.rb +98 -0
  213. data/lib/akoya/models/transfer_action.rb +36 -0
  214. data/lib/akoya/models/type.rb +44 -0
  215. data/lib/akoya/models/type_hateoas_link.rb +52 -0
  216. data/lib/akoya/models/type_telephone_number.rb +44 -0
  217. data/lib/akoya/models/unit_type.rb +36 -0
  218. data/lib/akoya/models/unit_type_open_order_entity.rb +36 -0
  219. data/lib/akoya/models/us_bank_investment.rb +535 -0
  220. data/lib/akoya/models/us_bank_investment_details.rb +75 -0
  221. data/lib/akoya/models/us_bank_investment_holdings.rb +403 -0
  222. data/lib/akoya/models/vesting.rb +135 -0
  223. data/lib/akoya/models/vesting_entity.rb +185 -0
  224. data/lib/akoya/models/x_akoya_interaction_type.rb +36 -0
  225. data/lib/akoya/utilities/date_time_helper.rb +11 -0
  226. data/lib/akoya/utilities/file_wrapper.rb +28 -0
  227. data/lib/akoya/utilities/union_type_lookup.rb +91 -0
  228. data/lib/akoya.rb +250 -0
  229. metadata +312 -0
@@ -0,0 +1,360 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module Akoya
8
+ # Loan Transaction
9
+ class LoanTransaction < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Corresponds to AccountId in Account
14
+ # @return [String]
15
+ attr_accessor :account_id
16
+
17
+ # The amount of money in the account currency.
18
+ # If balanceType is `ASSET`:
19
+ # 1. If `debitCreditMemo` = `DEBIT`, sign is "+" or not present
20
+ # 2. If `CREDIT`, sign is "-"
21
+ # If balanceType is `LIABILITY`:
22
+ # 1. If `debitCreditMemo` = `DEBIT`, sign is "-"
23
+ # 2. If `CREDIT`, sign is "+" or not present
24
+ # @return [Float]
25
+ attr_accessor :amount
26
+
27
+ # Transaction category, preferably MCC or SIC.
28
+ # @return [String]
29
+ attr_accessor :category
30
+
31
+ # Akoya will ensure that this is correctly populated with one of DEBIT or
32
+ # CREDIT and matches the sign of the status field.
33
+ # @return [DebitCreditMemo]
34
+ attr_accessor :debit_credit_memo
35
+
36
+ # The description of the transaction
37
+ # @return [String]
38
+ attr_accessor :description
39
+
40
+ # Array of image identifiers (unique to transaction) used to retrieve images
41
+ # of check or transaction receipt.
42
+ # @return [Array[String]]
43
+ attr_accessor :image_ids
44
+
45
+ # Array of FI-specific attributes
46
+ # @return [Array[FiAttributeEntity]]
47
+ attr_accessor :fi_attributes
48
+
49
+ # The amount of money in the foreign currency
50
+ # @return [Float]
51
+ attr_accessor :foreign_amount
52
+
53
+ # The ISO 4217 code of the foreign currency
54
+ # @return [String]
55
+ attr_accessor :foreign_currency
56
+
57
+ # Breakdown of the transaction details
58
+ # @return [Array[LineItem]]
59
+ attr_accessor :line_item
60
+
61
+ # Links (unique to this Transaction) used to retrieve images of checks or
62
+ # transaction receipts, or invoke other APIs
63
+ # @return [Array[HateoasLink]]
64
+ attr_accessor :links
65
+
66
+ # Secondary transaction description
67
+ # @return [String]
68
+ attr_accessor :memo
69
+
70
+ # The date and time that the transaction was posted to the account. If not
71
+ # provided then TransactionTimestamp can be used as PostedTimeStamp.
72
+ # @return [DateTime]
73
+ attr_accessor :posted_timestamp
74
+
75
+ # A tracking reference identifier
76
+ # @return [String]
77
+ attr_accessor :reference
78
+
79
+ # Akoya ensures that this field is populated for all transactions which are
80
+ # reversals, otherwise it is null. Either way it is always present.
81
+ # For reverse postings, the identity of the transaction being reversed. For
82
+ # the correction transaction, the identity of the reversing post. For credit
83
+ # card posting transactions, the identity of the authorization transaction.
84
+ # @return [String]
85
+ attr_accessor :reference_transaction_id
86
+
87
+ # AUTHORIZATION, MEMO, PENDING, or POSTED
88
+ # @return [StatusLoanTransaction]
89
+ attr_accessor :status
90
+
91
+ # Transaction category detail
92
+ # @return [String]
93
+ attr_accessor :sub_category
94
+
95
+ # Long term persistent identity of the transaction (unique to account).
96
+ # Transaction IDs should:
97
+ #
98
+ # 1. be the same for pending and posted
99
+ # 2. be different for reversed transactions
100
+ # 3. `referenceTransactionId` should be present for reversed transactions'
101
+ # @return [String]
102
+ attr_accessor :transaction_id
103
+
104
+ # The date and time that the transaction was added to the server backend
105
+ # systems.
106
+ # Akoya ensures that this field is populated for all transactions to which
107
+ # it applies, otherwise it is null. Either way it is always present.
108
+ # @return [DateTime]
109
+ attr_accessor :transaction_timestamp
110
+
111
+ # Payment details for some transactions
112
+ # @return [PaymentDetails]
113
+ attr_accessor :payment_details
114
+
115
+ # LoanTransaction Type
116
+ # @return [TransactionTypeLoanTransaction]
117
+ attr_accessor :transaction_type
118
+
119
+ # A mapping from model property names to API property names.
120
+ def self.names
121
+ @_hash = {} if @_hash.nil?
122
+ @_hash['account_id'] = 'accountId'
123
+ @_hash['amount'] = 'amount'
124
+ @_hash['category'] = 'category'
125
+ @_hash['debit_credit_memo'] = 'debitCreditMemo'
126
+ @_hash['description'] = 'description'
127
+ @_hash['image_ids'] = 'imageIds'
128
+ @_hash['fi_attributes'] = 'fiAttributes'
129
+ @_hash['foreign_amount'] = 'foreignAmount'
130
+ @_hash['foreign_currency'] = 'foreignCurrency'
131
+ @_hash['line_item'] = 'lineItem'
132
+ @_hash['links'] = 'links'
133
+ @_hash['memo'] = 'memo'
134
+ @_hash['posted_timestamp'] = 'postedTimestamp'
135
+ @_hash['reference'] = 'reference'
136
+ @_hash['reference_transaction_id'] = 'referenceTransactionId'
137
+ @_hash['status'] = 'status'
138
+ @_hash['sub_category'] = 'subCategory'
139
+ @_hash['transaction_id'] = 'transactionId'
140
+ @_hash['transaction_timestamp'] = 'transactionTimestamp'
141
+ @_hash['payment_details'] = 'paymentDetails'
142
+ @_hash['transaction_type'] = 'transactionType'
143
+ @_hash
144
+ end
145
+
146
+ # An array for optional fields
147
+ def self.optionals
148
+ %w[
149
+ account_id
150
+ amount
151
+ category
152
+ debit_credit_memo
153
+ description
154
+ image_ids
155
+ fi_attributes
156
+ foreign_amount
157
+ foreign_currency
158
+ line_item
159
+ links
160
+ memo
161
+ posted_timestamp
162
+ reference
163
+ reference_transaction_id
164
+ status
165
+ sub_category
166
+ transaction_id
167
+ transaction_timestamp
168
+ payment_details
169
+ transaction_type
170
+ ]
171
+ end
172
+
173
+ # An array for nullable fields
174
+ def self.nullables
175
+ []
176
+ end
177
+
178
+ def initialize(account_id: SKIP, amount: SKIP, category: SKIP,
179
+ debit_credit_memo: SKIP, description: SKIP, image_ids: SKIP,
180
+ fi_attributes: SKIP, foreign_amount: SKIP,
181
+ foreign_currency: SKIP, line_item: SKIP, links: SKIP,
182
+ memo: SKIP, posted_timestamp: SKIP, reference: SKIP,
183
+ reference_transaction_id: SKIP, status: SKIP,
184
+ sub_category: SKIP, transaction_id: SKIP,
185
+ transaction_timestamp: SKIP, payment_details: SKIP,
186
+ transaction_type: SKIP, additional_properties: nil)
187
+ # Add additional model properties to the instance
188
+ additional_properties = {} if additional_properties.nil?
189
+
190
+ @account_id = account_id unless account_id == SKIP
191
+ @amount = amount unless amount == SKIP
192
+ @category = category unless category == SKIP
193
+ @debit_credit_memo = debit_credit_memo unless debit_credit_memo == SKIP
194
+ @description = description unless description == SKIP
195
+ @image_ids = image_ids unless image_ids == SKIP
196
+ @fi_attributes = fi_attributes unless fi_attributes == SKIP
197
+ @foreign_amount = foreign_amount unless foreign_amount == SKIP
198
+ @foreign_currency = foreign_currency unless foreign_currency == SKIP
199
+ @line_item = line_item unless line_item == SKIP
200
+ @links = links unless links == SKIP
201
+ @memo = memo unless memo == SKIP
202
+ @posted_timestamp = posted_timestamp unless posted_timestamp == SKIP
203
+ @reference = reference unless reference == SKIP
204
+ @reference_transaction_id = reference_transaction_id unless reference_transaction_id == SKIP
205
+ @status = status unless status == SKIP
206
+ @sub_category = sub_category unless sub_category == SKIP
207
+ @transaction_id = transaction_id unless transaction_id == SKIP
208
+ @transaction_timestamp = transaction_timestamp unless transaction_timestamp == SKIP
209
+ @payment_details = payment_details unless payment_details == SKIP
210
+ @transaction_type = transaction_type unless transaction_type == SKIP
211
+ @additional_properties = additional_properties
212
+ end
213
+
214
+ # Creates an instance of the object from a hash.
215
+ def self.from_hash(hash)
216
+ return nil unless hash
217
+
218
+ # Extract variables from the hash.
219
+ account_id = hash.key?('accountId') ? hash['accountId'] : SKIP
220
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
221
+ category = hash.key?('category') ? hash['category'] : SKIP
222
+ debit_credit_memo =
223
+ hash.key?('debitCreditMemo') ? hash['debitCreditMemo'] : SKIP
224
+ description = hash.key?('description') ? hash['description'] : SKIP
225
+ image_ids = hash.key?('imageIds') ? hash['imageIds'] : SKIP
226
+ # Parameter is an array, so we need to iterate through it
227
+ fi_attributes = nil
228
+ unless hash['fiAttributes'].nil?
229
+ fi_attributes = []
230
+ hash['fiAttributes'].each do |structure|
231
+ fi_attributes << (FiAttributeEntity.from_hash(structure) if structure)
232
+ end
233
+ end
234
+
235
+ fi_attributes = SKIP unless hash.key?('fiAttributes')
236
+ foreign_amount = hash.key?('foreignAmount') ? hash['foreignAmount'] : SKIP
237
+ foreign_currency =
238
+ hash.key?('foreignCurrency') ? hash['foreignCurrency'] : SKIP
239
+ # Parameter is an array, so we need to iterate through it
240
+ line_item = nil
241
+ unless hash['lineItem'].nil?
242
+ line_item = []
243
+ hash['lineItem'].each do |structure|
244
+ line_item << (LineItem.from_hash(structure) if structure)
245
+ end
246
+ end
247
+
248
+ line_item = SKIP unless hash.key?('lineItem')
249
+ # Parameter is an array, so we need to iterate through it
250
+ links = nil
251
+ unless hash['links'].nil?
252
+ links = []
253
+ hash['links'].each do |structure|
254
+ links << (HateoasLink.from_hash(structure) if structure)
255
+ end
256
+ end
257
+
258
+ links = SKIP unless hash.key?('links')
259
+ memo = hash.key?('memo') ? hash['memo'] : SKIP
260
+ posted_timestamp = if hash.key?('postedTimestamp')
261
+ (DateTimeHelper.from_rfc3339(hash['postedTimestamp']) if hash['postedTimestamp'])
262
+ else
263
+ SKIP
264
+ end
265
+ reference = hash.key?('reference') ? hash['reference'] : SKIP
266
+ reference_transaction_id =
267
+ hash.key?('referenceTransactionId') ? hash['referenceTransactionId'] : SKIP
268
+ status = hash.key?('status') ? hash['status'] : SKIP
269
+ sub_category = hash.key?('subCategory') ? hash['subCategory'] : SKIP
270
+ transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
271
+ transaction_timestamp = if hash.key?('transactionTimestamp')
272
+ (DateTimeHelper.from_rfc3339(hash['transactionTimestamp']) if hash['transactionTimestamp'])
273
+ else
274
+ SKIP
275
+ end
276
+ payment_details = PaymentDetails.from_hash(hash['paymentDetails']) if hash['paymentDetails']
277
+ transaction_type =
278
+ hash.key?('transactionType') ? hash['transactionType'] : SKIP
279
+
280
+ # Create a new hash for additional properties, removing known properties.
281
+ new_hash = hash.reject { |k, _| names.value?(k) }
282
+
283
+ additional_properties = APIHelper.get_additional_properties(
284
+ new_hash, proc { |value| value }
285
+ )
286
+
287
+ # Create object from extracted values.
288
+ LoanTransaction.new(account_id: account_id,
289
+ amount: amount,
290
+ category: category,
291
+ debit_credit_memo: debit_credit_memo,
292
+ description: description,
293
+ image_ids: image_ids,
294
+ fi_attributes: fi_attributes,
295
+ foreign_amount: foreign_amount,
296
+ foreign_currency: foreign_currency,
297
+ line_item: line_item,
298
+ links: links,
299
+ memo: memo,
300
+ posted_timestamp: posted_timestamp,
301
+ reference: reference,
302
+ reference_transaction_id: reference_transaction_id,
303
+ status: status,
304
+ sub_category: sub_category,
305
+ transaction_id: transaction_id,
306
+ transaction_timestamp: transaction_timestamp,
307
+ payment_details: payment_details,
308
+ transaction_type: transaction_type,
309
+ additional_properties: additional_properties)
310
+ end
311
+
312
+ def to_custom_posted_timestamp
313
+ DateTimeHelper.to_rfc3339(posted_timestamp)
314
+ end
315
+
316
+ def to_custom_transaction_timestamp
317
+ DateTimeHelper.to_rfc3339(transaction_timestamp)
318
+ end
319
+
320
+ # Validates an instance of the object from a given value.
321
+ # @param [LoanTransaction | Hash] The value against the validation is performed.
322
+ def self.validate(value)
323
+ return true if value.instance_of? self
324
+
325
+ return false unless value.instance_of? Hash
326
+
327
+ true
328
+ end
329
+
330
+ # Provides a human-readable string representation of the object.
331
+ def to_s
332
+ class_name = self.class.name.split('::').last
333
+ "<#{class_name} account_id: #{@account_id}, amount: #{@amount}, category: #{@category},"\
334
+ " debit_credit_memo: #{@debit_credit_memo}, description: #{@description}, image_ids:"\
335
+ " #{@image_ids}, fi_attributes: #{@fi_attributes}, foreign_amount: #{@foreign_amount},"\
336
+ " foreign_currency: #{@foreign_currency}, line_item: #{@line_item}, links: #{@links}, memo:"\
337
+ " #{@memo}, posted_timestamp: #{@posted_timestamp}, reference: #{@reference},"\
338
+ " reference_transaction_id: #{@reference_transaction_id}, status: #{@status}, sub_category:"\
339
+ " #{@sub_category}, transaction_id: #{@transaction_id}, transaction_timestamp:"\
340
+ " #{@transaction_timestamp}, payment_details: #{@payment_details}, transaction_type:"\
341
+ " #{@transaction_type}, additional_properties: #{@additional_properties}>"
342
+ end
343
+
344
+ # Provides a debugging-friendly string with detailed object information.
345
+ def inspect
346
+ class_name = self.class.name.split('::').last
347
+ "<#{class_name} account_id: #{@account_id.inspect}, amount: #{@amount.inspect}, category:"\
348
+ " #{@category.inspect}, debit_credit_memo: #{@debit_credit_memo.inspect}, description:"\
349
+ " #{@description.inspect}, image_ids: #{@image_ids.inspect}, fi_attributes:"\
350
+ " #{@fi_attributes.inspect}, foreign_amount: #{@foreign_amount.inspect}, foreign_currency:"\
351
+ " #{@foreign_currency.inspect}, line_item: #{@line_item.inspect}, links: #{@links.inspect},"\
352
+ " memo: #{@memo.inspect}, posted_timestamp: #{@posted_timestamp.inspect}, reference:"\
353
+ " #{@reference.inspect}, reference_transaction_id: #{@reference_transaction_id.inspect},"\
354
+ " status: #{@status.inspect}, sub_category: #{@sub_category.inspect}, transaction_id:"\
355
+ " #{@transaction_id.inspect}, transaction_timestamp: #{@transaction_timestamp.inspect},"\
356
+ " payment_details: #{@payment_details.inspect}, transaction_type:"\
357
+ " #{@transaction_type.inspect}, additional_properties: #{@additional_properties}>"
358
+ end
359
+ end
360
+ end
@@ -0,0 +1,87 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # LoanTransactionDetails Model.
8
+ class LoanTransactionDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Loan Transaction
13
+ # @return [LoanTransaction]
14
+ attr_accessor :loan_transaction
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['loan_transaction'] = 'loanTransaction'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ loan_transaction
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(loan_transaction: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @loan_transaction = loan_transaction unless loan_transaction == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ loan_transaction = LoanTransaction.from_hash(hash['loanTransaction']) if
49
+ hash['loanTransaction']
50
+
51
+ # Create a new hash for additional properties, removing known properties.
52
+ new_hash = hash.reject { |k, _| names.value?(k) }
53
+
54
+ additional_properties = APIHelper.get_additional_properties(
55
+ new_hash, proc { |value| value }
56
+ )
57
+
58
+ # Create object from extracted values.
59
+ LoanTransactionDetails.new(loan_transaction: loan_transaction,
60
+ additional_properties: additional_properties)
61
+ end
62
+
63
+ # Validates an instance of the object from a given value.
64
+ # @param [LoanTransactionDetails | Hash] The value against the validation is performed.
65
+ def self.validate(value)
66
+ return true if value.instance_of? self
67
+
68
+ return false unless value.instance_of? Hash
69
+
70
+ true
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} loan_transaction: #{@loan_transaction}, additional_properties:"\
77
+ " #{@additional_properties}>"
78
+ end
79
+
80
+ # Provides a debugging-friendly string with detailed object information.
81
+ def inspect
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} loan_transaction: #{@loan_transaction.inspect}, additional_properties:"\
84
+ " #{@additional_properties}>"
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,86 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # LocAccountInfo Model.
8
+ class LocAccountInfo < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Line of Credit Account
13
+ # @return [AccountInformation]
14
+ attr_accessor :loc_account
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['loc_account'] = 'locAccount'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ loc_account
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(loc_account: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @loc_account = loc_account unless loc_account == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ loc_account = AccountInformation.from_hash(hash['locAccount']) if hash['locAccount']
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ LocAccountInfo.new(loc_account: loc_account,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [LocAccountInfo | Hash] The value against the validation is performed.
64
+ def self.validate(value)
65
+ return true if value.instance_of? self
66
+
67
+ return false unless value.instance_of? Hash
68
+
69
+ true
70
+ end
71
+
72
+ # Provides a human-readable string representation of the object.
73
+ def to_s
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} loc_account: #{@loc_account}, additional_properties:"\
76
+ " #{@additional_properties}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} loc_account: #{@loc_account.inspect}, additional_properties:"\
83
+ " #{@additional_properties}>"
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,86 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # LocBalanceDetails Model.
8
+ class LocBalanceDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Data elements included with balances specific to line of credit accounts
13
+ # @return [LineOfCreditBalances]
14
+ attr_accessor :loc_account
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['loc_account'] = 'locAccount'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ loc_account
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(loc_account: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @loc_account = loc_account unless loc_account == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ loc_account = LineOfCreditBalances.from_hash(hash['locAccount']) if hash['locAccount']
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ LocBalanceDetails.new(loc_account: loc_account,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [LocBalanceDetails | Hash] The value against the validation is performed.
64
+ def self.validate(value)
65
+ return true if value.instance_of? self
66
+
67
+ return false unless value.instance_of? Hash
68
+
69
+ true
70
+ end
71
+
72
+ # Provides a human-readable string representation of the object.
73
+ def to_s
74
+ class_name = self.class.name.split('::').last
75
+ "<#{class_name} loc_account: #{@loc_account}, additional_properties:"\
76
+ " #{@additional_properties}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} loc_account: #{@loc_account.inspect}, additional_properties:"\
83
+ " #{@additional_properties}>"
84
+ end
85
+ end
86
+ end