moneykit 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moneykit/api/access_token_api.rb +53 -55
- data/lib/moneykit/api/account_numbers_api.rb +24 -24
- data/lib/moneykit/api/accounts_api.rb +86 -80
- data/lib/moneykit/api/identity_api.rb +29 -28
- data/lib/moneykit/api/institutions_api.rb +50 -48
- data/lib/moneykit/api/link_session_api.rb +47 -50
- data/lib/moneykit/api/links_api.rb +74 -81
- data/lib/moneykit/api/products_api.rb +31 -33
- data/lib/moneykit/api/transactions_api.rb +112 -87
- data/lib/moneykit/api/users_api.rb +96 -79
- data/lib/moneykit/api_client.rb +64 -71
- data/lib/moneykit/api_error.rb +14 -16
- data/lib/moneykit/configuration.rb +42 -45
- data/lib/moneykit/models/account.rb +62 -78
- data/lib/moneykit/models/account_balances.rb +58 -63
- data/lib/moneykit/models/account_group.rb +47 -47
- data/lib/moneykit/models/account_identity.rb +69 -89
- data/lib/moneykit/models/account_numbers.rb +50 -49
- data/lib/moneykit/models/account_numbers_link_product.rb +52 -54
- data/lib/moneykit/models/account_numbers_product_settings.rb +49 -48
- data/lib/moneykit/models/account_type.rb +23 -23
- data/lib/moneykit/models/account_with_account_numbers.rb +68 -89
- data/lib/moneykit/models/accounts_link_product.rb +46 -46
- data/lib/moneykit/models/ach_number.rb +48 -49
- data/lib/moneykit/models/address.rb +66 -75
- data/lib/moneykit/models/api_error_auth_expired_access_token_response.rb +63 -62
- data/lib/moneykit/models/api_error_auth_unauthorized_response.rb +60 -62
- data/lib/moneykit/models/api_error_rate_limit_exceeded_response.rb +63 -62
- data/lib/moneykit/models/app.rb +46 -50
- data/lib/moneykit/models/bacs_number.rb +45 -46
- data/lib/moneykit/models/balances.rb +58 -64
- data/lib/moneykit/models/basic_account_details.rb +55 -61
- data/lib/moneykit/models/country.rb +13 -14
- data/lib/moneykit/models/create_link_session_request.rb +83 -96
- data/lib/moneykit/models/create_link_session_response.rb +40 -37
- data/lib/moneykit/models/currency.rb +193 -193
- data/lib/moneykit/models/cursor.rb +40 -39
- data/lib/moneykit/models/cursor_pagination.rb +40 -38
- data/lib/moneykit/models/cursors.rb +40 -39
- data/lib/moneykit/models/customer_app.rb +46 -49
- data/lib/moneykit/models/customer_user.rb +59 -69
- data/lib/moneykit/models/eft_number.rb +48 -52
- data/lib/moneykit/models/email.rb +46 -48
- data/lib/moneykit/models/email1.rb +50 -53
- data/lib/moneykit/models/exchange_token_request.rb +40 -37
- data/lib/moneykit/models/exchange_token_response.rb +46 -49
- data/lib/moneykit/models/generate_access_token_response.rb +51 -58
- data/lib/moneykit/models/get_account_numbers_response.rb +48 -53
- data/lib/moneykit/models/get_account_response.rb +47 -52
- data/lib/moneykit/models/get_accounts_response.rb +47 -50
- data/lib/moneykit/models/get_institutions_response.rb +47 -50
- data/lib/moneykit/models/get_transactions_response.rb +68 -87
- data/lib/moneykit/models/get_user_accounts_response.rb +42 -42
- data/lib/moneykit/models/get_user_links_response.rb +42 -42
- data/lib/moneykit/models/get_user_transactions_response.rb +64 -82
- data/lib/moneykit/models/http_validation_error.rb +68 -71
- data/lib/moneykit/models/identity.rb +49 -49
- data/lib/moneykit/models/identity_link_product.rb +52 -54
- data/lib/moneykit/models/identity_product_settings.rb +49 -48
- data/lib/moneykit/models/identity_response.rb +47 -50
- data/lib/moneykit/models/institution.rb +77 -96
- data/lib/moneykit/models/institution_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/institution_styling_response.rb +77 -93
- data/lib/moneykit/models/international_number.rb +46 -49
- data/lib/moneykit/models/introspect_client_response.rb +61 -73
- data/lib/moneykit/models/jwk_set.rb +41 -42
- data/lib/moneykit/models/link.rb +78 -100
- data/lib/moneykit/models/link1.rb +78 -100
- data/lib/moneykit/models/link2.rb +78 -100
- data/lib/moneykit/models/link3.rb +78 -100
- data/lib/moneykit/models/link4.rb +78 -100
- data/lib/moneykit/models/link_common.rb +78 -99
- data/lib/moneykit/models/link_error.rb +19 -19
- data/lib/moneykit/models/link_error_bad_state_response.rb +64 -72
- data/lib/moneykit/models/link_error_deleted_response.rb +63 -64
- data/lib/moneykit/models/link_error_forbidden_action_response.rb +60 -62
- data/lib/moneykit/models/link_error_not_found_response.rb +63 -64
- data/lib/moneykit/models/link_error_unauthorized_access_response.rb +63 -64
- data/lib/moneykit/models/link_permission_scope.rb +14 -15
- data/lib/moneykit/models/link_permissions.rb +43 -43
- data/lib/moneykit/models/link_products.rb +52 -63
- data/lib/moneykit/models/link_response.rb +90 -118
- data/lib/moneykit/models/link_session_customer_user.rb +58 -68
- data/lib/moneykit/models/link_session_customer_user_email.rb +50 -52
- data/lib/moneykit/models/link_session_customer_user_phone.rb +60 -67
- data/lib/moneykit/models/link_session_error_forbidden_config_response.rb +60 -62
- data/lib/moneykit/models/link_session_error_invalid_token_exchange.rb +60 -62
- data/lib/moneykit/models/link_session_setting_overrides.rb +61 -72
- data/lib/moneykit/models/link_state.rb +15 -16
- data/lib/moneykit/models/link_state_changed_webhook.rb +110 -134
- data/lib/moneykit/models/location_inner.rb +41 -46
- data/lib/moneykit/models/money_kit_env.rb +12 -13
- data/lib/moneykit/models/money_link_features.rb +49 -48
- data/lib/moneykit/models/moneylink_features.rb +50 -49
- data/lib/moneykit/models/numbers.rb +60 -73
- data/lib/moneykit/models/owner.rb +59 -72
- data/lib/moneykit/models/phone.rb +60 -68
- data/lib/moneykit/models/phone_number.rb +55 -59
- data/lib/moneykit/models/phone_number_type.rb +14 -15
- data/lib/moneykit/models/product.rb +14 -15
- data/lib/moneykit/models/products.rb +52 -64
- data/lib/moneykit/models/products1.rb +48 -56
- data/lib/moneykit/models/products_settings.rb +48 -55
- data/lib/moneykit/models/provider.rb +15 -16
- data/lib/moneykit/models/refresh_products_request.rb +43 -45
- data/lib/moneykit/models/requested_link_permission.rb +52 -60
- data/lib/moneykit/models/response401_disconnect_links_id_delete.rb +71 -77
- data/lib/moneykit/models/response401_exchange_token_link_session_exchange_token_post.rb +66 -72
- data/lib/moneykit/models/response401_get_account_links_id_accounts_account_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_account_numbers_links_id_accounts_numbers_get.rb +71 -77
- data/lib/moneykit/models/response401_get_accounts_links_id_accounts_get.rb +71 -77
- data/lib/moneykit/models/response401_get_identities_links_id_identity_get.rb +71 -77
- data/lib/moneykit/models/response401_get_institution_institutions_institution_id_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institution_styling_institutions_institution_id_styling_get.rb +66 -72
- data/lib/moneykit/models/response401_get_institutions_institutions_get.rb +66 -72
- data/lib/moneykit/models/response401_get_link_links_id_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_diff_links_id_transactions_sync_get.rb +71 -77
- data/lib/moneykit/models/response401_get_transactions_links_id_transactions_get.rb +71 -77
- data/lib/moneykit/models/response401_get_user_accounts_users_id_accounts_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_links_users_id_links_get.rb +66 -72
- data/lib/moneykit/models/response401_get_user_transactions_users_id_transactions_get.rb +66 -72
- data/lib/moneykit/models/response401_get_well_known_jwks_well_known_jwks_json_get.rb +66 -72
- data/lib/moneykit/models/response401_instrospect_client_auth_introspect_get.rb +66 -72
- data/lib/moneykit/models/response401_refresh_products_links_id_products_post.rb +71 -77
- data/lib/moneykit/models/response401_update_link_links_id_patch.rb +71 -77
- data/lib/moneykit/models/settings.rb +61 -73
- data/lib/moneykit/models/supported_version.rb +11 -12
- data/lib/moneykit/models/transaction.rb +87 -114
- data/lib/moneykit/models/transaction_diff.rb +54 -62
- data/lib/moneykit/models/transaction_sync_response.rb +57 -72
- data/lib/moneykit/models/transaction_type.rb +12 -13
- data/lib/moneykit/models/transaction_type_filter.rb +12 -13
- data/lib/moneykit/models/transactions.rb +58 -57
- data/lib/moneykit/models/transactions1.rb +55 -63
- data/lib/moneykit/models/transactions_link_product.rb +52 -54
- data/lib/moneykit/models/transactions_product_settings.rb +57 -56
- data/lib/moneykit/models/update_link_request.rb +53 -52
- data/lib/moneykit/models/user_accounts_out.rb +40 -40
- data/lib/moneykit/models/user_links_out.rb +40 -40
- data/lib/moneykit/models/user_transactions_paged_response.rb +40 -40
- data/lib/moneykit/models/validation_error.rb +53 -64
- data/lib/moneykit/version.rb +10 -12
- data/lib/moneykit.rb +9 -11
- data/lib/plaid_compatible/money_kit_plaid_compatible/api/plaid_api.rb +203 -207
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_client.rb +75 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/api_error.rb +19 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/configuration.rb +38 -40
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_balance.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_base.rb +71 -87
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_identity.rb +77 -98
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_subtype.rb +85 -86
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/account_type.rb +18 -19
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/accounts_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/address_data.rb +65 -69
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_numbers.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/auth_get_response.rb +61 -72
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/country_code.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/email.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/http_validation_error.rb +43 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request.rb +59 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_request_options.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/identity_get_response.rb +55 -60
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institution.rb +65 -71
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_request.rb +60 -61
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/institutions_get_by_id_response.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item.rb +85 -96
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_error_webhook.rb +65 -77
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_get_response.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_public_token_exchange_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_remove_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_investments.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_last_webhook.rb +50 -48
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_nullable.rb +55 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/item_status_transactions.rb +49 -47
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request.rb +100 -121
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_request_user.rb +66 -66
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/link_token_create_response.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_ach.rb +59 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_bacs.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_eft.rb +59 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/numbers_international.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/owner.rb +63 -73
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/personal_finance_category.rb +49 -50
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/phone_number.rb +54 -59
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error.rb +88 -103
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/plaid_error_type.rb +26 -27
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/products.rb +16 -17
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/removed_transaction.rb +43 -39
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transaction.rb +107 -134
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request.rb +69 -79
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_request_options.rb +66 -68
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_get_response.rb +65 -76
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_request.rb +55 -55
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_refresh_response.rb +44 -41
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request.rb +69 -75
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_request_options.rb +50 -46
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/transactions_sync_response.rb +72 -89
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/validation_error.rb +56 -65
- data/lib/plaid_compatible/money_kit_plaid_compatible/models/webhook_environment_values.rb +15 -16
- data/lib/plaid_compatible/money_kit_plaid_compatible/version.rb +13 -13
- data/lib/plaid_compatible/money_kit_plaid_compatible.rb +12 -12
- data/moneykit.gemspec +21 -25
- metadata +1 -1
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -25,8 +23,8 @@ module MoneyKit
|
|
25
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
24
|
def self.attribute_map
|
27
25
|
{
|
28
|
-
|
29
|
-
|
26
|
+
'address': :address,
|
27
|
+
'customer_verified_at': :customer_verified_at
|
30
28
|
}
|
31
29
|
end
|
32
30
|
|
@@ -38,56 +36,54 @@ module MoneyKit
|
|
38
36
|
# Attribute type mapping.
|
39
37
|
def self.openapi_types
|
40
38
|
{
|
41
|
-
|
42
|
-
|
39
|
+
'address': :String,
|
40
|
+
'customer_verified_at': :Time
|
43
41
|
}
|
44
42
|
end
|
45
43
|
|
46
44
|
# List of attributes with nullable: true
|
47
45
|
def self.openapi_nullable
|
48
46
|
Set.new([
|
49
|
-
|
50
|
-
|
47
|
+
:customer_verified_at
|
48
|
+
])
|
51
49
|
end
|
52
50
|
|
53
51
|
# List of class defined in allOf (OpenAPI v3)
|
54
52
|
def self.openapi_all_of
|
55
53
|
[
|
56
|
-
|
54
|
+
:LinkSessionCustomerUserEmail
|
57
55
|
]
|
58
56
|
end
|
59
57
|
|
60
58
|
# Initializes the object
|
61
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
62
60
|
def initialize(attributes = {})
|
63
|
-
|
64
|
-
|
61
|
+
unless attributes.is_a?(Hash)
|
62
|
+
raise ArgumentError, 'The input argument (attributes) must be a hash in `MoneyKit::Email1` initialize method'
|
65
63
|
end
|
66
64
|
|
67
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
-
attributes = attributes.each_with_object({})
|
69
|
-
|
70
|
-
|
66
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
67
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
68
|
+
raise ArgumentError,
|
69
|
+
"`#{k}` is not a valid attribute in `MoneyKit::Email1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
70
|
end
|
72
|
-
h[k.to_sym] = v
|
73
|
-
}
|
74
71
|
|
75
|
-
|
76
|
-
self.address = attributes[:'address']
|
72
|
+
h[k.to_sym] = v
|
77
73
|
end
|
78
74
|
|
79
|
-
if attributes.key?(:
|
80
|
-
|
81
|
-
|
75
|
+
self.address = attributes[:address] if attributes.key?(:address)
|
76
|
+
|
77
|
+
return unless attributes.key?(:customer_verified_at)
|
78
|
+
|
79
|
+
self.customer_verified_at = attributes[:customer_verified_at]
|
82
80
|
end
|
83
81
|
|
84
82
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
83
|
# @return Array for valid properties with the reasons
|
86
84
|
def list_invalid_properties
|
87
|
-
invalid_properties =
|
88
|
-
if @address.nil?
|
89
|
-
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
90
|
-
end
|
85
|
+
invalid_properties = []
|
86
|
+
invalid_properties.push('invalid value for "address", address cannot be nil.') if @address.nil?
|
91
87
|
|
92
88
|
if @address.to_s.length > 254
|
93
89
|
invalid_properties.push('invalid value for "address", the character length must be smaller than or equal to 254.')
|
@@ -112,27 +108,26 @@ module MoneyKit
|
|
112
108
|
return false if @address.to_s.length > 254
|
113
109
|
return false if @address.to_s.length < 4
|
114
110
|
return false if @address !~ Regexp.new(/[^@]+@[^@]+\.[^@]+/)
|
111
|
+
|
115
112
|
true
|
116
113
|
end
|
117
114
|
|
118
115
|
# Custom attribute writer method with validation
|
119
116
|
# @param [Object] address Value to be assigned
|
120
117
|
def address=(address)
|
121
|
-
if address.nil?
|
122
|
-
fail ArgumentError, 'address cannot be nil'
|
123
|
-
end
|
118
|
+
raise ArgumentError, 'address cannot be nil' if address.nil?
|
124
119
|
|
125
120
|
if address.to_s.length > 254
|
126
|
-
|
121
|
+
raise ArgumentError, 'invalid value for "address", the character length must be smaller than or equal to 254.'
|
127
122
|
end
|
128
123
|
|
129
124
|
if address.to_s.length < 4
|
130
|
-
|
125
|
+
raise ArgumentError, 'invalid value for "address", the character length must be great than or equal to 4.'
|
131
126
|
end
|
132
127
|
|
133
128
|
pattern = Regexp.new(/[^@]+@[^@]+\.[^@]+/)
|
134
129
|
if address !~ pattern
|
135
|
-
|
130
|
+
raise ArgumentError, "invalid value for \"address\", must conform to the pattern #{pattern}."
|
136
131
|
end
|
137
132
|
|
138
133
|
@address = address
|
@@ -140,17 +135,18 @@ module MoneyKit
|
|
140
135
|
|
141
136
|
# Checks equality by comparing each attribute.
|
142
137
|
# @param [Object] Object to be compared
|
143
|
-
def ==(
|
144
|
-
return true if
|
145
|
-
|
146
|
-
|
147
|
-
|
138
|
+
def ==(other)
|
139
|
+
return true if equal?(other)
|
140
|
+
|
141
|
+
self.class == other.class &&
|
142
|
+
address == other.address &&
|
143
|
+
customer_verified_at == other.customer_verified_at
|
148
144
|
end
|
149
145
|
|
150
146
|
# @see the `==` method
|
151
147
|
# @param [Object] Object to be compared
|
152
|
-
def eql?(
|
153
|
-
self ==
|
148
|
+
def eql?(other)
|
149
|
+
self == other
|
154
150
|
end
|
155
151
|
|
156
152
|
# Calculates hash code according to all attributes.
|
@@ -171,18 +167,21 @@ module MoneyKit
|
|
171
167
|
# @return [Object] Returns the model itself
|
172
168
|
def build_from_hash(attributes)
|
173
169
|
return nil unless attributes.is_a?(Hash)
|
170
|
+
|
174
171
|
attributes = attributes.transform_keys(&:to_sym)
|
175
172
|
self.class.openapi_types.each_pair do |key, type|
|
176
173
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
177
|
-
|
174
|
+
send("#{key}=", nil)
|
178
175
|
elsif type =~ /\AArray<(.*)>/i
|
179
176
|
# check to ensure the input is an array given that the attribute
|
180
177
|
# is documented as an array but the input is not
|
181
178
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
182
|
-
|
179
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
180
|
+
_deserialize(::Regexp.last_match(1), v)
|
181
|
+
end)
|
183
182
|
end
|
184
183
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
185
|
-
|
184
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
186
185
|
end
|
187
186
|
end
|
188
187
|
|
@@ -249,7 +248,7 @@ module MoneyKit
|
|
249
248
|
def to_hash
|
250
249
|
hash = {}
|
251
250
|
self.class.attribute_map.each_pair do |attr, param|
|
252
|
-
value =
|
251
|
+
value = send(attr)
|
253
252
|
if value.nil?
|
254
253
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
255
254
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -277,7 +276,5 @@ module MoneyKit
|
|
277
276
|
value
|
278
277
|
end
|
279
278
|
end
|
280
|
-
|
281
279
|
end
|
282
|
-
|
283
280
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -21,7 +19,7 @@ module MoneyKit
|
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
24
|
-
|
22
|
+
'exchangeable_token': :exchangeable_token
|
25
23
|
}
|
26
24
|
end
|
27
25
|
|
@@ -33,40 +31,42 @@ module MoneyKit
|
|
33
31
|
# Attribute type mapping.
|
34
32
|
def self.openapi_types
|
35
33
|
{
|
36
|
-
|
34
|
+
'exchangeable_token': :String
|
37
35
|
}
|
38
36
|
end
|
39
37
|
|
40
38
|
# List of attributes with nullable: true
|
41
39
|
def self.openapi_nullable
|
42
|
-
Set.new([
|
43
|
-
])
|
40
|
+
Set.new([])
|
44
41
|
end
|
45
42
|
|
46
43
|
# Initializes the object
|
47
44
|
# @param [Hash] attributes Model attributes in the form of hash
|
48
45
|
def initialize(attributes = {})
|
49
|
-
|
50
|
-
|
46
|
+
unless attributes.is_a?(Hash)
|
47
|
+
raise ArgumentError,
|
48
|
+
'The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenRequest` initialize method'
|
51
49
|
end
|
52
50
|
|
53
51
|
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
-
attributes = attributes.each_with_object({})
|
55
|
-
|
56
|
-
|
52
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
53
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
54
|
+
raise ArgumentError,
|
55
|
+
"`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
56
|
end
|
58
|
-
h[k.to_sym] = v
|
59
|
-
}
|
60
57
|
|
61
|
-
|
62
|
-
self.exchangeable_token = attributes[:'exchangeable_token']
|
58
|
+
h[k.to_sym] = v
|
63
59
|
end
|
60
|
+
|
61
|
+
return unless attributes.key?(:exchangeable_token)
|
62
|
+
|
63
|
+
self.exchangeable_token = attributes[:exchangeable_token]
|
64
64
|
end
|
65
65
|
|
66
66
|
# Show invalid properties with the reasons. Usually used together with valid?
|
67
67
|
# @return Array for valid properties with the reasons
|
68
68
|
def list_invalid_properties
|
69
|
-
invalid_properties =
|
69
|
+
invalid_properties = []
|
70
70
|
if @exchangeable_token.nil?
|
71
71
|
invalid_properties.push('invalid value for "exchangeable_token", exchangeable_token cannot be nil.')
|
72
72
|
end
|
@@ -78,21 +78,23 @@ module MoneyKit
|
|
78
78
|
# @return true if the model is valid
|
79
79
|
def valid?
|
80
80
|
return false if @exchangeable_token.nil?
|
81
|
+
|
81
82
|
true
|
82
83
|
end
|
83
84
|
|
84
85
|
# Checks equality by comparing each attribute.
|
85
86
|
# @param [Object] Object to be compared
|
86
|
-
def ==(
|
87
|
-
return true if
|
88
|
-
|
89
|
-
|
87
|
+
def ==(other)
|
88
|
+
return true if equal?(other)
|
89
|
+
|
90
|
+
self.class == other.class &&
|
91
|
+
exchangeable_token == other.exchangeable_token
|
90
92
|
end
|
91
93
|
|
92
94
|
# @see the `==` method
|
93
95
|
# @param [Object] Object to be compared
|
94
|
-
def eql?(
|
95
|
-
self ==
|
96
|
+
def eql?(other)
|
97
|
+
self == other
|
96
98
|
end
|
97
99
|
|
98
100
|
# Calculates hash code according to all attributes.
|
@@ -113,18 +115,21 @@ module MoneyKit
|
|
113
115
|
# @return [Object] Returns the model itself
|
114
116
|
def build_from_hash(attributes)
|
115
117
|
return nil unless attributes.is_a?(Hash)
|
118
|
+
|
116
119
|
attributes = attributes.transform_keys(&:to_sym)
|
117
120
|
self.class.openapi_types.each_pair do |key, type|
|
118
121
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
|
-
|
122
|
+
send("#{key}=", nil)
|
120
123
|
elsif type =~ /\AArray<(.*)>/i
|
121
124
|
# check to ensure the input is an array given that the attribute
|
122
125
|
# is documented as an array but the input is not
|
123
126
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
124
|
-
|
127
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
128
|
+
_deserialize(::Regexp.last_match(1), v)
|
129
|
+
end)
|
125
130
|
end
|
126
131
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
127
|
-
|
132
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
128
133
|
end
|
129
134
|
end
|
130
135
|
|
@@ -191,7 +196,7 @@ module MoneyKit
|
|
191
196
|
def to_hash
|
192
197
|
hash = {}
|
193
198
|
self.class.attribute_map.each_pair do |attr, param|
|
194
|
-
value =
|
199
|
+
value = send(attr)
|
195
200
|
if value.nil?
|
196
201
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
202
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -219,7 +224,5 @@ module MoneyKit
|
|
219
224
|
value
|
220
225
|
end
|
221
226
|
end
|
222
|
-
|
223
227
|
end
|
224
|
-
|
225
228
|
end
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=end
|
1
|
+
# #MoneyKit API
|
2
|
+
#
|
3
|
+
# No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 0.1.0
|
6
|
+
#
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 6.5.0
|
9
|
+
#
|
12
10
|
|
13
11
|
require 'date'
|
14
12
|
require 'time'
|
@@ -23,8 +21,8 @@ module MoneyKit
|
|
23
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
22
|
def self.attribute_map
|
25
23
|
{
|
26
|
-
|
27
|
-
|
24
|
+
'link_id': :link_id,
|
25
|
+
'link': :link
|
28
26
|
}
|
29
27
|
end
|
30
28
|
|
@@ -36,52 +34,48 @@ module MoneyKit
|
|
36
34
|
# Attribute type mapping.
|
37
35
|
def self.openapi_types
|
38
36
|
{
|
39
|
-
|
40
|
-
|
37
|
+
'link_id': :String,
|
38
|
+
'link': :Link
|
41
39
|
}
|
42
40
|
end
|
43
41
|
|
44
42
|
# List of attributes with nullable: true
|
45
43
|
def self.openapi_nullable
|
46
|
-
Set.new([
|
47
|
-
])
|
44
|
+
Set.new([])
|
48
45
|
end
|
49
46
|
|
50
47
|
# Initializes the object
|
51
48
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
49
|
def initialize(attributes = {})
|
53
|
-
|
54
|
-
|
50
|
+
unless attributes.is_a?(Hash)
|
51
|
+
raise ArgumentError,
|
52
|
+
'The input argument (attributes) must be a hash in `MoneyKit::ExchangeTokenResponse` initialize method'
|
55
53
|
end
|
56
54
|
|
57
55
|
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
-
attributes = attributes.each_with_object({})
|
59
|
-
|
60
|
-
|
56
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
57
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
58
|
+
raise ArgumentError,
|
59
|
+
"`#{k}` is not a valid attribute in `MoneyKit::ExchangeTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
60
|
end
|
62
|
-
h[k.to_sym] = v
|
63
|
-
}
|
64
61
|
|
65
|
-
|
66
|
-
self.link_id = attributes[:'link_id']
|
62
|
+
h[k.to_sym] = v
|
67
63
|
end
|
68
64
|
|
69
|
-
if attributes.key?(:
|
70
|
-
|
71
|
-
|
65
|
+
self.link_id = attributes[:link_id] if attributes.key?(:link_id)
|
66
|
+
|
67
|
+
return unless attributes.key?(:link)
|
68
|
+
|
69
|
+
self.link = attributes[:link]
|
72
70
|
end
|
73
71
|
|
74
72
|
# Show invalid properties with the reasons. Usually used together with valid?
|
75
73
|
# @return Array for valid properties with the reasons
|
76
74
|
def list_invalid_properties
|
77
|
-
invalid_properties =
|
78
|
-
if @link_id.nil?
|
79
|
-
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.')
|
80
|
-
end
|
75
|
+
invalid_properties = []
|
76
|
+
invalid_properties.push('invalid value for "link_id", link_id cannot be nil.') if @link_id.nil?
|
81
77
|
|
82
|
-
if @link.nil?
|
83
|
-
invalid_properties.push('invalid value for "link", link cannot be nil.')
|
84
|
-
end
|
78
|
+
invalid_properties.push('invalid value for "link", link cannot be nil.') if @link.nil?
|
85
79
|
|
86
80
|
invalid_properties
|
87
81
|
end
|
@@ -91,22 +85,24 @@ module MoneyKit
|
|
91
85
|
def valid?
|
92
86
|
return false if @link_id.nil?
|
93
87
|
return false if @link.nil?
|
88
|
+
|
94
89
|
true
|
95
90
|
end
|
96
91
|
|
97
92
|
# Checks equality by comparing each attribute.
|
98
93
|
# @param [Object] Object to be compared
|
99
|
-
def ==(
|
100
|
-
return true if
|
101
|
-
|
102
|
-
|
103
|
-
|
94
|
+
def ==(other)
|
95
|
+
return true if equal?(other)
|
96
|
+
|
97
|
+
self.class == other.class &&
|
98
|
+
link_id == other.link_id &&
|
99
|
+
link == other.link
|
104
100
|
end
|
105
101
|
|
106
102
|
# @see the `==` method
|
107
103
|
# @param [Object] Object to be compared
|
108
|
-
def eql?(
|
109
|
-
self ==
|
104
|
+
def eql?(other)
|
105
|
+
self == other
|
110
106
|
end
|
111
107
|
|
112
108
|
# Calculates hash code according to all attributes.
|
@@ -127,18 +123,21 @@ module MoneyKit
|
|
127
123
|
# @return [Object] Returns the model itself
|
128
124
|
def build_from_hash(attributes)
|
129
125
|
return nil unless attributes.is_a?(Hash)
|
126
|
+
|
130
127
|
attributes = attributes.transform_keys(&:to_sym)
|
131
128
|
self.class.openapi_types.each_pair do |key, type|
|
132
129
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
-
|
130
|
+
send("#{key}=", nil)
|
134
131
|
elsif type =~ /\AArray<(.*)>/i
|
135
132
|
# check to ensure the input is an array given that the attribute
|
136
133
|
# is documented as an array but the input is not
|
137
134
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
-
|
135
|
+
send("#{key}=", attributes[self.class.attribute_map[key]].map do |v|
|
136
|
+
_deserialize(::Regexp.last_match(1), v)
|
137
|
+
end)
|
139
138
|
end
|
140
139
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
-
|
140
|
+
send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
141
|
end
|
143
142
|
end
|
144
143
|
|
@@ -205,7 +204,7 @@ module MoneyKit
|
|
205
204
|
def to_hash
|
206
205
|
hash = {}
|
207
206
|
self.class.attribute_map.each_pair do |attr, param|
|
208
|
-
value =
|
207
|
+
value = send(attr)
|
209
208
|
if value.nil?
|
210
209
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
210
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
@@ -233,7 +232,5 @@ module MoneyKit
|
|
233
232
|
value
|
234
233
|
end
|
235
234
|
end
|
236
|
-
|
237
235
|
end
|
238
|
-
|
239
236
|
end
|