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
@@ -0,0 +1,111 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# Shipping Options Callback request. This will be implemented by the
|
8
|
+
# merchants.
|
9
|
+
class OrderUpdateCallbackRequest < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# The ID of the order.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
# The portable international postal address. Maps to
|
18
|
+
# [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/
|
19
|
+
# wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls:
|
20
|
+
# the autocomplete
|
21
|
+
# attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co
|
22
|
+
# ntrols-the-autocomplete-attribute).
|
23
|
+
# @return [OrderUpdateCallbackShippingAddress]
|
24
|
+
attr_accessor :shipping_address
|
25
|
+
|
26
|
+
# The options that the payee or merchant offers to the payer to ship or pick
|
27
|
+
# up their items.
|
28
|
+
# @return [OrderUpdateCallbackShippingOption]
|
29
|
+
attr_accessor :shipping_option
|
30
|
+
|
31
|
+
# An array of purchase units. At present only 1 purchase_unit is supported.
|
32
|
+
# Each purchase unit establishes a contract between a payer and the payee.
|
33
|
+
# Each purchase unit represents either a full or partial order that the
|
34
|
+
# payer intends to purchase from the payee.
|
35
|
+
# @return [Array[PurchaseUnitRequest]]
|
36
|
+
attr_accessor :purchase_units
|
37
|
+
|
38
|
+
# A mapping from model property names to API property names.
|
39
|
+
def self.names
|
40
|
+
@_hash = {} if @_hash.nil?
|
41
|
+
@_hash['id'] = 'id'
|
42
|
+
@_hash['shipping_address'] = 'shipping_address'
|
43
|
+
@_hash['shipping_option'] = 'shipping_option'
|
44
|
+
@_hash['purchase_units'] = 'purchase_units'
|
45
|
+
@_hash
|
46
|
+
end
|
47
|
+
|
48
|
+
# An array for optional fields
|
49
|
+
def self.optionals
|
50
|
+
%w[
|
51
|
+
id
|
52
|
+
shipping_option
|
53
|
+
]
|
54
|
+
end
|
55
|
+
|
56
|
+
# An array for nullable fields
|
57
|
+
def self.nullables
|
58
|
+
[]
|
59
|
+
end
|
60
|
+
|
61
|
+
def initialize(shipping_address:, purchase_units:, id: SKIP,
|
62
|
+
shipping_option: SKIP)
|
63
|
+
@id = id unless id == SKIP
|
64
|
+
@shipping_address = shipping_address
|
65
|
+
@shipping_option = shipping_option unless shipping_option == SKIP
|
66
|
+
@purchase_units = purchase_units
|
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
|
+
shipping_address = OrderUpdateCallbackShippingAddress.from_hash(hash['shipping_address']) if
|
75
|
+
hash['shipping_address']
|
76
|
+
# Parameter is an array, so we need to iterate through it
|
77
|
+
purchase_units = nil
|
78
|
+
unless hash['purchase_units'].nil?
|
79
|
+
purchase_units = []
|
80
|
+
hash['purchase_units'].each do |structure|
|
81
|
+
purchase_units << (PurchaseUnitRequest.from_hash(structure) if structure)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
purchase_units = nil unless hash.key?('purchase_units')
|
86
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
87
|
+
shipping_option = OrderUpdateCallbackShippingOption.from_hash(hash['shipping_option']) if
|
88
|
+
hash['shipping_option']
|
89
|
+
|
90
|
+
# Create object from extracted values.
|
91
|
+
OrderUpdateCallbackRequest.new(shipping_address: shipping_address,
|
92
|
+
purchase_units: purchase_units,
|
93
|
+
id: id,
|
94
|
+
shipping_option: shipping_option)
|
95
|
+
end
|
96
|
+
|
97
|
+
# Provides a human-readable string representation of the object.
|
98
|
+
def to_s
|
99
|
+
class_name = self.class.name.split('::').last
|
100
|
+
"<#{class_name} id: #{@id}, shipping_address: #{@shipping_address}, shipping_option:"\
|
101
|
+
" #{@shipping_option}, purchase_units: #{@purchase_units}>"
|
102
|
+
end
|
103
|
+
|
104
|
+
# Provides a debugging-friendly string with detailed object information.
|
105
|
+
def inspect
|
106
|
+
class_name = self.class.name.split('::').last
|
107
|
+
"<#{class_name} id: #{@id.inspect}, shipping_address: #{@shipping_address.inspect},"\
|
108
|
+
" shipping_option: #{@shipping_option.inspect}, purchase_units: #{@purchase_units.inspect}>"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# Returns the updated shipping options for an order.
|
8
|
+
class OrderUpdateCallbackResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The ID of the order.
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :id
|
15
|
+
|
16
|
+
# This would contain shipping option and amount data at purchase unit level.
|
17
|
+
# @return [ShippingOptionsPurchaseUnit]
|
18
|
+
attr_accessor :purchase_units
|
19
|
+
|
20
|
+
# A mapping from model property names to API property names.
|
21
|
+
def self.names
|
22
|
+
@_hash = {} if @_hash.nil?
|
23
|
+
@_hash['id'] = 'id'
|
24
|
+
@_hash['purchase_units'] = 'purchase_units'
|
25
|
+
@_hash
|
26
|
+
end
|
27
|
+
|
28
|
+
# An array for optional fields
|
29
|
+
def self.optionals
|
30
|
+
%w[
|
31
|
+
id
|
32
|
+
purchase_units
|
33
|
+
]
|
34
|
+
end
|
35
|
+
|
36
|
+
# An array for nullable fields
|
37
|
+
def self.nullables
|
38
|
+
[]
|
39
|
+
end
|
40
|
+
|
41
|
+
def initialize(id: SKIP, purchase_units: SKIP)
|
42
|
+
@id = id unless id == SKIP
|
43
|
+
@purchase_units = purchase_units unless purchase_units == SKIP
|
44
|
+
end
|
45
|
+
|
46
|
+
# Creates an instance of the object from a hash.
|
47
|
+
def self.from_hash(hash)
|
48
|
+
return nil unless hash
|
49
|
+
|
50
|
+
# Extract variables from the hash.
|
51
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
52
|
+
purchase_units = ShippingOptionsPurchaseUnit.from_hash(hash['purchase_units']) if
|
53
|
+
hash['purchase_units']
|
54
|
+
|
55
|
+
# Create object from extracted values.
|
56
|
+
OrderUpdateCallbackResponse.new(id: id,
|
57
|
+
purchase_units: purchase_units)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Provides a human-readable string representation of the object.
|
61
|
+
def to_s
|
62
|
+
class_name = self.class.name.split('::').last
|
63
|
+
"<#{class_name} id: #{@id}, purchase_units: #{@purchase_units}>"
|
64
|
+
end
|
65
|
+
|
66
|
+
# Provides a debugging-friendly string with detailed object information.
|
67
|
+
def inspect
|
68
|
+
class_name = self.class.name.split('::').last
|
69
|
+
"<#{class_name} id: #{@id.inspect}, purchase_units: #{@purchase_units.inspect}>"
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,107 @@
|
|
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 portable international postal address. Maps to
|
8
|
+
# [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wi
|
9
|
+
# ki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the
|
10
|
+
# autocomplete
|
11
|
+
# attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-cont
|
12
|
+
# rols-the-autocomplete-attribute).
|
13
|
+
class OrderUpdateCallbackShippingAddress < BaseModel
|
14
|
+
SKIP = Object.new
|
15
|
+
private_constant :SKIP
|
16
|
+
|
17
|
+
# A city, town, or village. Smaller than `admin_area_level_1`.
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :admin_area_2
|
20
|
+
|
21
|
+
# The highest-level sub-division in a country, which is usually a province,
|
22
|
+
# state, or ISO-3166-2 subdivision. This data is formatted for postal
|
23
|
+
# delivery, for example, `CA` and not `California`. Value, by country, is:
|
24
|
+
# UK. A county. US. A state. Canada. A province. Japan. A prefecture.
|
25
|
+
# Switzerland. A *kanton*.
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :admin_area_1
|
28
|
+
|
29
|
+
# The postal code, which is the ZIP code or equivalent. Typically required
|
30
|
+
# for countries with a postal code or an equivalent. See [postal
|
31
|
+
# code](https://en.wikipedia.org/wiki/Postal_code).
|
32
|
+
# @return [String]
|
33
|
+
attr_accessor :postal_code
|
34
|
+
|
35
|
+
# The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that
|
36
|
+
# identifies the country or region. Note: The country code for Great Britain
|
37
|
+
# is GB and not UK as used in the top-level domain names for that country.
|
38
|
+
# Use the `C2` country code for China worldwide for comparable uncontrolled
|
39
|
+
# price (CUP) method, bank card, and cross-border transactions.
|
40
|
+
# @return [String]
|
41
|
+
attr_accessor :country_code
|
42
|
+
|
43
|
+
# A mapping from model property names to API property names.
|
44
|
+
def self.names
|
45
|
+
@_hash = {} if @_hash.nil?
|
46
|
+
@_hash['admin_area_2'] = 'admin_area_2'
|
47
|
+
@_hash['admin_area_1'] = 'admin_area_1'
|
48
|
+
@_hash['postal_code'] = 'postal_code'
|
49
|
+
@_hash['country_code'] = 'country_code'
|
50
|
+
@_hash
|
51
|
+
end
|
52
|
+
|
53
|
+
# An array for optional fields
|
54
|
+
def self.optionals
|
55
|
+
%w[
|
56
|
+
admin_area_2
|
57
|
+
admin_area_1
|
58
|
+
postal_code
|
59
|
+
]
|
60
|
+
end
|
61
|
+
|
62
|
+
# An array for nullable fields
|
63
|
+
def self.nullables
|
64
|
+
[]
|
65
|
+
end
|
66
|
+
|
67
|
+
def initialize(country_code:, admin_area_2: SKIP, admin_area_1: SKIP,
|
68
|
+
postal_code: SKIP)
|
69
|
+
@admin_area_2 = admin_area_2 unless admin_area_2 == SKIP
|
70
|
+
@admin_area_1 = admin_area_1 unless admin_area_1 == SKIP
|
71
|
+
@postal_code = postal_code unless postal_code == SKIP
|
72
|
+
@country_code = country_code
|
73
|
+
end
|
74
|
+
|
75
|
+
# Creates an instance of the object from a hash.
|
76
|
+
def self.from_hash(hash)
|
77
|
+
return nil unless hash
|
78
|
+
|
79
|
+
# Extract variables from the hash.
|
80
|
+
country_code = hash.key?('country_code') ? hash['country_code'] : nil
|
81
|
+
admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP
|
82
|
+
admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP
|
83
|
+
postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP
|
84
|
+
|
85
|
+
# Create object from extracted values.
|
86
|
+
OrderUpdateCallbackShippingAddress.new(country_code: country_code,
|
87
|
+
admin_area_2: admin_area_2,
|
88
|
+
admin_area_1: admin_area_1,
|
89
|
+
postal_code: postal_code)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Provides a human-readable string representation of the object.
|
93
|
+
def to_s
|
94
|
+
class_name = self.class.name.split('::').last
|
95
|
+
"<#{class_name} admin_area_2: #{@admin_area_2}, admin_area_1: #{@admin_area_1},"\
|
96
|
+
" postal_code: #{@postal_code}, country_code: #{@country_code}>"
|
97
|
+
end
|
98
|
+
|
99
|
+
# Provides a debugging-friendly string with detailed object information.
|
100
|
+
def inspect
|
101
|
+
class_name = self.class.name.split('::').last
|
102
|
+
"<#{class_name} admin_area_2: #{@admin_area_2.inspect}, admin_area_1:"\
|
103
|
+
" #{@admin_area_1.inspect}, postal_code: #{@postal_code.inspect}, country_code:"\
|
104
|
+
" #{@country_code.inspect}>"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,93 @@
|
|
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 options that the payee or merchant offers to the payer to ship or pick
|
8
|
+
# up their items.
|
9
|
+
class OrderUpdateCallbackShippingOption < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# A unique ID that identifies a payer-selected shipping option.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :id
|
16
|
+
|
17
|
+
# A description that the payer sees, which helps them choose an appropriate
|
18
|
+
# shipping option. For example, `Free Shipping`, `USPS Priority Shipping`,
|
19
|
+
# `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this
|
20
|
+
# description to the payer's locale.
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :label
|
23
|
+
|
24
|
+
# A classification for the method of purchase fulfillment.
|
25
|
+
# @return [ShippingType]
|
26
|
+
attr_accessor :type
|
27
|
+
|
28
|
+
# The currency and amount for a financial transaction, such as a balance or
|
29
|
+
# payment due.
|
30
|
+
# @return [Money]
|
31
|
+
attr_accessor :amount
|
32
|
+
|
33
|
+
# A mapping from model property names to API property names.
|
34
|
+
def self.names
|
35
|
+
@_hash = {} if @_hash.nil?
|
36
|
+
@_hash['id'] = 'id'
|
37
|
+
@_hash['label'] = 'label'
|
38
|
+
@_hash['type'] = 'type'
|
39
|
+
@_hash['amount'] = 'amount'
|
40
|
+
@_hash
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for optional fields
|
44
|
+
def self.optionals
|
45
|
+
%w[
|
46
|
+
type
|
47
|
+
amount
|
48
|
+
]
|
49
|
+
end
|
50
|
+
|
51
|
+
# An array for nullable fields
|
52
|
+
def self.nullables
|
53
|
+
[]
|
54
|
+
end
|
55
|
+
|
56
|
+
def initialize(id:, label:, type: SKIP, amount: SKIP)
|
57
|
+
@id = id
|
58
|
+
@label = label
|
59
|
+
@type = type unless type == SKIP
|
60
|
+
@amount = amount unless amount == SKIP
|
61
|
+
end
|
62
|
+
|
63
|
+
# Creates an instance of the object from a hash.
|
64
|
+
def self.from_hash(hash)
|
65
|
+
return nil unless hash
|
66
|
+
|
67
|
+
# Extract variables from the hash.
|
68
|
+
id = hash.key?('id') ? hash['id'] : nil
|
69
|
+
label = hash.key?('label') ? hash['label'] : nil
|
70
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
71
|
+
amount = Money.from_hash(hash['amount']) if hash['amount']
|
72
|
+
|
73
|
+
# Create object from extracted values.
|
74
|
+
OrderUpdateCallbackShippingOption.new(id: id,
|
75
|
+
label: label,
|
76
|
+
type: type,
|
77
|
+
amount: amount)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Provides a human-readable string representation of the object.
|
81
|
+
def to_s
|
82
|
+
class_name = self.class.name.split('::').last
|
83
|
+
"<#{class_name} id: #{@id}, label: #{@label}, type: #{@type}, amount: #{@amount}>"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Provides a debugging-friendly string with detailed object information.
|
87
|
+
def inspect
|
88
|
+
class_name = self.class.name.split('::').last
|
89
|
+
"<#{class_name} id: #{@id.inspect}, label: #{@label.inspect}, type: #{@type.inspect},"\
|
90
|
+
" amount: #{@amount.inspect}>"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# A captured payment.
|
8
|
-
class
|
8
|
+
class OrdersCapture < BaseModel
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
@@ -77,17 +77,15 @@ module PaypalServerSdk
|
|
77
77
|
|
78
78
|
# The date and time, in [Internet date and time
|
79
79
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
80
|
-
# required while fractional seconds are
|
81
|
-
#
|
82
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
80
|
+
# required while fractional seconds are optional. Note: The regular
|
81
|
+
# expression provides guidance but does not reject all invalid dates.
|
83
82
|
# @return [String]
|
84
83
|
attr_accessor :create_time
|
85
84
|
|
86
85
|
# The date and time, in [Internet date and time
|
87
86
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
88
|
-
# required while fractional seconds are
|
89
|
-
#
|
90
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
87
|
+
# required while fractional seconds are optional. Note: The regular
|
88
|
+
# expression provides guidance but does not reject all invalid dates.
|
91
89
|
# @return [String]
|
92
90
|
attr_accessor :update_time
|
93
91
|
|
@@ -208,21 +206,47 @@ module PaypalServerSdk
|
|
208
206
|
update_time = hash.key?('update_time') ? hash['update_time'] : SKIP
|
209
207
|
|
210
208
|
# Create object from extracted values.
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
209
|
+
OrdersCapture.new(status: status,
|
210
|
+
status_details: status_details,
|
211
|
+
id: id,
|
212
|
+
amount: amount,
|
213
|
+
invoice_id: invoice_id,
|
214
|
+
custom_id: custom_id,
|
215
|
+
network_transaction_reference: network_transaction_reference,
|
216
|
+
seller_protection: seller_protection,
|
217
|
+
final_capture: final_capture,
|
218
|
+
seller_receivable_breakdown: seller_receivable_breakdown,
|
219
|
+
disbursement_mode: disbursement_mode,
|
220
|
+
links: links,
|
221
|
+
processor_response: processor_response,
|
222
|
+
create_time: create_time,
|
223
|
+
update_time: update_time)
|
224
|
+
end
|
225
|
+
|
226
|
+
# Provides a human-readable string representation of the object.
|
227
|
+
def to_s
|
228
|
+
class_name = self.class.name.split('::').last
|
229
|
+
"<#{class_name} status: #{@status}, status_details: #{@status_details}, id: #{@id}, amount:"\
|
230
|
+
" #{@amount}, invoice_id: #{@invoice_id}, custom_id: #{@custom_id},"\
|
231
|
+
" network_transaction_reference: #{@network_transaction_reference}, seller_protection:"\
|
232
|
+
" #{@seller_protection}, final_capture: #{@final_capture}, seller_receivable_breakdown:"\
|
233
|
+
" #{@seller_receivable_breakdown}, disbursement_mode: #{@disbursement_mode}, links:"\
|
234
|
+
" #{@links}, processor_response: #{@processor_response}, create_time: #{@create_time},"\
|
235
|
+
" update_time: #{@update_time}>"
|
236
|
+
end
|
237
|
+
|
238
|
+
# Provides a debugging-friendly string with detailed object information.
|
239
|
+
def inspect
|
240
|
+
class_name = self.class.name.split('::').last
|
241
|
+
"<#{class_name} status: #{@status.inspect}, status_details: #{@status_details.inspect}, id:"\
|
242
|
+
" #{@id.inspect}, amount: #{@amount.inspect}, invoice_id: #{@invoice_id.inspect}, custom_id:"\
|
243
|
+
" #{@custom_id.inspect}, network_transaction_reference:"\
|
244
|
+
" #{@network_transaction_reference.inspect}, seller_protection:"\
|
245
|
+
" #{@seller_protection.inspect}, final_capture: #{@final_capture.inspect},"\
|
246
|
+
" seller_receivable_breakdown: #{@seller_receivable_breakdown.inspect}, disbursement_mode:"\
|
247
|
+
" #{@disbursement_mode.inspect}, links: #{@links.inspect}, processor_response:"\
|
248
|
+
" #{@processor_response.inspect}, create_time: #{@create_time.inspect}, update_time:"\
|
249
|
+
" #{@update_time.inspect}>"
|
226
250
|
end
|
227
251
|
end
|
228
252
|
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
|
+
# The method used for card verification.
|
8
|
+
class OrdersCardVerificationMethod
|
9
|
+
ORDERS_CARD_VERIFICATION_METHOD = [
|
10
|
+
# Selecting this option will attempt to force a strong customer
|
11
|
+
# authentication for the authorization/transaction. In countries where SCA
|
12
|
+
# has been defined and implemented it will result in a contingency and
|
13
|
+
# HATEOAS link being returned. The API caller should redirect the payer
|
14
|
+
# to that link so that they can authenticate themselves against their
|
15
|
+
# issuing bank or other entity. As noted, the HATEOAS link is only
|
16
|
+
# available in all regions where strong authentication is supported, (e.g.
|
17
|
+
# in European countries where 3DS is live). Merchants can use this setting
|
18
|
+
# as an additional layer of security if they choose to. In all cases, when
|
19
|
+
# an authorization is requested the AVS/CVV results will be returned in
|
20
|
+
# the response.
|
21
|
+
SCA_ALWAYS = 'SCA_ALWAYS'.freeze,
|
22
|
+
|
23
|
+
# This is the default. When an authorization or transaction is attempted
|
24
|
+
# this option will return a contingency and HATEOAS link only when local
|
25
|
+
# regulations require strong customer authentication, (e.g. 3DS in
|
26
|
+
# countries and use cases where it is mandated). The API caller should
|
27
|
+
# redirect the payer to the link so that they can authenticate themselves.
|
28
|
+
# In all cases, when an authorization is requested the AVS/CVV results
|
29
|
+
# will be returned in the response.
|
30
|
+
SCA_WHEN_REQUIRED = 'SCA_WHEN_REQUIRED'.freeze,
|
31
|
+
|
32
|
+
# The contingency surfaced as an additional security layer that helps
|
33
|
+
# prevent unauthorized card-not-present transactions and protects the
|
34
|
+
# merchant from exposure to fraud.
|
35
|
+
ENUM_3D_SECURE = '3D_SECURE'.freeze,
|
36
|
+
|
37
|
+
# Places a temporary hold on the card to ensure its validity. This process
|
38
|
+
# protects the merchant from exposure to fraud. This verification method
|
39
|
+
# will confirm that the address information or CVV included matches what
|
40
|
+
# the issuing bank has on file for the associated card, ensuring that only
|
41
|
+
# authorized card users are able to make purchases from you.
|
42
|
+
AVS_CVV = 'AVS_CVV'.freeze
|
43
|
+
].freeze
|
44
|
+
|
45
|
+
def self.validate(value)
|
46
|
+
return false if value.nil?
|
47
|
+
|
48
|
+
true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -13,20 +13,18 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
|
-
# The internationalized email address
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
16
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
17
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
18
|
+
# generally accepted maximum length for an email address is 254 characters.
|
19
|
+
# The pattern verifies that an unquoted @ sign exists.
|
21
20
|
# @return [String]
|
22
21
|
attr_accessor :email
|
23
22
|
|
24
23
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
25
|
-
# that identifies the country or region
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
24
|
+
# that identifies the country or region. Note: The country code for Great
|
25
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
26
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
27
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
30
28
|
# @return [String]
|
31
29
|
attr_accessor :country_code
|
32
30
|
|
@@ -104,5 +102,21 @@ module PaypalServerSdk
|
|
104
102
|
method_id: method_id,
|
105
103
|
method_description: method_description)
|
106
104
|
end
|
105
|
+
|
106
|
+
# Provides a human-readable string representation of the object.
|
107
|
+
def to_s
|
108
|
+
class_name = self.class.name.split('::').last
|
109
|
+
"<#{class_name} name: #{@name}, email: #{@email}, country_code: #{@country_code},"\
|
110
|
+
" payment_descriptor: #{@payment_descriptor}, method_id: #{@method_id}, method_description:"\
|
111
|
+
" #{@method_description}>"
|
112
|
+
end
|
113
|
+
|
114
|
+
# Provides a debugging-friendly string with detailed object information.
|
115
|
+
def inspect
|
116
|
+
class_name = self.class.name.split('::').last
|
117
|
+
"<#{class_name} name: #{@name.inspect}, email: #{@email.inspect}, country_code:"\
|
118
|
+
" #{@country_code.inspect}, payment_descriptor: #{@payment_descriptor.inspect}, method_id:"\
|
119
|
+
" #{@method_id.inspect}, method_description: #{@method_description.inspect}>"
|
120
|
+
end
|
107
121
|
end
|
108
122
|
end
|
@@ -13,20 +13,18 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
|
-
# The internationalized email address
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
16
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
17
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
18
|
+
# generally accepted maximum length for an email address is 254 characters.
|
19
|
+
# The pattern verifies that an unquoted @ sign exists.
|
21
20
|
# @return [String]
|
22
21
|
attr_accessor :email
|
23
22
|
|
24
23
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
25
|
-
# that identifies the country or region
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
24
|
+
# that identifies the country or region. Note: The country code for Great
|
25
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
26
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
27
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
30
28
|
# @return [String]
|
31
29
|
attr_accessor :country_code
|
32
30
|
|
@@ -81,5 +79,19 @@ module PaypalServerSdk
|
|
81
79
|
country_code: country_code,
|
82
80
|
experience_context: experience_context)
|
83
81
|
end
|
82
|
+
|
83
|
+
# Provides a human-readable string representation of the object.
|
84
|
+
def to_s
|
85
|
+
class_name = self.class.name.split('::').last
|
86
|
+
"<#{class_name} name: #{@name}, email: #{@email}, country_code: #{@country_code},"\
|
87
|
+
" experience_context: #{@experience_context}>"
|
88
|
+
end
|
89
|
+
|
90
|
+
# Provides a debugging-friendly string with detailed object information.
|
91
|
+
def inspect
|
92
|
+
class_name = self.class.name.split('::').last
|
93
|
+
"<#{class_name} name: #{@name.inspect}, email: #{@email.inspect}, country_code:"\
|
94
|
+
" #{@country_code.inspect}, experience_context: #{@experience_context.inspect}>"
|
95
|
+
end
|
84
96
|
end
|
85
97
|
end
|