paypal-server-sdk 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +35 -0
- data/README.md +112 -0
- data/lib/paypal_server_sdk/api_helper.rb +10 -0
- data/lib/paypal_server_sdk/client.rb +85 -0
- data/lib/paypal_server_sdk/configuration.rb +109 -0
- data/lib/paypal_server_sdk/controllers/base_controller.rb +71 -0
- data/lib/paypal_server_sdk/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/paypal_server_sdk/controllers/orders_controller.rb +517 -0
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +404 -0
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +224 -0
- data/lib/paypal_server_sdk/exceptions/api_exception.rb +10 -0
- data/lib/paypal_server_sdk/exceptions/error_exception.rb +71 -0
- data/lib/paypal_server_sdk/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/paypal_server_sdk/http/api_response.rb +21 -0
- data/lib/paypal_server_sdk/http/auth/o_auth2.rb +136 -0
- data/lib/paypal_server_sdk/http/http_call_back.rb +10 -0
- data/lib/paypal_server_sdk/http/http_method_enum.rb +10 -0
- data/lib/paypal_server_sdk/http/http_request.rb +10 -0
- data/lib/paypal_server_sdk/http/http_response.rb +10 -0
- data/lib/paypal_server_sdk/logging/configuration/api_logging_configuration.rb +114 -0
- data/lib/paypal_server_sdk/logging/sdk_logger.rb +17 -0
- data/lib/paypal_server_sdk/models/activity_timestamps.rb +68 -0
- data/lib/paypal_server_sdk/models/address.rb +116 -0
- data/lib/paypal_server_sdk/models/address_details.rb +160 -0
- data/lib/paypal_server_sdk/models/amount_breakdown.rb +115 -0
- data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +80 -0
- data/lib/paypal_server_sdk/models/apple_pay_attributes.rb +60 -0
- data/lib/paypal_server_sdk/models/apple_pay_attributes_response.rb +50 -0
- data/lib/paypal_server_sdk/models/apple_pay_card.rb +94 -0
- data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +167 -0
- data/lib/paypal_server_sdk/models/apple_pay_decrypted_token_data.rb +95 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data.rb +83 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data_type.rb +24 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_object.rb +114 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_token.rb +51 -0
- data/lib/paypal_server_sdk/models/apple_pay_request.rb +137 -0
- data/lib/paypal_server_sdk/models/apple_pay_tokenized_card.rb +113 -0
- data/lib/paypal_server_sdk/models/assurance_details.rb +68 -0
- data/lib/paypal_server_sdk/models/authentication_response.rb +61 -0
- data/lib/paypal_server_sdk/models/authorization.rb +192 -0
- data/lib/paypal_server_sdk/models/authorization_incomplete_reason.rb +23 -0
- data/lib/paypal_server_sdk/models/authorization_status.rb +35 -0
- data/lib/paypal_server_sdk/models/authorization_status_details.rb +50 -0
- data/lib/paypal_server_sdk/models/authorization_status_with_details.rb +60 -0
- data/lib/paypal_server_sdk/models/authorization_with_additional_data.rb +205 -0
- data/lib/paypal_server_sdk/models/avs_code.rb +90 -0
- data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +95 -0
- data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/base_model.rb +62 -0
- data/lib/paypal_server_sdk/models/bin_details.rb +88 -0
- data/lib/paypal_server_sdk/models/blik_experience_context.rb +122 -0
- data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +48 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +52 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +82 -0
- data/lib/paypal_server_sdk/models/blik_payment_object.rb +86 -0
- data/lib/paypal_server_sdk/models/blik_payment_request.rb +105 -0
- data/lib/paypal_server_sdk/models/capture.rb +228 -0
- data/lib/paypal_server_sdk/models/capture_incomplete_reason.rb +55 -0
- data/lib/paypal_server_sdk/models/capture_payment_instruction.rb +89 -0
- data/lib/paypal_server_sdk/models/capture_request.rb +108 -0
- data/lib/paypal_server_sdk/models/capture_status.rb +35 -0
- data/lib/paypal_server_sdk/models/capture_status_details.rb +50 -0
- data/lib/paypal_server_sdk/models/capture_status_with_details.rb +60 -0
- data/lib/paypal_server_sdk/models/captured_payment.rb +248 -0
- data/lib/paypal_server_sdk/models/card_attributes.rb +70 -0
- data/lib/paypal_server_sdk/models/card_attributes_response.rb +50 -0
- data/lib/paypal_server_sdk/models/card_authentication_response.rb +51 -0
- data/lib/paypal_server_sdk/models/card_brand.rb +93 -0
- data/lib/paypal_server_sdk/models/card_customer_information.rb +85 -0
- data/lib/paypal_server_sdk/models/card_experience_context.rb +59 -0
- data/lib/paypal_server_sdk/models/card_from_request.rb +60 -0
- data/lib/paypal_server_sdk/models/card_payment_token.rb +166 -0
- data/lib/paypal_server_sdk/models/card_request.rb +176 -0
- data/lib/paypal_server_sdk/models/card_response.rb +139 -0
- data/lib/paypal_server_sdk/models/card_response_entity.rb +156 -0
- data/lib/paypal_server_sdk/models/card_stored_credential.rb +95 -0
- data/lib/paypal_server_sdk/models/card_supplementary_data.rb +71 -0
- data/lib/paypal_server_sdk/models/card_type.rb +32 -0
- data/lib/paypal_server_sdk/models/card_vault_response.rb +86 -0
- data/lib/paypal_server_sdk/models/card_verification.rb +51 -0
- data/lib/paypal_server_sdk/models/card_verification_details.rb +111 -0
- data/lib/paypal_server_sdk/models/card_verification_method.rb +29 -0
- data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +62 -0
- data/lib/paypal_server_sdk/models/checkout_payment_intent.rb +24 -0
- data/lib/paypal_server_sdk/models/cobranded_card.rb +70 -0
- data/lib/paypal_server_sdk/models/confirm_order_request.rb +74 -0
- data/lib/paypal_server_sdk/models/customer_information.rb +72 -0
- data/lib/paypal_server_sdk/models/customer_request.rb +62 -0
- data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +105 -0
- data/lib/paypal_server_sdk/models/cvv_code.rb +60 -0
- data/lib/paypal_server_sdk/models/disbursement_mode.rb +23 -0
- data/lib/paypal_server_sdk/models/dispute_category.rb +23 -0
- data/lib/paypal_server_sdk/models/eci_flag.rb +39 -0
- data/lib/paypal_server_sdk/models/enrollment_status.rb +29 -0
- data/lib/paypal_server_sdk/models/eps_payment_object.rb +74 -0
- data/lib/paypal_server_sdk/models/eps_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/error_details.rb +110 -0
- data/lib/paypal_server_sdk/models/exchange_rate.rb +75 -0
- data/lib/paypal_server_sdk/models/experience_context.rb +98 -0
- data/lib/paypal_server_sdk/models/fullfillment_type.rb +31 -0
- data/lib/paypal_server_sdk/models/giropay_payment_object.rb +74 -0
- data/lib/paypal_server_sdk/models/giropay_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/google_pay_authentication_method.rb +23 -0
- data/lib/paypal_server_sdk/models/google_pay_card_attributes.rb +51 -0
- data/lib/paypal_server_sdk/models/google_pay_card_response.rb +104 -0
- data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +105 -0
- data/lib/paypal_server_sdk/models/google_pay_payment_method.rb +20 -0
- data/lib/paypal_server_sdk/models/google_pay_request.rb +118 -0
- data/lib/paypal_server_sdk/models/google_pay_request_card.rb +84 -0
- data/lib/paypal_server_sdk/models/google_pay_wallet_response.rb +85 -0
- data/lib/paypal_server_sdk/models/ideal_payment_object.rb +85 -0
- data/lib/paypal_server_sdk/models/ideal_payment_request.rb +83 -0
- data/lib/paypal_server_sdk/models/item.rb +134 -0
- data/lib/paypal_server_sdk/models/item_category.rb +26 -0
- data/lib/paypal_server_sdk/models/level2_card_processing_data.rb +66 -0
- data/lib/paypal_server_sdk/models/level3_card_processing_data.rb +120 -0
- data/lib/paypal_server_sdk/models/liability_shift_indicator.rb +26 -0
- data/lib/paypal_server_sdk/models/line_item.rb +177 -0
- data/lib/paypal_server_sdk/models/link_description.rb +75 -0
- data/lib/paypal_server_sdk/models/link_http_method.rb +41 -0
- data/lib/paypal_server_sdk/models/money.rb +62 -0
- data/lib/paypal_server_sdk/models/my_bank_payment_object.rb +85 -0
- data/lib/paypal_server_sdk/models/my_bank_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/name.rb +61 -0
- data/lib/paypal_server_sdk/models/net_amount_breakdown_item.rb +73 -0
- data/lib/paypal_server_sdk/models/network_token.rb +95 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference.rb +90 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference_entity.rb +88 -0
- data/lib/paypal_server_sdk/models/o_auth_provider_error.rb +45 -0
- data/lib/paypal_server_sdk/models/o_auth_token.rb +106 -0
- data/lib/paypal_server_sdk/models/order.rb +178 -0
- data/lib/paypal_server_sdk/models/order_application_context.rb +193 -0
- data/lib/paypal_server_sdk/models/order_application_context_landing_page.rb +32 -0
- data/lib/paypal_server_sdk/models/order_application_context_shipping_preference.rb +34 -0
- data/lib/paypal_server_sdk/models/order_application_context_user_action.rb +29 -0
- data/lib/paypal_server_sdk/models/order_authorize_request.rb +51 -0
- data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +104 -0
- data/lib/paypal_server_sdk/models/order_authorize_response.rb +171 -0
- data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +88 -0
- data/lib/paypal_server_sdk/models/order_capture_request.rb +51 -0
- data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +104 -0
- data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +109 -0
- data/lib/paypal_server_sdk/models/order_request.rb +103 -0
- data/lib/paypal_server_sdk/models/order_status.rb +35 -0
- data/lib/paypal_server_sdk/models/order_tracker_item.rb +99 -0
- data/lib/paypal_server_sdk/models/order_tracker_request.rb +116 -0
- data/lib/paypal_server_sdk/models/order_tracker_response.rb +122 -0
- data/lib/paypal_server_sdk/models/order_tracker_status.rb +23 -0
- data/lib/paypal_server_sdk/models/p24_payment_object.rb +108 -0
- data/lib/paypal_server_sdk/models/p24_payment_request.rb +85 -0
- data/lib/paypal_server_sdk/models/pa_res_status.rb +42 -0
- data/lib/paypal_server_sdk/models/patch.rb +83 -0
- data/lib/paypal_server_sdk/models/patch_op.rb +35 -0
- data/lib/paypal_server_sdk/models/pay_pal_experience_landing_page.rb +26 -0
- data/lib/paypal_server_sdk/models/pay_pal_experience_user_action.rb +24 -0
- data/lib/paypal_server_sdk/models/pay_pal_payment_token.rb +180 -0
- data/lib/paypal_server_sdk/models/pay_pal_payment_token_customer_type.rb +25 -0
- data/lib/paypal_server_sdk/models/pay_pal_payment_token_usage_pattern.rb +35 -0
- data/lib/paypal_server_sdk/models/pay_pal_payment_token_usage_type.rb +23 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet.rb +158 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_account_verification_status.rb +24 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_attributes.rb +59 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_attributes_response.rb +70 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_customer.rb +85 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_customer_request.rb +85 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_experience_context.rb +140 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_response.rb +166 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_instruction.rb +115 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_response.rb +86 -0
- data/lib/paypal_server_sdk/models/pay_pal_wallet_vault_status.rb +26 -0
- data/lib/paypal_server_sdk/models/payee.rb +65 -0
- data/lib/paypal_server_sdk/models/payee_base.rb +64 -0
- data/lib/paypal_server_sdk/models/payee_payment_method_preference.rb +23 -0
- data/lib/paypal_server_sdk/models/payer.rb +120 -0
- data/lib/paypal_server_sdk/models/payer_base.rb +64 -0
- data/lib/paypal_server_sdk/models/payment_advice_code.rb +30 -0
- data/lib/paypal_server_sdk/models/payment_authorization.rb +212 -0
- data/lib/paypal_server_sdk/models/payment_collection.rb +99 -0
- data/lib/paypal_server_sdk/models/payment_initiator.rb +23 -0
- data/lib/paypal_server_sdk/models/payment_instruction.rb +105 -0
- data/lib/paypal_server_sdk/models/payment_method_preference.rb +72 -0
- data/lib/paypal_server_sdk/models/payment_source.rb +187 -0
- data/lib/paypal_server_sdk/models/payment_source_response.rb +171 -0
- data/lib/paypal_server_sdk/models/payment_supplementary_data.rb +50 -0
- data/lib/paypal_server_sdk/models/payment_token_request.rb +60 -0
- data/lib/paypal_server_sdk/models/payment_token_request_card.rb +125 -0
- data/lib/paypal_server_sdk/models/payment_token_request_payment_source.rb +59 -0
- data/lib/paypal_server_sdk/models/payment_token_response.rb +87 -0
- data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +87 -0
- data/lib/paypal_server_sdk/models/phone.rb +77 -0
- data/lib/paypal_server_sdk/models/phone_number.rb +54 -0
- data/lib/paypal_server_sdk/models/phone_number_with_country_code.rb +66 -0
- data/lib/paypal_server_sdk/models/phone_type.rb +32 -0
- data/lib/paypal_server_sdk/models/phone_with_type.rb +59 -0
- data/lib/paypal_server_sdk/models/platform_fee.rb +63 -0
- data/lib/paypal_server_sdk/models/processing_instruction.rb +23 -0
- data/lib/paypal_server_sdk/models/processor_response.rb +83 -0
- data/lib/paypal_server_sdk/models/processor_response_code.rb +479 -0
- data/lib/paypal_server_sdk/models/purchase_unit.rb +227 -0
- data/lib/paypal_server_sdk/models/purchase_unit_request.rb +193 -0
- data/lib/paypal_server_sdk/models/reauthorize_request.rb +62 -0
- data/lib/paypal_server_sdk/models/refund.rb +195 -0
- data/lib/paypal_server_sdk/models/refund_incomplete_reason.rb +20 -0
- data/lib/paypal_server_sdk/models/refund_payment_instruction.rb +68 -0
- data/lib/paypal_server_sdk/models/refund_platform_fee.rb +52 -0
- data/lib/paypal_server_sdk/models/refund_request.rb +100 -0
- data/lib/paypal_server_sdk/models/refund_status.rb +29 -0
- data/lib/paypal_server_sdk/models/refund_status_details.rb +50 -0
- data/lib/paypal_server_sdk/models/refund_status_with_details.rb +60 -0
- data/lib/paypal_server_sdk/models/related_identifiers.rb +69 -0
- data/lib/paypal_server_sdk/models/seller_payable_breakdown.rb +156 -0
- data/lib/paypal_server_sdk/models/seller_protection.rb +65 -0
- data/lib/paypal_server_sdk/models/seller_protection_status.rb +29 -0
- data/lib/paypal_server_sdk/models/seller_receivable_breakdown.rb +129 -0
- data/lib/paypal_server_sdk/models/setup_token_card_experience_context.rb +103 -0
- data/lib/paypal_server_sdk/models/setup_token_request.rb +60 -0
- data/lib/paypal_server_sdk/models/setup_token_request_card.rb +141 -0
- data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +77 -0
- data/lib/paypal_server_sdk/models/setup_token_response.rb +106 -0
- data/lib/paypal_server_sdk/models/setup_token_response_card.rb +156 -0
- data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +68 -0
- data/lib/paypal_server_sdk/models/shipment_carrier.rb +3852 -0
- data/lib/paypal_server_sdk/models/shipping_details.rb +106 -0
- data/lib/paypal_server_sdk/models/shipping_name.rb +50 -0
- data/lib/paypal_server_sdk/models/shipping_option.rb +94 -0
- data/lib/paypal_server_sdk/models/shipping_preference.rb +26 -0
- data/lib/paypal_server_sdk/models/shipping_type.rb +29 -0
- data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +124 -0
- data/lib/paypal_server_sdk/models/sofort_payment_object.rb +85 -0
- data/lib/paypal_server_sdk/models/sofort_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/standard_entry_class_code.rb +36 -0
- data/lib/paypal_server_sdk/models/store_in_vault_instruction.rb +20 -0
- data/lib/paypal_server_sdk/models/stored_payment_source.rb +95 -0
- data/lib/paypal_server_sdk/models/stored_payment_source_payment_type.rb +26 -0
- data/lib/paypal_server_sdk/models/stored_payment_source_usage_type.rb +27 -0
- data/lib/paypal_server_sdk/models/supplementary_data.rb +58 -0
- data/lib/paypal_server_sdk/models/supplementary_purchase_data.rb +63 -0
- data/lib/paypal_server_sdk/models/tax_id_type.rb +23 -0
- data/lib/paypal_server_sdk/models/tax_info.rb +57 -0
- data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +62 -0
- data/lib/paypal_server_sdk/models/token.rb +56 -0
- data/lib/paypal_server_sdk/models/token_request_type.rb +23 -0
- data/lib/paypal_server_sdk/models/token_type.rb +20 -0
- data/lib/paypal_server_sdk/models/trustly_payment_object.rb +85 -0
- data/lib/paypal_server_sdk/models/trustly_payment_request.rb +73 -0
- data/lib/paypal_server_sdk/models/universal_product_code.rb +56 -0
- data/lib/paypal_server_sdk/models/upc_type.rb +38 -0
- data/lib/paypal_server_sdk/models/vault_customer.rb +50 -0
- data/lib/paypal_server_sdk/models/vault_experience_context.rb +112 -0
- data/lib/paypal_server_sdk/models/vault_instruction.rb +50 -0
- data/lib/paypal_server_sdk/models/vault_instruction_base.rb +52 -0
- data/lib/paypal_server_sdk/models/vault_pay_pal_wallet_request.rb +115 -0
- data/lib/paypal_server_sdk/models/vault_response.rb +86 -0
- data/lib/paypal_server_sdk/models/vault_status.rb +26 -0
- data/lib/paypal_server_sdk/models/vault_token_request.rb +56 -0
- data/lib/paypal_server_sdk/models/vault_venmo_experience_context.rb +73 -0
- data/lib/paypal_server_sdk/models/vault_venmo_request.rb +115 -0
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet.rb +106 -0
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +75 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token.rb +169 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_customer_type.rb +25 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb +35 -0
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_type.rb +23 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_additional_attributes.rb +60 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_attributes_response.rb +50 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_customer_information.rb +63 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb +65 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_request.rb +89 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_response.rb +120 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb +114 -0
- data/lib/paypal_server_sdk/utilities/date_time_helper.rb +11 -0
- data/lib/paypal_server_sdk/utilities/file_wrapper.rb +16 -0
- data/lib/paypal_server_sdk.rb +306 -0
- metadata +357 -0
@@ -0,0 +1,104 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# The payment source definition.
|
8
|
+
class OrderAuthorizeRequestPaymentSource < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The payment card to use to fund a payment. Can be a credit or debit
|
13
|
+
# card.<blockquote><strong>Note:</strong> Passing card number, cvv and
|
14
|
+
# expiry directly via the API requires <a
|
15
|
+
# href="https://www.pcisecuritystandards.org/pci_security/completing_self_as
|
16
|
+
# sessment"> PCI SAQ D compliance</a>. <br>*PayPal offers a mechanism by
|
17
|
+
# which you do not have to take on the <strong>PCI SAQ D</strong> burden by
|
18
|
+
# using hosted fields - refer to <a
|
19
|
+
# href="https://developer.paypal.com/docs/checkout/advanced/integrate/">this
|
20
|
+
# Integration Guide</a>*.</blockquote>
|
21
|
+
# @return [CardRequest]
|
22
|
+
attr_accessor :card
|
23
|
+
|
24
|
+
# The tokenized payment source to fund a payment.
|
25
|
+
# @return [Token]
|
26
|
+
attr_accessor :token
|
27
|
+
|
28
|
+
# A resource that identifies a PayPal Wallet is used for payment.
|
29
|
+
# @return [PayPalWallet]
|
30
|
+
attr_accessor :paypal
|
31
|
+
|
32
|
+
# Information needed to pay using ApplePay.
|
33
|
+
# @return [ApplePayRequest]
|
34
|
+
attr_accessor :apple_pay
|
35
|
+
|
36
|
+
# Information needed to pay using Google Pay.
|
37
|
+
# @return [GooglePayRequest]
|
38
|
+
attr_accessor :google_pay
|
39
|
+
|
40
|
+
# Information needed to pay using Venmo.
|
41
|
+
# @return [VenmoWalletRequest]
|
42
|
+
attr_accessor :venmo
|
43
|
+
|
44
|
+
# A mapping from model property names to API property names.
|
45
|
+
def self.names
|
46
|
+
@_hash = {} if @_hash.nil?
|
47
|
+
@_hash['card'] = 'card'
|
48
|
+
@_hash['token'] = 'token'
|
49
|
+
@_hash['paypal'] = 'paypal'
|
50
|
+
@_hash['apple_pay'] = 'apple_pay'
|
51
|
+
@_hash['google_pay'] = 'google_pay'
|
52
|
+
@_hash['venmo'] = 'venmo'
|
53
|
+
@_hash
|
54
|
+
end
|
55
|
+
|
56
|
+
# An array for optional fields
|
57
|
+
def self.optionals
|
58
|
+
%w[
|
59
|
+
card
|
60
|
+
token
|
61
|
+
paypal
|
62
|
+
apple_pay
|
63
|
+
google_pay
|
64
|
+
venmo
|
65
|
+
]
|
66
|
+
end
|
67
|
+
|
68
|
+
# An array for nullable fields
|
69
|
+
def self.nullables
|
70
|
+
[]
|
71
|
+
end
|
72
|
+
|
73
|
+
def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP,
|
74
|
+
google_pay: SKIP, venmo: SKIP)
|
75
|
+
@card = card unless card == SKIP
|
76
|
+
@token = token unless token == SKIP
|
77
|
+
@paypal = paypal unless paypal == SKIP
|
78
|
+
@apple_pay = apple_pay unless apple_pay == SKIP
|
79
|
+
@google_pay = google_pay unless google_pay == SKIP
|
80
|
+
@venmo = venmo unless venmo == SKIP
|
81
|
+
end
|
82
|
+
|
83
|
+
# Creates an instance of the object from a hash.
|
84
|
+
def self.from_hash(hash)
|
85
|
+
return nil unless hash
|
86
|
+
|
87
|
+
# Extract variables from the hash.
|
88
|
+
card = CardRequest.from_hash(hash['card']) if hash['card']
|
89
|
+
token = Token.from_hash(hash['token']) if hash['token']
|
90
|
+
paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal']
|
91
|
+
apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay']
|
92
|
+
google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay']
|
93
|
+
venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo']
|
94
|
+
|
95
|
+
# Create object from extracted values.
|
96
|
+
OrderAuthorizeRequestPaymentSource.new(card: card,
|
97
|
+
token: token,
|
98
|
+
paypal: paypal,
|
99
|
+
apple_pay: apple_pay,
|
100
|
+
google_pay: google_pay,
|
101
|
+
venmo: venmo)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# OrderAuthorizeResponse Model.
|
8
|
+
class OrderAuthorizeResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The date and time, in [Internet date and time
|
13
|
+
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
14
|
+
# required while fractional seconds are
|
15
|
+
# optional.<blockquote><strong>Note:</strong> The regular expression
|
16
|
+
# provides guidance but does not reject all invalid dates.</blockquote>
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :create_time
|
19
|
+
|
20
|
+
# The date and time, in [Internet date and time
|
21
|
+
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
22
|
+
# required while fractional seconds are
|
23
|
+
# optional.<blockquote><strong>Note:</strong> The regular expression
|
24
|
+
# provides guidance but does not reject all invalid dates.</blockquote>
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :update_time
|
27
|
+
|
28
|
+
# The ID of the order.
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :id
|
31
|
+
|
32
|
+
# The payment source used to fund the payment.
|
33
|
+
# @return [OrderAuthorizeResponsePaymentSource]
|
34
|
+
attr_accessor :payment_source
|
35
|
+
|
36
|
+
# The intent to either capture payment immediately or authorize a payment
|
37
|
+
# for an order after order creation.
|
38
|
+
# @return [CheckoutPaymentIntent]
|
39
|
+
attr_accessor :intent
|
40
|
+
|
41
|
+
# The instruction to process an order.
|
42
|
+
# @return [ProcessingInstruction]
|
43
|
+
attr_accessor :processing_instruction
|
44
|
+
|
45
|
+
# The instruction to process an order.
|
46
|
+
# @return [Payer]
|
47
|
+
attr_accessor :payer
|
48
|
+
|
49
|
+
# An array of purchase units. Each purchase unit establishes a contract
|
50
|
+
# between a customer and merchant. Each purchase unit represents either a
|
51
|
+
# full or partial order that the customer intends to purchase from the
|
52
|
+
# merchant.
|
53
|
+
# @return [Array[PurchaseUnit]]
|
54
|
+
attr_accessor :purchase_units
|
55
|
+
|
56
|
+
# The order status.
|
57
|
+
# @return [OrderStatus]
|
58
|
+
attr_accessor :status
|
59
|
+
|
60
|
+
# An array of request-related [HATEOAS
|
61
|
+
# links](/api/rest/responses/#hateoas-links) that are either relevant to the
|
62
|
+
# issue by providing additional information or offering potential
|
63
|
+
# resolutions.
|
64
|
+
# @return [Array[LinkDescription]]
|
65
|
+
attr_accessor :links
|
66
|
+
|
67
|
+
# A mapping from model property names to API property names.
|
68
|
+
def self.names
|
69
|
+
@_hash = {} if @_hash.nil?
|
70
|
+
@_hash['create_time'] = 'create_time'
|
71
|
+
@_hash['update_time'] = 'update_time'
|
72
|
+
@_hash['id'] = 'id'
|
73
|
+
@_hash['payment_source'] = 'payment_source'
|
74
|
+
@_hash['intent'] = 'intent'
|
75
|
+
@_hash['processing_instruction'] = 'processing_instruction'
|
76
|
+
@_hash['payer'] = 'payer'
|
77
|
+
@_hash['purchase_units'] = 'purchase_units'
|
78
|
+
@_hash['status'] = 'status'
|
79
|
+
@_hash['links'] = 'links'
|
80
|
+
@_hash
|
81
|
+
end
|
82
|
+
|
83
|
+
# An array for optional fields
|
84
|
+
def self.optionals
|
85
|
+
%w[
|
86
|
+
create_time
|
87
|
+
update_time
|
88
|
+
id
|
89
|
+
payment_source
|
90
|
+
intent
|
91
|
+
processing_instruction
|
92
|
+
payer
|
93
|
+
purchase_units
|
94
|
+
status
|
95
|
+
links
|
96
|
+
]
|
97
|
+
end
|
98
|
+
|
99
|
+
# An array for nullable fields
|
100
|
+
def self.nullables
|
101
|
+
[]
|
102
|
+
end
|
103
|
+
|
104
|
+
def initialize(
|
105
|
+
create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP,
|
106
|
+
intent: SKIP,
|
107
|
+
processing_instruction: ProcessingInstruction::NO_INSTRUCTION,
|
108
|
+
payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP
|
109
|
+
)
|
110
|
+
@create_time = create_time unless create_time == SKIP
|
111
|
+
@update_time = update_time unless update_time == SKIP
|
112
|
+
@id = id unless id == SKIP
|
113
|
+
@payment_source = payment_source unless payment_source == SKIP
|
114
|
+
@intent = intent unless intent == SKIP
|
115
|
+
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
116
|
+
@payer = payer unless payer == SKIP
|
117
|
+
@purchase_units = purchase_units unless purchase_units == SKIP
|
118
|
+
@status = status unless status == SKIP
|
119
|
+
@links = links unless links == SKIP
|
120
|
+
end
|
121
|
+
|
122
|
+
# Creates an instance of the object from a hash.
|
123
|
+
def self.from_hash(hash)
|
124
|
+
return nil unless hash
|
125
|
+
|
126
|
+
# Extract variables from the hash.
|
127
|
+
create_time = hash.key?('create_time') ? hash['create_time'] : SKIP
|
128
|
+
update_time = hash.key?('update_time') ? hash['update_time'] : SKIP
|
129
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
130
|
+
payment_source = OrderAuthorizeResponsePaymentSource.from_hash(hash['payment_source']) if
|
131
|
+
hash['payment_source']
|
132
|
+
intent = hash.key?('intent') ? hash['intent'] : SKIP
|
133
|
+
processing_instruction =
|
134
|
+
hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION
|
135
|
+
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
136
|
+
# Parameter is an array, so we need to iterate through it
|
137
|
+
purchase_units = nil
|
138
|
+
unless hash['purchase_units'].nil?
|
139
|
+
purchase_units = []
|
140
|
+
hash['purchase_units'].each do |structure|
|
141
|
+
purchase_units << (PurchaseUnit.from_hash(structure) if structure)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
purchase_units = SKIP unless hash.key?('purchase_units')
|
146
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
147
|
+
# Parameter is an array, so we need to iterate through it
|
148
|
+
links = nil
|
149
|
+
unless hash['links'].nil?
|
150
|
+
links = []
|
151
|
+
hash['links'].each do |structure|
|
152
|
+
links << (LinkDescription.from_hash(structure) if structure)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
links = SKIP unless hash.key?('links')
|
157
|
+
|
158
|
+
# Create object from extracted values.
|
159
|
+
OrderAuthorizeResponse.new(create_time: create_time,
|
160
|
+
update_time: update_time,
|
161
|
+
id: id,
|
162
|
+
payment_source: payment_source,
|
163
|
+
intent: intent,
|
164
|
+
processing_instruction: processing_instruction,
|
165
|
+
payer: payer,
|
166
|
+
purchase_units: purchase_units,
|
167
|
+
status: status,
|
168
|
+
links: links)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# The payment source used to fund the payment.
|
8
|
+
class OrderAuthorizeResponsePaymentSource < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The payment card to use to fund a payment. Card can be a credit or debit
|
13
|
+
# card.
|
14
|
+
# @return [CardResponse]
|
15
|
+
attr_accessor :card
|
16
|
+
|
17
|
+
# The PayPal Wallet response.
|
18
|
+
# @return [PayPalWalletResponse]
|
19
|
+
attr_accessor :paypal
|
20
|
+
|
21
|
+
# Information needed to pay using ApplePay.
|
22
|
+
# @return [ApplePayPaymentObject]
|
23
|
+
attr_accessor :apple_pay
|
24
|
+
|
25
|
+
# Google Pay Wallet payment data.
|
26
|
+
# @return [GooglePayWalletResponse]
|
27
|
+
attr_accessor :google_pay
|
28
|
+
|
29
|
+
# Venmo wallet response.
|
30
|
+
# @return [VenmoWalletResponse]
|
31
|
+
attr_accessor :venmo
|
32
|
+
|
33
|
+
# A mapping from model property names to API property names.
|
34
|
+
def self.names
|
35
|
+
@_hash = {} if @_hash.nil?
|
36
|
+
@_hash['card'] = 'card'
|
37
|
+
@_hash['paypal'] = 'paypal'
|
38
|
+
@_hash['apple_pay'] = 'apple_pay'
|
39
|
+
@_hash['google_pay'] = 'google_pay'
|
40
|
+
@_hash['venmo'] = 'venmo'
|
41
|
+
@_hash
|
42
|
+
end
|
43
|
+
|
44
|
+
# An array for optional fields
|
45
|
+
def self.optionals
|
46
|
+
%w[
|
47
|
+
card
|
48
|
+
paypal
|
49
|
+
apple_pay
|
50
|
+
google_pay
|
51
|
+
venmo
|
52
|
+
]
|
53
|
+
end
|
54
|
+
|
55
|
+
# An array for nullable fields
|
56
|
+
def self.nullables
|
57
|
+
[]
|
58
|
+
end
|
59
|
+
|
60
|
+
def initialize(card: SKIP, paypal: SKIP, apple_pay: SKIP, google_pay: SKIP,
|
61
|
+
venmo: SKIP)
|
62
|
+
@card = card unless card == SKIP
|
63
|
+
@paypal = paypal unless paypal == SKIP
|
64
|
+
@apple_pay = apple_pay unless apple_pay == SKIP
|
65
|
+
@google_pay = google_pay unless google_pay == SKIP
|
66
|
+
@venmo = venmo unless venmo == SKIP
|
67
|
+
end
|
68
|
+
|
69
|
+
# Creates an instance of the object from a hash.
|
70
|
+
def self.from_hash(hash)
|
71
|
+
return nil unless hash
|
72
|
+
|
73
|
+
# Extract variables from the hash.
|
74
|
+
card = CardResponse.from_hash(hash['card']) if hash['card']
|
75
|
+
paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal']
|
76
|
+
apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay']
|
77
|
+
google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay']
|
78
|
+
venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo']
|
79
|
+
|
80
|
+
# Create object from extracted values.
|
81
|
+
OrderAuthorizeResponsePaymentSource.new(card: card,
|
82
|
+
paypal: paypal,
|
83
|
+
apple_pay: apple_pay,
|
84
|
+
google_pay: google_pay,
|
85
|
+
venmo: venmo)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# Completes an capture payment for an order.
|
8
|
+
class OrderCaptureRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The payment source definition.
|
13
|
+
# @return [OrderCaptureRequestPaymentSource]
|
14
|
+
attr_accessor :payment_source
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['payment_source'] = 'payment_source'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
payment_source
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(payment_source: SKIP)
|
36
|
+
@payment_source = payment_source unless payment_source == SKIP
|
37
|
+
end
|
38
|
+
|
39
|
+
# Creates an instance of the object from a hash.
|
40
|
+
def self.from_hash(hash)
|
41
|
+
return nil unless hash
|
42
|
+
|
43
|
+
# Extract variables from the hash.
|
44
|
+
payment_source = OrderCaptureRequestPaymentSource.from_hash(hash['payment_source']) if
|
45
|
+
hash['payment_source']
|
46
|
+
|
47
|
+
# Create object from extracted values.
|
48
|
+
OrderCaptureRequest.new(payment_source: payment_source)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# The payment source definition.
|
8
|
+
class OrderCaptureRequestPaymentSource < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The payment card to use to fund a payment. Can be a credit or debit
|
13
|
+
# card.<blockquote><strong>Note:</strong> Passing card number, cvv and
|
14
|
+
# expiry directly via the API requires <a
|
15
|
+
# href="https://www.pcisecuritystandards.org/pci_security/completing_self_as
|
16
|
+
# sessment"> PCI SAQ D compliance</a>. <br>*PayPal offers a mechanism by
|
17
|
+
# which you do not have to take on the <strong>PCI SAQ D</strong> burden by
|
18
|
+
# using hosted fields - refer to <a
|
19
|
+
# href="https://developer.paypal.com/docs/checkout/advanced/integrate/">this
|
20
|
+
# Integration Guide</a>*.</blockquote>
|
21
|
+
# @return [CardRequest]
|
22
|
+
attr_accessor :card
|
23
|
+
|
24
|
+
# The tokenized payment source to fund a payment.
|
25
|
+
# @return [Token]
|
26
|
+
attr_accessor :token
|
27
|
+
|
28
|
+
# A resource that identifies a PayPal Wallet is used for payment.
|
29
|
+
# @return [PayPalWallet]
|
30
|
+
attr_accessor :paypal
|
31
|
+
|
32
|
+
# Information needed to pay using ApplePay.
|
33
|
+
# @return [ApplePayRequest]
|
34
|
+
attr_accessor :apple_pay
|
35
|
+
|
36
|
+
# Information needed to pay using Google Pay.
|
37
|
+
# @return [GooglePayRequest]
|
38
|
+
attr_accessor :google_pay
|
39
|
+
|
40
|
+
# Information needed to pay using Venmo.
|
41
|
+
# @return [VenmoWalletRequest]
|
42
|
+
attr_accessor :venmo
|
43
|
+
|
44
|
+
# A mapping from model property names to API property names.
|
45
|
+
def self.names
|
46
|
+
@_hash = {} if @_hash.nil?
|
47
|
+
@_hash['card'] = 'card'
|
48
|
+
@_hash['token'] = 'token'
|
49
|
+
@_hash['paypal'] = 'paypal'
|
50
|
+
@_hash['apple_pay'] = 'apple_pay'
|
51
|
+
@_hash['google_pay'] = 'google_pay'
|
52
|
+
@_hash['venmo'] = 'venmo'
|
53
|
+
@_hash
|
54
|
+
end
|
55
|
+
|
56
|
+
# An array for optional fields
|
57
|
+
def self.optionals
|
58
|
+
%w[
|
59
|
+
card
|
60
|
+
token
|
61
|
+
paypal
|
62
|
+
apple_pay
|
63
|
+
google_pay
|
64
|
+
venmo
|
65
|
+
]
|
66
|
+
end
|
67
|
+
|
68
|
+
# An array for nullable fields
|
69
|
+
def self.nullables
|
70
|
+
[]
|
71
|
+
end
|
72
|
+
|
73
|
+
def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP,
|
74
|
+
google_pay: SKIP, venmo: SKIP)
|
75
|
+
@card = card unless card == SKIP
|
76
|
+
@token = token unless token == SKIP
|
77
|
+
@paypal = paypal unless paypal == SKIP
|
78
|
+
@apple_pay = apple_pay unless apple_pay == SKIP
|
79
|
+
@google_pay = google_pay unless google_pay == SKIP
|
80
|
+
@venmo = venmo unless venmo == SKIP
|
81
|
+
end
|
82
|
+
|
83
|
+
# Creates an instance of the object from a hash.
|
84
|
+
def self.from_hash(hash)
|
85
|
+
return nil unless hash
|
86
|
+
|
87
|
+
# Extract variables from the hash.
|
88
|
+
card = CardRequest.from_hash(hash['card']) if hash['card']
|
89
|
+
token = Token.from_hash(hash['token']) if hash['token']
|
90
|
+
paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal']
|
91
|
+
apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay']
|
92
|
+
google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay']
|
93
|
+
venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo']
|
94
|
+
|
95
|
+
# Create object from extracted values.
|
96
|
+
OrderCaptureRequestPaymentSource.new(card: card,
|
97
|
+
token: token,
|
98
|
+
paypal: paypal,
|
99
|
+
apple_pay: apple_pay,
|
100
|
+
google_pay: google_pay,
|
101
|
+
venmo: venmo)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# Customizes the payer confirmation experience.
|
8
|
+
class OrderConfirmApplicationContext < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Label to present to your payer as part of the PayPal hosted web
|
13
|
+
# experience.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :brand_name
|
16
|
+
|
17
|
+
# The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the
|
18
|
+
# language in which to localize the error-related strings, such as messages,
|
19
|
+
# issues, and suggested actions. The tag is made up of the [ISO 639-2
|
20
|
+
# language code](https://www.loc.gov/standards/iso639-2/php/code_list.php),
|
21
|
+
# the optional [ISO-15924 script
|
22
|
+
# tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166
|
23
|
+
# alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region
|
24
|
+
# code](https://unstats.un.org/unsd/methodology/m49/).
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :locale
|
27
|
+
|
28
|
+
# The URL where the customer is redirected after the customer approves the
|
29
|
+
# payment.
|
30
|
+
# @return [String]
|
31
|
+
attr_accessor :return_url
|
32
|
+
|
33
|
+
# The URL where the customer is redirected after the customer cancels the
|
34
|
+
# payment.
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :cancel_url
|
37
|
+
|
38
|
+
# Provides additional details to process a payment using a `payment_source`
|
39
|
+
# that has been stored or is intended to be stored (also referred to as
|
40
|
+
# stored_credential or card-on-file).<br/>Parameter
|
41
|
+
# compatibility:<br/><ul><li>`payment_type=ONE_TIME` is compatible only with
|
42
|
+
# `payment_initiator=CUSTOMER`.</li><li>`usage=FIRST` is compatible only
|
43
|
+
# with
|
44
|
+
# `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or
|
45
|
+
# `previous_network_transaction_reference` is compatible only with
|
46
|
+
# `payment_initiator=MERCHANT`.</li><li>Only one of the parameters -
|
47
|
+
# `previous_transaction_reference` and
|
48
|
+
# `previous_network_transaction_reference` - can be present in the
|
49
|
+
# request.</li></ul>
|
50
|
+
# @return [StoredPaymentSource]
|
51
|
+
attr_accessor :stored_payment_source
|
52
|
+
|
53
|
+
# A mapping from model property names to API property names.
|
54
|
+
def self.names
|
55
|
+
@_hash = {} if @_hash.nil?
|
56
|
+
@_hash['brand_name'] = 'brand_name'
|
57
|
+
@_hash['locale'] = 'locale'
|
58
|
+
@_hash['return_url'] = 'return_url'
|
59
|
+
@_hash['cancel_url'] = 'cancel_url'
|
60
|
+
@_hash['stored_payment_source'] = 'stored_payment_source'
|
61
|
+
@_hash
|
62
|
+
end
|
63
|
+
|
64
|
+
# An array for optional fields
|
65
|
+
def self.optionals
|
66
|
+
%w[
|
67
|
+
brand_name
|
68
|
+
locale
|
69
|
+
return_url
|
70
|
+
cancel_url
|
71
|
+
stored_payment_source
|
72
|
+
]
|
73
|
+
end
|
74
|
+
|
75
|
+
# An array for nullable fields
|
76
|
+
def self.nullables
|
77
|
+
[]
|
78
|
+
end
|
79
|
+
|
80
|
+
def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP,
|
81
|
+
cancel_url: SKIP, stored_payment_source: SKIP)
|
82
|
+
@brand_name = brand_name unless brand_name == SKIP
|
83
|
+
@locale = locale unless locale == SKIP
|
84
|
+
@return_url = return_url unless return_url == SKIP
|
85
|
+
@cancel_url = cancel_url unless cancel_url == SKIP
|
86
|
+
@stored_payment_source = stored_payment_source unless stored_payment_source == SKIP
|
87
|
+
end
|
88
|
+
|
89
|
+
# Creates an instance of the object from a hash.
|
90
|
+
def self.from_hash(hash)
|
91
|
+
return nil unless hash
|
92
|
+
|
93
|
+
# Extract variables from the hash.
|
94
|
+
brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP
|
95
|
+
locale = hash.key?('locale') ? hash['locale'] : SKIP
|
96
|
+
return_url = hash.key?('return_url') ? hash['return_url'] : SKIP
|
97
|
+
cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP
|
98
|
+
stored_payment_source = StoredPaymentSource.from_hash(hash['stored_payment_source']) if
|
99
|
+
hash['stored_payment_source']
|
100
|
+
|
101
|
+
# Create object from extracted values.
|
102
|
+
OrderConfirmApplicationContext.new(brand_name: brand_name,
|
103
|
+
locale: locale,
|
104
|
+
return_url: return_url,
|
105
|
+
cancel_url: cancel_url,
|
106
|
+
stored_payment_source: stored_payment_source)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|