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,98 @@
|
|
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 processor response information for payment requests, such as direct
|
8
|
+
# credit card transactions.
|
9
|
+
class PaymentsProcessorResponse < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# The address verification code for Visa, Discover, Mastercard, or American
|
14
|
+
# Express transactions.
|
15
|
+
# @return [AvsCode]
|
16
|
+
attr_accessor :avs_code
|
17
|
+
|
18
|
+
# The card verification value code for for Visa, Discover, Mastercard, or
|
19
|
+
# American Express.
|
20
|
+
# @return [CvvCode]
|
21
|
+
attr_accessor :cvv_code
|
22
|
+
|
23
|
+
# Processor response code for the non-PayPal payment processor errors.
|
24
|
+
# @return [ProcessorResponseCode]
|
25
|
+
attr_accessor :response_code
|
26
|
+
|
27
|
+
# The declined payment transactions might have payment advice codes. The
|
28
|
+
# card networks, like Visa and Mastercard, return payment advice codes.
|
29
|
+
# @return [PaymentsPaymentAdviceCode]
|
30
|
+
attr_accessor :payment_advice_code
|
31
|
+
|
32
|
+
# A mapping from model property names to API property names.
|
33
|
+
def self.names
|
34
|
+
@_hash = {} if @_hash.nil?
|
35
|
+
@_hash['avs_code'] = 'avs_code'
|
36
|
+
@_hash['cvv_code'] = 'cvv_code'
|
37
|
+
@_hash['response_code'] = 'response_code'
|
38
|
+
@_hash['payment_advice_code'] = 'payment_advice_code'
|
39
|
+
@_hash
|
40
|
+
end
|
41
|
+
|
42
|
+
# An array for optional fields
|
43
|
+
def self.optionals
|
44
|
+
%w[
|
45
|
+
avs_code
|
46
|
+
cvv_code
|
47
|
+
response_code
|
48
|
+
payment_advice_code
|
49
|
+
]
|
50
|
+
end
|
51
|
+
|
52
|
+
# An array for nullable fields
|
53
|
+
def self.nullables
|
54
|
+
[]
|
55
|
+
end
|
56
|
+
|
57
|
+
def initialize(avs_code: SKIP, cvv_code: SKIP, response_code: SKIP,
|
58
|
+
payment_advice_code: SKIP)
|
59
|
+
@avs_code = avs_code unless avs_code == SKIP
|
60
|
+
@cvv_code = cvv_code unless cvv_code == SKIP
|
61
|
+
@response_code = response_code unless response_code == SKIP
|
62
|
+
@payment_advice_code = payment_advice_code unless payment_advice_code == SKIP
|
63
|
+
end
|
64
|
+
|
65
|
+
# Creates an instance of the object from a hash.
|
66
|
+
def self.from_hash(hash)
|
67
|
+
return nil unless hash
|
68
|
+
|
69
|
+
# Extract variables from the hash.
|
70
|
+
avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP
|
71
|
+
cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP
|
72
|
+
response_code = hash.key?('response_code') ? hash['response_code'] : SKIP
|
73
|
+
payment_advice_code =
|
74
|
+
hash.key?('payment_advice_code') ? hash['payment_advice_code'] : SKIP
|
75
|
+
|
76
|
+
# Create object from extracted values.
|
77
|
+
PaymentsProcessorResponse.new(avs_code: avs_code,
|
78
|
+
cvv_code: cvv_code,
|
79
|
+
response_code: response_code,
|
80
|
+
payment_advice_code: payment_advice_code)
|
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} avs_code: #{@avs_code}, cvv_code: #{@cvv_code}, response_code:"\
|
87
|
+
" #{@response_code}, payment_advice_code: #{@payment_advice_code}>"
|
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} avs_code: #{@avs_code.inspect}, cvv_code: #{@cvv_code.inspect},"\
|
94
|
+
" response_code: #{@response_code.inspect}, payment_advice_code:"\
|
95
|
+
" #{@payment_advice_code.inspect}>"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -7,13 +7,21 @@ module PaypalServerSdk
|
|
7
7
|
# The type of landing page to show on the PayPal site for customer checkout.
|
8
8
|
class PaypalExperienceLandingPage
|
9
9
|
PAYPAL_EXPERIENCE_LANDING_PAGE = [
|
10
|
-
#
|
10
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
11
|
+
# a page to log in to PayPal and approve the payment.
|
11
12
|
LOGIN = 'LOGIN'.freeze,
|
12
13
|
|
13
|
-
#
|
14
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
15
|
+
# a page to enter credit or debit card and other relevant billing
|
16
|
+
# information required to complete the purchase. This option has
|
17
|
+
# previously been also called as 'BILLING'
|
14
18
|
GUEST_CHECKOUT = 'GUEST_CHECKOUT'.freeze,
|
15
19
|
|
16
|
-
#
|
20
|
+
# When the customer clicks PayPal Checkout, the customer is redirected to
|
21
|
+
# either a page to log in to PayPal and approve the payment or to a page
|
22
|
+
# to enter credit or debit card and other relevant billing information
|
23
|
+
# required to complete the purchase, depending on their previous
|
24
|
+
# interaction with PayPal.
|
17
25
|
NO_PREFERENCE = 'NO_PREFERENCE'.freeze
|
18
26
|
].freeze
|
19
27
|
|
@@ -4,14 +4,19 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
|
-
# Configures a
|
8
|
-
# flow.
|
7
|
+
# Configures a Continue or Pay Now checkout flow.
|
9
8
|
class PaypalExperienceUserAction
|
10
9
|
PAYPAL_EXPERIENCE_USER_ACTION = [
|
11
|
-
#
|
10
|
+
# After you redirect the customer to the PayPal payment page, a Continue
|
11
|
+
# button appears. Use this option when the final amount is not known when
|
12
|
+
# the checkout flow is initiated and you want to redirect the customer to
|
13
|
+
# the merchant page without processing the payment.
|
12
14
|
CONTINUE = 'CONTINUE'.freeze,
|
13
15
|
|
14
|
-
#
|
16
|
+
# After you redirect the customer to the PayPal payment page, a Pay Now
|
17
|
+
# button appears. Use this option when the final amount is known when the
|
18
|
+
# checkout is initiated and you want to process the payment immediately
|
19
|
+
# when the customer clicks Pay Now.
|
15
20
|
PAY_NOW = 'PAY_NOW'.freeze
|
16
21
|
].freeze
|
17
22
|
|
@@ -15,6 +15,10 @@ module PaypalServerSdk
|
|
15
15
|
# @return [String]
|
16
16
|
attr_accessor :description
|
17
17
|
|
18
|
+
# Expected business/charge model for the billing agreement.
|
19
|
+
# @return [UsagePattern]
|
20
|
+
attr_accessor :usage_pattern
|
21
|
+
|
18
22
|
# The shipping details.
|
19
23
|
# @return [VaultedDigitalWalletShippingDetails]
|
20
24
|
attr_accessor :shipping
|
@@ -31,20 +35,19 @@ module PaypalServerSdk
|
|
31
35
|
attr_accessor :permit_multiple_payment_tokens
|
32
36
|
|
33
37
|
# The usage type associated with a digital wallet payment token.
|
34
|
-
# @return [
|
38
|
+
# @return [PaypalPaymentTokenUsageType]
|
35
39
|
attr_accessor :usage_type
|
36
40
|
|
37
41
|
# The customer type associated with a digital wallet payment token. This is
|
38
42
|
# to indicate whether the customer acting on the merchant / platform is
|
39
43
|
# either a business or a consumer.
|
40
|
-
# @return [
|
44
|
+
# @return [PaypalPaymentTokenCustomerType]
|
41
45
|
attr_accessor :customer_type
|
42
46
|
|
43
|
-
# The internationalized email address
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
47
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
48
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
49
|
+
# generally accepted maximum length for an email address is 254 characters.
|
50
|
+
# The pattern verifies that an unquoted @ sign exists.
|
48
51
|
# @return [String]
|
49
52
|
attr_accessor :email_address
|
50
53
|
|
@@ -82,6 +85,7 @@ module PaypalServerSdk
|
|
82
85
|
def self.names
|
83
86
|
@_hash = {} if @_hash.nil?
|
84
87
|
@_hash['description'] = 'description'
|
88
|
+
@_hash['usage_pattern'] = 'usage_pattern'
|
85
89
|
@_hash['shipping'] = 'shipping'
|
86
90
|
@_hash['permit_multiple_payment_tokens'] =
|
87
91
|
'permit_multiple_payment_tokens'
|
@@ -101,6 +105,7 @@ module PaypalServerSdk
|
|
101
105
|
def self.optionals
|
102
106
|
%w[
|
103
107
|
description
|
108
|
+
usage_pattern
|
104
109
|
shipping
|
105
110
|
permit_multiple_payment_tokens
|
106
111
|
usage_type
|
@@ -120,12 +125,13 @@ module PaypalServerSdk
|
|
120
125
|
[]
|
121
126
|
end
|
122
127
|
|
123
|
-
def initialize(description: SKIP, shipping: SKIP,
|
128
|
+
def initialize(description: SKIP, usage_pattern: SKIP, shipping: SKIP,
|
124
129
|
permit_multiple_payment_tokens: false, usage_type: SKIP,
|
125
130
|
customer_type: SKIP, email_address: SKIP, payer_id: SKIP,
|
126
131
|
name: SKIP, phone: SKIP, address: SKIP, account_id: SKIP,
|
127
132
|
phone_number: SKIP)
|
128
133
|
@description = description unless description == SKIP
|
134
|
+
@usage_pattern = usage_pattern unless usage_pattern == SKIP
|
129
135
|
@shipping = shipping unless shipping == SKIP
|
130
136
|
unless permit_multiple_payment_tokens == SKIP
|
131
137
|
@permit_multiple_payment_tokens =
|
@@ -148,6 +154,7 @@ module PaypalServerSdk
|
|
148
154
|
|
149
155
|
# Extract variables from the hash.
|
150
156
|
description = hash.key?('description') ? hash['description'] : SKIP
|
157
|
+
usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP
|
151
158
|
shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if
|
152
159
|
hash['shipping']
|
153
160
|
permit_multiple_payment_tokens =
|
@@ -164,6 +171,7 @@ module PaypalServerSdk
|
|
164
171
|
|
165
172
|
# Create object from extracted values.
|
166
173
|
PaypalPaymentToken.new(description: description,
|
174
|
+
usage_pattern: usage_pattern,
|
167
175
|
shipping: shipping,
|
168
176
|
permit_multiple_payment_tokens: permit_multiple_payment_tokens,
|
169
177
|
usage_type: usage_type,
|
@@ -176,5 +184,27 @@ module PaypalServerSdk
|
|
176
184
|
account_id: account_id,
|
177
185
|
phone_number: phone_number)
|
178
186
|
end
|
187
|
+
|
188
|
+
# Provides a human-readable string representation of the object.
|
189
|
+
def to_s
|
190
|
+
class_name = self.class.name.split('::').last
|
191
|
+
"<#{class_name} description: #{@description}, usage_pattern: #{@usage_pattern}, shipping:"\
|
192
|
+
" #{@shipping}, permit_multiple_payment_tokens: #{@permit_multiple_payment_tokens},"\
|
193
|
+
" usage_type: #{@usage_type}, customer_type: #{@customer_type}, email_address:"\
|
194
|
+
" #{@email_address}, payer_id: #{@payer_id}, name: #{@name}, phone: #{@phone}, address:"\
|
195
|
+
" #{@address}, account_id: #{@account_id}, phone_number: #{@phone_number}>"
|
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} description: #{@description.inspect}, usage_pattern:"\
|
202
|
+
" #{@usage_pattern.inspect}, shipping: #{@shipping.inspect}, permit_multiple_payment_tokens:"\
|
203
|
+
" #{@permit_multiple_payment_tokens.inspect}, usage_type: #{@usage_type.inspect},"\
|
204
|
+
" customer_type: #{@customer_type.inspect}, email_address: #{@email_address.inspect},"\
|
205
|
+
" payer_id: #{@payer_id.inspect}, name: #{@name.inspect}, phone: #{@phone.inspect}, address:"\
|
206
|
+
" #{@address.inspect}, account_id: #{@account_id.inspect}, phone_number:"\
|
207
|
+
" #{@phone_number.inspect}>"
|
208
|
+
end
|
179
209
|
end
|
180
210
|
end
|
@@ -6,13 +6,17 @@
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# The customer type associated with the PayPal payment token. This is to
|
8
8
|
# indicate whether the customer acting on the merchant / platform is either a
|
9
|
-
# business or a consumer
|
9
|
+
# business or a consumer., The customer type associated with a digital wallet
|
10
|
+
# payment token. This is to indicate whether the customer acting on the
|
11
|
+
# merchant / platform is either a business or a consumer.
|
10
12
|
class PaypalPaymentTokenCustomerType
|
11
13
|
PAYPAL_PAYMENT_TOKEN_CUSTOMER_TYPE = [
|
12
|
-
#
|
14
|
+
# The customer vaulting the PayPal payment token is a consumer on the
|
15
|
+
# merchant / platform.
|
13
16
|
CONSUMER = 'CONSUMER'.freeze,
|
14
17
|
|
15
|
-
#
|
18
|
+
# The customer vaulting the PayPal payment token is a business on merchant
|
19
|
+
# / platform.
|
16
20
|
BUSINESS = 'BUSINESS'.freeze
|
17
21
|
].freeze
|
18
22
|
|
@@ -4,13 +4,17 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
|
-
# The usage type associated with the PayPal payment token
|
7
|
+
# The usage type associated with the PayPal payment token., The usage type
|
8
|
+
# associated with a digital wallet payment token.
|
8
9
|
class PaypalPaymentTokenUsageType
|
9
10
|
PAYPAL_PAYMENT_TOKEN_USAGE_TYPE = [
|
10
|
-
#
|
11
|
+
# The PayPal Payment Token will be used for future transaction directly
|
12
|
+
# with a merchant.
|
11
13
|
MERCHANT = 'MERCHANT'.freeze,
|
12
14
|
|
13
|
-
#
|
15
|
+
# The PayPal Payment Token will be used for future transaction on a
|
16
|
+
# platform. A platform is typically a marketplace or a channel that a
|
17
|
+
# payer can purchase goods and services from multiple merchants.
|
14
18
|
PLATFORM = 'PLATFORM'.freeze
|
15
19
|
].freeze
|
16
20
|
|
@@ -15,11 +15,10 @@ module PaypalServerSdk
|
|
15
15
|
# @return [String]
|
16
16
|
attr_accessor :vault_id
|
17
17
|
|
18
|
-
# The internationalized email address
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
18
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
19
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
20
|
+
# generally accepted maximum length for an email address is 254 characters.
|
21
|
+
# The pattern verifies that an unquoted @ sign exists.
|
23
22
|
# @return [String]
|
24
23
|
attr_accessor :email_address
|
25
24
|
|
@@ -59,10 +58,9 @@ module PaypalServerSdk
|
|
59
58
|
attr_accessor :attributes
|
60
59
|
|
61
60
|
# Customizes the payer experience during the approval process for payment
|
62
|
-
# with PayPal
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# overrides the request values.</blockquote>
|
61
|
+
# with PayPal. Note: Partners and Marketplaces might configure brand_name
|
62
|
+
# and shipping_preference during partner account setup, which overrides the
|
63
|
+
# request values.
|
66
64
|
# @return [PaypalWalletExperienceContext]
|
67
65
|
attr_accessor :experience_context
|
68
66
|
|
@@ -71,6 +69,12 @@ module PaypalServerSdk
|
|
71
69
|
# @return [String]
|
72
70
|
attr_accessor :billing_agreement_id
|
73
71
|
|
72
|
+
# Provides additional details to process a payment using the PayPal wallet
|
73
|
+
# billing agreement or a vaulted payment method that has been stored or is
|
74
|
+
# intended to be stored.
|
75
|
+
# @return [PaypalWalletStoredCredential]
|
76
|
+
attr_accessor :stored_credential
|
77
|
+
|
74
78
|
# A mapping from model property names to API property names.
|
75
79
|
def self.names
|
76
80
|
@_hash = {} if @_hash.nil?
|
@@ -84,6 +88,7 @@ module PaypalServerSdk
|
|
84
88
|
@_hash['attributes'] = 'attributes'
|
85
89
|
@_hash['experience_context'] = 'experience_context'
|
86
90
|
@_hash['billing_agreement_id'] = 'billing_agreement_id'
|
91
|
+
@_hash['stored_credential'] = 'stored_credential'
|
87
92
|
@_hash
|
88
93
|
end
|
89
94
|
|
@@ -100,6 +105,7 @@ module PaypalServerSdk
|
|
100
105
|
attributes
|
101
106
|
experience_context
|
102
107
|
billing_agreement_id
|
108
|
+
stored_credential
|
103
109
|
]
|
104
110
|
end
|
105
111
|
|
@@ -111,7 +117,7 @@ module PaypalServerSdk
|
|
111
117
|
def initialize(vault_id: SKIP, email_address: SKIP, name: SKIP, phone: SKIP,
|
112
118
|
birth_date: SKIP, tax_info: SKIP, address: SKIP,
|
113
119
|
attributes: SKIP, experience_context: SKIP,
|
114
|
-
billing_agreement_id: SKIP)
|
120
|
+
billing_agreement_id: SKIP, stored_credential: SKIP)
|
115
121
|
@vault_id = vault_id unless vault_id == SKIP
|
116
122
|
@email_address = email_address unless email_address == SKIP
|
117
123
|
@name = name unless name == SKIP
|
@@ -122,6 +128,7 @@ module PaypalServerSdk
|
|
122
128
|
@attributes = attributes unless attributes == SKIP
|
123
129
|
@experience_context = experience_context unless experience_context == SKIP
|
124
130
|
@billing_agreement_id = billing_agreement_id unless billing_agreement_id == SKIP
|
131
|
+
@stored_credential = stored_credential unless stored_credential == SKIP
|
125
132
|
end
|
126
133
|
|
127
134
|
# Creates an instance of the object from a hash.
|
@@ -141,6 +148,8 @@ module PaypalServerSdk
|
|
141
148
|
hash['experience_context']
|
142
149
|
billing_agreement_id =
|
143
150
|
hash.key?('billing_agreement_id') ? hash['billing_agreement_id'] : SKIP
|
151
|
+
stored_credential = PaypalWalletStoredCredential.from_hash(hash['stored_credential']) if
|
152
|
+
hash['stored_credential']
|
144
153
|
|
145
154
|
# Create object from extracted values.
|
146
155
|
PaypalWallet.new(vault_id: vault_id,
|
@@ -152,7 +161,28 @@ module PaypalServerSdk
|
|
152
161
|
address: address,
|
153
162
|
attributes: attributes,
|
154
163
|
experience_context: experience_context,
|
155
|
-
billing_agreement_id: billing_agreement_id
|
164
|
+
billing_agreement_id: billing_agreement_id,
|
165
|
+
stored_credential: stored_credential)
|
166
|
+
end
|
167
|
+
|
168
|
+
# Provides a human-readable string representation of the object.
|
169
|
+
def to_s
|
170
|
+
class_name = self.class.name.split('::').last
|
171
|
+
"<#{class_name} vault_id: #{@vault_id}, email_address: #{@email_address}, name: #{@name},"\
|
172
|
+
" phone: #{@phone}, birth_date: #{@birth_date}, tax_info: #{@tax_info}, address:"\
|
173
|
+
" #{@address}, attributes: #{@attributes}, experience_context: #{@experience_context},"\
|
174
|
+
" billing_agreement_id: #{@billing_agreement_id}, stored_credential: #{@stored_credential}>"
|
175
|
+
end
|
176
|
+
|
177
|
+
# Provides a debugging-friendly string with detailed object information.
|
178
|
+
def inspect
|
179
|
+
class_name = self.class.name.split('::').last
|
180
|
+
"<#{class_name} vault_id: #{@vault_id.inspect}, email_address: #{@email_address.inspect},"\
|
181
|
+
" name: #{@name.inspect}, phone: #{@phone.inspect}, birth_date: #{@birth_date.inspect},"\
|
182
|
+
" tax_info: #{@tax_info.inspect}, address: #{@address.inspect}, attributes:"\
|
183
|
+
" #{@attributes.inspect}, experience_context: #{@experience_context.inspect},"\
|
184
|
+
" billing_agreement_id: #{@billing_agreement_id.inspect}, stored_credential:"\
|
185
|
+
" #{@stored_credential.inspect}>"
|
156
186
|
end
|
157
187
|
end
|
158
188
|
end
|
@@ -8,10 +8,14 @@ module PaypalServerSdk
|
|
8
8
|
# details associated with their PayPal account.
|
9
9
|
class PaypalWalletAccountVerificationStatus
|
10
10
|
PAYPAL_WALLET_ACCOUNT_VERIFICATION_STATUS = [
|
11
|
-
#
|
11
|
+
# The buyer has completed the verification of the financial details
|
12
|
+
# associated with this PayPal account. For example: confirming their bank
|
13
|
+
# account.
|
12
14
|
VERIFIED = 'VERIFIED'.freeze,
|
13
15
|
|
14
|
-
#
|
16
|
+
# The buyer has not completed the verification of the financial details
|
17
|
+
# associated with this PayPal account. For example: confirming their bank
|
18
|
+
# account.
|
15
19
|
UNVERIFIED = 'UNVERIFIED'.freeze
|
16
20
|
].freeze
|
17
21
|
|
@@ -55,5 +55,17 @@ module PaypalServerSdk
|
|
55
55
|
PaypalWalletAttributes.new(customer: customer,
|
56
56
|
vault: vault)
|
57
57
|
end
|
58
|
+
|
59
|
+
# Provides a human-readable string representation of the object.
|
60
|
+
def to_s
|
61
|
+
class_name = self.class.name.split('::').last
|
62
|
+
"<#{class_name} customer: #{@customer}, vault: #{@vault}>"
|
63
|
+
end
|
64
|
+
|
65
|
+
# Provides a debugging-friendly string with detailed object information.
|
66
|
+
def inspect
|
67
|
+
class_name = self.class.name.split('::').last
|
68
|
+
"<#{class_name} customer: #{@customer.inspect}, vault: #{@vault.inspect}>"
|
69
|
+
end
|
58
70
|
end
|
59
71
|
end
|
@@ -66,5 +66,17 @@ module PaypalServerSdk
|
|
66
66
|
PaypalWalletAttributesResponse.new(vault: vault,
|
67
67
|
cobranded_cards: cobranded_cards)
|
68
68
|
end
|
69
|
+
|
70
|
+
# Provides a human-readable string representation of the object.
|
71
|
+
def to_s
|
72
|
+
class_name = self.class.name.split('::').last
|
73
|
+
"<#{class_name} vault: #{@vault}, cobranded_cards: #{@cobranded_cards}>"
|
74
|
+
end
|
75
|
+
|
76
|
+
# Provides a debugging-friendly string with detailed object information.
|
77
|
+
def inspect
|
78
|
+
class_name = self.class.name.split('::').last
|
79
|
+
"<#{class_name} vault: #{@vault.inspect}, cobranded_cards: #{@cobranded_cards.inspect}>"
|
80
|
+
end
|
69
81
|
end
|
70
82
|
end
|
@@ -0,0 +1,31 @@
|
|
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 location from which the shipping address is derived.
|
8
|
+
class PaypalWalletContextShippingPreference
|
9
|
+
PAYPAL_WALLET_CONTEXT_SHIPPING_PREFERENCE = [
|
10
|
+
# Get the customer-provided shipping address on the PayPal site.
|
11
|
+
GET_FROM_FILE = 'GET_FROM_FILE'.freeze,
|
12
|
+
|
13
|
+
# Removes the shipping address information from the API response and the
|
14
|
+
# Paypal site. However, the shipping.phone_number and
|
15
|
+
# shipping.email_address fields will still be returned to allow for
|
16
|
+
# digital goods delivery.
|
17
|
+
NO_SHIPPING = 'NO_SHIPPING'.freeze,
|
18
|
+
|
19
|
+
# Get the merchant-provided address. The customer cannot change this
|
20
|
+
# address on the PayPal site. If merchant does not pass an address,
|
21
|
+
# customer can choose the address on PayPal pages.
|
22
|
+
SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze
|
23
|
+
].freeze
|
24
|
+
|
25
|
+
def self.validate(value)
|
26
|
+
return false if value.nil?
|
27
|
+
|
28
|
+
true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -13,11 +13,10 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :id
|
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_address
|
23
22
|
|
@@ -81,5 +80,19 @@ module PaypalServerSdk
|
|
81
80
|
phone: phone,
|
82
81
|
merchant_customer_id: merchant_customer_id)
|
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} id: #{@id}, email_address: #{@email_address}, phone: #{@phone},"\
|
88
|
+
" merchant_customer_id: #{@merchant_customer_id}>"
|
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} id: #{@id.inspect}, email_address: #{@email_address.inspect}, phone:"\
|
95
|
+
" #{@phone.inspect}, merchant_customer_id: #{@merchant_customer_id.inspect}>"
|
96
|
+
end
|
84
97
|
end
|
85
98
|
end
|
@@ -13,11 +13,10 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :id
|
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_address
|
23
22
|
|
@@ -81,5 +80,19 @@ module PaypalServerSdk
|
|
81
80
|
phone: phone,
|
82
81
|
merchant_customer_id: merchant_customer_id)
|
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} id: #{@id}, email_address: #{@email_address}, phone: #{@phone},"\
|
88
|
+
" merchant_customer_id: #{@merchant_customer_id}>"
|
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} id: #{@id.inspect}, email_address: #{@email_address.inspect}, phone:"\
|
95
|
+
" #{@phone.inspect}, merchant_customer_id: #{@merchant_customer_id.inspect}>"
|
96
|
+
end
|
84
97
|
end
|
85
98
|
end
|