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
|
@@ -52,6 +52,9 @@ module WalleeRubySdk
|
|
|
52
52
|
# The line items included in the refund, representing the reductions.
|
|
53
53
|
attr_accessor :line_items
|
|
54
54
|
|
|
55
|
+
# Allow to store additional information about the object.
|
|
56
|
+
attr_accessor :meta_data
|
|
57
|
+
|
|
55
58
|
# The date and time when the refund succeeded.
|
|
56
59
|
attr_accessor :succeeded_on
|
|
57
60
|
|
|
@@ -151,6 +154,7 @@ module WalleeRubySdk
|
|
|
151
154
|
:'type' => :'type',
|
|
152
155
|
:'created_on' => :'createdOn',
|
|
153
156
|
:'line_items' => :'lineItems',
|
|
157
|
+
:'meta_data' => :'metaData',
|
|
154
158
|
:'succeeded_on' => :'succeededOn',
|
|
155
159
|
:'reduced_line_items' => :'reducedLineItems',
|
|
156
160
|
:'id' => :'id',
|
|
@@ -199,6 +203,7 @@ module WalleeRubySdk
|
|
|
199
203
|
:'type' => :'RefundType',
|
|
200
204
|
:'created_on' => :'Time',
|
|
201
205
|
:'line_items' => :'Array<LineItem>',
|
|
206
|
+
:'meta_data' => :'Hash<String, String>',
|
|
202
207
|
:'succeeded_on' => :'Time',
|
|
203
208
|
:'reduced_line_items' => :'Array<LineItem>',
|
|
204
209
|
:'id' => :'Integer',
|
|
@@ -291,6 +296,12 @@ module WalleeRubySdk
|
|
|
291
296
|
end
|
|
292
297
|
end
|
|
293
298
|
|
|
299
|
+
if attributes.key?(:'meta_data')
|
|
300
|
+
if (value = attributes[:'meta_data']).is_a?(Hash)
|
|
301
|
+
self.meta_data = value
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
|
|
294
305
|
if attributes.key?(:'succeeded_on')
|
|
295
306
|
self.succeeded_on = attributes[:'succeeded_on']
|
|
296
307
|
end
|
|
@@ -525,6 +536,7 @@ module WalleeRubySdk
|
|
|
525
536
|
type == o.type &&
|
|
526
537
|
created_on == o.created_on &&
|
|
527
538
|
line_items == o.line_items &&
|
|
539
|
+
meta_data == o.meta_data &&
|
|
528
540
|
succeeded_on == o.succeeded_on &&
|
|
529
541
|
reduced_line_items == o.reduced_line_items &&
|
|
530
542
|
id == o.id &&
|
|
@@ -559,7 +571,7 @@ module WalleeRubySdk
|
|
|
559
571
|
# Calculates hash code according to all attributes.
|
|
560
572
|
# @return [Integer] Hash code
|
|
561
573
|
def hash
|
|
562
|
-
[total_settled_amount, reductions, base_line_items, processing_on, taxes, language, type, created_on, line_items, succeeded_on, reduced_line_items, id, state, merchant_reference, completion, amount, planned_purge_date, external_id, time_zone, version, labels, linked_space_id, timeout_on, environment, created_by, next_update_on, updated_invoice, failure_reason, total_applied_fees, failed_on, transaction, processor_reference].hash
|
|
574
|
+
[total_settled_amount, reductions, base_line_items, processing_on, taxes, language, type, created_on, line_items, meta_data, succeeded_on, reduced_line_items, id, state, merchant_reference, completion, amount, planned_purge_date, external_id, time_zone, version, labels, linked_space_id, timeout_on, environment, created_by, next_update_on, updated_invoice, failure_reason, total_applied_fees, failed_on, transaction, processor_reference].hash
|
|
563
575
|
end
|
|
564
576
|
|
|
565
577
|
# Builds the object from hash
|
|
@@ -29,6 +29,9 @@ module WalleeRubySdk
|
|
|
29
29
|
# The transaction completion that the refund belongs to.
|
|
30
30
|
attr_accessor :completion
|
|
31
31
|
|
|
32
|
+
# Allow to store additional information about the object.
|
|
33
|
+
attr_accessor :meta_data
|
|
34
|
+
|
|
32
35
|
# The total monetary amount of the refund, representing the exact credit issued to the customer.
|
|
33
36
|
attr_accessor :amount
|
|
34
37
|
|
|
@@ -72,6 +75,7 @@ module WalleeRubySdk
|
|
|
72
75
|
def self.attribute_map
|
|
73
76
|
{
|
|
74
77
|
:'completion' => :'completion',
|
|
78
|
+
:'meta_data' => :'metaData',
|
|
75
79
|
:'amount' => :'amount',
|
|
76
80
|
:'reductions' => :'reductions',
|
|
77
81
|
:'external_id' => :'externalId',
|
|
@@ -95,6 +99,7 @@ module WalleeRubySdk
|
|
|
95
99
|
def self.openapi_types
|
|
96
100
|
{
|
|
97
101
|
:'completion' => :'Integer',
|
|
102
|
+
:'meta_data' => :'Hash<String, String>',
|
|
98
103
|
:'amount' => :'Float',
|
|
99
104
|
:'reductions' => :'Array<LineItemReductionCreate>',
|
|
100
105
|
:'external_id' => :'String',
|
|
@@ -130,6 +135,12 @@ module WalleeRubySdk
|
|
|
130
135
|
self.completion = attributes[:'completion']
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
if attributes.key?(:'meta_data')
|
|
139
|
+
if (value = attributes[:'meta_data']).is_a?(Hash)
|
|
140
|
+
self.meta_data = value
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
133
144
|
if attributes.key?(:'amount')
|
|
134
145
|
self.amount = attributes[:'amount']
|
|
135
146
|
end
|
|
@@ -271,6 +282,7 @@ module WalleeRubySdk
|
|
|
271
282
|
return true if self.equal?(o)
|
|
272
283
|
self.class == o.class &&
|
|
273
284
|
completion == o.completion &&
|
|
285
|
+
meta_data == o.meta_data &&
|
|
274
286
|
amount == o.amount &&
|
|
275
287
|
reductions == o.reductions &&
|
|
276
288
|
external_id == o.external_id &&
|
|
@@ -288,7 +300,7 @@ module WalleeRubySdk
|
|
|
288
300
|
# Calculates hash code according to all attributes.
|
|
289
301
|
# @return [Integer] Hash code
|
|
290
302
|
def hash
|
|
291
|
-
[completion, amount, reductions, external_id, type, merchant_reference, transaction].hash
|
|
303
|
+
[completion, meta_data, amount, reductions, external_id, type, merchant_reference, transaction].hash
|
|
292
304
|
end
|
|
293
305
|
|
|
294
306
|
# Builds the object from hash
|
|
@@ -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 RefundDaysRange
|
|
28
|
+
ONE_TO_THIRTY_DAYS = "ONE_TO_THIRTY_DAYS".freeze
|
|
29
|
+
THIRTY_TO_SIXTY_DAYS = "THIRTY_TO_SIXTY_DAYS".freeze
|
|
30
|
+
OVER_SIXTY_DAYS = "OVER_SIXTY_DAYS".freeze
|
|
31
|
+
|
|
32
|
+
def self.all_vars
|
|
33
|
+
@all_vars ||= [ONE_TO_THIRTY_DAYS, THIRTY_TO_SIXTY_DAYS, OVER_SIXTY_DAYS].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 RefundDaysRange.all_vars.include?(value)
|
|
48
|
+
raise "Invalid ENUM value #{value} for class #RefundDaysRange"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
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 RefundPercentageRange
|
|
28
|
+
ONE_TO_FIVE = "ONE_TO_FIVE".freeze
|
|
29
|
+
FIVE_TO_TEN = "FIVE_TO_TEN".freeze
|
|
30
|
+
TEN_TO_FIFTEEN = "TEN_TO_FIFTEEN".freeze
|
|
31
|
+
FIFTEEN_TO_TWENTY = "FIFTEEN_TO_TWENTY".freeze
|
|
32
|
+
TWENTY_TO_THIRTY = "TWENTY_TO_THIRTY".freeze
|
|
33
|
+
THIRTY_TO_FORTY = "THIRTY_TO_FORTY".freeze
|
|
34
|
+
FORTY_TO_FIFTY = "FORTY_TO_FIFTY".freeze
|
|
35
|
+
OVER_FIFTY = "OVER_FIFTY".freeze
|
|
36
|
+
|
|
37
|
+
def self.all_vars
|
|
38
|
+
@all_vars ||= [ONE_TO_FIVE, FIVE_TO_TEN, TEN_TO_FIFTEEN, FIFTEEN_TO_TWENTY, TWENTY_TO_THIRTY, THIRTY_TO_FORTY, FORTY_TO_FIFTY, OVER_FIFTY].freeze
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Builds the enum from string
|
|
42
|
+
# @param [String] The enum value in the form of the string
|
|
43
|
+
# @return [String] The enum value
|
|
44
|
+
def self.build_from_hash(value)
|
|
45
|
+
new.build_from_hash(value)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Builds the enum from string
|
|
49
|
+
# @param [String] The enum value in the form of the string
|
|
50
|
+
# @return [String] The enum value
|
|
51
|
+
def build_from_hash(value)
|
|
52
|
+
return value if RefundPercentageRange.all_vars.include?(value)
|
|
53
|
+
raise "Invalid ENUM value #{value} for class #RefundPercentageRange"
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,329 @@
|
|
|
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 RelatedPerson
|
|
28
|
+
attr_accessor :email_address
|
|
29
|
+
|
|
30
|
+
attr_accessor :is_selected_shareholder_or_director
|
|
31
|
+
|
|
32
|
+
attr_accessor :place_of_birth
|
|
33
|
+
|
|
34
|
+
attr_accessor :identity_info
|
|
35
|
+
|
|
36
|
+
attr_accessor :nationality
|
|
37
|
+
|
|
38
|
+
attr_accessor :contact_language
|
|
39
|
+
|
|
40
|
+
attr_accessor :is_director
|
|
41
|
+
|
|
42
|
+
attr_accessor :representative_info
|
|
43
|
+
|
|
44
|
+
attr_accessor :job_role
|
|
45
|
+
|
|
46
|
+
attr_accessor :id
|
|
47
|
+
|
|
48
|
+
attr_accessor :company_share
|
|
49
|
+
|
|
50
|
+
attr_accessor :residence_address
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'email_address' => :'emailAddress',
|
|
56
|
+
:'is_selected_shareholder_or_director' => :'isSelectedShareholderOrDirector',
|
|
57
|
+
:'place_of_birth' => :'placeOfBirth',
|
|
58
|
+
:'identity_info' => :'identityInfo',
|
|
59
|
+
:'nationality' => :'nationality',
|
|
60
|
+
:'contact_language' => :'contactLanguage',
|
|
61
|
+
:'is_director' => :'isDirector',
|
|
62
|
+
:'representative_info' => :'representativeInfo',
|
|
63
|
+
:'job_role' => :'jobRole',
|
|
64
|
+
:'id' => :'id',
|
|
65
|
+
:'company_share' => :'companyShare',
|
|
66
|
+
:'residence_address' => :'residenceAddress'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'email_address' => :'String',
|
|
84
|
+
:'is_selected_shareholder_or_director' => :'Boolean',
|
|
85
|
+
:'place_of_birth' => :'String',
|
|
86
|
+
:'identity_info' => :'IdentityInfo',
|
|
87
|
+
:'nationality' => :'String',
|
|
88
|
+
:'contact_language' => :'String',
|
|
89
|
+
:'is_director' => :'Boolean',
|
|
90
|
+
:'representative_info' => :'RepresentativeInfo',
|
|
91
|
+
:'job_role' => :'String',
|
|
92
|
+
:'id' => :'String',
|
|
93
|
+
:'company_share' => :'Float',
|
|
94
|
+
:'residence_address' => :'BasicAddress'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# List of attributes with nullable: true
|
|
99
|
+
def self.openapi_nullable
|
|
100
|
+
Set.new([
|
|
101
|
+
])
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Initializes the object
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
def initialize(attributes = {})
|
|
107
|
+
if (!attributes.is_a?(Hash))
|
|
108
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::RelatedPerson` initialize method"
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
112
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
113
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
114
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
115
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::RelatedPerson`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
116
|
+
end
|
|
117
|
+
h[k.to_sym] = v
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'email_address')
|
|
121
|
+
self.email_address = attributes[:'email_address']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'is_selected_shareholder_or_director')
|
|
125
|
+
self.is_selected_shareholder_or_director = attributes[:'is_selected_shareholder_or_director']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'place_of_birth')
|
|
129
|
+
self.place_of_birth = attributes[:'place_of_birth']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'identity_info')
|
|
133
|
+
self.identity_info = attributes[:'identity_info']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'nationality')
|
|
137
|
+
self.nationality = attributes[:'nationality']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'contact_language')
|
|
141
|
+
self.contact_language = attributes[:'contact_language']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'is_director')
|
|
145
|
+
self.is_director = attributes[:'is_director']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'representative_info')
|
|
149
|
+
self.representative_info = attributes[:'representative_info']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'job_role')
|
|
153
|
+
self.job_role = attributes[:'job_role']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'id')
|
|
157
|
+
self.id = attributes[:'id']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'company_share')
|
|
161
|
+
self.company_share = attributes[:'company_share']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'residence_address')
|
|
165
|
+
self.residence_address = attributes[:'residence_address']
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
170
|
+
# @return Array for valid properties with the reasons
|
|
171
|
+
def list_invalid_properties
|
|
172
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
173
|
+
invalid_properties = Array.new
|
|
174
|
+
invalid_properties
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Check to see if the all the properties in the model are valid
|
|
178
|
+
# @return true if the model is valid
|
|
179
|
+
def valid?
|
|
180
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
181
|
+
true
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Checks equality by comparing each attribute.
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def ==(o)
|
|
187
|
+
return true if self.equal?(o)
|
|
188
|
+
self.class == o.class &&
|
|
189
|
+
email_address == o.email_address &&
|
|
190
|
+
is_selected_shareholder_or_director == o.is_selected_shareholder_or_director &&
|
|
191
|
+
place_of_birth == o.place_of_birth &&
|
|
192
|
+
identity_info == o.identity_info &&
|
|
193
|
+
nationality == o.nationality &&
|
|
194
|
+
contact_language == o.contact_language &&
|
|
195
|
+
is_director == o.is_director &&
|
|
196
|
+
representative_info == o.representative_info &&
|
|
197
|
+
job_role == o.job_role &&
|
|
198
|
+
id == o.id &&
|
|
199
|
+
company_share == o.company_share &&
|
|
200
|
+
residence_address == o.residence_address
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# @see the `==` method
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def eql?(o)
|
|
206
|
+
self == o
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Calculates hash code according to all attributes.
|
|
210
|
+
# @return [Integer] Hash code
|
|
211
|
+
def hash
|
|
212
|
+
[email_address, is_selected_shareholder_or_director, place_of_birth, identity_info, nationality, contact_language, is_director, representative_info, job_role, id, company_share, residence_address].hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Builds the object from hash
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
# @return [Object] Returns the model itself
|
|
218
|
+
def self.build_from_hash(attributes)
|
|
219
|
+
return nil unless attributes.is_a?(Hash)
|
|
220
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
221
|
+
transformed_hash = {}
|
|
222
|
+
openapi_types.each_pair do |key, type|
|
|
223
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
224
|
+
transformed_hash["#{key}"] = nil
|
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
226
|
+
# check to ensure the input is an array given that the attribute
|
|
227
|
+
# is documented as an array but the input is not
|
|
228
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
229
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
230
|
+
end
|
|
231
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
232
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
new(transformed_hash)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Deserializes the data based on type
|
|
239
|
+
# @param string type Data type
|
|
240
|
+
# @param string value Value to be deserialized
|
|
241
|
+
# @return [Object] Deserialized data
|
|
242
|
+
def self._deserialize(type, value)
|
|
243
|
+
case type.to_sym
|
|
244
|
+
when :Time
|
|
245
|
+
Time.parse(value)
|
|
246
|
+
when :Date
|
|
247
|
+
Date.parse(value)
|
|
248
|
+
when :String
|
|
249
|
+
value.to_s
|
|
250
|
+
when :Integer
|
|
251
|
+
value.to_i
|
|
252
|
+
when :Float
|
|
253
|
+
value.to_f
|
|
254
|
+
when :Boolean
|
|
255
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
256
|
+
true
|
|
257
|
+
else
|
|
258
|
+
false
|
|
259
|
+
end
|
|
260
|
+
when :Object
|
|
261
|
+
# generic object (usually a Hash), return directly
|
|
262
|
+
value
|
|
263
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
264
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
265
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
266
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
267
|
+
k_type = Regexp.last_match[:k_type]
|
|
268
|
+
v_type = Regexp.last_match[:v_type]
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each do |k, v|
|
|
271
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
else # model
|
|
275
|
+
# models (e.g. Pet) or oneOf
|
|
276
|
+
klass = WalleeRubySdk.const_get(type)
|
|
277
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Returns the string representation of the object
|
|
282
|
+
# @return [String] String presentation of the object
|
|
283
|
+
def to_s
|
|
284
|
+
to_hash.to_s
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
|
289
|
+
def to_body
|
|
290
|
+
to_hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Returns the object in the form of hash
|
|
294
|
+
# @return [Hash] Returns the object in the form of hash
|
|
295
|
+
def to_hash
|
|
296
|
+
hash = {}
|
|
297
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
298
|
+
value = self.send(attr)
|
|
299
|
+
if value.nil?
|
|
300
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
301
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
hash[param] = _to_hash(value)
|
|
305
|
+
end
|
|
306
|
+
hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Outputs non-array value in the form of hash
|
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
311
|
+
# @param [Object] value Any valid value
|
|
312
|
+
# @return [Hash] Returns the value in the form of hash
|
|
313
|
+
def _to_hash(value)
|
|
314
|
+
if value.is_a?(Array)
|
|
315
|
+
value.compact.map { |v| _to_hash(v) }
|
|
316
|
+
elsif value.is_a?(Hash)
|
|
317
|
+
{}.tap do |hash|
|
|
318
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
319
|
+
end
|
|
320
|
+
elsif value.respond_to? :to_hash
|
|
321
|
+
value.to_hash
|
|
322
|
+
else
|
|
323
|
+
value
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
end
|