paypal-server-sdk 0.6.1 → 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 +103 -148
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +94 -73
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +12 -12
- 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/{portable_postal_address_medium_grained.rb → card_response_address.rb} +43 -23
- 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 +27 -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 -12
- 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 +9 -4
- 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 +17 -3
- 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 +17 -0
- 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 +22 -19
- 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 +22 -19
- 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 +1377 -1402
- data/lib/paypal_server_sdk/models/shipping_details.rb +29 -2
- 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 +30 -2
- 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 +26 -1
- 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 +43 -14
- metadata +40 -15
- data/lib/paypal_server_sdk/models/address_details.rb +0 -160
- 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/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/token_request_type.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d728414db600da5289f862a890a5ffafb916820407a3092b5eac55382469833
|
4
|
+
data.tar.gz: 6246229513d060b81a55c47c4b72d48fd5b6695779888a58491b21398cf672ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec48236567bdf38768c93ff14e5e0ffc7c205f5bd9eb7dbd846f336067e4e41af6066dfc08727136dcbc761df390a62f9ef92e3127c3244110b5cec26a8db2d7
|
7
|
+
data.tar.gz: 6fa1542864d5e73f5cc46310e097b9aafc033ca9bbe81cd87e50cc5925d1c7541ba535fddd2565d4af6641652cc1c6931da240f858fd66c98c4df6b62ab3bd6b
|
data/LICENSE
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
The PayPal Server SDK is released under the following license:
|
2
|
-
|
3
|
-
Copyright (c) 2024 PAYPAL, INC.
|
4
|
-
|
5
|
-
SDK LICENSE
|
6
|
-
|
7
|
-
NOTICE TO USER: PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement. Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
|
8
|
-
As used in this Agreement, "PayPal" means PayPal, Inc. "Software" means the software code accompanying this agreement. "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.
|
9
|
-
|
10
|
-
1. LICENSE GRANT
|
11
|
-
Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, other than perpetration of any fraud or violation of any law, statute, ordinance, or regulation (for example, those governing financial services, consumer protections, unfair competition, anti-discrimination or false advertising), provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
|
12
|
-
Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose, other than perpetration of any fraud or violation of any law, statute, ordinance, or regulation (for example, those governing financial services, consumer protections, unfair competition, anti-discrimination or false advertising). You may not modify the Documentation.
|
13
|
-
No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement. You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
|
14
|
-
Nothing in this Agreement provides you with any right, title, or license to use PayPal’s or any third party’s copyright, patent, trademark, trade secret, or other intellectual property rights, or rights of publicity or privacy, beyond the rights specifically granted herein. You may not infringe PayPal’s or any third party’s copyright, patent, trademark, trade secret, or other intellectual property rights, or rights of publicity or privacy.
|
15
|
-
If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution. You may distribute the Software in object code form under your own license, provided that your license agreement:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
2. DISCLAIMER OF WARRANTY
|
23
|
-
PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE. Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations. Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance. Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you. To the extent permissible, any implied warranties are limited to ninety (90) days.
|
24
|
-
|
25
|
-
3. LIMITATION OF LIABILITY
|
26
|
-
PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION. IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE (OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION.
|
27
|
-
|
28
|
-
4. TRADEMARK USAGE
|
29
|
-
PayPal is a trademark PayPal, Inc. in the United States and other countries. Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.
|
30
|
-
|
31
|
-
5. TERM
|
32
|
-
Your rights under this Agreement shall terminate if you fail to comply with any of the material terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable.
|
33
|
-
|
34
|
-
6. GOVERNING LAW AND JURISDICTION.
|
35
|
-
This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA.
|
2
|
+
|
3
|
+
Copyright (c) 2024 PAYPAL, INC.
|
4
|
+
|
5
|
+
SDK LICENSE
|
6
|
+
|
7
|
+
NOTICE TO USER: PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement. Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
|
8
|
+
As used in this Agreement, "PayPal" means PayPal, Inc. "Software" means the software code accompanying this agreement. "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.
|
9
|
+
|
10
|
+
1. LICENSE GRANT
|
11
|
+
Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, other than perpetration of any fraud or violation of any law, statute, ordinance, or regulation (for example, those governing financial services, consumer protections, unfair competition, anti-discrimination or false advertising), provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
|
12
|
+
Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose, other than perpetration of any fraud or violation of any law, statute, ordinance, or regulation (for example, those governing financial services, consumer protections, unfair competition, anti-discrimination or false advertising). You may not modify the Documentation.
|
13
|
+
No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement. You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
|
14
|
+
Nothing in this Agreement provides you with any right, title, or license to use PayPal’s or any third party’s copyright, patent, trademark, trade secret, or other intellectual property rights, or rights of publicity or privacy, beyond the rights specifically granted herein. You may not infringe PayPal’s or any third party’s copyright, patent, trademark, trade secret, or other intellectual property rights, or rights of publicity or privacy.
|
15
|
+
If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution. You may distribute the Software in object code form under your own license, provided that your license agreement:
|
16
|
+
(a) complies with the terms and conditions of this license agreement;
|
17
|
+
(b) effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
|
18
|
+
(c) effectively excludes all liability for damages on behalf of PayPal;
|
19
|
+
(d) states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
|
20
|
+
(e) states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
|
21
|
+
|
22
|
+
2. DISCLAIMER OF WARRANTY
|
23
|
+
PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE. Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations. Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance. Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you. To the extent permissible, any implied warranties are limited to ninety (90) days.
|
24
|
+
|
25
|
+
3. LIMITATION OF LIABILITY
|
26
|
+
PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION. IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE (OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION.
|
27
|
+
|
28
|
+
4. TRADEMARK USAGE
|
29
|
+
PayPal is a trademark PayPal, Inc. in the United States and other countries. Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.
|
30
|
+
|
31
|
+
5. TERM
|
32
|
+
Your rights under this Agreement shall terminate if you fail to comply with any of the material terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable.
|
33
|
+
|
34
|
+
6. GOVERNING LAW AND JURISDICTION.
|
35
|
+
This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA.
|
data/README.md
CHANGED
@@ -26,21 +26,21 @@ Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://d
|
|
26
26
|
|
27
27
|
Install the gem from the command line:
|
28
28
|
|
29
|
-
```
|
30
|
-
gem install paypal-server-sdk -v 0.
|
29
|
+
```bash
|
30
|
+
gem install paypal-server-sdk -v 0.7.0
|
31
31
|
```
|
32
32
|
|
33
33
|
Or add the gem to your Gemfile and run `bundle`:
|
34
34
|
|
35
35
|
```ruby
|
36
|
-
gem 'paypal-server-sdk', '0.
|
36
|
+
gem 'paypal-server-sdk', '0.7.0'
|
37
37
|
```
|
38
38
|
|
39
|
-
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/0.
|
39
|
+
For additional gem details, see the [RubyGems page for the paypal-server-sdk gem](https://rubygems.org/gems/paypal-server-sdk/versions/0.7.0).
|
40
40
|
|
41
41
|
## Initialize the API Client
|
42
42
|
|
43
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
43
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/client.md)
|
44
44
|
|
45
45
|
The following parameters are configurable for the API Client:
|
46
46
|
|
@@ -56,8 +56,8 @@ The following parameters are configurable for the API Client:
|
|
56
56
|
| `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
57
57
|
| `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
58
58
|
| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
59
|
-
| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
60
|
-
| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
59
|
+
| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
60
|
+
| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
61
61
|
|
62
62
|
The API client can be initialized as follows:
|
63
63
|
|
@@ -80,18 +80,6 @@ client = PaypalServerSdk::Client.new(
|
|
80
80
|
)
|
81
81
|
```
|
82
82
|
|
83
|
-
API calls return an `ApiResponse` object that includes the following fields:
|
84
|
-
|
85
|
-
| Field | Description |
|
86
|
-
| --- | --- |
|
87
|
-
| `status_code` | Status code of the HTTP response |
|
88
|
-
| `reason_phrase` | Reason phrase of the HTTP response |
|
89
|
-
| `headers` | Headers of the HTTP response as a Hash |
|
90
|
-
| `raw_body` | The body of the HTTP response as a String |
|
91
|
-
| `request` | HTTP request info |
|
92
|
-
| `errors` | Errors, if they exist |
|
93
|
-
| `data` | The deserialized body of the HTTP response |
|
94
|
-
|
95
83
|
## Environments
|
96
84
|
|
97
85
|
The SDK can be configured to use a different environment for making API calls. Available environments are:
|
@@ -107,21 +95,22 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
107
95
|
|
108
96
|
This API uses the following authentication schemes.
|
109
97
|
|
110
|
-
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
98
|
+
* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/auth/oauth-2-client-credentials-grant.md)
|
111
99
|
|
112
100
|
## List of APIs
|
113
101
|
|
114
|
-
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
115
|
-
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
116
|
-
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
102
|
+
* [Orders](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/controllers/orders.md)
|
103
|
+
* [Payments](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/controllers/payments.md)
|
104
|
+
* [Vault](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/controllers/vault.md)
|
117
105
|
|
118
106
|
## Classes Documentation
|
119
107
|
|
120
|
-
* [Utility Classes](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
121
|
-
* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
122
|
-
* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.
|
123
|
-
* [
|
124
|
-
* [
|
125
|
-
* [
|
126
|
-
* [
|
108
|
+
* [Utility Classes](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/utility-classes.md)
|
109
|
+
* [HttpResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/http-response.md)
|
110
|
+
* [HttpRequest](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/http-request.md)
|
111
|
+
* [ApiResponse](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/api-response.md)
|
112
|
+
* [LoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/logging-configuration.md)
|
113
|
+
* [RequestLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/request-logging-configuration.md)
|
114
|
+
* [ResponseLoggingConfiguration](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/response-logging-configuration.md)
|
115
|
+
* [Abstract Logger](https://www.github.com/paypal/PayPal-Ruby-Server-SDK/tree/0.7.0/doc/abstract-logger.md)
|
127
116
|
|
@@ -10,7 +10,7 @@ module PaypalServerSdk
|
|
10
10
|
attr_accessor :config, :http_call_back
|
11
11
|
|
12
12
|
def self.user_agent
|
13
|
-
'PayPal REST API Ruby SDK, Version: 0.
|
13
|
+
'PayPal REST API Ruby SDK, Version: 0.7.0, on OS {os-info}'
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.user_agent_parameters
|
@@ -8,15 +8,13 @@ module PaypalServerSdk
|
|
8
8
|
class OrdersController < BaseController
|
9
9
|
# Creates an order. Merchants and partners can add Level 2 and 3 data to
|
10
10
|
# payments to reduce risk and payment processing costs. For more information
|
11
|
-
# about processing payments, see
|
12
|
-
#
|
13
|
-
# ckout</a> or <a
|
14
|
-
# href="https://developer.paypal.com/docs/multiparty/checkout/advanced/proce
|
15
|
-
# ssing/">multiparty checkout</a>.<blockquote><strong>Note:</strong> For
|
16
|
-
# error handling and troubleshooting, see <a
|
17
|
-
# href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#cr
|
18
|
-
# eate-order">Orders v2 errors</a>.</blockquote>
|
11
|
+
# about processing payments, see checkout or multiparty checkout. Note: For
|
12
|
+
# error handling and troubleshooting, see Orders v2 errors.
|
19
13
|
# @param [OrderRequest] body Required parameter: Example:
|
14
|
+
# @param [String] paypal_mock_response Optional parameter: PayPal's REST API
|
15
|
+
# uses a request header to invoke negative testing in the sandbox. This
|
16
|
+
# header configures the sandbox into a negative testing state for
|
17
|
+
# transactions that include the merchant.
|
20
18
|
# @param [String] paypal_request_id Optional parameter: The server stores
|
21
19
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
22
20
|
# by speaking to their Account Manager. It is mandatory for all single-step
|
@@ -27,26 +25,23 @@ module PaypalServerSdk
|
|
27
25
|
# Example:
|
28
26
|
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
29
27
|
# @param [String] prefer Optional parameter: The preferred server response
|
30
|
-
# upon successful completion of the request. Value
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
# returns a complete resource representation, including the current state of
|
36
|
-
# the resource.</li></ul>
|
28
|
+
# upon successful completion of the request. Value is: return=minimal. The
|
29
|
+
# server returns a minimal response to optimize communication between the
|
30
|
+
# API caller and the server. A minimal response includes the id, status and
|
31
|
+
# HATEOAS links. return=representation. The server returns a complete
|
32
|
+
# resource representation, including the current state of the resource.
|
37
33
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
38
34
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
39
|
-
# merchant. For details, see
|
40
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
41
|
-
# n">PayPal-Auth-Assertion</a>.
|
35
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
42
36
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
43
|
-
def
|
37
|
+
def create_order(options = {})
|
44
38
|
new_api_call_builder
|
45
39
|
.request(new_request_builder(HttpMethodEnum::POST,
|
46
40
|
'/v2/checkout/orders',
|
47
41
|
Server::DEFAULT)
|
48
42
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
49
43
|
.body_param(new_parameter(options['body']))
|
44
|
+
.header_param(new_parameter(options['paypal_mock_response'], key: 'PayPal-Mock-Response'))
|
50
45
|
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
51
46
|
.header_param(new_parameter(options['paypal_partner_attribution_id'], key: 'PayPal-Partner-Attribution-Id'))
|
52
47
|
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
@@ -77,28 +72,29 @@ module PaypalServerSdk
|
|
77
72
|
.execute
|
78
73
|
end
|
79
74
|
|
80
|
-
# Shows details for an order, by ID
|
81
|
-
#
|
82
|
-
# href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ge
|
83
|
-
# t-order">Orders v2 errors</a>.</blockquote>
|
75
|
+
# Shows details for an order, by ID. Note: For error handling and
|
76
|
+
# troubleshooting, see Orders v2 errors.
|
84
77
|
# @param [String] id Required parameter: The ID of the order for which to
|
85
78
|
# show details.
|
79
|
+
# @param [String] paypal_mock_response Optional parameter: PayPal's REST API
|
80
|
+
# uses a request header to invoke negative testing in the sandbox. This
|
81
|
+
# header configures the sandbox into a negative testing state for
|
82
|
+
# transactions that include the merchant.
|
86
83
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
87
84
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
88
|
-
# merchant. For details, see
|
89
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
90
|
-
# n">PayPal-Auth-Assertion</a>.
|
85
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
91
86
|
# @param [String] fields Optional parameter: A comma-separated list of
|
92
87
|
# fields that should be returned for the order. Valid filter field is
|
93
88
|
# `payment_source`.
|
94
89
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
95
|
-
def
|
90
|
+
def get_order(options = {})
|
96
91
|
new_api_call_builder
|
97
92
|
.request(new_request_builder(HttpMethodEnum::GET,
|
98
93
|
'/v2/checkout/orders/{id}',
|
99
94
|
Server::DEFAULT)
|
100
95
|
.template_param(new_parameter(options['id'], key: 'id')
|
101
96
|
.should_encode(true))
|
97
|
+
.header_param(new_parameter(options['paypal_mock_response'], key: 'PayPal-Mock-Response'))
|
102
98
|
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
103
99
|
.query_param(new_parameter(options['fields'], key: 'fields'))
|
104
100
|
.header_param(new_parameter('application/json', key: 'accept'))
|
@@ -121,74 +117,47 @@ module PaypalServerSdk
|
|
121
117
|
end
|
122
118
|
|
123
119
|
# Updates an order with a `CREATED` or `APPROVED` status. You cannot update
|
124
|
-
# an order with the `COMPLETED` status
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
# .
|
152
|
-
#
|
153
|
-
#
|
154
|
-
# add</td><td></td></tr><tr><td><code>purchase_units[].shipping.phone_number
|
155
|
-
# </code></td><td>replace,
|
156
|
-
# add</td><td></td></tr><tr><td><code>purchase_units[].shipping.options</cod
|
157
|
-
# e></td><td>replace,
|
158
|
-
# add</td><td></td></tr><tr><td><code>purchase_units[].shipping.address</cod
|
159
|
-
# e></td><td>replace,
|
160
|
-
# add</td><td></td></tr><tr><td><code>purchase_units[].shipping.type</code><
|
161
|
-
# /td><td>replace,
|
162
|
-
# add</td><td></td></tr><tr><td><code>purchase_units[].soft_descriptor</code
|
163
|
-
# ></td><td>replace,
|
164
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].amount</code></td>
|
165
|
-
# <td>replace</td><td></td></tr><tr><td><code>purchase_units[].items</code><
|
166
|
-
# /td><td>replace, add,
|
167
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].invoice_id</code><
|
168
|
-
# /td><td>replace, add,
|
169
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instructio
|
170
|
-
# n</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].
|
171
|
-
# payment_instruction.disbursement_mode</code></td><td>replace</td><td>By
|
172
|
-
# default, <code>disbursement_mode</code> is
|
173
|
-
# <code>INSTANT</code>.</td></tr><tr><td><code>purchase_units[].payment_inst
|
174
|
-
# ruction.payee_receivable_fx_rate_id</code></td><td>replace, add,
|
175
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instructio
|
176
|
-
# n.platform_fees</code></td><td>replace, add,
|
177
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data
|
178
|
-
# .airline</code></td><td>replace, add,
|
179
|
-
# remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data
|
180
|
-
# .card</code></td><td>replace, add,
|
181
|
-
# remove</td><td></td></tr><tr><td><code>application_context.client_configur
|
182
|
-
# ation</code></td><td>replace, add</td><td></td></tr></tbody></table>
|
120
|
+
# an order with the `COMPLETED` status. To make an update, you must provide
|
121
|
+
# a `reference_id`. If you omit this value with an order that contains only
|
122
|
+
# one purchase unit, PayPal sets the value to `default` which enables you to
|
123
|
+
# use the path:
|
124
|
+
# \"/purchase_units/@reference_id=='default'/{attribute-or-object}\".
|
125
|
+
# Merchants and partners can add Level 2 and 3 data to payments to reduce
|
126
|
+
# risk and payment processing costs. For more information about processing
|
127
|
+
# payments, see checkout or multiparty checkout. Note: For error handling
|
128
|
+
# and troubleshooting, see Orders v2 errors. Patchable attributes or
|
129
|
+
# objects: Attribute Op Notes intent replace payer replace, add Using
|
130
|
+
# replace op for payer will replace the whole payer object with the value
|
131
|
+
# sent in request. purchase_units replace, add purchase_units[].custom_id
|
132
|
+
# replace, add, remove purchase_units[].description replace, add, remove
|
133
|
+
# purchase_units[].payee.email replace purchase_units[].shipping.name
|
134
|
+
# replace, add purchase_units[].shipping.email_address replace, add
|
135
|
+
# purchase_units[].shipping.phone_number replace, add
|
136
|
+
# purchase_units[].shipping.options replace, add
|
137
|
+
# purchase_units[].shipping.address replace, add
|
138
|
+
# purchase_units[].shipping.type replace, add
|
139
|
+
# purchase_units[].soft_descriptor replace, remove purchase_units[].amount
|
140
|
+
# replace purchase_units[].items replace, add, remove
|
141
|
+
# purchase_units[].invoice_id replace, add, remove
|
142
|
+
# purchase_units[].payment_instruction replace
|
143
|
+
# purchase_units[].payment_instruction.disbursement_mode replace By default,
|
144
|
+
# disbursement_mode is INSTANT.
|
145
|
+
# purchase_units[].payment_instruction.payee_receivable_fx_rate_id replace,
|
146
|
+
# add, remove purchase_units[].payment_instruction.platform_fees replace,
|
147
|
+
# add, remove purchase_units[].supplementary_data.airline replace, add,
|
148
|
+
# remove purchase_units[].supplementary_data.card replace, add, remove
|
149
|
+
# application_context.client_configuration replace, add
|
183
150
|
# @param [String] id Required parameter: The ID of the order to update.
|
151
|
+
# @param [String] paypal_mock_response Optional parameter: PayPal's REST API
|
152
|
+
# uses a request header to invoke negative testing in the sandbox. This
|
153
|
+
# header configures the sandbox into a negative testing state for
|
154
|
+
# transactions that include the merchant.
|
184
155
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
185
156
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
186
|
-
# merchant. For details, see
|
187
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
188
|
-
# n">PayPal-Auth-Assertion</a>.
|
157
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
189
158
|
# @param [Array[Patch]] body Optional parameter: Example:
|
190
159
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
191
|
-
def
|
160
|
+
def patch_order(options = {})
|
192
161
|
new_api_call_builder
|
193
162
|
.request(new_request_builder(HttpMethodEnum::PATCH,
|
194
163
|
'/v2/checkout/orders/{id}',
|
@@ -196,6 +165,7 @@ module PaypalServerSdk
|
|
196
165
|
.template_param(new_parameter(options['id'], key: 'id')
|
197
166
|
.should_encode(true))
|
198
167
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
168
|
+
.header_param(new_parameter(options['paypal_mock_response'], key: 'PayPal-Mock-Response'))
|
199
169
|
.header_param(new_parameter(options['paypal_auth_assertion'], key: 'PayPal-Auth-Assertion'))
|
200
170
|
.body_param(new_parameter(options['body']))
|
201
171
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
@@ -231,20 +201,16 @@ module PaypalServerSdk
|
|
231
201
|
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
232
202
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
233
203
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
234
|
-
# merchant. For details, see
|
235
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
236
|
-
# n">PayPal-Auth-Assertion</a>.
|
204
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
237
205
|
# @param [String] prefer Optional parameter: The preferred server response
|
238
|
-
# upon successful completion of the request. Value
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
# returns a complete resource representation, including the current state of
|
244
|
-
# the resource.</li></ul>
|
206
|
+
# upon successful completion of the request. Value is: return=minimal. The
|
207
|
+
# server returns a minimal response to optimize communication between the
|
208
|
+
# API caller and the server. A minimal response includes the id, status and
|
209
|
+
# HATEOAS links. return=representation. The server returns a complete
|
210
|
+
# resource representation, including the current state of the resource.
|
245
211
|
# @param [ConfirmOrderRequest] body Optional parameter: Example:
|
246
212
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
247
|
-
def
|
213
|
+
def confirm_order(options = {})
|
248
214
|
new_api_call_builder
|
249
215
|
.request(new_request_builder(HttpMethodEnum::POST,
|
250
216
|
'/v2/checkout/orders/{id}/confirm-payment-source',
|
@@ -287,12 +253,14 @@ module PaypalServerSdk
|
|
287
253
|
# order, the buyer must first approve the order or a valid payment_source
|
288
254
|
# must be provided in the request. A buyer can approve the order upon being
|
289
255
|
# redirected to the rel:approve URL that was returned in the HATEOAS links
|
290
|
-
# in the create order response
|
291
|
-
#
|
292
|
-
# href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#au
|
293
|
-
# thorize-order">Orders v2 errors</a>.</blockquote>
|
256
|
+
# in the create order response. Note: For error handling and
|
257
|
+
# troubleshooting, see Orders v2 errors.
|
294
258
|
# @param [String] id Required parameter: The ID of the order for which to
|
295
259
|
# authorize.
|
260
|
+
# @param [String] paypal_mock_response Optional parameter: PayPal's REST API
|
261
|
+
# uses a request header to invoke negative testing in the sandbox. This
|
262
|
+
# header configures the sandbox into a negative testing state for
|
263
|
+
# transactions that include the merchant.
|
296
264
|
# @param [String] paypal_request_id Optional parameter: The server stores
|
297
265
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
298
266
|
# by speaking to their Account Manager. It is mandatory for all single-step
|
@@ -300,22 +268,18 @@ module PaypalServerSdk
|
|
300
268
|
# information like Card, PayPal.vault_id, PayPal.billing_agreement_id,
|
301
269
|
# etc).
|
302
270
|
# @param [String] prefer Optional parameter: The preferred server response
|
303
|
-
# upon successful completion of the request. Value
|
304
|
-
#
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
# returns a complete resource representation, including the current state of
|
309
|
-
# the resource.</li></ul>
|
271
|
+
# upon successful completion of the request. Value is: return=minimal. The
|
272
|
+
# server returns a minimal response to optimize communication between the
|
273
|
+
# API caller and the server. A minimal response includes the id, status and
|
274
|
+
# HATEOAS links. return=representation. The server returns a complete
|
275
|
+
# resource representation, including the current state of the resource.
|
310
276
|
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
311
277
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
312
278
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
313
|
-
# merchant. For details, see
|
314
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
315
|
-
# n">PayPal-Auth-Assertion</a>.
|
279
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
316
280
|
# @param [OrderAuthorizeRequest] body Optional parameter: Example:
|
317
281
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
318
|
-
def
|
282
|
+
def authorize_order(options = {})
|
319
283
|
new_api_call_builder
|
320
284
|
.request(new_request_builder(HttpMethodEnum::POST,
|
321
285
|
'/v2/checkout/orders/{id}/authorize',
|
@@ -323,6 +287,7 @@ module PaypalServerSdk
|
|
323
287
|
.template_param(new_parameter(options['id'], key: 'id')
|
324
288
|
.should_encode(true))
|
325
289
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
290
|
+
.header_param(new_parameter(options['paypal_mock_response'], key: 'PayPal-Mock-Response'))
|
326
291
|
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
327
292
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
328
293
|
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
@@ -367,12 +332,14 @@ module PaypalServerSdk
|
|
367
332
|
# order, the buyer must first approve the order or a valid payment_source
|
368
333
|
# must be provided in the request. A buyer can approve the order upon being
|
369
334
|
# redirected to the rel:approve URL that was returned in the HATEOAS links
|
370
|
-
# in the create order response
|
371
|
-
#
|
372
|
-
# href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#ca
|
373
|
-
# pture-order">Orders v2 errors</a>.</blockquote>
|
335
|
+
# in the create order response. Note: For error handling and
|
336
|
+
# troubleshooting, see Orders v2 errors.
|
374
337
|
# @param [String] id Required parameter: The ID of the order for which to
|
375
338
|
# capture a payment.
|
339
|
+
# @param [String] paypal_mock_response Optional parameter: PayPal's REST API
|
340
|
+
# uses a request header to invoke negative testing in the sandbox. This
|
341
|
+
# header configures the sandbox into a negative testing state for
|
342
|
+
# transactions that include the merchant.
|
376
343
|
# @param [String] paypal_request_id Optional parameter: The server stores
|
377
344
|
# keys for 6 hours. The API callers can request the times to up to 72 hours
|
378
345
|
# by speaking to their Account Manager. It is mandatory for all single-step
|
@@ -380,22 +347,18 @@ module PaypalServerSdk
|
|
380
347
|
# information like Card, PayPal.vault_id, PayPal.billing_agreement_id,
|
381
348
|
# etc).
|
382
349
|
# @param [String] prefer Optional parameter: The preferred server response
|
383
|
-
# upon successful completion of the request. Value
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
# returns a complete resource representation, including the current state of
|
389
|
-
# the resource.</li></ul>
|
350
|
+
# upon successful completion of the request. Value is: return=minimal. The
|
351
|
+
# server returns a minimal response to optimize communication between the
|
352
|
+
# API caller and the server. A minimal response includes the id, status and
|
353
|
+
# HATEOAS links. return=representation. The server returns a complete
|
354
|
+
# resource representation, including the current state of the resource.
|
390
355
|
# @param [String] paypal_client_metadata_id Optional parameter: Example:
|
391
356
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
392
357
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
393
|
-
# merchant. For details, see
|
394
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
395
|
-
# n">PayPal-Auth-Assertion</a>.
|
358
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
396
359
|
# @param [OrderCaptureRequest] body Optional parameter: Example:
|
397
360
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
398
|
-
def
|
361
|
+
def capture_order(options = {})
|
399
362
|
new_api_call_builder
|
400
363
|
.request(new_request_builder(HttpMethodEnum::POST,
|
401
364
|
'/v2/checkout/orders/{id}/capture',
|
@@ -403,6 +366,7 @@ module PaypalServerSdk
|
|
403
366
|
.template_param(new_parameter(options['id'], key: 'id')
|
404
367
|
.should_encode(true))
|
405
368
|
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
369
|
+
.header_param(new_parameter(options['paypal_mock_response'], key: 'PayPal-Mock-Response'))
|
406
370
|
.header_param(new_parameter(options['paypal_request_id'], key: 'PayPal-Request-Id'))
|
407
371
|
.header_param(new_parameter(options['prefer'], key: 'Prefer'))
|
408
372
|
.header_param(new_parameter(options['paypal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id'))
|
@@ -449,11 +413,9 @@ module PaypalServerSdk
|
|
449
413
|
# @param [OrderTrackerRequest] body Required parameter: Example:
|
450
414
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
451
415
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
452
|
-
# merchant. For details, see
|
453
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
454
|
-
# n">PayPal-Auth-Assertion</a>.
|
416
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
455
417
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
456
|
-
def
|
418
|
+
def create_order_tracking(options = {})
|
457
419
|
new_api_call_builder
|
458
420
|
.request(new_request_builder(HttpMethodEnum::POST,
|
459
421
|
'/v2/checkout/orders/{id}/track',
|
@@ -494,26 +456,19 @@ module PaypalServerSdk
|
|
494
456
|
end
|
495
457
|
|
496
458
|
# Updates or cancels the tracking information for a PayPal order, by ID.
|
497
|
-
# Updatable attributes or
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
# <code>items</code> object with the value sent in
|
502
|
-
# request.</td></tr><tr><td><code>notify_payer</code></td><td>replace,
|
503
|
-
# add</td><td></td></tr><tr><td><code>status</code></td><td>replace</td><td>
|
504
|
-
# Only patching status to CANCELLED is currently
|
505
|
-
# supported.</td></tr></tbody></table>
|
459
|
+
# Updatable attributes or objects: Attribute Op Notes items replace Using
|
460
|
+
# replace op for items will replace the entire items object with the value
|
461
|
+
# sent in request. notify_payer replace, add status replace Only patching
|
462
|
+
# status to CANCELLED is currently supported.
|
506
463
|
# @param [String] id Required parameter: The ID of the order that the
|
507
464
|
# tracking information is associated with.
|
508
465
|
# @param [String] tracker_id Required parameter: The order tracking ID.
|
509
466
|
# @param [String] paypal_auth_assertion Optional parameter: An
|
510
467
|
# API-caller-provided JSON Web Token (JWT) assertion that identifies the
|
511
|
-
# merchant. For details, see
|
512
|
-
# href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertio
|
513
|
-
# n">PayPal-Auth-Assertion</a>.
|
468
|
+
# merchant. For details, see PayPal-Auth-Assertion.
|
514
469
|
# @param [Array[Patch]] body Optional parameter: Example:
|
515
470
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
516
|
-
def
|
471
|
+
def update_order_tracking(options = {})
|
517
472
|
new_api_call_builder
|
518
473
|
.request(new_request_builder(HttpMethodEnum::PATCH,
|
519
474
|
'/v2/checkout/orders/{id}/trackers/{tracker_id}',
|