wallee-ruby-sdk 6.3.0 → 7.0.0
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 +4 -4
- data/Gemfile.lock +68 -19
- data/LICENSE +1 -1
- data/README.md +451 -108
- data/lib/wallee-ruby-sdk/api_client.rb +1 -1
- data/lib/wallee-ruby-sdk/models/abstract_o_auth_client_update.rb +340 -0
- data/lib/wallee-ruby-sdk/models/abstract_role_update.rb +13 -1
- data/lib/wallee-ruby-sdk/models/abstract_walleejoin_partnership.rb +330 -0
- data/lib/wallee-ruby-sdk/models/{payment_terminal_preparing.rb → account_create_with_owner.rb} +63 -34
- data/lib/wallee-ruby-sdk/models/authenticated_card_data_create.rb +30 -1
- data/lib/wallee-ruby-sdk/models/bank_payment_type.rb +50 -0
- data/lib/wallee-ruby-sdk/models/basic_address.rb +266 -0
- data/lib/wallee-ruby-sdk/models/boarding_strategy_information_request.rb +247 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_session_create.rb → charge_attempt_lookup_result.rb} +16 -20
- data/lib/wallee-ruby-sdk/models/charge_attempt_projection.rb +560 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_shipping_option.rb → create_fulfillment_request.rb} +25 -50
- data/lib/wallee-ruby-sdk/models/delivery_days_range.rb +60 -0
- data/lib/wallee-ruby-sdk/models/delivery_destination.rb +51 -0
- data/lib/wallee-ruby-sdk/models/dunning_case_level.rb +403 -0
- data/lib/wallee-ruby-sdk/models/dunning_case_level_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/dunning_case_level_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_session_state.rb → dunning_case_level_state.rb} +7 -7
- data/lib/wallee-ruby-sdk/models/extended_rest_o_auth_client.rb +425 -0
- data/lib/wallee-ruby-sdk/models/fulfillment.rb +428 -0
- data/lib/wallee-ruby-sdk/models/fulfillment_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/fulfillment_state.rb +52 -0
- data/lib/wallee-ruby-sdk/models/identity_info.rb +279 -0
- data/lib/wallee-ruby-sdk/models/invoice_processor.rb +51 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record.rb +633 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link.rb +278 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_rejection_status.rb +51 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_state.rb +53 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_wallet_type.rb → invoice_reconciliation_record_type.rb} +3 -3
- data/lib/wallee-ruby-sdk/models/invoice_reimbursement.rb +463 -0
- data/lib/wallee-ruby-sdk/models/invoice_reimbursement_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/invoice_reimbursement_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/invoice_reimbursement_state.rb +54 -0
- data/lib/wallee-ruby-sdk/models/legal_form.rb +83 -0
- data/lib/wallee-ruby-sdk/models/merchant_application_data_dto.rb +275 -0
- data/lib/wallee-ruby-sdk/models/merchant_application_state.rb +50 -0
- data/lib/wallee-ruby-sdk/models/merchant_application_status_dto.rb +284 -0
- data/lib/wallee-ruby-sdk/models/merchant_bank_details_dto.rb +253 -0
- data/lib/wallee-ruby-sdk/models/merchant_company_details_dto.rb +331 -0
- data/lib/wallee-ruby-sdk/models/merchant_contract_revenue_dto.rb +261 -0
- data/lib/wallee-ruby-sdk/models/merchant_ecommerce_details_dto.rb +348 -0
- data/lib/wallee-ruby-sdk/models/merchant_payment_channels_dto.rb +263 -0
- data/lib/wallee-ruby-sdk/models/merchant_related_persons_dto.rb +243 -0
- data/lib/wallee-ruby-sdk/models/o_auth_client.rb +397 -0
- data/lib/wallee-ruby-sdk/models/o_auth_client_create.rb +365 -0
- data/lib/wallee-ruby-sdk/models/{user_space_role_list_response.rb → o_auth_client_list_response.rb} +4 -4
- data/lib/wallee-ruby-sdk/models/o_auth_client_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/o_auth_client_update.rb +374 -0
- data/lib/wallee-ruby-sdk/models/o_auth_consent.rb +321 -0
- data/lib/wallee-ruby-sdk/models/{user_account_role_list_response.rb → o_auth_consent_list_response.rb} +4 -4
- data/lib/wallee-ruby-sdk/models/o_auth_consent_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/{user_account_role.rb → o_auth_user.rb} +56 -29
- data/lib/wallee-ruby-sdk/models/{express_checkout_create_response.rb → payment_facilitator_pricing_profile_dto.rb} +16 -16
- data/lib/wallee-ruby-sdk/models/payment_facilitator_pricing_profile_state.rb +53 -0
- data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file.rb +337 -0
- data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file_state.rb +55 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal.rb +37 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_activation_status.rb +301 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_activation_status_detail_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_address_create.rb +511 -0
- data/lib/wallee-ruby-sdk/models/{payment_terminal_create.rb → payment_terminal_creation_request.rb} +88 -62
- data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +1 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_location_crud_model.rb +398 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_location_crud_model_rest_api_create.rb +359 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_location_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/payment_terminal_location_version_state.rb +2 -1
- data/lib/wallee-ruby-sdk/models/payout_account_info.rb +257 -0
- data/lib/wallee-ruby-sdk/models/person_salutation.rb +54 -0
- data/lib/wallee-ruby-sdk/models/pricing_history_dto.rb +266 -0
- data/lib/wallee-ruby-sdk/models/product_metered_fee.rb +11 -1
- data/lib/wallee-ruby-sdk/models/product_metered_fee_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
- data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
- data/lib/wallee-ruby-sdk/models/refund_days_range.rb +51 -0
- data/lib/wallee-ruby-sdk/models/refund_percentage_range.rb +56 -0
- data/lib/wallee-ruby-sdk/models/related_person.rb +329 -0
- data/lib/wallee-ruby-sdk/models/representative_info.rb +239 -0
- data/lib/wallee-ruby-sdk/models/rest_member.rb +284 -0
- data/lib/wallee-ruby-sdk/models/{user_space_role.rb → rest_o_auth_client_secret.rb} +38 -37
- data/lib/wallee-ruby-sdk/models/{express_checkout_session.rb → rest_o_auth_client_secret_created.rb} +27 -52
- data/lib/wallee-ruby-sdk/models/role.rb +13 -1
- data/lib/wallee-ruby-sdk/models/role_create.rb +13 -1
- data/lib/wallee-ruby-sdk/models/{abstract_payment_terminal_update.rb → role_ref.rb} +18 -27
- data/lib/wallee-ruby-sdk/models/role_update.rb +13 -1
- data/lib/wallee-ruby-sdk/models/sales_channel.rb +15 -230
- data/lib/wallee-ruby-sdk/models/scope.rb +28 -16
- data/lib/wallee-ruby-sdk/models/secret_key_state.rb +51 -0
- data/lib/wallee-ruby-sdk/models/setter.rb +618 -0
- data/lib/wallee-ruby-sdk/models/sole_proprietor_ownership_type.rb +51 -0
- data/lib/wallee-ruby-sdk/models/sole_proprietorship_info.rb +261 -0
- data/lib/wallee-ruby-sdk/models/state_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/store_trial_subscription_request.rb +273 -0
- data/lib/wallee-ruby-sdk/models/store_trial_subscription_request_setter.rb +307 -0
- data/lib/wallee-ruby-sdk/models/subscription_component_group_configuration_request.rb +249 -0
- data/lib/wallee-ruby-sdk/models/subscription_component_group_configuration_request_setter.rb +249 -0
- data/lib/wallee-ruby-sdk/models/subscription_product_dto.rb +239 -0
- data/lib/wallee-ruby-sdk/models/tokenized_card_data_create.rb +30 -1
- data/lib/wallee-ruby-sdk/models/tracking_number_request.rb +230 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
- data/lib/wallee-ruby-sdk/models/transaction_overview.rb +1144 -0
- data/lib/wallee-ruby-sdk/models/transaction_projection.rb +1135 -0
- data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
- data/lib/wallee-ruby-sdk/models/walleejoin_admin_partner_configuration_request_dto.rb +360 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_admin_partner_configuration_response_dto.rb +351 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_admin_pricing_type.rb +51 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb +266 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership.rb +357 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_create.rb +337 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto.rb +342 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto_list_response.rb +253 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto_search_response.rb +263 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_state.rb +51 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_type.rb +50 -0
- data/lib/wallee-ruby-sdk/models/walleejoin_partnership_update.rb +364 -0
- data/lib/wallee-ruby-sdk/models/wallet_type.rb +40 -1
- data/lib/wallee-ruby-sdk/models/web_ui_account_theme.rb +230 -0
- data/lib/wallee-ruby-sdk/service/accounts_service.rb +16 -9
- data/lib/wallee-ruby-sdk/service/analytics_queries_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/bank_accounts_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/boarding_subscription_strategy_service.rb +181 -0
- data/lib/wallee-ruby-sdk/service/charge_attempts_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/charge_bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/charge_flow_levels_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/charge_flows_level_payment_links_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/charge_flows_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/consumed_resources_service.rb +1 -1
- data/lib/wallee-ruby-sdk/service/countries_service.rb +15 -6
- data/lib/wallee-ruby-sdk/service/currency_bank_accounts_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/customer_addresses_service.rb +7 -7
- data/lib/wallee-ruby-sdk/service/customer_comments_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/customers_service.rb +11 -11
- data/lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb +12 -12
- data/lib/wallee-ruby-sdk/service/debt_collector_configurations_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/delivery_indications_service.rb +5 -5
- data/lib/wallee-ruby-sdk/service/document_templates_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/dunning_case_levels_service.rb +291 -0
- data/lib/wallee-ruby-sdk/service/dunning_cases_service.rb +5 -5
- data/lib/wallee-ruby-sdk/service/dunning_flow_levels_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/dunning_flows_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/external_transfer_bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/fulfillments_service.rb +355 -0
- data/lib/wallee-ruby-sdk/service/internal_transfer_bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/invoice_reconciliation_record_invoice_links_service.rb +453 -0
- data/lib/wallee-ruby-sdk/service/invoice_reconciliation_records_service.rb +433 -0
- data/lib/wallee-ruby-sdk/service/invoice_reimbursements_service.rb +450 -0
- data/lib/wallee-ruby-sdk/service/join_admin_partner_configuration_service.rb +306 -0
- data/lib/wallee-ruby-sdk/service/join_partnership_service.rb +586 -0
- data/lib/wallee-ruby-sdk/service/manual_tasks_service.rb +5 -5
- data/lib/wallee-ruby-sdk/service/members_service.rb +215 -0
- data/lib/wallee-ruby-sdk/service/merchant_applications_service.rb +334 -0
- data/lib/wallee-ruby-sdk/service/o_auth_clients_service.rb +611 -0
- data/lib/wallee-ruby-sdk/service/o_auth_consents_service.rb +332 -0
- data/lib/wallee-ruby-sdk/service/payment_connector_configurations_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/payment_links_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/payment_method_configurations_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/payment_processor_configurations_service.rb +85 -6
- data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/payment_terminals_service.rb +475 -22
- data/lib/wallee-ruby-sdk/service/payment_web_apps_service.rb +11 -11
- data/lib/wallee-ruby-sdk/service/refund_bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/refund_comments_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/refund_recovery_bank_transactions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/refunds_service.rb +7 -7
- data/lib/wallee-ruby-sdk/service/spaces_service.rb +10 -3
- data/lib/wallee-ruby-sdk/service/subscribers_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_affiliates_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_charges_service.rb +5 -5
- data/lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/subscription_metric_usage_reports_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/subscription_metrics_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_period_bills_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/subscription_product_component_groups_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_components_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_metered_fee_tiers_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_metered_fees_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_retirements_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/subscription_product_setup_fees_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_product_version_retirements_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/subscription_product_versions_service.rb +7 -7
- data/lib/wallee-ruby-sdk/service/subscription_products_service.rb +6 -6
- data/lib/wallee-ruby-sdk/service/subscription_suspensions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/subscription_versions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/subscriptions_service.rb +13 -13
- data/lib/wallee-ruby-sdk/service/terminal_locations_service.rb +276 -0
- data/lib/wallee-ruby-sdk/service/token_versions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/tokens_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/transaction_client_platforms_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/transaction_comments_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/transaction_completions_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/transaction_invoice_comments_service.rb +8 -8
- data/lib/wallee-ruby-sdk/service/transaction_invoices_service.rb +86 -8
- data/lib/wallee-ruby-sdk/service/transaction_line_item_versions_service.rb +4 -4
- data/lib/wallee-ruby-sdk/service/transaction_voids_service.rb +3 -3
- data/lib/wallee-ruby-sdk/service/transactions_service.rb +179 -37
- data/lib/wallee-ruby-sdk/service/web_apps_service.rb +2 -2
- data/lib/wallee-ruby-sdk/service/web_ui_account_theme_service.rb +245 -0
- data/lib/wallee-ruby-sdk/service/webhook_listeners_service.rb +9 -9
- data/lib/wallee-ruby-sdk/service/webhook_urls_service.rb +9 -9
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/lib/wallee-ruby-sdk.rb +115 -17
- data/test/test_querying.rb +11 -0
- metadata +117 -19
- data/lib/wallee-ruby-sdk/service/application_users_roles_service.rb +0 -478
- data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +0 -107
- data/lib/wallee-ruby-sdk/service/human_users_roles_service.rb +0 -478
- data/lib/wallee-ruby-sdk/service/single_sign_on_users_roles_service.rb +0 -478
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# Wallee AG Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the Wallee AG payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://en.wallee.com
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
require 'date'
|
|
24
|
+
require 'time'
|
|
25
|
+
|
|
26
|
+
module WalleeRubySdk
|
|
27
|
+
class WalleejoinPartnershipUpdate
|
|
28
|
+
# The date and time when the partnership was terminated.
|
|
29
|
+
attr_accessor :terminated_on
|
|
30
|
+
|
|
31
|
+
attr_accessor :pricing_profile_sell_rate
|
|
32
|
+
|
|
33
|
+
# The date and time when the partnership was activated.
|
|
34
|
+
attr_accessor :activated_on
|
|
35
|
+
|
|
36
|
+
# The ID of the merchant account.
|
|
37
|
+
attr_accessor :merchant_account
|
|
38
|
+
|
|
39
|
+
# The email address the merchant was invited with.
|
|
40
|
+
attr_accessor :invitation_email_address
|
|
41
|
+
|
|
42
|
+
attr_accessor :partnership_type
|
|
43
|
+
|
|
44
|
+
attr_accessor :state
|
|
45
|
+
|
|
46
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
|
47
|
+
attr_accessor :version
|
|
48
|
+
|
|
49
|
+
# The ID of the product.
|
|
50
|
+
attr_accessor :subscription_product_id
|
|
51
|
+
|
|
52
|
+
# The ID of the partner account.
|
|
53
|
+
attr_accessor :partner_account
|
|
54
|
+
|
|
55
|
+
class EnumAttributeValidator
|
|
56
|
+
attr_reader :datatype
|
|
57
|
+
attr_reader :allowable_values
|
|
58
|
+
|
|
59
|
+
def initialize(datatype, allowable_values)
|
|
60
|
+
@allowable_values = allowable_values.map do |value|
|
|
61
|
+
case datatype.to_s
|
|
62
|
+
when /Integer/i
|
|
63
|
+
value.to_i
|
|
64
|
+
when /Float/i
|
|
65
|
+
value.to_f
|
|
66
|
+
else
|
|
67
|
+
value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def valid?(value)
|
|
73
|
+
!value || allowable_values.include?(value)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
78
|
+
def self.attribute_map
|
|
79
|
+
{
|
|
80
|
+
:'terminated_on' => :'terminatedOn',
|
|
81
|
+
:'pricing_profile_sell_rate' => :'pricingProfileSellRate',
|
|
82
|
+
:'activated_on' => :'activatedOn',
|
|
83
|
+
:'merchant_account' => :'merchantAccount',
|
|
84
|
+
:'invitation_email_address' => :'invitationEmailAddress',
|
|
85
|
+
:'partnership_type' => :'partnershipType',
|
|
86
|
+
:'state' => :'state',
|
|
87
|
+
:'version' => :'version',
|
|
88
|
+
:'subscription_product_id' => :'subscriptionProductId',
|
|
89
|
+
:'partner_account' => :'partnerAccount'
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns attribute mapping this model knows about
|
|
94
|
+
def self.acceptable_attribute_map
|
|
95
|
+
attribute_map
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Returns all the JSON keys this model knows about
|
|
99
|
+
def self.acceptable_attributes
|
|
100
|
+
acceptable_attribute_map.values
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Attribute type mapping.
|
|
104
|
+
def self.openapi_types
|
|
105
|
+
{
|
|
106
|
+
:'terminated_on' => :'Time',
|
|
107
|
+
:'pricing_profile_sell_rate' => :'Object',
|
|
108
|
+
:'activated_on' => :'Time',
|
|
109
|
+
:'merchant_account' => :'Integer',
|
|
110
|
+
:'invitation_email_address' => :'String',
|
|
111
|
+
:'partnership_type' => :'WalleejoinPartnershipType',
|
|
112
|
+
:'state' => :'WalleejoinPartnershipState',
|
|
113
|
+
:'version' => :'Integer',
|
|
114
|
+
:'subscription_product_id' => :'Integer',
|
|
115
|
+
:'partner_account' => :'Integer'
|
|
116
|
+
}
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# List of attributes with nullable: true
|
|
120
|
+
def self.openapi_nullable
|
|
121
|
+
Set.new([
|
|
122
|
+
])
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
126
|
+
def self.openapi_all_of
|
|
127
|
+
[
|
|
128
|
+
:'WalleejoinPartnership'
|
|
129
|
+
]
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Initializes the object
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
def initialize(attributes = {})
|
|
135
|
+
if (!attributes.is_a?(Hash))
|
|
136
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::WalleejoinPartnershipUpdate` initialize method"
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
140
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
141
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
142
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
143
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::WalleejoinPartnershipUpdate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
144
|
+
end
|
|
145
|
+
h[k.to_sym] = v
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'terminated_on')
|
|
149
|
+
self.terminated_on = attributes[:'terminated_on']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'pricing_profile_sell_rate')
|
|
153
|
+
self.pricing_profile_sell_rate = attributes[:'pricing_profile_sell_rate']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'activated_on')
|
|
157
|
+
self.activated_on = attributes[:'activated_on']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'merchant_account')
|
|
161
|
+
self.merchant_account = attributes[:'merchant_account']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'invitation_email_address')
|
|
165
|
+
self.invitation_email_address = attributes[:'invitation_email_address']
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'partnership_type')
|
|
169
|
+
self.partnership_type = attributes[:'partnership_type']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'state')
|
|
173
|
+
self.state = attributes[:'state']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'version')
|
|
177
|
+
self.version = attributes[:'version']
|
|
178
|
+
else
|
|
179
|
+
self.version = nil
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'subscription_product_id')
|
|
183
|
+
self.subscription_product_id = attributes[:'subscription_product_id']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'partner_account')
|
|
187
|
+
self.partner_account = attributes[:'partner_account']
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
192
|
+
# @return Array for valid properties with the reasons
|
|
193
|
+
def list_invalid_properties
|
|
194
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
195
|
+
invalid_properties = Array.new
|
|
196
|
+
if @version.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
invalid_properties
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Check to see if the all the properties in the model are valid
|
|
204
|
+
# @return true if the model is valid
|
|
205
|
+
def valid?
|
|
206
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
207
|
+
return false if @version.nil?
|
|
208
|
+
true
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Custom attribute writer method with validation
|
|
212
|
+
# @param [Object] version Value to be assigned
|
|
213
|
+
def version=(version)
|
|
214
|
+
if version.nil?
|
|
215
|
+
fail ArgumentError, 'version cannot be nil'
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
@version = version
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Checks equality by comparing each attribute.
|
|
222
|
+
# @param [Object] Object to be compared
|
|
223
|
+
def ==(o)
|
|
224
|
+
return true if self.equal?(o)
|
|
225
|
+
self.class == o.class &&
|
|
226
|
+
terminated_on == o.terminated_on &&
|
|
227
|
+
pricing_profile_sell_rate == o.pricing_profile_sell_rate &&
|
|
228
|
+
activated_on == o.activated_on &&
|
|
229
|
+
merchant_account == o.merchant_account &&
|
|
230
|
+
invitation_email_address == o.invitation_email_address &&
|
|
231
|
+
partnership_type == o.partnership_type &&
|
|
232
|
+
state == o.state &&
|
|
233
|
+
version == o.version &&
|
|
234
|
+
subscription_product_id == o.subscription_product_id &&
|
|
235
|
+
partner_account == o.partner_account
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# @see the `==` method
|
|
239
|
+
# @param [Object] Object to be compared
|
|
240
|
+
def eql?(o)
|
|
241
|
+
self == o
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Calculates hash code according to all attributes.
|
|
245
|
+
# @return [Integer] Hash code
|
|
246
|
+
def hash
|
|
247
|
+
[terminated_on, pricing_profile_sell_rate, activated_on, merchant_account, invitation_email_address, partnership_type, state, version, subscription_product_id, partner_account].hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Builds the object from hash
|
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
252
|
+
# @return [Object] Returns the model itself
|
|
253
|
+
def self.build_from_hash(attributes)
|
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
|
255
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
256
|
+
transformed_hash = {}
|
|
257
|
+
openapi_types.each_pair do |key, type|
|
|
258
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
259
|
+
transformed_hash["#{key}"] = nil
|
|
260
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
261
|
+
# check to ensure the input is an array given that the attribute
|
|
262
|
+
# is documented as an array but the input is not
|
|
263
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
264
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
265
|
+
end
|
|
266
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
267
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
new(transformed_hash)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Deserializes the data based on type
|
|
274
|
+
# @param string type Data type
|
|
275
|
+
# @param string value Value to be deserialized
|
|
276
|
+
# @return [Object] Deserialized data
|
|
277
|
+
def self._deserialize(type, value)
|
|
278
|
+
case type.to_sym
|
|
279
|
+
when :Time
|
|
280
|
+
Time.parse(value)
|
|
281
|
+
when :Date
|
|
282
|
+
Date.parse(value)
|
|
283
|
+
when :String
|
|
284
|
+
value.to_s
|
|
285
|
+
when :Integer
|
|
286
|
+
value.to_i
|
|
287
|
+
when :Float
|
|
288
|
+
value.to_f
|
|
289
|
+
when :Boolean
|
|
290
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
291
|
+
true
|
|
292
|
+
else
|
|
293
|
+
false
|
|
294
|
+
end
|
|
295
|
+
when :Object
|
|
296
|
+
# generic object (usually a Hash), return directly
|
|
297
|
+
value
|
|
298
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
299
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
300
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
301
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
302
|
+
k_type = Regexp.last_match[:k_type]
|
|
303
|
+
v_type = Regexp.last_match[:v_type]
|
|
304
|
+
{}.tap do |hash|
|
|
305
|
+
value.each do |k, v|
|
|
306
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
else # model
|
|
310
|
+
# models (e.g. Pet) or oneOf
|
|
311
|
+
klass = WalleeRubySdk.const_get(type)
|
|
312
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Returns the string representation of the object
|
|
317
|
+
# @return [String] String presentation of the object
|
|
318
|
+
def to_s
|
|
319
|
+
to_hash.to_s
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
|
324
|
+
def to_body
|
|
325
|
+
to_hash
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Returns the object in the form of hash
|
|
329
|
+
# @return [Hash] Returns the object in the form of hash
|
|
330
|
+
def to_hash
|
|
331
|
+
hash = {}
|
|
332
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
333
|
+
value = self.send(attr)
|
|
334
|
+
if value.nil?
|
|
335
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
336
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
hash[param] = _to_hash(value)
|
|
340
|
+
end
|
|
341
|
+
hash
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Outputs non-array value in the form of hash
|
|
345
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
346
|
+
# @param [Object] value Any valid value
|
|
347
|
+
# @return [Hash] Returns the value in the form of hash
|
|
348
|
+
def _to_hash(value)
|
|
349
|
+
if value.is_a?(Array)
|
|
350
|
+
value.compact.map { |v| _to_hash(v) }
|
|
351
|
+
elsif value.is_a?(Hash)
|
|
352
|
+
{}.tap do |hash|
|
|
353
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
354
|
+
end
|
|
355
|
+
elsif value.respond_to? :to_hash
|
|
356
|
+
value.to_hash
|
|
357
|
+
else
|
|
358
|
+
value
|
|
359
|
+
end
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
end
|
|
@@ -25,10 +25,16 @@ require 'time'
|
|
|
25
25
|
|
|
26
26
|
module WalleeRubySdk
|
|
27
27
|
class WalletType
|
|
28
|
+
attr_accessor :required_features
|
|
29
|
+
|
|
28
30
|
attr_accessor :feature
|
|
29
31
|
|
|
32
|
+
attr_accessor :standard_checkout_supported
|
|
33
|
+
|
|
30
34
|
attr_accessor :sort_order
|
|
31
35
|
|
|
36
|
+
attr_accessor :express_checkout_supported
|
|
37
|
+
|
|
32
38
|
# The localized name of the object.
|
|
33
39
|
attr_accessor :name
|
|
34
40
|
|
|
@@ -43,8 +49,11 @@ module WalleeRubySdk
|
|
|
43
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
50
|
def self.attribute_map
|
|
45
51
|
{
|
|
52
|
+
:'required_features' => :'requiredFeatures',
|
|
46
53
|
:'feature' => :'feature',
|
|
54
|
+
:'standard_checkout_supported' => :'standardCheckoutSupported',
|
|
47
55
|
:'sort_order' => :'sortOrder',
|
|
56
|
+
:'express_checkout_supported' => :'expressCheckoutSupported',
|
|
48
57
|
:'name' => :'name',
|
|
49
58
|
:'description' => :'description',
|
|
50
59
|
:'navigation_path' => :'navigationPath',
|
|
@@ -65,8 +74,11 @@ module WalleeRubySdk
|
|
|
65
74
|
# Attribute type mapping.
|
|
66
75
|
def self.openapi_types
|
|
67
76
|
{
|
|
77
|
+
:'required_features' => :'Array<Feature>',
|
|
68
78
|
:'feature' => :'Feature',
|
|
79
|
+
:'standard_checkout_supported' => :'Boolean',
|
|
69
80
|
:'sort_order' => :'Integer',
|
|
81
|
+
:'express_checkout_supported' => :'Boolean',
|
|
70
82
|
:'name' => :'Hash<String, String>',
|
|
71
83
|
:'description' => :'Hash<String, String>',
|
|
72
84
|
:'navigation_path' => :'String',
|
|
@@ -96,14 +108,28 @@ module WalleeRubySdk
|
|
|
96
108
|
h[k.to_sym] = v
|
|
97
109
|
}
|
|
98
110
|
|
|
111
|
+
if attributes.key?(:'required_features')
|
|
112
|
+
if (value = attributes[:'required_features']).is_a?(Array)
|
|
113
|
+
self.required_features = value
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
99
117
|
if attributes.key?(:'feature')
|
|
100
118
|
self.feature = attributes[:'feature']
|
|
101
119
|
end
|
|
102
120
|
|
|
121
|
+
if attributes.key?(:'standard_checkout_supported')
|
|
122
|
+
self.standard_checkout_supported = attributes[:'standard_checkout_supported']
|
|
123
|
+
end
|
|
124
|
+
|
|
103
125
|
if attributes.key?(:'sort_order')
|
|
104
126
|
self.sort_order = attributes[:'sort_order']
|
|
105
127
|
end
|
|
106
128
|
|
|
129
|
+
if attributes.key?(:'express_checkout_supported')
|
|
130
|
+
self.express_checkout_supported = attributes[:'express_checkout_supported']
|
|
131
|
+
end
|
|
132
|
+
|
|
107
133
|
if attributes.key?(:'name')
|
|
108
134
|
if (value = attributes[:'name']).is_a?(Hash)
|
|
109
135
|
self.name = value
|
|
@@ -140,13 +166,26 @@ module WalleeRubySdk
|
|
|
140
166
|
true
|
|
141
167
|
end
|
|
142
168
|
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] required_features Value to be assigned
|
|
171
|
+
def required_features=(required_features)
|
|
172
|
+
if required_features.nil?
|
|
173
|
+
fail ArgumentError, 'required_features cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@required_features = required_features
|
|
177
|
+
end
|
|
178
|
+
|
|
143
179
|
# Checks equality by comparing each attribute.
|
|
144
180
|
# @param [Object] Object to be compared
|
|
145
181
|
def ==(o)
|
|
146
182
|
return true if self.equal?(o)
|
|
147
183
|
self.class == o.class &&
|
|
184
|
+
required_features == o.required_features &&
|
|
148
185
|
feature == o.feature &&
|
|
186
|
+
standard_checkout_supported == o.standard_checkout_supported &&
|
|
149
187
|
sort_order == o.sort_order &&
|
|
188
|
+
express_checkout_supported == o.express_checkout_supported &&
|
|
150
189
|
name == o.name &&
|
|
151
190
|
description == o.description &&
|
|
152
191
|
navigation_path == o.navigation_path &&
|
|
@@ -162,7 +201,7 @@ module WalleeRubySdk
|
|
|
162
201
|
# Calculates hash code according to all attributes.
|
|
163
202
|
# @return [Integer] Hash code
|
|
164
203
|
def hash
|
|
165
|
-
[feature, sort_order, name, description, navigation_path, id].hash
|
|
204
|
+
[required_features, feature, standard_checkout_supported, sort_order, express_checkout_supported, name, description, navigation_path, id].hash
|
|
166
205
|
end
|
|
167
206
|
|
|
168
207
|
# Builds the object from hash
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
# Wallee AG Ruby SDK
|
|
3
|
+
#
|
|
4
|
+
# This library allows to interact with the Wallee AG payment service.
|
|
5
|
+
#
|
|
6
|
+
# Copyright owner: Wallee AG
|
|
7
|
+
# Website: https://en.wallee.com
|
|
8
|
+
# Developer email: ecosystem-team@wallee.com
|
|
9
|
+
#
|
|
10
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
# you may not use this file except in compliance with the License.
|
|
12
|
+
# You may obtain a copy of the License at
|
|
13
|
+
#
|
|
14
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
#
|
|
16
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
# See the License for the specific language governing permissions and
|
|
20
|
+
# limitations under the License.
|
|
21
|
+
=end
|
|
22
|
+
|
|
23
|
+
require 'date'
|
|
24
|
+
require 'time'
|
|
25
|
+
|
|
26
|
+
module WalleeRubySdk
|
|
27
|
+
class WebUiAccountTheme
|
|
28
|
+
attr_accessor :properties
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'properties' => :'properties'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'properties' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::WebUiAccountTheme` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::WebUiAccountTheme`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'properties')
|
|
77
|
+
self.properties = attributes[:'properties']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
true
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def ==(o)
|
|
99
|
+
return true if self.equal?(o)
|
|
100
|
+
self.class == o.class &&
|
|
101
|
+
properties == o.properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[properties].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def self._deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = WalleeRubySdk.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|