paypal-server-sdk 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +34 -34
- data/README.md +19 -30
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/controllers/orders_controller.rb +228 -234
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +139 -91
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +57 -57
- data/lib/paypal_server_sdk/exceptions/api_exception.rb +11 -0
- data/lib/paypal_server_sdk/exceptions/error_exception.rb +14 -0
- data/lib/paypal_server_sdk/exceptions/o_auth_provider_exception.rb +14 -0
- data/lib/paypal_server_sdk/models/activity_timestamps.rb +17 -6
- data/lib/paypal_server_sdk/models/address.rb +24 -9
- data/lib/paypal_server_sdk/models/amount_breakdown.rb +17 -0
- data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +22 -9
- data/lib/paypal_server_sdk/models/apple_pay_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_card.rb +14 -0
- data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +48 -6
- data/lib/paypal_server_sdk/models/apple_pay_decrypted_token_data.rb +16 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data.rb +14 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data_type.rb +6 -2
- data/lib/paypal_server_sdk/models/apple_pay_payment_object.rb +43 -7
- data/lib/paypal_server_sdk/models/apple_pay_payment_token.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_request.rb +27 -13
- data/lib/paypal_server_sdk/models/apple_pay_tokenized_card.rb +15 -0
- data/lib/paypal_server_sdk/models/assurance_details.rb +14 -0
- data/lib/paypal_server_sdk/models/authentication_response.rb +13 -0
- data/lib/paypal_server_sdk/models/authorization.rb +28 -9
- data/lib/paypal_server_sdk/models/authorization_incomplete_reason.rb +2 -2
- data/lib/paypal_server_sdk/models/authorization_status.rb +12 -6
- data/lib/paypal_server_sdk/models/authorization_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/authorization_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/authorization_with_additional_data.rb +29 -9
- data/lib/paypal_server_sdk/models/avs_code.rb +102 -71
- data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +19 -5
- data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/base_model.rb +76 -28
- data/lib/paypal_server_sdk/models/billing_cycle.rb +129 -0
- data/lib/paypal_server_sdk/models/bin_details.rb +18 -5
- data/lib/paypal_server_sdk/models/blik_experience_context.rb +17 -0
- data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +12 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +12 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +15 -0
- data/lib/paypal_server_sdk/models/blik_payment_object.rb +22 -10
- data/lib/paypal_server_sdk/models/blik_payment_request.rb +24 -10
- data/lib/paypal_server_sdk/models/callback_configuration.rb +75 -0
- data/lib/paypal_server_sdk/models/callback_events.rb +27 -0
- data/lib/paypal_server_sdk/models/capture_incomplete_reason.rb +22 -14
- data/lib/paypal_server_sdk/models/capture_payment_instruction.rb +15 -0
- data/lib/paypal_server_sdk/models/capture_request.rb +17 -0
- data/lib/paypal_server_sdk/models/capture_status.rb +10 -6
- data/lib/paypal_server_sdk/models/capture_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/capture_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/captured_payment.rb +36 -10
- data/lib/paypal_server_sdk/models/card_attributes.rb +13 -0
- data/lib/paypal_server_sdk/models/card_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/card_authentication_response.rb +14 -2
- data/lib/paypal_server_sdk/models/card_brand.rb +29 -25
- data/lib/paypal_server_sdk/models/card_customer_information.rb +18 -5
- data/lib/paypal_server_sdk/models/card_experience_context.rb +12 -0
- data/lib/paypal_server_sdk/models/card_from_request.rb +12 -0
- data/lib/paypal_server_sdk/models/{card_response_entity.rb → card_payment_token_entity.rb} +37 -15
- data/lib/paypal_server_sdk/models/card_request.rb +32 -17
- data/lib/paypal_server_sdk/models/card_response.rb +43 -2
- data/lib/paypal_server_sdk/models/{address_details.rb → card_response_address.rb} +33 -57
- data/lib/paypal_server_sdk/models/card_stored_credential.rb +23 -7
- data/lib/paypal_server_sdk/models/card_supplementary_data.rb +13 -5
- data/lib/paypal_server_sdk/models/card_type.rb +5 -5
- data/lib/paypal_server_sdk/models/card_vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/card_verification.rb +16 -3
- data/lib/paypal_server_sdk/models/card_verification_details.rb +40 -11
- data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +12 -0
- data/lib/paypal_server_sdk/models/card_verification_status.rb +23 -0
- data/lib/paypal_server_sdk/models/checkout_payment_intent.rb +10 -2
- data/lib/paypal_server_sdk/models/cobranded_card.rb +13 -0
- data/lib/paypal_server_sdk/models/confirm_order_request.rb +15 -15
- data/lib/paypal_server_sdk/models/{customer_request.rb → customer.rb} +18 -4
- data/lib/paypal_server_sdk/models/customer_information.rb +17 -5
- data/lib/paypal_server_sdk/models/customer_response.rb +76 -0
- data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +21 -4
- data/lib/paypal_server_sdk/models/cvv_code.rb +35 -27
- data/lib/paypal_server_sdk/models/disbursement_mode.rb +5 -2
- data/lib/paypal_server_sdk/models/dispute_category.rb +2 -2
- data/lib/paypal_server_sdk/models/eci_flag.rb +6 -8
- data/lib/paypal_server_sdk/models/enrollment_status.rb +11 -8
- data/lib/paypal_server_sdk/models/eps_payment_object.rb +17 -5
- data/lib/paypal_server_sdk/models/eps_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/error_details.rb +15 -0
- data/lib/paypal_server_sdk/models/exchange_rate.rb +14 -0
- data/lib/paypal_server_sdk/models/experience_context.rb +15 -0
- data/lib/paypal_server_sdk/models/fulfillment_type.rb +36 -0
- data/lib/paypal_server_sdk/models/giropay_payment_object.rb +17 -5
- data/lib/paypal_server_sdk/models/giropay_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/google_pay_authentication_method.rb +8 -2
- data/lib/paypal_server_sdk/models/google_pay_card.rb +128 -0
- data/lib/paypal_server_sdk/models/google_pay_card_response.rb +16 -0
- data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +28 -2
- data/lib/paypal_server_sdk/models/google_pay_payment_method.rb +1 -1
- data/lib/paypal_server_sdk/models/google_pay_request.rb +22 -17
- data/lib/paypal_server_sdk/models/google_pay_request_card.rb +14 -0
- data/lib/paypal_server_sdk/models/google_pay_wallet_response.rb +18 -5
- data/lib/paypal_server_sdk/models/ideal_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/ideal_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/item.rb +17 -0
- data/lib/paypal_server_sdk/models/item_category.rb +6 -3
- data/lib/paypal_server_sdk/models/level2_card_processing_data.rb +12 -0
- data/lib/paypal_server_sdk/models/level3_card_processing_data.rb +17 -0
- data/lib/paypal_server_sdk/models/liability_shift_indicator.rb +3 -3
- data/lib/paypal_server_sdk/models/line_item.rb +21 -0
- data/lib/paypal_server_sdk/models/link_description.rb +12 -0
- data/lib/paypal_server_sdk/models/money.rb +16 -4
- data/lib/paypal_server_sdk/models/mybank_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/mybank_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/name.rb +12 -0
- data/lib/paypal_server_sdk/models/net_amount_breakdown_item.rb +14 -0
- data/lib/paypal_server_sdk/models/network_token.rb +15 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference.rb +14 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference_entity.rb +15 -3
- data/lib/paypal_server_sdk/models/one_time_charge.rb +118 -0
- data/lib/paypal_server_sdk/models/order.rb +28 -25
- data/lib/paypal_server_sdk/models/order_application_context.rb +40 -25
- data/lib/paypal_server_sdk/models/order_application_context_landing_page.rb +10 -3
- data/lib/paypal_server_sdk/models/order_application_context_shipping_preference.rb +14 -10
- data/lib/paypal_server_sdk/models/order_application_context_user_action.rb +11 -6
- data/lib/paypal_server_sdk/models/order_authorize_request.rb +12 -0
- data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +20 -9
- data/lib/paypal_server_sdk/models/order_authorize_response.rb +26 -23
- data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +14 -0
- data/lib/paypal_server_sdk/models/order_capture_request.rb +12 -0
- data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +20 -9
- data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +21 -8
- data/lib/paypal_server_sdk/models/order_request.rb +18 -4
- data/lib/paypal_server_sdk/models/order_status.rb +19 -6
- data/lib/paypal_server_sdk/models/order_tracker_item.rb +15 -0
- data/lib/paypal_server_sdk/models/order_tracker_request.rb +22 -5
- data/lib/paypal_server_sdk/models/order_tracker_response.rb +19 -6
- data/lib/paypal_server_sdk/models/order_tracker_status.rb +5 -2
- data/lib/paypal_server_sdk/models/order_update_callback_error_response.rb +89 -0
- data/lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb +81 -0
- data/lib/paypal_server_sdk/models/order_update_callback_request.rb +111 -0
- data/lib/paypal_server_sdk/models/order_update_callback_response.rb +72 -0
- data/lib/paypal_server_sdk/models/order_update_callback_shipping_address.rb +107 -0
- data/lib/paypal_server_sdk/models/order_update_callback_shipping_option.rb +93 -0
- data/lib/paypal_server_sdk/models/{capture.rb → orders_capture.rb} +46 -22
- data/lib/paypal_server_sdk/models/orders_card_verification_method.rb +51 -0
- data/lib/paypal_server_sdk/models/p24_payment_object.rb +24 -10
- data/lib/paypal_server_sdk/models/p24_payment_request.rb +22 -10
- data/lib/paypal_server_sdk/models/pa_res_status.rb +16 -16
- data/lib/paypal_server_sdk/models/participant_metadata.rb +64 -0
- data/lib/paypal_server_sdk/models/patch.rb +20 -10
- data/lib/paypal_server_sdk/models/patch_op.rb +43 -6
- data/lib/paypal_server_sdk/models/payee_base.rb +17 -5
- data/lib/paypal_server_sdk/models/payee_payment_method_preference.rb +4 -2
- data/lib/paypal_server_sdk/models/payer.rb +20 -5
- data/lib/paypal_server_sdk/models/payer_base.rb +16 -5
- data/lib/paypal_server_sdk/models/payment_advice_code.rb +53 -8
- data/lib/paypal_server_sdk/models/payment_authorization.rb +32 -11
- data/lib/paypal_server_sdk/models/payment_collection.rb +16 -2
- data/lib/paypal_server_sdk/models/payment_initiator.rb +5 -2
- data/lib/paypal_server_sdk/models/payment_instruction.rb +16 -0
- data/lib/paypal_server_sdk/models/payment_method_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/payment_source.rb +25 -9
- data/lib/paypal_server_sdk/models/payment_source_response.rb +19 -0
- data/lib/paypal_server_sdk/models/payment_supplementary_data.rb +12 -0
- data/lib/paypal_server_sdk/models/payment_token_request.rb +17 -3
- data/lib/paypal_server_sdk/models/payment_token_request_card.rb +17 -22
- data/lib/paypal_server_sdk/models/payment_token_request_payment_source.rb +12 -0
- data/lib/paypal_server_sdk/models/payment_token_response.rb +18 -3
- data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +18 -14
- data/lib/paypal_server_sdk/models/payment_token_status.rb +36 -0
- data/lib/paypal_server_sdk/models/payments_capture.rb +252 -0
- data/lib/paypal_server_sdk/models/payments_payment_advice_code.rb +42 -0
- data/lib/paypal_server_sdk/models/payments_processor_response.rb +98 -0
- data/lib/paypal_server_sdk/models/paypal_experience_landing_page.rb +11 -3
- data/lib/paypal_server_sdk/models/paypal_experience_user_action.rb +9 -4
- data/lib/paypal_server_sdk/models/paypal_payment_token.rb +38 -8
- data/lib/paypal_server_sdk/models/paypal_payment_token_customer_type.rb +7 -3
- data/lib/paypal_server_sdk/models/paypal_payment_token_usage_type.rb +7 -3
- data/lib/paypal_server_sdk/models/paypal_wallet.rb +41 -11
- data/lib/paypal_server_sdk/models/paypal_wallet_account_verification_status.rb +6 -2
- data/lib/paypal_server_sdk/models/paypal_wallet_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_context_shipping_preference.rb +31 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_customer.rb +18 -5
- data/lib/paypal_server_sdk/models/paypal_wallet_customer_request.rb +18 -5
- data/lib/paypal_server_sdk/models/paypal_wallet_experience_context.rb +45 -12
- data/lib/paypal_server_sdk/models/paypal_wallet_response.rb +39 -7
- data/lib/paypal_server_sdk/models/paypal_wallet_stored_credential.rb +98 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_instruction.rb +18 -1
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_status.rb +8 -3
- data/lib/paypal_server_sdk/models/phone.rb +14 -0
- data/lib/paypal_server_sdk/models/phone_number.rb +12 -0
- data/lib/paypal_server_sdk/models/phone_number_with_country_code.rb +15 -0
- data/lib/paypal_server_sdk/models/phone_with_type.rb +13 -0
- data/lib/paypal_server_sdk/models/plan.rb +102 -0
- data/lib/paypal_server_sdk/models/platform_fee.rb +12 -0
- data/lib/paypal_server_sdk/models/pricing_model.rb +28 -0
- data/lib/paypal_server_sdk/models/pricing_scheme.rb +84 -0
- data/lib/paypal_server_sdk/models/processor_response.rb +15 -0
- data/lib/paypal_server_sdk/models/processor_response_code.rb +312 -308
- data/lib/paypal_server_sdk/models/purchase_unit.rb +43 -25
- data/lib/paypal_server_sdk/models/purchase_unit_request.rb +36 -20
- data/lib/paypal_server_sdk/models/reauthorize_request.rb +19 -8
- data/lib/paypal_server_sdk/models/refund.rb +25 -6
- data/lib/paypal_server_sdk/models/refund_incomplete_reason.rb +2 -1
- data/lib/paypal_server_sdk/models/refund_payment_instruction.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_platform_fee.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_request.rb +17 -2
- data/lib/paypal_server_sdk/models/refund_status.rb +4 -4
- data/lib/paypal_server_sdk/models/refund_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/related_identifiers.rb +14 -0
- data/lib/paypal_server_sdk/models/risk_supplementary_data.rb +63 -0
- data/lib/paypal_server_sdk/models/seller_payable_breakdown.rb +21 -0
- data/lib/paypal_server_sdk/models/seller_protection.rb +13 -0
- data/lib/paypal_server_sdk/models/seller_protection_status.rb +6 -3
- data/lib/paypal_server_sdk/models/seller_receivable_breakdown.rb +18 -0
- data/lib/paypal_server_sdk/models/setup_token_card_experience_context.rb +21 -5
- data/lib/paypal_server_sdk/models/setup_token_request.rb +17 -3
- data/lib/paypal_server_sdk/models/setup_token_request_card.rb +20 -18
- data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +13 -0
- data/lib/paypal_server_sdk/models/setup_token_response.rb +23 -16
- data/lib/paypal_server_sdk/models/setup_token_response_card.rb +25 -3
- data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +13 -0
- data/lib/paypal_server_sdk/models/shipment_carrier.rb +1594 -1295
- data/lib/paypal_server_sdk/models/shipping_details.rb +30 -3
- data/lib/paypal_server_sdk/models/shipping_name.rb +12 -0
- data/lib/paypal_server_sdk/models/shipping_option.rb +14 -0
- data/lib/paypal_server_sdk/models/shipping_options_purchase_unit.rb +102 -0
- data/lib/paypal_server_sdk/models/shipping_preference.rb +6 -3
- data/lib/paypal_server_sdk/models/shipping_type.rb +12 -4
- data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +31 -3
- data/lib/paypal_server_sdk/models/sofort_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/sofort_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/standard_entry_class_code.rb +12 -4
- data/lib/paypal_server_sdk/models/store_in_vault_instruction.rb +2 -1
- data/lib/paypal_server_sdk/models/stored_payment_source.rb +23 -7
- data/lib/paypal_server_sdk/models/stored_payment_source_payment_type.rb +6 -3
- data/lib/paypal_server_sdk/models/stored_payment_source_usage_type.rb +6 -3
- data/lib/paypal_server_sdk/models/supplementary_data.rb +25 -7
- data/lib/paypal_server_sdk/models/supplementary_purchase_data.rb +13 -0
- data/lib/paypal_server_sdk/models/tax_id_type.rb +2 -2
- data/lib/paypal_server_sdk/models/tax_info.rb +12 -0
- data/lib/paypal_server_sdk/models/tenure_type.rb +28 -0
- data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +14 -0
- data/lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb +89 -0
- data/lib/paypal_server_sdk/models/token.rb +12 -0
- data/lib/paypal_server_sdk/models/token_type.rb +2 -1
- data/lib/paypal_server_sdk/models/trustly_payment_object.rb +31 -6
- data/lib/paypal_server_sdk/models/trustly_payment_request.rb +30 -6
- data/lib/paypal_server_sdk/models/universal_product_code.rb +12 -0
- data/lib/paypal_server_sdk/models/upc_type.rb +14 -14
- data/lib/paypal_server_sdk/models/usage_pattern.rb +72 -0
- data/lib/paypal_server_sdk/models/vault_card_verification_method.rb +39 -0
- data/lib/paypal_server_sdk/models/vault_customer.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_experience_context.rb +26 -7
- data/lib/paypal_server_sdk/models/vault_instruction.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_instruction_action.rb +26 -0
- data/lib/paypal_server_sdk/models/vault_instruction_base.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_paypal_wallet_request.rb +43 -4
- data/lib/paypal_server_sdk/models/vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/vault_response_customer.rb +86 -0
- data/lib/paypal_server_sdk/models/vault_status.rb +8 -3
- data/lib/paypal_server_sdk/models/vault_token_request.rb +13 -1
- data/lib/paypal_server_sdk/models/vault_token_request_type.rb +20 -0
- data/lib/paypal_server_sdk/models/vault_venmo_experience_context.rb +24 -6
- data/lib/paypal_server_sdk/models/vault_venmo_request.rb +31 -3
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet.rb +29 -3
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +27 -2
- data/lib/paypal_server_sdk/models/venmo_payment_token.rb +37 -8
- data/lib/paypal_server_sdk/models/venmo_payment_token_customer_type.rb +4 -2
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb +12 -6
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_type.rb +5 -2
- data/lib/paypal_server_sdk/models/venmo_wallet_additional_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_customer_information.rb +16 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb +34 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_request.rb +21 -8
- data/lib/paypal_server_sdk/models/venmo_wallet_response.rb +21 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb +17 -0
- data/lib/paypal_server_sdk/utilities/file_wrapper.rb +14 -2
- data/lib/paypal_server_sdk.rb +183 -152
- metadata +42 -16
- data/lib/paypal_server_sdk/models/card_payment_token.rb +0 -166
- data/lib/paypal_server_sdk/models/card_verification_method.rb +0 -29
- data/lib/paypal_server_sdk/models/fullfillment_type.rb +0 -31
- data/lib/paypal_server_sdk/models/google_pay_card_attributes.rb +0 -51
- data/lib/paypal_server_sdk/models/payee.rb +0 -65
- data/lib/paypal_server_sdk/models/paypal_payment_token_usage_pattern.rb +0 -35
- data/lib/paypal_server_sdk/models/processing_instruction.rb +0 -23
- data/lib/paypal_server_sdk/models/token_request_type.rb +0 -23
@@ -14,11 +14,10 @@ module PaypalServerSdk
|
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
16
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
17
|
-
# that identifies the country or region
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
17
|
+
# that identifies the country or region. Note: The country code for Great
|
18
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
19
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
20
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
22
21
|
# @return [String]
|
23
22
|
attr_accessor :country_code
|
24
23
|
|
@@ -81,5 +80,19 @@ module PaypalServerSdk
|
|
81
80
|
bic: bic,
|
82
81
|
iban_last_chars: iban_last_chars)
|
83
82
|
end
|
83
|
+
|
84
|
+
# Provides a human-readable string representation of the object.
|
85
|
+
def to_s
|
86
|
+
class_name = self.class.name.split('::').last
|
87
|
+
"<#{class_name} name: #{@name}, country_code: #{@country_code}, bic: #{@bic},"\
|
88
|
+
" iban_last_chars: #{@iban_last_chars}>"
|
89
|
+
end
|
90
|
+
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
92
|
+
def inspect
|
93
|
+
class_name = self.class.name.split('::').last
|
94
|
+
"<#{class_name} name: #{@name.inspect}, country_code: #{@country_code.inspect}, bic:"\
|
95
|
+
" #{@bic.inspect}, iban_last_chars: #{@iban_last_chars.inspect}>"
|
96
|
+
end
|
84
97
|
end
|
85
98
|
end
|
@@ -14,11 +14,10 @@ module PaypalServerSdk
|
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
16
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
17
|
-
# that identifies the country or region
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
17
|
+
# that identifies the country or region. Note: The country code for Great
|
18
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
19
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
20
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
22
21
|
# @return [String]
|
23
22
|
attr_accessor :country_code
|
24
23
|
|
@@ -69,5 +68,19 @@ module PaypalServerSdk
|
|
69
68
|
country_code: country_code,
|
70
69
|
experience_context: experience_context)
|
71
70
|
end
|
71
|
+
|
72
|
+
# Provides a human-readable string representation of the object.
|
73
|
+
def to_s
|
74
|
+
class_name = self.class.name.split('::').last
|
75
|
+
"<#{class_name} name: #{@name}, country_code: #{@country_code}, experience_context:"\
|
76
|
+
" #{@experience_context}>"
|
77
|
+
end
|
78
|
+
|
79
|
+
# Provides a debugging-friendly string with detailed object information.
|
80
|
+
def inspect
|
81
|
+
class_name = self.class.name.split('::').last
|
82
|
+
"<#{class_name} name: #{@name.inspect}, country_code: #{@country_code.inspect},"\
|
83
|
+
" experience_context: #{@experience_context.inspect}>"
|
84
|
+
end
|
72
85
|
end
|
73
86
|
end
|
@@ -57,5 +57,17 @@ module PaypalServerSdk
|
|
57
57
|
Name.new(given_name: given_name,
|
58
58
|
surname: surname)
|
59
59
|
end
|
60
|
+
|
61
|
+
# Provides a human-readable string representation of the object.
|
62
|
+
def to_s
|
63
|
+
class_name = self.class.name.split('::').last
|
64
|
+
"<#{class_name} given_name: #{@given_name}, surname: #{@surname}>"
|
65
|
+
end
|
66
|
+
|
67
|
+
# Provides a debugging-friendly string with detailed object information.
|
68
|
+
def inspect
|
69
|
+
class_name = self.class.name.split('::').last
|
70
|
+
"<#{class_name} given_name: #{@given_name.inspect}, surname: #{@surname.inspect}>"
|
71
|
+
end
|
60
72
|
end
|
61
73
|
end
|
@@ -69,5 +69,19 @@ module PaypalServerSdk
|
|
69
69
|
converted_amount: converted_amount,
|
70
70
|
exchange_rate: exchange_rate)
|
71
71
|
end
|
72
|
+
|
73
|
+
# Provides a human-readable string representation of the object.
|
74
|
+
def to_s
|
75
|
+
class_name = self.class.name.split('::').last
|
76
|
+
"<#{class_name} payable_amount: #{@payable_amount}, converted_amount: #{@converted_amount},"\
|
77
|
+
" exchange_rate: #{@exchange_rate}>"
|
78
|
+
end
|
79
|
+
|
80
|
+
# Provides a debugging-friendly string with detailed object information.
|
81
|
+
def inspect
|
82
|
+
class_name = self.class.name.split('::').last
|
83
|
+
"<#{class_name} payable_amount: #{@payable_amount.inspect}, converted_amount:"\
|
84
|
+
" #{@converted_amount.inspect}, exchange_rate: #{@exchange_rate.inspect}>"
|
85
|
+
end
|
72
86
|
end
|
73
87
|
end
|
@@ -91,5 +91,20 @@ module PaypalServerSdk
|
|
91
91
|
eci_flag: eci_flag,
|
92
92
|
token_requestor_id: token_requestor_id)
|
93
93
|
end
|
94
|
+
|
95
|
+
# Provides a human-readable string representation of the object.
|
96
|
+
def to_s
|
97
|
+
class_name = self.class.name.split('::').last
|
98
|
+
"<#{class_name} number: #{@number}, expiry: #{@expiry}, cryptogram: #{@cryptogram},"\
|
99
|
+
" eci_flag: #{@eci_flag}, token_requestor_id: #{@token_requestor_id}>"
|
100
|
+
end
|
101
|
+
|
102
|
+
# Provides a debugging-friendly string with detailed object information.
|
103
|
+
def inspect
|
104
|
+
class_name = self.class.name.split('::').last
|
105
|
+
"<#{class_name} number: #{@number.inspect}, expiry: #{@expiry.inspect}, cryptogram:"\
|
106
|
+
" #{@cryptogram.inspect}, eci_flag: #{@eci_flag.inspect}, token_requestor_id:"\
|
107
|
+
" #{@token_requestor_id.inspect}>"
|
108
|
+
end
|
94
109
|
end
|
95
110
|
end
|
@@ -86,5 +86,19 @@ module PaypalServerSdk
|
|
86
86
|
network: network,
|
87
87
|
acquirer_reference_number: acquirer_reference_number)
|
88
88
|
end
|
89
|
+
|
90
|
+
# Provides a human-readable string representation of the object.
|
91
|
+
def to_s
|
92
|
+
class_name = self.class.name.split('::').last
|
93
|
+
"<#{class_name} id: #{@id}, date: #{@date}, network: #{@network},"\
|
94
|
+
" acquirer_reference_number: #{@acquirer_reference_number}>"
|
95
|
+
end
|
96
|
+
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
98
|
+
def inspect
|
99
|
+
class_name = self.class.name.split('::').last
|
100
|
+
"<#{class_name} id: #{@id.inspect}, date: #{@date.inspect}, network: #{@network.inspect},"\
|
101
|
+
" acquirer_reference_number: #{@acquirer_reference_number.inspect}>"
|
102
|
+
end
|
89
103
|
end
|
90
104
|
end
|
@@ -31,9 +31,8 @@ module PaypalServerSdk
|
|
31
31
|
|
32
32
|
# The date and time, in [Internet date and time
|
33
33
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
34
|
-
# required while fractional seconds are
|
35
|
-
#
|
36
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
34
|
+
# required while fractional seconds are optional. Note: The regular
|
35
|
+
# expression provides guidance but does not reject all invalid dates.
|
37
36
|
# @return [String]
|
38
37
|
attr_accessor :time
|
39
38
|
|
@@ -84,5 +83,18 @@ module PaypalServerSdk
|
|
84
83
|
network: network,
|
85
84
|
time: time)
|
86
85
|
end
|
86
|
+
|
87
|
+
# Provides a human-readable string representation of the object.
|
88
|
+
def to_s
|
89
|
+
class_name = self.class.name.split('::').last
|
90
|
+
"<#{class_name} id: #{@id}, date: #{@date}, network: #{@network}, time: #{@time}>"
|
91
|
+
end
|
92
|
+
|
93
|
+
# Provides a debugging-friendly string with detailed object information.
|
94
|
+
def inspect
|
95
|
+
class_name = self.class.name.split('::').last
|
96
|
+
"<#{class_name} id: #{@id.inspect}, date: #{@date.inspect}, network: #{@network.inspect},"\
|
97
|
+
" time: #{@time.inspect}>"
|
98
|
+
end
|
87
99
|
end
|
88
100
|
end
|
@@ -0,0 +1,118 @@
|
|
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 one-time charge info at the time of checkout.
|
8
|
+
class OneTimeCharge < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The currency and amount for a financial transaction, such as a balance or
|
13
|
+
# payment due.
|
14
|
+
# @return [Money]
|
15
|
+
attr_accessor :setup_fee
|
16
|
+
|
17
|
+
# The currency and amount for a financial transaction, such as a balance or
|
18
|
+
# payment due.
|
19
|
+
# @return [Money]
|
20
|
+
attr_accessor :shipping_amount
|
21
|
+
|
22
|
+
# The currency and amount for a financial transaction, such as a balance or
|
23
|
+
# payment due.
|
24
|
+
# @return [Money]
|
25
|
+
attr_accessor :taxes
|
26
|
+
|
27
|
+
# The currency and amount for a financial transaction, such as a balance or
|
28
|
+
# payment due.
|
29
|
+
# @return [Money]
|
30
|
+
attr_accessor :product_price
|
31
|
+
|
32
|
+
# The currency and amount for a financial transaction, such as a balance or
|
33
|
+
# payment due.
|
34
|
+
# @return [Money]
|
35
|
+
attr_accessor :subtotal
|
36
|
+
|
37
|
+
# The currency and amount for a financial transaction, such as a balance or
|
38
|
+
# payment due.
|
39
|
+
# @return [Money]
|
40
|
+
attr_accessor :total_amount
|
41
|
+
|
42
|
+
# A mapping from model property names to API property names.
|
43
|
+
def self.names
|
44
|
+
@_hash = {} if @_hash.nil?
|
45
|
+
@_hash['setup_fee'] = 'setup_fee'
|
46
|
+
@_hash['shipping_amount'] = 'shipping_amount'
|
47
|
+
@_hash['taxes'] = 'taxes'
|
48
|
+
@_hash['product_price'] = 'product_price'
|
49
|
+
@_hash['subtotal'] = 'subtotal'
|
50
|
+
@_hash['total_amount'] = 'total_amount'
|
51
|
+
@_hash
|
52
|
+
end
|
53
|
+
|
54
|
+
# An array for optional fields
|
55
|
+
def self.optionals
|
56
|
+
%w[
|
57
|
+
setup_fee
|
58
|
+
shipping_amount
|
59
|
+
taxes
|
60
|
+
product_price
|
61
|
+
subtotal
|
62
|
+
]
|
63
|
+
end
|
64
|
+
|
65
|
+
# An array for nullable fields
|
66
|
+
def self.nullables
|
67
|
+
[]
|
68
|
+
end
|
69
|
+
|
70
|
+
def initialize(total_amount:, setup_fee: SKIP, shipping_amount: SKIP,
|
71
|
+
taxes: SKIP, product_price: SKIP, subtotal: SKIP)
|
72
|
+
@setup_fee = setup_fee unless setup_fee == SKIP
|
73
|
+
@shipping_amount = shipping_amount unless shipping_amount == SKIP
|
74
|
+
@taxes = taxes unless taxes == SKIP
|
75
|
+
@product_price = product_price unless product_price == SKIP
|
76
|
+
@subtotal = subtotal unless subtotal == SKIP
|
77
|
+
@total_amount = total_amount
|
78
|
+
end
|
79
|
+
|
80
|
+
# Creates an instance of the object from a hash.
|
81
|
+
def self.from_hash(hash)
|
82
|
+
return nil unless hash
|
83
|
+
|
84
|
+
# Extract variables from the hash.
|
85
|
+
total_amount = Money.from_hash(hash['total_amount']) if hash['total_amount']
|
86
|
+
setup_fee = Money.from_hash(hash['setup_fee']) if hash['setup_fee']
|
87
|
+
shipping_amount = Money.from_hash(hash['shipping_amount']) if hash['shipping_amount']
|
88
|
+
taxes = Money.from_hash(hash['taxes']) if hash['taxes']
|
89
|
+
product_price = Money.from_hash(hash['product_price']) if hash['product_price']
|
90
|
+
subtotal = Money.from_hash(hash['subtotal']) if hash['subtotal']
|
91
|
+
|
92
|
+
# Create object from extracted values.
|
93
|
+
OneTimeCharge.new(total_amount: total_amount,
|
94
|
+
setup_fee: setup_fee,
|
95
|
+
shipping_amount: shipping_amount,
|
96
|
+
taxes: taxes,
|
97
|
+
product_price: product_price,
|
98
|
+
subtotal: subtotal)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Provides a human-readable string representation of the object.
|
102
|
+
def to_s
|
103
|
+
class_name = self.class.name.split('::').last
|
104
|
+
"<#{class_name} setup_fee: #{@setup_fee}, shipping_amount: #{@shipping_amount}, taxes:"\
|
105
|
+
" #{@taxes}, product_price: #{@product_price}, subtotal: #{@subtotal}, total_amount:"\
|
106
|
+
" #{@total_amount}>"
|
107
|
+
end
|
108
|
+
|
109
|
+
# Provides a debugging-friendly string with detailed object information.
|
110
|
+
def inspect
|
111
|
+
class_name = self.class.name.split('::').last
|
112
|
+
"<#{class_name} setup_fee: #{@setup_fee.inspect}, shipping_amount:"\
|
113
|
+
" #{@shipping_amount.inspect}, taxes: #{@taxes.inspect}, product_price:"\
|
114
|
+
" #{@product_price.inspect}, subtotal: #{@subtotal.inspect}, total_amount:"\
|
115
|
+
" #{@total_amount.inspect}>"
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
@@ -11,17 +11,15 @@ module PaypalServerSdk
|
|
11
11
|
|
12
12
|
# The date and time, in [Internet date and time
|
13
13
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
14
|
-
# required while fractional seconds are
|
15
|
-
#
|
16
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
14
|
+
# required while fractional seconds are optional. Note: The regular
|
15
|
+
# expression provides guidance but does not reject all invalid dates.
|
17
16
|
# @return [String]
|
18
17
|
attr_accessor :create_time
|
19
18
|
|
20
19
|
# The date and time, in [Internet date and time
|
21
20
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
22
|
-
# required while fractional seconds are
|
23
|
-
#
|
24
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
21
|
+
# required while fractional seconds are optional. Note: The regular
|
22
|
+
# expression provides guidance but does not reject all invalid dates.
|
25
23
|
# @return [String]
|
26
24
|
attr_accessor :update_time
|
27
25
|
|
@@ -38,11 +36,8 @@ module PaypalServerSdk
|
|
38
36
|
# @return [CheckoutPaymentIntent]
|
39
37
|
attr_accessor :intent
|
40
38
|
|
41
|
-
# The
|
42
|
-
#
|
43
|
-
attr_accessor :processing_instruction
|
44
|
-
|
45
|
-
# The instruction to process an order.
|
39
|
+
# The intent to either capture payment immediately or authorize a payment
|
40
|
+
# for an order after order creation.
|
46
41
|
# @return [Payer]
|
47
42
|
attr_accessor :payer
|
48
43
|
|
@@ -58,10 +53,10 @@ module PaypalServerSdk
|
|
58
53
|
attr_accessor :status
|
59
54
|
|
60
55
|
# An array of request-related HATEOAS links. To complete payer approval, use
|
61
|
-
# the `approve` link to redirect the payer. The API caller has
|
56
|
+
# the `approve` link to redirect the payer. The API caller has 6 hours
|
62
57
|
# (default setting, this which can be changed by your account manager to
|
63
58
|
# 24/48/72 hours to accommodate your use case) from the time the order is
|
64
|
-
# created, to redirect your payer. Once redirected, the API caller has
|
59
|
+
# created, to redirect your payer. Once redirected, the API caller has 6
|
65
60
|
# hours for the payer to approve the order and either authorize or capture
|
66
61
|
# the order. If you are not using the PayPal JavaScript SDK to initiate
|
67
62
|
# PayPal Checkout (in context) ensure that you include
|
@@ -79,7 +74,6 @@ module PaypalServerSdk
|
|
79
74
|
@_hash['id'] = 'id'
|
80
75
|
@_hash['payment_source'] = 'payment_source'
|
81
76
|
@_hash['intent'] = 'intent'
|
82
|
-
@_hash['processing_instruction'] = 'processing_instruction'
|
83
77
|
@_hash['payer'] = 'payer'
|
84
78
|
@_hash['purchase_units'] = 'purchase_units'
|
85
79
|
@_hash['status'] = 'status'
|
@@ -95,7 +89,6 @@ module PaypalServerSdk
|
|
95
89
|
id
|
96
90
|
payment_source
|
97
91
|
intent
|
98
|
-
processing_instruction
|
99
92
|
payer
|
100
93
|
purchase_units
|
101
94
|
status
|
@@ -108,18 +101,14 @@ module PaypalServerSdk
|
|
108
101
|
[]
|
109
102
|
end
|
110
103
|
|
111
|
-
def initialize(
|
112
|
-
|
113
|
-
|
114
|
-
processing_instruction: ProcessingInstruction::NO_INSTRUCTION,
|
115
|
-
payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP
|
116
|
-
)
|
104
|
+
def initialize(create_time: SKIP, update_time: SKIP, id: SKIP,
|
105
|
+
payment_source: SKIP, intent: SKIP, payer: SKIP,
|
106
|
+
purchase_units: SKIP, status: SKIP, links: SKIP)
|
117
107
|
@create_time = create_time unless create_time == SKIP
|
118
108
|
@update_time = update_time unless update_time == SKIP
|
119
109
|
@id = id unless id == SKIP
|
120
110
|
@payment_source = payment_source unless payment_source == SKIP
|
121
111
|
@intent = intent unless intent == SKIP
|
122
|
-
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
123
112
|
@payer = payer unless payer == SKIP
|
124
113
|
@purchase_units = purchase_units unless purchase_units == SKIP
|
125
114
|
@status = status unless status == SKIP
|
@@ -137,8 +126,6 @@ module PaypalServerSdk
|
|
137
126
|
payment_source = PaymentSourceResponse.from_hash(hash['payment_source']) if
|
138
127
|
hash['payment_source']
|
139
128
|
intent = hash.key?('intent') ? hash['intent'] : SKIP
|
140
|
-
processing_instruction =
|
141
|
-
hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION
|
142
129
|
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
143
130
|
# Parameter is an array, so we need to iterate through it
|
144
131
|
purchase_units = nil
|
@@ -168,11 +155,27 @@ module PaypalServerSdk
|
|
168
155
|
id: id,
|
169
156
|
payment_source: payment_source,
|
170
157
|
intent: intent,
|
171
|
-
processing_instruction: processing_instruction,
|
172
158
|
payer: payer,
|
173
159
|
purchase_units: purchase_units,
|
174
160
|
status: status,
|
175
161
|
links: links)
|
176
162
|
end
|
163
|
+
|
164
|
+
# Provides a human-readable string representation of the object.
|
165
|
+
def to_s
|
166
|
+
class_name = self.class.name.split('::').last
|
167
|
+
"<#{class_name} create_time: #{@create_time}, update_time: #{@update_time}, id: #{@id},"\
|
168
|
+
" payment_source: #{@payment_source}, intent: #{@intent}, payer: #{@payer}, purchase_units:"\
|
169
|
+
" #{@purchase_units}, status: #{@status}, links: #{@links}>"
|
170
|
+
end
|
171
|
+
|
172
|
+
# Provides a debugging-friendly string with detailed object information.
|
173
|
+
def inspect
|
174
|
+
class_name = self.class.name.split('::').last
|
175
|
+
"<#{class_name} create_time: #{@create_time.inspect}, update_time: #{@update_time.inspect},"\
|
176
|
+
" id: #{@id.inspect}, payment_source: #{@payment_source.inspect}, intent:"\
|
177
|
+
" #{@intent.inspect}, payer: #{@payer.inspect}, purchase_units: #{@purchase_units.inspect},"\
|
178
|
+
" status: #{@status.inspect}, links: #{@links.inspect}>"
|
179
|
+
end
|
177
180
|
end
|
178
181
|
end
|
@@ -5,10 +5,9 @@
|
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# Customizes the payer experience during the approval process for the payment
|
8
|
-
# with PayPal
|
9
|
-
#
|
10
|
-
#
|
11
|
-
# values.</blockquote>
|
8
|
+
# with PayPal. Note: Partners and Marketplaces might configure brand_name and
|
9
|
+
# shipping_preference during partner account setup, which overrides the
|
10
|
+
# request values.
|
12
11
|
class OrderApplicationContext < BaseModel
|
13
12
|
SKIP = Object.new
|
14
13
|
private_constant :SKIP
|
@@ -44,22 +43,21 @@ module PaypalServerSdk
|
|
44
43
|
# @return [OrderApplicationContextLandingPage]
|
45
44
|
attr_accessor :landing_page
|
46
45
|
|
47
|
-
# DEPRECATED. DEPRECATED. The shipping preference
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
46
|
+
# DEPRECATED. DEPRECATED. The shipping preference: Displays the shipping
|
47
|
+
# address to the customer. Enables the customer to choose an address on the
|
48
|
+
# PayPal site. Restricts the customer from changing the address during the
|
49
|
+
# payment-approval process. . The fields in `application_context` are now
|
50
|
+
# available in the `experience_context` object under the `payment_source`
|
51
|
+
# which supports them (eg.
|
52
|
+
# `payment_source.paypal.experience_context.shipping_preference`). Please
|
53
|
+
# specify this field in the `experience_context` object instead of the
|
54
|
+
# `application_context` object.
|
56
55
|
# @return [OrderApplicationContextShippingPreference]
|
57
56
|
attr_accessor :shipping_preference
|
58
57
|
|
59
|
-
# DEPRECATED. Configures a
|
60
|
-
#
|
61
|
-
#
|
62
|
-
# which supports them (eg.
|
58
|
+
# DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in
|
59
|
+
# `application_context` are now available in the `experience_context` object
|
60
|
+
# under the `payment_source` which supports them (eg.
|
63
61
|
# `payment_source.paypal.experience_context.user_action`). Please specify
|
64
62
|
# this field in the `experience_context` object instead of the
|
65
63
|
# `application_context` object.
|
@@ -91,16 +89,14 @@ module PaypalServerSdk
|
|
91
89
|
|
92
90
|
# Provides additional details to process a payment using a `payment_source`
|
93
91
|
# that has been stored or is intended to be stored (also referred to as
|
94
|
-
# stored_credential or card-on-file)
|
95
|
-
#
|
96
|
-
# `payment_initiator=CUSTOMER
|
97
|
-
#
|
98
|
-
# `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or
|
92
|
+
# stored_credential or card-on-file). Parameter compatibility:
|
93
|
+
# `payment_type=ONE_TIME` is compatible only with
|
94
|
+
# `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with
|
95
|
+
# `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
99
96
|
# `previous_network_transaction_reference` is compatible only with
|
100
|
-
# `payment_initiator=MERCHANT
|
97
|
+
# `payment_initiator=MERCHANT`. Only one of the parameters -
|
101
98
|
# `previous_transaction_reference` and
|
102
|
-
# `previous_network_transaction_reference` - can be present in the
|
103
|
-
# request.</li></ul>
|
99
|
+
# `previous_network_transaction_reference` - can be present in the request.
|
104
100
|
# @return [StoredPaymentSource]
|
105
101
|
attr_accessor :stored_payment_source
|
106
102
|
|
@@ -189,5 +185,24 @@ module PaypalServerSdk
|
|
189
185
|
cancel_url: cancel_url,
|
190
186
|
stored_payment_source: stored_payment_source)
|
191
187
|
end
|
188
|
+
|
189
|
+
# Provides a human-readable string representation of the object.
|
190
|
+
def to_s
|
191
|
+
class_name = self.class.name.split('::').last
|
192
|
+
"<#{class_name} brand_name: #{@brand_name}, locale: #{@locale}, landing_page:"\
|
193
|
+
" #{@landing_page}, shipping_preference: #{@shipping_preference}, user_action:"\
|
194
|
+
" #{@user_action}, payment_method: #{@payment_method}, return_url: #{@return_url},"\
|
195
|
+
" cancel_url: #{@cancel_url}, stored_payment_source: #{@stored_payment_source}>"
|
196
|
+
end
|
197
|
+
|
198
|
+
# Provides a debugging-friendly string with detailed object information.
|
199
|
+
def inspect
|
200
|
+
class_name = self.class.name.split('::').last
|
201
|
+
"<#{class_name} brand_name: #{@brand_name.inspect}, locale: #{@locale.inspect},"\
|
202
|
+
" landing_page: #{@landing_page.inspect}, shipping_preference:"\
|
203
|
+
" #{@shipping_preference.inspect}, user_action: #{@user_action.inspect}, payment_method:"\
|
204
|
+
" #{@payment_method.inspect}, return_url: #{@return_url.inspect}, cancel_url:"\
|
205
|
+
" #{@cancel_url.inspect}, stored_payment_source: #{@stored_payment_source.inspect}>"
|
206
|
+
end
|
192
207
|
end
|
193
208
|
end
|
@@ -13,13 +13,20 @@ module PaypalServerSdk
|
|
13
13
|
# `application_context` object.
|
14
14
|
class OrderApplicationContextLandingPage
|
15
15
|
ORDER_APPLICATION_CONTEXT_LANDING_PAGE = [
|
16
|
-
#
|
16
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
17
|
+
# a page to log in to PayPal and approve the payment.
|
17
18
|
LOGIN = 'LOGIN'.freeze,
|
18
19
|
|
19
|
-
#
|
20
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
21
|
+
# a page to enter credit or debit card and other relevant billing
|
22
|
+
# information required to complete the purchase.
|
20
23
|
BILLING = 'BILLING'.freeze,
|
21
24
|
|
22
|
-
#
|
25
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
26
|
+
# either a page to log in to PayPal and approve the payment or to a page
|
27
|
+
# to enter credit or debit card and other relevant billing information
|
28
|
+
# required to complete the purchase, depending on their previous
|
29
|
+
# interaction with PayPal.
|
23
30
|
NO_PREFERENCE = 'NO_PREFERENCE'.freeze
|
24
31
|
].freeze
|
25
32
|
|
@@ -4,24 +4,28 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
|
-
# DEPRECATED. DEPRECATED. The shipping preference
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
7
|
+
# DEPRECATED. DEPRECATED. The shipping preference: Displays the shipping
|
8
|
+
# address to the customer. Enables the customer to choose an address on the
|
9
|
+
# PayPal site. Restricts the customer from changing the address during the
|
10
|
+
# payment-approval process. . The fields in `application_context` are now
|
11
|
+
# available in the `experience_context` object under the `payment_source`
|
12
|
+
# which supports them (eg.
|
13
13
|
# `payment_source.paypal.experience_context.shipping_preference`). Please
|
14
14
|
# specify this field in the `experience_context` object instead of the
|
15
|
-
# `application_context` object.
|
15
|
+
# `application_context` object., The shipping preference. This only applies to
|
16
|
+
# PayPal payment source., The shipping preference. This only applies to PayPal
|
17
|
+
# payment source.
|
16
18
|
class OrderApplicationContextShippingPreference
|
17
19
|
ORDER_APPLICATION_CONTEXT_SHIPPING_PREFERENCE = [
|
18
|
-
#
|
20
|
+
# Use the customer-provided shipping address on the PayPal site.
|
19
21
|
GET_FROM_FILE = 'GET_FROM_FILE'.freeze,
|
20
22
|
|
21
|
-
#
|
23
|
+
# Redact the shipping address from the PayPal site. Recommended for
|
24
|
+
# digital goods.
|
22
25
|
NO_SHIPPING = 'NO_SHIPPING'.freeze,
|
23
26
|
|
24
|
-
#
|
27
|
+
# Use the merchant-provided address. The customer cannot change this
|
28
|
+
# address on the PayPal site.
|
25
29
|
SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze
|
26
30
|
].freeze
|
27
31
|
|
@@ -4,19 +4,24 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
|
-
# DEPRECATED. Configures a
|
8
|
-
#
|
9
|
-
#
|
10
|
-
# which supports them (eg.
|
7
|
+
# DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in
|
8
|
+
# `application_context` are now available in the `experience_context` object
|
9
|
+
# under the `payment_source` which supports them (eg.
|
11
10
|
# `payment_source.paypal.experience_context.user_action`). Please specify this
|
12
11
|
# field in the `experience_context` object instead of the
|
13
12
|
# `application_context` object.
|
14
13
|
class OrderApplicationContextUserAction
|
15
14
|
ORDER_APPLICATION_CONTEXT_USER_ACTION = [
|
16
|
-
#
|
15
|
+
# After you redirect the customer to the PayPal payment page, a Continue
|
16
|
+
# button appears. Use this option when the final amount is not known when
|
17
|
+
# the checkout flow is initiated and you want to redirect the customer to
|
18
|
+
# the merchant page without processing the payment.
|
17
19
|
CONTINUE = 'CONTINUE'.freeze,
|
18
20
|
|
19
|
-
#
|
21
|
+
# After you redirect the customer to the PayPal payment page, a Pay Now
|
22
|
+
# button appears. Use this option when the final amount is known when the
|
23
|
+
# checkout is initiated and you want to process the payment immediately
|
24
|
+
# when the customer clicks Pay Now.
|
20
25
|
PAY_NOW = 'PAY_NOW'.freeze
|
21
26
|
].freeze
|
22
27
|
|
@@ -47,5 +47,17 @@ module PaypalServerSdk
|
|
47
47
|
# Create object from extracted values.
|
48
48
|
OrderAuthorizeRequest.new(payment_source: payment_source)
|
49
49
|
end
|
50
|
+
|
51
|
+
# Provides a human-readable string representation of the object.
|
52
|
+
def to_s
|
53
|
+
class_name = self.class.name.split('::').last
|
54
|
+
"<#{class_name} payment_source: #{@payment_source}>"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Provides a debugging-friendly string with detailed object information.
|
58
|
+
def inspect
|
59
|
+
class_name = self.class.name.split('::').last
|
60
|
+
"<#{class_name} payment_source: #{@payment_source.inspect}>"
|
61
|
+
end
|
50
62
|
end
|
51
63
|
end
|