postfinancecheckout-ruby-sdk 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/LICENSE +201 -0
- data/README.md +137 -0
- data/Rakefile +13 -0
- data/lib/.DS_Store +0 -0
- data/lib/postfinancecheckout-ruby-sdk.rb +392 -0
- data/lib/postfinancecheckout-ruby-sdk/api/account_service_api.rb +368 -0
- data/lib/postfinancecheckout-ruby-sdk/api/application_user_service_api.rb +368 -0
- data/lib/postfinancecheckout-ruby-sdk/api/bank_account_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/charge_attempt_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_level_payment_link_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_level_service_api.rb +276 -0
- data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_service_api.rb +348 -0
- data/lib/postfinancecheckout-ruby-sdk/api/condition_type_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/country_service_api.rb +81 -0
- data/lib/postfinancecheckout-ruby-sdk/api/country_state_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/currency_service_api.rb +81 -0
- data/lib/postfinancecheckout-ruby-sdk/api/customer_address_service_api.rb +460 -0
- data/lib/postfinancecheckout-ruby-sdk/api/customer_comment_service_api.rb +522 -0
- data/lib/postfinancecheckout-ruby-sdk/api/customer_service_api.rb +398 -0
- data/lib/postfinancecheckout-ruby-sdk/api/delivery_indication_service_api.rb +337 -0
- data/lib/postfinancecheckout-ruby-sdk/api/document_template_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/document_template_type_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/human_user_service_api.rb +425 -0
- data/lib/postfinancecheckout-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/label_description_group_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/label_description_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/language_service_api.rb +81 -0
- data/lib/postfinancecheckout-ruby-sdk/api/legal_organization_form_service_api.rb +197 -0
- data/lib/postfinancecheckout-ruby-sdk/api/manual_task_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_connector_configuration_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_connector_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_link_service_api.rb +398 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_method_brand_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_method_configuration_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_method_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_processor_configuration_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_processor_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_terminal_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
- data/lib/postfinancecheckout-ruby-sdk/api/permission_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/refund_comment_service_api.rb +464 -0
- data/lib/postfinancecheckout-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/refund_service_api.rb +532 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_recurring_order_service_api.rb +274 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscriber_service_api.rb +275 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_product_service_api.rb +337 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_service_api.rb +466 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_suspension_service_api.rb +337 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_version_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/api/space_service_api.rb +368 -0
- data/lib/postfinancecheckout-ruby-sdk/api/static_value_service_api.rb +139 -0
- data/lib/postfinancecheckout-ruby-sdk/api/token_service_api.rb +650 -0
- data/lib/postfinancecheckout-ruby-sdk/api/token_version_service_api.rb +276 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_comment_service_api.rb +464 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_completion_service_api.rb +463 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_iframe_service_api.rb +91 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_invoice_comment_service_api.rb +464 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_invoice_service_api.rb +600 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_lightbox_service_api.rb +91 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_mobile_sdk_service_api.rb +86 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_payment_page_service_api.rb +91 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_service_api.rb +1210 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_terminal_service_api.rb +161 -0
- data/lib/postfinancecheckout-ruby-sdk/api/transaction_void_service_api.rb +339 -0
- data/lib/postfinancecheckout-ruby-sdk/api/user_account_role_service_api.rb +219 -0
- data/lib/postfinancecheckout-ruby-sdk/api/user_space_role_service_api.rb +216 -0
- data/lib/postfinancecheckout-ruby-sdk/api/webhook_listener_service_api.rb +398 -0
- data/lib/postfinancecheckout-ruby-sdk/api/webhook_url_service_api.rb +398 -0
- data/lib/postfinancecheckout-ruby-sdk/api_client.rb +405 -0
- data/lib/postfinancecheckout-ruby-sdk/api_error.rb +43 -0
- data/lib/postfinancecheckout-ruby-sdk/configuration.rb +140 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_account_update.rb +234 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_application_user_update.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_active.rb +312 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_address_active.rb +200 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_comment_active.rb +205 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_human_user_update.rb +320 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_payment_link_update.rb +309 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_refund_comment_active.rb +205 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_shopify_subscription_product_update.rb +320 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_space_update.rb +286 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_token_update.rb +270 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_comment_active.rb +205 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_invoice_comment_active.rb +205 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_pending.rb +486 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_webhook_listener_update.rb +237 -0
- data/lib/postfinancecheckout-ruby-sdk/models/abstract_webhook_url_update.rb +249 -0
- data/lib/postfinancecheckout-ruby-sdk/models/account.rb +375 -0
- data/lib/postfinancecheckout-ruby-sdk/models/account_create.rb +260 -0
- data/lib/postfinancecheckout-ruby-sdk/models/account_state.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/account_type.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/account_update.rb +265 -0
- data/lib/postfinancecheckout-ruby-sdk/models/address.rb +606 -0
- data/lib/postfinancecheckout-ruby-sdk/models/address_create.rb +606 -0
- data/lib/postfinancecheckout-ruby-sdk/models/application_user.rb +286 -0
- data/lib/postfinancecheckout-ruby-sdk/models/application_user_create.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/application_user_create_with_mac_key.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/application_user_update.rb +256 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_account.rb +291 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_account_environment.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_account_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_account_type.rb +227 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction.rb +387 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_source.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_state.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge.rb +331 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt.rb +468 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt_environment.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_bank_transaction.rb +291 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow.rb +263 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level.rb +311 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_configuration.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_configuration_type.rb +227 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_payment_link.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/charge_type.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/client_error.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/client_error_type.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/completion_line_item.rb +226 -0
- data/lib/postfinancecheckout-ruby-sdk/models/completion_line_item_create.rb +245 -0
- data/lib/postfinancecheckout-ruby-sdk/models/condition.rb +266 -0
- data/lib/postfinancecheckout-ruby-sdk/models/condition_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/connector_invocation.rb +271 -0
- data/lib/postfinancecheckout-ruby-sdk/models/connector_invocation_stage.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/creation_entity_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/criteria_operator.rb +45 -0
- data/lib/postfinancecheckout-ruby-sdk/models/currency_bank_account.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer.rb +353 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_active.rb +343 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_address.rb +261 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_address_active.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_address_create.rb +216 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_address_type.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_comment.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_comment_active.rb +236 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_comment_create.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_create.rb +313 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_postal_address.rb +606 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customer_postal_address_create.rb +606 -0
- data/lib/postfinancecheckout-ruby-sdk/models/customers_presence.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/data_collection_type.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/database_translated_string.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/database_translated_string_item.rb +226 -0
- data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication.rb +321 -0
- data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication_decision_reason.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/document_template.rb +306 -0
- data/lib/postfinancecheckout-ruby-sdk/models/document_template_type.rb +235 -0
- data/lib/postfinancecheckout-ruby-sdk/models/document_template_type_group.rb +203 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_export_request.rb +208 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_query.rb +233 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_query_filter.rb +238 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_query_filter_type.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_query_order_by.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/entity_query_order_by_type.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/environment.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
- data/lib/postfinancecheckout-ruby-sdk/models/failure_category.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/failure_reason.rb +237 -0
- data/lib/postfinancecheckout-ruby-sdk/models/feature.rb +277 -0
- data/lib/postfinancecheckout-ruby-sdk/models/feature_category.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/gender.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/human_user.rb +361 -0
- data/lib/postfinancecheckout-ruby-sdk/models/human_user_create.rb +331 -0
- data/lib/postfinancecheckout-ruby-sdk/models/human_user_update.rb +351 -0
- data/lib/postfinancecheckout-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/label.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor.rb +267 -0
- data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_category.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_group.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/legal_organization_form.rb +235 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item.rb +449 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_attribute.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_attribute_create.rb +249 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_create.rb +372 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_reduction.rb +226 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_reduction_create.rb +245 -0
- data/lib/postfinancecheckout-ruby-sdk/models/line_item_type.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/localized_string.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/manual_task.rb +283 -0
- data/lib/postfinancecheckout-ruby-sdk/models/manual_task_action.rb +223 -0
- data/lib/postfinancecheckout-ruby-sdk/models/manual_task_action_style.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/manual_task_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/manual_task_type.rb +227 -0
- data/lib/postfinancecheckout-ruby-sdk/models/one_click_payment_mode.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_adjustment.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_adjustment_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_connector.rb +321 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_connector_configuration.rb +342 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_connector_feature.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_contract.rb +331 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_contract_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_contract_type.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_information_hash.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_information_hash_type.rb +203 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link.rb +390 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link_active.rb +350 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link_create.rb +345 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link_protection_mode.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_link_update.rb +340 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_method.rb +261 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_method_brand.rb +245 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_method_configuration.rb +370 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_primary_risk_taker.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_processor.rb +271 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_processor_configuration.rb +276 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal.rb +306 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_address.rb +396 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration.rb +266 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version.rb +323 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location.rb +266 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_version.rb +281 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_version_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_type.rb +215 -0
- data/lib/postfinancecheckout-ruby-sdk/models/permission.rb +299 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund.rb +567 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_bank_transaction.rb +281 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_comment.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_comment_active.rb +236 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_comment_create.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_create.rb +306 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_state.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/refund_type.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_document.rb +223 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt.rb +223 -0
- data/lib/postfinancecheckout-ruby-sdk/models/resource_path.rb +275 -0
- data/lib/postfinancecheckout-ruby-sdk/models/resource_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_address_format.rb +227 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_address_format_field.rb +43 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_country.rb +243 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_country_state.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_currency.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/rest_language.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/role.rb +263 -0
- data/lib/postfinancecheckout-ruby-sdk/models/role_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/sales_channel.rb +245 -0
- data/lib/postfinancecheckout-ruby-sdk/models/scope.rb +350 -0
- data/lib/postfinancecheckout-ruby-sdk/models/server_error.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration.rb +470 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration_subscription_app_version.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order.rb +351 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order_state.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order_update_request.rb +201 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber.rb +281 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription.rb +375 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_address.rb +546 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_billing_interval_unit.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_item.rb +233 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_tax_line.rb +201 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product.rb +471 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_create.rb +366 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_pricing_option.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_state.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_update.rb +351 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_state.rb +39 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension.rb +311 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_create.rb +226 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_initiator.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_state.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_type.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_update_request.rb +233 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version.rb +463 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_item.rb +233 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_item_price_strategy.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_weekday.rb +40 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_tax_line.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_transaction.rb +301 -0
- data/lib/postfinancecheckout-ruby-sdk/models/shopify_transaction_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space.rb +407 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space_address.rb +416 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space_address_create.rb +416 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space_create.rb +302 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space_update.rb +317 -0
- data/lib/postfinancecheckout-ruby-sdk/models/space_view.rb +275 -0
- data/lib/postfinancecheckout-ruby-sdk/models/static_value.rb +227 -0
- data/lib/postfinancecheckout-ruby-sdk/models/tax.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/tax_create.rb +239 -0
- data/lib/postfinancecheckout-ruby-sdk/models/tenant_database.rb +226 -0
- data/lib/postfinancecheckout-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/terminal_receipt_format.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token.rb +341 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token_create.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token_update.rb +301 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token_version.rb +445 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token_version_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/token_version_type.rb +225 -0
- data/lib/postfinancecheckout-ruby-sdk/models/tokenization_mode.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction.rb +1011 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_aware_entity.rb +211 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment_active.rb +236 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment_create.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion.rb +528 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_mode.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_request.rb +291 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_state.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_create.rb +596 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_environment_selection_strategy.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_group.rb +276 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_group_state.rb +36 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice.rb +452 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment_active.rb +236 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment_create.rb +221 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_replacement.rb +296 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_state.rb +40 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_line_item_update_request.rb +208 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_line_item_version.rb +313 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_pending.rb +517 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_state.rb +43 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_user_interface_type.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_void.rb +373 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_void_mode.rb +35 -0
- data/lib/postfinancecheckout-ruby-sdk/models/transaction_void_state.rb +37 -0
- data/lib/postfinancecheckout-ruby-sdk/models/two_factor_authentication_type.rb +235 -0
- data/lib/postfinancecheckout-ruby-sdk/models/user.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/user_account_role.rb +241 -0
- data/lib/postfinancecheckout-ruby-sdk/models/user_space_role.rb +231 -0
- data/lib/postfinancecheckout-ruby-sdk/models/user_type.rb +38 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_identity.rb +256 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener.rb +308 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_create.rb +278 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_entity.rb +213 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_update.rb +268 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_url.rb +300 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_url_create.rb +250 -0
- data/lib/postfinancecheckout-ruby-sdk/models/webhook_url_update.rb +280 -0
- data/lib/postfinancecheckout-ruby-sdk/version.rb +20 -0
- data/postfinancecheckout-ruby-sdk.gemspec +44 -0
- data/test/condition_type_service_test.rb +22 -0
- data/test/transaction_create_service_test.rb +89 -0
- data/test/transaction_payment_page_service_test.rb +91 -0
- metadata +469 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
class TokenVersionState
|
22
|
+
|
23
|
+
UNINITIALIZED = 'UNINITIALIZED'.freeze
|
24
|
+
ACTIVE = 'ACTIVE'.freeze
|
25
|
+
OBSOLETE = 'OBSOLETE'.freeze
|
26
|
+
|
27
|
+
# Builds the enum from string
|
28
|
+
# @param [String] The enum value in the form of the string
|
29
|
+
# @return [String] The enum value
|
30
|
+
def build_from_hash(value)
|
31
|
+
constantValues = TokenVersionState.constants.select { |c| TokenVersionState::const_get(c) == value }
|
32
|
+
raise "Invalid ENUM value #{value} for class #TokenVersionState" if constantValues.empty?
|
33
|
+
value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,225 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
#
|
22
|
+
class TokenVersionType
|
23
|
+
#
|
24
|
+
attr_accessor :description
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :feature
|
28
|
+
|
29
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :name
|
34
|
+
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
36
|
+
def self.attribute_map
|
37
|
+
{
|
38
|
+
:'description' => :'description',
|
39
|
+
:'feature' => :'feature',
|
40
|
+
:'id' => :'id',
|
41
|
+
:'name' => :'name'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.swagger_types
|
47
|
+
{
|
48
|
+
:'description' => :'Hash<String, String>',
|
49
|
+
:'feature' => :'Feature',
|
50
|
+
:'id' => :'Integer',
|
51
|
+
:'name' => :'Hash<String, String>'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
return unless attributes.is_a?(Hash)
|
59
|
+
|
60
|
+
# convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
62
|
+
|
63
|
+
if attributes.has_key?(:'description')
|
64
|
+
if (value = attributes[:'description']).is_a?(Hash)
|
65
|
+
self.description = value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'feature')
|
70
|
+
self.feature = attributes[:'feature']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'id')
|
74
|
+
self.id = attributes[:'id']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'name')
|
78
|
+
if (value = attributes[:'name']).is_a?(Hash)
|
79
|
+
self.name = value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
+
# @return Array for valid properties with the reasons
|
86
|
+
def list_invalid_properties
|
87
|
+
invalid_properties = Array.new
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
description == o.description &&
|
103
|
+
feature == o.feature &&
|
104
|
+
id == o.id &&
|
105
|
+
name == o.name
|
106
|
+
end
|
107
|
+
|
108
|
+
# @see the `==` method
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def eql?(o)
|
111
|
+
self == o
|
112
|
+
end
|
113
|
+
|
114
|
+
# Calculates hash code according to all attributes.
|
115
|
+
# @return [Fixnum] Hash code
|
116
|
+
def hash
|
117
|
+
[description, feature, id, name].hash
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.swagger_types.each_pair do |key, type|
|
126
|
+
if 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[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :BOOLEAN
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
178
|
+
temp_model.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
|
+
next if value.nil?
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map{ |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
class TokenizationMode
|
22
|
+
|
23
|
+
FORCE_UPDATE = 'FORCE_UPDATE'.freeze
|
24
|
+
FORCE_CREATION = 'FORCE_CREATION'.freeze
|
25
|
+
FORCE_CREATION_WITH_ONE_CLICK_PAYMENT = 'FORCE_CREATION_WITH_ONE_CLICK_PAYMENT'.freeze
|
26
|
+
ALLOW_ONE_CLICK_PAYMENT = 'ALLOW_ONE_CLICK_PAYMENT'.freeze
|
27
|
+
|
28
|
+
# Builds the enum from string
|
29
|
+
# @param [String] The enum value in the form of the string
|
30
|
+
# @return [String] The enum value
|
31
|
+
def build_from_hash(value)
|
32
|
+
constantValues = TokenizationMode.constants.select { |c| TokenizationMode::const_get(c) == value }
|
33
|
+
raise "Invalid ENUM value #{value} for class #TokenizationMode" if constantValues.empty?
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,1011 @@
|
|
1
|
+
=begin
|
2
|
+
The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout web service.
|
3
|
+
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
you may not use this file except in compliance with the License.
|
6
|
+
You may obtain a copy of the License at
|
7
|
+
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
See the License for the specific language governing permissions and
|
14
|
+
limitations under the License.
|
15
|
+
|
16
|
+
=end
|
17
|
+
|
18
|
+
require 'date'
|
19
|
+
|
20
|
+
module PostFinanceCheckout
|
21
|
+
#
|
22
|
+
class Transaction
|
23
|
+
#
|
24
|
+
attr_accessor :accept_header
|
25
|
+
|
26
|
+
# The accept language contains the header which indicates the language preferences of the buyer.
|
27
|
+
attr_accessor :accept_language_header
|
28
|
+
|
29
|
+
#
|
30
|
+
attr_accessor :allowed_payment_method_brands
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :allowed_payment_method_configurations
|
34
|
+
|
35
|
+
#
|
36
|
+
attr_accessor :authorization_amount
|
37
|
+
|
38
|
+
# The environment in which this transaction was successfully authorized.
|
39
|
+
attr_accessor :authorization_environment
|
40
|
+
|
41
|
+
# The sales channel through which the transaction was placed.
|
42
|
+
attr_accessor :authorization_sales_channel
|
43
|
+
|
44
|
+
# This is the time on which the transaction will be timed out when it is not at least authorized. The timeout time may change over time.
|
45
|
+
attr_accessor :authorization_timeout_on
|
46
|
+
|
47
|
+
#
|
48
|
+
attr_accessor :authorized_on
|
49
|
+
|
50
|
+
# When auto confirmation is enabled the transaction can be confirmed by the user and does not require an explicit confirmation through the web service API.
|
51
|
+
attr_accessor :auto_confirmation_enabled
|
52
|
+
|
53
|
+
#
|
54
|
+
attr_accessor :billing_address
|
55
|
+
|
56
|
+
# When the charging of the customer fails we can retry the charging. This implies that we redirect the user back to the payment page which allows the customer to retry. By default we will retry.
|
57
|
+
attr_accessor :charge_retry_enabled
|
58
|
+
|
59
|
+
# The completed amount is the total amount which has been captured so far.
|
60
|
+
attr_accessor :completed_amount
|
61
|
+
|
62
|
+
#
|
63
|
+
attr_accessor :completed_on
|
64
|
+
|
65
|
+
# The completion behavior controls when the transaction is completed.
|
66
|
+
attr_accessor :completion_behavior
|
67
|
+
|
68
|
+
#
|
69
|
+
attr_accessor :completion_timeout_on
|
70
|
+
|
71
|
+
#
|
72
|
+
attr_accessor :confirmed_by
|
73
|
+
|
74
|
+
#
|
75
|
+
attr_accessor :confirmed_on
|
76
|
+
|
77
|
+
#
|
78
|
+
attr_accessor :created_by
|
79
|
+
|
80
|
+
# The created on date indicates the date on which the entity was stored into the database.
|
81
|
+
attr_accessor :created_on
|
82
|
+
|
83
|
+
#
|
84
|
+
attr_accessor :currency
|
85
|
+
|
86
|
+
# The customer email address is the email address of the customer. If no email address is provided on the shipping or billing address this address is used.
|
87
|
+
attr_accessor :customer_email_address
|
88
|
+
|
89
|
+
#
|
90
|
+
attr_accessor :customer_id
|
91
|
+
|
92
|
+
# The customer's presence indicates what kind of authentication methods can be used during the authorization of the transaction. If no value is provided, 'Virtually Present' is used by default.
|
93
|
+
attr_accessor :customers_presence
|
94
|
+
|
95
|
+
# This date indicates when the decision has been made if a transaction should be delivered or not.
|
96
|
+
attr_accessor :delivery_decision_made_on
|
97
|
+
|
98
|
+
# The device session identifier links the transaction with the session identifier provided in the URL of the device data JavaScript. This allows to link the transaction with the collected device data of the buyer.
|
99
|
+
attr_accessor :device_session_identifier
|
100
|
+
|
101
|
+
# Flag indicating whether email sending is disabled for this particular transaction. Defaults to false.
|
102
|
+
attr_accessor :emails_disabled
|
103
|
+
|
104
|
+
# The transaction's end of life indicates the date from which on no operation can be carried out anymore.
|
105
|
+
attr_accessor :end_of_life
|
106
|
+
|
107
|
+
#
|
108
|
+
attr_accessor :environment
|
109
|
+
|
110
|
+
# The environment selection strategy determines how the environment (test or production) for processing the transaction is selected.
|
111
|
+
attr_accessor :environment_selection_strategy
|
112
|
+
|
113
|
+
#
|
114
|
+
attr_accessor :failed_on
|
115
|
+
|
116
|
+
# The user will be redirected to failed URL when the transaction could not be authorized or completed. In case no failed URL is specified a default failed page will be displayed.
|
117
|
+
attr_accessor :failed_url
|
118
|
+
|
119
|
+
# The failure reason describes why the transaction failed. This is only provided when the transaction is marked as failed.
|
120
|
+
attr_accessor :failure_reason
|
121
|
+
|
122
|
+
#
|
123
|
+
attr_accessor :group
|
124
|
+
|
125
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
126
|
+
attr_accessor :id
|
127
|
+
|
128
|
+
# The Internet Protocol (IP) address identifies the device of the buyer.
|
129
|
+
attr_accessor :internet_protocol_address
|
130
|
+
|
131
|
+
#
|
132
|
+
attr_accessor :internet_protocol_address_country
|
133
|
+
|
134
|
+
#
|
135
|
+
attr_accessor :invoice_merchant_reference
|
136
|
+
|
137
|
+
#
|
138
|
+
attr_accessor :java_enabled
|
139
|
+
|
140
|
+
#
|
141
|
+
attr_accessor :language
|
142
|
+
|
143
|
+
#
|
144
|
+
attr_accessor :line_items
|
145
|
+
|
146
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
147
|
+
attr_accessor :linked_space_id
|
148
|
+
|
149
|
+
#
|
150
|
+
attr_accessor :merchant_reference
|
151
|
+
|
152
|
+
# Meta data allow to store additional data along the object.
|
153
|
+
attr_accessor :meta_data
|
154
|
+
|
155
|
+
#
|
156
|
+
attr_accessor :parent
|
157
|
+
|
158
|
+
#
|
159
|
+
attr_accessor :payment_connector_configuration
|
160
|
+
|
161
|
+
# The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
|
162
|
+
attr_accessor :planned_purge_date
|
163
|
+
|
164
|
+
#
|
165
|
+
attr_accessor :processing_on
|
166
|
+
|
167
|
+
# The refunded amount is the total amount which has been refunded so far.
|
168
|
+
attr_accessor :refunded_amount
|
169
|
+
|
170
|
+
#
|
171
|
+
attr_accessor :screen_color_depth
|
172
|
+
|
173
|
+
#
|
174
|
+
attr_accessor :screen_height
|
175
|
+
|
176
|
+
#
|
177
|
+
attr_accessor :screen_width
|
178
|
+
|
179
|
+
#
|
180
|
+
attr_accessor :shipping_address
|
181
|
+
|
182
|
+
#
|
183
|
+
attr_accessor :shipping_method
|
184
|
+
|
185
|
+
#
|
186
|
+
attr_accessor :space_view_id
|
187
|
+
|
188
|
+
#
|
189
|
+
attr_accessor :state
|
190
|
+
|
191
|
+
# The user will be redirected to success URL when the transaction could be authorized or completed. In case no success URL is specified a default success page will be displayed.
|
192
|
+
attr_accessor :success_url
|
193
|
+
|
194
|
+
# The terminal on which the payment was processed.
|
195
|
+
attr_accessor :terminal
|
196
|
+
|
197
|
+
# The time zone defines in which time zone the customer is located in. The time zone may affects how dates are formatted when interacting with the customer.
|
198
|
+
attr_accessor :time_zone
|
199
|
+
|
200
|
+
#
|
201
|
+
attr_accessor :token
|
202
|
+
|
203
|
+
# The tokenization mode controls if and how the tokenization of payment information is applied to the transaction.
|
204
|
+
attr_accessor :tokenization_mode
|
205
|
+
|
206
|
+
# The total applied fees is the sum of all fees that have been applied so far.
|
207
|
+
attr_accessor :total_applied_fees
|
208
|
+
|
209
|
+
# The total settled amount is the total amount which has been settled so far.
|
210
|
+
attr_accessor :total_settled_amount
|
211
|
+
|
212
|
+
# The user agent header provides the exact string which contains the user agent of the buyer.
|
213
|
+
attr_accessor :user_agent_header
|
214
|
+
|
215
|
+
# The failure message describes for an end user why the transaction is failed in the language of the user. This is only provided when the transaction is marked as failed.
|
216
|
+
attr_accessor :user_failure_message
|
217
|
+
|
218
|
+
# The user interface type defines through which user interface the transaction has been processed resp. created.
|
219
|
+
attr_accessor :user_interface_type
|
220
|
+
|
221
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
222
|
+
attr_accessor :version
|
223
|
+
|
224
|
+
#
|
225
|
+
attr_accessor :window_height
|
226
|
+
|
227
|
+
#
|
228
|
+
attr_accessor :window_width
|
229
|
+
|
230
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
231
|
+
def self.attribute_map
|
232
|
+
{
|
233
|
+
:'accept_header' => :'acceptHeader',
|
234
|
+
:'accept_language_header' => :'acceptLanguageHeader',
|
235
|
+
:'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
|
236
|
+
:'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
|
237
|
+
:'authorization_amount' => :'authorizationAmount',
|
238
|
+
:'authorization_environment' => :'authorizationEnvironment',
|
239
|
+
:'authorization_sales_channel' => :'authorizationSalesChannel',
|
240
|
+
:'authorization_timeout_on' => :'authorizationTimeoutOn',
|
241
|
+
:'authorized_on' => :'authorizedOn',
|
242
|
+
:'auto_confirmation_enabled' => :'autoConfirmationEnabled',
|
243
|
+
:'billing_address' => :'billingAddress',
|
244
|
+
:'charge_retry_enabled' => :'chargeRetryEnabled',
|
245
|
+
:'completed_amount' => :'completedAmount',
|
246
|
+
:'completed_on' => :'completedOn',
|
247
|
+
:'completion_behavior' => :'completionBehavior',
|
248
|
+
:'completion_timeout_on' => :'completionTimeoutOn',
|
249
|
+
:'confirmed_by' => :'confirmedBy',
|
250
|
+
:'confirmed_on' => :'confirmedOn',
|
251
|
+
:'created_by' => :'createdBy',
|
252
|
+
:'created_on' => :'createdOn',
|
253
|
+
:'currency' => :'currency',
|
254
|
+
:'customer_email_address' => :'customerEmailAddress',
|
255
|
+
:'customer_id' => :'customerId',
|
256
|
+
:'customers_presence' => :'customersPresence',
|
257
|
+
:'delivery_decision_made_on' => :'deliveryDecisionMadeOn',
|
258
|
+
:'device_session_identifier' => :'deviceSessionIdentifier',
|
259
|
+
:'emails_disabled' => :'emailsDisabled',
|
260
|
+
:'end_of_life' => :'endOfLife',
|
261
|
+
:'environment' => :'environment',
|
262
|
+
:'environment_selection_strategy' => :'environmentSelectionStrategy',
|
263
|
+
:'failed_on' => :'failedOn',
|
264
|
+
:'failed_url' => :'failedUrl',
|
265
|
+
:'failure_reason' => :'failureReason',
|
266
|
+
:'group' => :'group',
|
267
|
+
:'id' => :'id',
|
268
|
+
:'internet_protocol_address' => :'internetProtocolAddress',
|
269
|
+
:'internet_protocol_address_country' => :'internetProtocolAddressCountry',
|
270
|
+
:'invoice_merchant_reference' => :'invoiceMerchantReference',
|
271
|
+
:'java_enabled' => :'javaEnabled',
|
272
|
+
:'language' => :'language',
|
273
|
+
:'line_items' => :'lineItems',
|
274
|
+
:'linked_space_id' => :'linkedSpaceId',
|
275
|
+
:'merchant_reference' => :'merchantReference',
|
276
|
+
:'meta_data' => :'metaData',
|
277
|
+
:'parent' => :'parent',
|
278
|
+
:'payment_connector_configuration' => :'paymentConnectorConfiguration',
|
279
|
+
:'planned_purge_date' => :'plannedPurgeDate',
|
280
|
+
:'processing_on' => :'processingOn',
|
281
|
+
:'refunded_amount' => :'refundedAmount',
|
282
|
+
:'screen_color_depth' => :'screenColorDepth',
|
283
|
+
:'screen_height' => :'screenHeight',
|
284
|
+
:'screen_width' => :'screenWidth',
|
285
|
+
:'shipping_address' => :'shippingAddress',
|
286
|
+
:'shipping_method' => :'shippingMethod',
|
287
|
+
:'space_view_id' => :'spaceViewId',
|
288
|
+
:'state' => :'state',
|
289
|
+
:'success_url' => :'successUrl',
|
290
|
+
:'terminal' => :'terminal',
|
291
|
+
:'time_zone' => :'timeZone',
|
292
|
+
:'token' => :'token',
|
293
|
+
:'tokenization_mode' => :'tokenizationMode',
|
294
|
+
:'total_applied_fees' => :'totalAppliedFees',
|
295
|
+
:'total_settled_amount' => :'totalSettledAmount',
|
296
|
+
:'user_agent_header' => :'userAgentHeader',
|
297
|
+
:'user_failure_message' => :'userFailureMessage',
|
298
|
+
:'user_interface_type' => :'userInterfaceType',
|
299
|
+
:'version' => :'version',
|
300
|
+
:'window_height' => :'windowHeight',
|
301
|
+
:'window_width' => :'windowWidth'
|
302
|
+
}
|
303
|
+
end
|
304
|
+
|
305
|
+
# Attribute type mapping.
|
306
|
+
def self.swagger_types
|
307
|
+
{
|
308
|
+
:'accept_header' => :'String',
|
309
|
+
:'accept_language_header' => :'String',
|
310
|
+
:'allowed_payment_method_brands' => :'Array<PaymentMethodBrand>',
|
311
|
+
:'allowed_payment_method_configurations' => :'Array<Integer>',
|
312
|
+
:'authorization_amount' => :'Float',
|
313
|
+
:'authorization_environment' => :'ChargeAttemptEnvironment',
|
314
|
+
:'authorization_sales_channel' => :'Integer',
|
315
|
+
:'authorization_timeout_on' => :'DateTime',
|
316
|
+
:'authorized_on' => :'DateTime',
|
317
|
+
:'auto_confirmation_enabled' => :'BOOLEAN',
|
318
|
+
:'billing_address' => :'Address',
|
319
|
+
:'charge_retry_enabled' => :'BOOLEAN',
|
320
|
+
:'completed_amount' => :'Float',
|
321
|
+
:'completed_on' => :'DateTime',
|
322
|
+
:'completion_behavior' => :'TransactionCompletionBehavior',
|
323
|
+
:'completion_timeout_on' => :'DateTime',
|
324
|
+
:'confirmed_by' => :'Integer',
|
325
|
+
:'confirmed_on' => :'DateTime',
|
326
|
+
:'created_by' => :'Integer',
|
327
|
+
:'created_on' => :'DateTime',
|
328
|
+
:'currency' => :'String',
|
329
|
+
:'customer_email_address' => :'String',
|
330
|
+
:'customer_id' => :'String',
|
331
|
+
:'customers_presence' => :'CustomersPresence',
|
332
|
+
:'delivery_decision_made_on' => :'DateTime',
|
333
|
+
:'device_session_identifier' => :'String',
|
334
|
+
:'emails_disabled' => :'BOOLEAN',
|
335
|
+
:'end_of_life' => :'DateTime',
|
336
|
+
:'environment' => :'Environment',
|
337
|
+
:'environment_selection_strategy' => :'TransactionEnvironmentSelectionStrategy',
|
338
|
+
:'failed_on' => :'DateTime',
|
339
|
+
:'failed_url' => :'String',
|
340
|
+
:'failure_reason' => :'FailureReason',
|
341
|
+
:'group' => :'TransactionGroup',
|
342
|
+
:'id' => :'Integer',
|
343
|
+
:'internet_protocol_address' => :'String',
|
344
|
+
:'internet_protocol_address_country' => :'String',
|
345
|
+
:'invoice_merchant_reference' => :'String',
|
346
|
+
:'java_enabled' => :'BOOLEAN',
|
347
|
+
:'language' => :'String',
|
348
|
+
:'line_items' => :'Array<LineItem>',
|
349
|
+
:'linked_space_id' => :'Integer',
|
350
|
+
:'merchant_reference' => :'String',
|
351
|
+
:'meta_data' => :'Hash<String, String>',
|
352
|
+
:'parent' => :'Integer',
|
353
|
+
:'payment_connector_configuration' => :'PaymentConnectorConfiguration',
|
354
|
+
:'planned_purge_date' => :'DateTime',
|
355
|
+
:'processing_on' => :'DateTime',
|
356
|
+
:'refunded_amount' => :'Float',
|
357
|
+
:'screen_color_depth' => :'String',
|
358
|
+
:'screen_height' => :'String',
|
359
|
+
:'screen_width' => :'String',
|
360
|
+
:'shipping_address' => :'Address',
|
361
|
+
:'shipping_method' => :'String',
|
362
|
+
:'space_view_id' => :'Integer',
|
363
|
+
:'state' => :'TransactionState',
|
364
|
+
:'success_url' => :'String',
|
365
|
+
:'terminal' => :'PaymentTerminal',
|
366
|
+
:'time_zone' => :'String',
|
367
|
+
:'token' => :'Token',
|
368
|
+
:'tokenization_mode' => :'TokenizationMode',
|
369
|
+
:'total_applied_fees' => :'Float',
|
370
|
+
:'total_settled_amount' => :'Float',
|
371
|
+
:'user_agent_header' => :'String',
|
372
|
+
:'user_failure_message' => :'String',
|
373
|
+
:'user_interface_type' => :'TransactionUserInterfaceType',
|
374
|
+
:'version' => :'Integer',
|
375
|
+
:'window_height' => :'String',
|
376
|
+
:'window_width' => :'String'
|
377
|
+
}
|
378
|
+
end
|
379
|
+
|
380
|
+
# Initializes the object
|
381
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
382
|
+
def initialize(attributes = {})
|
383
|
+
return unless attributes.is_a?(Hash)
|
384
|
+
|
385
|
+
# convert string to symbol for hash key
|
386
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
387
|
+
|
388
|
+
if attributes.has_key?(:'acceptHeader')
|
389
|
+
self.accept_header = attributes[:'acceptHeader']
|
390
|
+
end
|
391
|
+
|
392
|
+
if attributes.has_key?(:'acceptLanguageHeader')
|
393
|
+
self.accept_language_header = attributes[:'acceptLanguageHeader']
|
394
|
+
end
|
395
|
+
|
396
|
+
if attributes.has_key?(:'allowedPaymentMethodBrands')
|
397
|
+
if (value = attributes[:'allowedPaymentMethodBrands']).is_a?(Array)
|
398
|
+
self.allowed_payment_method_brands = value
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
if attributes.has_key?(:'allowedPaymentMethodConfigurations')
|
403
|
+
if (value = attributes[:'allowedPaymentMethodConfigurations']).is_a?(Array)
|
404
|
+
self.allowed_payment_method_configurations = value
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
if attributes.has_key?(:'authorizationAmount')
|
409
|
+
self.authorization_amount = attributes[:'authorizationAmount']
|
410
|
+
end
|
411
|
+
|
412
|
+
if attributes.has_key?(:'authorizationEnvironment')
|
413
|
+
self.authorization_environment = attributes[:'authorizationEnvironment']
|
414
|
+
end
|
415
|
+
|
416
|
+
if attributes.has_key?(:'authorizationSalesChannel')
|
417
|
+
self.authorization_sales_channel = attributes[:'authorizationSalesChannel']
|
418
|
+
end
|
419
|
+
|
420
|
+
if attributes.has_key?(:'authorizationTimeoutOn')
|
421
|
+
self.authorization_timeout_on = attributes[:'authorizationTimeoutOn']
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.has_key?(:'authorizedOn')
|
425
|
+
self.authorized_on = attributes[:'authorizedOn']
|
426
|
+
end
|
427
|
+
|
428
|
+
if attributes.has_key?(:'autoConfirmationEnabled')
|
429
|
+
self.auto_confirmation_enabled = attributes[:'autoConfirmationEnabled']
|
430
|
+
end
|
431
|
+
|
432
|
+
if attributes.has_key?(:'billingAddress')
|
433
|
+
self.billing_address = attributes[:'billingAddress']
|
434
|
+
end
|
435
|
+
|
436
|
+
if attributes.has_key?(:'chargeRetryEnabled')
|
437
|
+
self.charge_retry_enabled = attributes[:'chargeRetryEnabled']
|
438
|
+
end
|
439
|
+
|
440
|
+
if attributes.has_key?(:'completedAmount')
|
441
|
+
self.completed_amount = attributes[:'completedAmount']
|
442
|
+
end
|
443
|
+
|
444
|
+
if attributes.has_key?(:'completedOn')
|
445
|
+
self.completed_on = attributes[:'completedOn']
|
446
|
+
end
|
447
|
+
|
448
|
+
if attributes.has_key?(:'completionBehavior')
|
449
|
+
self.completion_behavior = attributes[:'completionBehavior']
|
450
|
+
end
|
451
|
+
|
452
|
+
if attributes.has_key?(:'completionTimeoutOn')
|
453
|
+
self.completion_timeout_on = attributes[:'completionTimeoutOn']
|
454
|
+
end
|
455
|
+
|
456
|
+
if attributes.has_key?(:'confirmedBy')
|
457
|
+
self.confirmed_by = attributes[:'confirmedBy']
|
458
|
+
end
|
459
|
+
|
460
|
+
if attributes.has_key?(:'confirmedOn')
|
461
|
+
self.confirmed_on = attributes[:'confirmedOn']
|
462
|
+
end
|
463
|
+
|
464
|
+
if attributes.has_key?(:'createdBy')
|
465
|
+
self.created_by = attributes[:'createdBy']
|
466
|
+
end
|
467
|
+
|
468
|
+
if attributes.has_key?(:'createdOn')
|
469
|
+
self.created_on = attributes[:'createdOn']
|
470
|
+
end
|
471
|
+
|
472
|
+
if attributes.has_key?(:'currency')
|
473
|
+
self.currency = attributes[:'currency']
|
474
|
+
end
|
475
|
+
|
476
|
+
if attributes.has_key?(:'customerEmailAddress')
|
477
|
+
self.customer_email_address = attributes[:'customerEmailAddress']
|
478
|
+
end
|
479
|
+
|
480
|
+
if attributes.has_key?(:'customerId')
|
481
|
+
self.customer_id = attributes[:'customerId']
|
482
|
+
end
|
483
|
+
|
484
|
+
if attributes.has_key?(:'customersPresence')
|
485
|
+
self.customers_presence = attributes[:'customersPresence']
|
486
|
+
end
|
487
|
+
|
488
|
+
if attributes.has_key?(:'deliveryDecisionMadeOn')
|
489
|
+
self.delivery_decision_made_on = attributes[:'deliveryDecisionMadeOn']
|
490
|
+
end
|
491
|
+
|
492
|
+
if attributes.has_key?(:'deviceSessionIdentifier')
|
493
|
+
self.device_session_identifier = attributes[:'deviceSessionIdentifier']
|
494
|
+
end
|
495
|
+
|
496
|
+
if attributes.has_key?(:'emailsDisabled')
|
497
|
+
self.emails_disabled = attributes[:'emailsDisabled']
|
498
|
+
end
|
499
|
+
|
500
|
+
if attributes.has_key?(:'endOfLife')
|
501
|
+
self.end_of_life = attributes[:'endOfLife']
|
502
|
+
end
|
503
|
+
|
504
|
+
if attributes.has_key?(:'environment')
|
505
|
+
self.environment = attributes[:'environment']
|
506
|
+
end
|
507
|
+
|
508
|
+
if attributes.has_key?(:'environmentSelectionStrategy')
|
509
|
+
self.environment_selection_strategy = attributes[:'environmentSelectionStrategy']
|
510
|
+
end
|
511
|
+
|
512
|
+
if attributes.has_key?(:'failedOn')
|
513
|
+
self.failed_on = attributes[:'failedOn']
|
514
|
+
end
|
515
|
+
|
516
|
+
if attributes.has_key?(:'failedUrl')
|
517
|
+
self.failed_url = attributes[:'failedUrl']
|
518
|
+
end
|
519
|
+
|
520
|
+
if attributes.has_key?(:'failureReason')
|
521
|
+
self.failure_reason = attributes[:'failureReason']
|
522
|
+
end
|
523
|
+
|
524
|
+
if attributes.has_key?(:'group')
|
525
|
+
self.group = attributes[:'group']
|
526
|
+
end
|
527
|
+
|
528
|
+
if attributes.has_key?(:'id')
|
529
|
+
self.id = attributes[:'id']
|
530
|
+
end
|
531
|
+
|
532
|
+
if attributes.has_key?(:'internetProtocolAddress')
|
533
|
+
self.internet_protocol_address = attributes[:'internetProtocolAddress']
|
534
|
+
end
|
535
|
+
|
536
|
+
if attributes.has_key?(:'internetProtocolAddressCountry')
|
537
|
+
self.internet_protocol_address_country = attributes[:'internetProtocolAddressCountry']
|
538
|
+
end
|
539
|
+
|
540
|
+
if attributes.has_key?(:'invoiceMerchantReference')
|
541
|
+
self.invoice_merchant_reference = attributes[:'invoiceMerchantReference']
|
542
|
+
end
|
543
|
+
|
544
|
+
if attributes.has_key?(:'javaEnabled')
|
545
|
+
self.java_enabled = attributes[:'javaEnabled']
|
546
|
+
end
|
547
|
+
|
548
|
+
if attributes.has_key?(:'language')
|
549
|
+
self.language = attributes[:'language']
|
550
|
+
end
|
551
|
+
|
552
|
+
if attributes.has_key?(:'lineItems')
|
553
|
+
if (value = attributes[:'lineItems']).is_a?(Array)
|
554
|
+
self.line_items = value
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
if attributes.has_key?(:'linkedSpaceId')
|
559
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
560
|
+
end
|
561
|
+
|
562
|
+
if attributes.has_key?(:'merchantReference')
|
563
|
+
self.merchant_reference = attributes[:'merchantReference']
|
564
|
+
end
|
565
|
+
|
566
|
+
if attributes.has_key?(:'metaData')
|
567
|
+
if (value = attributes[:'metaData']).is_a?(Hash)
|
568
|
+
self.meta_data = value
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
572
|
+
if attributes.has_key?(:'parent')
|
573
|
+
self.parent = attributes[:'parent']
|
574
|
+
end
|
575
|
+
|
576
|
+
if attributes.has_key?(:'paymentConnectorConfiguration')
|
577
|
+
self.payment_connector_configuration = attributes[:'paymentConnectorConfiguration']
|
578
|
+
end
|
579
|
+
|
580
|
+
if attributes.has_key?(:'plannedPurgeDate')
|
581
|
+
self.planned_purge_date = attributes[:'plannedPurgeDate']
|
582
|
+
end
|
583
|
+
|
584
|
+
if attributes.has_key?(:'processingOn')
|
585
|
+
self.processing_on = attributes[:'processingOn']
|
586
|
+
end
|
587
|
+
|
588
|
+
if attributes.has_key?(:'refundedAmount')
|
589
|
+
self.refunded_amount = attributes[:'refundedAmount']
|
590
|
+
end
|
591
|
+
|
592
|
+
if attributes.has_key?(:'screenColorDepth')
|
593
|
+
self.screen_color_depth = attributes[:'screenColorDepth']
|
594
|
+
end
|
595
|
+
|
596
|
+
if attributes.has_key?(:'screenHeight')
|
597
|
+
self.screen_height = attributes[:'screenHeight']
|
598
|
+
end
|
599
|
+
|
600
|
+
if attributes.has_key?(:'screenWidth')
|
601
|
+
self.screen_width = attributes[:'screenWidth']
|
602
|
+
end
|
603
|
+
|
604
|
+
if attributes.has_key?(:'shippingAddress')
|
605
|
+
self.shipping_address = attributes[:'shippingAddress']
|
606
|
+
end
|
607
|
+
|
608
|
+
if attributes.has_key?(:'shippingMethod')
|
609
|
+
self.shipping_method = attributes[:'shippingMethod']
|
610
|
+
end
|
611
|
+
|
612
|
+
if attributes.has_key?(:'spaceViewId')
|
613
|
+
self.space_view_id = attributes[:'spaceViewId']
|
614
|
+
end
|
615
|
+
|
616
|
+
if attributes.has_key?(:'state')
|
617
|
+
self.state = attributes[:'state']
|
618
|
+
end
|
619
|
+
|
620
|
+
if attributes.has_key?(:'successUrl')
|
621
|
+
self.success_url = attributes[:'successUrl']
|
622
|
+
end
|
623
|
+
|
624
|
+
if attributes.has_key?(:'terminal')
|
625
|
+
self.terminal = attributes[:'terminal']
|
626
|
+
end
|
627
|
+
|
628
|
+
if attributes.has_key?(:'timeZone')
|
629
|
+
self.time_zone = attributes[:'timeZone']
|
630
|
+
end
|
631
|
+
|
632
|
+
if attributes.has_key?(:'token')
|
633
|
+
self.token = attributes[:'token']
|
634
|
+
end
|
635
|
+
|
636
|
+
if attributes.has_key?(:'tokenizationMode')
|
637
|
+
self.tokenization_mode = attributes[:'tokenizationMode']
|
638
|
+
end
|
639
|
+
|
640
|
+
if attributes.has_key?(:'totalAppliedFees')
|
641
|
+
self.total_applied_fees = attributes[:'totalAppliedFees']
|
642
|
+
end
|
643
|
+
|
644
|
+
if attributes.has_key?(:'totalSettledAmount')
|
645
|
+
self.total_settled_amount = attributes[:'totalSettledAmount']
|
646
|
+
end
|
647
|
+
|
648
|
+
if attributes.has_key?(:'userAgentHeader')
|
649
|
+
self.user_agent_header = attributes[:'userAgentHeader']
|
650
|
+
end
|
651
|
+
|
652
|
+
if attributes.has_key?(:'userFailureMessage')
|
653
|
+
self.user_failure_message = attributes[:'userFailureMessage']
|
654
|
+
end
|
655
|
+
|
656
|
+
if attributes.has_key?(:'userInterfaceType')
|
657
|
+
self.user_interface_type = attributes[:'userInterfaceType']
|
658
|
+
end
|
659
|
+
|
660
|
+
if attributes.has_key?(:'version')
|
661
|
+
self.version = attributes[:'version']
|
662
|
+
end
|
663
|
+
|
664
|
+
if attributes.has_key?(:'windowHeight')
|
665
|
+
self.window_height = attributes[:'windowHeight']
|
666
|
+
end
|
667
|
+
|
668
|
+
if attributes.has_key?(:'windowWidth')
|
669
|
+
self.window_width = attributes[:'windowWidth']
|
670
|
+
end
|
671
|
+
end
|
672
|
+
|
673
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
674
|
+
# @return Array for valid properties with the reasons
|
675
|
+
def list_invalid_properties
|
676
|
+
invalid_properties = Array.new
|
677
|
+
if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
|
678
|
+
invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
|
679
|
+
end
|
680
|
+
|
681
|
+
if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
|
682
|
+
invalid_properties.push('invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.')
|
683
|
+
end
|
684
|
+
|
685
|
+
if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
|
686
|
+
invalid_properties.push('invalid value for "device_session_identifier", the character length must be great than or equal to 10.')
|
687
|
+
end
|
688
|
+
|
689
|
+
if !@failed_url.nil? && @failed_url.to_s.length > 1000
|
690
|
+
invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 1000.')
|
691
|
+
end
|
692
|
+
|
693
|
+
if !@failed_url.nil? && @failed_url.to_s.length < 9
|
694
|
+
invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
|
695
|
+
end
|
696
|
+
|
697
|
+
if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
|
698
|
+
invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
|
699
|
+
end
|
700
|
+
|
701
|
+
if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
|
702
|
+
invalid_properties.push('invalid value for "merchant_reference", the character length must be smaller than or equal to 100.')
|
703
|
+
end
|
704
|
+
|
705
|
+
if !@shipping_method.nil? && @shipping_method.to_s.length > 200
|
706
|
+
invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
|
707
|
+
end
|
708
|
+
|
709
|
+
if !@success_url.nil? && @success_url.to_s.length > 1000
|
710
|
+
invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 1000.')
|
711
|
+
end
|
712
|
+
|
713
|
+
if !@success_url.nil? && @success_url.to_s.length < 9
|
714
|
+
invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
|
715
|
+
end
|
716
|
+
|
717
|
+
invalid_properties
|
718
|
+
end
|
719
|
+
|
720
|
+
# Check to see if the all the properties in the model are valid
|
721
|
+
# @return true if the model is valid
|
722
|
+
def valid?
|
723
|
+
return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
|
724
|
+
return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
|
725
|
+
return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
|
726
|
+
return false if !@failed_url.nil? && @failed_url.to_s.length > 1000
|
727
|
+
return false if !@failed_url.nil? && @failed_url.to_s.length < 9
|
728
|
+
return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
|
729
|
+
return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
|
730
|
+
return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
|
731
|
+
return false if !@success_url.nil? && @success_url.to_s.length > 1000
|
732
|
+
return false if !@success_url.nil? && @success_url.to_s.length < 9
|
733
|
+
true
|
734
|
+
end
|
735
|
+
|
736
|
+
# Custom attribute writer method with validation
|
737
|
+
# @param [Object] customer_email_address Value to be assigned
|
738
|
+
def customer_email_address=(customer_email_address)
|
739
|
+
if !customer_email_address.nil? && customer_email_address.to_s.length > 254
|
740
|
+
fail ArgumentError, 'invalid value for "customer_email_address", the character length must be smaller than or equal to 254.'
|
741
|
+
end
|
742
|
+
|
743
|
+
@customer_email_address = customer_email_address
|
744
|
+
end
|
745
|
+
|
746
|
+
# Custom attribute writer method with validation
|
747
|
+
# @param [Object] device_session_identifier Value to be assigned
|
748
|
+
def device_session_identifier=(device_session_identifier)
|
749
|
+
if !device_session_identifier.nil? && device_session_identifier.to_s.length > 40
|
750
|
+
fail ArgumentError, 'invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.'
|
751
|
+
end
|
752
|
+
|
753
|
+
if !device_session_identifier.nil? && device_session_identifier.to_s.length < 10
|
754
|
+
fail ArgumentError, 'invalid value for "device_session_identifier", the character length must be great than or equal to 10.'
|
755
|
+
end
|
756
|
+
|
757
|
+
@device_session_identifier = device_session_identifier
|
758
|
+
end
|
759
|
+
|
760
|
+
# Custom attribute writer method with validation
|
761
|
+
# @param [Object] failed_url Value to be assigned
|
762
|
+
def failed_url=(failed_url)
|
763
|
+
if !failed_url.nil? && failed_url.to_s.length > 1000
|
764
|
+
fail ArgumentError, 'invalid value for "failed_url", the character length must be smaller than or equal to 1000.'
|
765
|
+
end
|
766
|
+
|
767
|
+
if !failed_url.nil? && failed_url.to_s.length < 9
|
768
|
+
fail ArgumentError, 'invalid value for "failed_url", the character length must be great than or equal to 9.'
|
769
|
+
end
|
770
|
+
|
771
|
+
@failed_url = failed_url
|
772
|
+
end
|
773
|
+
|
774
|
+
# Custom attribute writer method with validation
|
775
|
+
# @param [Object] invoice_merchant_reference Value to be assigned
|
776
|
+
def invoice_merchant_reference=(invoice_merchant_reference)
|
777
|
+
if !invoice_merchant_reference.nil? && invoice_merchant_reference.to_s.length > 100
|
778
|
+
fail ArgumentError, 'invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.'
|
779
|
+
end
|
780
|
+
|
781
|
+
@invoice_merchant_reference = invoice_merchant_reference
|
782
|
+
end
|
783
|
+
|
784
|
+
# Custom attribute writer method with validation
|
785
|
+
# @param [Object] merchant_reference Value to be assigned
|
786
|
+
def merchant_reference=(merchant_reference)
|
787
|
+
if !merchant_reference.nil? && merchant_reference.to_s.length > 100
|
788
|
+
fail ArgumentError, 'invalid value for "merchant_reference", the character length must be smaller than or equal to 100.'
|
789
|
+
end
|
790
|
+
|
791
|
+
@merchant_reference = merchant_reference
|
792
|
+
end
|
793
|
+
|
794
|
+
# Custom attribute writer method with validation
|
795
|
+
# @param [Object] shipping_method Value to be assigned
|
796
|
+
def shipping_method=(shipping_method)
|
797
|
+
if !shipping_method.nil? && shipping_method.to_s.length > 200
|
798
|
+
fail ArgumentError, 'invalid value for "shipping_method", the character length must be smaller than or equal to 200.'
|
799
|
+
end
|
800
|
+
|
801
|
+
@shipping_method = shipping_method
|
802
|
+
end
|
803
|
+
|
804
|
+
# Custom attribute writer method with validation
|
805
|
+
# @param [Object] success_url Value to be assigned
|
806
|
+
def success_url=(success_url)
|
807
|
+
if !success_url.nil? && success_url.to_s.length > 1000
|
808
|
+
fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 1000.'
|
809
|
+
end
|
810
|
+
|
811
|
+
if !success_url.nil? && success_url.to_s.length < 9
|
812
|
+
fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 9.'
|
813
|
+
end
|
814
|
+
|
815
|
+
@success_url = success_url
|
816
|
+
end
|
817
|
+
|
818
|
+
# Checks equality by comparing each attribute.
|
819
|
+
# @param [Object] Object to be compared
|
820
|
+
def ==(o)
|
821
|
+
return true if self.equal?(o)
|
822
|
+
self.class == o.class &&
|
823
|
+
accept_header == o.accept_header &&
|
824
|
+
accept_language_header == o.accept_language_header &&
|
825
|
+
allowed_payment_method_brands == o.allowed_payment_method_brands &&
|
826
|
+
allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
|
827
|
+
authorization_amount == o.authorization_amount &&
|
828
|
+
authorization_environment == o.authorization_environment &&
|
829
|
+
authorization_sales_channel == o.authorization_sales_channel &&
|
830
|
+
authorization_timeout_on == o.authorization_timeout_on &&
|
831
|
+
authorized_on == o.authorized_on &&
|
832
|
+
auto_confirmation_enabled == o.auto_confirmation_enabled &&
|
833
|
+
billing_address == o.billing_address &&
|
834
|
+
charge_retry_enabled == o.charge_retry_enabled &&
|
835
|
+
completed_amount == o.completed_amount &&
|
836
|
+
completed_on == o.completed_on &&
|
837
|
+
completion_behavior == o.completion_behavior &&
|
838
|
+
completion_timeout_on == o.completion_timeout_on &&
|
839
|
+
confirmed_by == o.confirmed_by &&
|
840
|
+
confirmed_on == o.confirmed_on &&
|
841
|
+
created_by == o.created_by &&
|
842
|
+
created_on == o.created_on &&
|
843
|
+
currency == o.currency &&
|
844
|
+
customer_email_address == o.customer_email_address &&
|
845
|
+
customer_id == o.customer_id &&
|
846
|
+
customers_presence == o.customers_presence &&
|
847
|
+
delivery_decision_made_on == o.delivery_decision_made_on &&
|
848
|
+
device_session_identifier == o.device_session_identifier &&
|
849
|
+
emails_disabled == o.emails_disabled &&
|
850
|
+
end_of_life == o.end_of_life &&
|
851
|
+
environment == o.environment &&
|
852
|
+
environment_selection_strategy == o.environment_selection_strategy &&
|
853
|
+
failed_on == o.failed_on &&
|
854
|
+
failed_url == o.failed_url &&
|
855
|
+
failure_reason == o.failure_reason &&
|
856
|
+
group == o.group &&
|
857
|
+
id == o.id &&
|
858
|
+
internet_protocol_address == o.internet_protocol_address &&
|
859
|
+
internet_protocol_address_country == o.internet_protocol_address_country &&
|
860
|
+
invoice_merchant_reference == o.invoice_merchant_reference &&
|
861
|
+
java_enabled == o.java_enabled &&
|
862
|
+
language == o.language &&
|
863
|
+
line_items == o.line_items &&
|
864
|
+
linked_space_id == o.linked_space_id &&
|
865
|
+
merchant_reference == o.merchant_reference &&
|
866
|
+
meta_data == o.meta_data &&
|
867
|
+
parent == o.parent &&
|
868
|
+
payment_connector_configuration == o.payment_connector_configuration &&
|
869
|
+
planned_purge_date == o.planned_purge_date &&
|
870
|
+
processing_on == o.processing_on &&
|
871
|
+
refunded_amount == o.refunded_amount &&
|
872
|
+
screen_color_depth == o.screen_color_depth &&
|
873
|
+
screen_height == o.screen_height &&
|
874
|
+
screen_width == o.screen_width &&
|
875
|
+
shipping_address == o.shipping_address &&
|
876
|
+
shipping_method == o.shipping_method &&
|
877
|
+
space_view_id == o.space_view_id &&
|
878
|
+
state == o.state &&
|
879
|
+
success_url == o.success_url &&
|
880
|
+
terminal == o.terminal &&
|
881
|
+
time_zone == o.time_zone &&
|
882
|
+
token == o.token &&
|
883
|
+
tokenization_mode == o.tokenization_mode &&
|
884
|
+
total_applied_fees == o.total_applied_fees &&
|
885
|
+
total_settled_amount == o.total_settled_amount &&
|
886
|
+
user_agent_header == o.user_agent_header &&
|
887
|
+
user_failure_message == o.user_failure_message &&
|
888
|
+
user_interface_type == o.user_interface_type &&
|
889
|
+
version == o.version &&
|
890
|
+
window_height == o.window_height &&
|
891
|
+
window_width == o.window_width
|
892
|
+
end
|
893
|
+
|
894
|
+
# @see the `==` method
|
895
|
+
# @param [Object] Object to be compared
|
896
|
+
def eql?(o)
|
897
|
+
self == o
|
898
|
+
end
|
899
|
+
|
900
|
+
# Calculates hash code according to all attributes.
|
901
|
+
# @return [Fixnum] Hash code
|
902
|
+
def hash
|
903
|
+
[accept_header, accept_language_header, allowed_payment_method_brands, allowed_payment_method_configurations, authorization_amount, authorization_environment, authorization_sales_channel, authorization_timeout_on, authorized_on, auto_confirmation_enabled, billing_address, charge_retry_enabled, completed_amount, completed_on, completion_behavior, completion_timeout_on, confirmed_by, confirmed_on, created_by, created_on, currency, customer_email_address, customer_id, customers_presence, delivery_decision_made_on, device_session_identifier, emails_disabled, end_of_life, environment, environment_selection_strategy, failed_on, failed_url, failure_reason, group, id, internet_protocol_address, internet_protocol_address_country, invoice_merchant_reference, java_enabled, language, line_items, linked_space_id, merchant_reference, meta_data, parent, payment_connector_configuration, planned_purge_date, processing_on, refunded_amount, screen_color_depth, screen_height, screen_width, shipping_address, shipping_method, space_view_id, state, success_url, terminal, time_zone, token, tokenization_mode, total_applied_fees, total_settled_amount, user_agent_header, user_failure_message, user_interface_type, version, window_height, window_width].hash
|
904
|
+
end
|
905
|
+
|
906
|
+
# Builds the object from hash
|
907
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
908
|
+
# @return [Object] Returns the model itself
|
909
|
+
def build_from_hash(attributes)
|
910
|
+
return nil unless attributes.is_a?(Hash)
|
911
|
+
self.class.swagger_types.each_pair do |key, type|
|
912
|
+
if type =~ /\AArray<(.*)>/i
|
913
|
+
# check to ensure the input is an array given that the attribute
|
914
|
+
# is documented as an array but the input is not
|
915
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
916
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
917
|
+
end
|
918
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
919
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
920
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
921
|
+
end
|
922
|
+
|
923
|
+
self
|
924
|
+
end
|
925
|
+
|
926
|
+
# Deserializes the data based on type
|
927
|
+
# @param string type Data type
|
928
|
+
# @param string value Value to be deserialized
|
929
|
+
# @return [Object] Deserialized data
|
930
|
+
def _deserialize(type, value)
|
931
|
+
case type.to_sym
|
932
|
+
when :DateTime
|
933
|
+
DateTime.parse(value)
|
934
|
+
when :Date
|
935
|
+
Date.parse(value)
|
936
|
+
when :String
|
937
|
+
value.to_s
|
938
|
+
when :Integer
|
939
|
+
value.to_i
|
940
|
+
when :Float
|
941
|
+
value.to_f
|
942
|
+
when :BOOLEAN
|
943
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
944
|
+
true
|
945
|
+
else
|
946
|
+
false
|
947
|
+
end
|
948
|
+
when :Object
|
949
|
+
# generic object (usually a Hash), return directly
|
950
|
+
value
|
951
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
952
|
+
inner_type = Regexp.last_match[:inner_type]
|
953
|
+
value.map { |v| _deserialize(inner_type, v) }
|
954
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
955
|
+
k_type = Regexp.last_match[:k_type]
|
956
|
+
v_type = Regexp.last_match[:v_type]
|
957
|
+
{}.tap do |hash|
|
958
|
+
value.each do |k, v|
|
959
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
960
|
+
end
|
961
|
+
end
|
962
|
+
else # model
|
963
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
964
|
+
temp_model.build_from_hash(value)
|
965
|
+
end
|
966
|
+
end
|
967
|
+
|
968
|
+
# Returns the string representation of the object
|
969
|
+
# @return [String] String presentation of the object
|
970
|
+
def to_s
|
971
|
+
to_hash.to_s
|
972
|
+
end
|
973
|
+
|
974
|
+
# to_body is an alias to to_hash (backward compatibility)
|
975
|
+
# @return [Hash] Returns the object in the form of hash
|
976
|
+
def to_body
|
977
|
+
to_hash
|
978
|
+
end
|
979
|
+
|
980
|
+
# Returns the object in the form of hash
|
981
|
+
# @return [Hash] Returns the object in the form of hash
|
982
|
+
def to_hash
|
983
|
+
hash = {}
|
984
|
+
self.class.attribute_map.each_pair do |attr, param|
|
985
|
+
value = self.send(attr)
|
986
|
+
next if value.nil?
|
987
|
+
hash[param] = _to_hash(value)
|
988
|
+
end
|
989
|
+
hash
|
990
|
+
end
|
991
|
+
|
992
|
+
# Outputs non-array value in the form of hash
|
993
|
+
# For object, use to_hash. Otherwise, just return the value
|
994
|
+
# @param [Object] value Any valid value
|
995
|
+
# @return [Hash] Returns the value in the form of hash
|
996
|
+
def _to_hash(value)
|
997
|
+
if value.is_a?(Array)
|
998
|
+
value.compact.map{ |v| _to_hash(v) }
|
999
|
+
elsif value.is_a?(Hash)
|
1000
|
+
{}.tap do |hash|
|
1001
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
1002
|
+
end
|
1003
|
+
elsif value.respond_to? :to_hash
|
1004
|
+
value.to_hash
|
1005
|
+
else
|
1006
|
+
value
|
1007
|
+
end
|
1008
|
+
end
|
1009
|
+
|
1010
|
+
end
|
1011
|
+
end
|