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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +190 -0
- data/bin/console +15 -0
- data/lib/akoya/api_helper.rb +10 -0
- data/lib/akoya/client.rb +117 -0
- data/lib/akoya/configuration.rb +195 -0
- data/lib/akoya/controllers/account_information_controller.rb +93 -0
- data/lib/akoya/controllers/balances_controller.rb +92 -0
- data/lib/akoya/controllers/base_controller.rb +65 -0
- data/lib/akoya/controllers/customers_controller.rb +112 -0
- data/lib/akoya/controllers/investments_controller.rb +95 -0
- data/lib/akoya/controllers/payments_controller.rb +70 -0
- data/lib/akoya/controllers/statements_controller.rb +158 -0
- data/lib/akoya/controllers/tokens_controller.rb +122 -0
- data/lib/akoya/controllers/transactions_controller.rb +108 -0
- data/lib/akoya/exceptions/api_exception.rb +21 -0
- data/lib/akoya/exceptions/error_entity_exception.rb +54 -0
- data/lib/akoya/exceptions/error_response_exception.rb +53 -0
- data/lib/akoya/http/api_response.rb +19 -0
- data/lib/akoya/http/auth/basic_auth.rb +62 -0
- data/lib/akoya/http/auth/bearer_auth.rb +53 -0
- data/lib/akoya/http/http_call_back.rb +10 -0
- data/lib/akoya/http/http_method_enum.rb +10 -0
- data/lib/akoya/http/http_request.rb +10 -0
- data/lib/akoya/http/http_response.rb +10 -0
- data/lib/akoya/http/proxy_settings.rb +22 -0
- data/lib/akoya/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/akoya/logging/sdk_logger.rb +17 -0
- data/lib/akoya/models/account.rb +86 -0
- data/lib/akoya/models/account_category.rb +50 -0
- data/lib/akoya/models/account_contact_entity.rb +132 -0
- data/lib/akoya/models/account_holder_entity.rb +178 -0
- data/lib/akoya/models/account_holder_relationship.rb +110 -0
- data/lib/akoya/models/account_holder_relationship_account_holder_entity.rb +110 -0
- data/lib/akoya/models/account_information.rb +335 -0
- data/lib/akoya/models/action.rb +48 -0
- data/lib/akoya/models/address.rb +144 -0
- data/lib/akoya/models/akoya_account_info_product.rb +88 -0
- data/lib/akoya/models/an_array_of_statements.rb +95 -0
- data/lib/akoya/models/an_investment_holding.rb +493 -0
- data/lib/akoya/models/annual_increase_type.rb +40 -0
- data/lib/akoya/models/annuity_account.rb +370 -0
- data/lib/akoya/models/annuity_account_info.rb +86 -0
- data/lib/akoya/models/annuity_balance_details.rb +87 -0
- data/lib/akoya/models/annuity_balances.rb +477 -0
- data/lib/akoya/models/annuity_product_type.rb +36 -0
- data/lib/akoya/models/annuity_value_basis.rb +36 -0
- data/lib/akoya/models/array_of_account_payment_networks.rb +85 -0
- data/lib/akoya/models/asset_class.rb +95 -0
- data/lib/akoya/models/asset_class_an_investment_holding.rb +85 -0
- data/lib/akoya/models/asset_class_asset_class.rb +56 -0
- data/lib/akoya/models/asset_class_citi_bank_investment_holdings.rb +86 -0
- data/lib/akoya/models/balance_type.rb +37 -0
- data/lib/akoya/models/balance_type_investment_balance_list.rb +36 -0
- data/lib/akoya/models/balances.rb +88 -0
- data/lib/akoya/models/base_model.rb +110 -0
- data/lib/akoya/models/business_customer_entity.rb +127 -0
- data/lib/akoya/models/business_customer_entity_account_holder_entity.rb +126 -0
- data/lib/akoya/models/business_customer_entity_customer.rb +126 -0
- data/lib/akoya/models/call_type.rb +44 -0
- data/lib/akoya/models/citi_bank_investment.rb +535 -0
- data/lib/akoya/models/citi_bank_investment_details.rb +75 -0
- data/lib/akoya/models/citi_bank_investment_holdings.rb +210 -0
- data/lib/akoya/models/compounding_period.rb +56 -0
- data/lib/akoya/models/contribution_entity.rb +266 -0
- data/lib/akoya/models/coupon_mature_frequency.rb +48 -0
- data/lib/akoya/models/currency.rb +108 -0
- data/lib/akoya/models/currency_citi_bank_investment_holdings.rb +86 -0
- data/lib/akoya/models/currency_entity.rb +109 -0
- data/lib/akoya/models/current_customer.rb +75 -0
- data/lib/akoya/models/customer.rb +164 -0
- data/lib/akoya/models/customer_current_customer.rb +164 -0
- data/lib/akoya/models/customer_name.rb +127 -0
- data/lib/akoya/models/customer_name_account_holder_entity.rb +127 -0
- data/lib/akoya/models/customer_name_customer.rb +127 -0
- data/lib/akoya/models/debit_credit_memo.rb +37 -0
- data/lib/akoya/models/debt_class.rb +44 -0
- data/lib/akoya/models/debt_security.rb +137 -0
- data/lib/akoya/models/debt_security_entity.rb +216 -0
- data/lib/akoya/models/debt_type.rb +36 -0
- data/lib/akoya/models/delivery_address.rb +153 -0
- data/lib/akoya/models/deposit_account.rb +375 -0
- data/lib/akoya/models/deposit_account_info.rb +86 -0
- data/lib/akoya/models/deposit_balance_details.rb +87 -0
- data/lib/akoya/models/deposit_balances.rb +438 -0
- data/lib/akoya/models/deposit_transaction.rb +369 -0
- data/lib/akoya/models/deposit_transaction_details.rb +87 -0
- data/lib/akoya/models/domicile.rb +85 -0
- data/lib/akoya/models/equity_grant.rb +199 -0
- data/lib/akoya/models/error_entity_account_information.rb +97 -0
- data/lib/akoya/models/error_entity_annuity_account.rb +97 -0
- data/lib/akoya/models/error_entity_annuity_balances.rb +97 -0
- data/lib/akoya/models/error_entity_citi_bank_investment.rb +97 -0
- data/lib/akoya/models/error_entity_deposit_account.rb +97 -0
- data/lib/akoya/models/error_entity_deposit_balances.rb +97 -0
- data/lib/akoya/models/error_entity_insurance_account.rb +97 -0
- data/lib/akoya/models/error_entity_insurance_balances.rb +97 -0
- data/lib/akoya/models/error_entity_investment_account.rb +97 -0
- data/lib/akoya/models/error_entity_investment_balances.rb +97 -0
- data/lib/akoya/models/error_entity_line_of_credit_balances.rb +97 -0
- data/lib/akoya/models/error_entity_loan_account.rb +97 -0
- data/lib/akoya/models/error_entity_loan_balances.rb +97 -0
- data/lib/akoya/models/error_entity_us_bank_investment.rb +97 -0
- data/lib/akoya/models/fi_asset_class.rb +95 -0
- data/lib/akoya/models/fi_asset_class_an_investment_holding.rb +85 -0
- data/lib/akoya/models/fi_attribute.rb +95 -0
- data/lib/akoya/models/fi_attribute_entity.rb +95 -0
- data/lib/akoya/models/frequency.rb +56 -0
- data/lib/akoya/models/hateoas_link.rb +105 -0
- data/lib/akoya/models/held_in_account.rb +44 -0
- data/lib/akoya/models/holding_sub_type.rb +36 -0
- data/lib/akoya/models/holding_type.rb +56 -0
- data/lib/akoya/models/income_type.rb +41 -0
- data/lib/akoya/models/industry_code.rb +85 -0
- data/lib/akoya/models/insurance_account.rb +349 -0
- data/lib/akoya/models/insurance_account_info.rb +87 -0
- data/lib/akoya/models/insurance_balance_details.rb +87 -0
- data/lib/akoya/models/insurance_balances.rb +420 -0
- data/lib/akoya/models/insurance_transaction.rb +351 -0
- data/lib/akoya/models/insurance_transaction_details.rb +87 -0
- data/lib/akoya/models/interest_rate_type.rb +36 -0
- data/lib/akoya/models/inv401_k_source.rb +56 -0
- data/lib/akoya/models/inv401_k_source_open_order_entity.rb +57 -0
- data/lib/akoya/models/inv401_k_surce.rb +56 -0
- data/lib/akoya/models/investment_account.rb +411 -0
- data/lib/akoya/models/investment_account_annuity_balance.rb +87 -0
- data/lib/akoya/models/investment_account_deposit_balance.rb +87 -0
- data/lib/akoya/models/investment_account_info.rb +87 -0
- data/lib/akoya/models/investment_account_insurance_balance.rb +87 -0
- data/lib/akoya/models/investment_account_loan_balance.rb +86 -0
- data/lib/akoya/models/investment_account_loc_balance.rb +86 -0
- data/lib/akoya/models/investment_balance_details.rb +87 -0
- data/lib/akoya/models/investment_balance_list.rb +148 -0
- data/lib/akoya/models/investment_balances.rb +525 -0
- data/lib/akoya/models/investment_details.rb +88 -0
- data/lib/akoya/models/investment_loan_entity.rb +271 -0
- data/lib/akoya/models/investment_transaction.rb +783 -0
- data/lib/akoya/models/investment_transaction_details.rb +87 -0
- data/lib/akoya/models/investments.rb +88 -0
- data/lib/akoya/models/line_item.rb +156 -0
- data/lib/akoya/models/line_of_credit_balances.rb +601 -0
- data/lib/akoya/models/links.rb +95 -0
- data/lib/akoya/models/loan_account.rb +417 -0
- data/lib/akoya/models/loan_account_info.rb +86 -0
- data/lib/akoya/models/loan_balance_details.rb +86 -0
- data/lib/akoya/models/loan_balances.rb +556 -0
- data/lib/akoya/models/loan_payment_frequency.rb +68 -0
- data/lib/akoya/models/loan_transaction.rb +360 -0
- data/lib/akoya/models/loan_transaction_details.rb +87 -0
- data/lib/akoya/models/loc_account_info.rb +86 -0
- data/lib/akoya/models/loc_balance_details.rb +86 -0
- data/lib/akoya/models/loc_transaction.rb +372 -0
- data/lib/akoya/models/loc_transaction_details.rb +86 -0
- data/lib/akoya/models/mnext.rb +84 -0
- data/lib/akoya/models/mode.rb +36 -0
- data/lib/akoya/models/mutual_fund_security.rb +99 -0
- data/lib/akoya/models/mutual_fund_security_entity.rb +150 -0
- data/lib/akoya/models/mutual_fund_type.rb +40 -0
- data/lib/akoya/models/obtain_tokens.rb +99 -0
- data/lib/akoya/models/open_order_entity.rb +228 -0
- data/lib/akoya/models/option_security.rb +125 -0
- data/lib/akoya/models/option_security_entity.rb +127 -0
- data/lib/akoya/models/option_type.rb +36 -0
- data/lib/akoya/models/order_duration.rb +40 -0
- data/lib/akoya/models/order_type.rb +60 -0
- data/lib/akoya/models/other_security_entity.rb +77 -0
- data/lib/akoya/models/paginated_array.rb +75 -0
- data/lib/akoya/models/payment_details.rb +142 -0
- data/lib/akoya/models/payment_frequency.rb +56 -0
- data/lib/akoya/models/payment_frequency_annuity_account.rb +44 -0
- data/lib/akoya/models/payment_frequency_annuity_balances.rb +44 -0
- data/lib/akoya/models/payment_network_supported_by_account.rb +129 -0
- data/lib/akoya/models/pension_source_entity.rb +143 -0
- data/lib/akoya/models/period_certain_guarantee.rb +48 -0
- data/lib/akoya/models/policy_premium_term.rb +36 -0
- data/lib/akoya/models/position_type.rb +36 -0
- data/lib/akoya/models/postion_type.rb +36 -0
- data/lib/akoya/models/prev.rb +84 -0
- data/lib/akoya/models/refresh_tokens.rb +103 -0
- data/lib/akoya/models/secured.rb +36 -0
- data/lib/akoya/models/security_id_type.rb +52 -0
- data/lib/akoya/models/security_id_type_investment_transaction.rb +52 -0
- data/lib/akoya/models/security_type.rb +56 -0
- data/lib/akoya/models/statement_entity.rb +136 -0
- data/lib/akoya/models/status.rb +56 -0
- data/lib/akoya/models/status_deposit_transaction.rb +44 -0
- data/lib/akoya/models/status_insurance_transaction.rb +44 -0
- data/lib/akoya/models/status_investment_transaction.rb +44 -0
- data/lib/akoya/models/status_loan_transaction.rb +44 -0
- data/lib/akoya/models/status_loc_transaction.rb +44 -0
- data/lib/akoya/models/status_statement_entity.rb +40 -0
- data/lib/akoya/models/status_transaction.rb +44 -0
- data/lib/akoya/models/stock_security_entity.rb +137 -0
- data/lib/akoya/models/stock_type.rb +56 -0
- data/lib/akoya/models/sub_account.rb +44 -0
- data/lib/akoya/models/sub_account_fund.rb +44 -0
- data/lib/akoya/models/sub_account_sec.rb +44 -0
- data/lib/akoya/models/sweep_security_entity.rb +118 -0
- data/lib/akoya/models/tax_lot.rb +137 -0
- data/lib/akoya/models/tax_lot_an_investment_holding.rb +139 -0
- data/lib/akoya/models/telephone.rb +95 -0
- data/lib/akoya/models/telephone_number.rb +95 -0
- data/lib/akoya/models/token_example_response.rb +101 -0
- data/lib/akoya/models/transaction.rb +328 -0
- data/lib/akoya/models/transaction_reason.rb +41 -0
- data/lib/akoya/models/transaction_type.rb +84 -0
- data/lib/akoya/models/transaction_type_insurance_transaction.rb +44 -0
- data/lib/akoya/models/transaction_type_investment_transaction.rb +192 -0
- data/lib/akoya/models/transaction_type_loan_transaction.rb +44 -0
- data/lib/akoya/models/transaction_type_loc_transaction.rb +84 -0
- data/lib/akoya/models/transactions_entity.rb +98 -0
- data/lib/akoya/models/transfer_action.rb +36 -0
- data/lib/akoya/models/type.rb +44 -0
- data/lib/akoya/models/type_hateoas_link.rb +52 -0
- data/lib/akoya/models/type_telephone_number.rb +44 -0
- data/lib/akoya/models/unit_type.rb +36 -0
- data/lib/akoya/models/unit_type_open_order_entity.rb +36 -0
- data/lib/akoya/models/us_bank_investment.rb +535 -0
- data/lib/akoya/models/us_bank_investment_details.rb +75 -0
- data/lib/akoya/models/us_bank_investment_holdings.rb +403 -0
- data/lib/akoya/models/vesting.rb +135 -0
- data/lib/akoya/models/vesting_entity.rb +185 -0
- data/lib/akoya/models/x_akoya_interaction_type.rb +36 -0
- data/lib/akoya/utilities/date_time_helper.rb +11 -0
- data/lib/akoya/utilities/file_wrapper.rb +28 -0
- data/lib/akoya/utilities/union_type_lookup.rb +91 -0
- data/lib/akoya.rb +250 -0
- metadata +312 -0
|
@@ -0,0 +1,493 @@
|
|
|
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
|
+
# AnInvestmentHolding Model.
|
|
9
|
+
class AnInvestmentHolding < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Percent breakdown by asset class.
|
|
14
|
+
# @return [Array[AssetClassAnInvestmentHolding]]
|
|
15
|
+
attr_accessor :asset_classes
|
|
16
|
+
|
|
17
|
+
# Cost is average of all purchases for holding.
|
|
18
|
+
# @return [TrueClass | FalseClass]
|
|
19
|
+
attr_accessor :average_cost
|
|
20
|
+
|
|
21
|
+
# If true, indicates that this holding is used to maintain proceeds from
|
|
22
|
+
# sales, dividends, and other cash postings to the investment account.
|
|
23
|
+
# @return [TrueClass | FalseClass]
|
|
24
|
+
attr_accessor :cash_account
|
|
25
|
+
|
|
26
|
+
# Change in current price compared to previous day's close
|
|
27
|
+
# @return [Float]
|
|
28
|
+
attr_accessor :change_in_price
|
|
29
|
+
|
|
30
|
+
# Indicates the currency code used by the account. May also include currency
|
|
31
|
+
# rate.
|
|
32
|
+
# @return [CurrencyEntity]
|
|
33
|
+
attr_accessor :currency
|
|
34
|
+
|
|
35
|
+
# Indicates the currency code used by the account. May also include currency
|
|
36
|
+
# rate.
|
|
37
|
+
# @return [Float]
|
|
38
|
+
attr_accessor :current_unit_price
|
|
39
|
+
|
|
40
|
+
# Current unit price as of date
|
|
41
|
+
# @return [DateTime]
|
|
42
|
+
attr_accessor :current_unit_price_date
|
|
43
|
+
|
|
44
|
+
# Description of the holding
|
|
45
|
+
# @return [String]
|
|
46
|
+
attr_accessor :description
|
|
47
|
+
|
|
48
|
+
# For CDs, bonds, and other time-based holdings.
|
|
49
|
+
# @return [DateTime]
|
|
50
|
+
attr_accessor :expiration_date
|
|
51
|
+
|
|
52
|
+
# Required for bonds. Face value at the time of data retrieved.
|
|
53
|
+
# @return [Float]
|
|
54
|
+
attr_accessor :face_value
|
|
55
|
+
|
|
56
|
+
# Percent breakdown by FI-specific asset class percentage breakdown
|
|
57
|
+
# @return [Array[FiAssetClassAnInvestmentHolding]]
|
|
58
|
+
attr_accessor :fi_asset_classes
|
|
59
|
+
|
|
60
|
+
# Percent breakdown by FI-specific asset class percentage breakdown
|
|
61
|
+
# @return [Array[FiAttributeEntity]]
|
|
62
|
+
attr_accessor :fi_attributes
|
|
63
|
+
|
|
64
|
+
# Sub-account
|
|
65
|
+
# @return [HeldInAccount]
|
|
66
|
+
attr_accessor :held_in_account
|
|
67
|
+
|
|
68
|
+
# Long term persistent identity of the holding
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :holding_id
|
|
71
|
+
|
|
72
|
+
# Holding name or security name
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :holding_name
|
|
75
|
+
|
|
76
|
+
# Holding name or security name
|
|
77
|
+
# @return [HoldingSubType]
|
|
78
|
+
attr_accessor :holding_sub_type
|
|
79
|
+
|
|
80
|
+
# Holding name or security name
|
|
81
|
+
# @return [HoldingType]
|
|
82
|
+
attr_accessor :holding_type
|
|
83
|
+
|
|
84
|
+
# Source for money for this security.
|
|
85
|
+
# @return [Inv401KSurce]
|
|
86
|
+
attr_accessor :inv401k_surce
|
|
87
|
+
|
|
88
|
+
# Market value at the time of data retrieved
|
|
89
|
+
# @return [Float]
|
|
90
|
+
attr_accessor :market_value
|
|
91
|
+
|
|
92
|
+
# Date of original purchase
|
|
93
|
+
# @return [DateTime]
|
|
94
|
+
attr_accessor :original_purchase_date
|
|
95
|
+
|
|
96
|
+
# Date of original purchase
|
|
97
|
+
# @return [PositionType]
|
|
98
|
+
attr_accessor :position_type
|
|
99
|
+
|
|
100
|
+
# Price of holding at the time of purchase
|
|
101
|
+
# @return [Float]
|
|
102
|
+
attr_accessor :purchased_price
|
|
103
|
+
|
|
104
|
+
# For CDs, bonds, and other rate based holdings.
|
|
105
|
+
# @return [Float]
|
|
106
|
+
attr_accessor :rate
|
|
107
|
+
|
|
108
|
+
# Unique identifier of security
|
|
109
|
+
# @return [String]
|
|
110
|
+
attr_accessor :security_id
|
|
111
|
+
|
|
112
|
+
# Security identifier type
|
|
113
|
+
# @return [SecurityIdType]
|
|
114
|
+
attr_accessor :security_id_type
|
|
115
|
+
|
|
116
|
+
# Ticker / Market symbol
|
|
117
|
+
# @return [String]
|
|
118
|
+
attr_accessor :symbol
|
|
119
|
+
|
|
120
|
+
# Breakdown by tax lot.
|
|
121
|
+
# @return [Array[TaxLotAnInvestmentHolding]]
|
|
122
|
+
attr_accessor :tax_lots
|
|
123
|
+
|
|
124
|
+
# Required for stock, mutual funds. Number of shares (with decimals).
|
|
125
|
+
# @return [Float]
|
|
126
|
+
attr_accessor :units
|
|
127
|
+
|
|
128
|
+
# Information about the mutual fund security specific to the type of
|
|
129
|
+
# security
|
|
130
|
+
# @return [MutualFundSecurityEntity]
|
|
131
|
+
attr_accessor :mutual_fund_security
|
|
132
|
+
|
|
133
|
+
# Information about the option security specific to the type of security
|
|
134
|
+
# @return [OptionSecurityEntity]
|
|
135
|
+
attr_accessor :option_security
|
|
136
|
+
|
|
137
|
+
# Information about the security specific to the type of security
|
|
138
|
+
# @return [OtherSecurityEntity]
|
|
139
|
+
attr_accessor :other_security
|
|
140
|
+
|
|
141
|
+
# Information about the stock security specific to the type of security
|
|
142
|
+
# @return [StockSecurityEntity]
|
|
143
|
+
attr_accessor :stock_security
|
|
144
|
+
|
|
145
|
+
# Information about the sweep security specific to the type of security
|
|
146
|
+
# @return [SweepSecurityEntity]
|
|
147
|
+
attr_accessor :sweep_security
|
|
148
|
+
|
|
149
|
+
# Information about the debt security specific to the type of security
|
|
150
|
+
# @return [DebtSecurityEntity]
|
|
151
|
+
attr_accessor :debt_security
|
|
152
|
+
|
|
153
|
+
# A mapping from model property names to API property names.
|
|
154
|
+
def self.names
|
|
155
|
+
@_hash = {} if @_hash.nil?
|
|
156
|
+
@_hash['asset_classes'] = 'assetClasses'
|
|
157
|
+
@_hash['average_cost'] = 'averageCost'
|
|
158
|
+
@_hash['cash_account'] = 'cashAccount'
|
|
159
|
+
@_hash['change_in_price'] = 'changeInPrice'
|
|
160
|
+
@_hash['currency'] = 'currency'
|
|
161
|
+
@_hash['current_unit_price'] = 'currentUnitPrice'
|
|
162
|
+
@_hash['current_unit_price_date'] = 'currentUnitPriceDate'
|
|
163
|
+
@_hash['description'] = 'description'
|
|
164
|
+
@_hash['expiration_date'] = 'expirationDate'
|
|
165
|
+
@_hash['face_value'] = 'faceValue'
|
|
166
|
+
@_hash['fi_asset_classes'] = 'fiAssetClasses'
|
|
167
|
+
@_hash['fi_attributes'] = 'fiAttributes'
|
|
168
|
+
@_hash['held_in_account'] = 'heldInAccount'
|
|
169
|
+
@_hash['holding_id'] = 'holdingId'
|
|
170
|
+
@_hash['holding_name'] = 'holdingName'
|
|
171
|
+
@_hash['holding_sub_type'] = 'holdingSubType'
|
|
172
|
+
@_hash['holding_type'] = 'holdingType'
|
|
173
|
+
@_hash['inv401k_surce'] = 'inv401kSurce'
|
|
174
|
+
@_hash['market_value'] = 'marketValue'
|
|
175
|
+
@_hash['original_purchase_date'] = 'originalPurchaseDate'
|
|
176
|
+
@_hash['position_type'] = 'positionType'
|
|
177
|
+
@_hash['purchased_price'] = 'purchasedPrice'
|
|
178
|
+
@_hash['rate'] = 'rate'
|
|
179
|
+
@_hash['security_id'] = 'securityId'
|
|
180
|
+
@_hash['security_id_type'] = 'securityIdType'
|
|
181
|
+
@_hash['symbol'] = 'symbol'
|
|
182
|
+
@_hash['tax_lots'] = 'taxLots'
|
|
183
|
+
@_hash['units'] = 'units'
|
|
184
|
+
@_hash['mutual_fund_security'] = 'mutualFundSecurity'
|
|
185
|
+
@_hash['option_security'] = 'optionSecurity'
|
|
186
|
+
@_hash['other_security'] = 'otherSecurity'
|
|
187
|
+
@_hash['stock_security'] = 'stockSecurity'
|
|
188
|
+
@_hash['sweep_security'] = 'sweepSecurity'
|
|
189
|
+
@_hash['debt_security'] = 'debtSecurity'
|
|
190
|
+
@_hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# An array for optional fields
|
|
194
|
+
def self.optionals
|
|
195
|
+
%w[
|
|
196
|
+
asset_classes
|
|
197
|
+
average_cost
|
|
198
|
+
cash_account
|
|
199
|
+
change_in_price
|
|
200
|
+
currency
|
|
201
|
+
current_unit_price
|
|
202
|
+
current_unit_price_date
|
|
203
|
+
description
|
|
204
|
+
expiration_date
|
|
205
|
+
face_value
|
|
206
|
+
fi_asset_classes
|
|
207
|
+
fi_attributes
|
|
208
|
+
held_in_account
|
|
209
|
+
holding_id
|
|
210
|
+
holding_name
|
|
211
|
+
holding_sub_type
|
|
212
|
+
holding_type
|
|
213
|
+
inv401k_surce
|
|
214
|
+
market_value
|
|
215
|
+
original_purchase_date
|
|
216
|
+
position_type
|
|
217
|
+
purchased_price
|
|
218
|
+
rate
|
|
219
|
+
security_id
|
|
220
|
+
security_id_type
|
|
221
|
+
symbol
|
|
222
|
+
tax_lots
|
|
223
|
+
units
|
|
224
|
+
mutual_fund_security
|
|
225
|
+
option_security
|
|
226
|
+
other_security
|
|
227
|
+
stock_security
|
|
228
|
+
sweep_security
|
|
229
|
+
debt_security
|
|
230
|
+
]
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# An array for nullable fields
|
|
234
|
+
def self.nullables
|
|
235
|
+
[]
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
def initialize(asset_classes: SKIP, average_cost: SKIP, cash_account: SKIP,
|
|
239
|
+
change_in_price: SKIP, currency: SKIP,
|
|
240
|
+
current_unit_price: SKIP, current_unit_price_date: SKIP,
|
|
241
|
+
description: SKIP, expiration_date: SKIP, face_value: SKIP,
|
|
242
|
+
fi_asset_classes: SKIP, fi_attributes: SKIP,
|
|
243
|
+
held_in_account: SKIP, holding_id: SKIP, holding_name: SKIP,
|
|
244
|
+
holding_sub_type: SKIP, holding_type: SKIP,
|
|
245
|
+
inv401k_surce: SKIP, market_value: SKIP,
|
|
246
|
+
original_purchase_date: SKIP, position_type: SKIP,
|
|
247
|
+
purchased_price: SKIP, rate: SKIP, security_id: SKIP,
|
|
248
|
+
security_id_type: SKIP, symbol: SKIP, tax_lots: SKIP,
|
|
249
|
+
units: SKIP, mutual_fund_security: SKIP,
|
|
250
|
+
option_security: SKIP, other_security: SKIP,
|
|
251
|
+
stock_security: SKIP, sweep_security: SKIP,
|
|
252
|
+
debt_security: SKIP, additional_properties: nil)
|
|
253
|
+
# Add additional model properties to the instance
|
|
254
|
+
additional_properties = {} if additional_properties.nil?
|
|
255
|
+
|
|
256
|
+
@asset_classes = asset_classes unless asset_classes == SKIP
|
|
257
|
+
@average_cost = average_cost unless average_cost == SKIP
|
|
258
|
+
@cash_account = cash_account unless cash_account == SKIP
|
|
259
|
+
@change_in_price = change_in_price unless change_in_price == SKIP
|
|
260
|
+
@currency = currency unless currency == SKIP
|
|
261
|
+
@current_unit_price = current_unit_price unless current_unit_price == SKIP
|
|
262
|
+
@current_unit_price_date = current_unit_price_date unless current_unit_price_date == SKIP
|
|
263
|
+
@description = description unless description == SKIP
|
|
264
|
+
@expiration_date = expiration_date unless expiration_date == SKIP
|
|
265
|
+
@face_value = face_value unless face_value == SKIP
|
|
266
|
+
@fi_asset_classes = fi_asset_classes unless fi_asset_classes == SKIP
|
|
267
|
+
@fi_attributes = fi_attributes unless fi_attributes == SKIP
|
|
268
|
+
@held_in_account = held_in_account unless held_in_account == SKIP
|
|
269
|
+
@holding_id = holding_id unless holding_id == SKIP
|
|
270
|
+
@holding_name = holding_name unless holding_name == SKIP
|
|
271
|
+
@holding_sub_type = holding_sub_type unless holding_sub_type == SKIP
|
|
272
|
+
@holding_type = holding_type unless holding_type == SKIP
|
|
273
|
+
@inv401k_surce = inv401k_surce unless inv401k_surce == SKIP
|
|
274
|
+
@market_value = market_value unless market_value == SKIP
|
|
275
|
+
@original_purchase_date = original_purchase_date unless original_purchase_date == SKIP
|
|
276
|
+
@position_type = position_type unless position_type == SKIP
|
|
277
|
+
@purchased_price = purchased_price unless purchased_price == SKIP
|
|
278
|
+
@rate = rate unless rate == SKIP
|
|
279
|
+
@security_id = security_id unless security_id == SKIP
|
|
280
|
+
@security_id_type = security_id_type unless security_id_type == SKIP
|
|
281
|
+
@symbol = symbol unless symbol == SKIP
|
|
282
|
+
@tax_lots = tax_lots unless tax_lots == SKIP
|
|
283
|
+
@units = units unless units == SKIP
|
|
284
|
+
@mutual_fund_security = mutual_fund_security unless mutual_fund_security == SKIP
|
|
285
|
+
@option_security = option_security unless option_security == SKIP
|
|
286
|
+
@other_security = other_security unless other_security == SKIP
|
|
287
|
+
@stock_security = stock_security unless stock_security == SKIP
|
|
288
|
+
@sweep_security = sweep_security unless sweep_security == SKIP
|
|
289
|
+
@debt_security = debt_security unless debt_security == SKIP
|
|
290
|
+
@additional_properties = additional_properties
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Creates an instance of the object from a hash.
|
|
294
|
+
def self.from_hash(hash)
|
|
295
|
+
return nil unless hash
|
|
296
|
+
|
|
297
|
+
# Extract variables from the hash.
|
|
298
|
+
# Parameter is an array, so we need to iterate through it
|
|
299
|
+
asset_classes = nil
|
|
300
|
+
unless hash['assetClasses'].nil?
|
|
301
|
+
asset_classes = []
|
|
302
|
+
hash['assetClasses'].each do |structure|
|
|
303
|
+
asset_classes << (AssetClassAnInvestmentHolding.from_hash(structure) if structure)
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
asset_classes = SKIP unless hash.key?('assetClasses')
|
|
308
|
+
average_cost = hash.key?('averageCost') ? hash['averageCost'] : SKIP
|
|
309
|
+
cash_account = hash.key?('cashAccount') ? hash['cashAccount'] : SKIP
|
|
310
|
+
change_in_price =
|
|
311
|
+
hash.key?('changeInPrice') ? hash['changeInPrice'] : SKIP
|
|
312
|
+
currency = CurrencyEntity.from_hash(hash['currency']) if hash['currency']
|
|
313
|
+
current_unit_price =
|
|
314
|
+
hash.key?('currentUnitPrice') ? hash['currentUnitPrice'] : SKIP
|
|
315
|
+
current_unit_price_date = if hash.key?('currentUnitPriceDate')
|
|
316
|
+
(DateTimeHelper.from_rfc3339(hash['currentUnitPriceDate']) if hash['currentUnitPriceDate'])
|
|
317
|
+
else
|
|
318
|
+
SKIP
|
|
319
|
+
end
|
|
320
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
321
|
+
expiration_date = if hash.key?('expirationDate')
|
|
322
|
+
(DateTimeHelper.from_rfc3339(hash['expirationDate']) if hash['expirationDate'])
|
|
323
|
+
else
|
|
324
|
+
SKIP
|
|
325
|
+
end
|
|
326
|
+
face_value = hash.key?('faceValue') ? hash['faceValue'] : SKIP
|
|
327
|
+
# Parameter is an array, so we need to iterate through it
|
|
328
|
+
fi_asset_classes = nil
|
|
329
|
+
unless hash['fiAssetClasses'].nil?
|
|
330
|
+
fi_asset_classes = []
|
|
331
|
+
hash['fiAssetClasses'].each do |structure|
|
|
332
|
+
fi_asset_classes << (FiAssetClassAnInvestmentHolding.from_hash(structure) if structure)
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
fi_asset_classes = SKIP unless hash.key?('fiAssetClasses')
|
|
337
|
+
# Parameter is an array, so we need to iterate through it
|
|
338
|
+
fi_attributes = nil
|
|
339
|
+
unless hash['fiAttributes'].nil?
|
|
340
|
+
fi_attributes = []
|
|
341
|
+
hash['fiAttributes'].each do |structure|
|
|
342
|
+
fi_attributes << (FiAttributeEntity.from_hash(structure) if structure)
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
fi_attributes = SKIP unless hash.key?('fiAttributes')
|
|
347
|
+
held_in_account =
|
|
348
|
+
hash.key?('heldInAccount') ? hash['heldInAccount'] : SKIP
|
|
349
|
+
holding_id = hash.key?('holdingId') ? hash['holdingId'] : SKIP
|
|
350
|
+
holding_name = hash.key?('holdingName') ? hash['holdingName'] : SKIP
|
|
351
|
+
holding_sub_type =
|
|
352
|
+
hash.key?('holdingSubType') ? hash['holdingSubType'] : SKIP
|
|
353
|
+
holding_type = hash.key?('holdingType') ? hash['holdingType'] : SKIP
|
|
354
|
+
inv401k_surce = hash.key?('inv401kSurce') ? hash['inv401kSurce'] : SKIP
|
|
355
|
+
market_value = hash.key?('marketValue') ? hash['marketValue'] : SKIP
|
|
356
|
+
original_purchase_date = if hash.key?('originalPurchaseDate')
|
|
357
|
+
(DateTimeHelper.from_rfc3339(hash['originalPurchaseDate']) if hash['originalPurchaseDate'])
|
|
358
|
+
else
|
|
359
|
+
SKIP
|
|
360
|
+
end
|
|
361
|
+
position_type = hash.key?('positionType') ? hash['positionType'] : SKIP
|
|
362
|
+
purchased_price =
|
|
363
|
+
hash.key?('purchasedPrice') ? hash['purchasedPrice'] : SKIP
|
|
364
|
+
rate = hash.key?('rate') ? hash['rate'] : SKIP
|
|
365
|
+
security_id = hash.key?('securityId') ? hash['securityId'] : SKIP
|
|
366
|
+
security_id_type =
|
|
367
|
+
hash.key?('securityIdType') ? hash['securityIdType'] : SKIP
|
|
368
|
+
symbol = hash.key?('symbol') ? hash['symbol'] : SKIP
|
|
369
|
+
# Parameter is an array, so we need to iterate through it
|
|
370
|
+
tax_lots = nil
|
|
371
|
+
unless hash['taxLots'].nil?
|
|
372
|
+
tax_lots = []
|
|
373
|
+
hash['taxLots'].each do |structure|
|
|
374
|
+
tax_lots << (TaxLotAnInvestmentHolding.from_hash(structure) if structure)
|
|
375
|
+
end
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
tax_lots = SKIP unless hash.key?('taxLots')
|
|
379
|
+
units = hash.key?('units') ? hash['units'] : SKIP
|
|
380
|
+
mutual_fund_security = MutualFundSecurityEntity.from_hash(hash['mutualFundSecurity']) if
|
|
381
|
+
hash['mutualFundSecurity']
|
|
382
|
+
option_security = OptionSecurityEntity.from_hash(hash['optionSecurity']) if
|
|
383
|
+
hash['optionSecurity']
|
|
384
|
+
other_security = OtherSecurityEntity.from_hash(hash['otherSecurity']) if
|
|
385
|
+
hash['otherSecurity']
|
|
386
|
+
stock_security = StockSecurityEntity.from_hash(hash['stockSecurity']) if
|
|
387
|
+
hash['stockSecurity']
|
|
388
|
+
sweep_security = SweepSecurityEntity.from_hash(hash['sweepSecurity']) if
|
|
389
|
+
hash['sweepSecurity']
|
|
390
|
+
debt_security = DebtSecurityEntity.from_hash(hash['debtSecurity']) if hash['debtSecurity']
|
|
391
|
+
|
|
392
|
+
# Create a new hash for additional properties, removing known properties.
|
|
393
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
394
|
+
|
|
395
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
396
|
+
new_hash, proc { |value| value }
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
# Create object from extracted values.
|
|
400
|
+
AnInvestmentHolding.new(asset_classes: asset_classes,
|
|
401
|
+
average_cost: average_cost,
|
|
402
|
+
cash_account: cash_account,
|
|
403
|
+
change_in_price: change_in_price,
|
|
404
|
+
currency: currency,
|
|
405
|
+
current_unit_price: current_unit_price,
|
|
406
|
+
current_unit_price_date: current_unit_price_date,
|
|
407
|
+
description: description,
|
|
408
|
+
expiration_date: expiration_date,
|
|
409
|
+
face_value: face_value,
|
|
410
|
+
fi_asset_classes: fi_asset_classes,
|
|
411
|
+
fi_attributes: fi_attributes,
|
|
412
|
+
held_in_account: held_in_account,
|
|
413
|
+
holding_id: holding_id,
|
|
414
|
+
holding_name: holding_name,
|
|
415
|
+
holding_sub_type: holding_sub_type,
|
|
416
|
+
holding_type: holding_type,
|
|
417
|
+
inv401k_surce: inv401k_surce,
|
|
418
|
+
market_value: market_value,
|
|
419
|
+
original_purchase_date: original_purchase_date,
|
|
420
|
+
position_type: position_type,
|
|
421
|
+
purchased_price: purchased_price,
|
|
422
|
+
rate: rate,
|
|
423
|
+
security_id: security_id,
|
|
424
|
+
security_id_type: security_id_type,
|
|
425
|
+
symbol: symbol,
|
|
426
|
+
tax_lots: tax_lots,
|
|
427
|
+
units: units,
|
|
428
|
+
mutual_fund_security: mutual_fund_security,
|
|
429
|
+
option_security: option_security,
|
|
430
|
+
other_security: other_security,
|
|
431
|
+
stock_security: stock_security,
|
|
432
|
+
sweep_security: sweep_security,
|
|
433
|
+
debt_security: debt_security,
|
|
434
|
+
additional_properties: additional_properties)
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
def to_custom_current_unit_price_date
|
|
438
|
+
DateTimeHelper.to_rfc3339(current_unit_price_date)
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
def to_custom_expiration_date
|
|
442
|
+
DateTimeHelper.to_rfc3339(expiration_date)
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
def to_custom_original_purchase_date
|
|
446
|
+
DateTimeHelper.to_rfc3339(original_purchase_date)
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Provides a human-readable string representation of the object.
|
|
450
|
+
def to_s
|
|
451
|
+
class_name = self.class.name.split('::').last
|
|
452
|
+
"<#{class_name} asset_classes: #{@asset_classes}, average_cost: #{@average_cost},"\
|
|
453
|
+
" cash_account: #{@cash_account}, change_in_price: #{@change_in_price}, currency:"\
|
|
454
|
+
" #{@currency}, current_unit_price: #{@current_unit_price}, current_unit_price_date:"\
|
|
455
|
+
" #{@current_unit_price_date}, description: #{@description}, expiration_date:"\
|
|
456
|
+
" #{@expiration_date}, face_value: #{@face_value}, fi_asset_classes: #{@fi_asset_classes},"\
|
|
457
|
+
" fi_attributes: #{@fi_attributes}, held_in_account: #{@held_in_account}, holding_id:"\
|
|
458
|
+
" #{@holding_id}, holding_name: #{@holding_name}, holding_sub_type: #{@holding_sub_type},"\
|
|
459
|
+
" holding_type: #{@holding_type}, inv401k_surce: #{@inv401k_surce}, market_value:"\
|
|
460
|
+
" #{@market_value}, original_purchase_date: #{@original_purchase_date}, position_type:"\
|
|
461
|
+
" #{@position_type}, purchased_price: #{@purchased_price}, rate: #{@rate}, security_id:"\
|
|
462
|
+
" #{@security_id}, security_id_type: #{@security_id_type}, symbol: #{@symbol}, tax_lots:"\
|
|
463
|
+
" #{@tax_lots}, units: #{@units}, mutual_fund_security: #{@mutual_fund_security},"\
|
|
464
|
+
" option_security: #{@option_security}, other_security: #{@other_security}, stock_security:"\
|
|
465
|
+
" #{@stock_security}, sweep_security: #{@sweep_security}, debt_security: #{@debt_security},"\
|
|
466
|
+
" additional_properties: #{@additional_properties}>"
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
470
|
+
def inspect
|
|
471
|
+
class_name = self.class.name.split('::').last
|
|
472
|
+
"<#{class_name} asset_classes: #{@asset_classes.inspect}, average_cost:"\
|
|
473
|
+
" #{@average_cost.inspect}, cash_account: #{@cash_account.inspect}, change_in_price:"\
|
|
474
|
+
" #{@change_in_price.inspect}, currency: #{@currency.inspect}, current_unit_price:"\
|
|
475
|
+
" #{@current_unit_price.inspect}, current_unit_price_date:"\
|
|
476
|
+
" #{@current_unit_price_date.inspect}, description: #{@description.inspect},"\
|
|
477
|
+
" expiration_date: #{@expiration_date.inspect}, face_value: #{@face_value.inspect},"\
|
|
478
|
+
" fi_asset_classes: #{@fi_asset_classes.inspect}, fi_attributes: #{@fi_attributes.inspect},"\
|
|
479
|
+
" held_in_account: #{@held_in_account.inspect}, holding_id: #{@holding_id.inspect},"\
|
|
480
|
+
" holding_name: #{@holding_name.inspect}, holding_sub_type: #{@holding_sub_type.inspect},"\
|
|
481
|
+
" holding_type: #{@holding_type.inspect}, inv401k_surce: #{@inv401k_surce.inspect},"\
|
|
482
|
+
" market_value: #{@market_value.inspect}, original_purchase_date:"\
|
|
483
|
+
" #{@original_purchase_date.inspect}, position_type: #{@position_type.inspect},"\
|
|
484
|
+
" purchased_price: #{@purchased_price.inspect}, rate: #{@rate.inspect}, security_id:"\
|
|
485
|
+
" #{@security_id.inspect}, security_id_type: #{@security_id_type.inspect}, symbol:"\
|
|
486
|
+
" #{@symbol.inspect}, tax_lots: #{@tax_lots.inspect}, units: #{@units.inspect},"\
|
|
487
|
+
" mutual_fund_security: #{@mutual_fund_security.inspect}, option_security:"\
|
|
488
|
+
" #{@option_security.inspect}, other_security: #{@other_security.inspect}, stock_security:"\
|
|
489
|
+
" #{@stock_security.inspect}, sweep_security: #{@sweep_security.inspect}, debt_security:"\
|
|
490
|
+
" #{@debt_security.inspect}, additional_properties: #{@additional_properties}>"
|
|
491
|
+
end
|
|
492
|
+
end
|
|
493
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# AnnualIncreaseType.
|
|
8
|
+
class AnnualIncreaseType
|
|
9
|
+
ANNUAL_INCREASE_TYPE = [
|
|
10
|
+
# TODO: Write general description for FIXED
|
|
11
|
+
FIXED = 'FIXED'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for PERCENT
|
|
14
|
+
PERCENT = 'PERCENT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for DOLLAR
|
|
17
|
+
DOLLAR = 'DOLLAR'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
true
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = FIXED)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'fixed' then FIXED
|
|
33
|
+
when 'percent' then PERCENT
|
|
34
|
+
when 'dollar' then DOLLAR
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|