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
@@ -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
|
|
@@ -100,5 +96,20 @@ module PaypalServerSdk
|
|
100
96
|
google_pay: google_pay,
|
101
97
|
venmo: venmo)
|
102
98
|
end
|
99
|
+
|
100
|
+
# Provides a human-readable string representation of the object.
|
101
|
+
def to_s
|
102
|
+
class_name = self.class.name.split('::').last
|
103
|
+
"<#{class_name} card: #{@card}, token: #{@token}, paypal: #{@paypal}, apple_pay:"\
|
104
|
+
" #{@apple_pay}, google_pay: #{@google_pay}, venmo: #{@venmo}>"
|
105
|
+
end
|
106
|
+
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
108
|
+
def inspect
|
109
|
+
class_name = self.class.name.split('::').last
|
110
|
+
"<#{class_name} card: #{@card.inspect}, token: #{@token.inspect}, paypal:"\
|
111
|
+
" #{@paypal.inspect}, apple_pay: #{@apple_pay.inspect}, google_pay: #{@google_pay.inspect},"\
|
112
|
+
" venmo: #{@venmo.inspect}>"
|
113
|
+
end
|
103
114
|
end
|
104
115
|
end
|
@@ -11,17 +11,15 @@ module PaypalServerSdk
|
|
11
11
|
|
12
12
|
# The date and time, in [Internet date and time
|
13
13
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
14
|
-
# required while fractional seconds are
|
15
|
-
#
|
16
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
14
|
+
# required while fractional seconds are optional. Note: The regular
|
15
|
+
# expression provides guidance but does not reject all invalid dates.
|
17
16
|
# @return [String]
|
18
17
|
attr_accessor :create_time
|
19
18
|
|
20
19
|
# The date and time, in [Internet date and time
|
21
20
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
22
|
-
# required while fractional seconds are
|
23
|
-
#
|
24
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
21
|
+
# required while fractional seconds are optional. Note: The regular
|
22
|
+
# expression provides guidance but does not reject all invalid dates.
|
25
23
|
# @return [String]
|
26
24
|
attr_accessor :update_time
|
27
25
|
|
@@ -38,11 +36,8 @@ module PaypalServerSdk
|
|
38
36
|
# @return [CheckoutPaymentIntent]
|
39
37
|
attr_accessor :intent
|
40
38
|
|
41
|
-
# The
|
42
|
-
#
|
43
|
-
attr_accessor :processing_instruction
|
44
|
-
|
45
|
-
# The instruction to process an order.
|
39
|
+
# The intent to either capture payment immediately or authorize a payment
|
40
|
+
# for an order after order creation.
|
46
41
|
# @return [Payer]
|
47
42
|
attr_accessor :payer
|
48
43
|
|
@@ -72,7 +67,6 @@ module PaypalServerSdk
|
|
72
67
|
@_hash['id'] = 'id'
|
73
68
|
@_hash['payment_source'] = 'payment_source'
|
74
69
|
@_hash['intent'] = 'intent'
|
75
|
-
@_hash['processing_instruction'] = 'processing_instruction'
|
76
70
|
@_hash['payer'] = 'payer'
|
77
71
|
@_hash['purchase_units'] = 'purchase_units'
|
78
72
|
@_hash['status'] = 'status'
|
@@ -88,7 +82,6 @@ module PaypalServerSdk
|
|
88
82
|
id
|
89
83
|
payment_source
|
90
84
|
intent
|
91
|
-
processing_instruction
|
92
85
|
payer
|
93
86
|
purchase_units
|
94
87
|
status
|
@@ -101,18 +94,14 @@ module PaypalServerSdk
|
|
101
94
|
[]
|
102
95
|
end
|
103
96
|
|
104
|
-
def initialize(
|
105
|
-
|
106
|
-
|
107
|
-
processing_instruction: ProcessingInstruction::NO_INSTRUCTION,
|
108
|
-
payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP
|
109
|
-
)
|
97
|
+
def initialize(create_time: SKIP, update_time: SKIP, id: SKIP,
|
98
|
+
payment_source: SKIP, intent: SKIP, payer: SKIP,
|
99
|
+
purchase_units: SKIP, status: SKIP, links: SKIP)
|
110
100
|
@create_time = create_time unless create_time == SKIP
|
111
101
|
@update_time = update_time unless update_time == SKIP
|
112
102
|
@id = id unless id == SKIP
|
113
103
|
@payment_source = payment_source unless payment_source == SKIP
|
114
104
|
@intent = intent unless intent == SKIP
|
115
|
-
@processing_instruction = processing_instruction unless processing_instruction == SKIP
|
116
105
|
@payer = payer unless payer == SKIP
|
117
106
|
@purchase_units = purchase_units unless purchase_units == SKIP
|
118
107
|
@status = status unless status == SKIP
|
@@ -130,8 +119,6 @@ module PaypalServerSdk
|
|
130
119
|
payment_source = OrderAuthorizeResponsePaymentSource.from_hash(hash['payment_source']) if
|
131
120
|
hash['payment_source']
|
132
121
|
intent = hash.key?('intent') ? hash['intent'] : SKIP
|
133
|
-
processing_instruction =
|
134
|
-
hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION
|
135
122
|
payer = Payer.from_hash(hash['payer']) if hash['payer']
|
136
123
|
# Parameter is an array, so we need to iterate through it
|
137
124
|
purchase_units = nil
|
@@ -161,11 +148,27 @@ module PaypalServerSdk
|
|
161
148
|
id: id,
|
162
149
|
payment_source: payment_source,
|
163
150
|
intent: intent,
|
164
|
-
processing_instruction: processing_instruction,
|
165
151
|
payer: payer,
|
166
152
|
purchase_units: purchase_units,
|
167
153
|
status: status,
|
168
154
|
links: links)
|
169
155
|
end
|
156
|
+
|
157
|
+
# Provides a human-readable string representation of the object.
|
158
|
+
def to_s
|
159
|
+
class_name = self.class.name.split('::').last
|
160
|
+
"<#{class_name} create_time: #{@create_time}, update_time: #{@update_time}, id: #{@id},"\
|
161
|
+
" payment_source: #{@payment_source}, intent: #{@intent}, payer: #{@payer}, purchase_units:"\
|
162
|
+
" #{@purchase_units}, status: #{@status}, links: #{@links}>"
|
163
|
+
end
|
164
|
+
|
165
|
+
# Provides a debugging-friendly string with detailed object information.
|
166
|
+
def inspect
|
167
|
+
class_name = self.class.name.split('::').last
|
168
|
+
"<#{class_name} create_time: #{@create_time.inspect}, update_time: #{@update_time.inspect},"\
|
169
|
+
" id: #{@id.inspect}, payment_source: #{@payment_source.inspect}, intent:"\
|
170
|
+
" #{@intent.inspect}, payer: #{@payer.inspect}, purchase_units: #{@purchase_units.inspect},"\
|
171
|
+
" status: #{@status.inspect}, links: #{@links.inspect}>"
|
172
|
+
end
|
170
173
|
end
|
171
174
|
end
|
@@ -84,5 +84,19 @@ module PaypalServerSdk
|
|
84
84
|
google_pay: google_pay,
|
85
85
|
venmo: venmo)
|
86
86
|
end
|
87
|
+
|
88
|
+
# Provides a human-readable string representation of the object.
|
89
|
+
def to_s
|
90
|
+
class_name = self.class.name.split('::').last
|
91
|
+
"<#{class_name} card: #{@card}, paypal: #{@paypal}, apple_pay: #{@apple_pay}, google_pay:"\
|
92
|
+
" #{@google_pay}, venmo: #{@venmo}>"
|
93
|
+
end
|
94
|
+
|
95
|
+
# Provides a debugging-friendly string with detailed object information.
|
96
|
+
def inspect
|
97
|
+
class_name = self.class.name.split('::').last
|
98
|
+
"<#{class_name} card: #{@card.inspect}, paypal: #{@paypal.inspect}, apple_pay:"\
|
99
|
+
" #{@apple_pay.inspect}, google_pay: #{@google_pay.inspect}, venmo: #{@venmo.inspect}>"
|
100
|
+
end
|
87
101
|
end
|
88
102
|
end
|
@@ -47,5 +47,17 @@ module PaypalServerSdk
|
|
47
47
|
# Create object from extracted values.
|
48
48
|
OrderCaptureRequest.new(payment_source: payment_source)
|
49
49
|
end
|
50
|
+
|
51
|
+
# Provides a human-readable string representation of the object.
|
52
|
+
def to_s
|
53
|
+
class_name = self.class.name.split('::').last
|
54
|
+
"<#{class_name} payment_source: #{@payment_source}>"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Provides a debugging-friendly string with detailed object information.
|
58
|
+
def inspect
|
59
|
+
class_name = self.class.name.split('::').last
|
60
|
+
"<#{class_name} payment_source: #{@payment_source.inspect}>"
|
61
|
+
end
|
50
62
|
end
|
51
63
|
end
|
@@ -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
|
|
@@ -100,5 +96,20 @@ module PaypalServerSdk
|
|
100
96
|
google_pay: google_pay,
|
101
97
|
venmo: venmo)
|
102
98
|
end
|
99
|
+
|
100
|
+
# Provides a human-readable string representation of the object.
|
101
|
+
def to_s
|
102
|
+
class_name = self.class.name.split('::').last
|
103
|
+
"<#{class_name} card: #{@card}, token: #{@token}, paypal: #{@paypal}, apple_pay:"\
|
104
|
+
" #{@apple_pay}, google_pay: #{@google_pay}, venmo: #{@venmo}>"
|
105
|
+
end
|
106
|
+
|
107
|
+
# Provides a debugging-friendly string with detailed object information.
|
108
|
+
def inspect
|
109
|
+
class_name = self.class.name.split('::').last
|
110
|
+
"<#{class_name} card: #{@card.inspect}, token: #{@token.inspect}, paypal:"\
|
111
|
+
" #{@paypal.inspect}, apple_pay: #{@apple_pay.inspect}, google_pay: #{@google_pay.inspect},"\
|
112
|
+
" venmo: #{@venmo.inspect}>"
|
113
|
+
end
|
103
114
|
end
|
104
115
|
end
|
@@ -37,16 +37,14 @@ module PaypalServerSdk
|
|
37
37
|
|
38
38
|
# Provides additional details to process a payment using a `payment_source`
|
39
39
|
# that has been stored or is intended to be stored (also referred to as
|
40
|
-
# stored_credential or card-on-file)
|
41
|
-
#
|
42
|
-
# `payment_initiator=CUSTOMER
|
43
|
-
#
|
44
|
-
# `payment_initiator=CUSTOMER`.</li><li>`previous_transaction_reference` or
|
40
|
+
# stored_credential or card-on-file). Parameter compatibility:
|
41
|
+
# `payment_type=ONE_TIME` is compatible only with
|
42
|
+
# `payment_initiator=CUSTOMER`. `usage=FIRST` is compatible only with
|
43
|
+
# `payment_initiator=CUSTOMER`. `previous_transaction_reference` or
|
45
44
|
# `previous_network_transaction_reference` is compatible only with
|
46
|
-
# `payment_initiator=MERCHANT
|
45
|
+
# `payment_initiator=MERCHANT`. Only one of the parameters -
|
47
46
|
# `previous_transaction_reference` and
|
48
|
-
# `previous_network_transaction_reference` - can be present in the
|
49
|
-
# request.</li></ul>
|
47
|
+
# `previous_network_transaction_reference` - can be present in the request.
|
50
48
|
# @return [StoredPaymentSource]
|
51
49
|
attr_accessor :stored_payment_source
|
52
50
|
|
@@ -105,5 +103,20 @@ module PaypalServerSdk
|
|
105
103
|
cancel_url: cancel_url,
|
106
104
|
stored_payment_source: stored_payment_source)
|
107
105
|
end
|
106
|
+
|
107
|
+
# Provides a human-readable string representation of the object.
|
108
|
+
def to_s
|
109
|
+
class_name = self.class.name.split('::').last
|
110
|
+
"<#{class_name} brand_name: #{@brand_name}, locale: #{@locale}, return_url: #{@return_url},"\
|
111
|
+
" cancel_url: #{@cancel_url}, stored_payment_source: #{@stored_payment_source}>"
|
112
|
+
end
|
113
|
+
|
114
|
+
# Provides a debugging-friendly string with detailed object information.
|
115
|
+
def inspect
|
116
|
+
class_name = self.class.name.split('::').last
|
117
|
+
"<#{class_name} brand_name: #{@brand_name.inspect}, locale: #{@locale.inspect}, return_url:"\
|
118
|
+
" #{@return_url.inspect}, cancel_url: #{@cancel_url.inspect}, stored_payment_source:"\
|
119
|
+
" #{@stored_payment_source.inspect}>"
|
120
|
+
end
|
108
121
|
end
|
109
122
|
end
|
@@ -30,10 +30,9 @@ module PaypalServerSdk
|
|
30
30
|
attr_accessor :payment_source
|
31
31
|
|
32
32
|
# Customizes the payer experience during the approval process for the
|
33
|
-
# payment with PayPal
|
34
|
-
#
|
35
|
-
#
|
36
|
-
# overrides the request values.</blockquote>
|
33
|
+
# payment with PayPal. Note: Partners and Marketplaces might configure
|
34
|
+
# brand_name and shipping_preference during partner account setup, which
|
35
|
+
# overrides the request values.
|
37
36
|
# @return [OrderApplicationContext]
|
38
37
|
attr_accessor :application_context
|
39
38
|
|
@@ -99,5 +98,20 @@ module PaypalServerSdk
|
|
99
98
|
payment_source: payment_source,
|
100
99
|
application_context: application_context)
|
101
100
|
end
|
101
|
+
|
102
|
+
# Provides a human-readable string representation of the object.
|
103
|
+
def to_s
|
104
|
+
class_name = self.class.name.split('::').last
|
105
|
+
"<#{class_name} intent: #{@intent}, payer: #{@payer}, purchase_units: #{@purchase_units},"\
|
106
|
+
" payment_source: #{@payment_source}, application_context: #{@application_context}>"
|
107
|
+
end
|
108
|
+
|
109
|
+
# Provides a debugging-friendly string with detailed object information.
|
110
|
+
def inspect
|
111
|
+
class_name = self.class.name.split('::').last
|
112
|
+
"<#{class_name} intent: #{@intent.inspect}, payer: #{@payer.inspect}, purchase_units:"\
|
113
|
+
" #{@purchase_units.inspect}, payment_source: #{@payment_source.inspect},"\
|
114
|
+
" application_context: #{@application_context.inspect}>"
|
115
|
+
end
|
102
116
|
end
|
103
117
|
end
|
@@ -7,22 +7,35 @@ module PaypalServerSdk
|
|
7
7
|
# The order status.
|
8
8
|
class OrderStatus
|
9
9
|
ORDER_STATUS = [
|
10
|
-
#
|
10
|
+
# The order was created with the specified context.
|
11
11
|
CREATED = 'CREATED'.freeze,
|
12
12
|
|
13
|
-
#
|
13
|
+
# The order was saved and persisted. The order status continues to be in
|
14
|
+
# progress until a capture is made with final_capture = true for all
|
15
|
+
# purchase units within the order.
|
14
16
|
SAVED = 'SAVED'.freeze,
|
15
17
|
|
16
|
-
#
|
18
|
+
# The customer approved the payment through the PayPal wallet or another
|
19
|
+
# form of guest or unbranded payment. For example, a card, bank account,
|
20
|
+
# or so on.
|
17
21
|
APPROVED = 'APPROVED'.freeze,
|
18
22
|
|
19
|
-
#
|
23
|
+
# All purchase units in the order are voided.
|
20
24
|
VOIDED = 'VOIDED'.freeze,
|
21
25
|
|
22
|
-
#
|
26
|
+
# The intent of the Order was completed and a `payments` resource was
|
27
|
+
# created. A completed Order may have authorized a payment, captured an
|
28
|
+
# authorized payment, or in some cases, the payment may have been
|
29
|
+
# declined. Please verify the payment status under
|
30
|
+
# purchase_unitsArray.payments before proceeding with Order fulfillment.
|
23
31
|
COMPLETED = 'COMPLETED'.freeze,
|
24
32
|
|
25
|
-
#
|
33
|
+
# The order requires an action from the payer (e.g. 3DS authentication).
|
34
|
+
# Redirect the payer to the "rel":"payer-action" HATEOAS link returned as
|
35
|
+
# part of the response prior to authorizing or capturing the order. Some
|
36
|
+
# payment sources may not return a payer-action HATEOAS link (eg. MB WAY).
|
37
|
+
# For these payment sources the payer-action is managed by the scheme
|
38
|
+
# itself (eg. through SMS, email, in-app notification, etc).
|
26
39
|
PAYER_ACTION_REQUIRED = 'PAYER_ACTION_REQUIRED'.freeze
|
27
40
|
].freeze
|
28
41
|
|
@@ -95,5 +95,20 @@ module PaypalServerSdk
|
|
95
95
|
image_url: image_url,
|
96
96
|
upc: upc)
|
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} name: #{@name}, quantity: #{@quantity}, sku: #{@sku}, url: #{@url},"\
|
103
|
+
" image_url: #{@image_url}, upc: #{@upc}>"
|
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} name: #{@name.inspect}, quantity: #{@quantity.inspect}, sku:"\
|
110
|
+
" #{@sku.inspect}, url: #{@url.inspect}, image_url: #{@image_url.inspect}, upc:"\
|
111
|
+
" #{@upc.inspect}>"
|
112
|
+
end
|
98
113
|
end
|
99
114
|
end
|
@@ -19,8 +19,7 @@ module PaypalServerSdk
|
|
19
19
|
# your country. If the carrier is not available for your country, choose the
|
20
20
|
# global version of the carrier. If your carrier name is not in the list,
|
21
21
|
# set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For
|
22
|
-
# allowed values, see
|
23
|
-
# href="/docs/tracking/reference/carriers/">Carriers</a>.
|
22
|
+
# allowed values, see Carriers.
|
24
23
|
# @return [ShipmentCarrier]
|
25
24
|
attr_accessor :carrier
|
26
25
|
|
@@ -33,9 +32,11 @@ module PaypalServerSdk
|
|
33
32
|
# @return [String]
|
34
33
|
attr_accessor :capture_id
|
35
34
|
|
36
|
-
# If true,
|
37
|
-
# transaction. The email contains the tracking
|
38
|
-
#
|
35
|
+
# If true, PayPal will send an email notification to the payer of the PayPal
|
36
|
+
# transaction. The email contains the tracking details provided through the
|
37
|
+
# Orders tracking API request. Independent of any value passed for
|
38
|
+
# `notify_payer`, the payer may receive tracking notifications within the
|
39
|
+
# PayPal app, based on the user's notification preferences.
|
39
40
|
# @return [TrueClass | FalseClass]
|
40
41
|
attr_accessor :notify_payer
|
41
42
|
|
@@ -112,5 +113,21 @@ module PaypalServerSdk
|
|
112
113
|
notify_payer: notify_payer,
|
113
114
|
items: items)
|
114
115
|
end
|
116
|
+
|
117
|
+
# Provides a human-readable string representation of the object.
|
118
|
+
def to_s
|
119
|
+
class_name = self.class.name.split('::').last
|
120
|
+
"<#{class_name} tracking_number: #{@tracking_number}, carrier: #{@carrier},"\
|
121
|
+
" carrier_name_other: #{@carrier_name_other}, capture_id: #{@capture_id}, notify_payer:"\
|
122
|
+
" #{@notify_payer}, items: #{@items}>"
|
123
|
+
end
|
124
|
+
|
125
|
+
# Provides a debugging-friendly string with detailed object information.
|
126
|
+
def inspect
|
127
|
+
class_name = self.class.name.split('::').last
|
128
|
+
"<#{class_name} tracking_number: #{@tracking_number.inspect}, carrier: #{@carrier.inspect},"\
|
129
|
+
" carrier_name_other: #{@carrier_name_other.inspect}, capture_id: #{@capture_id.inspect},"\
|
130
|
+
" notify_payer: #{@notify_payer.inspect}, items: #{@items.inspect}>"
|
131
|
+
end
|
115
132
|
end
|
116
133
|
end
|
@@ -27,17 +27,15 @@ module PaypalServerSdk
|
|
27
27
|
|
28
28
|
# The date and time, in [Internet date and time
|
29
29
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
30
|
-
# required while fractional seconds are
|
31
|
-
#
|
32
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
30
|
+
# required while fractional seconds are optional. Note: The regular
|
31
|
+
# expression provides guidance but does not reject all invalid dates.
|
33
32
|
# @return [String]
|
34
33
|
attr_accessor :create_time
|
35
34
|
|
36
35
|
# The date and time, in [Internet date and time
|
37
36
|
# format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
|
38
|
-
# required while fractional seconds are
|
39
|
-
#
|
40
|
-
# provides guidance but does not reject all invalid dates.</blockquote>
|
37
|
+
# required while fractional seconds are optional. Note: The regular
|
38
|
+
# expression provides guidance but does not reject all invalid dates.
|
41
39
|
# @return [String]
|
42
40
|
attr_accessor :update_time
|
43
41
|
|
@@ -118,5 +116,20 @@ module PaypalServerSdk
|
|
118
116
|
create_time: create_time,
|
119
117
|
update_time: update_time)
|
120
118
|
end
|
119
|
+
|
120
|
+
# Provides a human-readable string representation of the object.
|
121
|
+
def to_s
|
122
|
+
class_name = self.class.name.split('::').last
|
123
|
+
"<#{class_name} id: #{@id}, status: #{@status}, items: #{@items}, links: #{@links},"\
|
124
|
+
" create_time: #{@create_time}, update_time: #{@update_time}>"
|
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} id: #{@id.inspect}, status: #{@status.inspect}, items: #{@items.inspect},"\
|
131
|
+
" links: #{@links.inspect}, create_time: #{@create_time.inspect}, update_time:"\
|
132
|
+
" #{@update_time.inspect}>"
|
133
|
+
end
|
121
134
|
end
|
122
135
|
end
|
@@ -7,10 +7,13 @@ module PaypalServerSdk
|
|
7
7
|
# The status of the item shipment.
|
8
8
|
class OrderTrackerStatus
|
9
9
|
ORDER_TRACKER_STATUS = [
|
10
|
-
#
|
10
|
+
# The shipment was cancelled and the tracking number no longer applies.
|
11
11
|
CANCELLED = 'CANCELLED'.freeze,
|
12
12
|
|
13
|
-
#
|
13
|
+
# The merchant has assigned a tracking number to the items being shipped
|
14
|
+
# from the Order. This does not correspond to the carrier's actual status
|
15
|
+
# for the shipment. The latest status of the parcel must be retrieved from
|
16
|
+
# the carrier.
|
14
17
|
SHIPPED = 'SHIPPED'.freeze
|
15
18
|
].freeze
|
16
19
|
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# The error details.
|
8
|
+
class OrderUpdateCallbackErrorResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The human-readable, unique name of the error.
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :name
|
15
|
+
|
16
|
+
# The message that describes the error.
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :message
|
19
|
+
|
20
|
+
# An array of additional details about the error.
|
21
|
+
# @return [Array[OrderUpdateCallbackErrorResponseDetails]]
|
22
|
+
attr_accessor :details
|
23
|
+
|
24
|
+
# A mapping from model property names to API property names.
|
25
|
+
def self.names
|
26
|
+
@_hash = {} if @_hash.nil?
|
27
|
+
@_hash['name'] = 'name'
|
28
|
+
@_hash['message'] = 'message'
|
29
|
+
@_hash['details'] = 'details'
|
30
|
+
@_hash
|
31
|
+
end
|
32
|
+
|
33
|
+
# An array for optional fields
|
34
|
+
def self.optionals
|
35
|
+
%w[
|
36
|
+
message
|
37
|
+
details
|
38
|
+
]
|
39
|
+
end
|
40
|
+
|
41
|
+
# An array for nullable fields
|
42
|
+
def self.nullables
|
43
|
+
[]
|
44
|
+
end
|
45
|
+
|
46
|
+
def initialize(name:, message: SKIP, details: SKIP)
|
47
|
+
@name = name
|
48
|
+
@message = message unless message == SKIP
|
49
|
+
@details = details unless details == SKIP
|
50
|
+
end
|
51
|
+
|
52
|
+
# Creates an instance of the object from a hash.
|
53
|
+
def self.from_hash(hash)
|
54
|
+
return nil unless hash
|
55
|
+
|
56
|
+
# Extract variables from the hash.
|
57
|
+
name = hash.key?('name') ? hash['name'] : nil
|
58
|
+
message = hash.key?('message') ? hash['message'] : SKIP
|
59
|
+
# Parameter is an array, so we need to iterate through it
|
60
|
+
details = nil
|
61
|
+
unless hash['details'].nil?
|
62
|
+
details = []
|
63
|
+
hash['details'].each do |structure|
|
64
|
+
details << (OrderUpdateCallbackErrorResponseDetails.from_hash(structure) if structure)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
details = SKIP unless hash.key?('details')
|
69
|
+
|
70
|
+
# Create object from extracted values.
|
71
|
+
OrderUpdateCallbackErrorResponse.new(name: name,
|
72
|
+
message: message,
|
73
|
+
details: details)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Provides a human-readable string representation of the object.
|
77
|
+
def to_s
|
78
|
+
class_name = self.class.name.split('::').last
|
79
|
+
"<#{class_name} name: #{@name}, message: #{@message}, details: #{@details}>"
|
80
|
+
end
|
81
|
+
|
82
|
+
# Provides a debugging-friendly string with detailed object information.
|
83
|
+
def inspect
|
84
|
+
class_name = self.class.name.split('::').last
|
85
|
+
"<#{class_name} name: #{@name.inspect}, message: #{@message.inspect}, details:"\
|
86
|
+
" #{@details.inspect}>"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# paypal_server_sdk
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module PaypalServerSdk
|
7
|
+
# The error details. Required for client-side `4XX` errors.
|
8
|
+
class OrderUpdateCallbackErrorResponseDetails < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The field that caused the error. If this field is in the body, set this
|
13
|
+
# value to the field's JSON pointer value. Required for client-side errors.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :field
|
16
|
+
|
17
|
+
# The value of the field that caused the error.
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# The unique, fine-grained application-level error code.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :issue
|
24
|
+
|
25
|
+
# A mapping from model property names to API property names.
|
26
|
+
def self.names
|
27
|
+
@_hash = {} if @_hash.nil?
|
28
|
+
@_hash['field'] = 'field'
|
29
|
+
@_hash['value'] = 'value'
|
30
|
+
@_hash['issue'] = 'issue'
|
31
|
+
@_hash
|
32
|
+
end
|
33
|
+
|
34
|
+
# An array for optional fields
|
35
|
+
def self.optionals
|
36
|
+
%w[
|
37
|
+
field
|
38
|
+
value
|
39
|
+
]
|
40
|
+
end
|
41
|
+
|
42
|
+
# An array for nullable fields
|
43
|
+
def self.nullables
|
44
|
+
[]
|
45
|
+
end
|
46
|
+
|
47
|
+
def initialize(issue:, field: SKIP, value: SKIP)
|
48
|
+
@field = field unless field == SKIP
|
49
|
+
@value = value unless value == SKIP
|
50
|
+
@issue = issue
|
51
|
+
end
|
52
|
+
|
53
|
+
# Creates an instance of the object from a hash.
|
54
|
+
def self.from_hash(hash)
|
55
|
+
return nil unless hash
|
56
|
+
|
57
|
+
# Extract variables from the hash.
|
58
|
+
issue = hash.key?('issue') ? hash['issue'] : nil
|
59
|
+
field = hash.key?('field') ? hash['field'] : SKIP
|
60
|
+
value = hash.key?('value') ? hash['value'] : SKIP
|
61
|
+
|
62
|
+
# Create object from extracted values.
|
63
|
+
OrderUpdateCallbackErrorResponseDetails.new(issue: issue,
|
64
|
+
field: field,
|
65
|
+
value: value)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Provides a human-readable string representation of the object.
|
69
|
+
def to_s
|
70
|
+
class_name = self.class.name.split('::').last
|
71
|
+
"<#{class_name} field: #{@field}, value: #{@value}, issue: #{@issue}>"
|
72
|
+
end
|
73
|
+
|
74
|
+
# Provides a debugging-friendly string with detailed object information.
|
75
|
+
def inspect
|
76
|
+
class_name = self.class.name.split('::').last
|
77
|
+
"<#{class_name} field: #{@field.inspect}, value: #{@value.inspect}, issue:"\
|
78
|
+
" #{@issue.inspect}>"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|