paypal-server-sdk 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +34 -34
- data/README.md +19 -30
- data/lib/paypal_server_sdk/controllers/base_controller.rb +1 -1
- data/lib/paypal_server_sdk/controllers/orders_controller.rb +228 -234
- data/lib/paypal_server_sdk/controllers/payments_controller.rb +139 -91
- data/lib/paypal_server_sdk/controllers/vault_controller.rb +57 -57
- data/lib/paypal_server_sdk/exceptions/api_exception.rb +11 -0
- data/lib/paypal_server_sdk/exceptions/error_exception.rb +14 -0
- data/lib/paypal_server_sdk/exceptions/o_auth_provider_exception.rb +14 -0
- data/lib/paypal_server_sdk/models/activity_timestamps.rb +17 -6
- data/lib/paypal_server_sdk/models/address.rb +24 -9
- data/lib/paypal_server_sdk/models/amount_breakdown.rb +17 -0
- data/lib/paypal_server_sdk/models/amount_with_breakdown.rb +22 -9
- data/lib/paypal_server_sdk/models/apple_pay_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_card.rb +14 -0
- data/lib/paypal_server_sdk/models/apple_pay_card_response.rb +48 -6
- data/lib/paypal_server_sdk/models/apple_pay_decrypted_token_data.rb +16 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data.rb +14 -0
- data/lib/paypal_server_sdk/models/apple_pay_payment_data_type.rb +6 -2
- data/lib/paypal_server_sdk/models/apple_pay_payment_object.rb +43 -7
- data/lib/paypal_server_sdk/models/apple_pay_payment_token.rb +12 -0
- data/lib/paypal_server_sdk/models/apple_pay_request.rb +27 -13
- data/lib/paypal_server_sdk/models/apple_pay_tokenized_card.rb +15 -0
- data/lib/paypal_server_sdk/models/assurance_details.rb +14 -0
- data/lib/paypal_server_sdk/models/authentication_response.rb +13 -0
- data/lib/paypal_server_sdk/models/authorization.rb +28 -9
- data/lib/paypal_server_sdk/models/authorization_incomplete_reason.rb +2 -2
- data/lib/paypal_server_sdk/models/authorization_status.rb +12 -6
- data/lib/paypal_server_sdk/models/authorization_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/authorization_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/authorization_with_additional_data.rb +29 -9
- data/lib/paypal_server_sdk/models/avs_code.rb +102 -71
- data/lib/paypal_server_sdk/models/bancontact_payment_object.rb +19 -5
- data/lib/paypal_server_sdk/models/bancontact_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/base_model.rb +76 -28
- data/lib/paypal_server_sdk/models/billing_cycle.rb +129 -0
- data/lib/paypal_server_sdk/models/bin_details.rb +18 -5
- data/lib/paypal_server_sdk/models/blik_experience_context.rb +17 -0
- data/lib/paypal_server_sdk/models/blik_level0_payment_object.rb +12 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_object.rb +12 -0
- data/lib/paypal_server_sdk/models/blik_one_click_payment_request.rb +15 -0
- data/lib/paypal_server_sdk/models/blik_payment_object.rb +22 -10
- data/lib/paypal_server_sdk/models/blik_payment_request.rb +24 -10
- data/lib/paypal_server_sdk/models/callback_configuration.rb +75 -0
- data/lib/paypal_server_sdk/models/callback_events.rb +27 -0
- data/lib/paypal_server_sdk/models/capture_incomplete_reason.rb +22 -14
- data/lib/paypal_server_sdk/models/capture_payment_instruction.rb +15 -0
- data/lib/paypal_server_sdk/models/capture_request.rb +17 -0
- data/lib/paypal_server_sdk/models/capture_status.rb +10 -6
- data/lib/paypal_server_sdk/models/capture_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/capture_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/captured_payment.rb +36 -10
- data/lib/paypal_server_sdk/models/card_attributes.rb +13 -0
- data/lib/paypal_server_sdk/models/card_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/card_authentication_response.rb +14 -2
- data/lib/paypal_server_sdk/models/card_brand.rb +29 -25
- data/lib/paypal_server_sdk/models/card_customer_information.rb +18 -5
- data/lib/paypal_server_sdk/models/card_experience_context.rb +12 -0
- data/lib/paypal_server_sdk/models/card_from_request.rb +12 -0
- data/lib/paypal_server_sdk/models/{card_response_entity.rb → card_payment_token_entity.rb} +37 -15
- data/lib/paypal_server_sdk/models/card_request.rb +32 -17
- data/lib/paypal_server_sdk/models/card_response.rb +43 -2
- data/lib/paypal_server_sdk/models/{address_details.rb → card_response_address.rb} +33 -57
- data/lib/paypal_server_sdk/models/card_stored_credential.rb +23 -7
- data/lib/paypal_server_sdk/models/card_supplementary_data.rb +13 -5
- data/lib/paypal_server_sdk/models/card_type.rb +5 -5
- data/lib/paypal_server_sdk/models/card_vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/card_verification.rb +16 -3
- data/lib/paypal_server_sdk/models/card_verification_details.rb +40 -11
- data/lib/paypal_server_sdk/models/card_verification_processor_response.rb +12 -0
- data/lib/paypal_server_sdk/models/card_verification_status.rb +23 -0
- data/lib/paypal_server_sdk/models/checkout_payment_intent.rb +10 -2
- data/lib/paypal_server_sdk/models/cobranded_card.rb +13 -0
- data/lib/paypal_server_sdk/models/confirm_order_request.rb +15 -15
- data/lib/paypal_server_sdk/models/{customer_request.rb → customer.rb} +18 -4
- data/lib/paypal_server_sdk/models/customer_information.rb +17 -5
- data/lib/paypal_server_sdk/models/customer_response.rb +76 -0
- data/lib/paypal_server_sdk/models/customer_vault_payment_tokens_response.rb +21 -4
- data/lib/paypal_server_sdk/models/cvv_code.rb +35 -27
- data/lib/paypal_server_sdk/models/disbursement_mode.rb +5 -2
- data/lib/paypal_server_sdk/models/dispute_category.rb +2 -2
- data/lib/paypal_server_sdk/models/eci_flag.rb +6 -8
- data/lib/paypal_server_sdk/models/enrollment_status.rb +11 -8
- data/lib/paypal_server_sdk/models/eps_payment_object.rb +17 -5
- data/lib/paypal_server_sdk/models/eps_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/error_details.rb +15 -0
- data/lib/paypal_server_sdk/models/exchange_rate.rb +14 -0
- data/lib/paypal_server_sdk/models/experience_context.rb +15 -0
- data/lib/paypal_server_sdk/models/fulfillment_type.rb +36 -0
- data/lib/paypal_server_sdk/models/giropay_payment_object.rb +17 -5
- data/lib/paypal_server_sdk/models/giropay_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/google_pay_authentication_method.rb +8 -2
- data/lib/paypal_server_sdk/models/google_pay_card.rb +128 -0
- data/lib/paypal_server_sdk/models/google_pay_card_response.rb +16 -0
- data/lib/paypal_server_sdk/models/google_pay_decrypted_token_data.rb +28 -2
- data/lib/paypal_server_sdk/models/google_pay_payment_method.rb +1 -1
- data/lib/paypal_server_sdk/models/google_pay_request.rb +22 -17
- data/lib/paypal_server_sdk/models/google_pay_request_card.rb +14 -0
- data/lib/paypal_server_sdk/models/google_pay_wallet_response.rb +18 -5
- data/lib/paypal_server_sdk/models/ideal_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/ideal_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/item.rb +17 -0
- data/lib/paypal_server_sdk/models/item_category.rb +6 -3
- data/lib/paypal_server_sdk/models/level2_card_processing_data.rb +12 -0
- data/lib/paypal_server_sdk/models/level3_card_processing_data.rb +17 -0
- data/lib/paypal_server_sdk/models/liability_shift_indicator.rb +3 -3
- data/lib/paypal_server_sdk/models/line_item.rb +21 -0
- data/lib/paypal_server_sdk/models/link_description.rb +12 -0
- data/lib/paypal_server_sdk/models/money.rb +16 -4
- data/lib/paypal_server_sdk/models/mybank_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/mybank_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/name.rb +12 -0
- data/lib/paypal_server_sdk/models/net_amount_breakdown_item.rb +14 -0
- data/lib/paypal_server_sdk/models/network_token.rb +15 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference.rb +14 -0
- data/lib/paypal_server_sdk/models/network_transaction_reference_entity.rb +15 -3
- data/lib/paypal_server_sdk/models/one_time_charge.rb +118 -0
- data/lib/paypal_server_sdk/models/order.rb +28 -25
- data/lib/paypal_server_sdk/models/order_application_context.rb +40 -25
- data/lib/paypal_server_sdk/models/order_application_context_landing_page.rb +10 -3
- data/lib/paypal_server_sdk/models/order_application_context_shipping_preference.rb +14 -10
- data/lib/paypal_server_sdk/models/order_application_context_user_action.rb +11 -6
- data/lib/paypal_server_sdk/models/order_authorize_request.rb +12 -0
- data/lib/paypal_server_sdk/models/order_authorize_request_payment_source.rb +20 -9
- data/lib/paypal_server_sdk/models/order_authorize_response.rb +26 -23
- data/lib/paypal_server_sdk/models/order_authorize_response_payment_source.rb +14 -0
- data/lib/paypal_server_sdk/models/order_capture_request.rb +12 -0
- data/lib/paypal_server_sdk/models/order_capture_request_payment_source.rb +20 -9
- data/lib/paypal_server_sdk/models/order_confirm_application_context.rb +21 -8
- data/lib/paypal_server_sdk/models/order_request.rb +18 -4
- data/lib/paypal_server_sdk/models/order_status.rb +19 -6
- data/lib/paypal_server_sdk/models/order_tracker_item.rb +15 -0
- data/lib/paypal_server_sdk/models/order_tracker_request.rb +22 -5
- data/lib/paypal_server_sdk/models/order_tracker_response.rb +19 -6
- data/lib/paypal_server_sdk/models/order_tracker_status.rb +5 -2
- data/lib/paypal_server_sdk/models/order_update_callback_error_response.rb +89 -0
- data/lib/paypal_server_sdk/models/order_update_callback_error_response_details.rb +81 -0
- data/lib/paypal_server_sdk/models/order_update_callback_request.rb +111 -0
- data/lib/paypal_server_sdk/models/order_update_callback_response.rb +72 -0
- data/lib/paypal_server_sdk/models/order_update_callback_shipping_address.rb +107 -0
- data/lib/paypal_server_sdk/models/order_update_callback_shipping_option.rb +93 -0
- data/lib/paypal_server_sdk/models/{capture.rb → orders_capture.rb} +46 -22
- data/lib/paypal_server_sdk/models/orders_card_verification_method.rb +51 -0
- data/lib/paypal_server_sdk/models/p24_payment_object.rb +24 -10
- data/lib/paypal_server_sdk/models/p24_payment_request.rb +22 -10
- data/lib/paypal_server_sdk/models/pa_res_status.rb +16 -16
- data/lib/paypal_server_sdk/models/participant_metadata.rb +64 -0
- data/lib/paypal_server_sdk/models/patch.rb +20 -10
- data/lib/paypal_server_sdk/models/patch_op.rb +43 -6
- data/lib/paypal_server_sdk/models/payee_base.rb +17 -5
- data/lib/paypal_server_sdk/models/payee_payment_method_preference.rb +4 -2
- data/lib/paypal_server_sdk/models/payer.rb +20 -5
- data/lib/paypal_server_sdk/models/payer_base.rb +16 -5
- data/lib/paypal_server_sdk/models/payment_advice_code.rb +53 -8
- data/lib/paypal_server_sdk/models/payment_authorization.rb +32 -11
- data/lib/paypal_server_sdk/models/payment_collection.rb +16 -2
- data/lib/paypal_server_sdk/models/payment_initiator.rb +5 -2
- data/lib/paypal_server_sdk/models/payment_instruction.rb +16 -0
- data/lib/paypal_server_sdk/models/payment_method_preference.rb +14 -0
- data/lib/paypal_server_sdk/models/payment_source.rb +25 -9
- data/lib/paypal_server_sdk/models/payment_source_response.rb +19 -0
- data/lib/paypal_server_sdk/models/payment_supplementary_data.rb +12 -0
- data/lib/paypal_server_sdk/models/payment_token_request.rb +17 -3
- data/lib/paypal_server_sdk/models/payment_token_request_card.rb +17 -22
- data/lib/paypal_server_sdk/models/payment_token_request_payment_source.rb +12 -0
- data/lib/paypal_server_sdk/models/payment_token_response.rb +18 -3
- data/lib/paypal_server_sdk/models/payment_token_response_payment_source.rb +18 -14
- data/lib/paypal_server_sdk/models/payment_token_status.rb +36 -0
- data/lib/paypal_server_sdk/models/payments_capture.rb +252 -0
- data/lib/paypal_server_sdk/models/payments_payment_advice_code.rb +42 -0
- data/lib/paypal_server_sdk/models/payments_processor_response.rb +98 -0
- data/lib/paypal_server_sdk/models/paypal_experience_landing_page.rb +11 -3
- data/lib/paypal_server_sdk/models/paypal_experience_user_action.rb +9 -4
- data/lib/paypal_server_sdk/models/paypal_payment_token.rb +38 -8
- data/lib/paypal_server_sdk/models/paypal_payment_token_customer_type.rb +7 -3
- data/lib/paypal_server_sdk/models/paypal_payment_token_usage_type.rb +7 -3
- data/lib/paypal_server_sdk/models/paypal_wallet.rb +41 -11
- data/lib/paypal_server_sdk/models/paypal_wallet_account_verification_status.rb +6 -2
- data/lib/paypal_server_sdk/models/paypal_wallet_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_context_shipping_preference.rb +31 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_customer.rb +18 -5
- data/lib/paypal_server_sdk/models/paypal_wallet_customer_request.rb +18 -5
- data/lib/paypal_server_sdk/models/paypal_wallet_experience_context.rb +45 -12
- data/lib/paypal_server_sdk/models/paypal_wallet_response.rb +39 -7
- data/lib/paypal_server_sdk/models/paypal_wallet_stored_credential.rb +98 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_instruction.rb +18 -1
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/paypal_wallet_vault_status.rb +8 -3
- data/lib/paypal_server_sdk/models/phone.rb +14 -0
- data/lib/paypal_server_sdk/models/phone_number.rb +12 -0
- data/lib/paypal_server_sdk/models/phone_number_with_country_code.rb +15 -0
- data/lib/paypal_server_sdk/models/phone_with_type.rb +13 -0
- data/lib/paypal_server_sdk/models/plan.rb +102 -0
- data/lib/paypal_server_sdk/models/platform_fee.rb +12 -0
- data/lib/paypal_server_sdk/models/pricing_model.rb +28 -0
- data/lib/paypal_server_sdk/models/pricing_scheme.rb +84 -0
- data/lib/paypal_server_sdk/models/processor_response.rb +15 -0
- data/lib/paypal_server_sdk/models/processor_response_code.rb +312 -308
- data/lib/paypal_server_sdk/models/purchase_unit.rb +43 -25
- data/lib/paypal_server_sdk/models/purchase_unit_request.rb +36 -20
- data/lib/paypal_server_sdk/models/reauthorize_request.rb +19 -8
- data/lib/paypal_server_sdk/models/refund.rb +25 -6
- data/lib/paypal_server_sdk/models/refund_incomplete_reason.rb +2 -1
- data/lib/paypal_server_sdk/models/refund_payment_instruction.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_platform_fee.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_request.rb +17 -2
- data/lib/paypal_server_sdk/models/refund_status.rb +4 -4
- data/lib/paypal_server_sdk/models/refund_status_details.rb +12 -0
- data/lib/paypal_server_sdk/models/refund_status_with_details.rb +12 -0
- data/lib/paypal_server_sdk/models/related_identifiers.rb +14 -0
- data/lib/paypal_server_sdk/models/risk_supplementary_data.rb +63 -0
- data/lib/paypal_server_sdk/models/seller_payable_breakdown.rb +21 -0
- data/lib/paypal_server_sdk/models/seller_protection.rb +13 -0
- data/lib/paypal_server_sdk/models/seller_protection_status.rb +6 -3
- data/lib/paypal_server_sdk/models/seller_receivable_breakdown.rb +18 -0
- data/lib/paypal_server_sdk/models/setup_token_card_experience_context.rb +21 -5
- data/lib/paypal_server_sdk/models/setup_token_request.rb +17 -3
- data/lib/paypal_server_sdk/models/setup_token_request_card.rb +20 -18
- data/lib/paypal_server_sdk/models/setup_token_request_payment_source.rb +13 -0
- data/lib/paypal_server_sdk/models/setup_token_response.rb +23 -16
- data/lib/paypal_server_sdk/models/setup_token_response_card.rb +25 -3
- data/lib/paypal_server_sdk/models/setup_token_response_payment_source.rb +13 -0
- data/lib/paypal_server_sdk/models/shipment_carrier.rb +1594 -1295
- data/lib/paypal_server_sdk/models/shipping_details.rb +30 -3
- data/lib/paypal_server_sdk/models/shipping_name.rb +12 -0
- data/lib/paypal_server_sdk/models/shipping_option.rb +14 -0
- data/lib/paypal_server_sdk/models/shipping_options_purchase_unit.rb +102 -0
- data/lib/paypal_server_sdk/models/shipping_preference.rb +6 -3
- data/lib/paypal_server_sdk/models/shipping_type.rb +12 -4
- data/lib/paypal_server_sdk/models/shipping_with_tracking_details.rb +31 -3
- data/lib/paypal_server_sdk/models/sofort_payment_object.rb +18 -5
- data/lib/paypal_server_sdk/models/sofort_payment_request.rb +18 -5
- data/lib/paypal_server_sdk/models/standard_entry_class_code.rb +12 -4
- data/lib/paypal_server_sdk/models/store_in_vault_instruction.rb +2 -1
- data/lib/paypal_server_sdk/models/stored_payment_source.rb +23 -7
- data/lib/paypal_server_sdk/models/stored_payment_source_payment_type.rb +6 -3
- data/lib/paypal_server_sdk/models/stored_payment_source_usage_type.rb +6 -3
- data/lib/paypal_server_sdk/models/supplementary_data.rb +25 -7
- data/lib/paypal_server_sdk/models/supplementary_purchase_data.rb +13 -0
- data/lib/paypal_server_sdk/models/tax_id_type.rb +2 -2
- data/lib/paypal_server_sdk/models/tax_info.rb +12 -0
- data/lib/paypal_server_sdk/models/tenure_type.rb +28 -0
- data/lib/paypal_server_sdk/models/three_d_secure_authentication_response.rb +14 -0
- data/lib/paypal_server_sdk/models/three_d_secure_card_authentication_response.rb +89 -0
- data/lib/paypal_server_sdk/models/token.rb +12 -0
- data/lib/paypal_server_sdk/models/token_type.rb +2 -1
- data/lib/paypal_server_sdk/models/trustly_payment_object.rb +31 -6
- data/lib/paypal_server_sdk/models/trustly_payment_request.rb +30 -6
- data/lib/paypal_server_sdk/models/universal_product_code.rb +12 -0
- data/lib/paypal_server_sdk/models/upc_type.rb +14 -14
- data/lib/paypal_server_sdk/models/usage_pattern.rb +72 -0
- data/lib/paypal_server_sdk/models/vault_card_verification_method.rb +39 -0
- data/lib/paypal_server_sdk/models/vault_customer.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_experience_context.rb +26 -7
- data/lib/paypal_server_sdk/models/vault_instruction.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_instruction_action.rb +26 -0
- data/lib/paypal_server_sdk/models/vault_instruction_base.rb +12 -0
- data/lib/paypal_server_sdk/models/vault_paypal_wallet_request.rb +43 -4
- data/lib/paypal_server_sdk/models/vault_response.rb +13 -0
- data/lib/paypal_server_sdk/models/vault_response_customer.rb +86 -0
- data/lib/paypal_server_sdk/models/vault_status.rb +8 -3
- data/lib/paypal_server_sdk/models/vault_token_request.rb +13 -1
- data/lib/paypal_server_sdk/models/vault_token_request_type.rb +20 -0
- data/lib/paypal_server_sdk/models/vault_venmo_experience_context.rb +24 -6
- data/lib/paypal_server_sdk/models/vault_venmo_request.rb +31 -3
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet.rb +29 -3
- data/lib/paypal_server_sdk/models/vaulted_digital_wallet_shipping_details.rb +27 -2
- data/lib/paypal_server_sdk/models/venmo_payment_token.rb +37 -8
- data/lib/paypal_server_sdk/models/venmo_payment_token_customer_type.rb +4 -2
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_pattern.rb +12 -6
- data/lib/paypal_server_sdk/models/venmo_payment_token_usage_type.rb +5 -2
- data/lib/paypal_server_sdk/models/venmo_wallet_additional_attributes.rb +12 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_attributes_response.rb +12 -0
- data/lib/paypal_server_sdk/models/venmo_wallet_customer_information.rb +16 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_experience_context.rb +34 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_request.rb +21 -8
- data/lib/paypal_server_sdk/models/venmo_wallet_response.rb +21 -5
- data/lib/paypal_server_sdk/models/venmo_wallet_vault_attributes.rb +17 -0
- data/lib/paypal_server_sdk/utilities/file_wrapper.rb +14 -2
- data/lib/paypal_server_sdk.rb +183 -152
- metadata +42 -16
- data/lib/paypal_server_sdk/models/card_payment_token.rb +0 -166
- data/lib/paypal_server_sdk/models/card_verification_method.rb +0 -29
- data/lib/paypal_server_sdk/models/fullfillment_type.rb +0 -31
- data/lib/paypal_server_sdk/models/google_pay_card_attributes.rb +0 -51
- data/lib/paypal_server_sdk/models/payee.rb +0 -65
- data/lib/paypal_server_sdk/models/paypal_payment_token_usage_pattern.rb +0 -35
- data/lib/paypal_server_sdk/models/processing_instruction.rb +0 -23
- data/lib/paypal_server_sdk/models/token_request_type.rb +0 -23
@@ -0,0 +1,128 @@
|
|
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 payment card used to fund a Google Pay payment. Can be a credit or debit
|
8
|
+
# card.
|
9
|
+
class GooglePayCard < BaseModel
|
10
|
+
SKIP = Object.new
|
11
|
+
private_constant :SKIP
|
12
|
+
|
13
|
+
# The card holder's name as it appears on the card.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :name
|
16
|
+
|
17
|
+
# The primary account number (PAN) for the payment card.
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :number
|
20
|
+
|
21
|
+
# The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date
|
22
|
+
# and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
|
23
|
+
# @return [String]
|
24
|
+
attr_accessor :expiry
|
25
|
+
|
26
|
+
# The last digits of the payment card.
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :last_digits
|
29
|
+
|
30
|
+
# Type of card. i.e Credit, Debit and so on.
|
31
|
+
# @return [CardType]
|
32
|
+
attr_accessor :type
|
33
|
+
|
34
|
+
# The card network or brand. Applies to credit, debit, gift, and payment
|
35
|
+
# cards.
|
36
|
+
# @return [CardBrand]
|
37
|
+
attr_accessor :brand
|
38
|
+
|
39
|
+
# The portable international postal address. Maps to
|
40
|
+
# [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/
|
41
|
+
# wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls:
|
42
|
+
# the autocomplete
|
43
|
+
# attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co
|
44
|
+
# ntrols-the-autocomplete-attribute).
|
45
|
+
# @return [Address]
|
46
|
+
attr_accessor :billing_address
|
47
|
+
|
48
|
+
# A mapping from model property names to API property names.
|
49
|
+
def self.names
|
50
|
+
@_hash = {} if @_hash.nil?
|
51
|
+
@_hash['name'] = 'name'
|
52
|
+
@_hash['number'] = 'number'
|
53
|
+
@_hash['expiry'] = 'expiry'
|
54
|
+
@_hash['last_digits'] = 'last_digits'
|
55
|
+
@_hash['type'] = 'type'
|
56
|
+
@_hash['brand'] = 'brand'
|
57
|
+
@_hash['billing_address'] = 'billing_address'
|
58
|
+
@_hash
|
59
|
+
end
|
60
|
+
|
61
|
+
# An array for optional fields
|
62
|
+
def self.optionals
|
63
|
+
%w[
|
64
|
+
name
|
65
|
+
number
|
66
|
+
expiry
|
67
|
+
last_digits
|
68
|
+
type
|
69
|
+
brand
|
70
|
+
billing_address
|
71
|
+
]
|
72
|
+
end
|
73
|
+
|
74
|
+
# An array for nullable fields
|
75
|
+
def self.nullables
|
76
|
+
[]
|
77
|
+
end
|
78
|
+
|
79
|
+
def initialize(name: SKIP, number: SKIP, expiry: SKIP, last_digits: SKIP,
|
80
|
+
type: SKIP, brand: SKIP, billing_address: SKIP)
|
81
|
+
@name = name unless name == SKIP
|
82
|
+
@number = number unless number == SKIP
|
83
|
+
@expiry = expiry unless expiry == SKIP
|
84
|
+
@last_digits = last_digits unless last_digits == SKIP
|
85
|
+
@type = type unless type == SKIP
|
86
|
+
@brand = brand unless brand == SKIP
|
87
|
+
@billing_address = billing_address unless billing_address == SKIP
|
88
|
+
end
|
89
|
+
|
90
|
+
# Creates an instance of the object from a hash.
|
91
|
+
def self.from_hash(hash)
|
92
|
+
return nil unless hash
|
93
|
+
|
94
|
+
# Extract variables from the hash.
|
95
|
+
name = hash.key?('name') ? hash['name'] : SKIP
|
96
|
+
number = hash.key?('number') ? hash['number'] : SKIP
|
97
|
+
expiry = hash.key?('expiry') ? hash['expiry'] : SKIP
|
98
|
+
last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP
|
99
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
100
|
+
brand = hash.key?('brand') ? hash['brand'] : SKIP
|
101
|
+
billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address']
|
102
|
+
|
103
|
+
# Create object from extracted values.
|
104
|
+
GooglePayCard.new(name: name,
|
105
|
+
number: number,
|
106
|
+
expiry: expiry,
|
107
|
+
last_digits: last_digits,
|
108
|
+
type: type,
|
109
|
+
brand: brand,
|
110
|
+
billing_address: billing_address)
|
111
|
+
end
|
112
|
+
|
113
|
+
# Provides a human-readable string representation of the object.
|
114
|
+
def to_s
|
115
|
+
class_name = self.class.name.split('::').last
|
116
|
+
"<#{class_name} name: #{@name}, number: #{@number}, expiry: #{@expiry}, last_digits:"\
|
117
|
+
" #{@last_digits}, type: #{@type}, brand: #{@brand}, billing_address: #{@billing_address}>"
|
118
|
+
end
|
119
|
+
|
120
|
+
# Provides a debugging-friendly string with detailed object information.
|
121
|
+
def inspect
|
122
|
+
class_name = self.class.name.split('::').last
|
123
|
+
"<#{class_name} name: #{@name.inspect}, number: #{@number.inspect}, expiry:"\
|
124
|
+
" #{@expiry.inspect}, last_digits: #{@last_digits.inspect}, type: #{@type.inspect}, brand:"\
|
125
|
+
" #{@brand.inspect}, billing_address: #{@billing_address.inspect}>"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -100,5 +100,21 @@ module PaypalServerSdk
|
|
100
100
|
billing_address: billing_address,
|
101
101
|
authentication_result: authentication_result)
|
102
102
|
end
|
103
|
+
|
104
|
+
# Provides a human-readable string representation of the object.
|
105
|
+
def to_s
|
106
|
+
class_name = self.class.name.split('::').last
|
107
|
+
"<#{class_name} name: #{@name}, last_digits: #{@last_digits}, type: #{@type}, brand:"\
|
108
|
+
" #{@brand}, billing_address: #{@billing_address}, authentication_result:"\
|
109
|
+
" #{@authentication_result}>"
|
110
|
+
end
|
111
|
+
|
112
|
+
# Provides a debugging-friendly string with detailed object information.
|
113
|
+
def inspect
|
114
|
+
class_name = self.class.name.split('::').last
|
115
|
+
"<#{class_name} name: #{@name.inspect}, last_digits: #{@last_digits.inspect}, type:"\
|
116
|
+
" #{@type.inspect}, brand: #{@brand.inspect}, billing_address: #{@billing_address.inspect},"\
|
117
|
+
" authentication_result: #{@authentication_result.inspect}>"
|
118
|
+
end
|
103
119
|
end
|
104
120
|
end
|
@@ -24,6 +24,11 @@ module PaypalServerSdk
|
|
24
24
|
# @return [GooglePayPaymentMethod]
|
25
25
|
attr_accessor :payment_method
|
26
26
|
|
27
|
+
# The payment card used to fund a Google Pay payment. Can be a credit or
|
28
|
+
# debit card.
|
29
|
+
# @return [GooglePayCard]
|
30
|
+
attr_accessor :card
|
31
|
+
|
27
32
|
# Authentication Method which is used for the card transaction.
|
28
33
|
# @return [GooglePayAuthenticationMethod]
|
29
34
|
attr_accessor :authentication_method
|
@@ -46,6 +51,7 @@ module PaypalServerSdk
|
|
46
51
|
@_hash['message_id'] = 'message_id'
|
47
52
|
@_hash['message_expiration'] = 'message_expiration'
|
48
53
|
@_hash['payment_method'] = 'payment_method'
|
54
|
+
@_hash['card'] = 'card'
|
49
55
|
@_hash['authentication_method'] = 'authentication_method'
|
50
56
|
@_hash['cryptogram'] = 'cryptogram'
|
51
57
|
@_hash['eci_indicator'] = 'eci_indicator'
|
@@ -67,12 +73,13 @@ module PaypalServerSdk
|
|
67
73
|
[]
|
68
74
|
end
|
69
75
|
|
70
|
-
def initialize(payment_method:, authentication_method:,
|
71
|
-
message_expiration: SKIP, cryptogram: SKIP,
|
76
|
+
def initialize(payment_method:, card:, authentication_method:,
|
77
|
+
message_id: SKIP, message_expiration: SKIP, cryptogram: SKIP,
|
72
78
|
eci_indicator: SKIP)
|
73
79
|
@message_id = message_id unless message_id == SKIP
|
74
80
|
@message_expiration = message_expiration unless message_expiration == SKIP
|
75
81
|
@payment_method = payment_method
|
82
|
+
@card = card
|
76
83
|
@authentication_method = authentication_method
|
77
84
|
@cryptogram = cryptogram unless cryptogram == SKIP
|
78
85
|
@eci_indicator = eci_indicator unless eci_indicator == SKIP
|
@@ -85,6 +92,7 @@ module PaypalServerSdk
|
|
85
92
|
# Extract variables from the hash.
|
86
93
|
payment_method =
|
87
94
|
hash.key?('payment_method') ? hash['payment_method'] : nil
|
95
|
+
card = GooglePayCard.from_hash(hash['card']) if hash['card']
|
88
96
|
authentication_method =
|
89
97
|
hash.key?('authentication_method') ? hash['authentication_method'] : nil
|
90
98
|
message_id = hash.key?('message_id') ? hash['message_id'] : SKIP
|
@@ -95,11 +103,29 @@ module PaypalServerSdk
|
|
95
103
|
|
96
104
|
# Create object from extracted values.
|
97
105
|
GooglePayDecryptedTokenData.new(payment_method: payment_method,
|
106
|
+
card: card,
|
98
107
|
authentication_method: authentication_method,
|
99
108
|
message_id: message_id,
|
100
109
|
message_expiration: message_expiration,
|
101
110
|
cryptogram: cryptogram,
|
102
111
|
eci_indicator: eci_indicator)
|
103
112
|
end
|
113
|
+
|
114
|
+
# Provides a human-readable string representation of the object.
|
115
|
+
def to_s
|
116
|
+
class_name = self.class.name.split('::').last
|
117
|
+
"<#{class_name} message_id: #{@message_id}, message_expiration: #{@message_expiration},"\
|
118
|
+
" payment_method: #{@payment_method}, card: #{@card}, authentication_method:"\
|
119
|
+
" #{@authentication_method}, cryptogram: #{@cryptogram}, eci_indicator: #{@eci_indicator}>"
|
120
|
+
end
|
121
|
+
|
122
|
+
# Provides a debugging-friendly string with detailed object information.
|
123
|
+
def inspect
|
124
|
+
class_name = self.class.name.split('::').last
|
125
|
+
"<#{class_name} message_id: #{@message_id.inspect}, message_expiration:"\
|
126
|
+
" #{@message_expiration.inspect}, payment_method: #{@payment_method.inspect}, card:"\
|
127
|
+
" #{@card.inspect}, authentication_method: #{@authentication_method.inspect}, cryptogram:"\
|
128
|
+
" #{@cryptogram.inspect}, eci_indicator: #{@eci_indicator.inspect}>"
|
129
|
+
end
|
104
130
|
end
|
105
131
|
end
|
@@ -7,7 +7,7 @@ module PaypalServerSdk
|
|
7
7
|
# The type of the payment credential. Currently, only CARD is supported.
|
8
8
|
class GooglePayPaymentMethod
|
9
9
|
GOOGLE_PAY_PAYMENT_METHOD = [
|
10
|
-
#
|
10
|
+
# CARD is the only value that Google Pay accepts.
|
11
11
|
CARD = 'CARD'.freeze
|
12
12
|
].freeze
|
13
13
|
|
@@ -13,11 +13,10 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
|
-
# The internationalized email address
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
16
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
17
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
18
|
+
# generally accepted maximum length for an email address is 254 characters.
|
19
|
+
# The pattern verifies that an unquoted @ sign exists.
|
21
20
|
# @return [String]
|
22
21
|
attr_accessor :email_address
|
23
22
|
|
@@ -42,10 +41,6 @@ module PaypalServerSdk
|
|
42
41
|
# @return [AssuranceDetails]
|
43
42
|
attr_accessor :assurance_details
|
44
43
|
|
45
|
-
# Additional attributes associated with the use of this card.
|
46
|
-
# @return [GooglePayCardAttributes]
|
47
|
-
attr_accessor :attributes
|
48
|
-
|
49
44
|
# A mapping from model property names to API property names.
|
50
45
|
def self.names
|
51
46
|
@_hash = {} if @_hash.nil?
|
@@ -55,7 +50,6 @@ module PaypalServerSdk
|
|
55
50
|
@_hash['card'] = 'card'
|
56
51
|
@_hash['decrypted_token'] = 'decrypted_token'
|
57
52
|
@_hash['assurance_details'] = 'assurance_details'
|
58
|
-
@_hash['attributes'] = 'attributes'
|
59
53
|
@_hash
|
60
54
|
end
|
61
55
|
|
@@ -68,7 +62,6 @@ module PaypalServerSdk
|
|
68
62
|
card
|
69
63
|
decrypted_token
|
70
64
|
assurance_details
|
71
|
-
attributes
|
72
65
|
]
|
73
66
|
end
|
74
67
|
|
@@ -78,15 +71,13 @@ module PaypalServerSdk
|
|
78
71
|
end
|
79
72
|
|
80
73
|
def initialize(name: SKIP, email_address: SKIP, phone_number: SKIP,
|
81
|
-
card: SKIP, decrypted_token: SKIP, assurance_details: SKIP
|
82
|
-
attributes: SKIP)
|
74
|
+
card: SKIP, decrypted_token: SKIP, assurance_details: SKIP)
|
83
75
|
@name = name unless name == SKIP
|
84
76
|
@email_address = email_address unless email_address == SKIP
|
85
77
|
@phone_number = phone_number unless phone_number == SKIP
|
86
78
|
@card = card unless card == SKIP
|
87
79
|
@decrypted_token = decrypted_token unless decrypted_token == SKIP
|
88
80
|
@assurance_details = assurance_details unless assurance_details == SKIP
|
89
|
-
@attributes = attributes unless attributes == SKIP
|
90
81
|
end
|
91
82
|
|
92
83
|
# Creates an instance of the object from a hash.
|
@@ -103,7 +94,6 @@ module PaypalServerSdk
|
|
103
94
|
hash['decrypted_token']
|
104
95
|
assurance_details = AssuranceDetails.from_hash(hash['assurance_details']) if
|
105
96
|
hash['assurance_details']
|
106
|
-
attributes = GooglePayCardAttributes.from_hash(hash['attributes']) if hash['attributes']
|
107
97
|
|
108
98
|
# Create object from extracted values.
|
109
99
|
GooglePayRequest.new(name: name,
|
@@ -111,8 +101,23 @@ module PaypalServerSdk
|
|
111
101
|
phone_number: phone_number,
|
112
102
|
card: card,
|
113
103
|
decrypted_token: decrypted_token,
|
114
|
-
assurance_details: assurance_details
|
115
|
-
|
104
|
+
assurance_details: assurance_details)
|
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} name: #{@name}, email_address: #{@email_address}, phone_number:"\
|
111
|
+
" #{@phone_number}, card: #{@card}, decrypted_token: #{@decrypted_token}, assurance_details:"\
|
112
|
+
" #{@assurance_details}>"
|
113
|
+
end
|
114
|
+
|
115
|
+
# Provides a debugging-friendly string with detailed object information.
|
116
|
+
def inspect
|
117
|
+
class_name = self.class.name.split('::').last
|
118
|
+
"<#{class_name} name: #{@name.inspect}, email_address: #{@email_address.inspect},"\
|
119
|
+
" phone_number: #{@phone_number.inspect}, card: #{@card.inspect}, decrypted_token:"\
|
120
|
+
" #{@decrypted_token.inspect}, assurance_details: #{@assurance_details.inspect}>"
|
116
121
|
end
|
117
122
|
end
|
118
123
|
end
|
@@ -80,5 +80,19 @@ module PaypalServerSdk
|
|
80
80
|
brand: brand,
|
81
81
|
billing_address: billing_address)
|
82
82
|
end
|
83
|
+
|
84
|
+
# Provides a human-readable string representation of the object.
|
85
|
+
def to_s
|
86
|
+
class_name = self.class.name.split('::').last
|
87
|
+
"<#{class_name} name: #{@name}, type: #{@type}, brand: #{@brand}, billing_address:"\
|
88
|
+
" #{@billing_address}>"
|
89
|
+
end
|
90
|
+
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
92
|
+
def inspect
|
93
|
+
class_name = self.class.name.split('::').last
|
94
|
+
"<#{class_name} name: #{@name.inspect}, type: #{@type.inspect}, brand: #{@brand.inspect},"\
|
95
|
+
" billing_address: #{@billing_address.inspect}>"
|
96
|
+
end
|
83
97
|
end
|
84
98
|
end
|
@@ -13,11 +13,10 @@ module PaypalServerSdk
|
|
13
13
|
# @return [String]
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
|
-
# The internationalized email address
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# unquoted <code>@</code> sign exists.</blockquote>
|
16
|
+
# The internationalized email address. Note: Up to 64 characters are allowed
|
17
|
+
# before and 255 characters are allowed after the @ sign. However, the
|
18
|
+
# generally accepted maximum length for an email address is 254 characters.
|
19
|
+
# The pattern verifies that an unquoted @ sign exists.
|
21
20
|
# @return [String]
|
22
21
|
attr_accessor :email_address
|
23
22
|
|
@@ -81,5 +80,19 @@ module PaypalServerSdk
|
|
81
80
|
phone_number: phone_number,
|
82
81
|
card: card)
|
83
82
|
end
|
83
|
+
|
84
|
+
# Provides a human-readable string representation of the object.
|
85
|
+
def to_s
|
86
|
+
class_name = self.class.name.split('::').last
|
87
|
+
"<#{class_name} name: #{@name}, email_address: #{@email_address}, phone_number:"\
|
88
|
+
" #{@phone_number}, card: #{@card}>"
|
89
|
+
end
|
90
|
+
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
92
|
+
def inspect
|
93
|
+
class_name = self.class.name.split('::').last
|
94
|
+
"<#{class_name} name: #{@name.inspect}, email_address: #{@email_address.inspect},"\
|
95
|
+
" phone_number: #{@phone_number.inspect}, card: #{@card.inspect}>"
|
96
|
+
end
|
84
97
|
end
|
85
98
|
end
|
@@ -14,11 +14,10 @@ module PaypalServerSdk
|
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
16
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
17
|
-
# that identifies the country or region
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
17
|
+
# that identifies the country or region. Note: The country code for Great
|
18
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
19
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
20
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
22
21
|
# @return [String]
|
23
22
|
attr_accessor :country_code
|
24
23
|
|
@@ -81,5 +80,19 @@ module PaypalServerSdk
|
|
81
80
|
bic: bic,
|
82
81
|
iban_last_chars: iban_last_chars)
|
83
82
|
end
|
83
|
+
|
84
|
+
# Provides a human-readable string representation of the object.
|
85
|
+
def to_s
|
86
|
+
class_name = self.class.name.split('::').last
|
87
|
+
"<#{class_name} name: #{@name}, country_code: #{@country_code}, bic: #{@bic},"\
|
88
|
+
" iban_last_chars: #{@iban_last_chars}>"
|
89
|
+
end
|
90
|
+
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
92
|
+
def inspect
|
93
|
+
class_name = self.class.name.split('::').last
|
94
|
+
"<#{class_name} name: #{@name.inspect}, country_code: #{@country_code.inspect}, bic:"\
|
95
|
+
" #{@bic.inspect}, iban_last_chars: #{@iban_last_chars.inspect}>"
|
96
|
+
end
|
84
97
|
end
|
85
98
|
end
|
@@ -14,11 +14,10 @@ module PaypalServerSdk
|
|
14
14
|
attr_accessor :name
|
15
15
|
|
16
16
|
# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/)
|
17
|
-
# that identifies the country or region
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
# price (CUP) method, bank card, and cross-border transactions.</blockquote>
|
17
|
+
# that identifies the country or region. Note: The country code for Great
|
18
|
+
# Britain is GB and not UK as used in the top-level domain names for that
|
19
|
+
# country. Use the `C2` country code for China worldwide for comparable
|
20
|
+
# uncontrolled price (CUP) method, bank card, and cross-border transactions.
|
22
21
|
# @return [String]
|
23
22
|
attr_accessor :country_code
|
24
23
|
|
@@ -79,5 +78,19 @@ module PaypalServerSdk
|
|
79
78
|
bic: bic,
|
80
79
|
experience_context: experience_context)
|
81
80
|
end
|
81
|
+
|
82
|
+
# Provides a human-readable string representation of the object.
|
83
|
+
def to_s
|
84
|
+
class_name = self.class.name.split('::').last
|
85
|
+
"<#{class_name} name: #{@name}, country_code: #{@country_code}, bic: #{@bic},"\
|
86
|
+
" experience_context: #{@experience_context}>"
|
87
|
+
end
|
88
|
+
|
89
|
+
# Provides a debugging-friendly string with detailed object information.
|
90
|
+
def inspect
|
91
|
+
class_name = self.class.name.split('::').last
|
92
|
+
"<#{class_name} name: #{@name.inspect}, country_code: #{@country_code.inspect}, bic:"\
|
93
|
+
" #{@bic.inspect}, experience_context: #{@experience_context.inspect}>"
|
94
|
+
end
|
82
95
|
end
|
83
96
|
end
|
@@ -130,5 +130,22 @@ module PaypalServerSdk
|
|
130
130
|
image_url: image_url,
|
131
131
|
upc: upc)
|
132
132
|
end
|
133
|
+
|
134
|
+
# Provides a human-readable string representation of the object.
|
135
|
+
def to_s
|
136
|
+
class_name = self.class.name.split('::').last
|
137
|
+
"<#{class_name} name: #{@name}, unit_amount: #{@unit_amount}, tax: #{@tax}, quantity:"\
|
138
|
+
" #{@quantity}, description: #{@description}, sku: #{@sku}, url: #{@url}, category:"\
|
139
|
+
" #{@category}, image_url: #{@image_url}, upc: #{@upc}>"
|
140
|
+
end
|
141
|
+
|
142
|
+
# Provides a debugging-friendly string with detailed object information.
|
143
|
+
def inspect
|
144
|
+
class_name = self.class.name.split('::').last
|
145
|
+
"<#{class_name} name: #{@name.inspect}, unit_amount: #{@unit_amount.inspect}, tax:"\
|
146
|
+
" #{@tax.inspect}, quantity: #{@quantity.inspect}, description: #{@description.inspect},"\
|
147
|
+
" sku: #{@sku.inspect}, url: #{@url.inspect}, category: #{@category.inspect}, image_url:"\
|
148
|
+
" #{@image_url.inspect}, upc: #{@upc.inspect}>"
|
149
|
+
end
|
133
150
|
end
|
134
151
|
end
|
@@ -7,13 +7,16 @@ module PaypalServerSdk
|
|
7
7
|
# The item category type.
|
8
8
|
class ItemCategory
|
9
9
|
ITEM_CATEGORY = [
|
10
|
-
#
|
10
|
+
# Goods that are stored, delivered, and used in their electronic format.
|
11
|
+
# This value is not currently supported for API callers that leverage the
|
12
|
+
# PayPal for Commerce Platform product.
|
11
13
|
DIGITAL_GOODS = 'DIGITAL_GOODS'.freeze,
|
12
14
|
|
13
|
-
#
|
15
|
+
# A tangible item that can be shipped with proof of delivery.
|
14
16
|
PHYSICAL_GOODS = 'PHYSICAL_GOODS'.freeze,
|
15
17
|
|
16
|
-
#
|
18
|
+
# A contribution or gift for which no good or service is exchanged,
|
19
|
+
# usually to a not for profit organization.
|
17
20
|
DONATION = 'DONATION'.freeze
|
18
21
|
].freeze
|
19
22
|
|
@@ -62,5 +62,17 @@ module PaypalServerSdk
|
|
62
62
|
Level2CardProcessingData.new(invoice_id: invoice_id,
|
63
63
|
tax_total: tax_total)
|
64
64
|
end
|
65
|
+
|
66
|
+
# Provides a human-readable string representation of the object.
|
67
|
+
def to_s
|
68
|
+
class_name = self.class.name.split('::').last
|
69
|
+
"<#{class_name} invoice_id: #{@invoice_id}, tax_total: #{@tax_total}>"
|
70
|
+
end
|
71
|
+
|
72
|
+
# Provides a debugging-friendly string with detailed object information.
|
73
|
+
def inspect
|
74
|
+
class_name = self.class.name.split('::').last
|
75
|
+
"<#{class_name} invoice_id: #{@invoice_id.inspect}, tax_total: #{@tax_total.inspect}>"
|
76
|
+
end
|
65
77
|
end
|
66
78
|
end
|
@@ -116,5 +116,22 @@ module PaypalServerSdk
|
|
116
116
|
ships_from_postal_code: ships_from_postal_code,
|
117
117
|
line_items: line_items)
|
118
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} shipping_amount: #{@shipping_amount}, duty_amount: #{@duty_amount},"\
|
124
|
+
" discount_amount: #{@discount_amount}, shipping_address: #{@shipping_address},"\
|
125
|
+
" ships_from_postal_code: #{@ships_from_postal_code}, line_items: #{@line_items}>"
|
126
|
+
end
|
127
|
+
|
128
|
+
# Provides a debugging-friendly string with detailed object information.
|
129
|
+
def inspect
|
130
|
+
class_name = self.class.name.split('::').last
|
131
|
+
"<#{class_name} shipping_amount: #{@shipping_amount.inspect}, duty_amount:"\
|
132
|
+
" #{@duty_amount.inspect}, discount_amount: #{@discount_amount.inspect}, shipping_address:"\
|
133
|
+
" #{@shipping_address.inspect}, ships_from_postal_code: #{@ships_from_postal_code.inspect},"\
|
134
|
+
" line_items: #{@line_items.inspect}>"
|
135
|
+
end
|
119
136
|
end
|
120
137
|
end
|
@@ -7,13 +7,13 @@ module PaypalServerSdk
|
|
7
7
|
# Liability shift indicator. The outcome of the issuer's authentication.
|
8
8
|
class LiabilityShiftIndicator
|
9
9
|
LIABILITY_SHIFT_INDICATOR = [
|
10
|
-
#
|
10
|
+
# Liability is with the merchant.
|
11
11
|
NO = 'NO'.freeze,
|
12
12
|
|
13
|
-
#
|
13
|
+
# Liability may shift to the card issuer.
|
14
14
|
POSSIBLE = 'POSSIBLE'.freeze,
|
15
15
|
|
16
|
-
#
|
16
|
+
# The authentication system is not available.
|
17
17
|
UNKNOWN = 'UNKNOWN'.freeze
|
18
18
|
].freeze
|
19
19
|
|
@@ -173,5 +173,26 @@ module PaypalServerSdk
|
|
173
173
|
total_amount: total_amount,
|
174
174
|
unit_of_measure: unit_of_measure)
|
175
175
|
end
|
176
|
+
|
177
|
+
# Provides a human-readable string representation of the object.
|
178
|
+
def to_s
|
179
|
+
class_name = self.class.name.split('::').last
|
180
|
+
"<#{class_name} name: #{@name}, quantity: #{@quantity}, description: #{@description}, sku:"\
|
181
|
+
" #{@sku}, url: #{@url}, image_url: #{@image_url}, upc: #{@upc}, unit_amount:"\
|
182
|
+
" #{@unit_amount}, tax: #{@tax}, commodity_code: #{@commodity_code}, discount_amount:"\
|
183
|
+
" #{@discount_amount}, total_amount: #{@total_amount}, unit_of_measure:"\
|
184
|
+
" #{@unit_of_measure}>"
|
185
|
+
end
|
186
|
+
|
187
|
+
# Provides a debugging-friendly string with detailed object information.
|
188
|
+
def inspect
|
189
|
+
class_name = self.class.name.split('::').last
|
190
|
+
"<#{class_name} name: #{@name.inspect}, quantity: #{@quantity.inspect}, description:"\
|
191
|
+
" #{@description.inspect}, sku: #{@sku.inspect}, url: #{@url.inspect}, image_url:"\
|
192
|
+
" #{@image_url.inspect}, upc: #{@upc.inspect}, unit_amount: #{@unit_amount.inspect}, tax:"\
|
193
|
+
" #{@tax.inspect}, commodity_code: #{@commodity_code.inspect}, discount_amount:"\
|
194
|
+
" #{@discount_amount.inspect}, total_amount: #{@total_amount.inspect}, unit_of_measure:"\
|
195
|
+
" #{@unit_of_measure.inspect}>"
|
196
|
+
end
|
176
197
|
end
|
177
198
|
end
|
@@ -71,5 +71,17 @@ module PaypalServerSdk
|
|
71
71
|
rel: rel,
|
72
72
|
method: method)
|
73
73
|
end
|
74
|
+
|
75
|
+
# Provides a human-readable string representation of the object.
|
76
|
+
def to_s
|
77
|
+
class_name = self.class.name.split('::').last
|
78
|
+
"<#{class_name} href: #{@href}, rel: #{@rel}, method: #{@method}>"
|
79
|
+
end
|
80
|
+
|
81
|
+
# Provides a debugging-friendly string with detailed object information.
|
82
|
+
def inspect
|
83
|
+
class_name = self.class.name.split('::').last
|
84
|
+
"<#{class_name} href: #{@href.inspect}, rel: #{@rel.inspect}, method: #{@method.inspect}>"
|
85
|
+
end
|
74
86
|
end
|
75
87
|
end
|
@@ -15,10 +15,10 @@ module PaypalServerSdk
|
|
15
15
|
# @return [String]
|
16
16
|
attr_accessor :currency_code
|
17
17
|
|
18
|
-
# The value, which might be
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
18
|
+
# The value, which might be: An integer for currencies like `JPY` that are
|
19
|
+
# not typically fractional. A decimal fraction for currencies like `TND`
|
20
|
+
# that are subdivided into thousandths. For the required number of decimal
|
21
|
+
# places for a currency code, see [Currency
|
22
22
|
# Codes](/api/rest/reference/currency-codes/).
|
23
23
|
# @return [String]
|
24
24
|
attr_accessor :value
|
@@ -58,5 +58,17 @@ module PaypalServerSdk
|
|
58
58
|
Money.new(currency_code: currency_code,
|
59
59
|
value: value)
|
60
60
|
end
|
61
|
+
|
62
|
+
# Provides a human-readable string representation of the object.
|
63
|
+
def to_s
|
64
|
+
class_name = self.class.name.split('::').last
|
65
|
+
"<#{class_name} currency_code: #{@currency_code}, value: #{@value}>"
|
66
|
+
end
|
67
|
+
|
68
|
+
# Provides a debugging-friendly string with detailed object information.
|
69
|
+
def inspect
|
70
|
+
class_name = self.class.name.split('::').last
|
71
|
+
"<#{class_name} currency_code: #{@currency_code.inspect}, value: #{@value.inspect}>"
|
72
|
+
end
|
61
73
|
end
|
62
74
|
end
|