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,44 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # PaymentFrequency_Annuity balances.
8
+ class PaymentFrequencyAnnuityBalances
9
+ PAYMENT_FREQUENCY_ANNUITY_BALANCES = [
10
+ # TODO: Write general description for ANNUALLY
11
+ ANNUALLY = 'ANNUALLY'.freeze,
12
+
13
+ # TODO: Write general description for QUARTERLY
14
+ QUARTERLY = 'QUARTERLY'.freeze,
15
+
16
+ # TODO: Write general description for MONTHLY
17
+ MONTHLY = 'MONTHLY'.freeze,
18
+
19
+ # TODO: Write general description for WEEKLY
20
+ WEEKLY = 'WEEKLY'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ true
27
+ end
28
+
29
+ def self.from_value(value, default_value = ANNUALLY)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'annually' then ANNUALLY
36
+ when 'quarterly' then QUARTERLY
37
+ when 'monthly' then MONTHLY
38
+ when 'weekly' then WEEKLY
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,129 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # This provides details required to execute a transaction against the account
8
+ # within the payment network
9
+ class PaymentNetworkSupportedByAccount < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Bank identifier used by the payment network ie. Routing Number
14
+ # @return [String]
15
+ attr_accessor :bank_id
16
+
17
+ # The number used to identify the account within the payment network. If
18
+ # identifierType is ACCOUNT_NUMBER, this is the account number.
19
+ # @return [String]
20
+ attr_accessor :identifier
21
+
22
+ # Type of identifier
23
+ # @return [String]
24
+ attr_accessor :identifier_type
25
+
26
+ # Type of payment network
27
+ # @return [String]
28
+ attr_accessor :type
29
+
30
+ # Can transfer funds to the account using this information
31
+ # @return [TrueClass | FalseClass]
32
+ attr_accessor :transfer_in
33
+
34
+ # Can transfer funds from the account using this information
35
+ # @return [TrueClass | FalseClass]
36
+ attr_accessor :transfer_out
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['bank_id'] = 'bankId'
42
+ @_hash['identifier'] = 'identifier'
43
+ @_hash['identifier_type'] = 'identifierType'
44
+ @_hash['type'] = 'type'
45
+ @_hash['transfer_in'] = 'transferIn'
46
+ @_hash['transfer_out'] = 'transferOut'
47
+ @_hash
48
+ end
49
+
50
+ # An array for optional fields
51
+ def self.optionals
52
+ %w[
53
+ bank_id
54
+ identifier
55
+ identifier_type
56
+ type
57
+ transfer_in
58
+ transfer_out
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ []
65
+ end
66
+
67
+ def initialize(bank_id: SKIP, identifier: SKIP, identifier_type: SKIP,
68
+ type: SKIP, transfer_in: SKIP, transfer_out: SKIP,
69
+ additional_properties: nil)
70
+ # Add additional model properties to the instance
71
+ additional_properties = {} if additional_properties.nil?
72
+
73
+ @bank_id = bank_id unless bank_id == SKIP
74
+ @identifier = identifier unless identifier == SKIP
75
+ @identifier_type = identifier_type unless identifier_type == SKIP
76
+ @type = type unless type == SKIP
77
+ @transfer_in = transfer_in unless transfer_in == SKIP
78
+ @transfer_out = transfer_out unless transfer_out == SKIP
79
+ @additional_properties = additional_properties
80
+ end
81
+
82
+ # Creates an instance of the object from a hash.
83
+ def self.from_hash(hash)
84
+ return nil unless hash
85
+
86
+ # Extract variables from the hash.
87
+ bank_id = hash.key?('bankId') ? hash['bankId'] : SKIP
88
+ identifier = hash.key?('identifier') ? hash['identifier'] : SKIP
89
+ identifier_type =
90
+ hash.key?('identifierType') ? hash['identifierType'] : SKIP
91
+ type = hash.key?('type') ? hash['type'] : SKIP
92
+ transfer_in = hash.key?('transferIn') ? hash['transferIn'] : SKIP
93
+ transfer_out = hash.key?('transferOut') ? hash['transferOut'] : SKIP
94
+
95
+ # Create a new hash for additional properties, removing known properties.
96
+ new_hash = hash.reject { |k, _| names.value?(k) }
97
+
98
+ additional_properties = APIHelper.get_additional_properties(
99
+ new_hash, proc { |value| value }
100
+ )
101
+
102
+ # Create object from extracted values.
103
+ PaymentNetworkSupportedByAccount.new(bank_id: bank_id,
104
+ identifier: identifier,
105
+ identifier_type: identifier_type,
106
+ type: type,
107
+ transfer_in: transfer_in,
108
+ transfer_out: transfer_out,
109
+ additional_properties: additional_properties)
110
+ end
111
+
112
+ # Provides a human-readable string representation of the object.
113
+ def to_s
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} bank_id: #{@bank_id}, identifier: #{@identifier}, identifier_type:"\
116
+ " #{@identifier_type}, type: #{@type}, transfer_in: #{@transfer_in}, transfer_out:"\
117
+ " #{@transfer_out}, additional_properties: #{@additional_properties}>"
118
+ end
119
+
120
+ # Provides a debugging-friendly string with detailed object information.
121
+ def inspect
122
+ class_name = self.class.name.split('::').last
123
+ "<#{class_name} bank_id: #{@bank_id.inspect}, identifier: #{@identifier.inspect},"\
124
+ " identifier_type: #{@identifier_type.inspect}, type: #{@type.inspect}, transfer_in:"\
125
+ " #{@transfer_in.inspect}, transfer_out: #{@transfer_out.inspect}, additional_properties:"\
126
+ " #{@additional_properties}>"
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,143 @@
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
+ # Information about a pension source.
9
+ class PensionSourceEntity < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Name of the Source
14
+ # @return [String]
15
+ attr_accessor :display_name
16
+
17
+ # Benefit Amount
18
+ # @return [Float]
19
+ attr_accessor :amount
20
+
21
+ # Form of payment
22
+ # @return [String]
23
+ attr_accessor :payment_option
24
+
25
+ # Date benefit was calculated
26
+ # @return [DateTime]
27
+ attr_accessor :as_of_date
28
+
29
+ # Date benefit was calculated
30
+ # @return [Frequency]
31
+ attr_accessor :frequency
32
+
33
+ # Assumed retirement date ‐ As of date amount is payable
34
+ # @return [DateTime]
35
+ attr_accessor :start_date
36
+
37
+ # A mapping from model property names to API property names.
38
+ def self.names
39
+ @_hash = {} if @_hash.nil?
40
+ @_hash['display_name'] = 'displayName'
41
+ @_hash['amount'] = 'amount'
42
+ @_hash['payment_option'] = 'paymentOption'
43
+ @_hash['as_of_date'] = 'asOfDate'
44
+ @_hash['frequency'] = 'frequency'
45
+ @_hash['start_date'] = 'startDate'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ display_name
53
+ amount
54
+ payment_option
55
+ as_of_date
56
+ frequency
57
+ start_date
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ []
64
+ end
65
+
66
+ def initialize(display_name: SKIP, amount: SKIP, payment_option: SKIP,
67
+ as_of_date: SKIP, frequency: SKIP, start_date: SKIP,
68
+ additional_properties: nil)
69
+ # Add additional model properties to the instance
70
+ additional_properties = {} if additional_properties.nil?
71
+
72
+ @display_name = display_name unless display_name == SKIP
73
+ @amount = amount unless amount == SKIP
74
+ @payment_option = payment_option unless payment_option == SKIP
75
+ @as_of_date = as_of_date unless as_of_date == SKIP
76
+ @frequency = frequency unless frequency == SKIP
77
+ @start_date = start_date unless start_date == SKIP
78
+ @additional_properties = additional_properties
79
+ end
80
+
81
+ # Creates an instance of the object from a hash.
82
+ def self.from_hash(hash)
83
+ return nil unless hash
84
+
85
+ # Extract variables from the hash.
86
+ display_name = hash.key?('displayName') ? hash['displayName'] : SKIP
87
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
88
+ payment_option = hash.key?('paymentOption') ? hash['paymentOption'] : SKIP
89
+ as_of_date = if hash.key?('asOfDate')
90
+ (DateTimeHelper.from_rfc3339(hash['asOfDate']) if hash['asOfDate'])
91
+ else
92
+ SKIP
93
+ end
94
+ frequency = hash.key?('frequency') ? hash['frequency'] : SKIP
95
+ start_date = if hash.key?('startDate')
96
+ (DateTimeHelper.from_rfc3339(hash['startDate']) if hash['startDate'])
97
+ else
98
+ SKIP
99
+ end
100
+
101
+ # Create a new hash for additional properties, removing known properties.
102
+ new_hash = hash.reject { |k, _| names.value?(k) }
103
+
104
+ additional_properties = APIHelper.get_additional_properties(
105
+ new_hash, proc { |value| value }
106
+ )
107
+
108
+ # Create object from extracted values.
109
+ PensionSourceEntity.new(display_name: display_name,
110
+ amount: amount,
111
+ payment_option: payment_option,
112
+ as_of_date: as_of_date,
113
+ frequency: frequency,
114
+ start_date: start_date,
115
+ additional_properties: additional_properties)
116
+ end
117
+
118
+ def to_custom_as_of_date
119
+ DateTimeHelper.to_rfc3339(as_of_date)
120
+ end
121
+
122
+ def to_custom_start_date
123
+ DateTimeHelper.to_rfc3339(start_date)
124
+ end
125
+
126
+ # Provides a human-readable string representation of the object.
127
+ def to_s
128
+ class_name = self.class.name.split('::').last
129
+ "<#{class_name} display_name: #{@display_name}, amount: #{@amount}, payment_option:"\
130
+ " #{@payment_option}, as_of_date: #{@as_of_date}, frequency: #{@frequency}, start_date:"\
131
+ " #{@start_date}, additional_properties: #{@additional_properties}>"
132
+ end
133
+
134
+ # Provides a debugging-friendly string with detailed object information.
135
+ def inspect
136
+ class_name = self.class.name.split('::').last
137
+ "<#{class_name} display_name: #{@display_name.inspect}, amount: #{@amount.inspect},"\
138
+ " payment_option: #{@payment_option.inspect}, as_of_date: #{@as_of_date.inspect}, frequency:"\
139
+ " #{@frequency.inspect}, start_date: #{@start_date.inspect}, additional_properties:"\
140
+ " #{@additional_properties}>"
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,48 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # PeriodCertainGuarantee.
8
+ class PeriodCertainGuarantee
9
+ PERIOD_CERTAIN_GUARANTEE = [
10
+ # TODO: Write general description for ENUM_NO_PERIOD_CERTAIN
11
+ ENUM_NO_PERIOD_CERTAIN = 'NO PERIOD CERTAIN'.freeze,
12
+
13
+ # TODO: Write general description for ENUM_5YEAR
14
+ ENUM_5YEAR = '5-YEAR'.freeze,
15
+
16
+ # TODO: Write general description for ENUM_10YEAR
17
+ ENUM_10YEAR = '10-YEAR'.freeze,
18
+
19
+ # TODO: Write general description for ENUM_20YEAR
20
+ ENUM_20YEAR = '20-YEAR'.freeze,
21
+
22
+ # TODO: Write general description for ENUM_30YEAR
23
+ ENUM_30YEAR = '30-YEAR'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ true
30
+ end
31
+
32
+ def self.from_value(value, default_value = ENUM_NO_PERIOD_CERTAIN)
33
+ return default_value if value.nil?
34
+
35
+ str = value.to_s.strip
36
+
37
+ case str.downcase
38
+ when 'enum_no_period_certain' then ENUM_NO_PERIOD_CERTAIN
39
+ when 'enum_5year' then ENUM_5YEAR
40
+ when 'enum_10year' then ENUM_10YEAR
41
+ when 'enum_20year' then ENUM_20YEAR
42
+ when 'enum_30year' then ENUM_30YEAR
43
+ else
44
+ default_value
45
+ end
46
+ end
47
+ end
48
+ 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
+ # he payment term for the premium. MONTHLY or ANNUAL.
8
+ class PolicyPremiumTerm
9
+ POLICY_PREMIUM_TERM = [
10
+ # TODO: Write general description for MONTHLY
11
+ MONTHLY = 'MONTHLY'.freeze,
12
+
13
+ # TODO: Write general description for ANNUAL
14
+ ANNUAL = 'ANNUAL'.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 = MONTHLY)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'monthly' then MONTHLY
30
+ when 'annual' then ANNUAL
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ 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
+ # PositionType.
8
+ class PositionType
9
+ POSITION_TYPE = [
10
+ # TODO: Write general description for LONG
11
+ LONG = 'LONG'.freeze,
12
+
13
+ # TODO: Write general description for SHORT
14
+ SHORT = 'SHORT'.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 = LONG)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'long' then LONG
30
+ when 'short' then SHORT
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ 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
+ # LONG, SHORT.
8
+ class PostionType
9
+ POSTION_TYPE = [
10
+ # TODO: Write general description for LONG
11
+ LONG = 'LONG'.freeze,
12
+
13
+ # TODO: Write general description for SHORT
14
+ SHORT = 'SHORT'.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 = LONG)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'long' then LONG
30
+ when 'short' then SHORT
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ 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
+ # Prev Model.
8
+ class Prev < 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
+ Prev.new(href: href,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [Prev | 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,103 @@
1
+ # akoya
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Akoya
7
+ # Once the ID Token expires, you will need to call the token endpoint to
8
+ # obtain a new set of tokens. The refresh token expiration is set by the data
9
+ # provider.
10
+ class RefreshTokens < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # Set to `refresh_token` to indicate a new id token will be returned
15
+ # @return [String]
16
+ attr_accessor :grant_type
17
+
18
+ # The refresh token
19
+ # @return [String]
20
+ attr_accessor :refresh_token
21
+
22
+ # Your app's client ID from Akoya
23
+ # @return [String]
24
+ attr_accessor :client_id
25
+
26
+ # Your app's Client secret
27
+ # @return [String]
28
+ attr_accessor :client_secret
29
+
30
+ # A mapping from model property names to API property names.
31
+ def self.names
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['grant_type'] = 'grant_type'
34
+ @_hash['refresh_token'] = 'refresh_token'
35
+ @_hash['client_id'] = 'client_id'
36
+ @_hash['client_secret'] = 'client_secret'
37
+ @_hash
38
+ end
39
+
40
+ # An array for optional fields
41
+ def self.optionals
42
+ []
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(grant_type: 'refresh_token', refresh_token:, client_id:,
51
+ client_secret:, additional_properties: nil)
52
+ # Add additional model properties to the instance
53
+ additional_properties = {} if additional_properties.nil?
54
+
55
+ @grant_type = grant_type
56
+ @refresh_token = refresh_token
57
+ @client_id = client_id
58
+ @client_secret = client_secret
59
+ @additional_properties = additional_properties
60
+ end
61
+
62
+ # Creates an instance of the object from a hash.
63
+ def self.from_hash(hash)
64
+ return nil unless hash
65
+
66
+ # Extract variables from the hash.
67
+ grant_type = hash['grant_type'] ||= 'refresh_token'
68
+ refresh_token = hash.key?('refresh_token') ? hash['refresh_token'] : nil
69
+ client_id = hash.key?('client_id') ? hash['client_id'] : nil
70
+ client_secret = hash.key?('client_secret') ? hash['client_secret'] : nil
71
+
72
+ # Create a new hash for additional properties, removing known properties.
73
+ new_hash = hash.reject { |k, _| names.value?(k) }
74
+
75
+ additional_properties = APIHelper.get_additional_properties(
76
+ new_hash, proc { |value| value }
77
+ )
78
+
79
+ # Create object from extracted values.
80
+ RefreshTokens.new(grant_type: grant_type,
81
+ refresh_token: refresh_token,
82
+ client_id: client_id,
83
+ client_secret: client_secret,
84
+ additional_properties: additional_properties)
85
+ end
86
+
87
+ # Provides a human-readable string representation of the object.
88
+ def to_s
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} grant_type: #{@grant_type}, refresh_token: #{@refresh_token}, client_id:"\
91
+ " #{@client_id}, client_secret: #{@client_secret}, additional_properties:"\
92
+ " #{@additional_properties}>"
93
+ end
94
+
95
+ # Provides a debugging-friendly string with detailed object information.
96
+ def inspect
97
+ class_name = self.class.name.split('::').last
98
+ "<#{class_name} grant_type: #{@grant_type.inspect}, refresh_token:"\
99
+ " #{@refresh_token.inspect}, client_id: #{@client_id.inspect}, client_secret:"\
100
+ " #{@client_secret.inspect}, additional_properties: #{@additional_properties}>"
101
+ end
102
+ end
103
+ 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
+ # How the option is secured
8
+ class Secured
9
+ SECURED = [
10
+ # TODO: Write general description for COVERED
11
+ COVERED = 'COVERED'.freeze,
12
+
13
+ # TODO: Write general description for NAKED
14
+ NAKED = 'NAKED'.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 = COVERED)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'covered' then COVERED
30
+ when 'naked' then NAKED
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ end