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
@@ -8,29 +8,29 @@ module PaypalServerSdk
|
|
8
8
|
# authentication.
|
9
9
|
class PaResStatus
|
10
10
|
PA_RES_STATUS = [
|
11
|
-
#
|
12
|
-
|
11
|
+
# Successful authentication.
|
12
|
+
SUCCESSFULAUTHENTICATION = 'Y'.freeze,
|
13
13
|
|
14
|
-
#
|
15
|
-
|
14
|
+
# Failed authentication / account not verified / transaction denied.
|
15
|
+
FAILEDAUTHENTICATION = 'N'.freeze,
|
16
16
|
|
17
|
-
#
|
18
|
-
|
17
|
+
# Unable to complete authentication.
|
18
|
+
UNABLETOCOMPLETEAUTHENTICATION = 'U'.freeze,
|
19
19
|
|
20
|
-
#
|
21
|
-
|
20
|
+
# Successful attempts transaction.
|
21
|
+
SUCCESSFULATTEMPTSTRANSACTION = 'A'.freeze,
|
22
22
|
|
23
|
-
#
|
24
|
-
|
23
|
+
# Challenge required for authentication.
|
24
|
+
CHALLENGEREQUIRED = 'C'.freeze,
|
25
25
|
|
26
|
-
#
|
27
|
-
|
26
|
+
# Authentication rejected (merchant must not submit for authorization).
|
27
|
+
AUTHENTICATIONREJECTED = 'R'.freeze,
|
28
28
|
|
29
|
-
#
|
30
|
-
|
29
|
+
# Challenge required; decoupled authentication confirmed.
|
30
|
+
DECOUPLEDAUTHENTICATION = 'D'.freeze,
|
31
31
|
|
32
|
-
#
|
33
|
-
|
32
|
+
# Informational only; 3DS requestor challenge preference acknowledged.
|
33
|
+
INFORMATIONALONLY = 'I'.freeze
|
34
34
|
].freeze
|
35
35
|
|
36
36
|
def self.validate(value)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# Profile information of the sender or receiver.
|
8
|
+
class ParticipantMetadata < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# An Internet Protocol address (IP address). This address assigns a
|
13
|
+
# numerical label to each device that is connected to a computer network
|
14
|
+
# through the Internet Protocol. Supports IPv4 and IPv6 addresses.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :ip_address
|
17
|
+
|
18
|
+
# A mapping from model property names to API property names.
|
19
|
+
def self.names
|
20
|
+
@_hash = {} if @_hash.nil?
|
21
|
+
@_hash['ip_address'] = 'ip_address'
|
22
|
+
@_hash
|
23
|
+
end
|
24
|
+
|
25
|
+
# An array for optional fields
|
26
|
+
def self.optionals
|
27
|
+
%w[
|
28
|
+
ip_address
|
29
|
+
]
|
30
|
+
end
|
31
|
+
|
32
|
+
# An array for nullable fields
|
33
|
+
def self.nullables
|
34
|
+
[]
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize(ip_address: SKIP)
|
38
|
+
@ip_address = ip_address unless ip_address == SKIP
|
39
|
+
end
|
40
|
+
|
41
|
+
# Creates an instance of the object from a hash.
|
42
|
+
def self.from_hash(hash)
|
43
|
+
return nil unless hash
|
44
|
+
|
45
|
+
# Extract variables from the hash.
|
46
|
+
ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
|
47
|
+
|
48
|
+
# Create object from extracted values.
|
49
|
+
ParticipantMetadata.new(ip_address: ip_address)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Provides a human-readable string representation of the object.
|
53
|
+
def to_s
|
54
|
+
class_name = self.class.name.split('::').last
|
55
|
+
"<#{class_name} ip_address: #{@ip_address}>"
|
56
|
+
end
|
57
|
+
|
58
|
+
# Provides a debugging-friendly string with detailed object information.
|
59
|
+
def inspect
|
60
|
+
class_name = self.class.name.split('::').last
|
61
|
+
"<#{class_name} ip_address: #{@ip_address.inspect}>"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -13,22 +13,19 @@ module PaypalServerSdk
|
|
13
13
|
# @return [PatchOp]
|
14
14
|
attr_accessor :op
|
15
15
|
|
16
|
-
# The
|
17
|
-
#
|
16
|
+
# The JSON Pointer to the target document location at which to complete the
|
17
|
+
# operation.
|
18
18
|
# @return [String]
|
19
19
|
attr_accessor :path
|
20
20
|
|
21
|
-
# The value to apply. The
|
22
|
-
#
|
23
|
-
#
|
24
|
-
# type for <code>value</code>, the <code>type</code> property is not
|
25
|
-
# specified.
|
21
|
+
# The value to apply. The remove, copy, and move operations do not require a
|
22
|
+
# value. Since JSON Patch allows any type for value, the type property is
|
23
|
+
# not specified.
|
26
24
|
# @return [Object]
|
27
25
|
attr_accessor :value
|
28
26
|
|
29
|
-
# The
|
30
|
-
#
|
31
|
-
# <code>move</code> operation.
|
27
|
+
# The JSON Pointer to the target document location from which to move the
|
28
|
+
# value. Required for the move operation.
|
32
29
|
# @return [String]
|
33
30
|
attr_accessor :from
|
34
31
|
|
@@ -79,5 +76,18 @@ module PaypalServerSdk
|
|
79
76
|
value: value,
|
80
77
|
from: from)
|
81
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} op: #{@op}, path: #{@path}, value: #{@value}, from: #{@from}>"
|
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} op: #{@op.inspect}, path: #{@path.inspect}, value: #{@value.inspect}, from:"\
|
90
|
+
" #{@from.inspect}>"
|
91
|
+
end
|
82
92
|
end
|
83
93
|
end
|
@@ -7,22 +7,59 @@ module PaypalServerSdk
|
|
7
7
|
# The operation.
|
8
8
|
class PatchOp
|
9
9
|
PATCH_OP = [
|
10
|
-
#
|
10
|
+
# Depending on the target location reference, completes one of these
|
11
|
+
# functions: The target location is an array index. Inserts a new value
|
12
|
+
# into the array at the specified index. The target location is an object
|
13
|
+
# parameter that does not already exist. Adds a new parameter to the
|
14
|
+
# object. The target location is an object parameter that does exist.
|
15
|
+
# Replaces that parameter's value. The value parameter defines the value
|
16
|
+
# to add. For more information, see 4.1. add.
|
11
17
|
ADD = 'add'.freeze,
|
12
18
|
|
13
|
-
#
|
19
|
+
# Removes the value at the target location. For the operation to succeed,
|
20
|
+
# the target location must exist. For more information, see 4.2. remove.
|
14
21
|
REMOVE = 'remove'.freeze,
|
15
22
|
|
16
|
-
#
|
23
|
+
# Replaces the value at the target location with a new value. The
|
24
|
+
# operation object must contain a value parameter that defines the
|
25
|
+
# replacement value. For the operation to succeed, the target location
|
26
|
+
# must exist. For more information, see 4.3. replace.
|
17
27
|
REPLACE = 'replace'.freeze,
|
18
28
|
|
19
|
-
#
|
29
|
+
# Removes the value at a specified location and adds it to the target
|
30
|
+
# location. The operation object must contain a from parameter, which is a
|
31
|
+
# string that contains a JSON pointer value that references the location
|
32
|
+
# in the target document from which to move the value. For the operation
|
33
|
+
# to succeed, the from location must exist. For more information, see 4.4.
|
34
|
+
# move.
|
20
35
|
MOVE = 'move'.freeze,
|
21
36
|
|
22
|
-
#
|
37
|
+
# Copies the value at a specified location to the target location. The
|
38
|
+
# operation object must contain a from parameter, which is a string that
|
39
|
+
# contains a JSON pointer value that references the location in the target
|
40
|
+
# document from which to copy the value. For the operation to succeed, the
|
41
|
+
# from location must exist. For more information, see 4.5. copy.
|
23
42
|
COPY = 'copy'.freeze,
|
24
43
|
|
25
|
-
#
|
44
|
+
# Tests that a value at the target location is equal to a specified value.
|
45
|
+
# The operation object must contain a value parameter that defines the
|
46
|
+
# value to compare to the target location's value. For the operation to
|
47
|
+
# succeed, the target location must be equal to the value value. For test,
|
48
|
+
# equal indicates that the value at the target location and the value that
|
49
|
+
# value defines are of the same JSON type. The data type of the value
|
50
|
+
# determines how equality is defined: Type Considered equal if both values
|
51
|
+
# strings Contain the same number of Unicode characters and their code
|
52
|
+
# points are byte-by-byte equal. numbers Are numerically equal. arrays
|
53
|
+
# Contain the same number of values, and each value is equal to the value
|
54
|
+
# at the corresponding position in the other array, by using these
|
55
|
+
# type-specific rules. objects Contain the same number of parameters, and
|
56
|
+
# each parameter is equal to a parameter in the other object, by comparing
|
57
|
+
# their keys (as strings) and their values (by using these type-specific
|
58
|
+
# rules). literals (false, true, and null) Are the same. The comparison is
|
59
|
+
# a logical comparison. For example, whitespace between the parameter
|
60
|
+
# values of an array is not significant. Also, ordering of the
|
61
|
+
# serialization of object parameters is not significant. For more
|
62
|
+
# information, see 4.6. test.
|
26
63
|
TEST = 'test'.freeze
|
27
64
|
].freeze
|
28
65
|
|
@@ -10,11 +10,10 @@ module PaypalServerSdk
|
|
10
10
|
SKIP = Object.new
|
11
11
|
private_constant :SKIP
|
12
12
|
|
13
|
-
# The internationalized email address
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
13
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
14
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
15
|
+
# generally accepted maximum length for an email address is 254 characters.
|
16
|
+
# The pattern verifies that an unquoted @ sign exists.
|
18
17
|
# @return [String]
|
19
18
|
attr_accessor :email_address
|
20
19
|
|
@@ -60,5 +59,18 @@ module PaypalServerSdk
|
|
60
59
|
PayeeBase.new(email_address: email_address,
|
61
60
|
merchant_id: merchant_id)
|
62
61
|
end
|
62
|
+
|
63
|
+
# Provides a human-readable string representation of the object.
|
64
|
+
def to_s
|
65
|
+
class_name = self.class.name.split('::').last
|
66
|
+
"<#{class_name} email_address: #{@email_address}, merchant_id: #{@merchant_id}>"
|
67
|
+
end
|
68
|
+
|
69
|
+
# Provides a debugging-friendly string with detailed object information.
|
70
|
+
def inspect
|
71
|
+
class_name = self.class.name.split('::').last
|
72
|
+
"<#{class_name} email_address: #{@email_address.inspect}, merchant_id:"\
|
73
|
+
" #{@merchant_id.inspect}>"
|
74
|
+
end
|
63
75
|
end
|
64
76
|
end
|
@@ -7,10 +7,12 @@ module PaypalServerSdk
|
|
7
7
|
# The merchant-preferred payment methods.
|
8
8
|
class PayeePaymentMethodPreference
|
9
9
|
PAYEE_PAYMENT_METHOD_PREFERENCE = [
|
10
|
-
#
|
10
|
+
# Accepts any type of payment from the customer.
|
11
11
|
UNRESTRICTED = 'UNRESTRICTED'.freeze,
|
12
12
|
|
13
|
-
#
|
13
|
+
# Accepts only immediate payment from the customer. For example, credit
|
14
|
+
# card, PayPal balance, or instant ACH. Ensures that at the time of
|
15
|
+
# capture, the payment does not have the `pending` status.
|
14
16
|
IMMEDIATE_PAYMENT_REQUIRED = 'IMMEDIATE_PAYMENT_REQUIRED'.freeze
|
15
17
|
].freeze
|
16
18
|
|
@@ -9,11 +9,10 @@ module PaypalServerSdk
|
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
|
-
# The internationalized email address
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
12
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
13
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
14
|
+
# generally accepted maximum length for an email address is 254 characters.
|
15
|
+
# The pattern verifies that an unquoted @ sign exists.
|
17
16
|
# @return [String]
|
18
17
|
attr_accessor :email_address
|
19
18
|
|
@@ -116,5 +115,21 @@ module PaypalServerSdk
|
|
116
115
|
tax_info: tax_info,
|
117
116
|
address: address)
|
118
117
|
end
|
118
|
+
|
119
|
+
# Provides a human-readable string representation of the object.
|
120
|
+
def to_s
|
121
|
+
class_name = self.class.name.split('::').last
|
122
|
+
"<#{class_name} email_address: #{@email_address}, payer_id: #{@payer_id}, name: #{@name},"\
|
123
|
+
" phone: #{@phone}, birth_date: #{@birth_date}, tax_info: #{@tax_info}, address:"\
|
124
|
+
" #{@address}>"
|
125
|
+
end
|
126
|
+
|
127
|
+
# Provides a debugging-friendly string with detailed object information.
|
128
|
+
def inspect
|
129
|
+
class_name = self.class.name.split('::').last
|
130
|
+
"<#{class_name} email_address: #{@email_address.inspect}, payer_id: #{@payer_id.inspect},"\
|
131
|
+
" name: #{@name.inspect}, phone: #{@phone.inspect}, birth_date: #{@birth_date.inspect},"\
|
132
|
+
" tax_info: #{@tax_info.inspect}, address: #{@address.inspect}>"
|
133
|
+
end
|
119
134
|
end
|
120
135
|
end
|
@@ -10,11 +10,10 @@ module PaypalServerSdk
|
|
10
10
|
SKIP = Object.new
|
11
11
|
private_constant :SKIP
|
12
12
|
|
13
|
-
# The internationalized email address
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
13
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
14
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
15
|
+
# generally accepted maximum length for an email address is 254 characters.
|
16
|
+
# The pattern verifies that an unquoted @ sign exists.
|
18
17
|
# @return [String]
|
19
18
|
attr_accessor :email_address
|
20
19
|
|
@@ -60,5 +59,17 @@ module PaypalServerSdk
|
|
60
59
|
PayerBase.new(email_address: email_address,
|
61
60
|
payer_id: payer_id)
|
62
61
|
end
|
62
|
+
|
63
|
+
# Provides a human-readable string representation of the object.
|
64
|
+
def to_s
|
65
|
+
class_name = self.class.name.split('::').last
|
66
|
+
"<#{class_name} email_address: #{@email_address}, payer_id: #{@payer_id}>"
|
67
|
+
end
|
68
|
+
|
69
|
+
# Provides a debugging-friendly string with detailed object information.
|
70
|
+
def inspect
|
71
|
+
class_name = self.class.name.split('::').last
|
72
|
+
"<#{class_name} email_address: #{@email_address.inspect}, payer_id: #{@payer_id.inspect}>"
|
73
|
+
end
|
63
74
|
end
|
64
75
|
end
|
@@ -8,17 +8,62 @@ module PaypalServerSdk
|
|
8
8
|
# networks, like Visa and Mastercard, return payment advice codes.
|
9
9
|
class PaymentAdviceCode
|
10
10
|
PAYMENT_ADVICE_CODE = [
|
11
|
-
#
|
12
|
-
|
11
|
+
# For Mastercard, expired card account upgrade or portfolio sale
|
12
|
+
# conversion. Obtain new account information before next billing cycle.
|
13
|
+
PAYMENTADVICE_01 = '01'.freeze,
|
13
14
|
|
14
|
-
#
|
15
|
-
|
15
|
+
# For Mastercard, over credit limit or insufficient funds. Retry the
|
16
|
+
# transaction 72 hours later. For Visa, the card holder wants to stop only
|
17
|
+
# one specific payment in the recurring payment relationship. The merchant
|
18
|
+
# must NOT resubmit the same transaction. The merchant can continue the
|
19
|
+
# billing process in the subsequent billing period.
|
20
|
+
PAYMENTADVICE_02 = '02'.freeze,
|
16
21
|
|
17
|
-
#
|
18
|
-
|
22
|
+
# For Mastercard, account closed as fraudulent. Obtain another type of
|
23
|
+
# payment from customer due to account being closed or fraud. Possible
|
24
|
+
# reason: Account closed as fraudulent. For Visa, the card holder wants to
|
25
|
+
# stop all recurring payment transactions for a specific merchant. Stop
|
26
|
+
# recurring payment requests.
|
27
|
+
PAYMENTADVICE_03 = '03'.freeze,
|
19
28
|
|
20
|
-
#
|
21
|
-
|
29
|
+
# For Mastercard, token requirements not fulfilled for this token type.
|
30
|
+
PAYMENTADVICE_04 = '04'.freeze,
|
31
|
+
|
32
|
+
# For Mastercard, the card holder has been unsuccessful at canceling
|
33
|
+
# recurring payment through merchant. Stop recurring payment requests. For
|
34
|
+
# Visa, all recurring payments were canceled for the card number
|
35
|
+
# requested. Stop recurring payment requests.
|
36
|
+
PAYMENTADVICE_21 = '21'.freeze,
|
37
|
+
|
38
|
+
# For Mastercard, merchant does not qualify for product code.
|
39
|
+
PAYMENTADVICE_22 = '22'.freeze,
|
40
|
+
|
41
|
+
# For Mastercard, retry after 1 hour.
|
42
|
+
PAYMENTADVICE_24 = '24'.freeze,
|
43
|
+
|
44
|
+
# For Mastercard, retry after 24 hours.
|
45
|
+
PAYMENTADVICE_25 = '25'.freeze,
|
46
|
+
|
47
|
+
# For Mastercard, retry after 2 days.
|
48
|
+
PAYMENTADVICE_26 = '26'.freeze,
|
49
|
+
|
50
|
+
# For Mastercard, retry after 4 days.
|
51
|
+
PAYMENTADVICE_27 = '27'.freeze,
|
52
|
+
|
53
|
+
# For Mastercard, retry after 6 days.
|
54
|
+
PAYMENTADVICE_28 = '28'.freeze,
|
55
|
+
|
56
|
+
# For Mastercard, retry after 8 days.
|
57
|
+
PAYMENTADVICE_29 = '29'.freeze,
|
58
|
+
|
59
|
+
# For Mastercard, retry after 10 days .
|
60
|
+
PAYMENTADVICE_30 = '30'.freeze,
|
61
|
+
|
62
|
+
# For Mastercard, consumer non-reloadable prepaid card.
|
63
|
+
PAYMENTADVICE_40 = '40'.freeze,
|
64
|
+
|
65
|
+
# For Mastercard, consumer multi-use virtual card number.
|
66
|
+
PAYMENTADVICE_43 = '43'.freeze
|
22
67
|
].freeze
|
23
68
|
|
24
69
|
def self.validate(value)
|
@@ -51,9 +51,8 @@ module PaypalServerSdk
|
|
51
51
|
|
52
52
|
# The date and time, in [Internet date and time
|
53
53
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
54
|
-
# required while fractional seconds are
|
55
|
-
#
|
56
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
54
|
+
# required while fractional seconds are optional. Note: The regular
|
55
|
+
# expression provides guidance but does not reject all invalid dates.
|
57
56
|
# @return [String]
|
58
57
|
attr_accessor :expiration_time
|
59
58
|
|
@@ -64,17 +63,15 @@ module PaypalServerSdk
|
|
64
63
|
|
65
64
|
# The date and time, in [Internet date and time
|
66
65
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
67
|
-
# required while fractional seconds are
|
68
|
-
#
|
69
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
66
|
+
# required while fractional seconds are optional. Note: The regular
|
67
|
+
# expression provides guidance but does not reject all invalid dates.
|
70
68
|
# @return [String]
|
71
69
|
attr_accessor :create_time
|
72
70
|
|
73
71
|
# The date and time, in [Internet date and time
|
74
72
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
75
|
-
# required while fractional seconds are
|
76
|
-
#
|
77
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
73
|
+
# required while fractional seconds are optional. Note: The regular
|
74
|
+
# expression provides guidance but does not reject all invalid dates.
|
78
75
|
# @return [String]
|
79
76
|
attr_accessor :update_time
|
80
77
|
|
@@ -84,7 +81,7 @@ module PaypalServerSdk
|
|
84
81
|
|
85
82
|
# The details for the merchant who receives the funds and fulfills the
|
86
83
|
# order. The merchant is also known as the payee.
|
87
|
-
# @return [
|
84
|
+
# @return [PayeeBase]
|
88
85
|
attr_accessor :payee
|
89
86
|
|
90
87
|
# A mapping from model property names to API property names.
|
@@ -190,7 +187,7 @@ module PaypalServerSdk
|
|
190
187
|
update_time = hash.key?('update_time') ? hash['update_time'] : SKIP
|
191
188
|
supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if
|
192
189
|
hash['supplementary_data']
|
193
|
-
payee =
|
190
|
+
payee = PayeeBase.from_hash(hash['payee']) if hash['payee']
|
194
191
|
|
195
192
|
# Create object from extracted values.
|
196
193
|
PaymentAuthorization.new(status: status,
|
@@ -208,5 +205,29 @@ module PaypalServerSdk
|
|
208
205
|
supplementary_data: supplementary_data,
|
209
206
|
payee: payee)
|
210
207
|
end
|
208
|
+
|
209
|
+
# Provides a human-readable string representation of the object.
|
210
|
+
def to_s
|
211
|
+
class_name = self.class.name.split('::').last
|
212
|
+
"<#{class_name} status: #{@status}, status_details: #{@status_details}, id: #{@id}, amount:"\
|
213
|
+
" #{@amount}, invoice_id: #{@invoice_id}, custom_id: #{@custom_id},"\
|
214
|
+
" network_transaction_reference: #{@network_transaction_reference}, seller_protection:"\
|
215
|
+
" #{@seller_protection}, expiration_time: #{@expiration_time}, links: #{@links},"\
|
216
|
+
" create_time: #{@create_time}, update_time: #{@update_time}, supplementary_data:"\
|
217
|
+
" #{@supplementary_data}, payee: #{@payee}>"
|
218
|
+
end
|
219
|
+
|
220
|
+
# Provides a debugging-friendly string with detailed object information.
|
221
|
+
def inspect
|
222
|
+
class_name = self.class.name.split('::').last
|
223
|
+
"<#{class_name} status: #{@status.inspect}, status_details: #{@status_details.inspect}, id:"\
|
224
|
+
" #{@id.inspect}, amount: #{@amount.inspect}, invoice_id: #{@invoice_id.inspect}, custom_id:"\
|
225
|
+
" #{@custom_id.inspect}, network_transaction_reference:"\
|
226
|
+
" #{@network_transaction_reference.inspect}, seller_protection:"\
|
227
|
+
" #{@seller_protection.inspect}, expiration_time: #{@expiration_time.inspect}, links:"\
|
228
|
+
" #{@links.inspect}, create_time: #{@create_time.inspect}, update_time:"\
|
229
|
+
" #{@update_time.inspect}, supplementary_data: #{@supplementary_data.inspect}, payee:"\
|
230
|
+
" #{@payee.inspect}>"
|
231
|
+
end
|
211
232
|
end
|
212
233
|
end
|
@@ -17,7 +17,7 @@ module PaypalServerSdk
|
|
17
17
|
|
18
18
|
# An array of captured payments for a purchase unit. A purchase unit can
|
19
19
|
# have zero or more captured payments.
|
20
|
-
# @return [Array[
|
20
|
+
# @return [Array[OrdersCapture]]
|
21
21
|
attr_accessor :captures
|
22
22
|
|
23
23
|
# An array of refunds for a purchase unit. A purchase unit can have zero or
|
@@ -74,7 +74,7 @@ module PaypalServerSdk
|
|
74
74
|
unless hash['captures'].nil?
|
75
75
|
captures = []
|
76
76
|
hash['captures'].each do |structure|
|
77
|
-
captures << (
|
77
|
+
captures << (OrdersCapture.from_hash(structure) if structure)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -95,5 +95,19 @@ module PaypalServerSdk
|
|
95
95
|
captures: captures,
|
96
96
|
refunds: refunds)
|
97
97
|
end
|
98
|
+
|
99
|
+
# Provides a human-readable string representation of the object.
|
100
|
+
def to_s
|
101
|
+
class_name = self.class.name.split('::').last
|
102
|
+
"<#{class_name} authorizations: #{@authorizations}, captures: #{@captures}, refunds:"\
|
103
|
+
" #{@refunds}>"
|
104
|
+
end
|
105
|
+
|
106
|
+
# Provides a debugging-friendly string with detailed object information.
|
107
|
+
def inspect
|
108
|
+
class_name = self.class.name.split('::').last
|
109
|
+
"<#{class_name} authorizations: #{@authorizations.inspect}, captures: #{@captures.inspect},"\
|
110
|
+
" refunds: #{@refunds.inspect}>"
|
111
|
+
end
|
98
112
|
end
|
99
113
|
end
|
@@ -7,10 +7,13 @@ module PaypalServerSdk
|
|
7
7
|
# The person or party who initiated or triggered the payment.
|
8
8
|
class PaymentInitiator
|
9
9
|
PAYMENT_INITIATOR = [
|
10
|
-
#
|
10
|
+
# Payment is initiated with the active engagement of the customer. e.g. a
|
11
|
+
# customer checking out on a merchant website.
|
11
12
|
CUSTOMER = 'CUSTOMER'.freeze,
|
12
13
|
|
13
|
-
#
|
14
|
+
# Payment is initiated by merchant on behalf of the customer without the
|
15
|
+
# active engagement of customer. e.g. a merchant charging the monthly
|
16
|
+
# payment of a subscription to the customer.
|
14
17
|
MERCHANT = 'MERCHANT'.freeze
|
15
18
|
].freeze
|
16
19
|
|
@@ -101,5 +101,21 @@ module PaypalServerSdk
|
|
101
101
|
payee_pricing_tier_id: payee_pricing_tier_id,
|
102
102
|
payee_receivable_fx_rate_id: payee_receivable_fx_rate_id)
|
103
103
|
end
|
104
|
+
|
105
|
+
# Provides a human-readable string representation of the object.
|
106
|
+
def to_s
|
107
|
+
class_name = self.class.name.split('::').last
|
108
|
+
"<#{class_name} platform_fees: #{@platform_fees}, disbursement_mode: #{@disbursement_mode},"\
|
109
|
+
" payee_pricing_tier_id: #{@payee_pricing_tier_id}, payee_receivable_fx_rate_id:"\
|
110
|
+
" #{@payee_receivable_fx_rate_id}>"
|
111
|
+
end
|
112
|
+
|
113
|
+
# Provides a debugging-friendly string with detailed object information.
|
114
|
+
def inspect
|
115
|
+
class_name = self.class.name.split('::').last
|
116
|
+
"<#{class_name} platform_fees: #{@platform_fees.inspect}, disbursement_mode:"\
|
117
|
+
" #{@disbursement_mode.inspect}, payee_pricing_tier_id: #{@payee_pricing_tier_id.inspect},"\
|
118
|
+
" payee_receivable_fx_rate_id: #{@payee_receivable_fx_rate_id.inspect}>"
|
119
|
+
end
|
104
120
|
end
|
105
121
|
end
|
@@ -68,5 +68,19 @@ module PaypalServerSdk
|
|
68
68
|
PaymentMethodPreference.new(payee_preferred: payee_preferred,
|
69
69
|
standard_entry_class_code: standard_entry_class_code)
|
70
70
|
end
|
71
|
+
|
72
|
+
# Provides a human-readable string representation of the object.
|
73
|
+
def to_s
|
74
|
+
class_name = self.class.name.split('::').last
|
75
|
+
"<#{class_name} payee_preferred: #{@payee_preferred}, standard_entry_class_code:"\
|
76
|
+
" #{@standard_entry_class_code}>"
|
77
|
+
end
|
78
|
+
|
79
|
+
# Provides a debugging-friendly string with detailed object information.
|
80
|
+
def inspect
|
81
|
+
class_name = self.class.name.split('::').last
|
82
|
+
"<#{class_name} payee_preferred: #{@payee_preferred.inspect}, standard_entry_class_code:"\
|
83
|
+
" #{@standard_entry_class_code.inspect}>"
|
84
|
+
end
|
71
85
|
end
|
72
86
|
end
|
@@ -9,15 +9,11 @@ module PaypalServerSdk
|
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
|
-
# The payment card to use to fund a payment. Can be a credit or debit
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
# which you do not have to take on the <strong>PCI SAQ D</strong> burden by
|
18
|
-
# using hosted fields - refer to <a
|
19
|
-
# href="https://developer.paypal.com/docs/checkout/advanced/integrate/">this
|
20
|
-
# Integration Guide</a>*.</blockquote>
|
12
|
+
# The payment card to use to fund a payment. Can be a credit or debit card.
|
13
|
+
# Note: Passing card number, cvv and expiry directly via the API requires
|
14
|
+
# PCI SAQ D compliance. *PayPal offers a mechanism by which you do not have
|
15
|
+
# to take on the PCI SAQ D burden by using hosted fields - refer to this
|
16
|
+
# Integration Guide*.
|
21
17
|
# @return [CardRequest]
|
22
18
|
attr_accessor :card
|
23
19
|
|
@@ -183,5 +179,25 @@ module PaypalServerSdk
|
|
183
179
|
google_pay: google_pay,
|
184
180
|
venmo: venmo)
|
185
181
|
end
|
182
|
+
|
183
|
+
# Provides a human-readable string representation of the object.
|
184
|
+
def to_s
|
185
|
+
class_name = self.class.name.split('::').last
|
186
|
+
"<#{class_name} card: #{@card}, token: #{@token}, paypal: #{@paypal}, bancontact:"\
|
187
|
+
" #{@bancontact}, blik: #{@blik}, eps: #{@eps}, giropay: #{@giropay}, ideal: #{@ideal},"\
|
188
|
+
" mybank: #{@mybank}, p24: #{@p24}, sofort: #{@sofort}, trustly: #{@trustly}, apple_pay:"\
|
189
|
+
" #{@apple_pay}, google_pay: #{@google_pay}, venmo: #{@venmo}>"
|
190
|
+
end
|
191
|
+
|
192
|
+
# Provides a debugging-friendly string with detailed object information.
|
193
|
+
def inspect
|
194
|
+
class_name = self.class.name.split('::').last
|
195
|
+
"<#{class_name} card: #{@card.inspect}, token: #{@token.inspect}, paypal:"\
|
196
|
+
" #{@paypal.inspect}, bancontact: #{@bancontact.inspect}, blik: #{@blik.inspect}, eps:"\
|
197
|
+
" #{@eps.inspect}, giropay: #{@giropay.inspect}, ideal: #{@ideal.inspect}, mybank:"\
|
198
|
+
" #{@mybank.inspect}, p24: #{@p24.inspect}, sofort: #{@sofort.inspect}, trustly:"\
|
199
|
+
" #{@trustly.inspect}, apple_pay: #{@apple_pay.inspect}, google_pay: #{@google_pay.inspect},"\
|
200
|
+
" venmo: #{@venmo.inspect}>"
|
201
|
+
end
|
186
202
|
end
|
187
203
|
end
|