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,372 @@
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
+ # A line of credit transaction of type
9
+ class LocTransaction < 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 [StatusLocTransaction]
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
+ # Check number
112
+ # @return [Integer]
113
+ attr_accessor :check_number
114
+
115
+ # Payment details for some transactions
116
+ # @return [PaymentDetails]
117
+ attr_accessor :payment_details
118
+
119
+ # LocTransaction Type
120
+ # @return [TransactionTypeLocTransaction]
121
+ attr_accessor :transaction_type
122
+
123
+ # A mapping from model property names to API property names.
124
+ def self.names
125
+ @_hash = {} if @_hash.nil?
126
+ @_hash['account_id'] = 'accountId'
127
+ @_hash['amount'] = 'amount'
128
+ @_hash['category'] = 'category'
129
+ @_hash['debit_credit_memo'] = 'debitCreditMemo'
130
+ @_hash['description'] = 'description'
131
+ @_hash['image_ids'] = 'imageIds'
132
+ @_hash['fi_attributes'] = 'fiAttributes'
133
+ @_hash['foreign_amount'] = 'foreignAmount'
134
+ @_hash['foreign_currency'] = 'foreignCurrency'
135
+ @_hash['line_item'] = 'lineItem'
136
+ @_hash['links'] = 'links'
137
+ @_hash['memo'] = 'memo'
138
+ @_hash['posted_timestamp'] = 'postedTimestamp'
139
+ @_hash['reference'] = 'reference'
140
+ @_hash['reference_transaction_id'] = 'referenceTransactionId'
141
+ @_hash['status'] = 'status'
142
+ @_hash['sub_category'] = 'subCategory'
143
+ @_hash['transaction_id'] = 'transactionId'
144
+ @_hash['transaction_timestamp'] = 'transactionTimestamp'
145
+ @_hash['check_number'] = 'checkNumber'
146
+ @_hash['payment_details'] = 'paymentDetails'
147
+ @_hash['transaction_type'] = 'transactionType'
148
+ @_hash
149
+ end
150
+
151
+ # An array for optional fields
152
+ def self.optionals
153
+ %w[
154
+ account_id
155
+ amount
156
+ category
157
+ debit_credit_memo
158
+ description
159
+ image_ids
160
+ fi_attributes
161
+ foreign_amount
162
+ foreign_currency
163
+ line_item
164
+ links
165
+ memo
166
+ posted_timestamp
167
+ reference
168
+ reference_transaction_id
169
+ status
170
+ sub_category
171
+ transaction_id
172
+ transaction_timestamp
173
+ check_number
174
+ payment_details
175
+ transaction_type
176
+ ]
177
+ end
178
+
179
+ # An array for nullable fields
180
+ def self.nullables
181
+ []
182
+ end
183
+
184
+ def initialize(account_id: SKIP, amount: SKIP, category: SKIP,
185
+ debit_credit_memo: SKIP, description: SKIP, image_ids: SKIP,
186
+ fi_attributes: SKIP, foreign_amount: SKIP,
187
+ foreign_currency: SKIP, line_item: SKIP, links: SKIP,
188
+ memo: SKIP, posted_timestamp: SKIP, reference: SKIP,
189
+ reference_transaction_id: SKIP, status: SKIP,
190
+ sub_category: SKIP, transaction_id: SKIP,
191
+ transaction_timestamp: SKIP, check_number: SKIP,
192
+ payment_details: SKIP, transaction_type: SKIP,
193
+ additional_properties: nil)
194
+ # Add additional model properties to the instance
195
+ additional_properties = {} if additional_properties.nil?
196
+
197
+ @account_id = account_id unless account_id == SKIP
198
+ @amount = amount unless amount == SKIP
199
+ @category = category unless category == SKIP
200
+ @debit_credit_memo = debit_credit_memo unless debit_credit_memo == SKIP
201
+ @description = description unless description == SKIP
202
+ @image_ids = image_ids unless image_ids == SKIP
203
+ @fi_attributes = fi_attributes unless fi_attributes == SKIP
204
+ @foreign_amount = foreign_amount unless foreign_amount == SKIP
205
+ @foreign_currency = foreign_currency unless foreign_currency == SKIP
206
+ @line_item = line_item unless line_item == SKIP
207
+ @links = links unless links == SKIP
208
+ @memo = memo unless memo == SKIP
209
+ @posted_timestamp = posted_timestamp unless posted_timestamp == SKIP
210
+ @reference = reference unless reference == SKIP
211
+ @reference_transaction_id = reference_transaction_id unless reference_transaction_id == SKIP
212
+ @status = status unless status == SKIP
213
+ @sub_category = sub_category unless sub_category == SKIP
214
+ @transaction_id = transaction_id unless transaction_id == SKIP
215
+ @transaction_timestamp = transaction_timestamp unless transaction_timestamp == SKIP
216
+ @check_number = check_number unless check_number == SKIP
217
+ @payment_details = payment_details unless payment_details == SKIP
218
+ @transaction_type = transaction_type unless transaction_type == SKIP
219
+ @additional_properties = additional_properties
220
+ end
221
+
222
+ # Creates an instance of the object from a hash.
223
+ def self.from_hash(hash)
224
+ return nil unless hash
225
+
226
+ # Extract variables from the hash.
227
+ account_id = hash.key?('accountId') ? hash['accountId'] : SKIP
228
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
229
+ category = hash.key?('category') ? hash['category'] : SKIP
230
+ debit_credit_memo =
231
+ hash.key?('debitCreditMemo') ? hash['debitCreditMemo'] : SKIP
232
+ description = hash.key?('description') ? hash['description'] : SKIP
233
+ image_ids = hash.key?('imageIds') ? hash['imageIds'] : SKIP
234
+ # Parameter is an array, so we need to iterate through it
235
+ fi_attributes = nil
236
+ unless hash['fiAttributes'].nil?
237
+ fi_attributes = []
238
+ hash['fiAttributes'].each do |structure|
239
+ fi_attributes << (FiAttributeEntity.from_hash(structure) if structure)
240
+ end
241
+ end
242
+
243
+ fi_attributes = SKIP unless hash.key?('fiAttributes')
244
+ foreign_amount = hash.key?('foreignAmount') ? hash['foreignAmount'] : SKIP
245
+ foreign_currency =
246
+ hash.key?('foreignCurrency') ? hash['foreignCurrency'] : SKIP
247
+ # Parameter is an array, so we need to iterate through it
248
+ line_item = nil
249
+ unless hash['lineItem'].nil?
250
+ line_item = []
251
+ hash['lineItem'].each do |structure|
252
+ line_item << (LineItem.from_hash(structure) if structure)
253
+ end
254
+ end
255
+
256
+ line_item = SKIP unless hash.key?('lineItem')
257
+ # Parameter is an array, so we need to iterate through it
258
+ links = nil
259
+ unless hash['links'].nil?
260
+ links = []
261
+ hash['links'].each do |structure|
262
+ links << (HateoasLink.from_hash(structure) if structure)
263
+ end
264
+ end
265
+
266
+ links = SKIP unless hash.key?('links')
267
+ memo = hash.key?('memo') ? hash['memo'] : SKIP
268
+ posted_timestamp = if hash.key?('postedTimestamp')
269
+ (DateTimeHelper.from_rfc3339(hash['postedTimestamp']) if hash['postedTimestamp'])
270
+ else
271
+ SKIP
272
+ end
273
+ reference = hash.key?('reference') ? hash['reference'] : SKIP
274
+ reference_transaction_id =
275
+ hash.key?('referenceTransactionId') ? hash['referenceTransactionId'] : SKIP
276
+ status = hash.key?('status') ? hash['status'] : SKIP
277
+ sub_category = hash.key?('subCategory') ? hash['subCategory'] : SKIP
278
+ transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP
279
+ transaction_timestamp = if hash.key?('transactionTimestamp')
280
+ (DateTimeHelper.from_rfc3339(hash['transactionTimestamp']) if hash['transactionTimestamp'])
281
+ else
282
+ SKIP
283
+ end
284
+ check_number = hash.key?('checkNumber') ? hash['checkNumber'] : SKIP
285
+ payment_details = PaymentDetails.from_hash(hash['paymentDetails']) if hash['paymentDetails']
286
+ transaction_type =
287
+ hash.key?('transactionType') ? hash['transactionType'] : SKIP
288
+
289
+ # Create a new hash for additional properties, removing known properties.
290
+ new_hash = hash.reject { |k, _| names.value?(k) }
291
+
292
+ additional_properties = APIHelper.get_additional_properties(
293
+ new_hash, proc { |value| value }
294
+ )
295
+
296
+ # Create object from extracted values.
297
+ LocTransaction.new(account_id: account_id,
298
+ amount: amount,
299
+ category: category,
300
+ debit_credit_memo: debit_credit_memo,
301
+ description: description,
302
+ image_ids: image_ids,
303
+ fi_attributes: fi_attributes,
304
+ foreign_amount: foreign_amount,
305
+ foreign_currency: foreign_currency,
306
+ line_item: line_item,
307
+ links: links,
308
+ memo: memo,
309
+ posted_timestamp: posted_timestamp,
310
+ reference: reference,
311
+ reference_transaction_id: reference_transaction_id,
312
+ status: status,
313
+ sub_category: sub_category,
314
+ transaction_id: transaction_id,
315
+ transaction_timestamp: transaction_timestamp,
316
+ check_number: check_number,
317
+ payment_details: payment_details,
318
+ transaction_type: transaction_type,
319
+ additional_properties: additional_properties)
320
+ end
321
+
322
+ def to_custom_posted_timestamp
323
+ DateTimeHelper.to_rfc3339(posted_timestamp)
324
+ end
325
+
326
+ def to_custom_transaction_timestamp
327
+ DateTimeHelper.to_rfc3339(transaction_timestamp)
328
+ end
329
+
330
+ # Validates an instance of the object from a given value.
331
+ # @param [LocTransaction | Hash] The value against the validation is performed.
332
+ def self.validate(value)
333
+ return true if value.instance_of? self
334
+
335
+ return false unless value.instance_of? Hash
336
+
337
+ true
338
+ end
339
+
340
+ # Provides a human-readable string representation of the object.
341
+ def to_s
342
+ class_name = self.class.name.split('::').last
343
+ "<#{class_name} account_id: #{@account_id}, amount: #{@amount}, category: #{@category},"\
344
+ " debit_credit_memo: #{@debit_credit_memo}, description: #{@description}, image_ids:"\
345
+ " #{@image_ids}, fi_attributes: #{@fi_attributes}, foreign_amount: #{@foreign_amount},"\
346
+ " foreign_currency: #{@foreign_currency}, line_item: #{@line_item}, links: #{@links}, memo:"\
347
+ " #{@memo}, posted_timestamp: #{@posted_timestamp}, reference: #{@reference},"\
348
+ " reference_transaction_id: #{@reference_transaction_id}, status: #{@status}, sub_category:"\
349
+ " #{@sub_category}, transaction_id: #{@transaction_id}, transaction_timestamp:"\
350
+ " #{@transaction_timestamp}, check_number: #{@check_number}, payment_details:"\
351
+ " #{@payment_details}, transaction_type: #{@transaction_type}, additional_properties:"\
352
+ " #{@additional_properties}>"
353
+ end
354
+
355
+ # Provides a debugging-friendly string with detailed object information.
356
+ def inspect
357
+ class_name = self.class.name.split('::').last
358
+ "<#{class_name} account_id: #{@account_id.inspect}, amount: #{@amount.inspect}, category:"\
359
+ " #{@category.inspect}, debit_credit_memo: #{@debit_credit_memo.inspect}, description:"\
360
+ " #{@description.inspect}, image_ids: #{@image_ids.inspect}, fi_attributes:"\
361
+ " #{@fi_attributes.inspect}, foreign_amount: #{@foreign_amount.inspect}, foreign_currency:"\
362
+ " #{@foreign_currency.inspect}, line_item: #{@line_item.inspect}, links: #{@links.inspect},"\
363
+ " memo: #{@memo.inspect}, posted_timestamp: #{@posted_timestamp.inspect}, reference:"\
364
+ " #{@reference.inspect}, reference_transaction_id: #{@reference_transaction_id.inspect},"\
365
+ " status: #{@status.inspect}, sub_category: #{@sub_category.inspect}, transaction_id:"\
366
+ " #{@transaction_id.inspect}, transaction_timestamp: #{@transaction_timestamp.inspect},"\
367
+ " check_number: #{@check_number.inspect}, payment_details: #{@payment_details.inspect},"\
368
+ " transaction_type: #{@transaction_type.inspect}, additional_properties:"\
369
+ " #{@additional_properties}>"
370
+ end
371
+ end
372
+ 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
+ # LocTransactionDetails Model.
8
+ class LocTransactionDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # A line of credit transaction of type
13
+ # @return [LocTransaction]
14
+ attr_accessor :loc_transaction
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['loc_transaction'] = 'locTransaction'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ loc_transaction
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(loc_transaction: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @loc_transaction = loc_transaction unless loc_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
+ loc_transaction = LocTransaction.from_hash(hash['locTransaction']) if hash['locTransaction']
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
+ LocTransactionDetails.new(loc_transaction: loc_transaction,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [LocTransactionDetails | 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_transaction: #{@loc_transaction}, 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_transaction: #{@loc_transaction.inspect}, additional_properties:"\
83
+ " #{@additional_properties}>"
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,84 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # Next Model.
8
+ class Next < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :href
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['href'] = 'href'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ href
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(href: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @href = href unless href == 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
+ href = hash.key?('href') ? hash['href'] : SKIP
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
+ Next.new(href: href,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [Next | 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} href: #{@href}, additional_properties: #{@additional_properties}>"
76
+ end
77
+
78
+ # Provides a debugging-friendly string with detailed object information.
79
+ def inspect
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} href: #{@href.inspect}, additional_properties: #{@additional_properties}>"
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,36 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # mode.
8
+ class Mode
9
+ MODE = [
10
+ # TODO: Write general description for RAW
11
+ RAW = 'raw'.freeze,
12
+
13
+ # TODO: Write general description for STANDARD
14
+ STANDARD = 'standard'.freeze
15
+ ].freeze
16
+
17
+ def self.validate(value)
18
+ return false if value.nil?
19
+
20
+ true
21
+ end
22
+
23
+ def self.from_value(value, default_value = RAW)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'raw' then RAW
30
+ when 'standard' then STANDARD
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,99 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # MutualFundSecurity Model.
8
+ class MutualFundSecurity < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [TrueClass | FalseClass]
14
+ attr_accessor :reinvest_capital_gains
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [TrueClass | FalseClass]
18
+ attr_accessor :reinvest_dividends
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['reinvest_capital_gains'] = 'reinvestCapitalGains'
24
+ @_hash['reinvest_dividends'] = 'reinvestDividends'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ reinvest_capital_gains
32
+ reinvest_dividends
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(reinvest_capital_gains: SKIP, reinvest_dividends: SKIP,
42
+ additional_properties: nil)
43
+ # Add additional model properties to the instance
44
+ additional_properties = {} if additional_properties.nil?
45
+
46
+ @reinvest_capital_gains = reinvest_capital_gains unless reinvest_capital_gains == SKIP
47
+ @reinvest_dividends = reinvest_dividends unless reinvest_dividends == SKIP
48
+ @additional_properties = additional_properties
49
+ end
50
+
51
+ # Creates an instance of the object from a hash.
52
+ def self.from_hash(hash)
53
+ return nil unless hash
54
+
55
+ # Extract variables from the hash.
56
+ reinvest_capital_gains =
57
+ hash.key?('reinvestCapitalGains') ? hash['reinvestCapitalGains'] : SKIP
58
+ reinvest_dividends =
59
+ hash.key?('reinvestDividends') ? hash['reinvestDividends'] : SKIP
60
+
61
+ # Create a new hash for additional properties, removing known properties.
62
+ new_hash = hash.reject { |k, _| names.value?(k) }
63
+
64
+ additional_properties = APIHelper.get_additional_properties(
65
+ new_hash, proc { |value| value }
66
+ )
67
+
68
+ # Create object from extracted values.
69
+ MutualFundSecurity.new(reinvest_capital_gains: reinvest_capital_gains,
70
+ reinvest_dividends: reinvest_dividends,
71
+ additional_properties: additional_properties)
72
+ end
73
+
74
+ # Validates an instance of the object from a given value.
75
+ # @param [MutualFundSecurity | Hash] The value against the validation is performed.
76
+ def self.validate(value)
77
+ return true if value.instance_of? self
78
+
79
+ return false unless value.instance_of? Hash
80
+
81
+ true
82
+ end
83
+
84
+ # Provides a human-readable string representation of the object.
85
+ def to_s
86
+ class_name = self.class.name.split('::').last
87
+ "<#{class_name} reinvest_capital_gains: #{@reinvest_capital_gains}, reinvest_dividends:"\
88
+ " #{@reinvest_dividends}, additional_properties: #{@additional_properties}>"
89
+ end
90
+
91
+ # Provides a debugging-friendly string with detailed object information.
92
+ def inspect
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} reinvest_capital_gains: #{@reinvest_capital_gains.inspect},"\
95
+ " reinvest_dividends: #{@reinvest_dividends.inspect}, additional_properties:"\
96
+ " #{@additional_properties}>"
97
+ end
98
+ end
99
+ end