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,301 @@
|
|
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 TokenUpdate
|
23
|
+
# The customer email address is the email address of the customer.
|
24
|
+
attr_accessor :customer_email_address
|
25
|
+
|
26
|
+
# The customer ID identifies the customer in the merchant system. In case the customer ID has been provided it has to correspond with the customer ID provided on the transaction. The customer ID will not be changed automatically. The merchant system has to provide it.
|
27
|
+
attr_accessor :customer_id
|
28
|
+
|
29
|
+
# When a token is enabled for one-click payments the buyer will be able to select the token within the iFrame or on the payment page to pay with the token. The usage of the token will reduce the number of steps the buyer has to go through. The buyer is linked via the customer ID on the transaction with the token. Means the token will be visible for buyers with the same customer ID. Additionally the payment method has to be configured to allow the one-click payments.
|
30
|
+
attr_accessor :enabled_for_one_click_payment
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :language
|
34
|
+
|
35
|
+
# 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.
|
36
|
+
attr_accessor :time_zone
|
37
|
+
|
38
|
+
# Use something that it is easy to identify and may help you find the token (e.g. customer id, email address).
|
39
|
+
attr_accessor :token_reference
|
40
|
+
|
41
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
42
|
+
attr_accessor :id
|
43
|
+
|
44
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
45
|
+
attr_accessor :version
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'customer_email_address' => :'customerEmailAddress',
|
51
|
+
:'customer_id' => :'customerId',
|
52
|
+
:'enabled_for_one_click_payment' => :'enabledForOneClickPayment',
|
53
|
+
:'language' => :'language',
|
54
|
+
:'time_zone' => :'timeZone',
|
55
|
+
:'token_reference' => :'tokenReference',
|
56
|
+
:'id' => :'id',
|
57
|
+
:'version' => :'version'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.swagger_types
|
63
|
+
{
|
64
|
+
:'customer_email_address' => :'String',
|
65
|
+
:'customer_id' => :'String',
|
66
|
+
:'enabled_for_one_click_payment' => :'BOOLEAN',
|
67
|
+
:'language' => :'String',
|
68
|
+
:'time_zone' => :'String',
|
69
|
+
:'token_reference' => :'String',
|
70
|
+
:'id' => :'Integer',
|
71
|
+
:'version' => :'Integer'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
def initialize(attributes = {})
|
78
|
+
return unless attributes.is_a?(Hash)
|
79
|
+
|
80
|
+
# convert string to symbol for hash key
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
82
|
+
|
83
|
+
if attributes.has_key?(:'customerEmailAddress')
|
84
|
+
self.customer_email_address = attributes[:'customerEmailAddress']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'customerId')
|
88
|
+
self.customer_id = attributes[:'customerId']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'enabledForOneClickPayment')
|
92
|
+
self.enabled_for_one_click_payment = attributes[:'enabledForOneClickPayment']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'language')
|
96
|
+
self.language = attributes[:'language']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.has_key?(:'timeZone')
|
100
|
+
self.time_zone = attributes[:'timeZone']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'tokenReference')
|
104
|
+
self.token_reference = attributes[:'tokenReference']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.has_key?(:'id')
|
108
|
+
self.id = attributes[:'id']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.has_key?(:'version')
|
112
|
+
self.version = attributes[:'version']
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
117
|
+
# @return Array for valid properties with the reasons
|
118
|
+
def list_invalid_properties
|
119
|
+
invalid_properties = Array.new
|
120
|
+
if !@customer_email_address.nil? && @customer_email_address.to_s.length > 150
|
121
|
+
invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 150.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if !@token_reference.nil? && @token_reference.to_s.length > 100
|
125
|
+
invalid_properties.push('invalid value for "token_reference", the character length must be smaller than or equal to 100.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @id.nil?
|
129
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @version.nil?
|
133
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
134
|
+
end
|
135
|
+
|
136
|
+
invalid_properties
|
137
|
+
end
|
138
|
+
|
139
|
+
# Check to see if the all the properties in the model are valid
|
140
|
+
# @return true if the model is valid
|
141
|
+
def valid?
|
142
|
+
return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 150
|
143
|
+
return false if !@token_reference.nil? && @token_reference.to_s.length > 100
|
144
|
+
return false if @id.nil?
|
145
|
+
return false if @version.nil?
|
146
|
+
true
|
147
|
+
end
|
148
|
+
|
149
|
+
# Custom attribute writer method with validation
|
150
|
+
# @param [Object] customer_email_address Value to be assigned
|
151
|
+
def customer_email_address=(customer_email_address)
|
152
|
+
if !customer_email_address.nil? && customer_email_address.to_s.length > 150
|
153
|
+
fail ArgumentError, 'invalid value for "customer_email_address", the character length must be smaller than or equal to 150.'
|
154
|
+
end
|
155
|
+
|
156
|
+
@customer_email_address = customer_email_address
|
157
|
+
end
|
158
|
+
|
159
|
+
# Custom attribute writer method with validation
|
160
|
+
# @param [Object] token_reference Value to be assigned
|
161
|
+
def token_reference=(token_reference)
|
162
|
+
if !token_reference.nil? && token_reference.to_s.length > 100
|
163
|
+
fail ArgumentError, 'invalid value for "token_reference", the character length must be smaller than or equal to 100.'
|
164
|
+
end
|
165
|
+
|
166
|
+
@token_reference = token_reference
|
167
|
+
end
|
168
|
+
|
169
|
+
# Checks equality by comparing each attribute.
|
170
|
+
# @param [Object] Object to be compared
|
171
|
+
def ==(o)
|
172
|
+
return true if self.equal?(o)
|
173
|
+
self.class == o.class &&
|
174
|
+
customer_email_address == o.customer_email_address &&
|
175
|
+
customer_id == o.customer_id &&
|
176
|
+
enabled_for_one_click_payment == o.enabled_for_one_click_payment &&
|
177
|
+
language == o.language &&
|
178
|
+
time_zone == o.time_zone &&
|
179
|
+
token_reference == o.token_reference &&
|
180
|
+
id == o.id &&
|
181
|
+
version == o.version
|
182
|
+
end
|
183
|
+
|
184
|
+
# @see the `==` method
|
185
|
+
# @param [Object] Object to be compared
|
186
|
+
def eql?(o)
|
187
|
+
self == o
|
188
|
+
end
|
189
|
+
|
190
|
+
# Calculates hash code according to all attributes.
|
191
|
+
# @return [Fixnum] Hash code
|
192
|
+
def hash
|
193
|
+
[customer_email_address, customer_id, enabled_for_one_click_payment, language, time_zone, token_reference, id, version].hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Builds the object from hash
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
198
|
+
# @return [Object] Returns the model itself
|
199
|
+
def build_from_hash(attributes)
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
201
|
+
self.class.swagger_types.each_pair do |key, type|
|
202
|
+
if type =~ /\AArray<(.*)>/i
|
203
|
+
# check to ensure the input is an array given that the attribute
|
204
|
+
# is documented as an array but the input is not
|
205
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
206
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
207
|
+
end
|
208
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
209
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
210
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
211
|
+
end
|
212
|
+
|
213
|
+
self
|
214
|
+
end
|
215
|
+
|
216
|
+
# Deserializes the data based on type
|
217
|
+
# @param string type Data type
|
218
|
+
# @param string value Value to be deserialized
|
219
|
+
# @return [Object] Deserialized data
|
220
|
+
def _deserialize(type, value)
|
221
|
+
case type.to_sym
|
222
|
+
when :DateTime
|
223
|
+
DateTime.parse(value)
|
224
|
+
when :Date
|
225
|
+
Date.parse(value)
|
226
|
+
when :String
|
227
|
+
value.to_s
|
228
|
+
when :Integer
|
229
|
+
value.to_i
|
230
|
+
when :Float
|
231
|
+
value.to_f
|
232
|
+
when :BOOLEAN
|
233
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
234
|
+
true
|
235
|
+
else
|
236
|
+
false
|
237
|
+
end
|
238
|
+
when :Object
|
239
|
+
# generic object (usually a Hash), return directly
|
240
|
+
value
|
241
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
242
|
+
inner_type = Regexp.last_match[:inner_type]
|
243
|
+
value.map { |v| _deserialize(inner_type, v) }
|
244
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
245
|
+
k_type = Regexp.last_match[:k_type]
|
246
|
+
v_type = Regexp.last_match[:v_type]
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each do |k, v|
|
249
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
250
|
+
end
|
251
|
+
end
|
252
|
+
else # model
|
253
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
254
|
+
temp_model.build_from_hash(value)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Returns the string representation of the object
|
259
|
+
# @return [String] String presentation of the object
|
260
|
+
def to_s
|
261
|
+
to_hash.to_s
|
262
|
+
end
|
263
|
+
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
266
|
+
def to_body
|
267
|
+
to_hash
|
268
|
+
end
|
269
|
+
|
270
|
+
# Returns the object in the form of hash
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
272
|
+
def to_hash
|
273
|
+
hash = {}
|
274
|
+
self.class.attribute_map.each_pair do |attr, param|
|
275
|
+
value = self.send(attr)
|
276
|
+
next if value.nil?
|
277
|
+
hash[param] = _to_hash(value)
|
278
|
+
end
|
279
|
+
hash
|
280
|
+
end
|
281
|
+
|
282
|
+
# Outputs non-array value in the form of hash
|
283
|
+
# For object, use to_hash. Otherwise, just return the value
|
284
|
+
# @param [Object] value Any valid value
|
285
|
+
# @return [Hash] Returns the value in the form of hash
|
286
|
+
def _to_hash(value)
|
287
|
+
if value.is_a?(Array)
|
288
|
+
value.compact.map{ |v| _to_hash(v) }
|
289
|
+
elsif value.is_a?(Hash)
|
290
|
+
{}.tap do |hash|
|
291
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
292
|
+
end
|
293
|
+
elsif value.respond_to? :to_hash
|
294
|
+
value.to_hash
|
295
|
+
else
|
296
|
+
value
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
end
|
301
|
+
end
|
@@ -0,0 +1,445 @@
|
|
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 TokenVersion
|
23
|
+
#
|
24
|
+
attr_accessor :activated_on
|
25
|
+
|
26
|
+
#
|
27
|
+
attr_accessor :billing_address
|
28
|
+
|
29
|
+
# The created on date indicates the date on which the entity was stored into the database.
|
30
|
+
attr_accessor :created_on
|
31
|
+
|
32
|
+
#
|
33
|
+
attr_accessor :environment
|
34
|
+
|
35
|
+
# The expires on date indicates when token version expires. Once this date is reached the token version is marked as obsolete.
|
36
|
+
attr_accessor :expires_on
|
37
|
+
|
38
|
+
#
|
39
|
+
attr_accessor :icon_url
|
40
|
+
|
41
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
42
|
+
attr_accessor :id
|
43
|
+
|
44
|
+
#
|
45
|
+
attr_accessor :labels
|
46
|
+
|
47
|
+
#
|
48
|
+
attr_accessor :language
|
49
|
+
|
50
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
51
|
+
attr_accessor :linked_space_id
|
52
|
+
|
53
|
+
#
|
54
|
+
attr_accessor :name
|
55
|
+
|
56
|
+
#
|
57
|
+
attr_accessor :obsoleted_on
|
58
|
+
|
59
|
+
#
|
60
|
+
attr_accessor :payment_connector_configuration
|
61
|
+
|
62
|
+
# The payment information hash set contains hashes of the payment information represented by this token version.
|
63
|
+
attr_accessor :payment_information_hashes
|
64
|
+
|
65
|
+
#
|
66
|
+
attr_accessor :payment_method
|
67
|
+
|
68
|
+
#
|
69
|
+
attr_accessor :payment_method_brand
|
70
|
+
|
71
|
+
# The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
|
72
|
+
attr_accessor :planned_purge_date
|
73
|
+
|
74
|
+
#
|
75
|
+
attr_accessor :processor_token
|
76
|
+
|
77
|
+
#
|
78
|
+
attr_accessor :shipping_address
|
79
|
+
|
80
|
+
#
|
81
|
+
attr_accessor :state
|
82
|
+
|
83
|
+
#
|
84
|
+
attr_accessor :token
|
85
|
+
|
86
|
+
# The token version type determines what kind of token it is and by which payment connector the token can be processed by.
|
87
|
+
attr_accessor :type
|
88
|
+
|
89
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
90
|
+
attr_accessor :version
|
91
|
+
|
92
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
93
|
+
def self.attribute_map
|
94
|
+
{
|
95
|
+
:'activated_on' => :'activatedOn',
|
96
|
+
:'billing_address' => :'billingAddress',
|
97
|
+
:'created_on' => :'createdOn',
|
98
|
+
:'environment' => :'environment',
|
99
|
+
:'expires_on' => :'expiresOn',
|
100
|
+
:'icon_url' => :'iconUrl',
|
101
|
+
:'id' => :'id',
|
102
|
+
:'labels' => :'labels',
|
103
|
+
:'language' => :'language',
|
104
|
+
:'linked_space_id' => :'linkedSpaceId',
|
105
|
+
:'name' => :'name',
|
106
|
+
:'obsoleted_on' => :'obsoletedOn',
|
107
|
+
:'payment_connector_configuration' => :'paymentConnectorConfiguration',
|
108
|
+
:'payment_information_hashes' => :'paymentInformationHashes',
|
109
|
+
:'payment_method' => :'paymentMethod',
|
110
|
+
:'payment_method_brand' => :'paymentMethodBrand',
|
111
|
+
:'planned_purge_date' => :'plannedPurgeDate',
|
112
|
+
:'processor_token' => :'processorToken',
|
113
|
+
:'shipping_address' => :'shippingAddress',
|
114
|
+
:'state' => :'state',
|
115
|
+
:'token' => :'token',
|
116
|
+
:'type' => :'type',
|
117
|
+
:'version' => :'version'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# Attribute type mapping.
|
122
|
+
def self.swagger_types
|
123
|
+
{
|
124
|
+
:'activated_on' => :'DateTime',
|
125
|
+
:'billing_address' => :'Address',
|
126
|
+
:'created_on' => :'DateTime',
|
127
|
+
:'environment' => :'ChargeAttemptEnvironment',
|
128
|
+
:'expires_on' => :'DateTime',
|
129
|
+
:'icon_url' => :'String',
|
130
|
+
:'id' => :'Integer',
|
131
|
+
:'labels' => :'Array<Label>',
|
132
|
+
:'language' => :'String',
|
133
|
+
:'linked_space_id' => :'Integer',
|
134
|
+
:'name' => :'String',
|
135
|
+
:'obsoleted_on' => :'DateTime',
|
136
|
+
:'payment_connector_configuration' => :'PaymentConnectorConfiguration',
|
137
|
+
:'payment_information_hashes' => :'Array<PaymentInformationHash>',
|
138
|
+
:'payment_method' => :'Integer',
|
139
|
+
:'payment_method_brand' => :'Integer',
|
140
|
+
:'planned_purge_date' => :'DateTime',
|
141
|
+
:'processor_token' => :'String',
|
142
|
+
:'shipping_address' => :'Address',
|
143
|
+
:'state' => :'TokenVersionState',
|
144
|
+
:'token' => :'Token',
|
145
|
+
:'type' => :'TokenVersionType',
|
146
|
+
:'version' => :'Integer'
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
# Initializes the object
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
def initialize(attributes = {})
|
153
|
+
return unless attributes.is_a?(Hash)
|
154
|
+
|
155
|
+
# convert string to symbol for hash key
|
156
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
157
|
+
|
158
|
+
if attributes.has_key?(:'activatedOn')
|
159
|
+
self.activated_on = attributes[:'activatedOn']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'billingAddress')
|
163
|
+
self.billing_address = attributes[:'billingAddress']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'createdOn')
|
167
|
+
self.created_on = attributes[:'createdOn']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'environment')
|
171
|
+
self.environment = attributes[:'environment']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes.has_key?(:'expiresOn')
|
175
|
+
self.expires_on = attributes[:'expiresOn']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'iconUrl')
|
179
|
+
self.icon_url = attributes[:'iconUrl']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'id')
|
183
|
+
self.id = attributes[:'id']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'labels')
|
187
|
+
if (value = attributes[:'labels']).is_a?(Array)
|
188
|
+
self.labels = value
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
if attributes.has_key?(:'language')
|
193
|
+
self.language = attributes[:'language']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.has_key?(:'linkedSpaceId')
|
197
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.has_key?(:'name')
|
201
|
+
self.name = attributes[:'name']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.has_key?(:'obsoletedOn')
|
205
|
+
self.obsoleted_on = attributes[:'obsoletedOn']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.has_key?(:'paymentConnectorConfiguration')
|
209
|
+
self.payment_connector_configuration = attributes[:'paymentConnectorConfiguration']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.has_key?(:'paymentInformationHashes')
|
213
|
+
if (value = attributes[:'paymentInformationHashes']).is_a?(Array)
|
214
|
+
self.payment_information_hashes = value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'paymentMethod')
|
219
|
+
self.payment_method = attributes[:'paymentMethod']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'paymentMethodBrand')
|
223
|
+
self.payment_method_brand = attributes[:'paymentMethodBrand']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'plannedPurgeDate')
|
227
|
+
self.planned_purge_date = attributes[:'plannedPurgeDate']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'processorToken')
|
231
|
+
self.processor_token = attributes[:'processorToken']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.has_key?(:'shippingAddress')
|
235
|
+
self.shipping_address = attributes[:'shippingAddress']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'state')
|
239
|
+
self.state = attributes[:'state']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.has_key?(:'token')
|
243
|
+
self.token = attributes[:'token']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'type')
|
247
|
+
self.type = attributes[:'type']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'version')
|
251
|
+
self.version = attributes[:'version']
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
256
|
+
# @return Array for valid properties with the reasons
|
257
|
+
def list_invalid_properties
|
258
|
+
invalid_properties = Array.new
|
259
|
+
if !@name.nil? && @name.to_s.length > 150
|
260
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 150.')
|
261
|
+
end
|
262
|
+
|
263
|
+
if !@processor_token.nil? && @processor_token.to_s.length > 150
|
264
|
+
invalid_properties.push('invalid value for "processor_token", the character length must be smaller than or equal to 150.')
|
265
|
+
end
|
266
|
+
|
267
|
+
invalid_properties
|
268
|
+
end
|
269
|
+
|
270
|
+
# Check to see if the all the properties in the model are valid
|
271
|
+
# @return true if the model is valid
|
272
|
+
def valid?
|
273
|
+
return false if !@name.nil? && @name.to_s.length > 150
|
274
|
+
return false if !@processor_token.nil? && @processor_token.to_s.length > 150
|
275
|
+
true
|
276
|
+
end
|
277
|
+
|
278
|
+
# Custom attribute writer method with validation
|
279
|
+
# @param [Object] name Value to be assigned
|
280
|
+
def name=(name)
|
281
|
+
if !name.nil? && name.to_s.length > 150
|
282
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 150.'
|
283
|
+
end
|
284
|
+
|
285
|
+
@name = name
|
286
|
+
end
|
287
|
+
|
288
|
+
# Custom attribute writer method with validation
|
289
|
+
# @param [Object] processor_token Value to be assigned
|
290
|
+
def processor_token=(processor_token)
|
291
|
+
if !processor_token.nil? && processor_token.to_s.length > 150
|
292
|
+
fail ArgumentError, 'invalid value for "processor_token", the character length must be smaller than or equal to 150.'
|
293
|
+
end
|
294
|
+
|
295
|
+
@processor_token = processor_token
|
296
|
+
end
|
297
|
+
|
298
|
+
# Checks equality by comparing each attribute.
|
299
|
+
# @param [Object] Object to be compared
|
300
|
+
def ==(o)
|
301
|
+
return true if self.equal?(o)
|
302
|
+
self.class == o.class &&
|
303
|
+
activated_on == o.activated_on &&
|
304
|
+
billing_address == o.billing_address &&
|
305
|
+
created_on == o.created_on &&
|
306
|
+
environment == o.environment &&
|
307
|
+
expires_on == o.expires_on &&
|
308
|
+
icon_url == o.icon_url &&
|
309
|
+
id == o.id &&
|
310
|
+
labels == o.labels &&
|
311
|
+
language == o.language &&
|
312
|
+
linked_space_id == o.linked_space_id &&
|
313
|
+
name == o.name &&
|
314
|
+
obsoleted_on == o.obsoleted_on &&
|
315
|
+
payment_connector_configuration == o.payment_connector_configuration &&
|
316
|
+
payment_information_hashes == o.payment_information_hashes &&
|
317
|
+
payment_method == o.payment_method &&
|
318
|
+
payment_method_brand == o.payment_method_brand &&
|
319
|
+
planned_purge_date == o.planned_purge_date &&
|
320
|
+
processor_token == o.processor_token &&
|
321
|
+
shipping_address == o.shipping_address &&
|
322
|
+
state == o.state &&
|
323
|
+
token == o.token &&
|
324
|
+
type == o.type &&
|
325
|
+
version == o.version
|
326
|
+
end
|
327
|
+
|
328
|
+
# @see the `==` method
|
329
|
+
# @param [Object] Object to be compared
|
330
|
+
def eql?(o)
|
331
|
+
self == o
|
332
|
+
end
|
333
|
+
|
334
|
+
# Calculates hash code according to all attributes.
|
335
|
+
# @return [Fixnum] Hash code
|
336
|
+
def hash
|
337
|
+
[activated_on, billing_address, created_on, environment, expires_on, icon_url, id, labels, language, linked_space_id, name, obsoleted_on, payment_connector_configuration, payment_information_hashes, payment_method, payment_method_brand, planned_purge_date, processor_token, shipping_address, state, token, type, version].hash
|
338
|
+
end
|
339
|
+
|
340
|
+
# Builds the object from hash
|
341
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
342
|
+
# @return [Object] Returns the model itself
|
343
|
+
def build_from_hash(attributes)
|
344
|
+
return nil unless attributes.is_a?(Hash)
|
345
|
+
self.class.swagger_types.each_pair do |key, type|
|
346
|
+
if type =~ /\AArray<(.*)>/i
|
347
|
+
# check to ensure the input is an array given that the attribute
|
348
|
+
# is documented as an array but the input is not
|
349
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
350
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
351
|
+
end
|
352
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
353
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
354
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
355
|
+
end
|
356
|
+
|
357
|
+
self
|
358
|
+
end
|
359
|
+
|
360
|
+
# Deserializes the data based on type
|
361
|
+
# @param string type Data type
|
362
|
+
# @param string value Value to be deserialized
|
363
|
+
# @return [Object] Deserialized data
|
364
|
+
def _deserialize(type, value)
|
365
|
+
case type.to_sym
|
366
|
+
when :DateTime
|
367
|
+
DateTime.parse(value)
|
368
|
+
when :Date
|
369
|
+
Date.parse(value)
|
370
|
+
when :String
|
371
|
+
value.to_s
|
372
|
+
when :Integer
|
373
|
+
value.to_i
|
374
|
+
when :Float
|
375
|
+
value.to_f
|
376
|
+
when :BOOLEAN
|
377
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
378
|
+
true
|
379
|
+
else
|
380
|
+
false
|
381
|
+
end
|
382
|
+
when :Object
|
383
|
+
# generic object (usually a Hash), return directly
|
384
|
+
value
|
385
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
386
|
+
inner_type = Regexp.last_match[:inner_type]
|
387
|
+
value.map { |v| _deserialize(inner_type, v) }
|
388
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
389
|
+
k_type = Regexp.last_match[:k_type]
|
390
|
+
v_type = Regexp.last_match[:v_type]
|
391
|
+
{}.tap do |hash|
|
392
|
+
value.each do |k, v|
|
393
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
394
|
+
end
|
395
|
+
end
|
396
|
+
else # model
|
397
|
+
temp_model = PostFinanceCheckout.const_get(type).new
|
398
|
+
temp_model.build_from_hash(value)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
# Returns the string representation of the object
|
403
|
+
# @return [String] String presentation of the object
|
404
|
+
def to_s
|
405
|
+
to_hash.to_s
|
406
|
+
end
|
407
|
+
|
408
|
+
# to_body is an alias to to_hash (backward compatibility)
|
409
|
+
# @return [Hash] Returns the object in the form of hash
|
410
|
+
def to_body
|
411
|
+
to_hash
|
412
|
+
end
|
413
|
+
|
414
|
+
# Returns the object in the form of hash
|
415
|
+
# @return [Hash] Returns the object in the form of hash
|
416
|
+
def to_hash
|
417
|
+
hash = {}
|
418
|
+
self.class.attribute_map.each_pair do |attr, param|
|
419
|
+
value = self.send(attr)
|
420
|
+
next if value.nil?
|
421
|
+
hash[param] = _to_hash(value)
|
422
|
+
end
|
423
|
+
hash
|
424
|
+
end
|
425
|
+
|
426
|
+
# Outputs non-array value in the form of hash
|
427
|
+
# For object, use to_hash. Otherwise, just return the value
|
428
|
+
# @param [Object] value Any valid value
|
429
|
+
# @return [Hash] Returns the value in the form of hash
|
430
|
+
def _to_hash(value)
|
431
|
+
if value.is_a?(Array)
|
432
|
+
value.compact.map{ |v| _to_hash(v) }
|
433
|
+
elsif value.is_a?(Hash)
|
434
|
+
{}.tap do |hash|
|
435
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
436
|
+
end
|
437
|
+
elsif value.respond_to? :to_hash
|
438
|
+
value.to_hash
|
439
|
+
else
|
440
|
+
value
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
444
|
+
end
|
445
|
+
end
|