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,127 @@
|
|
|
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 the option security specific to the type of security
|
|
9
|
+
class OptionSecurityEntity < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# How the option is secured
|
|
14
|
+
# @return [Secured]
|
|
15
|
+
attr_accessor :secured
|
|
16
|
+
|
|
17
|
+
# How the option is secured
|
|
18
|
+
# @return [OptionType]
|
|
19
|
+
attr_accessor :option_type
|
|
20
|
+
|
|
21
|
+
# Strike price / Unit price
|
|
22
|
+
# @return [Float]
|
|
23
|
+
attr_accessor :strike_price
|
|
24
|
+
|
|
25
|
+
# Expiration date of option
|
|
26
|
+
# @return [DateTime]
|
|
27
|
+
attr_accessor :expire_date
|
|
28
|
+
|
|
29
|
+
# Shares per contract
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :shares_per_contract
|
|
32
|
+
|
|
33
|
+
# A mapping from model property names to API property names.
|
|
34
|
+
def self.names
|
|
35
|
+
@_hash = {} if @_hash.nil?
|
|
36
|
+
@_hash['secured'] = 'secured'
|
|
37
|
+
@_hash['option_type'] = 'optionType'
|
|
38
|
+
@_hash['strike_price'] = 'strikePrice'
|
|
39
|
+
@_hash['expire_date'] = 'expireDate'
|
|
40
|
+
@_hash['shares_per_contract'] = 'sharesPerContract'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
secured
|
|
48
|
+
option_type
|
|
49
|
+
strike_price
|
|
50
|
+
expire_date
|
|
51
|
+
shares_per_contract
|
|
52
|
+
]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# An array for nullable fields
|
|
56
|
+
def self.nullables
|
|
57
|
+
[]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def initialize(secured: SKIP, option_type: SKIP, strike_price: SKIP,
|
|
61
|
+
expire_date: SKIP, shares_per_contract: SKIP,
|
|
62
|
+
additional_properties: nil)
|
|
63
|
+
# Add additional model properties to the instance
|
|
64
|
+
additional_properties = {} if additional_properties.nil?
|
|
65
|
+
|
|
66
|
+
@secured = secured unless secured == SKIP
|
|
67
|
+
@option_type = option_type unless option_type == SKIP
|
|
68
|
+
@strike_price = strike_price unless strike_price == SKIP
|
|
69
|
+
@expire_date = expire_date unless expire_date == SKIP
|
|
70
|
+
@shares_per_contract = shares_per_contract unless shares_per_contract == SKIP
|
|
71
|
+
@additional_properties = additional_properties
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Creates an instance of the object from a hash.
|
|
75
|
+
def self.from_hash(hash)
|
|
76
|
+
return nil unless hash
|
|
77
|
+
|
|
78
|
+
# Extract variables from the hash.
|
|
79
|
+
secured = hash.key?('secured') ? hash['secured'] : SKIP
|
|
80
|
+
option_type = hash.key?('optionType') ? hash['optionType'] : SKIP
|
|
81
|
+
strike_price = hash.key?('strikePrice') ? hash['strikePrice'] : SKIP
|
|
82
|
+
expire_date = if hash.key?('expireDate')
|
|
83
|
+
(DateTimeHelper.from_rfc3339(hash['expireDate']) if hash['expireDate'])
|
|
84
|
+
else
|
|
85
|
+
SKIP
|
|
86
|
+
end
|
|
87
|
+
shares_per_contract =
|
|
88
|
+
hash.key?('sharesPerContract') ? hash['sharesPerContract'] : SKIP
|
|
89
|
+
|
|
90
|
+
# Create a new hash for additional properties, removing known properties.
|
|
91
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
92
|
+
|
|
93
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
94
|
+
new_hash, proc { |value| value }
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# Create object from extracted values.
|
|
98
|
+
OptionSecurityEntity.new(secured: secured,
|
|
99
|
+
option_type: option_type,
|
|
100
|
+
strike_price: strike_price,
|
|
101
|
+
expire_date: expire_date,
|
|
102
|
+
shares_per_contract: shares_per_contract,
|
|
103
|
+
additional_properties: additional_properties)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def to_custom_expire_date
|
|
107
|
+
DateTimeHelper.to_rfc3339(expire_date)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Provides a human-readable string representation of the object.
|
|
111
|
+
def to_s
|
|
112
|
+
class_name = self.class.name.split('::').last
|
|
113
|
+
"<#{class_name} secured: #{@secured}, option_type: #{@option_type}, strike_price:"\
|
|
114
|
+
" #{@strike_price}, expire_date: #{@expire_date}, shares_per_contract:"\
|
|
115
|
+
" #{@shares_per_contract}, additional_properties: #{@additional_properties}>"
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
119
|
+
def inspect
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} secured: #{@secured.inspect}, option_type: #{@option_type.inspect},"\
|
|
122
|
+
" strike_price: #{@strike_price.inspect}, expire_date: #{@expire_date.inspect},"\
|
|
123
|
+
" shares_per_contract: #{@shares_per_contract.inspect}, additional_properties:"\
|
|
124
|
+
" #{@additional_properties}>"
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
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
|
+
# OptionType.
|
|
8
|
+
class OptionType
|
|
9
|
+
OPTION_TYPE = [
|
|
10
|
+
# TODO: Write general description for CALL
|
|
11
|
+
CALL = 'CALL'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for PUT
|
|
14
|
+
PUT = 'PUT'.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 = CALL)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'call' then CALL
|
|
30
|
+
when 'put' then PUT
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
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
|
+
# This order is good for DAY, GOODTILLCANCEL, IMMEDIATE
|
|
8
|
+
class OrderDuration
|
|
9
|
+
ORDER_DURATION = [
|
|
10
|
+
# TODO: Write general description for DAY
|
|
11
|
+
DAY = 'DAY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for GOODTILLCANCEL
|
|
14
|
+
GOODTILLCANCEL = 'GOODTILLCANCEL'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for IMMEDIATE
|
|
17
|
+
IMMEDIATE = 'IMMEDIATE'.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 = DAY)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'day' then DAY
|
|
33
|
+
when 'goodtillcancel' then GOODTILLCANCEL
|
|
34
|
+
when 'immediate' then IMMEDIATE
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# Type of order.
|
|
8
|
+
class OrderType
|
|
9
|
+
ORDER_TYPE = [
|
|
10
|
+
# TODO: Write general description for BUY
|
|
11
|
+
BUY = 'BUY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SELL
|
|
14
|
+
SELL = 'SELL'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for BUYTOCOVER
|
|
17
|
+
BUYTOCOVER = 'BUYTOCOVER'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for BUYTOOPEN
|
|
20
|
+
BUYTOOPEN = 'BUYTOOPEN'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for SELLTOCOVER
|
|
23
|
+
SELLTOCOVER = 'SELLTOCOVER'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for SELLTOOPEN
|
|
26
|
+
SELLTOOPEN = 'SELLTOOPEN'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for SELLSHORT
|
|
29
|
+
SELLSHORT = 'SELLSHORT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for SELLCLOSE
|
|
32
|
+
SELLCLOSE = 'SELLCLOSE'.freeze
|
|
33
|
+
].freeze
|
|
34
|
+
|
|
35
|
+
def self.validate(value)
|
|
36
|
+
return false if value.nil?
|
|
37
|
+
|
|
38
|
+
true
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def self.from_value(value, default_value = BUY)
|
|
42
|
+
return default_value if value.nil?
|
|
43
|
+
|
|
44
|
+
str = value.to_s.strip
|
|
45
|
+
|
|
46
|
+
case str.downcase
|
|
47
|
+
when 'buy' then BUY
|
|
48
|
+
when 'sell' then SELL
|
|
49
|
+
when 'buytocover' then BUYTOCOVER
|
|
50
|
+
when 'buytoopen' then BUYTOOPEN
|
|
51
|
+
when 'selltocover' then SELLTOCOVER
|
|
52
|
+
when 'selltoopen' then SELLTOOPEN
|
|
53
|
+
when 'sellshort' then SELLSHORT
|
|
54
|
+
when 'sellclose' then SELLCLOSE
|
|
55
|
+
else
|
|
56
|
+
default_value
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# Information about the security specific to the type of security
|
|
8
|
+
class OtherSecurityEntity < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Description of Other Security
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :type_description
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['type_description'] = 'typeDescription'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
type_description
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(type_description: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@type_description = type_description unless type_description == 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
|
+
type_description =
|
|
49
|
+
hash.key?('typeDescription') ? hash['typeDescription'] : SKIP
|
|
50
|
+
|
|
51
|
+
# Create a new hash for additional properties, removing known properties.
|
|
52
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
53
|
+
|
|
54
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
55
|
+
new_hash, proc { |value| value }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
OtherSecurityEntity.new(type_description: type_description,
|
|
60
|
+
additional_properties: additional_properties)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Provides a human-readable string representation of the object.
|
|
64
|
+
def to_s
|
|
65
|
+
class_name = self.class.name.split('::').last
|
|
66
|
+
"<#{class_name} type_description: #{@type_description}, additional_properties:"\
|
|
67
|
+
" #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} type_description: #{@type_description.inspect}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# PaginatedArray Model.
|
|
8
|
+
class PaginatedArray < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Links]
|
|
14
|
+
attr_accessor :links
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['links'] = 'links'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
links
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(links: SKIP, additional_properties: nil)
|
|
36
|
+
# Add additional model properties to the instance
|
|
37
|
+
additional_properties = {} if additional_properties.nil?
|
|
38
|
+
|
|
39
|
+
@links = links unless links == 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
|
+
links = Links.from_hash(hash['links']) if hash['links']
|
|
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
|
+
PaginatedArray.new(links: links,
|
|
59
|
+
additional_properties: additional_properties)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a human-readable string representation of the object.
|
|
63
|
+
def to_s
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} links: #{@links}, additional_properties: #{@additional_properties}>"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
69
|
+
def inspect
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} links: #{@links.inspect}, additional_properties:"\
|
|
72
|
+
" #{@additional_properties}>"
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# Payment details for some transactions
|
|
8
|
+
class PaymentDetails < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The amount of payment applied to escrow
|
|
13
|
+
# @return [Float]
|
|
14
|
+
attr_accessor :escrow_amount
|
|
15
|
+
|
|
16
|
+
# The amount of payment applied to fees
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :fees_amount
|
|
19
|
+
|
|
20
|
+
# The amount of payment applied to life/health/accident insurance on the
|
|
21
|
+
# loan
|
|
22
|
+
# @return [Float]
|
|
23
|
+
attr_accessor :insurance_amount
|
|
24
|
+
|
|
25
|
+
# The amount of payment applied to interest
|
|
26
|
+
# @return [Float]
|
|
27
|
+
attr_accessor :interest_amount
|
|
28
|
+
|
|
29
|
+
# The amount of payment applied to PMI
|
|
30
|
+
# @return [Float]
|
|
31
|
+
attr_accessor :pmi_amount
|
|
32
|
+
|
|
33
|
+
# The amount of payment applied to principal
|
|
34
|
+
# @return [Float]
|
|
35
|
+
attr_accessor :principal_amount
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['escrow_amount'] = 'escrowAmount'
|
|
41
|
+
@_hash['fees_amount'] = 'feesAmount'
|
|
42
|
+
@_hash['insurance_amount'] = 'insuranceAmount'
|
|
43
|
+
@_hash['interest_amount'] = 'interestAmount'
|
|
44
|
+
@_hash['pmi_amount'] = 'pmiAmount'
|
|
45
|
+
@_hash['principal_amount'] = 'principalAmount'
|
|
46
|
+
@_hash
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# An array for optional fields
|
|
50
|
+
def self.optionals
|
|
51
|
+
%w[
|
|
52
|
+
escrow_amount
|
|
53
|
+
fees_amount
|
|
54
|
+
insurance_amount
|
|
55
|
+
interest_amount
|
|
56
|
+
pmi_amount
|
|
57
|
+
principal_amount
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(escrow_amount: SKIP, fees_amount: SKIP,
|
|
67
|
+
insurance_amount: SKIP, interest_amount: SKIP,
|
|
68
|
+
pmi_amount: SKIP, principal_amount: SKIP,
|
|
69
|
+
additional_properties: nil)
|
|
70
|
+
# Add additional model properties to the instance
|
|
71
|
+
additional_properties = {} if additional_properties.nil?
|
|
72
|
+
|
|
73
|
+
@escrow_amount = escrow_amount unless escrow_amount == SKIP
|
|
74
|
+
@fees_amount = fees_amount unless fees_amount == SKIP
|
|
75
|
+
@insurance_amount = insurance_amount unless insurance_amount == SKIP
|
|
76
|
+
@interest_amount = interest_amount unless interest_amount == SKIP
|
|
77
|
+
@pmi_amount = pmi_amount unless pmi_amount == SKIP
|
|
78
|
+
@principal_amount = principal_amount unless principal_amount == 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
|
+
escrow_amount = hash.key?('escrowAmount') ? hash['escrowAmount'] : SKIP
|
|
88
|
+
fees_amount = hash.key?('feesAmount') ? hash['feesAmount'] : SKIP
|
|
89
|
+
insurance_amount =
|
|
90
|
+
hash.key?('insuranceAmount') ? hash['insuranceAmount'] : SKIP
|
|
91
|
+
interest_amount =
|
|
92
|
+
hash.key?('interestAmount') ? hash['interestAmount'] : SKIP
|
|
93
|
+
pmi_amount = hash.key?('pmiAmount') ? hash['pmiAmount'] : SKIP
|
|
94
|
+
principal_amount =
|
|
95
|
+
hash.key?('principalAmount') ? hash['principalAmount'] : SKIP
|
|
96
|
+
|
|
97
|
+
# Create a new hash for additional properties, removing known properties.
|
|
98
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
99
|
+
|
|
100
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
101
|
+
new_hash, proc { |value| value }
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# Create object from extracted values.
|
|
105
|
+
PaymentDetails.new(escrow_amount: escrow_amount,
|
|
106
|
+
fees_amount: fees_amount,
|
|
107
|
+
insurance_amount: insurance_amount,
|
|
108
|
+
interest_amount: interest_amount,
|
|
109
|
+
pmi_amount: pmi_amount,
|
|
110
|
+
principal_amount: principal_amount,
|
|
111
|
+
additional_properties: additional_properties)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Validates an instance of the object from a given value.
|
|
115
|
+
# @param [PaymentDetails | Hash] The value against the validation is performed.
|
|
116
|
+
def self.validate(value)
|
|
117
|
+
return true if value.instance_of? self
|
|
118
|
+
|
|
119
|
+
return false unless value.instance_of? Hash
|
|
120
|
+
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Provides a human-readable string representation of the object.
|
|
125
|
+
def to_s
|
|
126
|
+
class_name = self.class.name.split('::').last
|
|
127
|
+
"<#{class_name} escrow_amount: #{@escrow_amount}, fees_amount: #{@fees_amount},"\
|
|
128
|
+
" insurance_amount: #{@insurance_amount}, interest_amount: #{@interest_amount}, pmi_amount:"\
|
|
129
|
+
" #{@pmi_amount}, principal_amount: #{@principal_amount}, additional_properties:"\
|
|
130
|
+
" #{@additional_properties}>"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
134
|
+
def inspect
|
|
135
|
+
class_name = self.class.name.split('::').last
|
|
136
|
+
"<#{class_name} escrow_amount: #{@escrow_amount.inspect}, fees_amount:"\
|
|
137
|
+
" #{@fees_amount.inspect}, insurance_amount: #{@insurance_amount.inspect}, interest_amount:"\
|
|
138
|
+
" #{@interest_amount.inspect}, pmi_amount: #{@pmi_amount.inspect}, principal_amount:"\
|
|
139
|
+
" #{@principal_amount.inspect}, additional_properties: #{@additional_properties}>"
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# akoya
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Akoya
|
|
7
|
+
# PaymentFrequency.
|
|
8
|
+
class PaymentFrequency
|
|
9
|
+
PAYMENT_FREQUENCY = [
|
|
10
|
+
# TODO: Write general description for DAILY
|
|
11
|
+
DAILY = 'DAILY'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for WEEKLY
|
|
14
|
+
WEEKLY = 'WEEKLY'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for BIWEEKLY
|
|
17
|
+
BIWEEKLY = 'BIWEEKLY'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for SEMIMONTHLY
|
|
20
|
+
SEMIMONTHLY = 'SEMIMONTHLY'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for MONTHLY
|
|
23
|
+
MONTHLY = 'MONTHLY'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for SEMIANNUALLY
|
|
26
|
+
SEMIANNUALLY = 'SEMIANNUALLY'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for ANNUALLY
|
|
29
|
+
ANNUALLY = 'ANNUALLY'.freeze
|
|
30
|
+
].freeze
|
|
31
|
+
|
|
32
|
+
def self.validate(value)
|
|
33
|
+
return false if value.nil?
|
|
34
|
+
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.from_value(value, default_value = DAILY)
|
|
39
|
+
return default_value if value.nil?
|
|
40
|
+
|
|
41
|
+
str = value.to_s.strip
|
|
42
|
+
|
|
43
|
+
case str.downcase
|
|
44
|
+
when 'daily' then DAILY
|
|
45
|
+
when 'weekly' then WEEKLY
|
|
46
|
+
when 'biweekly' then BIWEEKLY
|
|
47
|
+
when 'semimonthly' then SEMIMONTHLY
|
|
48
|
+
when 'monthly' then MONTHLY
|
|
49
|
+
when 'semiannually' then SEMIANNUALLY
|
|
50
|
+
when 'annually' then ANNUALLY
|
|
51
|
+
else
|
|
52
|
+
default_value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -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_AnnuityAccount.
|
|
8
|
+
class PaymentFrequencyAnnuityAccount
|
|
9
|
+
PAYMENT_FREQUENCY_ANNUITY_ACCOUNT = [
|
|
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
|