wallee-ruby-sdk 6.4.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 +38 -31
- data/README.md +450 -129
- 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/{abstract_payment_terminal_update.rb → basic_address.rb} +46 -30
- data/lib/wallee-ruby-sdk/models/{express_checkout_shipping_address_change_request.rb → boarding_strategy_information_request.rb} +22 -14
- data/lib/wallee-ruby-sdk/models/{bogus_express_checkout_payment_data.rb → charge_attempt_lookup_result.rb} +16 -18
- 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/{express_checkout_shipping_address_change_response.rb → merchant_related_persons_dto.rb} +22 -20
- 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/{bogus_express_checkout_approval_request.rb → payment_facilitator_pricing_profile_dto.rb} +19 -10
- data/lib/wallee-ruby-sdk/models/payment_facilitator_pricing_profile_state.rb +53 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_session.rb → payment_initiation_advice_file.rb} +57 -72
- 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/{express_checkout_create_response.rb → payout_account_info.rb} +31 -22
- 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_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/{user_space_role.rb → rest_member.rb} +50 -37
- data/lib/wallee-ruby-sdk/models/{express_checkout_approval_response.rb → rest_o_auth_client_secret.rb} +19 -17
- data/lib/wallee-ruby-sdk/models/rest_o_auth_client_secret_created.rb +289 -0
- 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/{express_checkout_shipping_method_change_request.rb → role_ref.rb} +21 -11
- 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 +13 -1
- 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/{express_checkout_session_create.rb → subscription_component_group_configuration_request.rb} +23 -37
- data/lib/wallee-ruby-sdk/models/subscription_component_group_configuration_request_setter.rb +249 -0
- data/lib/wallee-ruby-sdk/models/{express_checkout_shipping_method_change_response.rb → subscription_product_dto.rb} +16 -18
- 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_overview.rb +1144 -0
- data/lib/wallee-ruby-sdk/models/transaction_projection.rb +1135 -0
- 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 -25
- metadata +117 -27
- data/lib/wallee-ruby-sdk/service/application_users_roles_service.rb +0 -478
- data/lib/wallee-ruby-sdk/service/bogus_express_checkout_service.rb +0 -114
- data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +0 -269
- 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,618 @@
|
|
|
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 Setter
|
|
28
|
+
# The two-letter country code (ISO 3166 format).
|
|
29
|
+
attr_accessor :country
|
|
30
|
+
|
|
31
|
+
# The phone number of a mobile phone.
|
|
32
|
+
attr_accessor :mobile_phone_number
|
|
33
|
+
|
|
34
|
+
# The organization's name.
|
|
35
|
+
attr_accessor :organization_name
|
|
36
|
+
|
|
37
|
+
# The city, town or village.
|
|
38
|
+
attr_accessor :city
|
|
39
|
+
|
|
40
|
+
# The given or first name.
|
|
41
|
+
attr_accessor :given_name
|
|
42
|
+
|
|
43
|
+
# The postal code, also known as ZIP, postcode, etc.
|
|
44
|
+
attr_accessor :postcode
|
|
45
|
+
|
|
46
|
+
# The sales tax number of the organization.
|
|
47
|
+
attr_accessor :sales_tax_number
|
|
48
|
+
|
|
49
|
+
# The dependent locality which is a sub-division of the state.
|
|
50
|
+
attr_accessor :dependent_locality
|
|
51
|
+
|
|
52
|
+
# The email address.
|
|
53
|
+
attr_accessor :email_address
|
|
54
|
+
|
|
55
|
+
# The phone number.
|
|
56
|
+
attr_accessor :phone_number
|
|
57
|
+
|
|
58
|
+
# The sorting code identifying the post office where the PO Box is located.
|
|
59
|
+
attr_accessor :sorting_code
|
|
60
|
+
|
|
61
|
+
# The street or PO Box.
|
|
62
|
+
attr_accessor :street
|
|
63
|
+
|
|
64
|
+
# The family or last name.
|
|
65
|
+
attr_accessor :family_name
|
|
66
|
+
|
|
67
|
+
# The name of the region, typically a state, county, province or prefecture.
|
|
68
|
+
attr_accessor :postal_state
|
|
69
|
+
|
|
70
|
+
# The salutation e.g. Mrs, Mr, Dr.
|
|
71
|
+
attr_accessor :salutation
|
|
72
|
+
|
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
|
+
def self.attribute_map
|
|
75
|
+
{
|
|
76
|
+
:'country' => :'country',
|
|
77
|
+
:'mobile_phone_number' => :'mobilePhoneNumber',
|
|
78
|
+
:'organization_name' => :'organizationName',
|
|
79
|
+
:'city' => :'city',
|
|
80
|
+
:'given_name' => :'givenName',
|
|
81
|
+
:'postcode' => :'postcode',
|
|
82
|
+
:'sales_tax_number' => :'salesTaxNumber',
|
|
83
|
+
:'dependent_locality' => :'dependentLocality',
|
|
84
|
+
:'email_address' => :'emailAddress',
|
|
85
|
+
:'phone_number' => :'phoneNumber',
|
|
86
|
+
:'sorting_code' => :'sortingCode',
|
|
87
|
+
:'street' => :'street',
|
|
88
|
+
:'family_name' => :'familyName',
|
|
89
|
+
:'postal_state' => :'postalState',
|
|
90
|
+
:'salutation' => :'salutation'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Returns attribute mapping this model knows about
|
|
95
|
+
def self.acceptable_attribute_map
|
|
96
|
+
attribute_map
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Returns all the JSON keys this model knows about
|
|
100
|
+
def self.acceptable_attributes
|
|
101
|
+
acceptable_attribute_map.values
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Attribute type mapping.
|
|
105
|
+
def self.openapi_types
|
|
106
|
+
{
|
|
107
|
+
:'country' => :'String',
|
|
108
|
+
:'mobile_phone_number' => :'String',
|
|
109
|
+
:'organization_name' => :'String',
|
|
110
|
+
:'city' => :'String',
|
|
111
|
+
:'given_name' => :'String',
|
|
112
|
+
:'postcode' => :'String',
|
|
113
|
+
:'sales_tax_number' => :'String',
|
|
114
|
+
:'dependent_locality' => :'String',
|
|
115
|
+
:'email_address' => :'String',
|
|
116
|
+
:'phone_number' => :'String',
|
|
117
|
+
:'sorting_code' => :'String',
|
|
118
|
+
:'street' => :'String',
|
|
119
|
+
:'family_name' => :'String',
|
|
120
|
+
:'postal_state' => :'String',
|
|
121
|
+
:'salutation' => :'String'
|
|
122
|
+
}
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# List of attributes with nullable: true
|
|
126
|
+
def self.openapi_nullable
|
|
127
|
+
Set.new([
|
|
128
|
+
])
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Initializes the object
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
def initialize(attributes = {})
|
|
134
|
+
if (!attributes.is_a?(Hash))
|
|
135
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::Setter` initialize method"
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
139
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
140
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
141
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
142
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::Setter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
143
|
+
end
|
|
144
|
+
h[k.to_sym] = v
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'country')
|
|
148
|
+
self.country = attributes[:'country']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'mobile_phone_number')
|
|
152
|
+
self.mobile_phone_number = attributes[:'mobile_phone_number']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'organization_name')
|
|
156
|
+
self.organization_name = attributes[:'organization_name']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'city')
|
|
160
|
+
self.city = attributes[:'city']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'given_name')
|
|
164
|
+
self.given_name = attributes[:'given_name']
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'postcode')
|
|
168
|
+
self.postcode = attributes[:'postcode']
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'sales_tax_number')
|
|
172
|
+
self.sales_tax_number = attributes[:'sales_tax_number']
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if attributes.key?(:'dependent_locality')
|
|
176
|
+
self.dependent_locality = attributes[:'dependent_locality']
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'email_address')
|
|
180
|
+
self.email_address = attributes[:'email_address']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'phone_number')
|
|
184
|
+
self.phone_number = attributes[:'phone_number']
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if attributes.key?(:'sorting_code')
|
|
188
|
+
self.sorting_code = attributes[:'sorting_code']
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'street')
|
|
192
|
+
self.street = attributes[:'street']
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'family_name')
|
|
196
|
+
self.family_name = attributes[:'family_name']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'postal_state')
|
|
200
|
+
self.postal_state = attributes[:'postal_state']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'salutation')
|
|
204
|
+
self.salutation = attributes[:'salutation']
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
209
|
+
# @return Array for valid properties with the reasons
|
|
210
|
+
def list_invalid_properties
|
|
211
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
212
|
+
invalid_properties = Array.new
|
|
213
|
+
if !@mobile_phone_number.nil? && @mobile_phone_number.to_s.length > 100
|
|
214
|
+
invalid_properties.push('invalid value for "mobile_phone_number", the character length must be smaller than or equal to 100.')
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if !@organization_name.nil? && @organization_name.to_s.length > 100
|
|
218
|
+
invalid_properties.push('invalid value for "organization_name", the character length must be smaller than or equal to 100.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if !@city.nil? && @city.to_s.length > 100
|
|
222
|
+
invalid_properties.push('invalid value for "city", the character length must be smaller than or equal to 100.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if !@given_name.nil? && @given_name.to_s.length > 100
|
|
226
|
+
invalid_properties.push('invalid value for "given_name", the character length must be smaller than or equal to 100.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if !@postcode.nil? && @postcode.to_s.length > 40
|
|
230
|
+
invalid_properties.push('invalid value for "postcode", the character length must be smaller than or equal to 40.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if !@sales_tax_number.nil? && @sales_tax_number.to_s.length > 100
|
|
234
|
+
invalid_properties.push('invalid value for "sales_tax_number", the character length must be smaller than or equal to 100.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
|
|
238
|
+
invalid_properties.push('invalid value for "dependent_locality", the character length must be smaller than or equal to 100.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if !@email_address.nil? && @email_address.to_s.length > 150
|
|
242
|
+
invalid_properties.push('invalid value for "email_address", the character length must be smaller than or equal to 150.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if !@phone_number.nil? && @phone_number.to_s.length > 100
|
|
246
|
+
invalid_properties.push('invalid value for "phone_number", the character length must be smaller than or equal to 100.')
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if !@sorting_code.nil? && @sorting_code.to_s.length > 100
|
|
250
|
+
invalid_properties.push('invalid value for "sorting_code", the character length must be smaller than or equal to 100.')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if !@street.nil? && @street.to_s.length > 300
|
|
254
|
+
invalid_properties.push('invalid value for "street", the character length must be smaller than or equal to 300.')
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if !@family_name.nil? && @family_name.to_s.length > 100
|
|
258
|
+
invalid_properties.push('invalid value for "family_name", the character length must be smaller than or equal to 100.')
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if !@salutation.nil? && @salutation.to_s.length > 20
|
|
262
|
+
invalid_properties.push('invalid value for "salutation", the character length must be smaller than or equal to 20.')
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
invalid_properties
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Check to see if the all the properties in the model are valid
|
|
269
|
+
# @return true if the model is valid
|
|
270
|
+
def valid?
|
|
271
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
272
|
+
return false if !@mobile_phone_number.nil? && @mobile_phone_number.to_s.length > 100
|
|
273
|
+
return false if !@organization_name.nil? && @organization_name.to_s.length > 100
|
|
274
|
+
return false if !@city.nil? && @city.to_s.length > 100
|
|
275
|
+
return false if !@given_name.nil? && @given_name.to_s.length > 100
|
|
276
|
+
return false if !@postcode.nil? && @postcode.to_s.length > 40
|
|
277
|
+
return false if !@sales_tax_number.nil? && @sales_tax_number.to_s.length > 100
|
|
278
|
+
return false if !@dependent_locality.nil? && @dependent_locality.to_s.length > 100
|
|
279
|
+
return false if !@email_address.nil? && @email_address.to_s.length > 150
|
|
280
|
+
return false if !@phone_number.nil? && @phone_number.to_s.length > 100
|
|
281
|
+
return false if !@sorting_code.nil? && @sorting_code.to_s.length > 100
|
|
282
|
+
return false if !@street.nil? && @street.to_s.length > 300
|
|
283
|
+
return false if !@family_name.nil? && @family_name.to_s.length > 100
|
|
284
|
+
return false if !@salutation.nil? && @salutation.to_s.length > 20
|
|
285
|
+
true
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Custom attribute writer method with validation
|
|
289
|
+
# @param [Object] mobile_phone_number Value to be assigned
|
|
290
|
+
def mobile_phone_number=(mobile_phone_number)
|
|
291
|
+
if mobile_phone_number.nil?
|
|
292
|
+
fail ArgumentError, 'mobile_phone_number cannot be nil'
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if mobile_phone_number.to_s.length > 100
|
|
296
|
+
fail ArgumentError, 'invalid value for "mobile_phone_number", the character length must be smaller than or equal to 100.'
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
@mobile_phone_number = mobile_phone_number
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Custom attribute writer method with validation
|
|
303
|
+
# @param [Object] organization_name Value to be assigned
|
|
304
|
+
def organization_name=(organization_name)
|
|
305
|
+
if organization_name.nil?
|
|
306
|
+
fail ArgumentError, 'organization_name cannot be nil'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if organization_name.to_s.length > 100
|
|
310
|
+
fail ArgumentError, 'invalid value for "organization_name", the character length must be smaller than or equal to 100.'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@organization_name = organization_name
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] city Value to be assigned
|
|
318
|
+
def city=(city)
|
|
319
|
+
if city.nil?
|
|
320
|
+
fail ArgumentError, 'city cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if city.to_s.length > 100
|
|
324
|
+
fail ArgumentError, 'invalid value for "city", the character length must be smaller than or equal to 100.'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@city = city
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] given_name Value to be assigned
|
|
332
|
+
def given_name=(given_name)
|
|
333
|
+
if given_name.nil?
|
|
334
|
+
fail ArgumentError, 'given_name cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
if given_name.to_s.length > 100
|
|
338
|
+
fail ArgumentError, 'invalid value for "given_name", the character length must be smaller than or equal to 100.'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@given_name = given_name
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method with validation
|
|
345
|
+
# @param [Object] postcode Value to be assigned
|
|
346
|
+
def postcode=(postcode)
|
|
347
|
+
if postcode.nil?
|
|
348
|
+
fail ArgumentError, 'postcode cannot be nil'
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
if postcode.to_s.length > 40
|
|
352
|
+
fail ArgumentError, 'invalid value for "postcode", the character length must be smaller than or equal to 40.'
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
@postcode = postcode
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Custom attribute writer method with validation
|
|
359
|
+
# @param [Object] sales_tax_number Value to be assigned
|
|
360
|
+
def sales_tax_number=(sales_tax_number)
|
|
361
|
+
if sales_tax_number.nil?
|
|
362
|
+
fail ArgumentError, 'sales_tax_number cannot be nil'
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
if sales_tax_number.to_s.length > 100
|
|
366
|
+
fail ArgumentError, 'invalid value for "sales_tax_number", the character length must be smaller than or equal to 100.'
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
@sales_tax_number = sales_tax_number
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Custom attribute writer method with validation
|
|
373
|
+
# @param [Object] dependent_locality Value to be assigned
|
|
374
|
+
def dependent_locality=(dependent_locality)
|
|
375
|
+
if dependent_locality.nil?
|
|
376
|
+
fail ArgumentError, 'dependent_locality cannot be nil'
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
if dependent_locality.to_s.length > 100
|
|
380
|
+
fail ArgumentError, 'invalid value for "dependent_locality", the character length must be smaller than or equal to 100.'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
@dependent_locality = dependent_locality
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Custom attribute writer method with validation
|
|
387
|
+
# @param [Object] email_address Value to be assigned
|
|
388
|
+
def email_address=(email_address)
|
|
389
|
+
if email_address.nil?
|
|
390
|
+
fail ArgumentError, 'email_address cannot be nil'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if email_address.to_s.length > 150
|
|
394
|
+
fail ArgumentError, 'invalid value for "email_address", the character length must be smaller than or equal to 150.'
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
@email_address = email_address
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# Custom attribute writer method with validation
|
|
401
|
+
# @param [Object] phone_number Value to be assigned
|
|
402
|
+
def phone_number=(phone_number)
|
|
403
|
+
if phone_number.nil?
|
|
404
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
if phone_number.to_s.length > 100
|
|
408
|
+
fail ArgumentError, 'invalid value for "phone_number", the character length must be smaller than or equal to 100.'
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
@phone_number = phone_number
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method with validation
|
|
415
|
+
# @param [Object] sorting_code Value to be assigned
|
|
416
|
+
def sorting_code=(sorting_code)
|
|
417
|
+
if sorting_code.nil?
|
|
418
|
+
fail ArgumentError, 'sorting_code cannot be nil'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if sorting_code.to_s.length > 100
|
|
422
|
+
fail ArgumentError, 'invalid value for "sorting_code", the character length must be smaller than or equal to 100.'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
@sorting_code = sorting_code
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Custom attribute writer method with validation
|
|
429
|
+
# @param [Object] street Value to be assigned
|
|
430
|
+
def street=(street)
|
|
431
|
+
if street.nil?
|
|
432
|
+
fail ArgumentError, 'street cannot be nil'
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
if street.to_s.length > 300
|
|
436
|
+
fail ArgumentError, 'invalid value for "street", the character length must be smaller than or equal to 300.'
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
@street = street
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Custom attribute writer method with validation
|
|
443
|
+
# @param [Object] family_name Value to be assigned
|
|
444
|
+
def family_name=(family_name)
|
|
445
|
+
if family_name.nil?
|
|
446
|
+
fail ArgumentError, 'family_name cannot be nil'
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
if family_name.to_s.length > 100
|
|
450
|
+
fail ArgumentError, 'invalid value for "family_name", the character length must be smaller than or equal to 100.'
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
@family_name = family_name
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Custom attribute writer method with validation
|
|
457
|
+
# @param [Object] salutation Value to be assigned
|
|
458
|
+
def salutation=(salutation)
|
|
459
|
+
if salutation.nil?
|
|
460
|
+
fail ArgumentError, 'salutation cannot be nil'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
if salutation.to_s.length > 20
|
|
464
|
+
fail ArgumentError, 'invalid value for "salutation", the character length must be smaller than or equal to 20.'
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
@salutation = salutation
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Checks equality by comparing each attribute.
|
|
471
|
+
# @param [Object] Object to be compared
|
|
472
|
+
def ==(o)
|
|
473
|
+
return true if self.equal?(o)
|
|
474
|
+
self.class == o.class &&
|
|
475
|
+
country == o.country &&
|
|
476
|
+
mobile_phone_number == o.mobile_phone_number &&
|
|
477
|
+
organization_name == o.organization_name &&
|
|
478
|
+
city == o.city &&
|
|
479
|
+
given_name == o.given_name &&
|
|
480
|
+
postcode == o.postcode &&
|
|
481
|
+
sales_tax_number == o.sales_tax_number &&
|
|
482
|
+
dependent_locality == o.dependent_locality &&
|
|
483
|
+
email_address == o.email_address &&
|
|
484
|
+
phone_number == o.phone_number &&
|
|
485
|
+
sorting_code == o.sorting_code &&
|
|
486
|
+
street == o.street &&
|
|
487
|
+
family_name == o.family_name &&
|
|
488
|
+
postal_state == o.postal_state &&
|
|
489
|
+
salutation == o.salutation
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# @see the `==` method
|
|
493
|
+
# @param [Object] Object to be compared
|
|
494
|
+
def eql?(o)
|
|
495
|
+
self == o
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Calculates hash code according to all attributes.
|
|
499
|
+
# @return [Integer] Hash code
|
|
500
|
+
def hash
|
|
501
|
+
[country, mobile_phone_number, organization_name, city, given_name, postcode, sales_tax_number, dependent_locality, email_address, phone_number, sorting_code, street, family_name, postal_state, salutation].hash
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Builds the object from hash
|
|
505
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
506
|
+
# @return [Object] Returns the model itself
|
|
507
|
+
def self.build_from_hash(attributes)
|
|
508
|
+
return nil unless attributes.is_a?(Hash)
|
|
509
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
510
|
+
transformed_hash = {}
|
|
511
|
+
openapi_types.each_pair do |key, type|
|
|
512
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
513
|
+
transformed_hash["#{key}"] = nil
|
|
514
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
515
|
+
# check to ensure the input is an array given that the attribute
|
|
516
|
+
# is documented as an array but the input is not
|
|
517
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
518
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
519
|
+
end
|
|
520
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
521
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
522
|
+
end
|
|
523
|
+
end
|
|
524
|
+
new(transformed_hash)
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
# Deserializes the data based on type
|
|
528
|
+
# @param string type Data type
|
|
529
|
+
# @param string value Value to be deserialized
|
|
530
|
+
# @return [Object] Deserialized data
|
|
531
|
+
def self._deserialize(type, value)
|
|
532
|
+
case type.to_sym
|
|
533
|
+
when :Time
|
|
534
|
+
Time.parse(value)
|
|
535
|
+
when :Date
|
|
536
|
+
Date.parse(value)
|
|
537
|
+
when :String
|
|
538
|
+
value.to_s
|
|
539
|
+
when :Integer
|
|
540
|
+
value.to_i
|
|
541
|
+
when :Float
|
|
542
|
+
value.to_f
|
|
543
|
+
when :Boolean
|
|
544
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
545
|
+
true
|
|
546
|
+
else
|
|
547
|
+
false
|
|
548
|
+
end
|
|
549
|
+
when :Object
|
|
550
|
+
# generic object (usually a Hash), return directly
|
|
551
|
+
value
|
|
552
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
553
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
554
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
555
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
556
|
+
k_type = Regexp.last_match[:k_type]
|
|
557
|
+
v_type = Regexp.last_match[:v_type]
|
|
558
|
+
{}.tap do |hash|
|
|
559
|
+
value.each do |k, v|
|
|
560
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
561
|
+
end
|
|
562
|
+
end
|
|
563
|
+
else # model
|
|
564
|
+
# models (e.g. Pet) or oneOf
|
|
565
|
+
klass = WalleeRubySdk.const_get(type)
|
|
566
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
567
|
+
end
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# Returns the string representation of the object
|
|
571
|
+
# @return [String] String presentation of the object
|
|
572
|
+
def to_s
|
|
573
|
+
to_hash.to_s
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
577
|
+
# @return [Hash] Returns the object in the form of hash
|
|
578
|
+
def to_body
|
|
579
|
+
to_hash
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
# Returns the object in the form of hash
|
|
583
|
+
# @return [Hash] Returns the object in the form of hash
|
|
584
|
+
def to_hash
|
|
585
|
+
hash = {}
|
|
586
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
587
|
+
value = self.send(attr)
|
|
588
|
+
if value.nil?
|
|
589
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
590
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
hash[param] = _to_hash(value)
|
|
594
|
+
end
|
|
595
|
+
hash
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Outputs non-array value in the form of hash
|
|
599
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
600
|
+
# @param [Object] value Any valid value
|
|
601
|
+
# @return [Hash] Returns the value in the form of hash
|
|
602
|
+
def _to_hash(value)
|
|
603
|
+
if value.is_a?(Array)
|
|
604
|
+
value.compact.map { |v| _to_hash(v) }
|
|
605
|
+
elsif value.is_a?(Hash)
|
|
606
|
+
{}.tap do |hash|
|
|
607
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
608
|
+
end
|
|
609
|
+
elsif value.respond_to? :to_hash
|
|
610
|
+
value.to_hash
|
|
611
|
+
else
|
|
612
|
+
value
|
|
613
|
+
end
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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 SoleProprietorOwnershipType
|
|
28
|
+
RUN_BUSINESS_FOR_OWN_NAME = "RUN_BUSINESS_FOR_OWN_NAME".freeze
|
|
29
|
+
I_OR_MY_FAMILY_IS_PEP = "I_OR_MY_FAMILY_IS_PEP".freeze
|
|
30
|
+
RUN_BUSINESS_FOR_THIRD_PARTY = "RUN_BUSINESS_FOR_THIRD_PARTY".freeze
|
|
31
|
+
|
|
32
|
+
def self.all_vars
|
|
33
|
+
@all_vars ||= [RUN_BUSINESS_FOR_OWN_NAME, I_OR_MY_FAMILY_IS_PEP, RUN_BUSINESS_FOR_THIRD_PARTY].freeze
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Builds the enum from string
|
|
37
|
+
# @param [String] The enum value in the form of the string
|
|
38
|
+
# @return [String] The enum value
|
|
39
|
+
def self.build_from_hash(value)
|
|
40
|
+
new.build_from_hash(value)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Builds the enum from string
|
|
44
|
+
# @param [String] The enum value in the form of the string
|
|
45
|
+
# @return [String] The enum value
|
|
46
|
+
def build_from_hash(value)
|
|
47
|
+
return value if SoleProprietorOwnershipType.all_vars.include?(value)
|
|
48
|
+
raise "Invalid ENUM value #{value} for class #SoleProprietorOwnershipType"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|