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
@@ -72,22 +72,20 @@ module PaypalServerSdk
|
|
72
72
|
|
73
73
|
# The processor response information for payment requests, such as direct
|
74
74
|
# credit card transactions.
|
75
|
-
# @return [
|
75
|
+
# @return [PaymentsProcessorResponse]
|
76
76
|
attr_accessor :processor_response
|
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
|
|
@@ -97,7 +95,7 @@ module PaypalServerSdk
|
|
97
95
|
|
98
96
|
# The details for the merchant who receives the funds and fulfills the
|
99
97
|
# order. The merchant is also known as the payee.
|
100
|
-
# @return [
|
98
|
+
# @return [PayeeBase]
|
101
99
|
attr_accessor :payee
|
102
100
|
|
103
101
|
# A mapping from model property names to API property names.
|
@@ -217,13 +215,13 @@ module PaypalServerSdk
|
|
217
215
|
end
|
218
216
|
|
219
217
|
links = SKIP unless hash.key?('links')
|
220
|
-
processor_response =
|
218
|
+
processor_response = PaymentsProcessorResponse.from_hash(hash['processor_response']) if
|
221
219
|
hash['processor_response']
|
222
220
|
create_time = hash.key?('create_time') ? hash['create_time'] : SKIP
|
223
221
|
update_time = hash.key?('update_time') ? hash['update_time'] : SKIP
|
224
222
|
supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if
|
225
223
|
hash['supplementary_data']
|
226
|
-
payee =
|
224
|
+
payee = PayeeBase.from_hash(hash['payee']) if hash['payee']
|
227
225
|
|
228
226
|
# Create object from extracted values.
|
229
227
|
CapturedPayment.new(status: status,
|
@@ -244,5 +242,33 @@ module PaypalServerSdk
|
|
244
242
|
supplementary_data: supplementary_data,
|
245
243
|
payee: payee)
|
246
244
|
end
|
245
|
+
|
246
|
+
# Provides a human-readable string representation of the object.
|
247
|
+
def to_s
|
248
|
+
class_name = self.class.name.split('::').last
|
249
|
+
"<#{class_name} status: #{@status}, status_details: #{@status_details}, id: #{@id}, amount:"\
|
250
|
+
" #{@amount}, invoice_id: #{@invoice_id}, custom_id: #{@custom_id},"\
|
251
|
+
" network_transaction_reference: #{@network_transaction_reference}, seller_protection:"\
|
252
|
+
" #{@seller_protection}, final_capture: #{@final_capture}, seller_receivable_breakdown:"\
|
253
|
+
" #{@seller_receivable_breakdown}, disbursement_mode: #{@disbursement_mode}, links:"\
|
254
|
+
" #{@links}, processor_response: #{@processor_response}, create_time: #{@create_time},"\
|
255
|
+
" update_time: #{@update_time}, supplementary_data: #{@supplementary_data}, payee:"\
|
256
|
+
" #{@payee}>"
|
257
|
+
end
|
258
|
+
|
259
|
+
# Provides a debugging-friendly string with detailed object information.
|
260
|
+
def inspect
|
261
|
+
class_name = self.class.name.split('::').last
|
262
|
+
"<#{class_name} status: #{@status.inspect}, status_details: #{@status_details.inspect}, id:"\
|
263
|
+
" #{@id.inspect}, amount: #{@amount.inspect}, invoice_id: #{@invoice_id.inspect}, custom_id:"\
|
264
|
+
" #{@custom_id.inspect}, network_transaction_reference:"\
|
265
|
+
" #{@network_transaction_reference.inspect}, seller_protection:"\
|
266
|
+
" #{@seller_protection.inspect}, final_capture: #{@final_capture.inspect},"\
|
267
|
+
" seller_receivable_breakdown: #{@seller_receivable_breakdown.inspect}, disbursement_mode:"\
|
268
|
+
" #{@disbursement_mode.inspect}, links: #{@links.inspect}, processor_response:"\
|
269
|
+
" #{@processor_response.inspect}, create_time: #{@create_time.inspect}, update_time:"\
|
270
|
+
" #{@update_time.inspect}, supplementary_data: #{@supplementary_data.inspect}, payee:"\
|
271
|
+
" #{@payee.inspect}>"
|
272
|
+
end
|
247
273
|
end
|
248
274
|
end
|
@@ -66,5 +66,18 @@ module PaypalServerSdk
|
|
66
66
|
vault: vault,
|
67
67
|
verification: verification)
|
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} customer: #{@customer}, vault: #{@vault}, verification: #{@verification}>"
|
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} customer: #{@customer.inspect}, vault: #{@vault.inspect}, verification:"\
|
80
|
+
" #{@verification.inspect}>"
|
81
|
+
end
|
69
82
|
end
|
70
83
|
end
|
@@ -46,5 +46,17 @@ module PaypalServerSdk
|
|
46
46
|
# Create object from extracted values.
|
47
47
|
CardAttributesResponse.new(vault: vault)
|
48
48
|
end
|
49
|
+
|
50
|
+
# Provides a human-readable string representation of the object.
|
51
|
+
def to_s
|
52
|
+
class_name = self.class.name.split('::').last
|
53
|
+
"<#{class_name} vault: #{@vault}>"
|
54
|
+
end
|
55
|
+
|
56
|
+
# Provides a debugging-friendly string with detailed object information.
|
57
|
+
def inspect
|
58
|
+
class_name = self.class.name.split('::').last
|
59
|
+
"<#{class_name} vault: #{@vault.inspect}>"
|
60
|
+
end
|
49
61
|
end
|
50
62
|
end
|
@@ -10,7 +10,7 @@ module PaypalServerSdk
|
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
12
|
# Results of 3D Secure Authentication.
|
13
|
-
# @return [
|
13
|
+
# @return [ThreeDSecureCardAuthenticationResponse]
|
14
14
|
attr_accessor :three_d_secure
|
15
15
|
|
16
16
|
# A mapping from model property names to API property names.
|
@@ -41,11 +41,23 @@ module PaypalServerSdk
|
|
41
41
|
return nil unless hash
|
42
42
|
|
43
43
|
# Extract variables from the hash.
|
44
|
-
three_d_secure =
|
44
|
+
three_d_secure = ThreeDSecureCardAuthenticationResponse.from_hash(hash['three_d_secure']) if
|
45
45
|
hash['three_d_secure']
|
46
46
|
|
47
47
|
# Create object from extracted values.
|
48
48
|
CardAuthenticationResponse.new(three_d_secure: three_d_secure)
|
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} three_d_secure: #{@three_d_secure}>"
|
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} three_d_secure: #{@three_d_secure.inspect}>"
|
61
|
+
end
|
50
62
|
end
|
51
63
|
end
|
@@ -8,79 +8,83 @@ module PaypalServerSdk
|
|
8
8
|
# cards.
|
9
9
|
class CardBrand
|
10
10
|
CARD_BRAND = [
|
11
|
-
#
|
11
|
+
# Visa card.
|
12
12
|
VISA = 'VISA'.freeze,
|
13
13
|
|
14
|
-
#
|
14
|
+
# Mastecard card.
|
15
15
|
MASTERCARD = 'MASTERCARD'.freeze,
|
16
16
|
|
17
|
-
#
|
17
|
+
# Discover card.
|
18
18
|
DISCOVER = 'DISCOVER'.freeze,
|
19
19
|
|
20
|
-
#
|
20
|
+
# American Express card.
|
21
21
|
AMEX = 'AMEX'.freeze,
|
22
22
|
|
23
|
-
#
|
23
|
+
# Solo debit card.
|
24
24
|
SOLO = 'SOLO'.freeze,
|
25
25
|
|
26
|
-
#
|
26
|
+
# Japan Credit Bureau card.
|
27
27
|
JCB = 'JCB'.freeze,
|
28
28
|
|
29
|
-
#
|
29
|
+
# Military Star card.
|
30
30
|
STAR = 'STAR'.freeze,
|
31
31
|
|
32
|
-
#
|
32
|
+
# Delta Airlines card.
|
33
33
|
DELTA = 'DELTA'.freeze,
|
34
34
|
|
35
|
-
#
|
35
|
+
# Switch credit card.
|
36
36
|
SWITCH = 'SWITCH'.freeze,
|
37
37
|
|
38
|
-
#
|
38
|
+
# Maestro credit card.
|
39
39
|
MAESTRO = 'MAESTRO'.freeze,
|
40
40
|
|
41
|
-
#
|
41
|
+
# Carte Bancaire (CB) credit card.
|
42
42
|
CB_NATIONALE = 'CB_NATIONALE'.freeze,
|
43
43
|
|
44
|
-
#
|
44
|
+
# Configoga credit card.
|
45
45
|
CONFIGOGA = 'CONFIGOGA'.freeze,
|
46
46
|
|
47
|
-
#
|
47
|
+
# Confidis credit card.
|
48
48
|
CONFIDIS = 'CONFIDIS'.freeze,
|
49
49
|
|
50
|
-
#
|
50
|
+
# Visa Electron credit card.
|
51
51
|
ELECTRON = 'ELECTRON'.freeze,
|
52
52
|
|
53
|
-
#
|
53
|
+
# Cetelem credit card.
|
54
54
|
CETELEM = 'CETELEM'.freeze,
|
55
55
|
|
56
|
-
#
|
56
|
+
# China union pay credit card.
|
57
57
|
CHINA_UNION_PAY = 'CHINA_UNION_PAY'.freeze,
|
58
58
|
|
59
|
-
#
|
59
|
+
# The Diners Club International banking and payment services capability
|
60
|
+
# network owned by Discover Financial Services (DFS), one of the most
|
61
|
+
# recognized brands in US financial services.
|
60
62
|
DINERS = 'DINERS'.freeze,
|
61
63
|
|
62
|
-
#
|
64
|
+
# The Brazilian Elo card payment network.
|
63
65
|
ELO = 'ELO'.freeze,
|
64
66
|
|
65
|
-
#
|
67
|
+
# The Hiper - Ingenico ePayment network.
|
66
68
|
HIPER = 'HIPER'.freeze,
|
67
69
|
|
68
|
-
#
|
70
|
+
# The Brazilian Hipercard payment network that's widely accepted in the
|
71
|
+
# retail market.
|
69
72
|
HIPERCARD = 'HIPERCARD'.freeze,
|
70
73
|
|
71
|
-
#
|
74
|
+
# The RuPay payment network.
|
72
75
|
RUPAY = 'RUPAY'.freeze,
|
73
76
|
|
74
|
-
#
|
77
|
+
# The GE Credit Union 3Point card payment network.
|
75
78
|
GE = 'GE'.freeze,
|
76
79
|
|
77
|
-
#
|
80
|
+
# The Synchrony Financial (SYF) payment network.
|
78
81
|
SYNCHRONY = 'SYNCHRONY'.freeze,
|
79
82
|
|
80
|
-
#
|
83
|
+
# The Electronic Fund Transfer At Point of Sale(EFTPOS) Debit card payment
|
84
|
+
# network.
|
81
85
|
EFTPOS = 'EFTPOS'.freeze,
|
82
86
|
|
83
|
-
#
|
87
|
+
# UNKNOWN payment network.
|
84
88
|
UNKNOWN = 'UNKNOWN'.freeze
|
85
89
|
].freeze
|
86
90
|
|
@@ -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
|
@@ -55,5 +55,17 @@ module PaypalServerSdk
|
|
55
55
|
CardExperienceContext.new(return_url: return_url,
|
56
56
|
cancel_url: cancel_url)
|
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} return_url: #{@return_url}, cancel_url: #{@cancel_url}>"
|
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} return_url: #{@return_url.inspect}, cancel_url: #{@cancel_url.inspect}>"
|
69
|
+
end
|
58
70
|
end
|
59
71
|
end
|
@@ -56,5 +56,17 @@ module PaypalServerSdk
|
|
56
56
|
CardFromRequest.new(expiry: expiry,
|
57
57
|
last_digits: last_digits)
|
58
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} expiry: #{@expiry}, last_digits: #{@last_digits}>"
|
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} expiry: #{@expiry.inspect}, last_digits: #{@last_digits.inspect}>"
|
70
|
+
end
|
59
71
|
end
|
60
72
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
7
|
# Full representation of a Card Payment Token.
|
8
|
-
class
|
8
|
+
class CardPaymentTokenEntity < BaseModel
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
@@ -28,11 +28,11 @@ module PaypalServerSdk
|
|
28
28
|
attr_accessor :expiry
|
29
29
|
|
30
30
|
# Address request details.
|
31
|
-
# @return [
|
31
|
+
# @return [CardResponseAddress]
|
32
32
|
attr_accessor :billing_address
|
33
33
|
|
34
34
|
# Verification status of Card.
|
35
|
-
# @return [
|
35
|
+
# @return [CardVerificationStatus]
|
36
36
|
attr_accessor :verification_status
|
37
37
|
|
38
38
|
# Card Verification details including the authorization details and 3D
|
@@ -125,7 +125,7 @@ module PaypalServerSdk
|
|
125
125
|
last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP
|
126
126
|
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
127
127
|
expiry = hash.key?('expiry') ? hash['expiry'] : SKIP
|
128
|
-
billing_address =
|
128
|
+
billing_address = CardResponseAddress.from_hash(hash['billing_address']) if
|
129
129
|
hash['billing_address']
|
130
130
|
verification_status =
|
131
131
|
hash.key?('verification_status') ? hash['verification_status'] : SKIP
|
@@ -140,17 +140,39 @@ module PaypalServerSdk
|
|
140
140
|
type = hash.key?('type') ? hash['type'] : SKIP
|
141
141
|
|
142
142
|
# Create object from extracted values.
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
143
|
+
CardPaymentTokenEntity.new(name: name,
|
144
|
+
last_digits: last_digits,
|
145
|
+
brand: brand,
|
146
|
+
expiry: expiry,
|
147
|
+
billing_address: billing_address,
|
148
|
+
verification_status: verification_status,
|
149
|
+
verification: verification,
|
150
|
+
network_transaction_reference: network_transaction_reference,
|
151
|
+
authentication_result: authentication_result,
|
152
|
+
bin_details: bin_details,
|
153
|
+
type: type)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Provides a human-readable string representation of the object.
|
157
|
+
def to_s
|
158
|
+
class_name = self.class.name.split('::').last
|
159
|
+
"<#{class_name} name: #{@name}, last_digits: #{@last_digits}, brand: #{@brand}, expiry:"\
|
160
|
+
" #{@expiry}, billing_address: #{@billing_address}, verification_status:"\
|
161
|
+
" #{@verification_status}, verification: #{@verification}, network_transaction_reference:"\
|
162
|
+
" #{@network_transaction_reference}, authentication_result: #{@authentication_result},"\
|
163
|
+
" bin_details: #{@bin_details}, type: #{@type}>"
|
164
|
+
end
|
165
|
+
|
166
|
+
# Provides a debugging-friendly string with detailed object information.
|
167
|
+
def inspect
|
168
|
+
class_name = self.class.name.split('::').last
|
169
|
+
"<#{class_name} name: #{@name.inspect}, last_digits: #{@last_digits.inspect}, brand:"\
|
170
|
+
" #{@brand.inspect}, expiry: #{@expiry.inspect}, billing_address:"\
|
171
|
+
" #{@billing_address.inspect}, verification_status: #{@verification_status.inspect},"\
|
172
|
+
" verification: #{@verification.inspect}, network_transaction_reference:"\
|
173
|
+
" #{@network_transaction_reference.inspect}, authentication_result:"\
|
174
|
+
" #{@authentication_result.inspect}, bin_details: #{@bin_details.inspect}, type:"\
|
175
|
+
" #{@type.inspect}>"
|
154
176
|
end
|
155
177
|
end
|
156
178
|
end
|
@@ -4,15 +4,11 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module PaypalServerSdk
|
7
|
-
# The payment card to use to fund a payment. Can be a credit or debit
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# you do not have to take on the <strong>PCI SAQ D</strong> burden by using
|
13
|
-
# hosted fields - refer to <a
|
14
|
-
# href="https://developer.paypal.com/docs/checkout/advanced/integrate/">this
|
15
|
-
# Integration Guide</a>*.</blockquote>
|
7
|
+
# The payment card to use to fund a payment. Can be a credit or debit card.
|
8
|
+
# Note: Passing card number, cvv and expiry directly via the API requires PCI
|
9
|
+
# SAQ D compliance. *PayPal offers a mechanism by which you do not have to
|
10
|
+
# take on the PCI SAQ D burden by using hosted fields - refer to this
|
11
|
+
# Integration Guide*.
|
16
12
|
class CardRequest < BaseModel
|
17
13
|
SKIP = Object.new
|
18
14
|
private_constant :SKIP
|
@@ -62,16 +58,14 @@ module PaypalServerSdk
|
|
62
58
|
|
63
59
|
# Provides additional details to process a payment using a `card` that has
|
64
60
|
# been stored or is intended to be stored (also referred to as
|
65
|
-
# stored_credential or card-on-file)
|
66
|
-
#
|
67
|
-
# `payment_initiator=CUSTOMER
|
68
|
-
#
|
69
|
-
# `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or
|
61
|
+
# stored_credential or card-on-file). Parameter compatibility:
|
62
|
+
# `payment_type=ONE_TIME` is compatible only with
|
63
|
+
# `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with
|
64
|
+
# `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
70
65
|
# `previous_network_transaction_reference` is compatible only with
|
71
|
-
# `payment_initiator=MERCHANT
|
66
|
+
# `payment_initiator=MERCHANT`. Only one of the parameters -
|
72
67
|
# `previous_transaction_reference` and
|
73
|
-
# `previous_network_transaction_reference` - can be present in the
|
74
|
-
# request.</li></ul>
|
68
|
+
# `previous_network_transaction_reference` - can be present in the request.
|
75
69
|
# @return [CardStoredCredential]
|
76
70
|
attr_accessor :stored_credential
|
77
71
|
|
@@ -172,5 +166,26 @@ module PaypalServerSdk
|
|
172
166
|
network_token: network_token,
|
173
167
|
experience_context: experience_context)
|
174
168
|
end
|
169
|
+
|
170
|
+
# Provides a human-readable string representation of the object.
|
171
|
+
def to_s
|
172
|
+
class_name = self.class.name.split('::').last
|
173
|
+
"<#{class_name} name: #{@name}, number: #{@number}, expiry: #{@expiry}, security_code:"\
|
174
|
+
" #{@security_code}, billing_address: #{@billing_address}, attributes: #{@attributes},"\
|
175
|
+
" vault_id: #{@vault_id}, single_use_token: #{@single_use_token}, stored_credential:"\
|
176
|
+
" #{@stored_credential}, network_token: #{@network_token}, experience_context:"\
|
177
|
+
" #{@experience_context}>"
|
178
|
+
end
|
179
|
+
|
180
|
+
# Provides a debugging-friendly string with detailed object information.
|
181
|
+
def inspect
|
182
|
+
class_name = self.class.name.split('::').last
|
183
|
+
"<#{class_name} name: #{@name.inspect}, number: #{@number.inspect}, expiry:"\
|
184
|
+
" #{@expiry.inspect}, security_code: #{@security_code.inspect}, billing_address:"\
|
185
|
+
" #{@billing_address.inspect}, attributes: #{@attributes.inspect}, vault_id:"\
|
186
|
+
" #{@vault_id.inspect}, single_use_token: #{@single_use_token.inspect}, stored_credential:"\
|
187
|
+
" #{@stored_credential.inspect}, network_token: #{@network_token.inspect},"\
|
188
|
+
" experience_context: #{@experience_context.inspect}>"
|
189
|
+
end
|
175
190
|
end
|
176
191
|
end
|
@@ -52,6 +52,19 @@ module PaypalServerSdk
|
|
52
52
|
# @return [BinDetails]
|
53
53
|
attr_accessor :bin_details
|
54
54
|
|
55
|
+
# Provides additional details to process a payment using a `card` that has
|
56
|
+
# been stored or is intended to be stored (also referred to as
|
57
|
+
# stored_credential or card-on-file). Parameter compatibility:
|
58
|
+
# `payment_type=ONE_TIME` is compatible only with
|
59
|
+
# `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with
|
60
|
+
# `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
61
|
+
# `previous_network_transaction_reference` is compatible only with
|
62
|
+
# `payment_initiator=MERCHANT`. Only one of the parameters -
|
63
|
+
# `previous_transaction_reference` and
|
64
|
+
# `previous_network_transaction_reference` - can be present in the request.
|
65
|
+
# @return [CardStoredCredential]
|
66
|
+
attr_accessor :stored_credential
|
67
|
+
|
55
68
|
# A mapping from model property names to API property names.
|
56
69
|
def self.names
|
57
70
|
@_hash = {} if @_hash.nil?
|
@@ -65,6 +78,7 @@ module PaypalServerSdk
|
|
65
78
|
@_hash['from_request'] = 'from_request'
|
66
79
|
@_hash['expiry'] = 'expiry'
|
67
80
|
@_hash['bin_details'] = 'bin_details'
|
81
|
+
@_hash['stored_credential'] = 'stored_credential'
|
68
82
|
@_hash
|
69
83
|
end
|
70
84
|
|
@@ -81,6 +95,7 @@ module PaypalServerSdk
|
|
81
95
|
from_request
|
82
96
|
expiry
|
83
97
|
bin_details
|
98
|
+
stored_credential
|
84
99
|
]
|
85
100
|
end
|
86
101
|
|
@@ -92,7 +107,8 @@ module PaypalServerSdk
|
|
92
107
|
def initialize(name: SKIP, last_digits: SKIP, brand: SKIP,
|
93
108
|
available_networks: SKIP, type: SKIP,
|
94
109
|
authentication_result: SKIP, attributes: SKIP,
|
95
|
-
from_request: SKIP, expiry: SKIP, bin_details: SKIP
|
110
|
+
from_request: SKIP, expiry: SKIP, bin_details: SKIP,
|
111
|
+
stored_credential: SKIP)
|
96
112
|
@name = name unless name == SKIP
|
97
113
|
@last_digits = last_digits unless last_digits == SKIP
|
98
114
|
@brand = brand unless brand == SKIP
|
@@ -103,6 +119,7 @@ module PaypalServerSdk
|
|
103
119
|
@from_request = from_request unless from_request == SKIP
|
104
120
|
@expiry = expiry unless expiry == SKIP
|
105
121
|
@bin_details = bin_details unless bin_details == SKIP
|
122
|
+
@stored_credential = stored_credential unless stored_credential == SKIP
|
106
123
|
end
|
107
124
|
|
108
125
|
# Creates an instance of the object from a hash.
|
@@ -122,6 +139,8 @@ module PaypalServerSdk
|
|
122
139
|
from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request']
|
123
140
|
expiry = hash.key?('expiry') ? hash['expiry'] : SKIP
|
124
141
|
bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details']
|
142
|
+
stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if
|
143
|
+
hash['stored_credential']
|
125
144
|
|
126
145
|
# Create object from extracted values.
|
127
146
|
CardResponse.new(name: name,
|
@@ -133,7 +152,29 @@ module PaypalServerSdk
|
|
133
152
|
attributes: attributes,
|
134
153
|
from_request: from_request,
|
135
154
|
expiry: expiry,
|
136
|
-
bin_details: bin_details
|
155
|
+
bin_details: bin_details,
|
156
|
+
stored_credential: stored_credential)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Provides a human-readable string representation of the object.
|
160
|
+
def to_s
|
161
|
+
class_name = self.class.name.split('::').last
|
162
|
+
"<#{class_name} name: #{@name}, last_digits: #{@last_digits}, brand: #{@brand},"\
|
163
|
+
" available_networks: #{@available_networks}, type: #{@type}, authentication_result:"\
|
164
|
+
" #{@authentication_result}, attributes: #{@attributes}, from_request: #{@from_request},"\
|
165
|
+
" expiry: #{@expiry}, bin_details: #{@bin_details}, stored_credential:"\
|
166
|
+
" #{@stored_credential}>"
|
167
|
+
end
|
168
|
+
|
169
|
+
# Provides a debugging-friendly string with detailed object information.
|
170
|
+
def inspect
|
171
|
+
class_name = self.class.name.split('::').last
|
172
|
+
"<#{class_name} name: #{@name.inspect}, last_digits: #{@last_digits.inspect}, brand:"\
|
173
|
+
" #{@brand.inspect}, available_networks: #{@available_networks.inspect}, type:"\
|
174
|
+
" #{@type.inspect}, authentication_result: #{@authentication_result.inspect}, attributes:"\
|
175
|
+
" #{@attributes.inspect}, from_request: #{@from_request.inspect}, expiry:"\
|
176
|
+
" #{@expiry.inspect}, bin_details: #{@bin_details.inspect}, stored_credential:"\
|
177
|
+
" #{@stored_credential.inspect}>"
|
137
178
|
end
|
138
179
|
end
|
139
180
|
end
|