From bfc3b264585e6138bc5cbca7608effa09af10aab Mon Sep 17 00:00:00 2001 From: moizgillani Date: Fri, 6 Sep 2024 15:10:54 +0500 Subject: [PATCH 1/4] repo initialized with test cases --- .codegenignore | 5 + .github/workflows/test-runner.yml | 45 + .gitignore | 1 + .rubocop.yml | 60 + Gemfile | 3 + LICENSE | 28 + README.md | 160 +- Rakefile | 12 + doc/abstract-logger.md | 47 + doc/auth/oauth-2-client-credentials-grant.md | 87 + doc/client.md | 66 + doc/controllers/orders.md | 397 ++ doc/controllers/payments.md | 327 ++ doc/controllers/vault.md | 261 ++ doc/http-request.md | 15 + doc/http-response.md | 15 + doc/logging-configuration.md | 15 + doc/models/ach-debit-response.md | 23 + doc/models/activity-timestamps.md | 25 + doc/models/address-details.md | 38 + doc/models/address.md | 33 + doc/models/amount-breakdown.md | 48 + doc/models/amount-with-breakdown.md | 48 + doc/models/apple-pay-attributes-response.md | 36 + doc/models/apple-pay-attributes.md | 36 + doc/models/apple-pay-card-response.md | 40 + doc/models/apple-pay-card.md | 38 + doc/models/apple-pay-decrypted-token-data.md | 45 + doc/models/apple-pay-payment-data-type.md | 16 + doc/models/apple-pay-payment-data.md | 29 + doc/models/apple-pay-payment-object.md | 35 + doc/models/apple-pay-payment-token.md | 36 + doc/models/apple-pay-request.md | 56 + doc/models/apple-pay-tokenized-card.md | 33 + doc/models/authentication-response.md | 28 + doc/models/authorization-incomplete-reason.md | 16 + doc/models/authorization-status-details.md | 23 + .../authorization-status-with-details.md | 27 + doc/models/authorization-status.md | 20 + .../authorization-with-additional-data.md | 44 + doc/models/authorization.md | 43 + doc/models/avs-code.md | 38 + doc/models/bancontact-payment-object.md | 31 + doc/models/bancontact-payment-request.md | 33 + doc/models/bank-payment-token.md | 44 + doc/models/bin-details.md | 33 + doc/models/blik-experience-context.md | 33 + doc/models/blik-level-0-payment-object.md | 23 + doc/models/blik-one-click-payment-object.md | 23 + doc/models/blik-one-click-payment-request.md | 29 + doc/models/blik-payment-object.md | 31 + doc/models/blik-payment-request.md | 46 + doc/models/capture-incomplete-reason.md | 26 + doc/models/capture-payment-instruction.md | 48 + doc/models/capture-request.md | 68 + doc/models/capture-status-details.md | 23 + doc/models/capture-status-with-details.md | 27 + doc/models/capture-status.md | 20 + doc/models/capture.md | 48 + doc/models/captured-payment.md | 50 + doc/models/card-attributes-response.md | 36 + doc/models/card-attributes.md | 40 + doc/models/card-brand.md | 38 + doc/models/card-experience-context.md | 25 + doc/models/card-from-request.md | 25 + doc/models/card-payment-token.md | 45 + doc/models/card-request.md | 43 + doc/models/card-response-entity.md | 44 + doc/models/card-response.md | 40 + doc/models/card-stored-credential.md | 34 + doc/models/card-supplementary-data.md | 53 + doc/models/card-type.md | 19 + doc/models/card-verification-details.md | 35 + doc/models/card-verification-method.md | 18 + .../card-verification-processor-response.md | 25 + doc/models/card-verification.md | 23 + doc/models/checkout-payment-intent.md | 16 + doc/models/cobranded-card.md | 36 + doc/models/confirm-order-request.md | 109 + doc/models/customer-information.md | 32 + doc/models/customer-request.md | 25 + .../customer-vault-payment-tokens-response.md | 274 ++ doc/models/cvv-code.md | 28 + doc/models/disbursement-mode.md | 16 + doc/models/dispute-category.md | 16 + doc/models/eci-flag.md | 20 + doc/models/enrollment-status.md | 18 + doc/models/eps-payment-object.md | 27 + doc/models/eps-payment-request.md | 33 + doc/models/error-details.md | 44 + doc/models/error-exception.md | 81 + doc/models/exchange-rate.md | 27 + doc/models/experience-context.md | 31 + doc/models/fullfillment-type.md | 18 + doc/models/giropay-payment-object.md | 27 + doc/models/giropay-payment-request.md | 33 + .../google-pay-authentication-method.md | 16 + doc/models/google-pay-card-attributes.md | 25 + doc/models/google-pay-card-response.md | 39 + doc/models/google-pay-decrypted-token-data.md | 33 + doc/models/google-pay-payment-method.md | 15 + doc/models/google-pay-request.md | 46 + doc/models/google-pay-wallet-response.md | 45 + doc/models/ideal-payment-object.md | 29 + doc/models/ideal-payment-request.md | 35 + doc/models/instrument-authorization-status.md | 20 + doc/models/item-category.md | 17 + doc/models/item.md | 45 + doc/models/level-2-card-processing-data.md | 28 + doc/models/level-3-card-processing-data.md | 48 + doc/models/liability-shift-indicator.md | 17 + doc/models/line-item.md | 48 + doc/models/link-description.md | 27 + doc/models/link-http-method.md | 22 + doc/models/money.md | 25 + doc/models/my-bank-payment-object.md | 29 + doc/models/my-bank-payment-request.md | 33 + doc/models/name.md | 25 + doc/models/net-amount-breakdown-item.md | 37 + doc/models/network-token.md | 31 + .../network-transaction-reference-entity.md | 29 + doc/models/network-transaction-reference.md | 29 + doc/models/o-auth-provider-error.md | 20 + doc/models/o-auth-provider-exception.md | 27 + doc/models/o-auth-token.md | 35 + .../order-application-context-landing-page.md | 17 + ...application-context-shipping-preference.md | 17 + .../order-application-context-user-action.md | 16 + doc/models/order-application-context.md | 35 + .../order-authorize-request-payment-source.md | 109 + doc/models/order-authorize-request.md | 106 + ...order-authorize-response-payment-source.md | 88 + doc/models/order-authorize-response.md | 98 + .../order-capture-request-payment-source.md | 109 + doc/models/order-capture-request.md | 106 + .../order-confirm-application-context.md | 41 + doc/models/order-request.md | 190 + doc/models/order-status.md | 20 + doc/models/order-tracker-item.md | 32 + doc/models/order-tracker-request.md | 48 + doc/models/order-tracker-response.md | 63 + doc/models/order-tracker-status.md | 16 + doc/models/order.md | 77 + doc/models/p24-payment-object.md | 32 + doc/models/p24-payment-request.md | 35 + doc/models/pa-res-status.md | 22 + doc/models/patch-op.md | 20 + doc/models/patch.md | 32 + doc/models/pay-pal-experience-landing-page.md | 17 + doc/models/pay-pal-experience-user-action.md | 16 + .../pay-pal-payment-token-customer-type.md | 16 + .../pay-pal-payment-token-usage-pattern.md | 20 + .../pay-pal-payment-token-usage-type.md | 16 + doc/models/pay-pal-payment-token.md | 49 + ...-pal-wallet-account-verification-status.md | 16 + .../pay-pal-wallet-attributes-response.md | 75 + doc/models/pay-pal-wallet-attributes.md | 42 + doc/models/pay-pal-wallet-customer-request.md | 32 + doc/models/pay-pal-wallet-customer.md | 34 + .../pay-pal-wallet-experience-context.md | 37 + doc/models/pay-pal-wallet-response.md | 39 + .../pay-pal-wallet-vault-instruction.md | 31 + doc/models/pay-pal-wallet-vault-response.md | 45 + doc/models/pay-pal-wallet-vault-status.md | 17 + doc/models/pay-pal-wallet.md | 44 + doc/models/payee-base.md | 25 + doc/models/payee-payment-method-preference.md | 16 + doc/models/payee.md | 25 + doc/models/payer-base.md | 25 + doc/models/payer.md | 39 + doc/models/payment-advice-code.md | 18 + doc/models/payment-authorization.md | 45 + doc/models/payment-collection.md | 114 + doc/models/payment-initiator.md | 16 + doc/models/payment-instruction.md | 40 + doc/models/payment-method-preference.md | 25 + doc/models/payment-source-response.md | 74 + doc/models/payment-source.md | 101 + doc/models/payment-supplementary-data.md | 27 + doc/models/payment-token-request-card.md | 34 + .../payment-token-request-payment-source.md | 34 + doc/models/payment-token-request.md | 40 + .../payment-token-response-payment-source.md | 119 + doc/models/payment-token-response.md | 137 + doc/models/phone-number-with-country-code.md | 25 + doc/models/phone-number.md | 23 + doc/models/phone-type.md | 19 + doc/models/phone-with-type.md | 27 + doc/models/phone.md | 27 + doc/models/platform-fee.md | 31 + doc/models/processing-instruction.md | 16 + doc/models/processor-response-code.md | 168 + doc/models/processor-response.md | 29 + doc/models/purchase-unit-request.md | 102 + doc/models/purchase-unit.md | 103 + doc/models/reauthorize-request.md | 26 + doc/models/refund-incomplete-reason.md | 15 + doc/models/refund-payment-instruction.md | 36 + doc/models/refund-platform-fee.md | 26 + doc/models/refund-request.md | 55 + doc/models/refund-status-details.md | 23 + doc/models/refund-status-with-details.md | 27 + doc/models/refund-status.md | 18 + doc/models/refund.md | 44 + doc/models/related-identifiers.md | 27 + doc/models/seller-payable-breakdown.md | 49 + doc/models/seller-protection-status.md | 17 + doc/models/seller-protection.md | 27 + doc/models/seller-receivable-breakdown.md | 53 + .../sepa-debit-authorization-details.md | 23 + doc/models/sepa-debit-response.md | 39 + .../setup-token-card-experience-context.md | 31 + doc/models/setup-token-request-card.md | 36 + .../setup-token-request-payment-source.md | 76 + doc/models/setup-token-request.md | 80 + doc/models/setup-token-response-card.md | 42 + .../setup-token-response-payment-source.md | 78 + doc/models/setup-token-response.md | 90 + doc/models/shipment-carrier.md | 1290 ++++++ doc/models/shipping-details.md | 69 + doc/models/shipping-name.md | 23 + doc/models/shipping-option.md | 34 + doc/models/shipping-preference.md | 17 + doc/models/shipping-type.md | 18 + doc/models/shipping-with-tracking-details.md | 114 + doc/models/sofort-payment-object.md | 29 + doc/models/sofort-payment-request.md | 33 + doc/models/standard-entry-class-code.md | 18 + doc/models/store-in-vault-instruction.md | 15 + .../stored-payment-source-payment-type.md | 17 + .../stored-payment-source-usage-type.md | 17 + doc/models/stored-payment-source.md | 34 + doc/models/supplementary-data.md | 54 + doc/models/supplementary-purchase-data.md | 25 + doc/models/tax-id-type.md | 16 + doc/models/tax-info.md | 25 + .../three-d-secure-authentication-response.md | 25 + doc/models/token-type.md | 16 + doc/models/token.md | 25 + doc/models/trustly-payment-object.md | 29 + doc/models/trustly-payment-request.md | 33 + doc/models/universal-product-code.md | 25 + doc/models/upc-type.md | 21 + doc/models/vault-customer.md | 23 + doc/models/vault-experience-context.md | 33 + doc/models/vault-instruction-base.md | 23 + doc/models/vault-instruction.md | 23 + doc/models/vault-pay-pal-wallet-request.md | 45 + doc/models/vault-response.md | 37 + doc/models/vault-sepa-debit-response.md | 37 + doc/models/vault-status.md | 17 + doc/models/vault-token-request.md | 25 + doc/models/vault-venmo-experience-context.md | 27 + doc/models/vault-venmo-request.md | 43 + ...vaulted-digital-wallet-shipping-details.md | 36 + doc/models/vaulted-digital-wallet.md | 44 + .../venmo-payment-token-customer-type.md | 16 + .../venmo-payment-token-usage-pattern.md | 20 + doc/models/venmo-payment-token-usage-type.md | 16 + doc/models/venmo-payment-token.md | 48 + .../venmo-wallet-additional-attributes.md | 35 + .../venmo-wallet-attributes-response.md | 36 + .../venmo-wallet-customer-information.md | 25 + doc/models/venmo-wallet-experience-context.md | 25 + doc/models/venmo-wallet-request.md | 45 + doc/models/venmo-wallet-response.md | 38 + doc/models/venmo-wallet-vault-attributes.md | 33 + doc/request-logging-configuration.md | 16 + doc/response-logging-configuration.md | 15 + doc/utility-classes.md | 35 + lib/pay_pal_restap_is.rb | 306 ++ lib/pay_pal_restap_is/api_helper.rb | 10 + lib/pay_pal_restap_is/client.rb | 89 + lib/pay_pal_restap_is/configuration.rb | 163 + .../controllers/base_controller.rb | 71 + .../o_auth_authorization_controller.rb | 42 + .../controllers/orders_controller.rb | 517 +++ .../controllers/payments_controller.rb | 400 ++ .../controllers/vault_controller.rb | 224 + .../exceptions/api_exception.rb | 10 + .../exceptions/error_exception.rb | 71 + .../exceptions/o_auth_provider_exception.rb | 48 + lib/pay_pal_restap_is/http/api_response.rb | 21 + lib/pay_pal_restap_is/http/auth/o_auth2.rb | 136 + lib/pay_pal_restap_is/http/http_call_back.rb | 10 + .../http/http_method_enum.rb | 10 + lib/pay_pal_restap_is/http/http_request.rb | 10 + lib/pay_pal_restap_is/http/http_response.rb | 10 + .../api_logging_configuration.rb | 114 + lib/pay_pal_restap_is/logging/sdk_logger.rb | 17 + .../models/ach_debit_response.rb | 50 + .../models/activity_timestamps.rb | 68 + lib/pay_pal_restap_is/models/address.rb | 116 + .../models/address_details.rb | 160 + .../models/amount_breakdown.rb | 115 + .../models/amount_with_breakdown.rb | 80 + .../models/apple_pay_attributes.rb | 60 + .../models/apple_pay_attributes_response.rb | 50 + .../models/apple_pay_card.rb | 94 + .../models/apple_pay_card_response.rb | 167 + .../models/apple_pay_decrypted_token_data.rb | 95 + .../models/apple_pay_payment_data.rb | 83 + .../models/apple_pay_payment_data_type.rb | 24 + .../models/apple_pay_payment_object.rb | 114 + .../models/apple_pay_payment_token.rb | 51 + .../models/apple_pay_request.rb | 137 + .../models/apple_pay_tokenized_card.rb | 113 + .../models/authentication_response.rb | 61 + lib/pay_pal_restap_is/models/authorization.rb | 192 + .../models/authorization_incomplete_reason.rb | 23 + .../models/authorization_status.rb | 35 + .../models/authorization_status_details.rb | 50 + .../authorization_status_with_details.rb | 60 + .../authorization_with_additional_data.rb | 205 + lib/pay_pal_restap_is/models/avs_code.rb | 90 + .../models/bancontact_payment_object.rb | 95 + .../models/bancontact_payment_request.rb | 73 + .../models/bank_payment_token.rb | 59 + lib/pay_pal_restap_is/models/base_model.rb | 62 + lib/pay_pal_restap_is/models/bin_details.rb | 88 + .../models/blik_experience_context.rb | 122 + .../models/blik_level0_payment_object.rb | 48 + .../models/blik_one_click_payment_object.rb | 52 + .../models/blik_one_click_payment_request.rb | 82 + .../models/blik_payment_object.rb | 86 + .../models/blik_payment_request.rb | 105 + lib/pay_pal_restap_is/models/capture.rb | 228 + .../models/capture_incomplete_reason.rb | 55 + .../models/capture_payment_instruction.rb | 89 + .../models/capture_request.rb | 108 + .../models/capture_status.rb | 35 + .../models/capture_status_details.rb | 50 + .../models/capture_status_with_details.rb | 60 + .../models/captured_payment.rb | 248 ++ .../models/card_attributes.rb | 70 + .../models/card_attributes_response.rb | 50 + lib/pay_pal_restap_is/models/card_brand.rb | 90 + .../models/card_experience_context.rb | 59 + .../models/card_from_request.rb | 60 + .../models/card_payment_token.rb | 166 + lib/pay_pal_restap_is/models/card_request.rb | 165 + lib/pay_pal_restap_is/models/card_response.rb | 139 + .../models/card_response_entity.rb | 156 + .../models/card_stored_credential.rb | 95 + .../models/card_supplementary_data.rb | 71 + lib/pay_pal_restap_is/models/card_type.rb | 32 + .../models/card_verification.rb | 51 + .../models/card_verification_details.rb | 111 + .../models/card_verification_method.rb | 29 + .../card_verification_processor_response.rb | 62 + .../models/checkout_payment_intent.rb | 24 + .../models/cobranded_card.rb | 70 + .../models/confirm_order_request.rb | 74 + .../models/customer_information.rb | 72 + .../models/customer_request.rb | 62 + .../customer_vault_payment_tokens_response.rb | 105 + lib/pay_pal_restap_is/models/cvv_code.rb | 60 + .../models/disbursement_mode.rb | 23 + .../models/dispute_category.rb | 23 + lib/pay_pal_restap_is/models/eci_flag.rb | 39 + .../models/enrollment_status.rb | 29 + .../models/eps_payment_object.rb | 74 + .../models/eps_payment_request.rb | 73 + lib/pay_pal_restap_is/models/error_details.rb | 110 + lib/pay_pal_restap_is/models/exchange_rate.rb | 75 + .../models/experience_context.rb | 98 + .../models/fullfillment_type.rb | 31 + .../models/giropay_payment_object.rb | 74 + .../models/giropay_payment_request.rb | 73 + .../google_pay_authentication_method.rb | 23 + .../models/google_pay_card_attributes.rb | 51 + .../models/google_pay_card_response.rb | 104 + .../models/google_pay_decrypted_token_data.rb | 105 + .../models/google_pay_payment_method.rb | 20 + .../models/google_pay_request.rb | 118 + .../models/google_pay_wallet_response.rb | 85 + .../models/ideal_payment_object.rb | 85 + .../models/ideal_payment_request.rb | 83 + .../models/instrument_authorization_status.rb | 35 + lib/pay_pal_restap_is/models/item.rb | 134 + lib/pay_pal_restap_is/models/item_category.rb | 26 + .../models/level2_card_processing_data.rb | 64 + .../models/level3_card_processing_data.rb | 120 + .../models/liability_shift_indicator.rb | 26 + lib/pay_pal_restap_is/models/line_item.rb | 176 + .../models/link_description.rb | 75 + .../models/link_http_method.rb | 41 + lib/pay_pal_restap_is/models/money.rb | 62 + .../models/my_bank_payment_object.rb | 85 + .../models/my_bank_payment_request.rb | 73 + lib/pay_pal_restap_is/models/name.rb | 61 + .../models/net_amount_breakdown_item.rb | 73 + lib/pay_pal_restap_is/models/network_token.rb | 95 + .../models/network_transaction_reference.rb | 90 + .../network_transaction_reference_entity.rb | 88 + .../models/o_auth_provider_error.rb | 45 + lib/pay_pal_restap_is/models/o_auth_token.rb | 106 + lib/pay_pal_restap_is/models/order.rb | 178 + .../models/order_application_context.rb | 193 + .../order_application_context_landing_page.rb | 32 + ...application_context_shipping_preference.rb | 34 + .../order_application_context_user_action.rb | 29 + .../models/order_authorize_request.rb | 51 + .../order_authorize_request_payment_source.rb | 104 + .../models/order_authorize_response.rb | 171 + ...order_authorize_response_payment_source.rb | 88 + .../models/order_capture_request.rb | 51 + .../order_capture_request_payment_source.rb | 104 + .../order_confirm_application_context.rb | 109 + lib/pay_pal_restap_is/models/order_request.rb | 103 + lib/pay_pal_restap_is/models/order_status.rb | 35 + .../models/order_tracker_item.rb | 99 + .../models/order_tracker_request.rb | 116 + .../models/order_tracker_response.rb | 122 + .../models/order_tracker_status.rb | 23 + .../models/p24_payment_object.rb | 108 + .../models/p24_payment_request.rb | 85 + lib/pay_pal_restap_is/models/pa_res_status.rb | 42 + lib/pay_pal_restap_is/models/patch.rb | 83 + lib/pay_pal_restap_is/models/patch_op.rb | 35 + .../models/pay_pal_experience_landing_page.rb | 26 + .../models/pay_pal_experience_user_action.rb | 24 + .../models/pay_pal_payment_token.rb | 180 + .../pay_pal_payment_token_customer_type.rb | 25 + .../pay_pal_payment_token_usage_pattern.rb | 35 + .../pay_pal_payment_token_usage_type.rb | 23 + .../models/pay_pal_wallet.rb | 158 + ..._pal_wallet_account_verification_status.rb | 24 + .../models/pay_pal_wallet_attributes.rb | 59 + .../pay_pal_wallet_attributes_response.rb | 70 + .../models/pay_pal_wallet_customer.rb | 85 + .../models/pay_pal_wallet_customer_request.rb | 85 + .../pay_pal_wallet_experience_context.rb | 140 + .../models/pay_pal_wallet_response.rb | 156 + .../pay_pal_wallet_vault_instruction.rb | 115 + .../models/pay_pal_wallet_vault_response.rb | 86 + .../models/pay_pal_wallet_vault_status.rb | 26 + lib/pay_pal_restap_is/models/payee.rb | 65 + lib/pay_pal_restap_is/models/payee_base.rb | 64 + .../models/payee_payment_method_preference.rb | 23 + lib/pay_pal_restap_is/models/payer.rb | 120 + lib/pay_pal_restap_is/models/payer_base.rb | 64 + .../models/payment_advice_code.rb | 30 + .../models/payment_authorization.rb | 212 + .../models/payment_collection.rb | 99 + .../models/payment_initiator.rb | 23 + .../models/payment_instruction.rb | 105 + .../models/payment_method_preference.rb | 72 + .../models/payment_source.rb | 187 + .../models/payment_source_response.rb | 171 + .../models/payment_supplementary_data.rb | 50 + .../models/payment_token_request.rb | 60 + .../models/payment_token_request_card.rb | 134 + .../payment_token_request_payment_source.rb | 59 + .../models/payment_token_response.rb | 87 + .../payment_token_response_payment_source.rb | 87 + lib/pay_pal_restap_is/models/phone.rb | 77 + lib/pay_pal_restap_is/models/phone_number.rb | 54 + .../models/phone_number_with_country_code.rb | 66 + lib/pay_pal_restap_is/models/phone_type.rb | 32 + .../models/phone_with_type.rb | 59 + lib/pay_pal_restap_is/models/platform_fee.rb | 63 + .../models/processing_instruction.rb | 23 + .../models/processor_response.rb | 83 + .../models/processor_response_code.rb | 479 ++ lib/pay_pal_restap_is/models/purchase_unit.rb | 215 + .../models/purchase_unit_request.rb | 193 + .../models/reauthorize_request.rb | 62 + lib/pay_pal_restap_is/models/refund.rb | 195 + .../models/refund_incomplete_reason.rb | 20 + .../models/refund_payment_instruction.rb | 68 + .../models/refund_platform_fee.rb | 52 + .../models/refund_request.rb | 100 + lib/pay_pal_restap_is/models/refund_status.rb | 29 + .../models/refund_status_details.rb | 50 + .../models/refund_status_with_details.rb | 60 + .../models/related_identifiers.rb | 69 + .../models/seller_payable_breakdown.rb | 156 + .../models/seller_protection.rb | 65 + .../models/seller_protection_status.rb | 29 + .../models/seller_receivable_breakdown.rb | 129 + .../sepa_debit_authorization_details.rb | 50 + .../models/sepa_debit_response.rb | 87 + .../setup_token_card_experience_context.rb | 103 + .../models/setup_token_request.rb | 60 + .../models/setup_token_request_card.rb | 150 + .../setup_token_request_payment_source.rb | 77 + .../models/setup_token_response.rb | 106 + .../models/setup_token_response_card.rb | 156 + .../setup_token_response_payment_source.rb | 68 + .../models/shipment_carrier.rb | 3852 +++++++++++++++++ .../models/shipping_details.rb | 94 + lib/pay_pal_restap_is/models/shipping_name.rb | 50 + .../models/shipping_option.rb | 94 + .../models/shipping_preference.rb | 26 + lib/pay_pal_restap_is/models/shipping_type.rb | 29 + .../models/shipping_with_tracking_details.rb | 113 + .../models/sofort_payment_object.rb | 85 + .../models/sofort_payment_request.rb | 73 + .../models/standard_entry_class_code.rb | 36 + .../models/store_in_vault_instruction.rb | 20 + .../models/stored_payment_source.rb | 95 + .../stored_payment_source_payment_type.rb | 26 + .../stored_payment_source_usage_type.rb | 27 + .../models/supplementary_data.rb | 58 + .../models/supplementary_purchase_data.rb | 63 + lib/pay_pal_restap_is/models/tax_id_type.rb | 23 + lib/pay_pal_restap_is/models/tax_info.rb | 57 + .../three_d_secure_authentication_response.rb | 62 + lib/pay_pal_restap_is/models/token.rb | 56 + lib/pay_pal_restap_is/models/token_type.rb | 23 + .../models/trustly_payment_object.rb | 85 + .../models/trustly_payment_request.rb | 73 + .../models/universal_product_code.rb | 56 + lib/pay_pal_restap_is/models/upc_type.rb | 38 + .../models/vault_customer.rb | 50 + .../models/vault_experience_context.rb | 112 + .../models/vault_instruction.rb | 50 + .../models/vault_instruction_base.rb | 52 + .../models/vault_pay_pal_wallet_request.rb | 115 + .../models/vault_response.rb | 86 + .../models/vault_sepa_debit_response.rb | 76 + lib/pay_pal_restap_is/models/vault_status.rb | 26 + .../models/vault_token_request.rb | 56 + .../models/vault_venmo_experience_context.rb | 73 + .../models/vault_venmo_request.rb | 115 + .../models/vaulted_digital_wallet.rb | 106 + ...vaulted_digital_wallet_shipping_details.rb | 75 + .../models/venmo_payment_token.rb | 169 + .../venmo_payment_token_customer_type.rb | 25 + .../venmo_payment_token_usage_pattern.rb | 35 + .../models/venmo_payment_token_usage_type.rb | 23 + .../venmo_wallet_additional_attributes.rb | 60 + .../venmo_wallet_attributes_response.rb | 50 + .../venmo_wallet_customer_information.rb | 63 + .../models/venmo_wallet_experience_context.rb | 65 + .../models/venmo_wallet_request.rb | 89 + .../models/venmo_wallet_response.rb | 120 + .../models/venmo_wallet_vault_attributes.rb | 114 + .../utilities/date_time_helper.rb | 11 + .../utilities/file_wrapper.rb | 16 + pay_pal_restap_is.gemspec | 16 + test/flows/flow_test_base.rb | 21 + .../tests/test_add_shipping_tracker_flow.rb | 108 + test/flows/tests/test_authorization_flow.rb | 75 + .../tests/test_authorize_and_capture_flow.rb | 88 + test/flows/tests/test_confirm_order_flow.rb | 69 + test/flows/tests/test_patch_order_flow.rb | 100 + .../test_payment_method_with_purchase_flow.rb | 82 + ...st_payment_method_without_purchase_flow.rb | 88 + test/flows/tests/test_refund_flow.rb | 76 + ...ecure_3d_authentication_multi_step_flow.rb | 105 + ...cure_3d_authentication_single_step_flow.rb | 90 + .../tests/test_standard_checkout_flow.rb | 58 + test/flows/ui_flow_executor.rb | 127 + test/unit_tests/controller_test_base.rb | 33 + test/unit_tests/test_orders_controller.rb | 158 + test/unit_tests/test_payments_controller.rb | 150 + test/unit_tests/test_vault_controller.rb | 186 + 559 files changed, 40583 insertions(+), 1 deletion(-) create mode 100644 .codegenignore create mode 100644 .github/workflows/test-runner.yml create mode 100644 .gitignore create mode 100644 .rubocop.yml create mode 100644 Gemfile create mode 100644 LICENSE create mode 100644 Rakefile create mode 100644 doc/abstract-logger.md create mode 100644 doc/auth/oauth-2-client-credentials-grant.md create mode 100644 doc/client.md create mode 100644 doc/controllers/orders.md create mode 100644 doc/controllers/payments.md create mode 100644 doc/controllers/vault.md create mode 100644 doc/http-request.md create mode 100644 doc/http-response.md create mode 100644 doc/logging-configuration.md create mode 100644 doc/models/ach-debit-response.md create mode 100644 doc/models/activity-timestamps.md create mode 100644 doc/models/address-details.md create mode 100644 doc/models/address.md create mode 100644 doc/models/amount-breakdown.md create mode 100644 doc/models/amount-with-breakdown.md create mode 100644 doc/models/apple-pay-attributes-response.md create mode 100644 doc/models/apple-pay-attributes.md create mode 100644 doc/models/apple-pay-card-response.md create mode 100644 doc/models/apple-pay-card.md create mode 100644 doc/models/apple-pay-decrypted-token-data.md create mode 100644 doc/models/apple-pay-payment-data-type.md create mode 100644 doc/models/apple-pay-payment-data.md create mode 100644 doc/models/apple-pay-payment-object.md create mode 100644 doc/models/apple-pay-payment-token.md create mode 100644 doc/models/apple-pay-request.md create mode 100644 doc/models/apple-pay-tokenized-card.md create mode 100644 doc/models/authentication-response.md create mode 100644 doc/models/authorization-incomplete-reason.md create mode 100644 doc/models/authorization-status-details.md create mode 100644 doc/models/authorization-status-with-details.md create mode 100644 doc/models/authorization-status.md create mode 100644 doc/models/authorization-with-additional-data.md create mode 100644 doc/models/authorization.md create mode 100644 doc/models/avs-code.md create mode 100644 doc/models/bancontact-payment-object.md create mode 100644 doc/models/bancontact-payment-request.md create mode 100644 doc/models/bank-payment-token.md create mode 100644 doc/models/bin-details.md create mode 100644 doc/models/blik-experience-context.md create mode 100644 doc/models/blik-level-0-payment-object.md create mode 100644 doc/models/blik-one-click-payment-object.md create mode 100644 doc/models/blik-one-click-payment-request.md create mode 100644 doc/models/blik-payment-object.md create mode 100644 doc/models/blik-payment-request.md create mode 100644 doc/models/capture-incomplete-reason.md create mode 100644 doc/models/capture-payment-instruction.md create mode 100644 doc/models/capture-request.md create mode 100644 doc/models/capture-status-details.md create mode 100644 doc/models/capture-status-with-details.md create mode 100644 doc/models/capture-status.md create mode 100644 doc/models/capture.md create mode 100644 doc/models/captured-payment.md create mode 100644 doc/models/card-attributes-response.md create mode 100644 doc/models/card-attributes.md create mode 100644 doc/models/card-brand.md create mode 100644 doc/models/card-experience-context.md create mode 100644 doc/models/card-from-request.md create mode 100644 doc/models/card-payment-token.md create mode 100644 doc/models/card-request.md create mode 100644 doc/models/card-response-entity.md create mode 100644 doc/models/card-response.md create mode 100644 doc/models/card-stored-credential.md create mode 100644 doc/models/card-supplementary-data.md create mode 100644 doc/models/card-type.md create mode 100644 doc/models/card-verification-details.md create mode 100644 doc/models/card-verification-method.md create mode 100644 doc/models/card-verification-processor-response.md create mode 100644 doc/models/card-verification.md create mode 100644 doc/models/checkout-payment-intent.md create mode 100644 doc/models/cobranded-card.md create mode 100644 doc/models/confirm-order-request.md create mode 100644 doc/models/customer-information.md create mode 100644 doc/models/customer-request.md create mode 100644 doc/models/customer-vault-payment-tokens-response.md create mode 100644 doc/models/cvv-code.md create mode 100644 doc/models/disbursement-mode.md create mode 100644 doc/models/dispute-category.md create mode 100644 doc/models/eci-flag.md create mode 100644 doc/models/enrollment-status.md create mode 100644 doc/models/eps-payment-object.md create mode 100644 doc/models/eps-payment-request.md create mode 100644 doc/models/error-details.md create mode 100644 doc/models/error-exception.md create mode 100644 doc/models/exchange-rate.md create mode 100644 doc/models/experience-context.md create mode 100644 doc/models/fullfillment-type.md create mode 100644 doc/models/giropay-payment-object.md create mode 100644 doc/models/giropay-payment-request.md create mode 100644 doc/models/google-pay-authentication-method.md create mode 100644 doc/models/google-pay-card-attributes.md create mode 100644 doc/models/google-pay-card-response.md create mode 100644 doc/models/google-pay-decrypted-token-data.md create mode 100644 doc/models/google-pay-payment-method.md create mode 100644 doc/models/google-pay-request.md create mode 100644 doc/models/google-pay-wallet-response.md create mode 100644 doc/models/ideal-payment-object.md create mode 100644 doc/models/ideal-payment-request.md create mode 100644 doc/models/instrument-authorization-status.md create mode 100644 doc/models/item-category.md create mode 100644 doc/models/item.md create mode 100644 doc/models/level-2-card-processing-data.md create mode 100644 doc/models/level-3-card-processing-data.md create mode 100644 doc/models/liability-shift-indicator.md create mode 100644 doc/models/line-item.md create mode 100644 doc/models/link-description.md create mode 100644 doc/models/link-http-method.md create mode 100644 doc/models/money.md create mode 100644 doc/models/my-bank-payment-object.md create mode 100644 doc/models/my-bank-payment-request.md create mode 100644 doc/models/name.md create mode 100644 doc/models/net-amount-breakdown-item.md create mode 100644 doc/models/network-token.md create mode 100644 doc/models/network-transaction-reference-entity.md create mode 100644 doc/models/network-transaction-reference.md create mode 100644 doc/models/o-auth-provider-error.md create mode 100644 doc/models/o-auth-provider-exception.md create mode 100644 doc/models/o-auth-token.md create mode 100644 doc/models/order-application-context-landing-page.md create mode 100644 doc/models/order-application-context-shipping-preference.md create mode 100644 doc/models/order-application-context-user-action.md create mode 100644 doc/models/order-application-context.md create mode 100644 doc/models/order-authorize-request-payment-source.md create mode 100644 doc/models/order-authorize-request.md create mode 100644 doc/models/order-authorize-response-payment-source.md create mode 100644 doc/models/order-authorize-response.md create mode 100644 doc/models/order-capture-request-payment-source.md create mode 100644 doc/models/order-capture-request.md create mode 100644 doc/models/order-confirm-application-context.md create mode 100644 doc/models/order-request.md create mode 100644 doc/models/order-status.md create mode 100644 doc/models/order-tracker-item.md create mode 100644 doc/models/order-tracker-request.md create mode 100644 doc/models/order-tracker-response.md create mode 100644 doc/models/order-tracker-status.md create mode 100644 doc/models/order.md create mode 100644 doc/models/p24-payment-object.md create mode 100644 doc/models/p24-payment-request.md create mode 100644 doc/models/pa-res-status.md create mode 100644 doc/models/patch-op.md create mode 100644 doc/models/patch.md create mode 100644 doc/models/pay-pal-experience-landing-page.md create mode 100644 doc/models/pay-pal-experience-user-action.md create mode 100644 doc/models/pay-pal-payment-token-customer-type.md create mode 100644 doc/models/pay-pal-payment-token-usage-pattern.md create mode 100644 doc/models/pay-pal-payment-token-usage-type.md create mode 100644 doc/models/pay-pal-payment-token.md create mode 100644 doc/models/pay-pal-wallet-account-verification-status.md create mode 100644 doc/models/pay-pal-wallet-attributes-response.md create mode 100644 doc/models/pay-pal-wallet-attributes.md create mode 100644 doc/models/pay-pal-wallet-customer-request.md create mode 100644 doc/models/pay-pal-wallet-customer.md create mode 100644 doc/models/pay-pal-wallet-experience-context.md create mode 100644 doc/models/pay-pal-wallet-response.md create mode 100644 doc/models/pay-pal-wallet-vault-instruction.md create mode 100644 doc/models/pay-pal-wallet-vault-response.md create mode 100644 doc/models/pay-pal-wallet-vault-status.md create mode 100644 doc/models/pay-pal-wallet.md create mode 100644 doc/models/payee-base.md create mode 100644 doc/models/payee-payment-method-preference.md create mode 100644 doc/models/payee.md create mode 100644 doc/models/payer-base.md create mode 100644 doc/models/payer.md create mode 100644 doc/models/payment-advice-code.md create mode 100644 doc/models/payment-authorization.md create mode 100644 doc/models/payment-collection.md create mode 100644 doc/models/payment-initiator.md create mode 100644 doc/models/payment-instruction.md create mode 100644 doc/models/payment-method-preference.md create mode 100644 doc/models/payment-source-response.md create mode 100644 doc/models/payment-source.md create mode 100644 doc/models/payment-supplementary-data.md create mode 100644 doc/models/payment-token-request-card.md create mode 100644 doc/models/payment-token-request-payment-source.md create mode 100644 doc/models/payment-token-request.md create mode 100644 doc/models/payment-token-response-payment-source.md create mode 100644 doc/models/payment-token-response.md create mode 100644 doc/models/phone-number-with-country-code.md create mode 100644 doc/models/phone-number.md create mode 100644 doc/models/phone-type.md create mode 100644 doc/models/phone-with-type.md create mode 100644 doc/models/phone.md create mode 100644 doc/models/platform-fee.md create mode 100644 doc/models/processing-instruction.md create mode 100644 doc/models/processor-response-code.md create mode 100644 doc/models/processor-response.md create mode 100644 doc/models/purchase-unit-request.md create mode 100644 doc/models/purchase-unit.md create mode 100644 doc/models/reauthorize-request.md create mode 100644 doc/models/refund-incomplete-reason.md create mode 100644 doc/models/refund-payment-instruction.md create mode 100644 doc/models/refund-platform-fee.md create mode 100644 doc/models/refund-request.md create mode 100644 doc/models/refund-status-details.md create mode 100644 doc/models/refund-status-with-details.md create mode 100644 doc/models/refund-status.md create mode 100644 doc/models/refund.md create mode 100644 doc/models/related-identifiers.md create mode 100644 doc/models/seller-payable-breakdown.md create mode 100644 doc/models/seller-protection-status.md create mode 100644 doc/models/seller-protection.md create mode 100644 doc/models/seller-receivable-breakdown.md create mode 100644 doc/models/sepa-debit-authorization-details.md create mode 100644 doc/models/sepa-debit-response.md create mode 100644 doc/models/setup-token-card-experience-context.md create mode 100644 doc/models/setup-token-request-card.md create mode 100644 doc/models/setup-token-request-payment-source.md create mode 100644 doc/models/setup-token-request.md create mode 100644 doc/models/setup-token-response-card.md create mode 100644 doc/models/setup-token-response-payment-source.md create mode 100644 doc/models/setup-token-response.md create mode 100644 doc/models/shipment-carrier.md create mode 100644 doc/models/shipping-details.md create mode 100644 doc/models/shipping-name.md create mode 100644 doc/models/shipping-option.md create mode 100644 doc/models/shipping-preference.md create mode 100644 doc/models/shipping-type.md create mode 100644 doc/models/shipping-with-tracking-details.md create mode 100644 doc/models/sofort-payment-object.md create mode 100644 doc/models/sofort-payment-request.md create mode 100644 doc/models/standard-entry-class-code.md create mode 100644 doc/models/store-in-vault-instruction.md create mode 100644 doc/models/stored-payment-source-payment-type.md create mode 100644 doc/models/stored-payment-source-usage-type.md create mode 100644 doc/models/stored-payment-source.md create mode 100644 doc/models/supplementary-data.md create mode 100644 doc/models/supplementary-purchase-data.md create mode 100644 doc/models/tax-id-type.md create mode 100644 doc/models/tax-info.md create mode 100644 doc/models/three-d-secure-authentication-response.md create mode 100644 doc/models/token-type.md create mode 100644 doc/models/token.md create mode 100644 doc/models/trustly-payment-object.md create mode 100644 doc/models/trustly-payment-request.md create mode 100644 doc/models/universal-product-code.md create mode 100644 doc/models/upc-type.md create mode 100644 doc/models/vault-customer.md create mode 100644 doc/models/vault-experience-context.md create mode 100644 doc/models/vault-instruction-base.md create mode 100644 doc/models/vault-instruction.md create mode 100644 doc/models/vault-pay-pal-wallet-request.md create mode 100644 doc/models/vault-response.md create mode 100644 doc/models/vault-sepa-debit-response.md create mode 100644 doc/models/vault-status.md create mode 100644 doc/models/vault-token-request.md create mode 100644 doc/models/vault-venmo-experience-context.md create mode 100644 doc/models/vault-venmo-request.md create mode 100644 doc/models/vaulted-digital-wallet-shipping-details.md create mode 100644 doc/models/vaulted-digital-wallet.md create mode 100644 doc/models/venmo-payment-token-customer-type.md create mode 100644 doc/models/venmo-payment-token-usage-pattern.md create mode 100644 doc/models/venmo-payment-token-usage-type.md create mode 100644 doc/models/venmo-payment-token.md create mode 100644 doc/models/venmo-wallet-additional-attributes.md create mode 100644 doc/models/venmo-wallet-attributes-response.md create mode 100644 doc/models/venmo-wallet-customer-information.md create mode 100644 doc/models/venmo-wallet-experience-context.md create mode 100644 doc/models/venmo-wallet-request.md create mode 100644 doc/models/venmo-wallet-response.md create mode 100644 doc/models/venmo-wallet-vault-attributes.md create mode 100644 doc/request-logging-configuration.md create mode 100644 doc/response-logging-configuration.md create mode 100644 doc/utility-classes.md create mode 100644 lib/pay_pal_restap_is.rb create mode 100644 lib/pay_pal_restap_is/api_helper.rb create mode 100644 lib/pay_pal_restap_is/client.rb create mode 100644 lib/pay_pal_restap_is/configuration.rb create mode 100644 lib/pay_pal_restap_is/controllers/base_controller.rb create mode 100644 lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb create mode 100644 lib/pay_pal_restap_is/controllers/orders_controller.rb create mode 100644 lib/pay_pal_restap_is/controllers/payments_controller.rb create mode 100644 lib/pay_pal_restap_is/controllers/vault_controller.rb create mode 100644 lib/pay_pal_restap_is/exceptions/api_exception.rb create mode 100644 lib/pay_pal_restap_is/exceptions/error_exception.rb create mode 100644 lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb create mode 100644 lib/pay_pal_restap_is/http/api_response.rb create mode 100644 lib/pay_pal_restap_is/http/auth/o_auth2.rb create mode 100644 lib/pay_pal_restap_is/http/http_call_back.rb create mode 100644 lib/pay_pal_restap_is/http/http_method_enum.rb create mode 100644 lib/pay_pal_restap_is/http/http_request.rb create mode 100644 lib/pay_pal_restap_is/http/http_response.rb create mode 100644 lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb create mode 100644 lib/pay_pal_restap_is/logging/sdk_logger.rb create mode 100644 lib/pay_pal_restap_is/models/ach_debit_response.rb create mode 100644 lib/pay_pal_restap_is/models/activity_timestamps.rb create mode 100644 lib/pay_pal_restap_is/models/address.rb create mode 100644 lib/pay_pal_restap_is/models/address_details.rb create mode 100644 lib/pay_pal_restap_is/models/amount_breakdown.rb create mode 100644 lib/pay_pal_restap_is/models/amount_with_breakdown.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_attributes.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_card.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_card_response.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_data.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_token.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_request.rb create mode 100644 lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb create mode 100644 lib/pay_pal_restap_is/models/authentication_response.rb create mode 100644 lib/pay_pal_restap_is/models/authorization.rb create mode 100644 lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb create mode 100644 lib/pay_pal_restap_is/models/authorization_status.rb create mode 100644 lib/pay_pal_restap_is/models/authorization_status_details.rb create mode 100644 lib/pay_pal_restap_is/models/authorization_status_with_details.rb create mode 100644 lib/pay_pal_restap_is/models/authorization_with_additional_data.rb create mode 100644 lib/pay_pal_restap_is/models/avs_code.rb create mode 100644 lib/pay_pal_restap_is/models/bancontact_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/bancontact_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/bank_payment_token.rb create mode 100644 lib/pay_pal_restap_is/models/base_model.rb create mode 100644 lib/pay_pal_restap_is/models/bin_details.rb create mode 100644 lib/pay_pal_restap_is/models/blik_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/blik_level0_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/blik_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/blik_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/capture.rb create mode 100644 lib/pay_pal_restap_is/models/capture_incomplete_reason.rb create mode 100644 lib/pay_pal_restap_is/models/capture_payment_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/capture_request.rb create mode 100644 lib/pay_pal_restap_is/models/capture_status.rb create mode 100644 lib/pay_pal_restap_is/models/capture_status_details.rb create mode 100644 lib/pay_pal_restap_is/models/capture_status_with_details.rb create mode 100644 lib/pay_pal_restap_is/models/captured_payment.rb create mode 100644 lib/pay_pal_restap_is/models/card_attributes.rb create mode 100644 lib/pay_pal_restap_is/models/card_attributes_response.rb create mode 100644 lib/pay_pal_restap_is/models/card_brand.rb create mode 100644 lib/pay_pal_restap_is/models/card_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/card_from_request.rb create mode 100644 lib/pay_pal_restap_is/models/card_payment_token.rb create mode 100644 lib/pay_pal_restap_is/models/card_request.rb create mode 100644 lib/pay_pal_restap_is/models/card_response.rb create mode 100644 lib/pay_pal_restap_is/models/card_response_entity.rb create mode 100644 lib/pay_pal_restap_is/models/card_stored_credential.rb create mode 100644 lib/pay_pal_restap_is/models/card_supplementary_data.rb create mode 100644 lib/pay_pal_restap_is/models/card_type.rb create mode 100644 lib/pay_pal_restap_is/models/card_verification.rb create mode 100644 lib/pay_pal_restap_is/models/card_verification_details.rb create mode 100644 lib/pay_pal_restap_is/models/card_verification_method.rb create mode 100644 lib/pay_pal_restap_is/models/card_verification_processor_response.rb create mode 100644 lib/pay_pal_restap_is/models/checkout_payment_intent.rb create mode 100644 lib/pay_pal_restap_is/models/cobranded_card.rb create mode 100644 lib/pay_pal_restap_is/models/confirm_order_request.rb create mode 100644 lib/pay_pal_restap_is/models/customer_information.rb create mode 100644 lib/pay_pal_restap_is/models/customer_request.rb create mode 100644 lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb create mode 100644 lib/pay_pal_restap_is/models/cvv_code.rb create mode 100644 lib/pay_pal_restap_is/models/disbursement_mode.rb create mode 100644 lib/pay_pal_restap_is/models/dispute_category.rb create mode 100644 lib/pay_pal_restap_is/models/eci_flag.rb create mode 100644 lib/pay_pal_restap_is/models/enrollment_status.rb create mode 100644 lib/pay_pal_restap_is/models/eps_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/eps_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/error_details.rb create mode 100644 lib/pay_pal_restap_is/models/exchange_rate.rb create mode 100644 lib/pay_pal_restap_is/models/experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/fullfillment_type.rb create mode 100644 lib/pay_pal_restap_is/models/giropay_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/giropay_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_authentication_method.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_card_attributes.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_card_response.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_payment_method.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_request.rb create mode 100644 lib/pay_pal_restap_is/models/google_pay_wallet_response.rb create mode 100644 lib/pay_pal_restap_is/models/ideal_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/ideal_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/instrument_authorization_status.rb create mode 100644 lib/pay_pal_restap_is/models/item.rb create mode 100644 lib/pay_pal_restap_is/models/item_category.rb create mode 100644 lib/pay_pal_restap_is/models/level2_card_processing_data.rb create mode 100644 lib/pay_pal_restap_is/models/level3_card_processing_data.rb create mode 100644 lib/pay_pal_restap_is/models/liability_shift_indicator.rb create mode 100644 lib/pay_pal_restap_is/models/line_item.rb create mode 100644 lib/pay_pal_restap_is/models/link_description.rb create mode 100644 lib/pay_pal_restap_is/models/link_http_method.rb create mode 100644 lib/pay_pal_restap_is/models/money.rb create mode 100644 lib/pay_pal_restap_is/models/my_bank_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/my_bank_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/name.rb create mode 100644 lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb create mode 100644 lib/pay_pal_restap_is/models/network_token.rb create mode 100644 lib/pay_pal_restap_is/models/network_transaction_reference.rb create mode 100644 lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb create mode 100644 lib/pay_pal_restap_is/models/o_auth_provider_error.rb create mode 100644 lib/pay_pal_restap_is/models/o_auth_token.rb create mode 100644 lib/pay_pal_restap_is/models/order.rb create mode 100644 lib/pay_pal_restap_is/models/order_application_context.rb create mode 100644 lib/pay_pal_restap_is/models/order_application_context_landing_page.rb create mode 100644 lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb create mode 100644 lib/pay_pal_restap_is/models/order_application_context_user_action.rb create mode 100644 lib/pay_pal_restap_is/models/order_authorize_request.rb create mode 100644 lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/order_authorize_response.rb create mode 100644 lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/order_capture_request.rb create mode 100644 lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/order_confirm_application_context.rb create mode 100644 lib/pay_pal_restap_is/models/order_request.rb create mode 100644 lib/pay_pal_restap_is/models/order_status.rb create mode 100644 lib/pay_pal_restap_is/models/order_tracker_item.rb create mode 100644 lib/pay_pal_restap_is/models/order_tracker_request.rb create mode 100644 lib/pay_pal_restap_is/models/order_tracker_response.rb create mode 100644 lib/pay_pal_restap_is/models/order_tracker_status.rb create mode 100644 lib/pay_pal_restap_is/models/p24_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/p24_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/pa_res_status.rb create mode 100644 lib/pay_pal_restap_is/models/patch.rb create mode 100644 lib/pay_pal_restap_is/models/patch_op.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb create mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb create mode 100644 lib/pay_pal_restap_is/models/payee.rb create mode 100644 lib/pay_pal_restap_is/models/payee_base.rb create mode 100644 lib/pay_pal_restap_is/models/payee_payment_method_preference.rb create mode 100644 lib/pay_pal_restap_is/models/payer.rb create mode 100644 lib/pay_pal_restap_is/models/payer_base.rb create mode 100644 lib/pay_pal_restap_is/models/payment_advice_code.rb create mode 100644 lib/pay_pal_restap_is/models/payment_authorization.rb create mode 100644 lib/pay_pal_restap_is/models/payment_collection.rb create mode 100644 lib/pay_pal_restap_is/models/payment_initiator.rb create mode 100644 lib/pay_pal_restap_is/models/payment_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/payment_method_preference.rb create mode 100644 lib/pay_pal_restap_is/models/payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/payment_source_response.rb create mode 100644 lib/pay_pal_restap_is/models/payment_supplementary_data.rb create mode 100644 lib/pay_pal_restap_is/models/payment_token_request.rb create mode 100644 lib/pay_pal_restap_is/models/payment_token_request_card.rb create mode 100644 lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/payment_token_response.rb create mode 100644 lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/phone.rb create mode 100644 lib/pay_pal_restap_is/models/phone_number.rb create mode 100644 lib/pay_pal_restap_is/models/phone_number_with_country_code.rb create mode 100644 lib/pay_pal_restap_is/models/phone_type.rb create mode 100644 lib/pay_pal_restap_is/models/phone_with_type.rb create mode 100644 lib/pay_pal_restap_is/models/platform_fee.rb create mode 100644 lib/pay_pal_restap_is/models/processing_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/processor_response.rb create mode 100644 lib/pay_pal_restap_is/models/processor_response_code.rb create mode 100644 lib/pay_pal_restap_is/models/purchase_unit.rb create mode 100644 lib/pay_pal_restap_is/models/purchase_unit_request.rb create mode 100644 lib/pay_pal_restap_is/models/reauthorize_request.rb create mode 100644 lib/pay_pal_restap_is/models/refund.rb create mode 100644 lib/pay_pal_restap_is/models/refund_incomplete_reason.rb create mode 100644 lib/pay_pal_restap_is/models/refund_payment_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/refund_platform_fee.rb create mode 100644 lib/pay_pal_restap_is/models/refund_request.rb create mode 100644 lib/pay_pal_restap_is/models/refund_status.rb create mode 100644 lib/pay_pal_restap_is/models/refund_status_details.rb create mode 100644 lib/pay_pal_restap_is/models/refund_status_with_details.rb create mode 100644 lib/pay_pal_restap_is/models/related_identifiers.rb create mode 100644 lib/pay_pal_restap_is/models/seller_payable_breakdown.rb create mode 100644 lib/pay_pal_restap_is/models/seller_protection.rb create mode 100644 lib/pay_pal_restap_is/models/seller_protection_status.rb create mode 100644 lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb create mode 100644 lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb create mode 100644 lib/pay_pal_restap_is/models/sepa_debit_response.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_request.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_request_card.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_response.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_response_card.rb create mode 100644 lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/shipment_carrier.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_details.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_name.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_option.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_preference.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_type.rb create mode 100644 lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb create mode 100644 lib/pay_pal_restap_is/models/sofort_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/sofort_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/standard_entry_class_code.rb create mode 100644 lib/pay_pal_restap_is/models/store_in_vault_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/stored_payment_source.rb create mode 100644 lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb create mode 100644 lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb create mode 100644 lib/pay_pal_restap_is/models/supplementary_data.rb create mode 100644 lib/pay_pal_restap_is/models/supplementary_purchase_data.rb create mode 100644 lib/pay_pal_restap_is/models/tax_id_type.rb create mode 100644 lib/pay_pal_restap_is/models/tax_info.rb create mode 100644 lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb create mode 100644 lib/pay_pal_restap_is/models/token.rb create mode 100644 lib/pay_pal_restap_is/models/token_type.rb create mode 100644 lib/pay_pal_restap_is/models/trustly_payment_object.rb create mode 100644 lib/pay_pal_restap_is/models/trustly_payment_request.rb create mode 100644 lib/pay_pal_restap_is/models/universal_product_code.rb create mode 100644 lib/pay_pal_restap_is/models/upc_type.rb create mode 100644 lib/pay_pal_restap_is/models/vault_customer.rb create mode 100644 lib/pay_pal_restap_is/models/vault_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/vault_instruction.rb create mode 100644 lib/pay_pal_restap_is/models/vault_instruction_base.rb create mode 100644 lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb create mode 100644 lib/pay_pal_restap_is/models/vault_response.rb create mode 100644 lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb create mode 100644 lib/pay_pal_restap_is/models/vault_status.rb create mode 100644 lib/pay_pal_restap_is/models/vault_token_request.rb create mode 100644 lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/vault_venmo_request.rb create mode 100644 lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb create mode 100644 lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_request.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_response.rb create mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb create mode 100644 lib/pay_pal_restap_is/utilities/date_time_helper.rb create mode 100644 lib/pay_pal_restap_is/utilities/file_wrapper.rb create mode 100644 pay_pal_restap_is.gemspec create mode 100644 test/flows/flow_test_base.rb create mode 100644 test/flows/tests/test_add_shipping_tracker_flow.rb create mode 100644 test/flows/tests/test_authorization_flow.rb create mode 100644 test/flows/tests/test_authorize_and_capture_flow.rb create mode 100644 test/flows/tests/test_confirm_order_flow.rb create mode 100644 test/flows/tests/test_patch_order_flow.rb create mode 100644 test/flows/tests/test_payment_method_with_purchase_flow.rb create mode 100644 test/flows/tests/test_payment_method_without_purchase_flow.rb create mode 100644 test/flows/tests/test_refund_flow.rb create mode 100644 test/flows/tests/test_secure_3d_authentication_multi_step_flow.rb create mode 100644 test/flows/tests/test_secure_3d_authentication_single_step_flow.rb create mode 100644 test/flows/tests/test_standard_checkout_flow.rb create mode 100644 test/flows/ui_flow_executor.rb create mode 100644 test/unit_tests/controller_test_base.rb create mode 100644 test/unit_tests/test_orders_controller.rb create mode 100644 test/unit_tests/test_payments_controller.rb create mode 100644 test/unit_tests/test_vault_controller.rb diff --git a/.codegenignore b/.codegenignore new file mode 100644 index 0000000..1b22d8f --- /dev/null +++ b/.codegenignore @@ -0,0 +1,5 @@ +test/unit_tests/** +test/flows/** +.gitignore +.github/** +Rakefile diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml new file mode 100644 index 0000000..5334228 --- /dev/null +++ b/.github/workflows/test-runner.yml @@ -0,0 +1,45 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Run Tests + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test-runner: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0 + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Create Environment + run: | + touch .env + echo EMAIL=${{ secrets.EMAIL }} >> .env + echo PASSWORD=${{ secrets.PASSWORD }} >> .env + echo CLIENT_ID=${{ secrets.CLIENT_ID }} >> .env + echo CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} >> .env + cat .env + - name: Add Web Driver Dependency + run: | + gem install selenium-webdriver -v 4.23 && bundle add selenium-webdriver + - name: Add UI Testing Framework Dependency + run: | + gem install capybara -v 3.40 && bundle add capybara + - name: Add DotEnv Dependency + run: | + gem install dotenv && bundle add dotenv + - name: Run Tests + run: bundle exec rake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b844b14 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..08c50fe --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,60 @@ +Metrics/ClassLength: + Enabled: false + +Metrics/MethodLength: + Enabled: false + +Metrics/BlockLength: + Enabled: false + +Metrics/ParameterLists: + Enabled: false + +Metrics/AbcSize: + Enabled: false + +Metrics/CyclomaticComplexity: + Enabled: false + +Metrics/PerceivedComplexity: + Enabled: false + +Layout/EndOfLine: + Enabled: false +Lint/UnderscorePrefixedVariableName: + Enabled: false + +Lint/MissingSuper: + Enabled: false + +Naming/AccessorMethodName: + Enabled: false + +Naming/MethodParameterName: + Enabled: false + +Naming/VariableNumber: + Enabled: false + +Style/AsciiComments: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Style/RedundantAssignment: + Enabled: false + +Style/MultilineTernaryOperator: + Enabled: false + +Layout/MultilineMethodCallIndentation: + Enabled: false + +Style/KeywordParametersOrder: + Enabled: false + +AllCops: + Exclude: + - './test/**/*' + - './*' diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..fa75df1 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gemspec diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b9181f7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +License: +======== +The MIT License (MIT) +http://opensource.org/licenses/MIT + +Copyright (c) 2014 - 2024 APIMATIC Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Trade Mark: +========== +APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/README.md b/README.md index b1e906e..6071f3b 100644 --- a/README.md +++ b/README.md @@ -1 +1,159 @@ -# PayPal-Ruby-Server-SDK + +# Getting Started with PayPal REST APIs + +## Introduction + +An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders., Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview., The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token.

The permanent token represents a payment method that's saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.

The Payment Method Tokens API is available in the US only. + +Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://developer.paypal.com/docs/api/orders/v2/) + +## Building + +The generated code depends on a few Ruby gems. The references to these gems are added in the gemspec file. The easiest way to resolve the dependencies, build the gem and install it is through Rake: + +1. Install Rake if not already installed: `gem install rake` +2. Install Bundler if not already installed: `gem install bundler` +3. From terminal/cmd navigate to the root directory of the SDK. +4. Invoke: `rake install` + +Alternatively, you can build and install the gem manually: + +1. From terminal/cmd navigate to the root directory of the SDK. +2. Run the build command: `gem build pay_pal_restap_is.gemspec` +3. Run the install command: `gem install pay_pal_restap_is-2.16.0.gem` + +![Installing Gem](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=buildSDK) + +## Installation + +The following section explains how to use the pay_pal_restap_is ruby gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE. + +### 1. Starting a new project + +Close any existing projects in RubyMine™ by selecting `File -> Close Project`. Next, click on `Create New Project` to create a new project from scratch. + +![Create a new project in RubyMine - Step 1](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject0) + +Next, provide `TestApp` as the project name, choose `Rails Application` as the project type, and click `OK`. + +![Create a new Rails Application in RubyMine - Step 2](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject1) + +In the next dialog make sure that the correct Ruby SDK is being used (>= 2.6 and <= 3.2) and click `OK`. + +![Create a new Rails Application in RubyMine - Step 3](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject2) + +### 2. Add reference of the gem + +In order to use the `pay_pal_restap_is` gem in the new project we must add a gem reference. Locate the `Gemfile` in the Project Explorer window under the `TestApp` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: `gem 'pay_pal_restap_is', '2.16.0'` + +![Add new reference to the Gemfile](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addReference) + +### 3. Adding a new Rails Controller + +Once the `TestApp` project is created, a folder named `controllers` will be visible in the *Project Explorer* under the following path: `TestApp > app > controllers`. Right click on this folder and select `New -> Run Rails Generator...`. + +![Run Rails Generator on Controllers Folder](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addCode0) + +Selecting the said option will popup a small window where the generator names are displayed. Here, select the `controller` template. + +![Create a new Controller](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=addCode1) + +Next, a popup window will ask you for a Controller name and included Actions. For controller name provide `Hello` and include an action named `Index` and click `OK`. + +![Add a new Controller](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addCode2) + +A new controller class named `HelloController` will be created in a file named `hello_controller.rb` containing a method named `Index`. + +1. Add the `require 'pay_pal_restap_is'` statement to require the gem in the controller file. +2. Add the `include PayPalRestapIs` statement to include the sdk module in the controller file. +3. In the `Index` method, add code for initialization and a sample for its usage. + +![Initialize the library](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemName=pay_pal_restap_is&step=addCode3) + +## Initialize the API Client + +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/client.md) + +The following parameters are configurable for the API Client: + +| Parameter | Type | Description | +| --- | --- | --- | +| `environment` | `Environment` | The API environment.
**Default: `Environment.SANDBOX`** | +| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests | +| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests | +| `timeout` | `Float` | The value to use for connection timeout.
**Default: 60** | +| `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails.
**Default: 0** | +| `retry_interval` | `Float` | Pause in seconds between retries.
**Default: 1** | +| `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff.
**Default: 2** | +| `retry_statuses` | `Array` | A list of HTTP statuses to retry.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | +| `retry_methods` | `Array` | A list of HTTP methods to retry.
**Default: %i[get put]** | +| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. | +| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/logging-configuration.md) | The SDK logging configuration for API calls | +| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | + +The API client can be initialized as follows: + +```ruby +client = PayPalRestapIs::Client.new( + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: 'OAuthClientId', + o_auth_client_secret: 'OAuthClientSecret' + ), + environment: Environment::SANDBOX, + logging_configuration: LoggingConfiguration.new( + log_level: Logger::INFO, + request_logging_config: RequestLoggingConfiguration.new( + log_body: true + ), + response_logging_config: ResponseLoggingConfiguration.new( + log_headers: true + ) + ) +) +``` + +API calls return an `ApiResponse` object that includes the following fields: + +| Field | Description | +| --- | --- | +| `status_code` | Status code of the HTTP response | +| `reason_phrase` | Reason phrase of the HTTP response | +| `headers` | Headers of the HTTP response as a Hash | +| `raw_body` | The body of the HTTP response as a String | +| `request` | HTTP request info | +| `errors` | Errors, if they exist | +| `data` | The deserialized body of the HTTP response | + +## Environments + +The SDK can be configured to use a different environment for making API calls. Available environments are: + +### Fields + +| Name | Description | +| --- | --- | +| Production | PayPal Live Environment | +| Sandbox | **Default** PayPal Sandbox Environment | + +## Authorization + +This API uses the following authentication schemes. + +* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/auth/oauth-2-client-credentials-grant.md) + +## List of APIs + +* [Orders](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/orders.md) +* [Payments](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/payments.md) +* [Vault](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/vault.md) + +## Classes Documentation + +* [Utility Classes](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/utility-classes.md) +* [HttpResponse](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/http-response.md) +* [HttpRequest](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/http-request.md) +* [LoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/logging-configuration.md) +* [RequestLoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/request-logging-configuration.md) +* [ResponseLoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/response-logging-configuration.md) +* [Abstract Logger](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/abstract-logger.md) + diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..e218648 --- /dev/null +++ b/Rakefile @@ -0,0 +1,12 @@ +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) + +require "bundler/gem_tasks" +require 'rake/testtask' + +Rake::TestTask.new(:test) do |t| + t.libs << "test" + t.test_files = FileList['test/**/test_*.rb', 'spec/**/*_spec.rb'] + t.warning = false +end + +task :default => :test \ No newline at end of file diff --git a/doc/abstract-logger.md b/doc/abstract-logger.md new file mode 100644 index 0000000..fa7a3d0 --- /dev/null +++ b/doc/abstract-logger.md @@ -0,0 +1,47 @@ + +# Abstract Logger + +An abstract class for custom logger implementation. + +## Logger Methods + +| Name | Description | Return Type | Parameters | Method Signature | +| --- | --- | --- | --- | --- | +| log | Logs a message with a specified log level and additional parameters. | nil | 1. level (Integer): The log level of the message.
2. message (String): The message template to log.
3. params: (Hash): The parameters to include in the log message. | log(level, message, params) | + +## Usage Example + +### Client Initialization with Custom Logger + +In order to provide custom logger implementation, the `AbstractLogger` class must be inherited so that you can override the `log` behavior. + +```ruby +require 'ougai' +require 'logger' + +include PayPalRestapIs + + +class CustomLogger < AbstractLogger + def initialize + @logger = Ougai::Logger.new($stdout) + end + def log(level, message, params) + case level + when Logger::INFO + @logger.info(message, params) + end + end +end +``` + +Following is how the custom logger implementation can be injected in the SDK client. + +```ruby +client = PayPalRestapIs::Client.new( + logging_configuration: LoggingConfiguration.new( + logger: CustomLogger.new + ) +) +``` + diff --git a/doc/auth/oauth-2-client-credentials-grant.md b/doc/auth/oauth-2-client-credentials-grant.md new file mode 100644 index 0000000..763740f --- /dev/null +++ b/doc/auth/oauth-2-client-credentials-grant.md @@ -0,0 +1,87 @@ + +# OAuth 2 Client Credentials Grant + + + +Documentation for accessing and setting credentials for Oauth2. + +## Auth Credentials + +| Name | Type | Description | Getter | +| --- | --- | --- | --- | +| OAuthClientId | `String` | OAuth 2 Client ID | `o_auth_client_id` | +| OAuthClientSecret | `String` | OAuth 2 Client Secret | `o_auth_client_secret` | +| OAuthToken | `OAuthToken` | Object for storing information about the OAuth token | `o_auth_token` | +| OAuthTokenProvider | `proc { \| OAuthToken, OAuth2 \| }` | Registers a callback for oAuth Token Provider used for automatic token fetching/refreshing. | `o_auth_token_provider` | +| OAuthOnTokenUpdate | `proc { \| OAuthToken \| }` | Registers a callback for token update event. | `o_auth_on_token_update` | +| OAuthClockSkew | `Integer` | Clock skew time in seconds applied while checking the OAuth Token expiry. | `o_auth_clock_skew` | + + + +**Note:** Auth credentials can be set using named parameter for any of the above credentials (e.g. `o_auth_client_id`) in the client initialization. + +## Usage Example + +### Client Initialization + +You must initialize the client with *OAuth 2.0 Client Credentials Grant* credentials as shown in the following code snippet. This will fetch the OAuth token automatically when any of the endpoints, requiring *OAuth 2.0 Client Credentials Grant* autentication, are called. + +```ruby +client = PayPalRestapIs::Client.new( + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: 'OAuthClientId', + o_auth_client_secret: 'OAuthClientSecret' + ) +) +``` + + + +Your application can also manually provide an OAuthToken using the setter `in` object. This function takes in an instance of OAuthToken containing information for authorizing client requests and refreshing the token itself. + +### Adding OAuth Token Update Callback + +Whenever the OAuth Token gets updated, the provided callback implementation will be executed. For instance, you may use it to store your access token whenever it gets updated. + +```ruby +client = PayPalRestapIs::Client.new( + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: 'OAuthClientId', + o_auth_client_secret: 'OAuthClientSecret', + o_auth_on_token_update: Proc.new { | o_auth_token | + # Add the callback handler to perform operations like save to DB or file etc. + # It will be triggered whenever the token gets updated + save_token_to_database(o_auth_token) + } + ) +) +``` + +### Adding Custom OAuth Token Provider + + + +```ruby +def o_auth_token_provider(last_oauth_token, auth_manager) + # Add the callback handler to provide a new OAuth token + # It will be triggered whenever the last provided o_auth_token is null or expired + o_auth_token = load_token_from_database() + o_auth_token = auth_manager.fetch_token() if o_auth_token is nil? + return o_auth_token +end + +_o_auth_token_provider = proc do | last_oauth_token, auth_manager | + o_auth_token_provider(last_oauth_token, auth_manager) +end + + +client = PayPalRestapIs::Client.new( + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: 'OAuthClientId', + o_auth_client_secret: 'OAuthClientSecret', + o_auth_token_provider: _o_auth_token_provider + ) +) +``` + + diff --git a/doc/client.md b/doc/client.md new file mode 100644 index 0000000..c8f9b7e --- /dev/null +++ b/doc/client.md @@ -0,0 +1,66 @@ + +# Client Class Documentation + +The following parameters are configurable for the API Client: + +| Parameter | Type | Description | +| --- | --- | --- | +| `environment` | `Environment` | The API environment.
**Default: `Environment.SANDBOX`** | +| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests | +| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests | +| `timeout` | `Float` | The value to use for connection timeout.
**Default: 60** | +| `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails.
**Default: 0** | +| `retry_interval` | `Float` | Pause in seconds between retries.
**Default: 1** | +| `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff.
**Default: 2** | +| `retry_statuses` | `Array` | A list of HTTP statuses to retry.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | +| `retry_methods` | `Array` | A list of HTTP methods to retry.
**Default: %i[get put]** | +| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. | +| `logging_configuration` | [`LoggingConfiguration`](logging-configuration.md) | The SDK logging configuration for API calls | +| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | + +The API client can be initialized as follows: + +```ruby +client = PayPalRestapIs::Client.new( + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: 'OAuthClientId', + o_auth_client_secret: 'OAuthClientSecret' + ), + environment: Environment::SANDBOX, + logging_configuration: LoggingConfiguration.new( + log_level: Logger::INFO, + request_logging_config: RequestLoggingConfiguration.new( + log_body: true + ), + response_logging_config: ResponseLoggingConfiguration.new( + log_headers: true + ) + ) +) +``` + +API calls return an `ApiResponse` object that includes the following fields: + +| Field | Description | +| --- | --- | +| `status_code` | Status code of the HTTP response | +| `reason_phrase` | Reason phrase of the HTTP response | +| `headers` | Headers of the HTTP response as a Hash | +| `raw_body` | The body of the HTTP response as a String | +| `request` | HTTP request info | +| `errors` | Errors, if they exist | +| `data` | The deserialized body of the HTTP response | + +## PayPal REST APIs Client + +The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. + +## Controllers + +| Name | Description | +| --- | --- | +| orders | Gets OrdersController | +| payments | Gets PaymentsController | +| vault | Gets VaultController | +| o_auth_authorization | Gets OAuthAuthorizationController | + diff --git a/doc/controllers/orders.md b/doc/controllers/orders.md new file mode 100644 index 0000000..265eccf --- /dev/null +++ b/doc/controllers/orders.md @@ -0,0 +1,397 @@ +# Orders + +Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders. + +```ruby +orders_controller = client.orders +``` + +## Class Name + +`OrdersController` + +## Methods + +* [Orders Create](../../doc/controllers/orders.md#orders-create) +* [Orders Get](../../doc/controllers/orders.md#orders-get) +* [Orders Patch](../../doc/controllers/orders.md#orders-patch) +* [Orders Confirm](../../doc/controllers/orders.md#orders-confirm) +* [Orders Authorize](../../doc/controllers/orders.md#orders-authorize) +* [Orders Capture](../../doc/controllers/orders.md#orders-capture) +* [Orders Track Create](../../doc/controllers/orders.md#orders-track-create) +* [Orders Trackers Patch](../../doc/controllers/orders.md#orders-trackers-patch) + + +# Orders Create + +Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
+ +```ruby +def orders_create(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | +| `pay_pal_partner_attribution_id` | `String` | Header, Optional | - | +| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). + +## Example Usage + +```ruby +collect = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '100.00' + ), + reference_id: 'd9f80740-38f0-11e8-b467-0ed5f89f718b' + ) + ] + ), + 'pay_pal_request_id' => 'PayPal-Request-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=minimal' +} + +result = orders_controller.orders_create(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Get + +Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
+ +```ruby +def orders_get(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order for which to show details. | +| `fields` | `String` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). + +## Example Usage + +```ruby +collect = { + 'id' => 'id0' +} + +result = orders_controller.orders_get(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Patch + +Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.

To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.email_addressreplace, add
purchase_units[].shipping.phone_numberreplace, add
purchase_units[].shipping.optionsreplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.payee_receivable_fx_rate_idreplace, add, remove
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add
+ +```ruby +def orders_patch(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order to update. | +| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'body' => [ + Patch.new( + op: PatchOp::ADD + ) + ] +} + +result = orders_controller.orders_patch(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Confirm + +Payer confirms their intent to pay for the the Order with the given payment source. + +```ruby +def orders_confirm(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order for which the payer confirms their intent to pay. | +| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: | +| `body` | [`ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'prefer' => 'return=minimal', + 'body' => ConfirmOrderRequest.new( + payment_source: PaymentSource.new, + processing_instruction: ProcessingInstruction::NO_INSTRUCTION + ) +} + +result = orders_controller.orders_confirm(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Authorize + +Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
+ +```ruby +def orders_authorize(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order for which to authorize. | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: | +| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | +| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `body` | [`OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md). + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'prefer' => 'return=minimal' +} + +result = orders_controller.orders_authorize(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Capture + +Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
+ +```ruby +def orders_capture(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order for which to capture a payment. | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is: | +| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | +| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | +| `body` | [`OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'prefer' => 'return=minimal' +} + +result = orders_controller.orders_capture(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Track Create + +Adds tracking information for an Order. + +```ruby +def orders_track_create(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with. | +| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - | +| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'body' => OrderTrackerRequest.new( + capture_id: 'capture_id8', + notify_payer: false + ) +} + +result = orders_controller.orders_track_create(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Orders Trackers Patch + +Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
statusreplaceOnly patching status to CANCELLED is currently supported.
+ +```ruby +def orders_trackers_patch(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with. | +| `tracker_id` | `String` | Template, Required | The order tracking ID. | +| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. + +## Example Usage + +```ruby +collect = { + 'id' => 'id0', + 'tracker_id' => 'tracker_id2', + 'body' => [ + Patch.new( + op: PatchOp::ADD + ) + ] +} + +result = orders_controller.orders_trackers_patch(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + diff --git a/doc/controllers/payments.md b/doc/controllers/payments.md new file mode 100644 index 0000000..d1b2ae4 --- /dev/null +++ b/doc/controllers/payments.md @@ -0,0 +1,327 @@ +# Payments + +Use the `/payments` resource to authorize, capture, void authorizations, and retrieve captures. + +```ruby +payments_controller = client.payments +``` + +## Class Name + +`PaymentsController` + +## Methods + +* [Authorizations Get](../../doc/controllers/payments.md#authorizations-get) +* [Authorizations Capture](../../doc/controllers/payments.md#authorizations-capture) +* [Authorizations Reauthorize](../../doc/controllers/payments.md#authorizations-reauthorize) +* [Authorizations Void](../../doc/controllers/payments.md#authorizations-void) +* [Captures Get](../../doc/controllers/payments.md#captures-get) +* [Captures Refund](../../doc/controllers/payments.md#captures-refund) +* [Refunds Get](../../doc/controllers/payments.md#refunds-get) + + +# Authorizations Get + +Shows details for an authorized payment, by ID. + +```ruby +def authorizations_get(authorization_id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `authorization_id` | `String` | Template, Required | The ID of the authorized payment for which to show details. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). + +## Example Usage + +```ruby +authorization_id = 'authorization_id8' + +result = payments_controller.authorizations_get(authorization_id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Authorizations Capture + +Captures an authorized payment, by ID. + +```ruby +def authorizations_capture(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to capture. | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| +| `body` | [`CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md). + +## Example Usage + +```ruby +collect = { + 'authorization_id' => 'authorization_id8', + 'prefer' => 'return=minimal', + 'body' => CaptureRequest.new( + final_capture: false + ) +} + +result = payments_controller.authorizations_capture(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The request failed because it is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Authorizations Reauthorize + +Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
+ +```ruby +def authorizations_reauthorize(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| +| `body` | [`ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). + +## Example Usage + +```ruby +collect = { + 'authorization_id' => 'authorization_id8', + 'prefer' => 'return=minimal' +} + +result = payments_controller.authorizations_reauthorize(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Authorizations Void + +Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. + +```ruby +def authorizations_void(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to void. | +| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). + +## Example Usage + +```ruby +collect = { + 'authorization_id' => 'authorization_id8', + 'prefer' => 'return=minimal' +} + +result = payments_controller.authorizations_void(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Captures Get + +Shows details for a captured payment, by ID. + +```ruby +def captures_get(capture_id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md). + +## Example Usage + +```ruby +capture_id = 'capture_id2' + +result = payments_controller.captures_get(capture_id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Captures Refund + +Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body. + +```ruby +def captures_refund(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment to refund. | +| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | +| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| +| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| +| `body` | [`RefundRequest`](../../doc/models/refund-request.md) | Body, Optional | - | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md). + +## Example Usage + +```ruby +collect = { + 'capture_id' => '1234', + 'pay_pal_request_id' => '1234', + 'prefer' => 'return=minimal', + 'pay_pal_auth_assertion' => 'PayPal-Auth-Assertion', + 'body' => RefundRequest.new( + amount: Money.new( + currency_code: 'USD', + value: '1.44' + ), + note_to_payer: 'Defective product' + ) +} + +result = payments_controller.captures_refund(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Refunds Get + +Shows details for a refund, by ID. + +```ruby +def refunds_get(refund_id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `refund_id` | `String` | Template, Required | The PayPal-generated ID for the refund for which to show details. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md). + +## Example Usage + +```ruby +refund_id = 'refund_id4' + +result = payments_controller.refunds_get(refund_id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | The request failed because an internal server error occurred. | `APIException` | +| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | + diff --git a/doc/controllers/vault.md b/doc/controllers/vault.md new file mode 100644 index 0000000..b3512ed --- /dev/null +++ b/doc/controllers/vault.md @@ -0,0 +1,261 @@ +# Vault + +Use the `/vault` resource to create, retrieve, and delete payment and setup tokens. + +```ruby +vault_controller = client.vault +``` + +## Class Name + +`VaultController` + +## Methods + +* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create) +* [Customer Payment-Tokens Get](../../doc/controllers/vault.md#customer-payment-tokens-get) +* [Payment-Tokens Get](../../doc/controllers/vault.md#payment-tokens-get) +* [Payment-Tokens Delete](../../doc/controllers/vault.md#payment-tokens-delete) +* [Setup-Tokens Create](../../doc/controllers/vault.md#setup-tokens-create) +* [Setup-Tokens Get](../../doc/controllers/vault.md#setup-tokens-get) + + +# Payment-Tokens Create + +Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer. + +```ruby +def payment_tokens_create(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `pay_pal_request_id` | `String` | Header, Required | The server stores keys for 3 hours. | +| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). + +## Example Usage + +```ruby +collect = { + 'pay_pal_request_id' => '12345', + 'body' => PaymentTokenRequest.new( + payment_source: PaymentTokenRequestPaymentSource.new( + token: VaultTokenRequest.new( + id: '1234', + type: TokenType::SETUP_TOKEN + ) + ) + ) +} + +result = vault_controller.payment_tokens_create(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Customer Payment-Tokens Get + +Returns all payment tokens for a customer. + +```ruby +def customer_payment_tokens_get(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer_id` | `String` | Query, Required | A unique identifier representing a specific customer in merchant's/partner's system or records. | +| `page_size` | `Integer` | Query, Optional | A non-negative, non-zero integer indicating the maximum number of results to return at one time. | +| `page` | `Integer` | Query, Optional | A non-negative, non-zero integer representing the page of the results. | +| `total_required` | `TrueClass \| FalseClass` | Query, Optional | A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md). + +## Example Usage + +```ruby +collect = { + 'customer_id' => 'customer_id8', + 'page_size' => 5, + 'page' => 1, + 'total_required' => false +} + +result = vault_controller.customer_payment_tokens_get(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Payment-Tokens Get + +Returns a readable representation of vaulted payment source associated with the payment token id. + +```ruby +def payment_tokens_get(id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | ID of the payment token. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). + +## Example Usage + +```ruby +id = 'id0' + +result = vault_controller.payment_tokens_get(id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Payment-Tokens Delete + +Delete the payment token associated with the payment token id. + +```ruby +def payment_tokens_delete(id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | ID of the payment token. | + +## Response Type + +This method returns a `ApiResponse` instance. + +## Example Usage + +```ruby +id = 'id0' + +result = vault_controller.payment_tokens_delete(id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Setup-Tokens Create + +Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer. + +```ruby +def setup_tokens_create(options = {}) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `pay_pal_request_id` | `String` | Header, Required | The server stores keys for 3 hours. | +| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md). + +## Example Usage + +```ruby +collect = { + 'pay_pal_request_id' => 'PayPal-Request-Id6', + 'body' => SetupTokenRequest.new( + payment_source: SetupTokenRequestPaymentSource.new + ) +} + +result = vault_controller.setup_tokens_create(collect) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + + +# Setup-Tokens Get + +Returns a readable representation of temporarily vaulted payment source associated with the setup token id. + +```ruby +def setup_tokens_get(id) +``` + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Template, Required | ID of the setup token. | + +## Response Type + +This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md). + +## Example Usage + +```ruby +id = 'id0' + +result = vault_controller.setup_tokens_get(id) +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | +| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | +| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | +| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | + diff --git a/doc/http-request.md b/doc/http-request.md new file mode 100644 index 0000000..cb61110 --- /dev/null +++ b/doc/http-request.md @@ -0,0 +1,15 @@ + +# HttpRequest + +Represents a single Http Request. + +## Properties + +| Name | Type | Tag | Description | +| --- | --- | --- | --- | +| http_method | HttpMethodEnum | | The HTTP method of the request. | +| query_url | String | | The endpoint URL for the API request. | +| headers | Hash | Optional | Request headers. | +| parameters | Hash | Optional | Request body. | +| context | Hash | Optional | Request context for passing meta information about the request. | + diff --git a/doc/http-response.md b/doc/http-response.md new file mode 100644 index 0000000..69ab50d --- /dev/null +++ b/doc/http-response.md @@ -0,0 +1,15 @@ + +# HttpResponse + +Http response received. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| status_code | Integer | The status code returned by the server. | +| reason_phrase | String | The reason phrase returned by the server. | +| headers | Hash | Response headers. | +| raw_body | String | Response body. | +| request | [`HttpRequest`](http-request.md) | The request that resulted in this response. | + diff --git a/doc/logging-configuration.md b/doc/logging-configuration.md new file mode 100644 index 0000000..ade0ec0 --- /dev/null +++ b/doc/logging-configuration.md @@ -0,0 +1,15 @@ + +# LoggingConfiguration + +Represents the logging configuration for API calls. + +## Parameters + +| Name | Type | Tag | Description | +| --- | --- | --- | --- | +| abstract_logger | [AbstractLogger](abstract-logger.md) | optional | Takes in your custom implementation of the abstract logger class here. **Default Implementation : `ConsoleLogger`** | +| log_level | Integer | optional | Defines the log message severity available in ruby logging module (e.g., DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN5). **Default : `Logger::INFO`** | +| mask_sensitive_headers | Boolean | optional | Toggles the global setting to mask sensitive HTTP headers in both requests and responses before logging, safeguarding confidential data. **Default : `true`** | +| request_logging_config | [RequestLoggingConfiguration](request-logging-configuration.md) | optional | The logging configuration for an API request. | +| response_logging_config | [ResponseLoggingConfiguration](response-logging-configuration.md) | optional | The logging configuration for an API response. | + diff --git a/doc/models/ach-debit-response.md b/doc/models/ach-debit-response.md new file mode 100644 index 0000000..ebc1e25 --- /dev/null +++ b/doc/models/ach-debit-response.md @@ -0,0 +1,23 @@ + +# ACH Debit Response + +A Resource representing a response of vaulted a ACH Debit Account. + +## Structure + +`ACHDebitResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `verification_status` | `String` | Optional | The ach debit verification status.
**Default**: `'NOT_VERIFIED'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | + +## Example (as JSON) + +```json +{ + "verification_status": "NOT_VERIFIED" +} +``` + diff --git a/doc/models/activity-timestamps.md b/doc/models/activity-timestamps.md new file mode 100644 index 0000000..375a3d8 --- /dev/null +++ b/doc/models/activity-timestamps.md @@ -0,0 +1,25 @@ + +# Activity Timestamps + +The date and time stamps that are common to authorized payment, captured payment, and refund transactions. + +## Structure + +`ActivityTimestamps` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "create_time": "create_time2", + "update_time": "update_time2" +} +``` + diff --git a/doc/models/address-details.md b/doc/models/address-details.md new file mode 100644 index 0000000..9cc148a --- /dev/null +++ b/doc/models/address-details.md @@ -0,0 +1,38 @@ + +# Address Details + +Address request details. + +## Structure + +`AddressDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `address_line_1` | `String` | Optional | The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.
**Constraints**: *Maximum Length*: `300` | +| `address_line_2` | `String` | Optional | The second line of the address, for example, a suite or apartment number.
**Constraints**: *Maximum Length*: `300` | +| `admin_area_2` | `String` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | +| `admin_area_1` | `String` | Optional | The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.

**Constraints**: *Maximum Length*: `300` | +| `postal_code` | `String` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` | +| `country_code` | `String` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `id` | `String` | Optional | The resource ID of the address.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Za-z-_]+$` | +| `company` | `String` | Optional | The name of the company or business associated to the address.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^.*$` | +| `phone` | `String` | Optional | The phone number that can go on the mailing label with the address to track the shipping. Phone number is in E.164 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^\+[1-9]\d{1,14}$` | +| `phone_number` | [`Phone`](../../doc/models/phone.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | + +## Example (as JSON) + +```json +{ + "address_line_1": "address_line_10", + "address_line_2": "address_line_20", + "admin_area_2": "admin_area_24", + "admin_area_1": "admin_area_16", + "postal_code": "postal_code2", + "country_code": "country_code0" +} +``` + diff --git a/doc/models/address.md b/doc/models/address.md new file mode 100644 index 0000000..54fb330 --- /dev/null +++ b/doc/models/address.md @@ -0,0 +1,33 @@ + +# Address + +The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). + +## Structure + +`Address` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `address_line_1` | `String` | Optional | The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.
**Constraints**: *Maximum Length*: `300` | +| `address_line_2` | `String` | Optional | The second line of the address, for example, a suite or apartment number.
**Constraints**: *Maximum Length*: `300` | +| `admin_area_2` | `String` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | +| `admin_area_1` | `String` | Optional | The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.

**Constraints**: *Maximum Length*: `300` | +| `postal_code` | `String` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` | +| `country_code` | `String` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | + +## Example (as JSON) + +```json +{ + "address_line_1": "address_line_18", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_22", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" +} +``` + diff --git a/doc/models/amount-breakdown.md b/doc/models/amount-breakdown.md new file mode 100644 index 0000000..00d190f --- /dev/null +++ b/doc/models/amount-breakdown.md @@ -0,0 +1,48 @@ + +# Amount Breakdown + +The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. + +## Structure + +`AmountBreakdown` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `item_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `shipping` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `handling` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `tax_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `insurance` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `shipping_discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "item_total": { + "currency_code": "currency_code0", + "value": "value6" + }, + "shipping": { + "currency_code": "currency_code0", + "value": "value6" + }, + "handling": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + }, + "insurance": { + "currency_code": "currency_code2", + "value": "value8" + } +} +``` + diff --git a/doc/models/amount-with-breakdown.md b/doc/models/amount-with-breakdown.md new file mode 100644 index 0000000..9b67d82 --- /dev/null +++ b/doc/models/amount-with-breakdown.md @@ -0,0 +1,48 @@ + +# Amount With Breakdown + +The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. + +## Structure + +`AmountWithBreakdown` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `currency_code` | `String` | Required | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | +| `value` | `String` | Required | The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).
**Constraints**: *Maximum Length*: `32`, *Pattern*: `^((-?[0-9]+)\|(-?([0-9]+)?[.][0-9]+))$` | +| `breakdown` | [`AmountBreakdown`](../../doc/models/amount-breakdown.md) | Optional | The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. | + +## Example (as JSON) + +```json +{ + "currency_code": "currency_code4", + "value": "value0", + "breakdown": { + "item_total": { + "currency_code": "currency_code0", + "value": "value6" + }, + "shipping": { + "currency_code": "currency_code0", + "value": "value6" + }, + "handling": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + }, + "insurance": { + "currency_code": "currency_code2", + "value": "value8" + } + } +} +``` + diff --git a/doc/models/apple-pay-attributes-response.md b/doc/models/apple-pay-attributes-response.md new file mode 100644 index 0000000..f79c9fd --- /dev/null +++ b/doc/models/apple-pay-attributes-response.md @@ -0,0 +1,36 @@ + +# Apple Pay Attributes Response + +Additional attributes associated with the use of Apple Pay. + +## Structure + +`ApplePayAttributesResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | + +## Example (as JSON) + +```json +{ + "vault": { + "id": "id6", + "status": "APPROVED", + "customer": { + "id": "id0" + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] + } +} +``` + diff --git a/doc/models/apple-pay-attributes.md b/doc/models/apple-pay-attributes.md new file mode 100644 index 0000000..b39586e --- /dev/null +++ b/doc/models/apple-pay-attributes.md @@ -0,0 +1,36 @@ + +# Apple Pay Attributes + +Additional attributes associated with apple pay. + +## Structure + +`ApplePayAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`CustomerInformation`](../../doc/models/customer-information.md) | Optional | The details about a customer in PayPal's system of record. | +| `vault` | [`VaultInstruction`](../../doc/models/vault-instruction.md) | Optional | Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting. | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "email_address": "email_address2", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + } + }, + "vault": { + "store_in_vault": "ON_SUCCESS" + } +} +``` + diff --git a/doc/models/apple-pay-card-response.md b/doc/models/apple-pay-card-response.md new file mode 100644 index 0000000..c8a031e --- /dev/null +++ b/doc/models/apple-pay-card-response.md @@ -0,0 +1,40 @@ + +# Apple Pay Card Response + +The Card from Apple Pay Wallet used to fund the payment. + +## Structure + +`ApplePayCardResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | +| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. | +| `from_request` | [`CardFromRequest`](../../doc/models/card-from-request.md) | Optional | Representation of card details as received in the request. | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | + +## Example (as JSON) + +```json +{ + "name": "name4", + "last_digits": "last_digits8", + "brand": "DINERS", + "available_networks": [ + "MASTERCARD" + ], + "type": "DEBIT" +} +``` + diff --git a/doc/models/apple-pay-card.md b/doc/models/apple-pay-card.md new file mode 100644 index 0000000..3bafd8c --- /dev/null +++ b/doc/models/apple-pay-card.md @@ -0,0 +1,38 @@ + +# Apple Pay Card + +The payment card to be used to fund a payment. Can be a credit or debit card. + +## Structure + +`ApplePayCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{2,4}$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "name": "name4", + "last_digits": "last_digits8", + "type": "UNKNOWN", + "brand": "CETELEM", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/apple-pay-decrypted-token-data.md b/doc/models/apple-pay-decrypted-token-data.md new file mode 100644 index 0000000..da130ec --- /dev/null +++ b/doc/models/apple-pay-decrypted-token-data.md @@ -0,0 +1,45 @@ + +# Apple Pay Decrypted Token Data + +Information about the Payment data obtained by decrypting Apple Pay token. + +## Structure + +`ApplePayDecryptedTokenData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `transaction_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `tokenized_card` | [`ApplePayTokenizedCard`](../../doc/models/apple-pay-tokenized-card.md) | Required | The payment card to use to fund a payment. Can be a credit or debit card. | +| `device_manufacturer_id` | `String` | Optional | Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | +| `payment_data_type` | [`ApplePayPaymentDataType`](../../doc/models/apple-pay-payment-data-type.md) | Optional | Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_data` | [`ApplePayPaymentData`](../../doc/models/apple-pay-payment-data.md) | Optional | Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator. | + +## Example (as JSON) + +```json +{ + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id2", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } +} +``` + diff --git a/doc/models/apple-pay-payment-data-type.md b/doc/models/apple-pay-payment-data-type.md new file mode 100644 index 0000000..87e4229 --- /dev/null +++ b/doc/models/apple-pay-payment-data-type.md @@ -0,0 +1,16 @@ + +# Apple Pay Payment Data Type + +Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV. + +## Enumeration + +`ApplePayPaymentDataType` + +## Fields + +| Name | +| --- | +| `ENUM_3DSECURE` | +| `EMV` | + diff --git a/doc/models/apple-pay-payment-data.md b/doc/models/apple-pay-payment-data.md new file mode 100644 index 0000000..57249d4 --- /dev/null +++ b/doc/models/apple-pay-payment-data.md @@ -0,0 +1,29 @@ + +# Apple Pay Payment Data + +Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator. + +## Structure + +`ApplePayPaymentData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `cryptogram` | `String` | Optional | Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | +| `eci_indicator` | `String` | Optional | ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | +| `emv_data` | `String` | Optional | Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | +| `pin` | `String` | Optional | Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | + +## Example (as JSON) + +```json +{ + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" +} +``` + diff --git a/doc/models/apple-pay-payment-object.md b/doc/models/apple-pay-payment-object.md new file mode 100644 index 0000000..0d9eff8 --- /dev/null +++ b/doc/models/apple-pay-payment-object.md @@ -0,0 +1,35 @@ + +# Apple Pay Payment Object + +Information needed to pay using ApplePay. + +## Structure + +`ApplePayPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | +| `token` | `String` | Optional | Encrypted ApplePay token, containing card information. This token would be base64encoded. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `card` | [`ApplePayCardResponse`](../../doc/models/apple-pay-card-response.md) | Optional | The Card from Apple Pay Wallet used to fund the payment. | +| `attributes` | [`ApplePayAttributesResponse`](../../doc/models/apple-pay-attributes-response.md) | Optional | Additional attributes associated with the use of Apple Pay. | + +## Example (as JSON) + +```json +{ + "id": "id6", + "token": "token0", + "name": "name6", + "email_address": "email_address4", + "phone_number": { + "national_number": "national_number6" + } +} +``` + diff --git a/doc/models/apple-pay-payment-token.md b/doc/models/apple-pay-payment-token.md new file mode 100644 index 0000000..3859b38 --- /dev/null +++ b/doc/models/apple-pay-payment-token.md @@ -0,0 +1,36 @@ + +# Apple Pay Payment Token + +A resource representing a response for Apple Pay. + +## Structure + +`ApplePayPaymentToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`ApplePayCard`](../../doc/models/apple-pay-card.md) | Optional | The payment card to be used to fund a payment. Can be a credit or debit card. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } +} +``` + diff --git a/doc/models/apple-pay-request.md b/doc/models/apple-pay-request.md new file mode 100644 index 0000000..2638111 --- /dev/null +++ b/doc/models/apple-pay-request.md @@ -0,0 +1,56 @@ + +# Apple Pay Request + +Information needed to pay using ApplePay. + +## Structure + +`ApplePayRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `decrypted_token` | [`ApplePayDecryptedTokenData`](../../doc/models/apple-pay-decrypted-token-data.md) | Optional | Information about the Payment data obtained by decrypting Apple Pay token. | +| `stored_credential` | [`CardStoredCredential`](../../doc/models/card-stored-credential.md) | Optional | Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| +| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `attributes` | [`ApplePayAttributes`](../../doc/models/apple-pay-attributes.md) | Optional | Additional attributes associated with apple pay. | + +## Example (as JSON) + +```json +{ + "id": "id6", + "name": "name6", + "email_address": "email_address4", + "phone_number": { + "national_number": "national_number6" + }, + "decrypted_token": { + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id6", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } + } +} +``` + diff --git a/doc/models/apple-pay-tokenized-card.md b/doc/models/apple-pay-tokenized-card.md new file mode 100644 index 0000000..5817c2b --- /dev/null +++ b/doc/models/apple-pay-tokenized-card.md @@ -0,0 +1,33 @@ + +# Apple Pay Tokenized Card + +The payment card to use to fund a payment. Can be a credit or debit card. + +## Structure + +`ApplePayTokenizedCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `card_type` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "name": "name8", + "number": "number6", + "expiry": "expiry6", + "card_type": "SYNCHRONY", + "type": "STORE" +} +``` + diff --git a/doc/models/authentication-response.md b/doc/models/authentication-response.md new file mode 100644 index 0000000..ae390e6 --- /dev/null +++ b/doc/models/authentication-response.md @@ -0,0 +1,28 @@ + +# Authentication Response + +Results of Authentication such as 3D Secure. + +## Structure + +`AuthenticationResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `liability_shift` | [`LiabilityShiftIndicator`](../../doc/models/liability-shift-indicator.md) | Optional | Liability shift indicator. The outcome of the issuer's authentication.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `three_d_secure` | [`ThreeDSecureAuthenticationResponse`](../../doc/models/three-d-secure-authentication-response.md) | Optional | Results of 3D Secure Authentication. | + +## Example (as JSON) + +```json +{ + "liability_shift": "POSSIBLE", + "three_d_secure": { + "authentication_status": "C", + "enrollment_status": "Y" + } +} +``` + diff --git a/doc/models/authorization-incomplete-reason.md b/doc/models/authorization-incomplete-reason.md new file mode 100644 index 0000000..d145f01 --- /dev/null +++ b/doc/models/authorization-incomplete-reason.md @@ -0,0 +1,16 @@ + +# Authorization Incomplete Reason + +The reason why the authorized status is `PENDING`. + +## Enumeration + +`AuthorizationIncompleteReason` + +## Fields + +| Name | +| --- | +| `PENDING_REVIEW` | +| `DECLINED_BY_RISK_FRAUD_FILTERS` | + diff --git a/doc/models/authorization-status-details.md b/doc/models/authorization-status-details.md new file mode 100644 index 0000000..2db8c6e --- /dev/null +++ b/doc/models/authorization-status-details.md @@ -0,0 +1,23 @@ + +# Authorization Status Details + +The details of the authorized payment status. + +## Structure + +`AuthorizationStatusDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `reason` | [`AuthorizationIncompleteReason`](../../doc/models/authorization-incomplete-reason.md) | Optional | The reason why the authorized status is `PENDING`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "reason": "PENDING_REVIEW" +} +``` + diff --git a/doc/models/authorization-status-with-details.md b/doc/models/authorization-status-with-details.md new file mode 100644 index 0000000..3936dd0 --- /dev/null +++ b/doc/models/authorization-status-with-details.md @@ -0,0 +1,27 @@ + +# Authorization Status With Details + +The status fields and status details for an authorized payment. + +## Structure + +`AuthorizationStatusWithDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | +| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | + +## Example (as JSON) + +```json +{ + "status": "VOIDED", + "status_details": { + "reason": "PENDING_REVIEW" + } +} +``` + diff --git a/doc/models/authorization-status.md b/doc/models/authorization-status.md new file mode 100644 index 0000000..07147e9 --- /dev/null +++ b/doc/models/authorization-status.md @@ -0,0 +1,20 @@ + +# Authorization Status + +The status for the authorized payment. + +## Enumeration + +`AuthorizationStatus` + +## Fields + +| Name | +| --- | +| `CREATED` | +| `CAPTURED` | +| `DENIED` | +| `PARTIALLY_CAPTURED` | +| `VOIDED` | +| `PENDING` | + diff --git a/doc/models/authorization-with-additional-data.md b/doc/models/authorization-with-additional-data.md new file mode 100644 index 0000000..6f6cc7b --- /dev/null +++ b/doc/models/authorization-with-additional-data.md @@ -0,0 +1,44 @@ + +# Authorization With Additional Data + +The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods. + +## Structure + +`AuthorizationWithAdditionalData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | +| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | +| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | +| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | +| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | + +## Example (as JSON) + +```json +{ + "status": "VOIDED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id6", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id6" +} +``` + diff --git a/doc/models/authorization.md b/doc/models/authorization.md new file mode 100644 index 0000000..51d1120 --- /dev/null +++ b/doc/models/authorization.md @@ -0,0 +1,43 @@ + +# Authorization + +The authorized payment transaction. + +## Structure + +`Authorization` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | +| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | +| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | +| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | +| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "status": "CREATED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id8", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id8" +} +``` + diff --git a/doc/models/avs-code.md b/doc/models/avs-code.md new file mode 100644 index 0000000..06db627 --- /dev/null +++ b/doc/models/avs-code.md @@ -0,0 +1,38 @@ + +# AVS Code + +The address verification code for Visa, Discover, Mastercard, or American Express transactions. + +## Enumeration + +`AVSCode` + +## Fields + +| Name | +| --- | +| `A` | +| `B` | +| `C` | +| `D` | +| `E` | +| `F` | +| `G` | +| `I` | +| `M` | +| `N` | +| `P` | +| `R` | +| `S` | +| `U` | +| `W` | +| `X` | +| `Y` | +| `Z` | +| `NULL` | +| `ENUM_0` | +| `ENUM_1` | +| `ENUM_2` | +| `ENUM_3` | +| `ENUM_4` | + diff --git a/doc/models/bancontact-payment-object.md b/doc/models/bancontact-payment-object.md new file mode 100644 index 0000000..d6348ca --- /dev/null +++ b/doc/models/bancontact-payment-object.md @@ -0,0 +1,31 @@ + +# Bancontact Payment Object + +Information used to pay Bancontact. + +## Structure + +`BancontactPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | +| `card_last_digits` | `String` | Optional | The last digits of the card used to fund the Bancontact payment.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `[0-9]{4}` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code6", + "bic": "bic8", + "iban_last_chars": "iban_last_chars4", + "card_last_digits": "card_last_digits0" +} +``` + diff --git a/doc/models/bancontact-payment-request.md b/doc/models/bancontact-payment-request.md new file mode 100644 index 0000000..d04fa40 --- /dev/null +++ b/doc/models/bancontact-payment-request.md @@ -0,0 +1,33 @@ + +# Bancontact Payment Request + +Information needed to pay using Bancontact. + +## Structure + +`BancontactPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "country_code": "country_code8", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/bank-payment-token.md b/doc/models/bank-payment-token.md new file mode 100644 index 0000000..1b61a3b --- /dev/null +++ b/doc/models/bank-payment-token.md @@ -0,0 +1,44 @@ + +# Bank Payment Token + +Full representation of a Bank Payment Token. + +## Structure + +`BankPaymentToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `ach_debit` | [`ACHDebitResponse`](../../doc/models/ach-debit-response.md) | Optional | A Resource representing a response of vaulted a ACH Debit Account. | +| `sepa_debit` | [`SEPADebitResponse`](../../doc/models/sepa-debit-response.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "ach_debit": { + "verification_status": "verification_status6" + }, + "sepa_debit": { + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } + } +} +``` + diff --git a/doc/models/bin-details.md b/doc/models/bin-details.md new file mode 100644 index 0000000..6116c94 --- /dev/null +++ b/doc/models/bin-details.md @@ -0,0 +1,33 @@ + +# Bin Details + +Bank Identification Number (BIN) details used to fund a payment. + +## Structure + +`BinDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `bin` | `String` | Optional | The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[0-9]+$` | +| `issuing_bank` | `String` | Optional | The issuer of the card instrument.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | +| `bin_country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `products` | `Array` | Optional | The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255` | + +## Example (as JSON) + +```json +{ + "bin": "bin0", + "issuing_bank": "issuing_bank0", + "bin_country_code": "bin_country_code4", + "products": [ + "products8", + "products9", + "products0" + ] +} +``` + diff --git a/doc/models/blik-experience-context.md b/doc/models/blik-experience-context.md new file mode 100644 index 0000000..05df41c --- /dev/null +++ b/doc/models/blik-experience-context.md @@ -0,0 +1,33 @@ + +# BLIK Experience Context + +Customizes the payer experience during the approval process for the BLIK payment. + +## Structure + +`BLIKExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | +| `return_url` | `String` | Optional | Describes the URL. | +| `cancel_url` | `String` | Optional | Describes the URL. | +| `consumer_ip` | `String` | Optional | An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `39`, *Pattern*: `^(([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])\.){3}([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])$\|^(([a-zA-Z]\|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]\|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$\|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}\|:))\|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}\|((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})\|:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})\|((:[0-9A-Fa-f]{1,4})?:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})\|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})\|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})\|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(:(((:[0-9A-Fa-f]{1,4}){1,7})\|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:)))(%.+)?\s*$` | +| `consumer_user_agent` | `String` | Optional | The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "brand_name": "brand_name0", + "locale": "locale4", + "return_url": "return_url2", + "cancel_url": "cancel_url4" +} +``` + diff --git a/doc/models/blik-level-0-payment-object.md b/doc/models/blik-level-0-payment-object.md new file mode 100644 index 0000000..79f6bea --- /dev/null +++ b/doc/models/blik-level-0-payment-object.md @@ -0,0 +1,23 @@ + +# BLIK Level 0 Payment Object + +Information used to pay using BLIK level_0 flow. + +## Structure + +`BLIKLevel0PaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `auth_code` | `String` | Required | The 6-digit code used to authenticate a consumer within BLIK.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `6`, *Pattern*: `^[0-9]{6}$` | + +## Example (as JSON) + +```json +{ + "auth_code": "auth_code6" +} +``` + diff --git a/doc/models/blik-one-click-payment-object.md b/doc/models/blik-one-click-payment-object.md new file mode 100644 index 0000000..9a567bc --- /dev/null +++ b/doc/models/blik-one-click-payment-object.md @@ -0,0 +1,23 @@ + +# BLIK One Click Payment Object + +Information used to pay using BLIK one-click flow. + +## Structure + +`BLIKOneClickPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `consumer_reference` | `String` | Optional | The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `64`, *Pattern*: `^[ -~]{3,64}$` | + +## Example (as JSON) + +```json +{ + "consumer_reference": "consumer_reference0" +} +``` + diff --git a/doc/models/blik-one-click-payment-request.md b/doc/models/blik-one-click-payment-request.md new file mode 100644 index 0000000..4905431 --- /dev/null +++ b/doc/models/blik-one-click-payment-request.md @@ -0,0 +1,29 @@ + +# BLIK One Click Payment Request + +Information used to pay using BLIK one-click flow. + +## Structure + +`BLIKOneClickPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `auth_code` | `String` | Optional | The 6-digit code used to authenticate a consumer within BLIK.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `6`, *Pattern*: `^[0-9]{6}$` | +| `consumer_reference` | `String` | Required | The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `64`, *Pattern*: `^[ -~]{3,64}$` | +| `alias_label` | `String` | Optional | A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `35`, *Pattern*: `^[ -~]{8,35}$` | +| `alias_key` | `String` | Optional | A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `19`, *Pattern*: `^[0-9]+$` | + +## Example (as JSON) + +```json +{ + "auth_code": "auth_code8", + "consumer_reference": "consumer_reference6", + "alias_label": "alias_label2", + "alias_key": "alias_key6" +} +``` + diff --git a/doc/models/blik-payment-object.md b/doc/models/blik-payment-object.md new file mode 100644 index 0000000..4f1f2a3 --- /dev/null +++ b/doc/models/blik-payment-object.md @@ -0,0 +1,31 @@ + +# BLIK Payment Object + +Information used to pay using BLIK. + +## Structure + +`BLIKPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `one_click` | [`BLIKOneClickPaymentObject`](../../doc/models/blik-one-click-payment-object.md) | Optional | Information used to pay using BLIK one-click flow. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "country_code": "country_code8", + "email": "email8", + "one_click": { + "consumer_reference": "consumer_reference2" + } +} +``` + diff --git a/doc/models/blik-payment-request.md b/doc/models/blik-payment-request.md new file mode 100644 index 0000000..6713d2a --- /dev/null +++ b/doc/models/blik-payment-request.md @@ -0,0 +1,46 @@ + +# BLIK Payment Request + +Information needed to pay using BLIK. + +## Structure + +`BLIKPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `experience_context` | [`BLIKExperienceContext`](../../doc/models/blik-experience-context.md) | Optional | Customizes the payer experience during the approval process for the BLIK payment. | +| `level_0` | [`BLIKLevel0PaymentObject`](../../doc/models/blik-level-0-payment-object.md) | Optional | Information used to pay using BLIK level_0 flow. | +| `one_click` | [`BLIKOneClickPaymentRequest`](../../doc/models/blik-one-click-payment-request.md) | Optional | Information used to pay using BLIK one-click flow. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "country_code": "country_code8", + "email": "email8", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + }, + "level_0": { + "auth_code": "auth_code8" + }, + "one_click": { + "auth_code": "auth_code0", + "consumer_reference": "consumer_reference2", + "alias_label": "alias_label6", + "alias_key": "alias_key4" + } +} +``` + diff --git a/doc/models/capture-incomplete-reason.md b/doc/models/capture-incomplete-reason.md new file mode 100644 index 0000000..bc27f97 --- /dev/null +++ b/doc/models/capture-incomplete-reason.md @@ -0,0 +1,26 @@ + +# Capture Incomplete Reason + +The reason why the captured payment status is `PENDING` or `DENIED`. + +## Enumeration + +`CaptureIncompleteReason` + +## Fields + +| Name | +| --- | +| `BUYER_COMPLAINT` | +| `CHARGEBACK` | +| `ECHECK` | +| `INTERNATIONAL_WITHDRAWAL` | +| `OTHER` | +| `PENDING_REVIEW` | +| `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION` | +| `REFUNDED` | +| `TRANSACTION_APPROVED_AWAITING_FUNDING` | +| `UNILATERAL` | +| `VERIFICATION_REQUIRED` | +| `DECLINED_BY_RISK_FRAUD_FILTERS` | + diff --git a/doc/models/capture-payment-instruction.md b/doc/models/capture-payment-instruction.md new file mode 100644 index 0000000..0806705 --- /dev/null +++ b/doc/models/capture-payment-instruction.md @@ -0,0 +1,48 @@ + +# Capture Payment Instruction + +Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. + +## Structure + +`CapturePaymentInstruction` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | +| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | +| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^.*$` | + +## Example (as JSON) + +```json +{ + "disbursement_mode": "INSTANT", + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id8" +} +``` + diff --git a/doc/models/capture-request.md b/doc/models/capture-request.md new file mode 100644 index 0000000..0403a0e --- /dev/null +++ b/doc/models/capture-request.md @@ -0,0 +1,68 @@ + +# Capture Request + +## Structure + +`CaptureRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.{1,127}$` | +| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.{1,255}$` | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | +| `payment_instruction` | [`CapturePaymentInstruction`](../../doc/models/capture-payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | +| `soft_descriptor` | `String` | Optional | The payment descriptor on the payer's account statement.
**Constraints**: *Maximum Length*: `22` | + +## Example (as JSON) + +```json +{ + "final_capture": false, + "invoice_id": "invoice_id4", + "note_to_payer": "note_to_payer6", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payment_instruction": { + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "disbursement_mode": "INSTANT", + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" + } +} +``` + diff --git a/doc/models/capture-status-details.md b/doc/models/capture-status-details.md new file mode 100644 index 0000000..815b5f1 --- /dev/null +++ b/doc/models/capture-status-details.md @@ -0,0 +1,23 @@ + +# Capture Status Details + +The details of the captured payment status. + +## Structure + +`CaptureStatusDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `reason` | [`CaptureIncompleteReason`](../../doc/models/capture-incomplete-reason.md) | Optional | The reason why the captured payment status is `PENDING` or `DENIED`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "reason": "BUYER_COMPLAINT" +} +``` + diff --git a/doc/models/capture-status-with-details.md b/doc/models/capture-status-with-details.md new file mode 100644 index 0000000..86fc1af --- /dev/null +++ b/doc/models/capture-status-with-details.md @@ -0,0 +1,27 @@ + +# Capture Status With Details + +The status and status details of a captured payment. + +## Structure + +`CaptureStatusWithDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | +| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | + +## Example (as JSON) + +```json +{ + "status": "COMPLETED", + "status_details": { + "reason": "VERIFICATION_REQUIRED" + } +} +``` + diff --git a/doc/models/capture-status.md b/doc/models/capture-status.md new file mode 100644 index 0000000..ce4005d --- /dev/null +++ b/doc/models/capture-status.md @@ -0,0 +1,20 @@ + +# Capture Status + +The status of the captured payment. + +## Enumeration + +`CaptureStatus` + +## Fields + +| Name | +| --- | +| `COMPLETED` | +| `DECLINED` | +| `PARTIALLY_REFUNDED` | +| `PENDING` | +| `REFUNDED` | +| `FAILED` | + diff --git a/doc/models/capture.md b/doc/models/capture.md new file mode 100644 index 0000000..f1eff18 --- /dev/null +++ b/doc/models/capture.md @@ -0,0 +1,48 @@ + +# Capture + +A captured payment. + +## Structure + +`Capture` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | +| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | +| `id` | `String` | Optional | The PayPal-generated ID for the captured payment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | +| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | +| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | +| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. | +| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "final_capture": false, + "disbursement_mode": "INSTANT", + "status": "PARTIALLY_REFUNDED", + "status_details": { + "reason": "VERIFICATION_REQUIRED" + }, + "id": "id6", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id6" +} +``` + diff --git a/doc/models/captured-payment.md b/doc/models/captured-payment.md new file mode 100644 index 0000000..d0db123 --- /dev/null +++ b/doc/models/captured-payment.md @@ -0,0 +1,50 @@ + +# Captured Payment + +A captured payment. + +## Structure + +`CapturedPayment` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | +| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | +| `id` | `String` | Optional | The PayPal-generated ID for the captured payment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | +| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | +| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | +| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. | +| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. | +| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | + +## Example (as JSON) + +```json +{ + "final_capture": false, + "disbursement_mode": "INSTANT", + "status": "PARTIALLY_REFUNDED", + "status_details": { + "reason": "VERIFICATION_REQUIRED" + }, + "id": "id4", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id4" +} +``` + diff --git a/doc/models/card-attributes-response.md b/doc/models/card-attributes-response.md new file mode 100644 index 0000000..fb21af9 --- /dev/null +++ b/doc/models/card-attributes-response.md @@ -0,0 +1,36 @@ + +# Card Attributes Response + +Additional attributes associated with the use of this card. + +## Structure + +`CardAttributesResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | + +## Example (as JSON) + +```json +{ + "vault": { + "id": "id6", + "status": "APPROVED", + "customer": { + "id": "id0" + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] + } +} +``` + diff --git a/doc/models/card-attributes.md b/doc/models/card-attributes.md new file mode 100644 index 0000000..081ceb0 --- /dev/null +++ b/doc/models/card-attributes.md @@ -0,0 +1,40 @@ + +# Card Attributes + +Additional attributes associated with the use of this card. + +## Structure + +`CardAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`CustomerInformation`](../../doc/models/customer-information.md) | Optional | The details about a customer in PayPal's system of record. | +| `vault` | [`VaultInstructionBase`](../../doc/models/vault-instruction-base.md) | Optional | Basic vault instruction specification that can be extended by specific payment sources that supports vaulting. | +| `verification` | [`CardVerification`](../../doc/models/card-verification.md) | Optional | The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "email_address": "email_address2", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + } + }, + "vault": { + "store_in_vault": "ON_SUCCESS" + }, + "verification": { + "method": "3D_SECURE" + } +} +``` + diff --git a/doc/models/card-brand.md b/doc/models/card-brand.md new file mode 100644 index 0000000..1f8b771 --- /dev/null +++ b/doc/models/card-brand.md @@ -0,0 +1,38 @@ + +# Card Brand + +The card network or brand. Applies to credit, debit, gift, and payment cards. + +## Enumeration + +`CardBrand` + +## Fields + +| Name | +| --- | +| `VISA` | +| `MASTERCARD` | +| `DISCOVER` | +| `AMEX` | +| `SOLO` | +| `JCB` | +| `STAR` | +| `DELTA` | +| `SWITCH` | +| `MAESTRO` | +| `CB_NATIONALE` | +| `CONFIGOGA` | +| `CONFIDIS` | +| `ELECTRON` | +| `CETELEM` | +| `CHINA_UNION_PAY` | +| `DINERS` | +| `ELO` | +| `HIPER` | +| `HIPERCARD` | +| `RUPAY` | +| `GE` | +| `SYNCHRONY` | +| `UNKNOWN` | + diff --git a/doc/models/card-experience-context.md b/doc/models/card-experience-context.md new file mode 100644 index 0000000..5247a36 --- /dev/null +++ b/doc/models/card-experience-context.md @@ -0,0 +1,25 @@ + +# Card Experience Context + +Customizes the payer experience during the 3DS Approval for payment. + +## Structure + +`CardExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `return_url` | `String` | Optional | Describes the URL. | +| `cancel_url` | `String` | Optional | Describes the URL. | + +## Example (as JSON) + +```json +{ + "return_url": "return_url2", + "cancel_url": "cancel_url0" +} +``` + diff --git a/doc/models/card-from-request.md b/doc/models/card-from-request.md new file mode 100644 index 0000000..4d4e3dd --- /dev/null +++ b/doc/models/card-from-request.md @@ -0,0 +1,25 @@ + +# Card From Request + +Representation of card details as received in the request. + +## Structure + +`CardFromRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | + +## Example (as JSON) + +```json +{ + "expiry": "expiry6", + "last_digits": "last_digits2" +} +``` + diff --git a/doc/models/card-payment-token.md b/doc/models/card-payment-token.md new file mode 100644 index 0000000..7d4364f --- /dev/null +++ b/doc/models/card-payment-token.md @@ -0,0 +1,45 @@ + +# Card Payment Token + +Full representation of a Card Payment Token including network token. + +## Structure + +`CardPaymentToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | +| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | +| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | +| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `network_token` | `Object` | Optional | - | + +## Example (as JSON) + +```json +{ + "name": "name2", + "last_digits": "last_digits6", + "brand": "RUPAY", + "expiry": "expiry0", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/card-request.md b/doc/models/card-request.md new file mode 100644 index 0000000..b8ecdcd --- /dev/null +++ b/doc/models/card-request.md @@ -0,0 +1,43 @@ + +# Card Request + +The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
+ +## Structure + +`CardRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `attributes` | [`CardAttributes`](../../doc/models/card-attributes.md) | Optional | Additional attributes associated with the use of this card. | +| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `stored_credential` | [`CardStoredCredential`](../../doc/models/card-stored-credential.md) | Optional | Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| +| `network_token` | [`NetworkToken`](../../doc/models/network-token.md) | Optional | The Third Party Network token used to fund a payment. | +| `experience_context` | [`CardExperienceContext`](../../doc/models/card-experience-context.md) | Optional | Customizes the payer experience during the 3DS Approval for payment. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "number": "number4", + "expiry": "expiry6", + "security_code": "security_code0", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/card-response-entity.md b/doc/models/card-response-entity.md new file mode 100644 index 0000000..79db2be --- /dev/null +++ b/doc/models/card-response-entity.md @@ -0,0 +1,44 @@ + +# Card Response Entity + +Full representation of a Card Payment Token. + +## Structure + +`CardResponseEntity` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | +| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | +| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | +| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "name": "name4", + "last_digits": "last_digits8", + "brand": "STAR", + "expiry": "expiry2", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/card-response.md b/doc/models/card-response.md new file mode 100644 index 0000000..43d9e8d --- /dev/null +++ b/doc/models/card-response.md @@ -0,0 +1,40 @@ + +# Card Response + +The payment card to use to fund a payment. Card can be a credit or debit card. + +## Structure + +`CardResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | +| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. | +| `from_request` | [`CardFromRequest`](../../doc/models/card-from-request.md) | Optional | Representation of card details as received in the request. | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | + +## Example (as JSON) + +```json +{ + "name": "name0", + "last_digits": "last_digits4", + "brand": "CONFIDIS", + "available_networks": [ + "ELO", + "DINERS", + "CHINA_UNION_PAY" + ], + "type": "CREDIT" +} +``` + diff --git a/doc/models/card-stored-credential.md b/doc/models/card-stored-credential.md new file mode 100644 index 0000000..87fb950 --- /dev/null +++ b/doc/models/card-stored-credential.md @@ -0,0 +1,34 @@ + +# Card Stored Credential + +Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
+ +## Structure + +`CardStoredCredential` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_type` | [`StoredPaymentSourcePaymentType`](../../doc/models/stored-payment-source-payment-type.md) | Required | Indicates the type of the stored payment_source payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `previous_network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | + +## Example (as JSON) + +```json +{ + "payment_initiator": "CUSTOMER", + "payment_type": "ONE_TIME", + "usage": "DERIVED", + "previous_network_transaction_reference": { + "id": "id6", + "date": "date2", + "network": "VISA", + "acquirer_reference_number": "acquirer_reference_number8" + } +} +``` + diff --git a/doc/models/card-supplementary-data.md b/doc/models/card-supplementary-data.md new file mode 100644 index 0000000..1dbfc5f --- /dev/null +++ b/doc/models/card-supplementary-data.md @@ -0,0 +1,53 @@ + +# Card Supplementary Data + +Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. + +## Structure + +`CardSupplementaryData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `level_2` | [`Level2CardProcessingData`](../../doc/models/level-2-card-processing-data.md) | Optional | The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business. | +| `level_3` | [`Level3CardProcessingData`](../../doc/models/level-3-card-processing-data.md) | Optional | The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business. | + +## Example (as JSON) + +```json +{ + "level_2": { + "invoice_id": "invoice_id4", + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + } + }, + "level_3": { + "shipping_amount": { + "currency_code": "currency_code0", + "value": "value6" + }, + "duty_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "discount_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "shipping_address": { + "address_line_1": "address_line_10", + "address_line_2": "address_line_20", + "admin_area_2": "admin_area_24", + "admin_area_1": "admin_area_16", + "postal_code": "postal_code2", + "country_code": "country_code0" + }, + "ships_from_postal_code": "ships_from_postal_code4" + } +} +``` + diff --git a/doc/models/card-type.md b/doc/models/card-type.md new file mode 100644 index 0000000..acb2601 --- /dev/null +++ b/doc/models/card-type.md @@ -0,0 +1,19 @@ + +# Card Type + +Type of card. i.e Credit, Debit and so on. + +## Enumeration + +`CardType` + +## Fields + +| Name | +| --- | +| `CREDIT` | +| `DEBIT` | +| `PREPAID` | +| `STORE` | +| `UNKNOWN` | + diff --git a/doc/models/card-verification-details.md b/doc/models/card-verification-details.md new file mode 100644 index 0000000..c72d441 --- /dev/null +++ b/doc/models/card-verification-details.md @@ -0,0 +1,35 @@ + +# Card Verification Details + +Card Verification details including the authorization details and 3D SECURE details. + +## Structure + +`CardVerificationDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `network_transaction_id` | `String` | Optional | Transaction Identifier as given by the network to indicate a previously executed CIT authorization. Only present when authorization is successful for a verification.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1024`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | +| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date".
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | +| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `processor_response` | [`CardVerificationProcessorResponse`](../../doc/models/card-verification-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | + +## Example (as JSON) + +```json +{ + "network_transaction_id": "network_transaction_id4", + "date": "date8", + "network": "SOLO", + "time": "time2", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } +} +``` + diff --git a/doc/models/card-verification-method.md b/doc/models/card-verification-method.md new file mode 100644 index 0000000..2cc747c --- /dev/null +++ b/doc/models/card-verification-method.md @@ -0,0 +1,18 @@ + +# Card Verification Method + +The method used for card verification. + +## Enumeration + +`CardVerificationMethod` + +## Fields + +| Name | +| --- | +| `SCA_ALWAYS` | +| `SCA_WHEN_REQUIRED` | +| `ENUM_3D_SECURE` | +| `AVS_CVV` | + diff --git a/doc/models/card-verification-processor-response.md b/doc/models/card-verification-processor-response.md new file mode 100644 index 0000000..3736dcb --- /dev/null +++ b/doc/models/card-verification-processor-response.md @@ -0,0 +1,25 @@ + +# Card Verification Processor Response + +The processor response information for payment requests, such as direct credit card transactions. + +## Structure + +`CardVerificationProcessorResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `avs_code` | [`AVSCode`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. | +| `cvv_code` | [`CVVCode`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. | + +## Example (as JSON) + +```json +{ + "avs_code": "E", + "cvv_code": "All others" +} +``` + diff --git a/doc/models/card-verification.md b/doc/models/card-verification.md new file mode 100644 index 0000000..947af07 --- /dev/null +++ b/doc/models/card-verification.md @@ -0,0 +1,23 @@ + +# Card Verification + +The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). + +## Structure + +`CardVerification` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `method` | [`CardVerificationMethod`](../../doc/models/card-verification-method.md) | Optional | The method used for card verification.
**Default**: `CardVerificationMethod::SCA_WHEN_REQUIRED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "method": "SCA_WHEN_REQUIRED" +} +``` + diff --git a/doc/models/checkout-payment-intent.md b/doc/models/checkout-payment-intent.md new file mode 100644 index 0000000..e499f52 --- /dev/null +++ b/doc/models/checkout-payment-intent.md @@ -0,0 +1,16 @@ + +# Checkout Payment Intent + +The intent to either capture payment immediately or authorize a payment for an order after order creation. + +## Enumeration + +`CheckoutPaymentIntent` + +## Fields + +| Name | +| --- | +| `CAPTURE` | +| `AUTHORIZE` | + diff --git a/doc/models/cobranded-card.md b/doc/models/cobranded-card.md new file mode 100644 index 0000000..c0f07b4 --- /dev/null +++ b/doc/models/cobranded-card.md @@ -0,0 +1,36 @@ + +# Cobranded Card + +Details about the merchant cobranded card used for order purchase. + +## Structure + +`CobrandedCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `labels` | `Array` | Optional | Array of labels for the cobranded card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `25`, *Minimum Length*: `1`, *Maximum Length*: `256` | +| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "labels": [ + "labels2", + "labels3" + ], + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } +} +``` + diff --git a/doc/models/confirm-order-request.md b/doc/models/confirm-order-request.md new file mode 100644 index 0000000..5bc8119 --- /dev/null +++ b/doc/models/confirm-order-request.md @@ -0,0 +1,109 @@ + +# Confirm Order Request + +Payer confirms the intent to pay for the Order using the provided payment source. + +## Structure + +`ConfirmOrderRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Required | The payment source definition. | +| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `application_context` | [`OrderConfirmApplicationContext`](../../doc/models/order-confirm-application-context.md) | Optional | Customizes the payer confirmation experience. | + +## Example (as JSON) + +```json +{ + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "bancontact": { + "name": "name0", + "country_code": "country_code0", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } + }, + "blik": { + "name": "name2", + "country_code": "country_code2", + "email": "email4", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + }, + "level_0": { + "auth_code": "auth_code8" + }, + "one_click": { + "auth_code": "auth_code0", + "consumer_reference": "consumer_reference2", + "alias_label": "alias_label6", + "alias_key": "alias_key4" + } + } + }, + "processing_instruction": "NO_INSTRUCTION", + "application_context": { + "brand_name": "brand_name8", + "locale": "locale2", + "return_url": "return_url0", + "cancel_url": "cancel_url2", + "stored_payment_source": { + "payment_initiator": "CUSTOMER", + "payment_type": "RECURRING", + "usage": "FIRST", + "previous_network_transaction_reference": { + "id": "id6", + "date": "date2", + "network": "VISA", + "acquirer_reference_number": "acquirer_reference_number8" + } + } + } +} +``` + diff --git a/doc/models/customer-information.md b/doc/models/customer-information.md new file mode 100644 index 0000000..aa9d482 --- /dev/null +++ b/doc/models/customer-information.md @@ -0,0 +1,32 @@ + +# Customer Information + +The details about a customer in PayPal's system of record. + +## Structure + +`CustomerInformation` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | + +## Example (as JSON) + +```json +{ + "id": "id6", + "email_address": "email_address4", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + } +} +``` + diff --git a/doc/models/customer-request.md b/doc/models/customer-request.md new file mode 100644 index 0000000..1583b51 --- /dev/null +++ b/doc/models/customer-request.md @@ -0,0 +1,25 @@ + +# Customer Request + +Customer in merchant's or partner's system of records. + +## Structure + +`CustomerRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | + +## Example (as JSON) + +```json +{ + "id": "id8", + "merchant_customer_id": "merchant_customer_id0" +} +``` + diff --git a/doc/models/customer-vault-payment-tokens-response.md b/doc/models/customer-vault-payment-tokens-response.md new file mode 100644 index 0000000..a38be5a --- /dev/null +++ b/doc/models/customer-vault-payment-tokens-response.md @@ -0,0 +1,274 @@ + +# Customer Vault Payment Tokens Response + +Collection of payment tokens saved for a given customer. + +## Structure + +`CustomerVaultPaymentTokensResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `total_items` | `Integer` | Optional | Total number of items.
**Constraints**: `>= 1`, `<= 50` | +| `total_pages` | `Integer` | Optional | Total number of pages.
**Constraints**: `>= 1`, `<= 10` | +| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | +| `payment_tokens` | [`Array`](../../doc/models/payment-token-response.md) | Optional | **Constraints**: *Minimum Items*: `0`, *Maximum Items*: `64` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | + +## Example (as JSON) + +```json +{ + "total_items": 132, + "total_pages": 168, + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_tokens": [ + { + "id": "id4", + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "apple_pay": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "bank": { + "ach_debit": { + "verification_status": "verification_status6" + }, + "sepa_debit": { + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } + } + } + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] + }, + { + "id": "id4", + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "apple_pay": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "bank": { + "ach_debit": { + "verification_status": "verification_status6" + }, + "sepa_debit": { + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } + } + } + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] + } + ], + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] +} +``` + diff --git a/doc/models/cvv-code.md b/doc/models/cvv-code.md new file mode 100644 index 0000000..48872cd --- /dev/null +++ b/doc/models/cvv-code.md @@ -0,0 +1,28 @@ + +# CVV Code + +The card verification value code for for Visa, Discover, Mastercard, or American Express. + +## Enumeration + +`CVVCode` + +## Fields + +| Name | +| --- | +| `E` | +| `I` | +| `M` | +| `N` | +| `P` | +| `S` | +| `U` | +| `X` | +| `ENUM_ALL_OTHERS` | +| `ENUM_0` | +| `ENUM_1` | +| `ENUM_2` | +| `ENUM_3` | +| `ENUM_4` | + diff --git a/doc/models/disbursement-mode.md b/doc/models/disbursement-mode.md new file mode 100644 index 0000000..ce3a783 --- /dev/null +++ b/doc/models/disbursement-mode.md @@ -0,0 +1,16 @@ + +# Disbursement Mode + +The funds that are held on behalf of the merchant. + +## Enumeration + +`DisbursementMode` + +## Fields + +| Name | +| --- | +| `INSTANT` | +| `DELAYED` | + diff --git a/doc/models/dispute-category.md b/doc/models/dispute-category.md new file mode 100644 index 0000000..248d986 --- /dev/null +++ b/doc/models/dispute-category.md @@ -0,0 +1,16 @@ + +# Dispute Category + +The condition that is covered for the transaction. + +## Enumeration + +`DisputeCategory` + +## Fields + +| Name | +| --- | +| `ITEM_NOT_RECEIVED` | +| `UNAUTHORIZED_TRANSACTION` | + diff --git a/doc/models/eci-flag.md b/doc/models/eci-flag.md new file mode 100644 index 0000000..f89dc2b --- /dev/null +++ b/doc/models/eci-flag.md @@ -0,0 +1,20 @@ + +# ECI Flag + +Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor. + +## Enumeration + +`ECIFlag` + +## Fields + +| Name | +| --- | +| `MASTERCARD_NON_3D_SECURE_TRANSACTION` | +| `MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION` | +| `MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION` | +| `FULLY_AUTHENTICATED_TRANSACTION` | +| `ATTEMPTED_AUTHENTICATION_TRANSACTION` | +| `NON_3D_SECURE_TRANSACTION` | + diff --git a/doc/models/enrollment-status.md b/doc/models/enrollment-status.md new file mode 100644 index 0000000..f256314 --- /dev/null +++ b/doc/models/enrollment-status.md @@ -0,0 +1,18 @@ + +# Enrollment Status + +Status of Authentication eligibility. + +## Enumeration + +`EnrollmentStatus` + +## Fields + +| Name | +| --- | +| `Y` | +| `N` | +| `U` | +| `B` | + diff --git a/doc/models/eps-payment-object.md b/doc/models/eps-payment-object.md new file mode 100644 index 0000000..30a08ca --- /dev/null +++ b/doc/models/eps-payment-object.md @@ -0,0 +1,27 @@ + +# EPS Payment Object + +Information used to pay using eps. + +## Structure + +`EPSPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code6", + "bic": "bic8" +} +``` + diff --git a/doc/models/eps-payment-request.md b/doc/models/eps-payment-request.md new file mode 100644 index 0000000..58229f1 --- /dev/null +++ b/doc/models/eps-payment-request.md @@ -0,0 +1,33 @@ + +# EPS Payment Request + +Information needed to pay using eps. + +## Structure + +`EPSPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "country_code": "country_code2", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/error-details.md b/doc/models/error-details.md new file mode 100644 index 0000000..af79a7d --- /dev/null +++ b/doc/models/error-details.md @@ -0,0 +1,44 @@ + +# Error Details + +The error details. Required for client-side `4XX` errors. + +## Structure + +`ErrorDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `field` | `String` | Optional | The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors. | +| `value` | `String` | Optional | The value of the field that caused the error. | +| `location` | `String` | Optional | The location of the field that caused the error. Value is `body`, `path`, or `query`.
**Default**: `'body'` | +| `issue` | `String` | Required | The unique, fine-grained application-level error code. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` | +| `description` | `String` | Optional | The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value. | + +## Example (as JSON) + +```json +{ + "location": "body", + "issue": "issue8", + "field": "field0", + "value": "value8", + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "description": "description4" +} +``` + diff --git a/doc/models/error-exception.md b/doc/models/error-exception.md new file mode 100644 index 0000000..fa8252a --- /dev/null +++ b/doc/models/error-exception.md @@ -0,0 +1,81 @@ + +# Error Exception + +The error details. + +## Structure + +`ErrorException` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The human-readable, unique name of the error. | +| `message` | `String` | Required | The message that describes the error. | +| `debug_id` | `String` | Required | The PayPal internal ID. Used for correlation purposes. | +| `details` | [`Array`](../../doc/models/error-details.md) | Optional | An array of additional details about the error. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links). | + +## Example (as JSON) + +```json +{ + "name": "name4", + "message": "message4", + "debug_id": "debug_id0", + "details": [ + { + "field": "field4", + "value": "value2", + "location": "location4", + "issue": "issue6", + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "description": "description0" + }, + { + "field": "field4", + "value": "value2", + "location": "location4", + "issue": "issue6", + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "description": "description0" + } + ], + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] +} +``` + diff --git a/doc/models/exchange-rate.md b/doc/models/exchange-rate.md new file mode 100644 index 0000000..c6281ec --- /dev/null +++ b/doc/models/exchange-rate.md @@ -0,0 +1,27 @@ + +# Exchange Rate + +The exchange rate that determines the amount to convert from one currency to another currency. + +## Structure + +`ExchangeRate` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `source_currency` | `String` | Optional | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | +| `target_currency` | `String` | Optional | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | +| `value` | `String` | Optional | The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point. | + +## Example (as JSON) + +```json +{ + "source_currency": "source_currency0", + "target_currency": "target_currency2", + "value": "value2" +} +``` + diff --git a/doc/models/experience-context.md b/doc/models/experience-context.md new file mode 100644 index 0000000..4f2c07a --- /dev/null +++ b/doc/models/experience-context.md @@ -0,0 +1,31 @@ + +# Experience Context + +Customizes the payer experience during the approval process for the payment. + +## Structure + +`ExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | +| `return_url` | `String` | Optional | Describes the URL. | +| `cancel_url` | `String` | Optional | Describes the URL. | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "brand_name": "brand_name0", + "locale": "locale4", + "return_url": "return_url2", + "cancel_url": "cancel_url4" +} +``` + diff --git a/doc/models/fullfillment-type.md b/doc/models/fullfillment-type.md new file mode 100644 index 0000000..3c9598b --- /dev/null +++ b/doc/models/fullfillment-type.md @@ -0,0 +1,18 @@ + +# Fullfillment Type + +A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both. + +## Enumeration + +`FullfillmentType` + +## Fields + +| Name | +| --- | +| `SHIPPING` | +| `PICKUP_IN_PERSON` | +| `PICKUP_IN_STORE` | +| `PICKUP_FROM_PERSON` | + diff --git a/doc/models/giropay-payment-object.md b/doc/models/giropay-payment-object.md new file mode 100644 index 0000000..255dfd2 --- /dev/null +++ b/doc/models/giropay-payment-object.md @@ -0,0 +1,27 @@ + +# Giropay Payment Object + +Information needed to pay using giropay. + +## Structure + +`GiropayPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code6", + "bic": "bic8" +} +``` + diff --git a/doc/models/giropay-payment-request.md b/doc/models/giropay-payment-request.md new file mode 100644 index 0000000..314dbf0 --- /dev/null +++ b/doc/models/giropay-payment-request.md @@ -0,0 +1,33 @@ + +# Giropay Payment Request + +Information needed to pay using giropay. + +## Structure + +`GiropayPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name8", + "country_code": "country_code8", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/google-pay-authentication-method.md b/doc/models/google-pay-authentication-method.md new file mode 100644 index 0000000..b86c36e --- /dev/null +++ b/doc/models/google-pay-authentication-method.md @@ -0,0 +1,16 @@ + +# Google Pay Authentication Method + +Authentication Method which is used for the card transaction. + +## Enumeration + +`GooglePayAuthenticationMethod` + +## Fields + +| Name | +| --- | +| `PAN_ONLY` | +| `CRYPTOGRAM_3DS` | + diff --git a/doc/models/google-pay-card-attributes.md b/doc/models/google-pay-card-attributes.md new file mode 100644 index 0000000..a0e64a0 --- /dev/null +++ b/doc/models/google-pay-card-attributes.md @@ -0,0 +1,25 @@ + +# Google Pay Card Attributes + +Additional attributes associated with the use of this card. + +## Structure + +`GooglePayCardAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `verification` | [`CardVerification`](../../doc/models/card-verification.md) | Optional | The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). | + +## Example (as JSON) + +```json +{ + "verification": { + "method": "3D_SECURE" + } +} +``` + diff --git a/doc/models/google-pay-card-response.md b/doc/models/google-pay-card-response.md new file mode 100644 index 0000000..174a861 --- /dev/null +++ b/doc/models/google-pay-card-response.md @@ -0,0 +1,39 @@ + +# Google Pay Card Response + +The payment card to use to fund a Google Pay payment response. Can be a credit or debit card. + +## Structure + +`GooglePayCardResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{2,4}$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | + +## Example (as JSON) + +```json +{ + "name": "name4", + "last_digits": "last_digits8", + "type": "DEBIT", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/google-pay-decrypted-token-data.md b/doc/models/google-pay-decrypted-token-data.md new file mode 100644 index 0000000..6ce3826 --- /dev/null +++ b/doc/models/google-pay-decrypted-token-data.md @@ -0,0 +1,33 @@ + +# Google Pay Decrypted Token Data + +Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method. + +## Structure + +`GooglePayDecryptedTokenData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `message_id` | `String` | Optional | A unique ID that identifies the message in case it needs to be revoked or located at a later time.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | +| `message_expiration` | `String` | Optional | Date and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that's expired.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `\d{13}` | +| `payment_method` | [`GooglePayPaymentMethod`](../../doc/models/google-pay-payment-method.md) | Required | The type of the payment credential. Currently, only CARD is supported.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4` | +| `authentication_method` | [`GooglePayAuthenticationMethod`](../../doc/models/google-pay-authentication-method.md) | Required | Authentication Method which is used for the card transaction.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50` | +| `cryptogram` | `String` | Optional | Base-64 cryptographic identifier used by card schemes to validate the token verification result. This is a conditionally required field if authentication_method is CRYPTOGRAM_3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | +| `eci_indicator` | `String` | Optional | Electronic Commerce Indicator may not always be present. It is only returned for tokens on the Visa card network. This value is passed through in the payment authorization request.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | + +## Example (as JSON) + +```json +{ + "message_id": "message_id4", + "message_expiration": "message_expiration8", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram0", + "eci_indicator": "eci_indicator4" +} +``` + diff --git a/doc/models/google-pay-payment-method.md b/doc/models/google-pay-payment-method.md new file mode 100644 index 0000000..5b7b60f --- /dev/null +++ b/doc/models/google-pay-payment-method.md @@ -0,0 +1,15 @@ + +# Google Pay Payment Method + +The type of the payment credential. Currently, only CARD is supported. + +## Enumeration + +`GooglePayPaymentMethod` + +## Fields + +| Name | +| --- | +| `CARD` | + diff --git a/doc/models/google-pay-request.md b/doc/models/google-pay-request.md new file mode 100644 index 0000000..e440a19 --- /dev/null +++ b/doc/models/google-pay-request.md @@ -0,0 +1,46 @@ + +# Google Pay Request + +Information needed to pay using Google Pay. + +## Structure + +`GooglePayRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `phone_number` | [`PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `card` | `Object` | Optional | The payment card information. | +| `decrypted_token` | [`GooglePayDecryptedTokenData`](../../doc/models/google-pay-decrypted-token-data.md) | Optional | Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method. | +| `assurance_details` | `Object` | Optional | - | +| `attributes` | [`GooglePayCardAttributes`](../../doc/models/google-pay-card-attributes.md) | Optional | Additional attributes associated with the use of this card. | + +## Example (as JSON) + +```json +{ + "name": "name4", + "email_address": "email_address2", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "key1": "val1", + "key2": "val2" + }, + "decrypted_token": { + "message_id": "message_id0", + "message_expiration": "message_expiration2", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0" + } +} +``` + diff --git a/doc/models/google-pay-wallet-response.md b/doc/models/google-pay-wallet-response.md new file mode 100644 index 0000000..c179879 --- /dev/null +++ b/doc/models/google-pay-wallet-response.md @@ -0,0 +1,45 @@ + +# Google Pay Wallet Response + +Google Pay Wallet payment data. + +## Structure + +`GooglePayWalletResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `phone_number` | [`PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `card` | [`GooglePayCardResponse`](../../doc/models/google-pay-card-response.md) | Optional | The payment card to use to fund a Google Pay payment response. Can be a credit or debit card. | + +## Example (as JSON) + +```json +{ + "name": "name0", + "email_address": "email_address2", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } +} +``` + diff --git a/doc/models/ideal-payment-object.md b/doc/models/ideal-payment-object.md new file mode 100644 index 0000000..15b10dc --- /dev/null +++ b/doc/models/ideal-payment-object.md @@ -0,0 +1,29 @@ + +# IDEAL Payment Object + +Information used to pay using iDEAL. + +## Structure + +`IDEALPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code4", + "bic": "bic8", + "iban_last_chars": "iban_last_chars4" +} +``` + diff --git a/doc/models/ideal-payment-request.md b/doc/models/ideal-payment-request.md new file mode 100644 index 0000000..9b5dda3 --- /dev/null +++ b/doc/models/ideal-payment-request.md @@ -0,0 +1,35 @@ + +# IDEAL Payment Request + +Information needed to pay using iDEAL. + +## Structure + +`IDEALPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code4", + "bic": "bic8", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/instrument-authorization-status.md b/doc/models/instrument-authorization-status.md new file mode 100644 index 0000000..f119e0d --- /dev/null +++ b/doc/models/instrument-authorization-status.md @@ -0,0 +1,20 @@ + +# Instrument Authorization Status + +The authorization status of the wallet instrument. + +## Enumeration + +`InstrumentAuthorizationStatus` + +## Fields + +| Name | +| --- | +| `AUTHORIZED` | +| `BLOCKED` | +| `FAILED` | +| `NOT_APPLICABLE` | +| `NOT_SUPPORTED` | +| `UNAUTHORIZED` | + diff --git a/doc/models/item-category.md b/doc/models/item-category.md new file mode 100644 index 0000000..47cdb63 --- /dev/null +++ b/doc/models/item-category.md @@ -0,0 +1,17 @@ + +# Item Category + +The item category type. + +## Enumeration + +`ItemCategory` + +## Fields + +| Name | +| --- | +| `DIGITAL_GOODS` | +| `PHYSICAL_GOODS` | +| `DONATION` | + diff --git a/doc/models/item.md b/doc/models/item.md new file mode 100644 index 0000000..107f9fb --- /dev/null +++ b/doc/models/item.md @@ -0,0 +1,45 @@ + +# Item + +The details for the items to be purchased. + +## Structure + +`Item` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `unit_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | +| `tax` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `quantity` | `String` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | +| `description` | `String` | Optional | The detailed item description.
**Constraints**: *Maximum Length*: `127` | +| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | +| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | +| `category` | [`ItemCategory`](../../doc/models/item-category.md) | Optional | The item category type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` | +| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | +| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | + +## Example (as JSON) + +```json +{ + "name": "name2", + "unit_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax": { + "currency_code": "currency_code0", + "value": "value6" + }, + "quantity": "quantity8", + "description": "description2", + "sku": "sku8", + "url": "url6", + "category": "DIGITAL_GOODS" +} +``` + diff --git a/doc/models/level-2-card-processing-data.md b/doc/models/level-2-card-processing-data.md new file mode 100644 index 0000000..ce61b0c --- /dev/null +++ b/doc/models/level-2-card-processing-data.md @@ -0,0 +1,28 @@ + +# Level 2 Card Processing Data + +The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business. + +## Structure + +`Level2CardProcessingData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `invoice_id` | `String` | Optional | Use this field to pass a purchase identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `17`, *Pattern*: `^[\w‘\-.,":;\!?]*$` | +| `tax_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "invoice_id": "invoice_id8", + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + } +} +``` + diff --git a/doc/models/level-3-card-processing-data.md b/doc/models/level-3-card-processing-data.md new file mode 100644 index 0000000..36280d2 --- /dev/null +++ b/doc/models/level-3-card-processing-data.md @@ -0,0 +1,48 @@ + +# Level 3 Card Processing Data + +The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business. + +## Structure + +`Level3CardProcessingData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `duty_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `shipping_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `ships_from_postal_code` | `String` | Optional | Use this field to specify the postal code of the shipping location.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | +| `line_items` | [`Array`](../../doc/models/line-item.md) | Optional | A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `100` | + +## Example (as JSON) + +```json +{ + "shipping_amount": { + "currency_code": "currency_code0", + "value": "value6" + }, + "duty_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "discount_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "shipping_address": { + "address_line_1": "address_line_10", + "address_line_2": "address_line_20", + "admin_area_2": "admin_area_24", + "admin_area_1": "admin_area_16", + "postal_code": "postal_code2", + "country_code": "country_code0" + }, + "ships_from_postal_code": "ships_from_postal_code6" +} +``` + diff --git a/doc/models/liability-shift-indicator.md b/doc/models/liability-shift-indicator.md new file mode 100644 index 0000000..dbd5882 --- /dev/null +++ b/doc/models/liability-shift-indicator.md @@ -0,0 +1,17 @@ + +# Liability Shift Indicator + +Liability shift indicator. The outcome of the issuer's authentication. + +## Enumeration + +`LiabilityShiftIndicator` + +## Fields + +| Name | +| --- | +| `NO` | +| `POSSIBLE` | +| `UNKNOWN` | + diff --git a/doc/models/line-item.md b/doc/models/line-item.md new file mode 100644 index 0000000..d6fbac8 --- /dev/null +++ b/doc/models/line-item.md @@ -0,0 +1,48 @@ + +# Line Item + +The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. + +## Structure + +`LineItem` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `unit_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | +| `tax` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `quantity` | `String` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | +| `description` | `String` | Optional | The detailed item description.
**Constraints**: *Maximum Length*: `127` | +| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | +| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | +| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | +| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | +| `commodity_code` | `String` | Optional | Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | +| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `total_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `unit_of_measure` | `String` | Optional | Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | + +## Example (as JSON) + +```json +{ + "name": "name8", + "unit_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax": { + "currency_code": "currency_code0", + "value": "value6" + }, + "quantity": "quantity4", + "description": "description8", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" +} +``` + diff --git a/doc/models/link-description.md b/doc/models/link-description.md new file mode 100644 index 0000000..03c01d4 --- /dev/null +++ b/doc/models/link-description.md @@ -0,0 +1,27 @@ + +# Link Description + +The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information. + +## Structure + +`LinkDescription` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `href` | `String` | Required | The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call. | +| `rel` | `String` | Required | The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml). | +| `method` | [`LinkHTTPMethod`](../../doc/models/link-http-method.md) | Optional | The HTTP method required to make the related call. | + +## Example (as JSON) + +```json +{ + "href": "href2", + "rel": "rel6", + "method": "PUT" +} +``` + diff --git a/doc/models/link-http-method.md b/doc/models/link-http-method.md new file mode 100644 index 0000000..45341a5 --- /dev/null +++ b/doc/models/link-http-method.md @@ -0,0 +1,22 @@ + +# Link HTTP Method + +The HTTP method required to make the related call. + +## Enumeration + +`LinkHTTPMethod` + +## Fields + +| Name | +| --- | +| `GET` | +| `POST` | +| `PUT` | +| `DELETE` | +| `HEAD` | +| `CONNECT` | +| `OPTIONS` | +| `PATCH` | + diff --git a/doc/models/money.md b/doc/models/money.md new file mode 100644 index 0000000..76a33c3 --- /dev/null +++ b/doc/models/money.md @@ -0,0 +1,25 @@ + +# Money + +The currency and amount for a financial transaction, such as a balance or payment due. + +## Structure + +`Money` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `currency_code` | `String` | Required | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | +| `value` | `String` | Required | The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).
**Constraints**: *Maximum Length*: `32`, *Pattern*: `^((-?[0-9]+)\|(-?([0-9]+)?[.][0-9]+))$` | + +## Example (as JSON) + +```json +{ + "currency_code": "currency_code6", + "value": "value2" +} +``` + diff --git a/doc/models/my-bank-payment-object.md b/doc/models/my-bank-payment-object.md new file mode 100644 index 0000000..cf7eef6 --- /dev/null +++ b/doc/models/my-bank-payment-object.md @@ -0,0 +1,29 @@ + +# My Bank Payment Object + +Information used to pay using MyBank. + +## Structure + +`MyBankPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | + +## Example (as JSON) + +```json +{ + "name": "name4", + "country_code": "country_code4", + "bic": "bic6", + "iban_last_chars": "iban_last_chars2" +} +``` + diff --git a/doc/models/my-bank-payment-request.md b/doc/models/my-bank-payment-request.md new file mode 100644 index 0000000..c46d661 --- /dev/null +++ b/doc/models/my-bank-payment-request.md @@ -0,0 +1,33 @@ + +# My Bank Payment Request + +Information needed to pay using MyBank. + +## Structure + +`MyBankPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name0", + "country_code": "country_code0", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/name.md b/doc/models/name.md new file mode 100644 index 0000000..d8921e0 --- /dev/null +++ b/doc/models/name.md @@ -0,0 +1,25 @@ + +# Name + +The name of the party. + +## Structure + +`Name` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `given_name` | `String` | Optional | When the party is a person, the party's given, or first, name.
**Constraints**: *Maximum Length*: `140` | +| `surname` | `String` | Optional | When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.
**Constraints**: *Maximum Length*: `140` | + +## Example (as JSON) + +```json +{ + "given_name": "given_name2", + "surname": "surname8" +} +``` + diff --git a/doc/models/net-amount-breakdown-item.md b/doc/models/net-amount-breakdown-item.md new file mode 100644 index 0000000..48f1725 --- /dev/null +++ b/doc/models/net-amount-breakdown-item.md @@ -0,0 +1,37 @@ + +# Net Amount Breakdown Item + +The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds. + +## Structure + +`NetAmountBreakdownItem` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payable_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `converted_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `exchange_rate` | [`ExchangeRate`](../../doc/models/exchange-rate.md) | Optional | The exchange rate that determines the amount to convert from one currency to another currency. | + +## Example (as JSON) + +```json +{ + "payable_amount": { + "currency_code": "currency_code8", + "value": "value4" + }, + "converted_amount": { + "currency_code": "currency_code0", + "value": "value6" + }, + "exchange_rate": { + "source_currency": "source_currency4", + "target_currency": "target_currency6", + "value": "value6" + } +} +``` + diff --git a/doc/models/network-token.md b/doc/models/network-token.md new file mode 100644 index 0000000..59580fd --- /dev/null +++ b/doc/models/network-token.md @@ -0,0 +1,31 @@ + +# Network Token + +The Third Party Network token used to fund a payment. + +## Structure + +`NetworkToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `number` | `String` | Required | Third party network token number.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `String` | Required | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `cryptogram` | `String` | Optional | An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions.
**Constraints**: *Minimum Length*: `28`, *Maximum Length*: `32`, *Pattern*: `^.*$` | +| `eci_flag` | [`ECIFlag`](../../doc/models/eci-flag.md) | Optional | Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `token_requestor_id` | `String` | Optional | A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `11`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "number": "number0", + "expiry": "expiry0", + "cryptogram": "cryptogram2", + "eci_flag": "ATTEMPTED_AUTHENTICATION_TRANSACTION", + "token_requestor_id": "token_requestor_id8" +} +``` + diff --git a/doc/models/network-transaction-reference-entity.md b/doc/models/network-transaction-reference-entity.md new file mode 100644 index 0000000..78c64a7 --- /dev/null +++ b/doc/models/network-transaction-reference-entity.md @@ -0,0 +1,29 @@ + +# Network Transaction Reference Entity + +Previous network transaction reference including id and network. + +## Structure + +`NetworkTransactionReferenceEntity` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Required | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | +| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | +| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "id": "id6", + "date": "date2", + "network": "VISA", + "time": "time6" +} +``` + diff --git a/doc/models/network-transaction-reference.md b/doc/models/network-transaction-reference.md new file mode 100644 index 0000000..9df617d --- /dev/null +++ b/doc/models/network-transaction-reference.md @@ -0,0 +1,29 @@ + +# Network Transaction Reference + +Reference values used by the card network to identify a transaction. + +## Structure + +`NetworkTransactionReference` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Required | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | +| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | +| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `acquirer_reference_number` | `String` | Optional | Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9]+$` | + +## Example (as JSON) + +```json +{ + "id": "id6", + "date": "date8", + "network": "CB_NATIONALE", + "acquirer_reference_number": "acquirer_reference_number2" +} +``` + diff --git a/doc/models/o-auth-provider-error.md b/doc/models/o-auth-provider-error.md new file mode 100644 index 0000000..ab73f72 --- /dev/null +++ b/doc/models/o-auth-provider-error.md @@ -0,0 +1,20 @@ + +# O Auth Provider Error + +OAuth 2 Authorization error codes + +## Enumeration + +`OAuthProviderError` + +## Fields + +| Name | Description | +| --- | --- | +| `INVALID_REQUEST` | The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed. | +| `INVALID_CLIENT` | Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). | +| `INVALID_GRANT` | The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. | +| `UNAUTHORIZED_CLIENT` | The authenticated client is not authorized to use this authorization grant type. | +| `UNSUPPORTED_GRANT_TYPE` | The authorization grant type is not supported by the authorization server. | +| `INVALID_SCOPE` | The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner. | + diff --git a/doc/models/o-auth-provider-exception.md b/doc/models/o-auth-provider-exception.md new file mode 100644 index 0000000..92f220d --- /dev/null +++ b/doc/models/o-auth-provider-exception.md @@ -0,0 +1,27 @@ + +# O Auth Provider Exception + +OAuth 2 Authorization endpoint exception. + +## Structure + +`OAuthProviderException` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `error` | [`OAuthProviderError`](../../doc/models/o-auth-provider-error.md) | Required | Gets or sets error code. | +| `error_description` | `String` | Optional | Gets or sets human-readable text providing additional information on error.
Used to assist the client developer in understanding the error that occurred. | +| `error_uri` | `String` | Optional | Gets or sets a URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. | + +## Example (as JSON) + +```json +{ + "error": "unsupported_grant_type", + "error_description": "error_description8", + "error_uri": "error_uri8" +} +``` + diff --git a/doc/models/o-auth-token.md b/doc/models/o-auth-token.md new file mode 100644 index 0000000..1e1c481 --- /dev/null +++ b/doc/models/o-auth-token.md @@ -0,0 +1,35 @@ + +# O Auth Token + +OAuth 2 Authorization endpoint response + +## Structure + +`OAuthToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `access_token` | `String` | Required | Access token | +| `token_type` | `String` | Required | Type of access token | +| `expires_in` | `Integer` | Optional | Time in seconds before the access token expires | +| `scope` | `String` | Optional | List of scopes granted
This is a space-delimited list of strings. | +| `expiry` | `Integer` | Optional | Time of token expiry as unix timestamp (UTC) | +| `refresh_token` | `String` | Optional | Refresh token
Used to get a new access token when it expires. | +| `id_token` | `String` | Optional | An ID token response type is of JSON Web Token (JWT) that contains claims about the identity of the authenticated user. | + +## Example (as JSON) + +```json +{ + "access_token": "access_token4", + "token_type": "token_type6", + "expires_in": 74, + "scope": "scope6", + "expiry": 88, + "refresh_token": "refresh_token6", + "id_token": "id_token6" +} +``` + diff --git a/doc/models/order-application-context-landing-page.md b/doc/models/order-application-context-landing-page.md new file mode 100644 index 0000000..7b60be3 --- /dev/null +++ b/doc/models/order-application-context-landing-page.md @@ -0,0 +1,17 @@ + +# Order Application Context Landing Page + +DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object. + +## Enumeration + +`OrderApplicationContextLandingPage` + +## Fields + +| Name | +| --- | +| `LOGIN` | +| `BILLING` | +| `NO_PREFERENCE` | + diff --git a/doc/models/order-application-context-shipping-preference.md b/doc/models/order-application-context-shipping-preference.md new file mode 100644 index 0000000..165eb75 --- /dev/null +++ b/doc/models/order-application-context-shipping-preference.md @@ -0,0 +1,17 @@ + +# Order Application Context Shipping Preference + +DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object. + +## Enumeration + +`OrderApplicationContextShippingPreference` + +## Fields + +| Name | +| --- | +| `GET_FROM_FILE` | +| `NO_SHIPPING` | +| `SET_PROVIDED_ADDRESS` | + diff --git a/doc/models/order-application-context-user-action.md b/doc/models/order-application-context-user-action.md new file mode 100644 index 0000000..502c030 --- /dev/null +++ b/doc/models/order-application-context-user-action.md @@ -0,0 +1,16 @@ + +# Order Application Context User Action + +DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object. + +## Enumeration + +`OrderApplicationContextUserAction` + +## Fields + +| Name | +| --- | +| `CONTINUE` | +| `PAY_NOW` | + diff --git a/doc/models/order-application-context.md b/doc/models/order-application-context.md new file mode 100644 index 0000000..3ce805d --- /dev/null +++ b/doc/models/order-application-context.md @@ -0,0 +1,35 @@ + +# Order Application Context + +Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
+ +## Structure + +`OrderApplicationContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `landing_page` | [`OrderApplicationContextLandingPage`](../../doc/models/order-application-context-landing-page.md) | Optional | DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | +| `shipping_preference` | [`OrderApplicationContextShippingPreference`](../../doc/models/order-application-context-shipping-preference.md) | Optional | DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[0-9A-Z_]+$` | +| `user_action` | [`OrderApplicationContextUserAction`](../../doc/models/order-application-context-user-action.md) | Optional | DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextUserAction::CONTINUE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_method` | [`PaymentMethodPreference`](../../doc/models/payment-method-preference.md) | Optional | The customer and merchant payment preferences. | +| `return_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. | +| `cancel_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. | +| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| + +## Example (as JSON) + +```json +{ + "landing_page": "NO_PREFERENCE", + "shipping_preference": "GET_FROM_FILE", + "user_action": "CONTINUE", + "brand_name": "brand_name2", + "locale": "locale6" +} +``` + diff --git a/doc/models/order-authorize-request-payment-source.md b/doc/models/order-authorize-request-payment-source.md new file mode 100644 index 0000000..f2a38df --- /dev/null +++ b/doc/models/order-authorize-request-payment-source.md @@ -0,0 +1,109 @@ + +# Order Authorize Request Payment Source + +The payment source definition. + +## Structure + +`OrderAuthorizeRequestPaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| +| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | +| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | +| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | +| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | +| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "apple_pay": { + "id": "id0", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + }, + "decrypted_token": { + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id6", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "key1": "val1", + "key2": "val2" + }, + "decrypted_token": { + "message_id": "message_id0", + "message_expiration": "message_expiration2", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0" + } + } +} +``` + diff --git a/doc/models/order-authorize-request.md b/doc/models/order-authorize-request.md new file mode 100644 index 0000000..24602a1 --- /dev/null +++ b/doc/models/order-authorize-request.md @@ -0,0 +1,106 @@ + +# Order Authorize Request + +The authorization of an order request. + +## Structure + +`OrderAuthorizeRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_source` | [`OrderAuthorizeRequestPaymentSource`](../../doc/models/order-authorize-request-payment-source.md) | Optional | The payment source definition. | + +## Example (as JSON) + +```json +{ + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "apple_pay": { + "id": "id0", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + }, + "decrypted_token": { + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id6", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "key1": "val1", + "key2": "val2" + }, + "decrypted_token": { + "message_id": "message_id0", + "message_expiration": "message_expiration2", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0" + } + } + } +} +``` + diff --git a/doc/models/order-authorize-response-payment-source.md b/doc/models/order-authorize-response-payment-source.md new file mode 100644 index 0000000..428bcbc --- /dev/null +++ b/doc/models/order-authorize-response-payment-source.md @@ -0,0 +1,88 @@ + +# Order Authorize Response Payment Source + +The payment source used to fund the payment. + +## Structure + +`OrderAuthorizeResponsePaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardResponse`](../../doc/models/card-response.md) | Optional | The payment card to use to fund a payment. Card can be a credit or debit card. | +| `paypal` | [`PayPalWalletResponse`](../../doc/models/pay-pal-wallet-response.md) | Optional | The PayPal Wallet response. | +| `apple_pay` | [`ApplePayPaymentObject`](../../doc/models/apple-pay-payment-object.md) | Optional | Information needed to pay using ApplePay. | +| `google_pay` | [`GooglePayWalletResponse`](../../doc/models/google-pay-wallet-response.md) | Optional | Google Pay Wallet payment data. | +| `venmo` | [`VenmoWalletResponse`](../../doc/models/venmo-wallet-response.md) | Optional | Venmo wallet response. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "available_networks": [ + "DELTA" + ], + "type": "UNKNOWN" + }, + "paypal": { + "email_address": "email_address0", + "account_id": "account_id4", + "account_status": "VERIFIED", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_type": "FAX" + }, + "apple_pay": { + "id": "id0", + "token": "token6", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "venmo": { + "email_address": "email_address4", + "account_id": "account_id8", + "user_name": "user_name2", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_number": { + "national_number": "national_number6" + } + } +} +``` + diff --git a/doc/models/order-authorize-response.md b/doc/models/order-authorize-response.md new file mode 100644 index 0000000..c586539 --- /dev/null +++ b/doc/models/order-authorize-response.md @@ -0,0 +1,98 @@ + +# Order Authorize Response + +## Structure + +`OrderAuthorizeResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `id` | `String` | Optional | The ID of the order. | +| `payment_source` | [`OrderAuthorizeResponsePaymentSource`](../../doc/models/order-authorize-response-payment-source.md) | Optional | The payment source used to fund the payment. | +| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | +| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | +| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | +| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` | + +## Example (as JSON) + +```json +{ + "processing_instruction": "NO_INSTRUCTION", + "create_time": "create_time0", + "update_time": "update_time4", + "id": "id4", + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "available_networks": [ + "DELTA" + ], + "type": "UNKNOWN" + }, + "paypal": { + "email_address": "email_address0", + "account_id": "account_id4", + "account_status": "VERIFIED", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_type": "FAX" + }, + "apple_pay": { + "id": "id0", + "token": "token6", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "venmo": { + "email_address": "email_address4", + "account_id": "account_id8", + "user_name": "user_name2", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_number": { + "national_number": "national_number6" + } + } + }, + "intent": "CAPTURE" +} +``` + diff --git a/doc/models/order-capture-request-payment-source.md b/doc/models/order-capture-request-payment-source.md new file mode 100644 index 0000000..45462d2 --- /dev/null +++ b/doc/models/order-capture-request-payment-source.md @@ -0,0 +1,109 @@ + +# Order Capture Request Payment Source + +The payment source definition. + +## Structure + +`OrderCaptureRequestPaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| +| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | +| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | +| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | +| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | +| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "apple_pay": { + "id": "id0", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + }, + "decrypted_token": { + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id6", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "key1": "val1", + "key2": "val2" + }, + "decrypted_token": { + "message_id": "message_id0", + "message_expiration": "message_expiration2", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0" + } + } +} +``` + diff --git a/doc/models/order-capture-request.md b/doc/models/order-capture-request.md new file mode 100644 index 0000000..f688224 --- /dev/null +++ b/doc/models/order-capture-request.md @@ -0,0 +1,106 @@ + +# Order Capture Request + +Completes an capture payment for an order. + +## Structure + +`OrderCaptureRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_source` | [`OrderCaptureRequestPaymentSource`](../../doc/models/order-capture-request-payment-source.md) | Optional | The payment source definition. | + +## Example (as JSON) + +```json +{ + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "apple_pay": { + "id": "id0", + "name": "name0", + "email_address": "email_address8", + "phone_number": { + "national_number": "national_number6" + }, + "decrypted_token": { + "transaction_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "tokenized_card": { + "name": "name4", + "number": "number2", + "expiry": "expiry2", + "card_type": "HIPER", + "type": "UNKNOWN" + }, + "device_manufacturer_id": "device_manufacturer_id6", + "payment_data_type": "3DSECURE", + "payment_data": { + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0", + "emv_data": "emv_data0", + "pin": "pin4" + } + } + }, + "google_pay": { + "name": "name8", + "email_address": "email_address6", + "phone_number": { + "country_code": "country_code2", + "national_number": "national_number6" + }, + "card": { + "key1": "val1", + "key2": "val2" + }, + "decrypted_token": { + "message_id": "message_id0", + "message_expiration": "message_expiration2", + "payment_method": "CARD", + "authentication_method": "PAN_ONLY", + "cryptogram": "cryptogram6", + "eci_indicator": "eci_indicator0" + } + } + } +} +``` + diff --git a/doc/models/order-confirm-application-context.md b/doc/models/order-confirm-application-context.md new file mode 100644 index 0000000..63608b8 --- /dev/null +++ b/doc/models/order-confirm-application-context.md @@ -0,0 +1,41 @@ + +# Order Confirm Application Context + +Customizes the payer confirmation experience. + +## Structure + +`OrderConfirmApplicationContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | Label to present to your payer as part of the PayPal hosted web experience.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `return_url` | `String` | Optional | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | +| `cancel_url` | `String` | Optional | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | +| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| + +## Example (as JSON) + +```json +{ + "brand_name": "brand_name6", + "locale": "locale0", + "return_url": "return_url8", + "cancel_url": "cancel_url0", + "stored_payment_source": { + "payment_initiator": "CUSTOMER", + "payment_type": "RECURRING", + "usage": "FIRST", + "previous_network_transaction_reference": { + "id": "id6", + "date": "date2", + "network": "VISA", + "acquirer_reference_number": "acquirer_reference_number8" + } + } +} +``` + diff --git a/doc/models/order-request.md b/doc/models/order-request.md new file mode 100644 index 0000000..441a391 --- /dev/null +++ b/doc/models/order-request.md @@ -0,0 +1,190 @@ + +# Order Request + +The order request details. + +## Structure + +`OrderRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Required | The intent to either capture payment immediately or authorize a payment for an order after order creation. | +| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | +| `purchase_units` | [`Array`](../../doc/models/purchase-unit-request.md) | Required | An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | +| `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Optional | The payment source definition. | +| `application_context` | [`OrderApplicationContext`](../../doc/models/order-application-context.md) | Optional | Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
| + +## Example (as JSON) + +```json +{ + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "reference_id4", + "amount": { + "currency_code": "currency_code6", + "value": "value0", + "breakdown": { + "item_total": { + "currency_code": "currency_code0", + "value": "value6" + }, + "shipping": { + "currency_code": "currency_code0", + "value": "value6" + }, + "handling": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + }, + "insurance": { + "currency_code": "currency_code2", + "value": "value8" + } + } + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "payment_instruction": { + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "disbursement_mode": "INSTANT", + "payee_pricing_tier_id": "payee_pricing_tier_id2", + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" + }, + "description": "description6", + "custom_id": "custom_id4" + } + ], + "payer": { + "email_address": "email_address6", + "payer_id": "payer_id6", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date4" + }, + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "bancontact": { + "name": "name0", + "country_code": "country_code0", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } + }, + "blik": { + "name": "name2", + "country_code": "country_code2", + "email": "email4", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + }, + "level_0": { + "auth_code": "auth_code8" + }, + "one_click": { + "auth_code": "auth_code0", + "consumer_reference": "consumer_reference2", + "alias_label": "alias_label6", + "alias_key": "alias_key4" + } + } + }, + "application_context": { + "brand_name": "brand_name8", + "locale": "locale2", + "landing_page": "BILLING", + "shipping_preference": "SET_PROVIDED_ADDRESS", + "user_action": "CONTINUE" + } +} +``` + diff --git a/doc/models/order-status.md b/doc/models/order-status.md new file mode 100644 index 0000000..64f7c6f --- /dev/null +++ b/doc/models/order-status.md @@ -0,0 +1,20 @@ + +# Order Status + +The order status. + +## Enumeration + +`OrderStatus` + +## Fields + +| Name | +| --- | +| `CREATED` | +| `SAVED` | +| `APPROVED` | +| `VOIDED` | +| `COMPLETED` | +| `PAYER_ACTION_REQUIRED` | + diff --git a/doc/models/order-tracker-item.md b/doc/models/order-tracker-item.md new file mode 100644 index 0000000..2a08403 --- /dev/null +++ b/doc/models/order-tracker-item.md @@ -0,0 +1,32 @@ + +# Order Tracker Item + +The details of the items in the shipment. + +## Structure + +`OrderTrackerItem` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `quantity` | `String` | Optional | The item quantity. Must be a whole number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | +| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item. This can contain unicode characters.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | +| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | +| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | + +## Example (as JSON) + +```json +{ + "name": "name6", + "quantity": "quantity2", + "sku": "sku2", + "url": "url0", + "image_url": "image_url2" +} +``` + diff --git a/doc/models/order-tracker-request.md b/doc/models/order-tracker-request.md new file mode 100644 index 0000000..2fd4c7e --- /dev/null +++ b/doc/models/order-tracker-request.md @@ -0,0 +1,48 @@ + +# Order Tracker Request + +The tracking details of an order. + +## Structure + +`OrderTrackerRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `tracking_number` | `String` | Optional | The tracking number for the shipment. This property supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | +| `carrier` | [`ShipmentCarrier`](../../doc/models/shipment-carrier.md) | Optional | The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9A-Z_]+$` | +| `carrier_name_other` | `String` | Optional | The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | +| `capture_id` | `String` | Required | The PayPal capture ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[a-zA-Z0-9]*$` | +| `notify_payer` | `TrueClass \| FalseClass` | Optional | If true, sends an email notification to the payer of the PayPal transaction. The email contains the tracking information that was uploaded through the API.
**Default**: `false` | +| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. | + +## Example (as JSON) + +```json +{ + "capture_id": "capture_id0", + "notify_payer": false, + "tracking_number": "tracking_number6", + "carrier": "SNTGLOBAL_API", + "carrier_name_other": "carrier_name_other0", + "items": [ + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + }, + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + } + ] +} +``` + diff --git a/doc/models/order-tracker-response.md b/doc/models/order-tracker-response.md new file mode 100644 index 0000000..9ce7c54 --- /dev/null +++ b/doc/models/order-tracker-response.md @@ -0,0 +1,63 @@ + +# Order Tracker Response + +The tracking response on creation of tracker. + +## Structure + +`OrderTrackerResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The tracker id. | +| `status` | [`OrderTrackerStatus`](../../doc/models/order-tracker-status.md) | Optional | The status of the item shipment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9A-Z_]+$` | +| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "id": "id2", + "status": "CANCELLED", + "items": [ + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + }, + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + } + ], + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "create_time": "create_time8" +} +``` + diff --git a/doc/models/order-tracker-status.md b/doc/models/order-tracker-status.md new file mode 100644 index 0000000..ce13a7a --- /dev/null +++ b/doc/models/order-tracker-status.md @@ -0,0 +1,16 @@ + +# Order Tracker Status + +The status of the item shipment. + +## Enumeration + +`OrderTrackerStatus` + +## Fields + +| Name | +| --- | +| `CANCELLED` | +| `SHIPPED` | + diff --git a/doc/models/order.md b/doc/models/order.md new file mode 100644 index 0000000..30a2fe5 --- /dev/null +++ b/doc/models/order.md @@ -0,0 +1,77 @@ + +# Order + +The order details. + +## Structure + +`Order` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `id` | `String` | Optional | The ID of the order. | +| `payment_source` | [`PaymentSourceResponse`](../../doc/models/payment-source-response.md) | Optional | The payment source used to fund the payment. | +| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | +| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | +| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | +| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | +| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. | + +## Example (as JSON) + +```json +{ + "processing_instruction": "NO_INSTRUCTION", + "create_time": "create_time8", + "update_time": "update_time4", + "id": "id2", + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "available_networks": [ + "DELTA" + ], + "type": "UNKNOWN" + }, + "paypal": { + "email_address": "email_address0", + "account_id": "account_id4", + "account_status": "VERIFIED", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_type": "FAX" + }, + "bancontact": { + "name": "name0", + "country_code": "country_code0", + "bic": "bic2", + "iban_last_chars": "iban_last_chars8", + "card_last_digits": "card_last_digits4" + }, + "blik": { + "name": "name2", + "country_code": "country_code2", + "email": "email4", + "one_click": { + "consumer_reference": "consumer_reference2" + } + }, + "eps": { + "name": "name6", + "country_code": "country_code6", + "bic": "bic8" + } + }, + "intent": "CAPTURE" +} +``` + diff --git a/doc/models/p24-payment-object.md b/doc/models/p24-payment-object.md new file mode 100644 index 0000000..e127a9d --- /dev/null +++ b/doc/models/p24-payment-object.md @@ -0,0 +1,32 @@ + +# P24 Payment Object + +Information used to pay using P24(Przelewy24). + +## Structure + +`P24PaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `payment_descriptor` | `String` | Optional | P24 generated payment description.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | +| `method_id` | `String` | Optional | Numeric identifier of the payment scheme or bank used for the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300` | +| `method_description` | `String` | Optional | Friendly name of the payment scheme or bank used for the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | + +## Example (as JSON) + +```json +{ + "name": "name4", + "email": "email2", + "country_code": "country_code4", + "payment_descriptor": "payment_descriptor8", + "method_id": "method_id8" +} +``` + diff --git a/doc/models/p24-payment-request.md b/doc/models/p24-payment-request.md new file mode 100644 index 0000000..ae8f394 --- /dev/null +++ b/doc/models/p24-payment-request.md @@ -0,0 +1,35 @@ + +# P24 Payment Request + +Information needed to pay using P24 (Przelewy24). + +## Structure + +`P24PaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `email` | `String` | Required | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name6", + "email": "email0", + "country_code": "country_code6", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/pa-res-status.md b/doc/models/pa-res-status.md new file mode 100644 index 0000000..f1a5579 --- /dev/null +++ b/doc/models/pa-res-status.md @@ -0,0 +1,22 @@ + +# PA Res Status + +Transactions status result identifier. The outcome of the issuer's authentication. + +## Enumeration + +`PAResStatus` + +## Fields + +| Name | +| --- | +| `Y` | +| `N` | +| `U` | +| `A` | +| `C` | +| `R` | +| `D` | +| `I` | + diff --git a/doc/models/patch-op.md b/doc/models/patch-op.md new file mode 100644 index 0000000..e8ec8f7 --- /dev/null +++ b/doc/models/patch-op.md @@ -0,0 +1,20 @@ + +# Patch Op + +The operation. + +## Enumeration + +`PatchOp` + +## Fields + +| Name | +| --- | +| `ADD` | +| `REMOVE` | +| `REPLACE` | +| `MOVE` | +| `COPY` | +| `TEST` | + diff --git a/doc/models/patch.md b/doc/models/patch.md new file mode 100644 index 0000000..69a98fe --- /dev/null +++ b/doc/models/patch.md @@ -0,0 +1,32 @@ + +# Patch + +The JSON patch object to apply partial updates to resources. + +## Structure + +`Patch` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `op` | [`PatchOp`](../../doc/models/patch-op.md) | Required | The operation. | +| `path` | `String` | Optional | The JSON Pointer to the target document location at which to complete the operation. | +| `value` | `Object` | Optional | The value to apply. The remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified. | +| `from` | `String` | Optional | The JSON Pointer to the target document location from which to move the value. Required for the move operation. | + +## Example (as JSON) + +```json +{ + "op": "add", + "path": "path6", + "value": { + "key1": "val1", + "key2": "val2" + }, + "from": "from0" +} +``` + diff --git a/doc/models/pay-pal-experience-landing-page.md b/doc/models/pay-pal-experience-landing-page.md new file mode 100644 index 0000000..76138a3 --- /dev/null +++ b/doc/models/pay-pal-experience-landing-page.md @@ -0,0 +1,17 @@ + +# Pay Pal Experience Landing Page + +The type of landing page to show on the PayPal site for customer checkout. + +## Enumeration + +`PayPalExperienceLandingPage` + +## Fields + +| Name | +| --- | +| `LOGIN` | +| `GUEST_CHECKOUT` | +| `NO_PREFERENCE` | + diff --git a/doc/models/pay-pal-experience-user-action.md b/doc/models/pay-pal-experience-user-action.md new file mode 100644 index 0000000..b83c10b --- /dev/null +++ b/doc/models/pay-pal-experience-user-action.md @@ -0,0 +1,16 @@ + +# Pay Pal Experience User Action + +Configures a Continue or Pay Now checkout flow. + +## Enumeration + +`PayPalExperienceUserAction` + +## Fields + +| Name | +| --- | +| `CONTINUE` | +| `PAY_NOW` | + diff --git a/doc/models/pay-pal-payment-token-customer-type.md b/doc/models/pay-pal-payment-token-customer-type.md new file mode 100644 index 0000000..1496795 --- /dev/null +++ b/doc/models/pay-pal-payment-token-customer-type.md @@ -0,0 +1,16 @@ + +# Pay Pal Payment Token Customer Type + +The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. + +## Enumeration + +`PayPalPaymentTokenCustomerType` + +## Fields + +| Name | +| --- | +| `CONSUMER` | +| `BUSINESS` | + diff --git a/doc/models/pay-pal-payment-token-usage-pattern.md b/doc/models/pay-pal-payment-token-usage-pattern.md new file mode 100644 index 0000000..ff90cbb --- /dev/null +++ b/doc/models/pay-pal-payment-token-usage-pattern.md @@ -0,0 +1,20 @@ + +# Pay Pal Payment Token Usage Pattern + +Expected business/pricing model for the billing agreement. + +## Enumeration + +`PayPalPaymentTokenUsagePattern` + +## Fields + +| Name | +| --- | +| `IMMEDIATE` | +| `DEFERRED` | +| `RECURRING_PREPAID` | +| `RECURRING_POSTPAID` | +| `THRESHOLD_PREPAID` | +| `THRESHOLD_POSTPAID` | + diff --git a/doc/models/pay-pal-payment-token-usage-type.md b/doc/models/pay-pal-payment-token-usage-type.md new file mode 100644 index 0000000..c725536 --- /dev/null +++ b/doc/models/pay-pal-payment-token-usage-type.md @@ -0,0 +1,16 @@ + +# Pay Pal Payment Token Usage Type + +The usage type associated with the PayPal payment token. + +## Enumeration + +`PayPalPaymentTokenUsageType` + +## Fields + +| Name | +| --- | +| `MERCHANT` | +| `PLATFORM` | + diff --git a/doc/models/pay-pal-payment-token.md b/doc/models/pay-pal-payment-token.md new file mode 100644 index 0000000..1defe7b --- /dev/null +++ b/doc/models/pay-pal-payment-token.md @@ -0,0 +1,49 @@ + +# Pay Pal Payment Token + +## Structure + +`PayPalPaymentToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | +| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | +| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `account_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `phone_number` | [`Phone`](../../doc/models/phone.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | + +## Example (as JSON) + +```json +{ + "permit_multiple_payment_tokens": false, + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "usage_type": "usage_type6", + "customer_type": "customer_type0" +} +``` + diff --git a/doc/models/pay-pal-wallet-account-verification-status.md b/doc/models/pay-pal-wallet-account-verification-status.md new file mode 100644 index 0000000..1d3724b --- /dev/null +++ b/doc/models/pay-pal-wallet-account-verification-status.md @@ -0,0 +1,16 @@ + +# Pay Pal Wallet Account Verification Status + +The account status indicates whether the buyer has verified the financial details associated with their PayPal account. + +## Enumeration + +`PayPalWalletAccountVerificationStatus` + +## Fields + +| Name | +| --- | +| `VERIFIED` | +| `UNVERIFIED` | + diff --git a/doc/models/pay-pal-wallet-attributes-response.md b/doc/models/pay-pal-wallet-attributes-response.md new file mode 100644 index 0000000..22d2826 --- /dev/null +++ b/doc/models/pay-pal-wallet-attributes-response.md @@ -0,0 +1,75 @@ + +# Pay Pal Wallet Attributes Response + +Additional attributes associated with the use of a PayPal Wallet. + +## Structure + +`PayPalWalletAttributesResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault` | [`PayPalWalletVaultResponse`](../../doc/models/pay-pal-wallet-vault-response.md) | Optional | The details about a saved PayPal Wallet payment source. | +| `cobranded_cards` | [`Array`](../../doc/models/cobranded-card.md) | Optional | An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `25` | + +## Example (as JSON) + +```json +{ + "vault": { + "id": "id6", + "status": "APPROVED", + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "customer": { + "id": "id0", + "email_address": "email_address2", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "merchant_customer_id": "merchant_customer_id2" + } + }, + "cobranded_cards": [ + { + "labels": [ + "labels4", + "labels3" + ], + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + }, + { + "labels": [ + "labels4", + "labels3" + ], + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + } + ] +} +``` + diff --git a/doc/models/pay-pal-wallet-attributes.md b/doc/models/pay-pal-wallet-attributes.md new file mode 100644 index 0000000..27d6caf --- /dev/null +++ b/doc/models/pay-pal-wallet-attributes.md @@ -0,0 +1,42 @@ + +# Pay Pal Wallet Attributes + +Additional attributes associated with the use of this PayPal Wallet. + +## Structure + +`PayPalWalletAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`PayPalWalletCustomerRequest`](../../doc/models/pay-pal-wallet-customer-request.md) | Optional | - | +| `vault` | [`PayPalWalletVaultInstruction`](../../doc/models/pay-pal-wallet-vault-instruction.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "email_address": "email_address2", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "merchant_customer_id": "merchant_customer_id2" + }, + "vault": { + "store_in_vault": "ON_SUCCESS", + "description": "description6", + "usage_pattern": "THRESHOLD_PREPAID", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "permit_multiple_payment_tokens": false + } +} +``` + diff --git a/doc/models/pay-pal-wallet-customer-request.md b/doc/models/pay-pal-wallet-customer-request.md new file mode 100644 index 0000000..7e99cd0 --- /dev/null +++ b/doc/models/pay-pal-wallet-customer-request.md @@ -0,0 +1,32 @@ + +# Pay Pal Wallet Customer Request + +## Structure + +`PayPalWalletCustomerRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | + +## Example (as JSON) + +```json +{ + "id": "id2", + "email_address": "email_address0", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "merchant_customer_id": "merchant_customer_id4" +} +``` + diff --git a/doc/models/pay-pal-wallet-customer.md b/doc/models/pay-pal-wallet-customer.md new file mode 100644 index 0000000..a68b767 --- /dev/null +++ b/doc/models/pay-pal-wallet-customer.md @@ -0,0 +1,34 @@ + +# Pay Pal Wallet Customer + +The details about a customer in PayPal's system of record. + +## Structure + +`PayPalWalletCustomer` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | + +## Example (as JSON) + +```json +{ + "id": "id8", + "email_address": "email_address4", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "merchant_customer_id": "merchant_customer_id0" +} +``` + diff --git a/doc/models/pay-pal-wallet-experience-context.md b/doc/models/pay-pal-wallet-experience-context.md new file mode 100644 index 0000000..8b5c348 --- /dev/null +++ b/doc/models/pay-pal-wallet-experience-context.md @@ -0,0 +1,37 @@ + +# Pay Pal Wallet Experience Context + +Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
+ +## Structure + +`PayPalWalletExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | +| `return_url` | `String` | Optional | Describes the URL. | +| `cancel_url` | `String` | Optional | Describes the URL. | +| `landing_page` | [`PayPalExperienceLandingPage`](../../doc/models/pay-pal-experience-landing-page.md) | Optional | The type of landing page to show on the PayPal site for customer checkout.
**Default**: `PayPalExperienceLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | +| `user_action` | [`PayPalExperienceUserAction`](../../doc/models/pay-pal-experience-user-action.md) | Optional | Configures a Continue or Pay Now checkout flow.
**Default**: `PayPalExperienceUserAction::CONTINUE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_method_preference` | [`PayeePaymentMethodPreference`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "landing_page": "NO_PREFERENCE", + "user_action": "CONTINUE", + "payment_method_preference": "UNRESTRICTED", + "brand_name": "brand_name6", + "locale": "locale0", + "return_url": "return_url8", + "cancel_url": "cancel_url0" +} +``` + diff --git a/doc/models/pay-pal-wallet-response.md b/doc/models/pay-pal-wallet-response.md new file mode 100644 index 0000000..f97b0bd --- /dev/null +++ b/doc/models/pay-pal-wallet-response.md @@ -0,0 +1,39 @@ + +# Pay Pal Wallet Response + +The PayPal Wallet response. + +## Structure + +`PayPalWalletResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `account_id` | `String` | Optional | The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `account_status` | [`PayPalWalletAccountVerificationStatus`](../../doc/models/pay-pal-wallet-account-verification-status.md) | Optional | The account status indicates whether the buyer has verified the financial details associated with their PayPal account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone_type` | [`PhoneType`](../../doc/models/phone-type.md) | Optional | The phone type. | +| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | +| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `attributes` | [`PayPalWalletAttributesResponse`](../../doc/models/pay-pal-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a PayPal Wallet. | + +## Example (as JSON) + +```json +{ + "email_address": "email_address8", + "account_id": "account_id2", + "account_status": "VERIFIED", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_type": "OTHER" +} +``` + diff --git a/doc/models/pay-pal-wallet-vault-instruction.md b/doc/models/pay-pal-wallet-vault-instruction.md new file mode 100644 index 0000000..4c91ad8 --- /dev/null +++ b/doc/models/pay-pal-wallet-vault-instruction.md @@ -0,0 +1,31 @@ + +# Pay Pal Wallet Vault Instruction + +## Structure + +`PayPalWalletVaultInstruction` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Optional | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `description` | `String` | Optional | The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` | +| `usage_pattern` | [`PayPalPaymentTokenUsagePattern`](../../doc/models/pay-pal-payment-token-usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` | +| `usage_type` | [`PayPalPaymentTokenUsageType`](../../doc/models/pay-pal-payment-token-usage-type.md) | Required | The usage type associated with the PayPal payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | [`PayPalPaymentTokenCustomerType`](../../doc/models/pay-pal-payment-token-customer-type.md) | Optional | The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Default**: `PayPalPaymentTokenCustomerType::CONSUMER`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | + +## Example (as JSON) + +```json +{ + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "permit_multiple_payment_tokens": false, + "store_in_vault": "ON_SUCCESS", + "description": "description4", + "usage_pattern": "RECURRING_PREPAID" +} +``` + diff --git a/doc/models/pay-pal-wallet-vault-response.md b/doc/models/pay-pal-wallet-vault-response.md new file mode 100644 index 0000000..932c1fc --- /dev/null +++ b/doc/models/pay-pal-wallet-vault-response.md @@ -0,0 +1,45 @@ + +# Pay Pal Wallet Vault Response + +The details about a saved PayPal Wallet payment source. + +## Structure + +`PayPalWalletVaultResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `status` | [`PayPalWalletVaultStatus`](../../doc/models/pay-pal-wallet-vault-status.md) | Optional | The vault status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | +| `customer` | [`PayPalWalletCustomer`](../../doc/models/pay-pal-wallet-customer.md) | Optional | The details about a customer in PayPal's system of record. | + +## Example (as JSON) + +```json +{ + "id": "id0", + "status": "CREATED", + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "customer": { + "id": "id0", + "email_address": "email_address2", + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "merchant_customer_id": "merchant_customer_id2" + } +} +``` + diff --git a/doc/models/pay-pal-wallet-vault-status.md b/doc/models/pay-pal-wallet-vault-status.md new file mode 100644 index 0000000..7e9a6b9 --- /dev/null +++ b/doc/models/pay-pal-wallet-vault-status.md @@ -0,0 +1,17 @@ + +# Pay Pal Wallet Vault Status + +The vault status. + +## Enumeration + +`PayPalWalletVaultStatus` + +## Fields + +| Name | +| --- | +| `VAULTED` | +| `CREATED` | +| `APPROVED` | + diff --git a/doc/models/pay-pal-wallet.md b/doc/models/pay-pal-wallet.md new file mode 100644 index 0000000..aadef7f --- /dev/null +++ b/doc/models/pay-pal-wallet.md @@ -0,0 +1,44 @@ + +# Pay Pal Wallet + +A resource that identifies a PayPal Wallet is used for payment. + +## Structure + +`PayPalWallet` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | +| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `attributes` | [`PayPalWalletAttributes`](../../doc/models/pay-pal-wallet-attributes.md) | Optional | Additional attributes associated with the use of this PayPal Wallet. | +| `experience_context` | [`PayPalWalletExperienceContext`](../../doc/models/pay-pal-wallet-experience-context.md) | Optional | Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
| +| `billing_agreement_id` | `String` | Optional | The PayPal billing agreement ID. References an approved recurring payment for goods or services.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `128`, *Pattern*: `^[a-zA-Z0-9-]+$` | + +## Example (as JSON) + +```json +{ + "vault_id": "vault_id8", + "email_address": "email_address8", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date4" +} +``` + diff --git a/doc/models/payee-base.md b/doc/models/payee-base.md new file mode 100644 index 0000000..62e8b45 --- /dev/null +++ b/doc/models/payee-base.md @@ -0,0 +1,25 @@ + +# Payee Base + +The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. + +## Structure + +`PayeeBase` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `merchant_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | + +## Example (as JSON) + +```json +{ + "email_address": "email_address0", + "merchant_id": "merchant_id2" +} +``` + diff --git a/doc/models/payee-payment-method-preference.md b/doc/models/payee-payment-method-preference.md new file mode 100644 index 0000000..b7df62b --- /dev/null +++ b/doc/models/payee-payment-method-preference.md @@ -0,0 +1,16 @@ + +# Payee Payment Method Preference + +The merchant-preferred payment methods. + +## Enumeration + +`PayeePaymentMethodPreference` + +## Fields + +| Name | +| --- | +| `UNRESTRICTED` | +| `IMMEDIATE_PAYMENT_REQUIRED` | + diff --git a/doc/models/payee.md b/doc/models/payee.md new file mode 100644 index 0000000..91275e3 --- /dev/null +++ b/doc/models/payee.md @@ -0,0 +1,25 @@ + +# Payee + +The merchant who receives the funds and fulfills the order. The merchant is also known as the payee., The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. + +## Structure + +`Payee` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `merchant_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | + +## Example (as JSON) + +```json +{ + "email_address": "email_address6", + "merchant_id": "merchant_id6" +} +``` + diff --git a/doc/models/payer-base.md b/doc/models/payer-base.md new file mode 100644 index 0000000..f92dfdc --- /dev/null +++ b/doc/models/payer-base.md @@ -0,0 +1,25 @@ + +# Payer Base + +The customer who approves and pays for the order. The customer is also known as the payer. + +## Structure + +`PayerBase` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | + +## Example (as JSON) + +```json +{ + "email_address": "email_address2", + "payer_id": "payer_id2" +} +``` + diff --git a/doc/models/payer.md b/doc/models/payer.md new file mode 100644 index 0000000..9cb8976 --- /dev/null +++ b/doc/models/payer.md @@ -0,0 +1,39 @@ + +# Payer + +## Structure + +`Payer` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | +| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "email_address": "email_address8", + "payer_id": "payer_id8", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date6" +} +``` + diff --git a/doc/models/payment-advice-code.md b/doc/models/payment-advice-code.md new file mode 100644 index 0000000..df4c7e3 --- /dev/null +++ b/doc/models/payment-advice-code.md @@ -0,0 +1,18 @@ + +# Payment Advice Code + +The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes. + +## Enumeration + +`PaymentAdviceCode` + +## Fields + +| Name | +| --- | +| `ENUM_01` | +| `ENUM_02` | +| `ENUM_03` | +| `ENUM_21` | + diff --git a/doc/models/payment-authorization.md b/doc/models/payment-authorization.md new file mode 100644 index 0000000..02c5bf9 --- /dev/null +++ b/doc/models/payment-authorization.md @@ -0,0 +1,45 @@ + +# Payment Authorization + +The authorized payment transaction. + +## Structure + +`PaymentAuthorization` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | +| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | +| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | +| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | +| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. | +| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | + +## Example (as JSON) + +```json +{ + "status": "VOIDED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id0", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id0" +} +``` + diff --git a/doc/models/payment-collection.md b/doc/models/payment-collection.md new file mode 100644 index 0000000..bf878d1 --- /dev/null +++ b/doc/models/payment-collection.md @@ -0,0 +1,114 @@ + +# Payment Collection + +The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds. + +## Structure + +`PaymentCollection` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `authorizations` | [`Array`](../../doc/models/authorization-with-additional-data.md) | Optional | An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments. | +| `captures` | [`Array`](../../doc/models/capture.md) | Optional | An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments. | +| `refunds` | [`Array`](../../doc/models/refund.md) | Optional | An array of refunds for a purchase unit. A purchase unit can have zero or more refunds. | + +## Example (as JSON) + +```json +{ + "authorizations": [ + { + "status": "DENIED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id2", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id2" + }, + { + "status": "DENIED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id2", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id2" + }, + { + "status": "DENIED", + "status_details": { + "reason": "PENDING_REVIEW" + }, + "id": "id2", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id2" + } + ], + "captures": [ + { + "status": "REFUNDED", + "status_details": { + "reason": "VERIFICATION_REQUIRED" + }, + "id": "id4", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id4" + }, + { + "status": "REFUNDED", + "status_details": { + "reason": "VERIFICATION_REQUIRED" + }, + "id": "id4", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id4" + } + ], + "refunds": [ + { + "status": "CANCELLED", + "status_details": { + "reason": "ECHECK" + }, + "id": "id8", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id8" + }, + { + "status": "CANCELLED", + "status_details": { + "reason": "ECHECK" + }, + "id": "id8", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id8" + } + ] +} +``` + diff --git a/doc/models/payment-initiator.md b/doc/models/payment-initiator.md new file mode 100644 index 0000000..79aed2b --- /dev/null +++ b/doc/models/payment-initiator.md @@ -0,0 +1,16 @@ + +# Payment Initiator + +The person or party who initiated or triggered the payment. + +## Enumeration + +`PaymentInitiator` + +## Fields + +| Name | +| --- | +| `CUSTOMER` | +| `MERCHANT` | + diff --git a/doc/models/payment-instruction.md b/doc/models/payment-instruction.md new file mode 100644 index 0000000..d95eeb2 --- /dev/null +++ b/doc/models/payment-instruction.md @@ -0,0 +1,40 @@ + +# Payment Instruction + +Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. + +## Structure + +`PaymentInstruction` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | +| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | +| `payee_pricing_tier_id` | `String` | Optional | This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^.*$` | +| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^.*$` | + +## Example (as JSON) + +```json +{ + "disbursement_mode": "INSTANT", + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "payee_pricing_tier_id": "payee_pricing_tier_id6", + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id4" +} +``` + diff --git a/doc/models/payment-method-preference.md b/doc/models/payment-method-preference.md new file mode 100644 index 0000000..1333deb --- /dev/null +++ b/doc/models/payment-method-preference.md @@ -0,0 +1,25 @@ + +# Payment Method Preference + +The customer and merchant payment preferences. + +## Structure + +`PaymentMethodPreference` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payee_preferred` | [`PayeePaymentMethodPreference`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `standard_entry_class_code` | [`StandardEntryClassCode`](../../doc/models/standard-entry-class-code.md) | Optional | NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes.
**Default**: `StandardEntryClassCode::WEB`
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `255` | + +## Example (as JSON) + +```json +{ + "payee_preferred": "UNRESTRICTED", + "standard_entry_class_code": "WEB" +} +``` + diff --git a/doc/models/payment-source-response.md b/doc/models/payment-source-response.md new file mode 100644 index 0000000..2716433 --- /dev/null +++ b/doc/models/payment-source-response.md @@ -0,0 +1,74 @@ + +# Payment Source Response + +The payment source used to fund the payment. + +## Structure + +`PaymentSourceResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardResponse`](../../doc/models/card-response.md) | Optional | The payment card to use to fund a payment. Card can be a credit or debit card. | +| `paypal` | [`PayPalWalletResponse`](../../doc/models/pay-pal-wallet-response.md) | Optional | The PayPal Wallet response. | +| `bancontact` | [`BancontactPaymentObject`](../../doc/models/bancontact-payment-object.md) | Optional | Information used to pay Bancontact. | +| `blik` | [`BLIKPaymentObject`](../../doc/models/blik-payment-object.md) | Optional | Information used to pay using BLIK. | +| `eps` | [`EPSPaymentObject`](../../doc/models/eps-payment-object.md) | Optional | Information used to pay using eps. | +| `giropay` | [`GiropayPaymentObject`](../../doc/models/giropay-payment-object.md) | Optional | Information needed to pay using giropay. | +| `ideal` | [`IDEALPaymentObject`](../../doc/models/ideal-payment-object.md) | Optional | Information used to pay using iDEAL. | +| `mybank` | [`MyBankPaymentObject`](../../doc/models/my-bank-payment-object.md) | Optional | Information used to pay using MyBank. | +| `p_24` | [`P24PaymentObject`](../../doc/models/p24-payment-object.md) | Optional | Information used to pay using P24(Przelewy24). | +| `sofort` | [`SofortPaymentObject`](../../doc/models/sofort-payment-object.md) | Optional | Information used to pay using Sofort. | +| `trustly` | [`TrustlyPaymentObject`](../../doc/models/trustly-payment-object.md) | Optional | Information needed to pay using Trustly. | +| `apple_pay` | [`ApplePayPaymentObject`](../../doc/models/apple-pay-payment-object.md) | Optional | Information needed to pay using ApplePay. | +| `google_pay` | [`GooglePayWalletResponse`](../../doc/models/google-pay-wallet-response.md) | Optional | Google Pay Wallet payment data. | +| `venmo` | [`VenmoWalletResponse`](../../doc/models/venmo-wallet-response.md) | Optional | Venmo wallet response. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "available_networks": [ + "DELTA" + ], + "type": "UNKNOWN" + }, + "paypal": { + "email_address": "email_address0", + "account_id": "account_id4", + "account_status": "VERIFIED", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_type": "FAX" + }, + "bancontact": { + "name": "name0", + "country_code": "country_code0", + "bic": "bic2", + "iban_last_chars": "iban_last_chars8", + "card_last_digits": "card_last_digits4" + }, + "blik": { + "name": "name2", + "country_code": "country_code2", + "email": "email4", + "one_click": { + "consumer_reference": "consumer_reference2" + } + }, + "eps": { + "name": "name6", + "country_code": "country_code6", + "bic": "bic8" + } +} +``` + diff --git a/doc/models/payment-source.md b/doc/models/payment-source.md new file mode 100644 index 0000000..b49e2ed --- /dev/null +++ b/doc/models/payment-source.md @@ -0,0 +1,101 @@ + +# Payment Source + +The payment source definition. + +## Structure + +`PaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| +| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | +| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | +| `bancontact` | [`BancontactPaymentRequest`](../../doc/models/bancontact-payment-request.md) | Optional | Information needed to pay using Bancontact. | +| `blik` | [`BLIKPaymentRequest`](../../doc/models/blik-payment-request.md) | Optional | Information needed to pay using BLIK. | +| `eps` | [`EPSPaymentRequest`](../../doc/models/eps-payment-request.md) | Optional | Information needed to pay using eps. | +| `giropay` | [`GiropayPaymentRequest`](../../doc/models/giropay-payment-request.md) | Optional | Information needed to pay using giropay. | +| `ideal` | [`IDEALPaymentRequest`](../../doc/models/ideal-payment-request.md) | Optional | Information needed to pay using iDEAL. | +| `mybank` | [`MyBankPaymentRequest`](../../doc/models/my-bank-payment-request.md) | Optional | Information needed to pay using MyBank. | +| `p_24` | [`P24PaymentRequest`](../../doc/models/p24-payment-request.md) | Optional | Information needed to pay using P24 (Przelewy24). | +| `sofort` | [`SofortPaymentRequest`](../../doc/models/sofort-payment-request.md) | Optional | Information needed to pay using Sofort. | +| `trustly` | [`TrustlyPaymentRequest`](../../doc/models/trustly-payment-request.md) | Optional | Information needed to pay using Trustly. | +| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | +| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | +| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + }, + "paypal": { + "vault_id": "vault_id0", + "email_address": "email_address0", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone": { + "phone_type": "OTHER", + "phone_number": { + "national_number": "national_number6" + } + }, + "birth_date": "birth_date8" + }, + "bancontact": { + "name": "name0", + "country_code": "country_code0", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } + }, + "blik": { + "name": "name2", + "country_code": "country_code2", + "email": "email4", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + }, + "level_0": { + "auth_code": "auth_code8" + }, + "one_click": { + "auth_code": "auth_code0", + "consumer_reference": "consumer_reference2", + "alias_label": "alias_label6", + "alias_key": "alias_key4" + } + } +} +``` + diff --git a/doc/models/payment-supplementary-data.md b/doc/models/payment-supplementary-data.md new file mode 100644 index 0000000..7889100 --- /dev/null +++ b/doc/models/payment-supplementary-data.md @@ -0,0 +1,27 @@ + +# Payment Supplementary Data + +The supplementary data. + +## Structure + +`PaymentSupplementaryData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `related_ids` | [`RelatedIdentifiers`](../../doc/models/related-identifiers.md) | Optional | Identifiers related to a specific resource. | + +## Example (as JSON) + +```json +{ + "related_ids": { + "order_id": "order_id2", + "authorization_id": "authorization_id0", + "capture_id": "capture_id0" + } +} +``` + diff --git a/doc/models/payment-token-request-card.md b/doc/models/payment-token-request-card.md new file mode 100644 index 0000000..9cfd67f --- /dev/null +++ b/doc/models/payment-token-request-card.md @@ -0,0 +1,34 @@ + +# Payment Token Request Card + +A Resource representing a request to vault a Card. + +## Structure + +`PaymentTokenRequestCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `network_transaction_reference` | `Object` | Optional | - | + +## Example (as JSON) + +```json +{ + "name": "name4", + "number": "number8", + "expiry": "expiry2", + "security_code": "security_code6", + "type": "DEBIT" +} +``` + diff --git a/doc/models/payment-token-request-payment-source.md b/doc/models/payment-token-request-payment-source.md new file mode 100644 index 0000000..8c2bc64 --- /dev/null +++ b/doc/models/payment-token-request-payment-source.md @@ -0,0 +1,34 @@ + +# Payment Token Request Payment Source + +The payment method to vault with the instrument details. + +## Structure + +`PaymentTokenRequestPaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`PaymentTokenRequestCard`](../../doc/models/payment-token-request-card.md) | Optional | A Resource representing a request to vault a Card. | +| `token` | [`VaultTokenRequest`](../../doc/models/vault-token-request.md) | Optional | The Tokenized Payment Source representing a Request to Vault a Token. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "type": "UNKNOWN" + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + } +} +``` + diff --git a/doc/models/payment-token-request.md b/doc/models/payment-token-request.md new file mode 100644 index 0000000..1f27757 --- /dev/null +++ b/doc/models/payment-token-request.md @@ -0,0 +1,40 @@ + +# Payment Token Request + +Payment Token Request where the `source` defines the type of instrument to be stored. + +## Structure + +`PaymentTokenRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | +| `payment_source` | [`PaymentTokenRequestPaymentSource`](../../doc/models/payment-token-request-payment-source.md) | Required | The payment method to vault with the instrument details. | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "type": "UNKNOWN" + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + } + } +} +``` + diff --git a/doc/models/payment-token-response-payment-source.md b/doc/models/payment-token-response-payment-source.md new file mode 100644 index 0000000..5f239ad --- /dev/null +++ b/doc/models/payment-token-response-payment-source.md @@ -0,0 +1,119 @@ + +# Payment Token Response Payment Source + +The vaulted payment method details. + +## Structure + +`PaymentTokenResponsePaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardPaymentToken`](../../doc/models/card-payment-token.md) | Optional | Full representation of a Card Payment Token including network token. | +| `paypal` | [`PayPalPaymentToken`](../../doc/models/pay-pal-payment-token.md) | Optional | - | +| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | +| `apple_pay` | [`ApplePayPaymentToken`](../../doc/models/apple-pay-payment-token.md) | Optional | A resource representing a response for Apple Pay. | +| `bank` | [`BankPaymentToken`](../../doc/models/bank-payment-token.md) | Optional | Full representation of a Bank Payment Token. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "apple_pay": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "bank": { + "ach_debit": { + "verification_status": "verification_status6" + }, + "sepa_debit": { + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } + } + } +} +``` + diff --git a/doc/models/payment-token-response.md b/doc/models/payment-token-response.md new file mode 100644 index 0000000..805fdae --- /dev/null +++ b/doc/models/payment-token-response.md @@ -0,0 +1,137 @@ + +# Payment Token Response + +Full representation of a saved payment token. + +## Structure + +`PaymentTokenResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | +| `payment_source` | [`PaymentTokenResponsePaymentSource`](../../doc/models/payment-token-response-payment-source.md) | Optional | The vaulted payment method details. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | + +## Example (as JSON) + +```json +{ + "id": "id0", + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "apple_pay": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "type": "UNKNOWN", + "brand": "SYNCHRONY", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + } + }, + "bank": { + "ach_debit": { + "verification_status": "verification_status6" + }, + "sepa_debit": { + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } + } + } + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] +} +``` + diff --git a/doc/models/phone-number-with-country-code.md b/doc/models/phone-number-with-country-code.md new file mode 100644 index 0000000..2feab0b --- /dev/null +++ b/doc/models/phone-number-with-country-code.md @@ -0,0 +1,25 @@ + +# Phone Number With Country Code + +The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). + +## Structure + +`PhoneNumberWithCountryCode` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `country_code` | `String` | Required | The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3`, *Pattern*: `^[0-9]{1,3}?$` | +| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | + +## Example (as JSON) + +```json +{ + "country_code": "country_code4", + "national_number": "national_number8" +} +``` + diff --git a/doc/models/phone-number.md b/doc/models/phone-number.md new file mode 100644 index 0000000..be51794 --- /dev/null +++ b/doc/models/phone-number.md @@ -0,0 +1,23 @@ + +# Phone Number + +The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). + +## Structure + +`PhoneNumber` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | + +## Example (as JSON) + +```json +{ + "national_number": "national_number8" +} +``` + diff --git a/doc/models/phone-type.md b/doc/models/phone-type.md new file mode 100644 index 0000000..99bb423 --- /dev/null +++ b/doc/models/phone-type.md @@ -0,0 +1,19 @@ + +# Phone Type + +The phone type. + +## Enumeration + +`PhoneType` + +## Fields + +| Name | +| --- | +| `FAX` | +| `HOME` | +| `MOBILE` | +| `OTHER` | +| `PAGER` | + diff --git a/doc/models/phone-with-type.md b/doc/models/phone-with-type.md new file mode 100644 index 0000000..0eee1c2 --- /dev/null +++ b/doc/models/phone-with-type.md @@ -0,0 +1,27 @@ + +# Phone With Type + +The phone information. + +## Structure + +`PhoneWithType` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `phone_type` | [`PhoneType`](../../doc/models/phone-type.md) | Optional | The phone type. | +| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Required | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | + +## Example (as JSON) + +```json +{ + "phone_type": "PAGER", + "phone_number": { + "national_number": "national_number6" + } +} +``` + diff --git a/doc/models/phone.md b/doc/models/phone.md new file mode 100644 index 0000000..2b61175 --- /dev/null +++ b/doc/models/phone.md @@ -0,0 +1,27 @@ + +# Phone + +The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). + +## Structure + +`Phone` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `country_code` | `String` | Required | The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3`, *Pattern*: `^[0-9]{1,3}?$` | +| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | +| `extension_number` | `String` | Optional | The extension number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `15`, *Pattern*: `^[0-9]{1,15}?$` | + +## Example (as JSON) + +```json +{ + "country_code": "country_code8", + "national_number": "national_number2", + "extension_number": "extension_number2" +} +``` + diff --git a/doc/models/platform-fee.md b/doc/models/platform-fee.md new file mode 100644 index 0000000..7c684f5 --- /dev/null +++ b/doc/models/platform-fee.md @@ -0,0 +1,31 @@ + +# Platform Fee + +The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit. + +## Structure + +`PlatformFee` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | +| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | + +## Example (as JSON) + +```json +{ + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } +} +``` + diff --git a/doc/models/processing-instruction.md b/doc/models/processing-instruction.md new file mode 100644 index 0000000..1d19956 --- /dev/null +++ b/doc/models/processing-instruction.md @@ -0,0 +1,16 @@ + +# Processing Instruction + +The instruction to process an order. + +## Enumeration + +`ProcessingInstruction` + +## Fields + +| Name | +| --- | +| `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` | +| `NO_INSTRUCTION` | + diff --git a/doc/models/processor-response-code.md b/doc/models/processor-response-code.md new file mode 100644 index 0000000..68b8bbb --- /dev/null +++ b/doc/models/processor-response-code.md @@ -0,0 +1,168 @@ + +# Processor Response Code + +Processor response code for the non-PayPal payment processor errors. + +## Enumeration + +`ProcessorResponseCode` + +## Fields + +| Name | +| --- | +| `ENUM_0000` | +| `ENUM_00N7` | +| `ENUM_0100` | +| `ENUM_0390` | +| `ENUM_0500` | +| `ENUM_0580` | +| `ENUM_0800` | +| `ENUM_0880` | +| `ENUM_0890` | +| `ENUM_0960` | +| `ENUM_0R00` | +| `ENUM_1000` | +| `ENUM_10BR` | +| `ENUM_1300` | +| `ENUM_1310` | +| `ENUM_1312` | +| `ENUM_1317` | +| `ENUM_1320` | +| `ENUM_1330` | +| `ENUM_1335` | +| `ENUM_1340` | +| `ENUM_1350` | +| `ENUM_1352` | +| `ENUM_1360` | +| `ENUM_1370` | +| `ENUM_1380` | +| `ENUM_1382` | +| `ENUM_1384` | +| `ENUM_1390` | +| `ENUM_1393` | +| `ENUM_5100` | +| `ENUM_5110` | +| `ENUM_5120` | +| `ENUM_5130` | +| `ENUM_5135` | +| `ENUM_5140` | +| `ENUM_5150` | +| `ENUM_5160` | +| `ENUM_5170` | +| `ENUM_5180` | +| `ENUM_5190` | +| `ENUM_5200` | +| `ENUM_5210` | +| `ENUM_5400` | +| `ENUM_5500` | +| `ENUM_5650` | +| `ENUM_5700` | +| `ENUM_5710` | +| `ENUM_5800` | +| `ENUM_5900` | +| `ENUM_5910` | +| `ENUM_5920` | +| `ENUM_5930` | +| `ENUM_5950` | +| `ENUM_6300` | +| `ENUM_7600` | +| `ENUM_7700` | +| `ENUM_7710` | +| `ENUM_7800` | +| `ENUM_7900` | +| `ENUM_8000` | +| `ENUM_8010` | +| `ENUM_8020` | +| `ENUM_8030` | +| `ENUM_8100` | +| `ENUM_8110` | +| `ENUM_8220` | +| `ENUM_9100` | +| `ENUM_9500` | +| `ENUM_9510` | +| `ENUM_9520` | +| `ENUM_9530` | +| `ENUM_9540` | +| `ENUM_9600` | +| `PCNR` | +| `PCVV` | +| `PP06` | +| `PPRN` | +| `PPAD` | +| `PPAB` | +| `PPAE` | +| `PPAG` | +| `PPAI` | +| `PPAR` | +| `PPAU` | +| `PPAV` | +| `PPAX` | +| `PPBG` | +| `PPC2` | +| `PPCE` | +| `PPCO` | +| `PPCR` | +| `PPCT` | +| `PPCU` | +| `PPD3` | +| `PPDC` | +| `PPDI` | +| `PPDV` | +| `PPDT` | +| `PPEF` | +| `PPEL` | +| `PPER` | +| `PPEX` | +| `PPFE` | +| `PPFI` | +| `PPFR` | +| `PPFV` | +| `PPGR` | +| `PPH1` | +| `PPIF` | +| `PPII` | +| `PPIM` | +| `PPIT` | +| `PPLR` | +| `PPLS` | +| `PPMB` | +| `PPMC` | +| `PPMD` | +| `PPNC` | +| `PPNL` | +| `PPNM` | +| `PPNT` | +| `PPPH` | +| `PPPI` | +| `PPPM` | +| `PPQC` | +| `PPRE` | +| `PPRF` | +| `PPRR` | +| `PPS0` | +| `PPS1` | +| `PPS2` | +| `PPS3` | +| `PPS4` | +| `PPS5` | +| `PPS6` | +| `PPSC` | +| `PPSD` | +| `PPSE` | +| `PPTE` | +| `PPTF` | +| `PPTI` | +| `PPTR` | +| `PPTT` | +| `PPTV` | +| `PPUA` | +| `PPUC` | +| `PPUE` | +| `PPUI` | +| `PPUP` | +| `PPUR` | +| `PPVC` | +| `PPVE` | +| `PPVT` | + diff --git a/doc/models/processor-response.md b/doc/models/processor-response.md new file mode 100644 index 0000000..fdd4369 --- /dev/null +++ b/doc/models/processor-response.md @@ -0,0 +1,29 @@ + +# Processor Response + +The processor response information for payment requests, such as direct credit card transactions. + +## Structure + +`ProcessorResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `avs_code` | [`AVSCode`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. | +| `cvv_code` | [`CVVCode`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. | +| `response_code` | [`ProcessorResponseCode`](../../doc/models/processor-response-code.md) | Optional | Processor response code for the non-PayPal payment processor errors. | +| `payment_advice_code` | [`PaymentAdviceCode`](../../doc/models/payment-advice-code.md) | Optional | The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes. | + +## Example (as JSON) + +```json +{ + "avs_code": "M", + "cvv_code": "U", + "response_code": "PPII", + "payment_advice_code": "01" +} +``` + diff --git a/doc/models/purchase-unit-request.md b/doc/models/purchase-unit-request.md new file mode 100644 index 0000000..3c2a017 --- /dev/null +++ b/doc/models/purchase-unit-request.md @@ -0,0 +1,102 @@ + +# Purchase Unit Request + +The purchase unit request. Includes required information for the payment contract. + +## Structure + +`PurchaseUnitRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `reference_id` | `String` | Optional | The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256` | +| `amount` | [`AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Required | The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. | +| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | +| `payment_instruction` | [`PaymentInstruction`](../../doc/models/payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | +| `description` | `String` | Optional | The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `soft_descriptor` | `String` | Optional | The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.

If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor
Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit
The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement.
For example, if:
  • The PayPal prefix toggle is PAYPAL *.
  • The merchant descriptor in the profile is Janes Gift.
  • The soft descriptor is 800-123-1234.
Then, the statement descriptor on the card is PAYPAL * Janes Gift 80.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` | +| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | +| `shipping` | [`ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | +| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. | + +## Example (as JSON) + +```json +{ + "reference_id": "reference_id6", + "amount": { + "currency_code": "currency_code6", + "value": "value0", + "breakdown": { + "item_total": { + "currency_code": "currency_code0", + "value": "value6" + }, + "shipping": { + "currency_code": "currency_code0", + "value": "value6" + }, + "handling": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + }, + "insurance": { + "currency_code": "currency_code2", + "value": "value8" + } + } + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "payment_instruction": { + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "disbursement_mode": "INSTANT", + "payee_pricing_tier_id": "payee_pricing_tier_id2", + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" + }, + "description": "description6", + "custom_id": "custom_id4" +} +``` + diff --git a/doc/models/purchase-unit.md b/doc/models/purchase-unit.md new file mode 100644 index 0000000..c2f0eca --- /dev/null +++ b/doc/models/purchase-unit.md @@ -0,0 +1,103 @@ + +# Purchase Unit + +The purchase unit details. Used to capture required information for the payment contract. + +## Structure + +`PurchaseUnit` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `reference_id` | `String` | Optional | The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
Note: If there are multiple purchase units, reference_id is required for each purchase unit.

**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256` | +| `amount` | [`AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Optional | The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. | +| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | +| `payment_instruction` | [`PaymentInstruction`](../../doc/models/payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | +| `description` | `String` | Optional | The purchase description.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice ID for this order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | +| `id` | `String` | Optional | The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `19` | +| `soft_descriptor` | `String` | Optional | The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.

The soft descriptor supports the following ASCII characters:
  • Alphanumeric characters
  • Dashes
  • Asterisks
  • Periods (.)
  • Spaces
For Wallet payments marketplace integrations:
  • The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.
  • You can't use the remaining space to show the customer service number.
  • The remaining spaces can be a combination of seller name and country.

For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` | +| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | +| `shipping` | [`ShippingWithTrackingDetails`](../../doc/models/shipping-with-tracking-details.md) | Optional | The order shipping details. | +| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. | +| `payments` | [`PaymentCollection`](../../doc/models/payment-collection.md) | Optional | The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds. | + +## Example (as JSON) + +```json +{ + "reference_id": "reference_id8", + "amount": { + "currency_code": "currency_code6", + "value": "value0", + "breakdown": { + "item_total": { + "currency_code": "currency_code0", + "value": "value6" + }, + "shipping": { + "currency_code": "currency_code0", + "value": "value6" + }, + "handling": { + "currency_code": "currency_code2", + "value": "value8" + }, + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + }, + "insurance": { + "currency_code": "currency_code2", + "value": "value8" + } + } + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + }, + "payment_instruction": { + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "payee": { + "email_address": "email_address4", + "merchant_id": "merchant_id6" + } + } + ], + "disbursement_mode": "INSTANT", + "payee_pricing_tier_id": "payee_pricing_tier_id2", + "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" + }, + "description": "description0" +} +``` + diff --git a/doc/models/reauthorize-request.md b/doc/models/reauthorize-request.md new file mode 100644 index 0000000..c708504 --- /dev/null +++ b/doc/models/reauthorize-request.md @@ -0,0 +1,26 @@ + +# Reauthorize Request + +Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. You can reauthorize a payment only once from days four to 29.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
+ +## Structure + +`ReauthorizeRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } +} +``` + diff --git a/doc/models/refund-incomplete-reason.md b/doc/models/refund-incomplete-reason.md new file mode 100644 index 0000000..f1fb1a8 --- /dev/null +++ b/doc/models/refund-incomplete-reason.md @@ -0,0 +1,15 @@ + +# Refund Incomplete Reason + +The reason why the refund has the `PENDING` or `FAILED` status. + +## Enumeration + +`RefundIncompleteReason` + +## Fields + +| Name | +| --- | +| `ECHECK` | + diff --git a/doc/models/refund-payment-instruction.md b/doc/models/refund-payment-instruction.md new file mode 100644 index 0000000..cfb772b --- /dev/null +++ b/doc/models/refund-payment-instruction.md @@ -0,0 +1,36 @@ + +# Refund Payment Instruction + +Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability. + +## Structure + +`RefundPaymentInstruction` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `platform_fees` | [`Array`](../../doc/models/refund-platform-fee.md) | Optional | Specifies the amount that the API caller will contribute to the refund being processed. The amount needs to be lower than platform_fees amount originally captured or the amount that is remaining if multiple refunds have been processed. This field is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | + +## Example (as JSON) + +```json +{ + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + } + ] +} +``` + diff --git a/doc/models/refund-platform-fee.md b/doc/models/refund-platform-fee.md new file mode 100644 index 0000000..9922f31 --- /dev/null +++ b/doc/models/refund-platform-fee.md @@ -0,0 +1,26 @@ + +# Refund Platform Fee + +The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit. + +## Structure + +`RefundPlatformFee` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } +} +``` + diff --git a/doc/models/refund-request.md b/doc/models/refund-request.md new file mode 100644 index 0000000..08993a5 --- /dev/null +++ b/doc/models/refund-request.md @@ -0,0 +1,55 @@ + +# Refund Request + +Refunds a captured payment, by ID. For a full refund, include an empty request body. For a partial refund, include an amount object in the request body. + +## Structure + +`RefundRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice ID for this order. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `note_to_payer` | `String` | Optional | The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.*$` | +| `payment_instruction` | [`RefundPaymentInstruction`](../../doc/models/refund-payment-instruction.md) | Optional | Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability. | + +## Example (as JSON) + +```json +{ + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "custom_id": "custom_id6", + "invoice_id": "invoice_id8", + "note_to_payer": "note_to_payer0", + "payment_instruction": { + "platform_fees": [ + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + }, + { + "amount": { + "currency_code": "currency_code6", + "value": "value0" + } + } + ] + } +} +``` + diff --git a/doc/models/refund-status-details.md b/doc/models/refund-status-details.md new file mode 100644 index 0000000..0b639f8 --- /dev/null +++ b/doc/models/refund-status-details.md @@ -0,0 +1,23 @@ + +# Refund Status Details + +The details of the refund status. + +## Structure + +`RefundStatusDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `reason` | [`RefundIncompleteReason`](../../doc/models/refund-incomplete-reason.md) | Optional | The reason why the refund has the `PENDING` or `FAILED` status. | + +## Example (as JSON) + +```json +{ + "reason": "ECHECK" +} +``` + diff --git a/doc/models/refund-status-with-details.md b/doc/models/refund-status-with-details.md new file mode 100644 index 0000000..178e473 --- /dev/null +++ b/doc/models/refund-status-with-details.md @@ -0,0 +1,27 @@ + +# Refund Status With Details + +The refund status with details. + +## Structure + +`RefundStatusWithDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`RefundStatus`](../../doc/models/refund-status.md) | Optional | The status of the refund. | +| `status_details` | [`RefundStatusDetails`](../../doc/models/refund-status-details.md) | Optional | The details of the refund status. | + +## Example (as JSON) + +```json +{ + "status": "PENDING", + "status_details": { + "reason": "ECHECK" + } +} +``` + diff --git a/doc/models/refund-status.md b/doc/models/refund-status.md new file mode 100644 index 0000000..3a9da87 --- /dev/null +++ b/doc/models/refund-status.md @@ -0,0 +1,18 @@ + +# Refund Status + +The status of the refund. + +## Enumeration + +`RefundStatus` + +## Fields + +| Name | +| --- | +| `CANCELLED` | +| `FAILED` | +| `PENDING` | +| `COMPLETED` | + diff --git a/doc/models/refund.md b/doc/models/refund.md new file mode 100644 index 0000000..f399f03 --- /dev/null +++ b/doc/models/refund.md @@ -0,0 +1,44 @@ + +# Refund + +The refund information. + +## Structure + +`Refund` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`RefundStatus`](../../doc/models/refund-status.md) | Optional | The status of the refund. | +| `status_details` | [`RefundStatusDetails`](../../doc/models/refund-status-details.md) | Optional | The details of the refund status. | +| `id` | `String` | Optional | The PayPal-generated ID for the refund. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | +| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[A-Za-z0-9-_.,]*$` | +| `acquirer_reference_number` | `String` | Optional | Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9]+$` | +| `note_to_payer` | `String` | Optional | The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. | +| `seller_payable_breakdown` | [`SellerPayableBreakdown`](../../doc/models/seller-payable-breakdown.md) | Optional | The breakdown of the refund. | +| `payer` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | +| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | +| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | + +## Example (as JSON) + +```json +{ + "status": "CANCELLED", + "status_details": { + "reason": "ECHECK" + }, + "id": "id6", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "invoice_id": "invoice_id6" +} +``` + diff --git a/doc/models/related-identifiers.md b/doc/models/related-identifiers.md new file mode 100644 index 0000000..b48fcaf --- /dev/null +++ b/doc/models/related-identifiers.md @@ -0,0 +1,27 @@ + +# Related Identifiers + +Identifiers related to a specific resource. + +## Structure + +`RelatedIdentifiers` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `order_id` | `String` | Optional | Order ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | +| `authorization_id` | `String` | Optional | Authorization ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | +| `capture_id` | `String` | Optional | Capture ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | + +## Example (as JSON) + +```json +{ + "order_id": "order_id0", + "authorization_id": "authorization_id8", + "capture_id": "capture_id8" +} +``` + diff --git a/doc/models/seller-payable-breakdown.md b/doc/models/seller-payable-breakdown.md new file mode 100644 index 0000000..1570a12 --- /dev/null +++ b/doc/models/seller-payable-breakdown.md @@ -0,0 +1,49 @@ + +# Seller Payable Breakdown + +The breakdown of the refund. + +## Structure + +`SellerPayableBreakdown` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `gross_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `paypal_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `paypal_fee_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `net_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `net_amount_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees for the refund.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | +| `net_amount_breakdown` | [`Array`](../../doc/models/net-amount-breakdown-item.md) | Optional | An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds. | +| `total_refunded_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | + +## Example (as JSON) + +```json +{ + "gross_amount": { + "currency_code": "currency_code4", + "value": "value0" + }, + "paypal_fee": { + "currency_code": "currency_code4", + "value": "value2" + }, + "paypal_fee_in_receivable_currency": { + "currency_code": "currency_code2", + "value": "value8" + }, + "net_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "net_amount_in_receivable_currency": { + "currency_code": "currency_code8", + "value": "value4" + } +} +``` + diff --git a/doc/models/seller-protection-status.md b/doc/models/seller-protection-status.md new file mode 100644 index 0000000..b178b73 --- /dev/null +++ b/doc/models/seller-protection-status.md @@ -0,0 +1,17 @@ + +# Seller Protection Status + +Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). + +## Enumeration + +`SellerProtectionStatus` + +## Fields + +| Name | +| --- | +| `ELIGIBLE` | +| `PARTIALLY_ELIGIBLE` | +| `NOT_ELIGIBLE` | + diff --git a/doc/models/seller-protection.md b/doc/models/seller-protection.md new file mode 100644 index 0000000..ca5b821 --- /dev/null +++ b/doc/models/seller-protection.md @@ -0,0 +1,27 @@ + +# Seller Protection + +The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). + +## Structure + +`SellerProtection` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`SellerProtectionStatus`](../../doc/models/seller-protection-status.md) | Optional | Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | +| `dispute_categories` | [`Array`](../../doc/models/dispute-category.md) | Optional | An array of conditions that are covered for the transaction. | + +## Example (as JSON) + +```json +{ + "status": "NOT_ELIGIBLE", + "dispute_categories": [ + "ITEM_NOT_RECEIVED" + ] +} +``` + diff --git a/doc/models/seller-receivable-breakdown.md b/doc/models/seller-receivable-breakdown.md new file mode 100644 index 0000000..3160d1e --- /dev/null +++ b/doc/models/seller-receivable-breakdown.md @@ -0,0 +1,53 @@ + +# Seller Receivable Breakdown + +The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. + +## Structure + +`SellerReceivableBreakdown` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `gross_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | +| `paypal_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `paypal_fee_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `net_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `receivable_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `exchange_rate` | [`ExchangeRate`](../../doc/models/exchange-rate.md) | Optional | The exchange rate that determines the amount to convert from one currency to another currency. | +| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | + +## Example (as JSON) + +```json +{ + "gross_amount": { + "currency_code": "currency_code4", + "value": "value0" + }, + "paypal_fee": { + "currency_code": "currency_code4", + "value": "value2" + }, + "paypal_fee_in_receivable_currency": { + "currency_code": "currency_code2", + "value": "value8" + }, + "net_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "receivable_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "exchange_rate": { + "source_currency": "source_currency4", + "target_currency": "target_currency6", + "value": "value6" + } +} +``` + diff --git a/doc/models/sepa-debit-authorization-details.md b/doc/models/sepa-debit-authorization-details.md new file mode 100644 index 0000000..8d9d981 --- /dev/null +++ b/doc/models/sepa-debit-authorization-details.md @@ -0,0 +1,23 @@ + +# SEPA Debit Authorization Details + +Authorization details. + +## Structure + +`SEPADebitAuthorizationDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `status` | [`InstrumentAuthorizationStatus`](../../doc/models/instrument-authorization-status.md) | Optional | The authorization status of the wallet instrument.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "status": "NOT_SUPPORTED" +} +``` + diff --git a/doc/models/sepa-debit-response.md b/doc/models/sepa-debit-response.md new file mode 100644 index 0000000..f279240 --- /dev/null +++ b/doc/models/sepa-debit-response.md @@ -0,0 +1,39 @@ + +# SEPA Debit Response + +## Structure + +`SEPADebitResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | +| `account_holder_name` | `Object` | Optional | - | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `authorization_details` | [`SEPADebitAuthorizationDetails`](../../doc/models/sepa-debit-authorization-details.md) | Optional | Authorization details. | + +## Example (as JSON) + +```json +{ + "iban_last_chars": "iban_last_chars4", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + }, + "authorization_details": { + "status": "NOT_SUPPORTED" + } +} +``` + diff --git a/doc/models/setup-token-card-experience-context.md b/doc/models/setup-token-card-experience-context.md new file mode 100644 index 0000000..74cf862 --- /dev/null +++ b/doc/models/setup-token-card-experience-context.md @@ -0,0 +1,31 @@ + +# Setup Token Card Experience Context + +Customizes the Vault creation flow experience for your customers. + +## Structure + +`SetupTokenCardExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `return_url` | `String` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | +| `cancel_url` | `String` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | +| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", + "brand_name": "brand_name2", + "locale": "locale6", + "return_url": "return_url4", + "cancel_url": "cancel_url6" +} +``` + diff --git a/doc/models/setup-token-request-card.md b/doc/models/setup-token-request-card.md new file mode 100644 index 0000000..590b7e9 --- /dev/null +++ b/doc/models/setup-token-request-card.md @@ -0,0 +1,36 @@ + +# Setup Token Request Card + +A Resource representing a request to vault a Card. + +## Structure + +`SetupTokenRequestCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | +| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `verification_method` | `String` | Optional | The verification method of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `experience_context` | [`SetupTokenCardExperienceContext`](../../doc/models/setup-token-card-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | +| `network_transaction_reference` | `Object` | Optional | - | + +## Example (as JSON) + +```json +{ + "name": "name2", + "number": "number0", + "expiry": "expiry0", + "security_code": "security_code4", + "type": "STORE" +} +``` + diff --git a/doc/models/setup-token-request-payment-source.md b/doc/models/setup-token-request-payment-source.md new file mode 100644 index 0000000..8819991 --- /dev/null +++ b/doc/models/setup-token-request-payment-source.md @@ -0,0 +1,76 @@ + +# Setup Token Request Payment Source + +The payment method to vault with the instrument details. + +## Structure + +`SetupTokenRequestPaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`SetupTokenRequestCard`](../../doc/models/setup-token-request-card.md) | Optional | A Resource representing a request to vault a Card. | +| `paypal` | [`VaultPayPalWalletRequest`](../../doc/models/vault-pay-pal-wallet-request.md) | Optional | A resource representing a request to vault PayPal Wallet. | +| `venmo` | [`VaultVenmoRequest`](../../doc/models/vault-venmo-request.md) | Optional | - | +| `token` | [`VaultTokenRequest`](../../doc/models/vault-token-request.md) | Optional | The Tokenized Payment Source representing a Request to Vault a Token. | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "type": "UNKNOWN" + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + } +} +``` + diff --git a/doc/models/setup-token-request.md b/doc/models/setup-token-request.md new file mode 100644 index 0000000..80fcead --- /dev/null +++ b/doc/models/setup-token-request.md @@ -0,0 +1,80 @@ + +# Setup Token Request + +Setup Token Request where the `source` defines the type of instrument to be stored. + +## Structure + +`SetupTokenRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | +| `payment_source` | [`SetupTokenRequestPaymentSource`](../../doc/models/setup-token-request-payment-source.md) | Required | The payment method to vault with the instrument details. | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "number": "number6", + "expiry": "expiry4", + "security_code": "security_code8", + "type": "UNKNOWN" + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + }, + "token": { + "id": "id6", + "type": "BILLING_AGREEMENT" + } + } +} +``` + diff --git a/doc/models/setup-token-response-card.md b/doc/models/setup-token-response-card.md new file mode 100644 index 0000000..a5f6e19 --- /dev/null +++ b/doc/models/setup-token-response-card.md @@ -0,0 +1,42 @@ + +# Setup Token Response Card + +## Structure + +`SetupTokenResponseCard` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | +| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | +| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | +| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | +| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | +| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | +| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | +| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | +| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | +| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "name": "name8", + "last_digits": "last_digits2", + "brand": "RUPAY", + "expiry": "expiry6", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/setup-token-response-payment-source.md b/doc/models/setup-token-response-payment-source.md new file mode 100644 index 0000000..56283cc --- /dev/null +++ b/doc/models/setup-token-response-payment-source.md @@ -0,0 +1,78 @@ + +# Setup Token Response Payment Source + +The setup payment method details. + +## Structure + +`SetupTokenResponsePaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`SetupTokenResponseCard`](../../doc/models/setup-token-response-card.md) | Optional | - | +| `paypal` | [`PayPalPaymentToken`](../../doc/models/pay-pal-payment-token.md) | Optional | - | +| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | + +## Example (as JSON) + +```json +{ + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + } +} +``` + diff --git a/doc/models/setup-token-response.md b/doc/models/setup-token-response.md new file mode 100644 index 0000000..846cd41 --- /dev/null +++ b/doc/models/setup-token-response.md @@ -0,0 +1,90 @@ + +# Setup Token Response + +Minimal representation of a cached setup token. + +## Structure + +`SetupTokenResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `ordinal` | `Integer` | Optional | Ordinal number for sorting.
**Constraints**: `>= 1`, `<= 99` | +| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | +| `status` | `String` | Optional | The status of the payment token.
**Default**: `'CREATED'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_source` | [`SetupTokenResponsePaymentSource`](../../doc/models/setup-token-response-payment-source.md) | Optional | The setup payment method details. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | + +## Example (as JSON) + +```json +{ + "status": "CREATED", + "id": "id6", + "ordinal": 0, + "customer": { + "id": "id0", + "merchant_customer_id": "merchant_customer_id2" + }, + "payment_source": { + "card": { + "name": "name6", + "last_digits": "last_digits0", + "brand": "SYNCHRONY", + "expiry": "expiry4", + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } + }, + "paypal": { + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type2", + "customer_type": "customer_type6" + }, + "venmo": { + "description": "description6", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "permit_multiple_payment_tokens": false, + "usage_type": "usage_type6", + "customer_type": "customer_type0" + } + } +} +``` + diff --git a/doc/models/shipment-carrier.md b/doc/models/shipment-carrier.md new file mode 100644 index 0000000..0e578dc --- /dev/null +++ b/doc/models/shipment-carrier.md @@ -0,0 +1,1290 @@ + +# Shipment Carrier + +The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers. + +## Enumeration + +`ShipmentCarrier` + +## Fields + +| Name | +| --- | +| `DPD_RU` | +| `BG_BULGARIAN_POST` | +| `KR_KOREA_POST` | +| `ZA_COURIERIT` | +| `FR_EXAPAQ` | +| `ARE_EMIRATES_POST` | +| `GAC` | +| `GEIS` | +| `SF_EX` | +| `PAGO` | +| `MYHERMES` | +| `DIAMOND_EUROGISTICS` | +| `CORPORATECOURIERS_WEBHOOK` | +| `BOND` | +| `OMNIPARCEL` | +| `SK_POSTA` | +| `PUROLATOR` | +| `FETCHR_WEBHOOK` | +| `THEDELIVERYGROUP` | +| `CELLO_SQUARE` | +| `TARRIVE` | +| `COLLIVERY` | +| `MAINFREIGHT` | +| `IND_FIRSTFLIGHT` | +| `ACSWORLDWIDE` | +| `AMSTAN` | +| `OKAYPARCEL` | +| `ENVIALIA_REFERENCE` | +| `SEUR_ES` | +| `CONTINENTAL` | +| `FDSEXPRESS` | +| `AMAZON_FBA_SWISHIP` | +| `WYNGS` | +| `DHL_ACTIVE_TRACING` | +| `ZYLLEM` | +| `RUSTON` | +| `XPOST` | +| `CORREOS_ES` | +| `DHL_FR` | +| `PAN_ASIA` | +| `BRT_IT` | +| `SRE_KOREA` | +| `SPEEDEE` | +| `TNT_UK` | +| `VENIPAK` | +| `SHREENANDANCOURIER` | +| `CROSHOT` | +| `NIPOST_NG` | +| `EPST_GLBL` | +| `NEWGISTICS` | +| `POST_SLOVENIA` | +| `JERSEY_POST` | +| `BOMBINOEXP` | +| `WMG` | +| `XQ_EXPRESS` | +| `FURDECO` | +| `LHT_EXPRESS` | +| `SOUTH_AFRICAN_POST_OFFICE` | +| `SPOTON` | +| `DIMERCO` | +| `CYPRUS_POST_CYP` | +| `ABCUSTOM` | +| `IND_DELIVREE` | +| `CN_BESTEXPRESS` | +| `DX_SFTP` | +| `PICKUPP_MYS` | +| `FMX` | +| `HELLMANN` | +| `SHIP_IT_ASIA` | +| `KERRY_ECOMMERCE` | +| `FRETERAPIDO` | +| `PITNEY_BOWES` | +| `XPRESSEN_DK` | +| `SEUR_SP_API` | +| `DELIVERYONTIME` | +| `JINSUNG` | +| `TRANS_KARGO` | +| `SWISHIP_DE` | +| `IVOY_WEBHOOK` | +| `AIRMEE_WEBHOOK` | +| `DHL_BENELUX` | +| `FIRSTMILE` | +| `FASTWAY_IR` | +| `HH_EXP` | +| `MYS_MYPOST_ONLINE` | +| `TNT_NL` | +| `TIPSA` | +| `TAQBIN_MY` | +| `KGMHUB` | +| `INTEXPRESS` | +| `OVERSE_EXP` | +| `ONECLICK` | +| `ROADRUNNER_FREIGHT` | +| `GLS_CROTIA` | +| `MRW_FTP` | +| `BLUEX` | +| `DYLT` | +| `DPD_IR` | +| `SIN_GLBL` | +| `TUFFNELLS_REFERENCE` | +| `CJPACKET` | +| `MILKMAN` | +| `ASIGNA` | +| `ONEWORLDEXPRESS` | +| `ROYAL_MAIL` | +| `VIA_EXPRESS` | +| `TIGFREIGHT` | +| `ZTO_EXPRESS` | +| `TWO_GO` | +| `IML` | +| `INTEL_VALLEY` | +| `EFS` | +| `UK_UK_MAIL` | +| `RAM` | +| `ALLIEDEXPRESS` | +| `APC_OVERNIGHT` | +| `SHIPPIT` | +| `TFM` | +| `M_XPRESS` | +| `HDB_BOX` | +| `CLEVY_LINKS` | +| `IBEONE` | +| `FIEGE_NL` | +| `KWE_GLOBAL` | +| `CTC_EXPRESS` | +| `LAO_POST` | +| `AMAZON` | +| `MORE_LINK` | +| `JX` | +| `EASY_MAIL` | +| `ADUIEPYLE` | +| `GB_PANTHER` | +| `EXPRESSSALE` | +| `SG_DETRACK` | +| `TRUNKRS_WEBHOOK` | +| `MATDESPATCH` | +| `DICOM` | +| `MBW` | +| `KHM_CAMBODIA_POST` | +| `SINOTRANS` | +| `BRT_IT_PARCELID` | +| `DHL_SUPPLY_CHAIN` | +| `DHL_PL` | +| `TOPYOU` | +| `PALEXPRESS` | +| `DHL_SG` | +| `CN_WEDO` | +| `FULFILLME` | +| `DPD_DELISTRACK` | +| `UPS_REFERENCE` | +| `CARIBOU` | +| `LOCUS_WEBHOOK` | +| `DSV` | +| `CN_GOFLY` | +| `P2P_TRC` | +| `DIRECTPARCELS` | +| `NOVA_POSHTA_INT` | +| `FEDEX_POLAND` | +| `CN_JCEX` | +| `FAR_INTERNATIONAL` | +| `IDEXPRESS` | +| `GANGBAO` | +| `NEWAY` | +| `POSTNL_INT_3_S` | +| `RPX_ID` | +| `DESIGNERTRANSPORT_WEBHOOK` | +| `GLS_SLOVEN` | +| `PARCELLED_IN` | +| `GSI_EXPRESS` | +| `CON_WAY` | +| `BROUWER_TRANSPORT` | +| `CPEX` | +| `ISRAEL_POST` | +| `DTDC_IN` | +| `PTT_POST` | +| `XDE_WEBHOOK` | +| `TOLOS` | +| `GIAO_HANG` | +| `GEODIS_ESPACE` | +| `MAGYAR_HU` | +| `DOORDASH_WEBHOOK` | +| `TIKI_ID` | +| `CJ_HK_INTERNATIONAL` | +| `STAR_TRACK_EXPRESS` | +| `HELTHJEM` | +| `SFB2C` | +| `FREIGHTQUOTE` | +| `LANDMARK_GLOBAL_REFERENCE` | +| `PARCEL2GO` | +| `DELNEXT` | +| `RCL` | +| `CGS_EXPRESS` | +| `HK_POST` | +| `SAP_EXPRESS` | +| `PARCELPOST_SG` | +| `HERMES` | +| `IND_SAFEEXPRESS` | +| `TOPHATTEREXPRESS` | +| `MGLOBAL` | +| `AVERITT` | +| `LEADER` | +| `_2EBOX` | +| `SG_SPEEDPOST` | +| `DBSCHENKER_SE` | +| `ISR_POST_DOMESTIC` | +| `BESTWAYPARCEL` | +| `ASENDIA_DE` | +| `NIGHTLINE_UK` | +| `TAQBIN_SG` | +| `TCK_EXPRESS` | +| `ENDEAVOUR_DELIVERY` | +| `NANJINGWOYUAN` | +| `HEPPNER_FR` | +| `EMPS_CN` | +| `FONSEN` | +| `PICKRR` | +| `APC_OVERNIGHT_CONNUM` | +| `STAR_TRACK_NEXT_FLIGHT` | +| `DAJIN` | +| `UPS_FREIGHT` | +| `POSTA_PLUS` | +| `CEVA` | +| `ANSERX` | +| `JS_EXPRESS` | +| `PADTF` | +| `UPS_MAIL_INNOVATIONS` | +| `EZSHIP` | +| `SYPOST` | +| `AMAZON_SHIP_MCF` | +| `YUSEN` | +| `BRING` | +| `SDA_IT` | +| `GBA` | +| `NEWEGGEXPRESS` | +| `SPEEDCOURIERS_GR` | +| `FORRUN` | +| `PICKUP` | +| `ECMS` | +| `INTELIPOST` | +| `FLASHEXPRESS` | +| `CN_STO` | +| `SEKO_SFTP` | +| `HOME_DELIVERY_SOLUTIONS` | +| `DPD_HGRY` | +| `KERRYTTC_VN` | +| `JOYING_BOX` | +| `TOTAL_EXPRESS` | +| `ZJS_EXPRESS` | +| `STARKEN` | +| `DEMANDSHIP` | +| `CN_DPEX` | +| `AUPOST_CN` | +| `LOGISTERS` | +| `GOGLOBALPOST` | +| `GLS_CZ` | +| `PAACK_WEBHOOK` | +| `GRAB_WEBHOOK` | +| `PARCELPOINT` | +| `ICUMULUS` | +| `DAIGLOBALTRACK` | +| `GLOBAL_IPARCEL` | +| `YURTICI_KARGO` | +| `CN_PAYPAL_PACKAGE` | +| `PARCEL_2_POST` | +| `GLS_IT` | +| `PIL_LOGISTICS` | +| `HEPPNER` | +| `GENERAL_OVERNIGHT` | +| `HAPPY2POINT` | +| `CHITCHATS` | +| `SMOOTH` | +| `CLE_LOGISTICS` | +| `FIEGE` | +| `MX_CARGO` | +| `ZIINGFINALMILE` | +| `DAYTON_FREIGHT` | +| `TCS` | +| `AEX` | +| `HERMES_DE` | +| `ROUTIFIC_WEBHOOK` | +| `GLOBAVEND` | +| `CJ_LOGISTICS` | +| `PALLET_NETWORK` | +| `RAF_PH` | +| `UK_XDP` | +| `PAPER_EXPRESS` | +| `LA_POSTE_SUIVI` | +| `PAQUETEXPRESS` | +| `LIEFERY` | +| `STRECK_TRANSPORT` | +| `PONY_EXPRESS` | +| `ALWAYS_EXPRESS` | +| `GBS_BROKER` | +| `CITYLINK_MY` | +| `ALLJOY` | +| `YODEL` | +| `YODEL_DIR` | +| `STONE3PL` | +| `PARCELPAL_WEBHOOK` | +| `DHL_ECOMERCE_ASA` | +| `SIMPLYPOST` | +| `KY_EXPRESS` | +| `SHENZHEN` | +| `US_LASERSHIP` | +| `UC_EXPRE` | +| `DIDADI` | +| `CJ_KR` | +| `DBSCHENKER_B2B` | +| `MXE` | +| `CAE_DELIVERS` | +| `PFCEXPRESS` | +| `WHISTL` | +| `WEPOST` | +| `DHL_PARCEL_ES` | +| `DDEXPRESS` | +| `ARAMEX_AU` | +| `BNEED` | +| `HK_TGX` | +| `LATVIJAS_PASTS` | +| `VIAEUROPE` | +| `CORREO_UY` | +| `CHRONOPOST_FR` | +| `J_NET` | +| `_6LS` | +| `BLR_BELPOST` | +| `BIRDSYSTEM` | +| `DOBROPOST` | +| `WAHANA_ID` | +| `WEASHIP` | +| `SONICTL` | +| `KWT` | +| `AFLLOG_FTP` | +| `SKYNET_WORLDWIDE` | +| `NOVA_POSHTA` | +| `SEINO` | +| `SZENDEX` | +| `BPOST_INT` | +| `DBSCHENKER_SV` | +| `AO_DEUTSCHLAND` | +| `EU_FLEET_SOLUTIONS` | +| `PCFCORP` | +| `LINKBRIDGE` | +| `PRIMAMULTICIPTA` | +| `COUREX` | +| `ZAJIL_EXPRESS` | +| `COLLECTCO` | +| `JTEXPRESS` | +| `FEDEX_UK` | +| `USHIP` | +| `PIXSELL` | +| `SHIPTOR` | +| `CDEK` | +| `VNM_VIETTELPOST` | +| `CJ_CENTURY` | +| `GSO` | +| `VIWO` | +| `SKYBOX` | +| `KERRYTJ` | +| `NTLOGISTICS_VN` | +| `SDH_SCM` | +| `ZINC` | +| `DPE_SOUTH_AFRC` | +| `CESKA_CZ` | +| `ACS_GR` | +| `DEALERSEND` | +| `JOCOM` | +| `CSE` | +| `TFORCE_FINALMILE` | +| `SHIP_GATE` | +| `SHIPTER` | +| `NATIONAL_SAMEDAY` | +| `YUNEXPRESS` | +| `CAINIAO` | +| `DMS_MATRIX` | +| `DIRECTLOG` | +| `ASENDIA_US` | +| `_3JMSLOGISTICS` | +| `LICCARDI_EXPRESS` | +| `SKY_POSTAL` | +| `CNWANGTONG` | +| `POSTNORD_LOGISTICS_DK` | +| `LOGISTIKA` | +| `CELERITAS` | +| `PRESSIODE` | +| `SHREE_MARUTI` | +| `LOGISTICSWORLDWIDE_HK` | +| `EFEX` | +| `LOTTE` | +| `LONESTAR` | +| `APRISAEXPRESS` | +| `BEL_RS` | +| `OSM_WORLDWIDE` | +| `WESTGATE_GL` | +| `FASTRACK` | +| `DTD_EXPR` | +| `ALFATREX` | +| `PROMEDDELIVERY` | +| `THABIT_LOGISTICS` | +| `HCT_LOGISTICS` | +| `CARRY_FLAP` | +| `US_OLD_DOMINION` | +| `ANICAM_BOX` | +| `WANBEXPRESS` | +| `AN_POST` | +| `DPD_LOCAL` | +| `STALLIONEXPRESS` | +| `RAIDEREX` | +| `SHOPFANS` | +| `KYUNGDONG_PARCEL` | +| `CHAMPION_LOGISTICS` | +| `PICKUPP_SGP` | +| `MORNING_EXPRESS` | +| `NACEX` | +| `THENILE_WEBHOOK` | +| `HOLISOL` | +| `LBCEXPRESS_FTP` | +| `KURASI` | +| `USF_REDDAWAY` | +| `APG` | +| `CN_BOXC` | +| `ECOSCOOTING` | +| `MAINWAY` | +| `PAPERFLY` | +| `HOUNDEXPRESS` | +| `BOX_BERRY` | +| `EP_BOX` | +| `PLUS_LOG_UK` | +| `FULFILLA` | +| `ASE` | +| `MAIL_PLUS` | +| `XPO_LOGISTICS` | +| `WNDIRECT` | +| `CLOUDWISH_ASIA` | +| `ZELERIS` | +| `GIO_EXPRESS` | +| `OCS_WORLDWIDE` | +| `ARK_LOGISTICS` | +| `AQUILINE` | +| `PILOT_FREIGHT` | +| `QWINTRY` | +| `DANSKE_FRAGT` | +| `CARRIERS` | +| `AIR_CANADA_GLOBAL` | +| `PRESIDENT_TRANS` | +| `STEPFORWARDFS` | +| `SKYNET_UK` | +| `PITTOHIO` | +| `CORREOS_EXPRESS` | +| `RL_US` | +| `MARA_XPRESS` | +| `DESTINY` | +| `UK_YODEL` | +| `COMET_TECH` | +| `DHL_PARCEL_RU` | +| `TNT_REFR` | +| `SHREE_ANJANI_COURIER` | +| `MIKROPAKKET_BE` | +| `ETS_EXPRESS` | +| `COLIS_PRIVE` | +| `CN_YUNDA` | +| `AAA_COOPER` | +| `ROCKET_PARCEL` | +| `_360LION` | +| `PANDU` | +| `PROFESSIONAL_COURIERS` | +| `FLYTEXPRESS` | +| `LOGISTICSWORLDWIDE_MY` | +| `CORREOS_DE_ESPANA` | +| `IMX` | +| `FOUR_PX_EXPRESS` | +| `XPRESSBEES` | +| `PICKUPP_VNM` | +| `STARTRACK_EXPRESS1` | +| `FR_COLISSIMO` | +| `NACEX_SPAIN_REFERENCE` | +| `DHL_SUPPLY_CHAIN_AU` | +| `ESHIPPING` | +| `SHREETIRUPATI` | +| `HX_EXPRESS` | +| `INDOPAKET` | +| `CN_17POST` | +| `K1_EXPRESS` | +| `CJ_GLS` | +| `MYS_GDEX` | +| `NATIONEX` | +| `ANJUN` | +| `FARGOOD` | +| `SMG_EXPRESS` | +| `RZYEXPRESS` | +| `SEFL` | +| `TNT_CLICK_IT` | +| `HDB` | +| `HIPSHIPPER` | +| `RPXLOGISTICS` | +| `KUEHNE` | +| `IT_NEXIVE` | +| `PTS` | +| `SWISS_POST_FTP` | +| `FASTRK_SERV` | +| `_4_72` | +| `US_YRC` | +| `POSTNL_INTL_3S` | +| `ELIAN_POST` | +| `CUBYN` | +| `SAU_SAUDI_POST` | +| `ABXEXPRESS_MY` | +| `HUAHAN_EXPRESS` | +| `IND_JAYONEXPRESS` | +| `ZES_EXPRESS` | +| `ZEPTO_EXPRESS` | +| `SKYNET_ZA` | +| `ZEEK_2_DOOR` | +| `BLINKLASTMILE` | +| `POSTA_UKR` | +| `CHROBINSON` | +| `CN_POST56` | +| `COURANT_PLUS` | +| `SCUDEX_EXPRESS` | +| `SHIPENTEGRA` | +| `B_TWO_C_EUROPE` | +| `COPE` | +| `IND_GATI` | +| `CN_WISHPOST` | +| `NACEX_ES` | +| `TAQBIN_HK` | +| `GLOBALTRANZ` | +| `HKD` | +| `BJSHOMEDELIVERY` | +| `OMNIVA` | +| `SUTTON` | +| `PANTHER_REFERENCE` | +| `SFCSERVICE` | +| `LTL` | +| `PARKNPARCEL` | +| `SPRING_GDS` | +| `ECEXPRESS` | +| `INTERPARCEL_AU` | +| `AGILITY` | +| `XL_EXPRESS` | +| `ADERONLINE` | +| `DIRECTCOURIERS` | +| `PLANZER` | +| `SENDING` | +| `NINJAVAN_WB` | +| `NATIONWIDE_MY` | +| `SENDIT` | +| `GB_ARROW` | +| `IND_GOJAVAS` | +| `KPOST` | +| `DHL_FREIGHT` | +| `BLUECARE` | +| `JINDOUYUN` | +| `TRACKON` | +| `GB_TUFFNELLS` | +| `TRUMPCARD` | +| `ETOTAL` | +| `SFPLUS_WEBHOOK` | +| `SEKOLOGISTICS` | +| `HERMES_2MANN_HANDLING` | +| `DPD_LOCAL_REF` | +| `UDS` | +| `ZA_SPECIALISED_FREIGHT` | +| `THA_KERRY` | +| `PRT_INT_SEUR` | +| `BRA_CORREIOS` | +| `NZ_NZ_POST` | +| `CN_EQUICK` | +| `MYS_EMS` | +| `GB_NORSK` | +| `ESP_MRW` | +| `ESP_PACKLINK` | +| `KANGAROO_MY` | +| `RPX` | +| `XDP_UK_REFERENCE` | +| `NINJAVAN_MY` | +| `ADICIONAL` | +| `NINJAVAN_ID` | +| `ROADBULL` | +| `YAKIT` | +| `MAILAMERICAS` | +| `MIKROPAKKET` | +| `DYNALOGIC` | +| `DHL_ES` | +| `DHL_PARCEL_NL` | +| `DHL_GLOBAL_MAIL_ASIA` | +| `DAWN_WING` | +| `GENIKI_GR` | +| `HERMESWORLD_UK` | +| `ALPHAFAST` | +| `BUYLOGIC` | +| `EKART` | +| `MEX_SENDA` | +| `SFC_LOGISTICS` | +| `POST_SERBIA` | +| `IND_DELHIVERY` | +| `DE_DPD_DELISTRACK` | +| `RPD2MAN` | +| `CN_SF_EXPRESS` | +| `YANWEN` | +| `MYS_SKYNET` | +| `CORREOS_DE_MEXICO` | +| `CBL_LOGISTICA` | +| `MEX_ESTAFETA` | +| `AU_AUSTRIAN_POST` | +| `RINCOS` | +| `NLD_DHL` | +| `RUSSIAN_POST` | +| `COURIERS_PLEASE` | +| `POSTNORD_LOGISTICS` | +| `FEDEX` | +| `DPE_EXPRESS` | +| `DPD` | +| `ADSONE` | +| `IDN_JNE` | +| `THECOURIERGUY` | +| `CNEXPS` | +| `PRT_CHRONOPOST` | +| `LANDMARK_GLOBAL` | +| `IT_DHL_ECOMMERCE` | +| `ESP_NACEX` | +| `PRT_CTT` | +| `BE_KIALA` | +| `ASENDIA_UK` | +| `GLOBAL_TNT` | +| `POSTUR_IS` | +| `EPARCEL_KR` | +| `INPOST_PACZKOMATY` | +| `IT_POSTE_ITALIA` | +| `BE_BPOST` | +| `PL_POCZTA_POLSKA` | +| `MYS_MYS_POST` | +| `SG_SG_POST` | +| `THA_THAILAND_POST` | +| `LEXSHIP` | +| `FASTWAY_NZ` | +| `DHL_AU` | +| `COSTMETICSNOW` | +| `PFLOGISTICS` | +| `LOOMIS_EXPRESS` | +| `GLS_ITALY` | +| `LINE` | +| `GEL_EXPRESS` | +| `HUODULL` | +| `NINJAVAN_SG` | +| `JANIO` | +| `AO_COURIER` | +| `BRT_IT_SENDER_REF` | +| `SAILPOST` | +| `LALAMOVE` | +| `NEWZEALAND_COURIERS` | +| `ETOMARS` | +| `VIRTRANSPORT` | +| `WIZMO` | +| `PALLETWAYS` | +| `I_DIKA` | +| `CFL_LOGISTICS` | +| `GEMWORLDWIDE` | +| `GLOBAL_EXPRESS` | +| `LOGISTYX_TRANSGROUP` | +| `WESTBANK_COURIER` | +| `ARCO_SPEDIZIONI` | +| `YDH_EXPRESS` | +| `PARCELINKLOGISTICS` | +| `CNDEXPRESS` | +| `NOX_NIGHT_TIME_EXPRESS` | +| `AERONET` | +| `LTIANEXP` | +| `INTEGRA2_FTP` | +| `PARCELONE` | +| `NOX_NACHTEXPRESS` | +| `CN_CHINA_POST_EMS` | +| `CHUKOU1` | +| `GLS_SLOV` | +| `ORANGE_DS` | +| `JOOM_LOGIS` | +| `AUS_STARTRACK` | +| `DHL` | +| `GB_APC` | +| `BONDSCOURIERS` | +| `JPN_JAPAN_POST` | +| `USPS` | +| `WINIT` | +| `ARG_OCA` | +| `TW_TAIWAN_POST` | +| `DMM_NETWORK` | +| `TNT` | +| `BH_POSTA` | +| `SWE_POSTNORD` | +| `CA_CANADA_POST` | +| `WISELOADS` | +| `ASENDIA_HK` | +| `NLD_GLS` | +| `MEX_REDPACK` | +| `JET_SHIP` | +| `DE_DHL_EXPRESS` | +| `NINJAVAN_THAI` | +| `RABEN_GROUP` | +| `ESP_ASM` | +| `HRV_HRVATSKA` | +| `GLOBAL_ESTES` | +| `LTU_LIETUVOS` | +| `BEL_DHL` | +| `AU_AU_POST` | +| `SPEEDEXCOURIER` | +| `FR_COLIS` | +| `ARAMEX` | +| `DPEX` | +| `MYS_AIRPAK` | +| `CUCKOOEXPRESS` | +| `DPD_POLAND` | +| `NLD_POSTNL` | +| `NIM_EXPRESS` | +| `QUANTIUM` | +| `SENDLE` | +| `ESP_REDUR` | +| `MATKAHUOLTO` | +| `CPACKET` | +| `POSTI` | +| `HUNTER_EXPRESS` | +| `CHOIR_EXP` | +| `LEGION_EXPRESS` | +| `AUSTRIAN_POST_EXPRESS` | +| `GRUPO` | +| `POSTA_RO` | +| `INTERPARCEL_UK` | +| `GLOBAL_ABF` | +| `POSTEN_NORGE` | +| `XPERT_DELIVERY` | +| `DHL_REFR` | +| `DHL_HK` | +| `SKYNET_UAE` | +| `GOJEK` | +| `YODEL_INTNL` | +| `JANCO` | +| `YTO` | +| `WISE_EXPRESS` | +| `JTEXPRESS_VN` | +| `FEDEX_INTL_MLSERV` | +| `VAMOX` | +| `AMS_GRP` | +| `DHL_JP` | +| `HRPARCEL` | +| `GESWL` | +| `BLUESTAR` | +| `CDEK_TR` | +| `DESCARTES` | +| `DELTEC_UK` | +| `DTDC_EXPRESS` | +| `TOURLINE` | +| `BH_WORLDWIDE` | +| `OCS` | +| `YINGNUO_LOGISTICS` | +| `UPS` | +| `TOLL` | +| `PRT_SEUR` | +| `DTDC_AU` | +| `THA_DYNAMIC_LOGISTICS` | +| `UBI_LOGISTICS` | +| `FEDEX_CROSSBORDER` | +| `A1POST` | +| `TAZMANIAN_FREIGHT` | +| `CJ_INT_MY` | +| `SAIA_FREIGHT` | +| `SG_QXPRESS` | +| `NHANS_SOLUTIONS` | +| `DPD_FR` | +| `COORDINADORA` | +| `ANDREANI` | +| `DOORA` | +| `INTERPARCEL_NZ` | +| `PHL_JAMEXPRESS` | +| `BEL_BELGIUM_POST` | +| `US_APC` | +| `IDN_POS` | +| `FR_MONDIAL` | +| `DE_DHL` | +| `HK_RPX` | +| `DHL_PIECEID` | +| `VNPOST_EMS` | +| `RRDONNELLEY` | +| `DPD_DE` | +| `DELCART_IN` | +| `IMEXGLOBALSOLUTIONS` | +| `ACOMMERCE` | +| `EURODIS` | +| `CANPAR` | +| `GLS` | +| `IND_ECOM` | +| `ESP_ENVIALIA` | +| `DHL_UK` | +| `SMSA_EXPRESS` | +| `TNT_FR` | +| `DEX_I` | +| `BUDBEE_WEBHOOK` | +| `COPA_COURIER` | +| `VNM_VIETNAM_POST` | +| `DPD_HK` | +| `TOLL_NZ` | +| `ECHO` | +| `FEDEX_FR` | +| `BORDEREXPRESS` | +| `MAILPLUS_JPN` | +| `TNT_UK_REFR` | +| `KEC` | +| `DPD_RO` | +| `TNT_JP` | +| `TH_CJ` | +| `EC_CN` | +| `FASTWAY_UK` | +| `FASTWAY_US` | +| `GLS_DE` | +| `GLS_ES` | +| `GLS_FR` | +| `MONDIAL_BE` | +| `SGT_IT` | +| `TNT_CN` | +| `TNT_DE` | +| `TNT_ES` | +| `TNT_PL` | +| `PARCELFORCE` | +| `SWISS_POST` | +| `TOLL_IPEC` | +| `AIR_21` | +| `AIRSPEED` | +| `BERT` | +| `BLUEDART` | +| `COLLECTPLUS` | +| `COURIERPLUS` | +| `COURIER_POST` | +| `DHL_GLOBAL_MAIL` | +| `DPD_UK` | +| `DELTEC_DE` | +| `DEUTSCHE_DE` | +| `DOTZOT` | +| `ELTA_GR` | +| `EMS_CN` | +| `ECARGO` | +| `ENSENDA` | +| `FERCAM_IT` | +| `FASTWAY_ZA` | +| `FASTWAY_AU` | +| `FIRST_LOGISITCS` | +| `GEODIS` | +| `GLOBEGISTICS` | +| `GREYHOUND` | +| `JETSHIP_MY` | +| `LION_PARCEL` | +| `AEROFLASH` | +| `ONTRAC` | +| `SAGAWA` | +| `SIODEMKA` | +| `STARTRACK` | +| `TNT_AU` | +| `TNT_IT` | +| `TRANSMISSION` | +| `YAMATO` | +| `DHL_IT` | +| `DHL_AT` | +| `LOGISTICSWORLDWIDE_KR` | +| `GLS_SPAIN` | +| `AMAZON_UK_API` | +| `DPD_FR_REFERENCE` | +| `DHLPARCEL_UK` | +| `MEGASAVE` | +| `QUALITYPOST` | +| `IDS_LOGISTICS` | +| `JOYINGBOX1` | +| `PANTHER_ORDER_NUMBER` | +| `WATKINS_SHEPARD` | +| `FASTTRACK` | +| `UP_EXPRESS` | +| `ELOGISTICA` | +| `ECOURIER` | +| `CJ_PHILIPPINES` | +| `SPEEDEX` | +| `ORANGECONNEX` | +| `TECOR` | +| `SAEE` | +| `GLS_ITALY_FTP` | +| `DELIVERE` | +| `YYCOM` | +| `ADICIONAL_PT` | +| `DKSH` | +| `NIPPON_EXPRESS_FTP` | +| `GOLS` | +| `FUJEXP` | +| `QTRACK` | +| `OMLOGISTICS_API` | +| `GDPHARM` | +| `MISUMI_CN` | +| `AIR_CANADA` | +| `CITY56_WEBHOOK` | +| `SAGAWA_API` | +| `KEDAEX` | +| `PGEON_API` | +| `WEWORLDEXPRESS` | +| `JT_LOGISTICS` | +| `TRUSK` | +| `VIAXPRESS` | +| `DHL_SUPPLYCHAIN_ID` | +| `ZUELLIGPHARMA_SFTP` | +| `MEEST` | +| `TOLL_PRIORITY` | +| `MOTHERSHIP_API` | +| `CAPITAL` | +| `EUROPAKET_API` | +| `HFD` | +| `TOURLINE_REFERENCE` | +| `GIO_ECOURIER` | +| `CN_LOGISTICS` | +| `PANDION` | +| `BPOST_API` | +| `PASSPORTSHIPPING` | +| `PAKAJO` | +| `DACHSER` | +| `YUSEN_SFTP` | +| `SHYPLITE` | +| `XYY` | +| `MWD` | +| `FAXECARGO` | +| `MAZET` | +| `FIRST_LOGISTICS_API` | +| `SPRINT_PACK` | +| `HERMES_DE_FTP` | +| `CONCISE` | +| `KERRY_EXPRESS_TW_API` | +| `EWE` | +| `FASTDESPATCH` | +| `ABCUSTOM_SFTP` | +| `CHAZKI` | +| `SHIPPIE` | +| `GEODIS_API` | +| `NAQEL_EXPRESS` | +| `PAPA_WEBHOOK` | +| `FORWARDAIR` | +| `DIALOGO_LOGISTICA_API` | +| `LALAMOVE_API` | +| `TOMYDOOR` | +| `KRONOS_WEBHOOK` | +| `JTCARGO` | +| `T_CAT` | +| `CONCISE_WEBHOOK` | +| `TELEPORT_WEBHOOK` | +| `CUSTOMCO_API` | +| `SPX_TH` | +| `BOLLORE_LOGISTICS` | +| `CLICKLINK_SFTP` | +| `M3LOGISTICS` | +| `VNPOST_API` | +| `AXLEHIRE_FTP` | +| `SHADOWFAX` | +| `MYHERMES_UK_API` | +| `DAIICHI` | +| `MENSAJEROSURBANOS_API` | +| `POLARSPEED` | +| `IDEXPRESS_ID` | +| `PAYO` | +| `WHISTL_SFTP` | +| `INTEX_DE` | +| `TRANS2U` | +| `PRODUCTCAREGROUP_SFTP` | +| `BIGSMART` | +| `EXPEDITORS_API_REF` | +| `AITWORLDWIDE_API` | +| `WORLDCOURIER` | +| `QUIQUP` | +| `AGEDISS_SFTP` | +| `ANDREANI_API` | +| `CRLEXPRESS` | +| `SMARTCAT` | +| `CROSSFLIGHT` | +| `PROCARRIER` | +| `DHL_REFERENCE_API` | +| `SEINO_API` | +| `WSPEXPRESS` | +| `KRONOS` | +| `TOTAL_EXPRESS_API` | +| `PARCLL` | +| `XPEDIGO` | +| `STAR_TRACK_WEBHOOK` | +| `GPOST` | +| `UCS` | +| `DMFGROUP` | +| `COORDINADORA_API` | +| `MARKEN` | +| `NTL` | +| `REDJEPAKKETJE` | +| `ALLIED_EXPRESS_FTP` | +| `MONDIALRELAY_ES` | +| `NAEKO_FTP` | +| `MHI` | +| `SHIPPIFY` | +| `MALCA_AMIT_API` | +| `JTEXPRESS_SG_API` | +| `DACHSER_WEB` | +| `FLIGHTLG` | +| `CAGO` | +| `COM1EXPRESS` | +| `TONAMI_FTP` | +| `PACKFLEET` | +| `PUROLATOR_INTERNATIONAL` | +| `WINESHIPPING_WEBHOOK` | +| `DHL_ES_SFTP` | +| `PCHOME_API` | +| `CESKAPOSTA_API` | +| `GORUSH` | +| `HOMERUNNER` | +| `AMAZON_ORDER` | +| `EFWNOW_API` | +| `CBL_LOGISTICA_API` | +| `NIMBUSPOST` | +| `LOGWIN_LOGISTICS` | +| `NOWLOG_API` | +| `DPD_NL` | +| `GODEPENDABLE` | +| `ESDEX` | +| `LOGISYSTEMS_SFTP` | +| `EXPEDITORS` | +| `SNTGLOBAL_API` | +| `SHIPX` | +| `QINTL_API` | +| `PACKS` | +| `POSTNL_INTERNATIONAL` | +| `AMAZON_EMAIL_PUSH` | +| `DHL_API` | +| `SPX` | +| `AXLEHIRE` | +| `ICSCOURIER` | +| `DIALOGO_LOGISTICA` | +| `SHUNBANG_EXPRESS` | +| `TCS_API` | +| `SF_EXPRESS_CN` | +| `PACKETA` | +| `SIC_TELIWAY` | +| `MONDIALRELAY_FR` | +| `INTIME_FTP` | +| `JD_EXPRESS` | +| `FASTBOX` | +| `PATHEON` | +| `INDIA_POST` | +| `TIPSA_REF` | +| `ECOFREIGHT` | +| `VOX` | +| `DIRECTFREIGHT_AU_REF` | +| `BESTTRANSPORT_SFTP` | +| `AUSTRALIA_POST_API` | +| `FRAGILEPAK_SFTP` | +| `FLIPXP` | +| `VALUE_WEBHOOK` | +| `DAESHIN` | +| `SHERPA` | +| `MWD_API` | +| `SMARTKARGO` | +| `DNJ_EXPRESS` | +| `GOPEOPLE` | +| `MYSENDLE_API` | +| `ARAMEX_API` | +| `PIDGE` | +| `THAIPARCELS` | +| `PANTHER_REFERENCE_API` | +| `POSTAPLUS1` | +| `BUFFALO` | +| `U_ENVIOS` | +| `ELITE_CO` | +| `BARQEXP` | +| `ROCHE_INTERNAL_SFTP` | +| `DBSCHENKER_ICELAND` | +| `TNT_FR_REFERENCE` | +| `NEWGISTICSAPI` | +| `GLOVO` | +| `GWLOGIS_API` | +| `SPREETAIL_API` | +| `MOOVA` | +| `PLYCONGROUP` | +| `USPS_WEBHOOK` | +| `REIMAGINEDELIVERY` | +| `EDF_FTP` | +| `DAO365` | +| `BIOCAIR_FTP` | +| `RANSA_WEBHOOK` | +| `SHIPXPRES` | +| `COURANT_PLUS_API` | +| `SHIPA` | +| `HOMELOGISTICS` | +| `DX` | +| `POSTE_ITALIANE_PACCOCELERE` | +| `TOLL_WEBHOOK` | +| `LCTBR_API` | +| `DX_FREIGHT` | +| `DHL_SFTP` | +| `SHIPROCKET` | +| `UBER_WEBHOOK` | +| `STATOVERNIGHT` | +| `BURD` | +| `FASTSHIP` | +| `IBVENTURE_WEBHOOK` | +| `GATI_KWE_API` | +| `CRYOPDP_FTP` | +| `HUBBED` | +| `TIPSA_API` | +| `ARASKARGO` | +| `THIJS_NL` | +| `ATSHEALTHCARE_REFERENCE` | +| `ENUM_99MINUTOS` | +| `HELLENIC_POST` | +| `HSM_GLOBAL` | +| `MNX` | +| `NMTRANSFER` | +| `LOGYSTO` | +| `INDIA_POST_INT` | +| `AMAZON_FBA_SWISHIP_IN` | +| `SRT_TRANSPORT` | +| `BOMI` | +| `DELIVERR_SFTP` | +| `HSDEXPRESS` | +| `SIMPLETIRE_WEBHOOK` | +| `HUNTER_EXPRESS_SFTP` | +| `UPS_API` | +| `WOOYOUNG_LOGISTICS_SFTP` | +| `PHSE_API` | +| `WISH_EMAIL_PUSH` | +| `NORTHLINE` | +| `MEDAFRICA` | +| `DPD_AT_SFTP` | +| `ANTERAJA` | +| `DHL_GLOBAL_FORWARDING_API` | +| `LBCEXPRESS_API` | +| `SIMSGLOBAL` | +| `CDLDELIVERS` | +| `TYP` | +| `TESTING_COURIER_WEBHOOK` | +| `PANDAGO_API` | +| `ROYAL_MAIL_FTP` | +| `THUNDEREXPRESS` | +| `SECRETLAB_WEBHOOK` | +| `SETEL` | +| `JD_WORLDWIDE` | +| `DPD_RU_API` | +| `ARGENTS_WEBHOOK` | +| `POSTONE` | +| `TUSKLOGISTICS` | +| `RHENUS_UK_API` | +| `TAQBIN_SG_API` | +| `INNTRALOG_SFTP` | +| `DAYROSS` | +| `CORREOSEXPRESS_API` | +| `INTERNATIONAL_SEUR_API` | +| `YODEL_API` | +| `HEROEXPRESS` | +| `DHL_SUPPLYCHAIN_IN` | +| `URGENT_CARGUS` | +| `FRONTDOORCORP` | +| `JTEXPRESS_PH` | +| `PARCELSTARS_WEBHOOK` | +| `DPD_SK_SFTP` | +| `MOVIANTO` | +| `OZEPARTS_SHIPPING` | +| `KARGOMKOLAY` | +| `TRUNKRS` | +| `OMNIRPS_WEBHOOK` | +| `CHILEXPRESS` | +| `TESTING_COURIER` | +| `JNE_API` | +| `BJSHOMEDELIVERY_FTP` | +| `DEXPRESS_WEBHOOK` | +| `USPS_API` | +| `TRANSVIRTUAL` | +| `SOLISTICA_API` | +| `CHIENVENTURE_WEBHOOK` | +| `DPD_UK_SFTP` | +| `INPOST_UK` | +| `JAVIT` | +| `ZTO_DOMESTIC` | +| `DHL_GT_API` | +| `CEVA_TRACKING` | +| `KOMON_EXPRESS` | +| `EASTWESTCOURIER_FTP` | +| `DANNIAO` | +| `SPECTRAN` | +| `DELIVER_IT` | +| `RELAISCOLIS` | +| `GLS_SPAIN_API` | +| `POSTPLUS` | +| `AIRTERRA` | +| `GIO_ECOURIER_API` | +| `DPD_CH_SFTP` | +| `FEDEX_API` | +| `INTERSMARTTRANS` | +| `HERMES_UK_SFTP` | +| `EXELOT_FTP` | +| `DHL_PA_API` | +| `VIRTRANSPORT_SFTP` | +| `WORLDNET` | +| `INSTABOX_WEBHOOK` | +| `KNG` | +| `FLASHEXPRESS_WEBHOOK` | +| `MAGYAR_POSTA_API` | +| `WESHIP_API` | +| `OHI_WEBHOOK` | +| `MUDITA` | +| `BLUEDART_API` | +| `T_CAT_API` | +| `ADS` | +| `HERMES_IT` | +| `FITZMARK_API` | +| `POSTI_API` | +| `SMSA_EXPRESS_WEBHOOK` | +| `TAMERGROUP_WEBHOOK` | +| `LIVRAPIDE` | +| `NIPPON_EXPRESS` | +| `BETTERTRUCKS` | +| `FAN` | +| `PB_USPSFLATS_FTP` | +| `PARCELRIGHT` | +| `ITHINKLOGISTICS` | +| `KERRY_EXPRESS_TH_WEBHOOK` | +| `ECOUTIER` | +| `SHOWL` | +| `BRT_IT_API` | +| `RIXONHK_API` | +| `DBSCHENKER_API` | +| `ILYANGLOGIS` | +| `MAIL_BOX_ETC` | +| `WESHIP` | +| `DHL_GLOBAL_MAIL_API` | +| `ACTIVOS24_API` | +| `ATSHEALTHCARE` | +| `LUWJISTIK` | +| `GW_WORLD` | +| `FAIRSENDEN_API` | +| `SERVIP_WEBHOOK` | +| `SWISHIP` | +| `TANET` | +| `HOTSIN_CARGO` | +| `DIREX` | +| `HUANTONG` | +| `IMILE_API` | +| `BDMNET` | +| `AUEXPRESS` | +| `NYTLOGISTICS` | +| `DSV_REFERENCE` | +| `NOVOFARMA_WEBHOOK` | +| `AITWORLDWIDE_SFTP` | +| `SHOPOLIVE` | +| `FNF_ZA` | +| `DHL_ECOMMERCE_GC` | +| `FETCHR` | +| `STARLINKS_API` | +| `YYEXPRESS` | +| `SERVIENTREGA` | +| `HANJIN` | +| `SPANISH_SEUR_FTP` | +| `DX_B2B_CONNUM` | +| `HELTHJEM_API` | +| `INEXPOST` | +| `A2B_BA` | +| `RHENUS_GROUP` | +| `SBERLOGISTICS_RU` | +| `MALCA_AMIT` | +| `PPL` | +| `OSM_WORLDWIDE_SFTP` | +| `ACILOGISTIX` | +| `OPTIMACOURIER` | +| `NOVA_POSHTA_API` | +| `LOGGI` | +| `YIFAN` | +| `MYDYNALOGIC` | +| `MORNINGLOBAL` | +| `CONCISE_API` | +| `FXTRAN` | +| `DELIVERYOURPARCEL_ZA` | +| `UPARCEL` | +| `MOBI_BR` | +| `LOGINEXT_WEBHOOK` | +| `EMS` | +| `SPEEDY` | + diff --git a/doc/models/shipping-details.md b/doc/models/shipping-details.md new file mode 100644 index 0000000..1464b4e --- /dev/null +++ b/doc/models/shipping-details.md @@ -0,0 +1,69 @@ + +# Shipping Details + +The shipping details. + +## Structure + +`ShippingDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | +| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `options` | [`Array`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `10` | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "name": { + "full_name": "full_name6" + }, + "type": "PICKUP_IN_STORE", + "options": [ + { + "id": "id2", + "label": "label2", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false + }, + { + "id": "id2", + "label": "label2", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false + }, + { + "id": "id2", + "label": "label2", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false + } + ], + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } +} +``` + diff --git a/doc/models/shipping-name.md b/doc/models/shipping-name.md new file mode 100644 index 0000000..a5eb348 --- /dev/null +++ b/doc/models/shipping-name.md @@ -0,0 +1,23 @@ + +# Shipping Name + +The name of the party. + +## Structure + +`ShippingName` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `full_name` | `String` | Optional | When the party is a person, the party's full name.
**Constraints**: *Maximum Length*: `300` | + +## Example (as JSON) + +```json +{ + "full_name": "full_name6" +} +``` + diff --git a/doc/models/shipping-option.md b/doc/models/shipping-option.md new file mode 100644 index 0000000..cddf1de --- /dev/null +++ b/doc/models/shipping-option.md @@ -0,0 +1,34 @@ + +# Shipping Option + +The options that the payee or merchant offers to the payer to ship or pick up their items. + +## Structure + +`ShippingOption` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Required | A unique ID that identifies a payer-selected shipping option.
**Constraints**: *Maximum Length*: `127` | +| `label` | `String` | Required | A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale.
**Constraints**: *Maximum Length*: `127` | +| `type` | [`ShippingType`](../../doc/models/shipping-type.md) | Optional | A classification for the method of purchase fulfillment. | +| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | +| `selected` | `TrueClass \| FalseClass` | Required | If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true`. | + +## Example (as JSON) + +```json +{ + "id": "id4", + "label": "label4", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false +} +``` + diff --git a/doc/models/shipping-preference.md b/doc/models/shipping-preference.md new file mode 100644 index 0000000..8aedb56 --- /dev/null +++ b/doc/models/shipping-preference.md @@ -0,0 +1,17 @@ + +# Shipping Preference + +The location from which the shipping address is derived. + +## Enumeration + +`ShippingPreference` + +## Fields + +| Name | +| --- | +| `GET_FROM_FILE` | +| `NO_SHIPPING` | +| `SET_PROVIDED_ADDRESS` | + diff --git a/doc/models/shipping-type.md b/doc/models/shipping-type.md new file mode 100644 index 0000000..de49788 --- /dev/null +++ b/doc/models/shipping-type.md @@ -0,0 +1,18 @@ + +# Shipping Type + +A classification for the method of purchase fulfillment. + +## Enumeration + +`ShippingType` + +## Fields + +| Name | +| --- | +| `SHIPPING` | +| `PICKUP` | +| `PICKUP_IN_STORE` | +| `PICKUP_FROM_PERSON` | + diff --git a/doc/models/shipping-with-tracking-details.md b/doc/models/shipping-with-tracking-details.md new file mode 100644 index 0000000..d2ea3ca --- /dev/null +++ b/doc/models/shipping-with-tracking-details.md @@ -0,0 +1,114 @@ + +# Shipping With Tracking Details + +The order shipping details. + +## Structure + +`ShippingWithTrackingDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | +| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `options` | [`Array`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `10` | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `trackers` | [`Array`](../../doc/models/order-tracker-response.md) | Optional | An array of trackers for a transaction. | + +## Example (as JSON) + +```json +{ + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "options": [ + { + "id": "id2", + "label": "label2", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false + }, + { + "id": "id2", + "label": "label2", + "type": "SHIPPING", + "amount": { + "currency_code": "currency_code6", + "value": "value0" + }, + "selected": false + } + ], + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + }, + "trackers": [ + { + "id": "id2", + "status": "CANCELLED", + "items": [ + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + } + ], + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "create_time": "create_time8" + }, + { + "id": "id2", + "status": "CANCELLED", + "items": [ + { + "name": "name8", + "quantity": "quantity4", + "sku": "sku6", + "url": "url2", + "image_url": "image_url4" + } + ], + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + }, + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ], + "create_time": "create_time8" + } + ] +} +``` + diff --git a/doc/models/sofort-payment-object.md b/doc/models/sofort-payment-object.md new file mode 100644 index 0000000..e113f52 --- /dev/null +++ b/doc/models/sofort-payment-object.md @@ -0,0 +1,29 @@ + +# Sofort Payment Object + +Information used to pay using Sofort. + +## Structure + +`SofortPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code6", + "bic": "bic8", + "iban_last_chars": "iban_last_chars4" +} +``` + diff --git a/doc/models/sofort-payment-request.md b/doc/models/sofort-payment-request.md new file mode 100644 index 0000000..7b0e113 --- /dev/null +++ b/doc/models/sofort-payment-request.md @@ -0,0 +1,33 @@ + +# Sofort Payment Request + +Information needed to pay using Sofort. + +## Structure + +`SofortPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name4", + "country_code": "country_code4", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/standard-entry-class-code.md b/doc/models/standard-entry-class-code.md new file mode 100644 index 0000000..f60023f --- /dev/null +++ b/doc/models/standard-entry-class-code.md @@ -0,0 +1,18 @@ + +# Standard Entry Class Code + +NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes. + +## Enumeration + +`StandardEntryClassCode` + +## Fields + +| Name | +| --- | +| `TEL` | +| `WEB` | +| `CCD` | +| `PPD` | + diff --git a/doc/models/store-in-vault-instruction.md b/doc/models/store-in-vault-instruction.md new file mode 100644 index 0000000..ece80a5 --- /dev/null +++ b/doc/models/store-in-vault-instruction.md @@ -0,0 +1,15 @@ + +# Store in Vault Instruction + +Defines how and when the payment source gets vaulted. + +## Enumeration + +`StoreInVaultInstruction` + +## Fields + +| Name | +| --- | +| `ON_SUCCESS` | + diff --git a/doc/models/stored-payment-source-payment-type.md b/doc/models/stored-payment-source-payment-type.md new file mode 100644 index 0000000..28d25b3 --- /dev/null +++ b/doc/models/stored-payment-source-payment-type.md @@ -0,0 +1,17 @@ + +# Stored Payment Source Payment Type + +Indicates the type of the stored payment_source payment. + +## Enumeration + +`StoredPaymentSourcePaymentType` + +## Fields + +| Name | +| --- | +| `ONE_TIME` | +| `RECURRING` | +| `UNSCHEDULED` | + diff --git a/doc/models/stored-payment-source-usage-type.md b/doc/models/stored-payment-source-usage-type.md new file mode 100644 index 0000000..30a870d --- /dev/null +++ b/doc/models/stored-payment-source-usage-type.md @@ -0,0 +1,17 @@ + +# Stored Payment Source Usage Type + +Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file). + +## Enumeration + +`StoredPaymentSourceUsageType` + +## Fields + +| Name | +| --- | +| `FIRST` | +| `SUBSEQUENT` | +| `DERIVED` | + diff --git a/doc/models/stored-payment-source.md b/doc/models/stored-payment-source.md new file mode 100644 index 0000000..bdccb7b --- /dev/null +++ b/doc/models/stored-payment-source.md @@ -0,0 +1,34 @@ + +# Stored Payment Source + +Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
+ +## Structure + +`StoredPaymentSource` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `payment_type` | [`StoredPaymentSourcePaymentType`](../../doc/models/stored-payment-source-payment-type.md) | Required | Indicates the type of the stored payment_source payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `previous_network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | + +## Example (as JSON) + +```json +{ + "payment_initiator": "CUSTOMER", + "payment_type": "RECURRING", + "usage": "DERIVED", + "previous_network_transaction_reference": { + "id": "id6", + "date": "date2", + "network": "VISA", + "acquirer_reference_number": "acquirer_reference_number8" + } +} +``` + diff --git a/doc/models/supplementary-data.md b/doc/models/supplementary-data.md new file mode 100644 index 0000000..40b096f --- /dev/null +++ b/doc/models/supplementary-data.md @@ -0,0 +1,54 @@ + +# Supplementary Data + +Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. + +## Structure + +`SupplementaryData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `card` | [`CardSupplementaryData`](../../doc/models/card-supplementary-data.md) | Optional | Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. | + +## Example (as JSON) + +```json +{ + "card": { + "level_2": { + "invoice_id": "invoice_id4", + "tax_total": { + "currency_code": "currency_code4", + "value": "value0" + } + }, + "level_3": { + "shipping_amount": { + "currency_code": "currency_code0", + "value": "value6" + }, + "duty_amount": { + "currency_code": "currency_code6", + "value": "value2" + }, + "discount_amount": { + "currency_code": "currency_code2", + "value": "value8" + }, + "shipping_address": { + "address_line_1": "address_line_10", + "address_line_2": "address_line_20", + "admin_area_2": "admin_area_24", + "admin_area_1": "admin_area_16", + "postal_code": "postal_code2", + "country_code": "country_code0" + }, + "ships_from_postal_code": "ships_from_postal_code4" + } + } +} +``` + diff --git a/doc/models/supplementary-purchase-data.md b/doc/models/supplementary-purchase-data.md new file mode 100644 index 0000000..7383078 --- /dev/null +++ b/doc/models/supplementary-purchase-data.md @@ -0,0 +1,25 @@ + +# Supplementary Purchase Data + +The capture identification-related fields. Includes the invoice ID, custom ID, note to payer, and soft descriptor. + +## Structure + +`SupplementaryPurchaseData` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.{1,127}$` | +| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.{1,255}$` | + +## Example (as JSON) + +```json +{ + "invoice_id": "invoice_id8", + "note_to_payer": "note_to_payer0" +} +``` + diff --git a/doc/models/tax-id-type.md b/doc/models/tax-id-type.md new file mode 100644 index 0000000..9a846e4 --- /dev/null +++ b/doc/models/tax-id-type.md @@ -0,0 +1,16 @@ + +# Tax Id Type + +The customer's tax ID type. + +## Enumeration + +`TaxIdType` + +## Fields + +| Name | +| --- | +| `BR_CPF` | +| `BR_CNPJ` | + diff --git a/doc/models/tax-info.md b/doc/models/tax-info.md new file mode 100644 index 0000000..85e4c7b --- /dev/null +++ b/doc/models/tax-info.md @@ -0,0 +1,25 @@ + +# Tax Info + +The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. + +## Structure + +`TaxInfo` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `tax_id` | `String` | Required | The customer's tax ID value.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `([a-zA-Z0-9])` | +| `tax_id_type` | [`TaxIdType`](../../doc/models/tax-id-type.md) | Required | The customer's tax ID type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[A-Z0-9_]+$` | + +## Example (as JSON) + +```json +{ + "tax_id": "tax_id0", + "tax_id_type": "BR_CPF" +} +``` + diff --git a/doc/models/three-d-secure-authentication-response.md b/doc/models/three-d-secure-authentication-response.md new file mode 100644 index 0000000..9370a0f --- /dev/null +++ b/doc/models/three-d-secure-authentication-response.md @@ -0,0 +1,25 @@ + +# Three D Secure Authentication Response + +Results of 3D Secure Authentication. + +## Structure + +`ThreeDSecureAuthenticationResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `authentication_status` | [`PAResStatus`](../../doc/models/pa-res-status.md) | Optional | Transactions status result identifier. The outcome of the issuer's authentication.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `enrollment_status` | [`EnrollmentStatus`](../../doc/models/enrollment-status.md) | Optional | Status of Authentication eligibility.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "authentication_status": "C", + "enrollment_status": "Y" +} +``` + diff --git a/doc/models/token-type.md b/doc/models/token-type.md new file mode 100644 index 0000000..0001c8b --- /dev/null +++ b/doc/models/token-type.md @@ -0,0 +1,16 @@ + +# Token Type + +The tokenization method that generated the ID. + +## Enumeration + +`TokenType` + +## Fields + +| Name | +| --- | +| `BILLING_AGREEMENT` | +| `SETUP_TOKEN` | + diff --git a/doc/models/token.md b/doc/models/token.md new file mode 100644 index 0000000..4ee4ddf --- /dev/null +++ b/doc/models/token.md @@ -0,0 +1,25 @@ + +# Token + +The tokenized payment source to fund a payment. + +## Structure + +`Token` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Required | The PayPal-generated ID for the token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `type` | [`TokenType`](../../doc/models/token-type.md) | Required | The tokenization method that generated the ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_-]+$` | + +## Example (as JSON) + +```json +{ + "id": "id6", + "type": "BILLING_AGREEMENT" +} +``` + diff --git a/doc/models/trustly-payment-object.md b/doc/models/trustly-payment-object.md new file mode 100644 index 0000000..308a541 --- /dev/null +++ b/doc/models/trustly-payment-object.md @@ -0,0 +1,29 @@ + +# Trustly Payment Object + +Information needed to pay using Trustly. + +## Structure + +`TrustlyPaymentObject` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | + +## Example (as JSON) + +```json +{ + "name": "name6", + "country_code": "country_code6", + "bic": "bic8", + "iban_last_chars": "iban_last_chars4" +} +``` + diff --git a/doc/models/trustly-payment-request.md b/doc/models/trustly-payment-request.md new file mode 100644 index 0000000..19e7f6f --- /dev/null +++ b/doc/models/trustly-payment-request.md @@ -0,0 +1,33 @@ + +# Trustly Payment Request + +Information needed to pay using Trustly. + +## Structure + +`TrustlyPaymentRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | +| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | +| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | + +## Example (as JSON) + +```json +{ + "name": "name2", + "country_code": "country_code2", + "experience_context": { + "brand_name": "brand_name2", + "locale": "locale6", + "shipping_preference": "NO_SHIPPING", + "return_url": "return_url4", + "cancel_url": "cancel_url6" + } +} +``` + diff --git a/doc/models/universal-product-code.md b/doc/models/universal-product-code.md new file mode 100644 index 0000000..e6063ab --- /dev/null +++ b/doc/models/universal-product-code.md @@ -0,0 +1,25 @@ + +# Universal Product Code + +The Universal Product Code of the item. + +## Structure + +`UniversalProductCode` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `type` | [`UPCType`](../../doc/models/upc-type.md) | Required | The Universal Product Code type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `5`, *Pattern*: `^[0-9A-Z_-]+$` | +| `code` | `String` | Required | The UPC product code of the item.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `17`, *Pattern*: `^[0-9]{0,17}$` | + +## Example (as JSON) + +```json +{ + "type": "UPC-E", + "code": "code2" +} +``` + diff --git a/doc/models/upc-type.md b/doc/models/upc-type.md new file mode 100644 index 0000000..720374a --- /dev/null +++ b/doc/models/upc-type.md @@ -0,0 +1,21 @@ + +# UPC Type + +The Universal Product Code type. + +## Enumeration + +`UPCType` + +## Fields + +| Name | +| --- | +| `UPCA` | +| `UPCB` | +| `UPCC` | +| `UPCD` | +| `UPCE` | +| `UPC2` | +| `UPC5` | + diff --git a/doc/models/vault-customer.md b/doc/models/vault-customer.md new file mode 100644 index 0000000..8ceb5de --- /dev/null +++ b/doc/models/vault-customer.md @@ -0,0 +1,23 @@ + +# Vault Customer + +The details about a customer in PayPal's system of record. + +## Structure + +`VaultCustomer` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | + +## Example (as JSON) + +```json +{ + "id": "id2" +} +``` + diff --git a/doc/models/vault-experience-context.md b/doc/models/vault-experience-context.md new file mode 100644 index 0000000..470c2dd --- /dev/null +++ b/doc/models/vault-experience-context.md @@ -0,0 +1,33 @@ + +# Vault Experience Context + +Customizes the Vault creation flow experience for your customers. + +## Structure + +`VaultExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | +| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | +| `return_url` | `String` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | +| `cancel_url` | `String` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | +| `shipping_preference` | `String` | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `'GET_FROM_FILE'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", + "brand_name": "brand_name0", + "locale": "locale4", + "return_url": "return_url2", + "cancel_url": "cancel_url4" +} +``` + diff --git a/doc/models/vault-instruction-base.md b/doc/models/vault-instruction-base.md new file mode 100644 index 0000000..6e88578 --- /dev/null +++ b/doc/models/vault-instruction-base.md @@ -0,0 +1,23 @@ + +# Vault Instruction Base + +Basic vault instruction specification that can be extended by specific payment sources that supports vaulting. + +## Structure + +`VaultInstructionBase` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Optional | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "store_in_vault": "ON_SUCCESS" +} +``` + diff --git a/doc/models/vault-instruction.md b/doc/models/vault-instruction.md new file mode 100644 index 0000000..e81335a --- /dev/null +++ b/doc/models/vault-instruction.md @@ -0,0 +1,23 @@ + +# Vault Instruction + +Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting. + +## Structure + +`VaultInstruction` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Required | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "store_in_vault": "ON_SUCCESS" +} +``` + diff --git a/doc/models/vault-pay-pal-wallet-request.md b/doc/models/vault-pay-pal-wallet-request.md new file mode 100644 index 0000000..db6d38f --- /dev/null +++ b/doc/models/vault-pay-pal-wallet-request.md @@ -0,0 +1,45 @@ + +# Vault Pay Pal Wallet Request + +A resource representing a request to vault PayPal Wallet. + +## Structure + +`VaultPayPalWalletRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | +| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | +| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `experience_context` | [`VaultExperienceContext`](../../doc/models/vault-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | + +## Example (as JSON) + +```json +{ + "permit_multiple_payment_tokens": false, + "description": "description0", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "usage_type": "usage_type0", + "customer_type": "customer_type6" +} +``` + diff --git a/doc/models/vault-response.md b/doc/models/vault-response.md new file mode 100644 index 0000000..6112f16 --- /dev/null +++ b/doc/models/vault-response.md @@ -0,0 +1,37 @@ + +# Vault Response + +The details about a saved payment source. + +## Structure + +`VaultResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | +| `status` | [`VaultStatus`](../../doc/models/vault-status.md) | Optional | The vault status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer` | [`VaultCustomer`](../../doc/models/vault-customer.md) | Optional | The details about a customer in PayPal's system of record. | +| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | + +## Example (as JSON) + +```json +{ + "id": "id2", + "status": "CREATED", + "customer": { + "id": "id0" + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] +} +``` + diff --git a/doc/models/vault-sepa-debit-response.md b/doc/models/vault-sepa-debit-response.md new file mode 100644 index 0000000..c69da85 --- /dev/null +++ b/doc/models/vault-sepa-debit-response.md @@ -0,0 +1,37 @@ + +# Vault SEPA Debit Response + +An API resource used in the response of securely storing a SEPA Debit. + +## Structure + +`VaultSEPADebitResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | +| `account_holder_name` | `Object` | Optional | - | +| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "iban_last_chars": "iban_last_chars8", + "account_holder_name": { + "key1": "val1", + "key2": "val2" + }, + "billing_address": { + "address_line_1": "address_line_12", + "address_line_2": "address_line_28", + "admin_area_2": "admin_area_28", + "admin_area_1": "admin_area_14", + "postal_code": "postal_code0", + "country_code": "country_code8" + } +} +``` + diff --git a/doc/models/vault-status.md b/doc/models/vault-status.md new file mode 100644 index 0000000..042bb3c --- /dev/null +++ b/doc/models/vault-status.md @@ -0,0 +1,17 @@ + +# Vault Status + +The vault status. + +## Enumeration + +`VaultStatus` + +## Fields + +| Name | +| --- | +| `VAULTED` | +| `CREATED` | +| `APPROVED` | + diff --git a/doc/models/vault-token-request.md b/doc/models/vault-token-request.md new file mode 100644 index 0000000..f152ad4 --- /dev/null +++ b/doc/models/vault-token-request.md @@ -0,0 +1,25 @@ + +# Vault Token Request + +The Tokenized Payment Source representing a Request to Vault a Token. + +## Structure + +`VaultTokenRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Required | The PayPal-generated ID for the token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Za-z_-]+$` | +| `type` | [`TokenType`](../../doc/models/token-type.md) | Required | The tokenization method that generated the ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_-]+$` | + +## Example (as JSON) + +```json +{ + "id": "id8", + "type": "BILLING_AGREEMENT" +} +``` + diff --git a/doc/models/vault-venmo-experience-context.md b/doc/models/vault-venmo-experience-context.md new file mode 100644 index 0000000..6e5bd37 --- /dev/null +++ b/doc/models/vault-venmo-experience-context.md @@ -0,0 +1,27 @@ + +# Vault Venmo Experience Context + +Customizes the Vault creation flow experience for your customers. + +## Structure + +`VaultVenmoExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | +| `shipping_preference` | `String` | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `'GET_FROM_FILE'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", + "brand_name": "brand_name0" +} +``` + diff --git a/doc/models/vault-venmo-request.md b/doc/models/vault-venmo-request.md new file mode 100644 index 0000000..3d5666a --- /dev/null +++ b/doc/models/vault-venmo-request.md @@ -0,0 +1,43 @@ + +# Vault Venmo Request + +## Structure + +`VaultVenmoRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | +| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | +| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `experience_context` | [`VaultVenmoExperienceContext`](../../doc/models/vault-venmo-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | + +## Example (as JSON) + +```json +{ + "permit_multiple_payment_tokens": false, + "description": "description0", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "usage_type": "usage_type0", + "customer_type": "customer_type4" +} +``` + diff --git a/doc/models/vaulted-digital-wallet-shipping-details.md b/doc/models/vaulted-digital-wallet-shipping-details.md new file mode 100644 index 0000000..d36f226 --- /dev/null +++ b/doc/models/vaulted-digital-wallet-shipping-details.md @@ -0,0 +1,36 @@ + +# Vaulted Digital Wallet Shipping Details + +The shipping details. + +## Structure + +`VaultedDigitalWalletShippingDetails` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | +| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | + +## Example (as JSON) + +```json +{ + "name": { + "full_name": "full_name6" + }, + "type": "PICKUP_IN_STORE", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } +} +``` + diff --git a/doc/models/vaulted-digital-wallet.md b/doc/models/vaulted-digital-wallet.md new file mode 100644 index 0000000..591bbe6 --- /dev/null +++ b/doc/models/vaulted-digital-wallet.md @@ -0,0 +1,44 @@ + +# Vaulted Digital Wallet + +Resource consolidating common request and response attributes for vaulting a Digital Wallet. + +## Structure + +`VaultedDigitalWallet` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | +| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | +| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "permit_multiple_payment_tokens": false, + "description": "description2", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "usage_type": "usage_type2", + "customer_type": "customer_type6" +} +``` + diff --git a/doc/models/venmo-payment-token-customer-type.md b/doc/models/venmo-payment-token-customer-type.md new file mode 100644 index 0000000..229a38c --- /dev/null +++ b/doc/models/venmo-payment-token-customer-type.md @@ -0,0 +1,16 @@ + +# Venmo Payment Token Customer Type + +The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. + +## Enumeration + +`VenmoPaymentTokenCustomerType` + +## Fields + +| Name | +| --- | +| `CONSUMER` | +| `BUSINESS` | + diff --git a/doc/models/venmo-payment-token-usage-pattern.md b/doc/models/venmo-payment-token-usage-pattern.md new file mode 100644 index 0000000..a6ab607 --- /dev/null +++ b/doc/models/venmo-payment-token-usage-pattern.md @@ -0,0 +1,20 @@ + +# Venmo Payment Token Usage Pattern + +Expected business/pricing model for the billing agreement. + +## Enumeration + +`VenmoPaymentTokenUsagePattern` + +## Fields + +| Name | +| --- | +| `IMMEDIATE` | +| `DEFERRED` | +| `RECURRING_PREPAID` | +| `RECURRING_POSTPAID` | +| `THRESHOLD_PREPAID` | +| `THRESHOLD_POSTPAID` | + diff --git a/doc/models/venmo-payment-token-usage-type.md b/doc/models/venmo-payment-token-usage-type.md new file mode 100644 index 0000000..6a67f04 --- /dev/null +++ b/doc/models/venmo-payment-token-usage-type.md @@ -0,0 +1,16 @@ + +# Venmo Payment Token Usage Type + +The usage type associated with the Venmo payment token. + +## Enumeration + +`VenmoPaymentTokenUsageType` + +## Fields + +| Name | +| --- | +| `MERCHANT` | +| `PLATFORM` | + diff --git a/doc/models/venmo-payment-token.md b/doc/models/venmo-payment-token.md new file mode 100644 index 0000000..9e50b1a --- /dev/null +++ b/doc/models/venmo-payment-token.md @@ -0,0 +1,48 @@ + +# Venmo Payment Token + +## Structure + +`VenmoPaymentToken` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | +| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | +| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `user_name` | `String` | Optional | The Venmo username, as chosen by the user.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[-a-zA-Z0-9_]*$` | + +## Example (as JSON) + +```json +{ + "permit_multiple_payment_tokens": false, + "description": "description4", + "shipping": { + "name": { + "full_name": "full_name6" + }, + "type": "SHIPPING", + "address": { + "address_line_1": "address_line_16", + "address_line_2": "address_line_26", + "admin_area_2": "admin_area_20", + "admin_area_1": "admin_area_12", + "postal_code": "postal_code8", + "country_code": "country_code6" + } + }, + "usage_type": "usage_type4", + "customer_type": "customer_type8" +} +``` + diff --git a/doc/models/venmo-wallet-additional-attributes.md b/doc/models/venmo-wallet-additional-attributes.md new file mode 100644 index 0000000..d586e47 --- /dev/null +++ b/doc/models/venmo-wallet-additional-attributes.md @@ -0,0 +1,35 @@ + +# Venmo Wallet Additional Attributes + +Additional attributes associated with the use of this Venmo Wallet. + +## Structure + +`VenmoWalletAdditionalAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `customer` | [`VenmoWalletCustomerInformation`](../../doc/models/venmo-wallet-customer-information.md) | Optional | The details about a customer in PayPal's system of record. | +| `vault` | [`VenmoWalletVaultAttributes`](../../doc/models/venmo-wallet-vault-attributes.md) | Optional | Resource consolidating common request and response attirbutes for vaulting Venmo Wallet. | + +## Example (as JSON) + +```json +{ + "customer": { + "id": "id0", + "email_address": "email_address2" + }, + "vault": { + "store_in_vault": "ON_SUCCESS", + "description": "description6", + "usage_pattern": "THRESHOLD_PREPAID", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "permit_multiple_payment_tokens": false + } +} +``` + diff --git a/doc/models/venmo-wallet-attributes-response.md b/doc/models/venmo-wallet-attributes-response.md new file mode 100644 index 0000000..cdcd9e3 --- /dev/null +++ b/doc/models/venmo-wallet-attributes-response.md @@ -0,0 +1,36 @@ + +# Venmo Wallet Attributes Response + +Additional attributes associated with the use of a Venmo Wallet. + +## Structure + +`VenmoWalletAttributesResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | + +## Example (as JSON) + +```json +{ + "vault": { + "id": "id6", + "status": "APPROVED", + "customer": { + "id": "id0" + }, + "links": [ + { + "href": "href6", + "rel": "rel0", + "method": "HEAD" + } + ] + } +} +``` + diff --git a/doc/models/venmo-wallet-customer-information.md b/doc/models/venmo-wallet-customer-information.md new file mode 100644 index 0000000..a643fee --- /dev/null +++ b/doc/models/venmo-wallet-customer-information.md @@ -0,0 +1,25 @@ + +# Venmo Wallet Customer Information + +The details about a customer in PayPal's system of record. + +## Structure + +`VenmoWalletCustomerInformation` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | + +## Example (as JSON) + +```json +{ + "id": "id4", + "email_address": "email_address2" +} +``` + diff --git a/doc/models/venmo-wallet-experience-context.md b/doc/models/venmo-wallet-experience-context.md new file mode 100644 index 0000000..3e3c55c --- /dev/null +++ b/doc/models/venmo-wallet-experience-context.md @@ -0,0 +1,25 @@ + +# Venmo Wallet Experience Context + +Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
+ +## Structure + +`VenmoWalletExperienceContext` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `brand_name` | `String` | Optional | The business name of the merchant. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | +| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | + +## Example (as JSON) + +```json +{ + "shipping_preference": "GET_FROM_FILE", + "brand_name": "brand_name6" +} +``` + diff --git a/doc/models/venmo-wallet-request.md b/doc/models/venmo-wallet-request.md new file mode 100644 index 0000000..dbe50d3 --- /dev/null +++ b/doc/models/venmo-wallet-request.md @@ -0,0 +1,45 @@ + +# Venmo Wallet Request + +Information needed to pay using Venmo. + +## Structure + +`VenmoWalletRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `experience_context` | [`VenmoWalletExperienceContext`](../../doc/models/venmo-wallet-experience-context.md) | Optional | Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
| +| `attributes` | [`VenmoWalletAdditionalAttributes`](../../doc/models/venmo-wallet-additional-attributes.md) | Optional | Additional attributes associated with the use of this Venmo Wallet. | + +## Example (as JSON) + +```json +{ + "vault_id": "vault_id2", + "email_address": "email_address2", + "experience_context": { + "brand_name": "brand_name2", + "shipping_preference": "NO_SHIPPING" + }, + "attributes": { + "customer": { + "id": "id0", + "email_address": "email_address2" + }, + "vault": { + "store_in_vault": "ON_SUCCESS", + "description": "description6", + "usage_pattern": "THRESHOLD_PREPAID", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "permit_multiple_payment_tokens": false + } + } +} +``` + diff --git a/doc/models/venmo-wallet-response.md b/doc/models/venmo-wallet-response.md new file mode 100644 index 0000000..2ae7e13 --- /dev/null +++ b/doc/models/venmo-wallet-response.md @@ -0,0 +1,38 @@ + +# Venmo Wallet Response + +Venmo wallet response. + +## Structure + +`VenmoWalletResponse` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | +| `account_id` | `String` | Optional | The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | +| `user_name` | `String` | Optional | The Venmo user name chosen by the user, also know as a Venmo handle.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[-a-zA-Z0-9_]*$` | +| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | +| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | +| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | +| `attributes` | [`VenmoWalletAttributesResponse`](../../doc/models/venmo-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a Venmo Wallet. | + +## Example (as JSON) + +```json +{ + "email_address": "email_address6", + "account_id": "account_id8", + "user_name": "user_name2", + "name": { + "given_name": "given_name2", + "surname": "surname8" + }, + "phone_number": { + "national_number": "national_number6" + } +} +``` + diff --git a/doc/models/venmo-wallet-vault-attributes.md b/doc/models/venmo-wallet-vault-attributes.md new file mode 100644 index 0000000..596467d --- /dev/null +++ b/doc/models/venmo-wallet-vault-attributes.md @@ -0,0 +1,33 @@ + +# Venmo Wallet Vault Attributes + +Resource consolidating common request and response attirbutes for vaulting Venmo Wallet. + +## Structure + +`VenmoWalletVaultAttributes` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Required | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `description` | `String` | Optional | The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^[a-zA-Z0-9_'\-., :;\!?"]*$` | +| `usage_pattern` | [`VenmoPaymentTokenUsagePattern`](../../doc/models/venmo-payment-token-usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30`, *Pattern*: `^[0-9A-Z_]+$` | +| `usage_type` | [`VenmoPaymentTokenUsageType`](../../doc/models/venmo-payment-token-usage-type.md) | Required | The usage type associated with the Venmo payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `customer_type` | [`VenmoPaymentTokenCustomerType`](../../doc/models/venmo-payment-token-customer-type.md) | Optional | The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Default**: `VenmoPaymentTokenCustomerType::CONSUMER`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | +| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account.
**Default**: `false` | + +## Example (as JSON) + +```json +{ + "store_in_vault": "ON_SUCCESS", + "usage_type": "MERCHANT", + "customer_type": "CONSUMER", + "permit_multiple_payment_tokens": false, + "description": "description6", + "usage_pattern": "RECURRING_PREPAID" +} +``` + diff --git a/doc/request-logging-configuration.md b/doc/request-logging-configuration.md new file mode 100644 index 0000000..c8f1ae5 --- /dev/null +++ b/doc/request-logging-configuration.md @@ -0,0 +1,16 @@ + +# RequestLoggingConfiguration + +Represents the logging configuration for API request. + +## Parameters + +| Name | Type | Tag | Description | +| --- | --- | --- | --- | +| log_body | Boolean | optional | Toggles the logging of the request body. **Default : `false`** | +| log_headers | Boolean | optional | Toggles the logging of the request headers. **Default : `false`** | +| headers_to_include | Array | optional | Includes only specified request headers in the log output. **Default : `[]`** | +| headers_to_exclude | Array | optional | Excludes specified request headers from the log output. **Default : `[]`** | +| headers_to_unmask | Array | optional | Logs specified request headers without masking, revealing their actual values. **Default : `[]`** | +| include_query_in_path | Boolean | optional | Toggles the inclusion of query parameters in the logged request path. **Default : `false`** | + diff --git a/doc/response-logging-configuration.md b/doc/response-logging-configuration.md new file mode 100644 index 0000000..1ae9ff0 --- /dev/null +++ b/doc/response-logging-configuration.md @@ -0,0 +1,15 @@ + +# ResponseLoggingConfiguration + +Represents the logging configuration for API response. + +## Parameters + +| Name | Type | Tag | Description | +| --- | --- | --- | --- | +| log_body | Boolean | optional | Toggles the logging of the response body. **Default : `false`** | +| log_headers | Boolean | optional | Toggles the logging of the response headers. **Default : `false`** | +| headers_to_include | Array | optional | Includes only specified response headers in the log output. **Default : `[]`** | +| headers_to_exclude | Array | optional | Excludes specified request headers from the log output. **Default : `[]`** | +| headers_to_unmask | Array | optional | Logs specified request headers without masking, revealing their actual values. **Default : `[]`** | + diff --git a/doc/utility-classes.md b/doc/utility-classes.md new file mode 100644 index 0000000..747b2d9 --- /dev/null +++ b/doc/utility-classes.md @@ -0,0 +1,35 @@ + +# Utility Classes Documentation + +## ApiHelper Class + +API utility class. + +## Methods + +| Name | Return Type | Description | +| --- | --- | --- | +| json_deserialize | Hash | Deserializes a JSON string to a Ruby Hash. | +| rfc3339 | DateTime | Safely converts a string into an RFC3339 DateTime object. | + +## DateTimeHelper Class + +DateTime utility class. + +## Methods + +| Name | Return Type | Description | +| --- | --- | --- | +| from_rfc3339 | DateTime | Safely converts a string into an RFC3339 DateTime object. | +| from_rfc1123 | DateTime | Safely converts a string into an RFC1123 DateTime object. | +| from_unix | DateTime | Safely converts a string into an Unix DateTime object. | +| to_rfc3339 | DateTime_String | Safely converts a RFC3339 DateTime object into a DateTime string. | +| to_rfc1123 | DateTime_String | Safely converts a RFC1123 DateTime object into a DateTime string. | +| to_unix | DateTime_String | Safely converts a Unix DateTime object into a DateTime string. | +| to_rfc3339_map | Map_Of_DateTime_String | Safely converts a map of RFC3339 DateTime object into a map of RFC3339 formatted DateTime string. | +| to_rfc3339_array | Array_Of_DateTime_String | Safely converts an array of RFC3339 DateTime object into an array of RFC3339 formatted DateTime string. | +| to_rfc1123_map | Map_Of_DateTime_String | Safely converts a map of RFC1123 DateTime object into map of RFC1123 formatted DateTime string. | +| to_rfc1123_array | Array_Of_DateTime_String | Safely converts an array of RFC1123 DateTime object into an array of RFC1123 formatted DateTime string. | +| to_unix_map | Map_Of_DateTime_String | Safely converts a map of Unix DateTime object into a map of Unix formatted DateTime string. | +| to_unix_array | Array_Of_DateTime_String | Safely converts an array of Unix DateTime object into an array of Unix formatted DateTime string. | + diff --git a/lib/pay_pal_restap_is.rb b/lib/pay_pal_restap_is.rb new file mode 100644 index 0000000..f744eee --- /dev/null +++ b/lib/pay_pal_restap_is.rb @@ -0,0 +1,306 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +require 'date' +require 'json' + +require 'apimatic_core_interfaces' +require 'apimatic_core' +require 'apimatic_faraday_client_adapter' + +require_relative 'pay_pal_restap_is/api_helper' +require_relative 'pay_pal_restap_is/client' + +# Utilities +require_relative 'pay_pal_restap_is/utilities/file_wrapper' +require_relative 'pay_pal_restap_is/utilities/date_time_helper' + +# Http +require_relative 'pay_pal_restap_is/http/api_response' +require_relative 'pay_pal_restap_is/http/http_call_back' +require_relative 'pay_pal_restap_is/http/http_method_enum' +require_relative 'pay_pal_restap_is/http/http_request' +require_relative 'pay_pal_restap_is/http/http_response' + +# Logger +require_relative 'pay_pal_restap_is/logging/configuration/' \ + 'api_logging_configuration' +require_relative 'pay_pal_restap_is/logging/sdk_logger' +require_relative 'pay_pal_restap_is/http/auth/o_auth2' + +# Models +require_relative 'pay_pal_restap_is/models/base_model' +require_relative 'pay_pal_restap_is/models/activity_timestamps' +require_relative 'pay_pal_restap_is/models/amount_breakdown' +require_relative 'pay_pal_restap_is/models/amount_with_breakdown' +require_relative 'pay_pal_restap_is/models/apple_pay_payment_object' +require_relative 'pay_pal_restap_is/models/apple_pay_attributes' +require_relative 'pay_pal_restap_is/models/apple_pay_attributes_response' +require_relative 'pay_pal_restap_is/models/apple_pay_card_response' +require_relative 'pay_pal_restap_is/models/apple_pay_decrypted_token_data' +require_relative 'pay_pal_restap_is/models/apple_pay_payment_data' +require_relative 'pay_pal_restap_is/models/apple_pay_request' +require_relative 'pay_pal_restap_is/models/authentication_response' +require_relative 'pay_pal_restap_is/models/authorization' +require_relative 'pay_pal_restap_is/models/link_description' +require_relative 'pay_pal_restap_is/models/authorization_status_with_details' +require_relative 'pay_pal_restap_is/models/authorization_status_details' +require_relative 'pay_pal_restap_is/models/authorization_with_additional_data' +require_relative 'pay_pal_restap_is/models/bancontact_payment_object' +require_relative 'pay_pal_restap_is/models/bancontact_payment_request' +require_relative 'pay_pal_restap_is/models/bin_details' +require_relative 'pay_pal_restap_is/models/blik_payment_object' +require_relative 'pay_pal_restap_is/models/blik_experience_context' +require_relative 'pay_pal_restap_is/models/blik_one_click_payment_request' +require_relative 'pay_pal_restap_is/models/blik_one_click_payment_object' +require_relative 'pay_pal_restap_is/models/blik_payment_request' +require_relative 'pay_pal_restap_is/models/blik_level0_payment_object' +require_relative 'pay_pal_restap_is/models/capture' +require_relative 'pay_pal_restap_is/models/capture_status_with_details' +require_relative 'pay_pal_restap_is/models/capture_status_details' +require_relative 'pay_pal_restap_is/models/card_attributes' +require_relative 'pay_pal_restap_is/models/card_attributes_response' +require_relative 'pay_pal_restap_is/models/card_experience_context' +require_relative 'pay_pal_restap_is/models/card_from_request' +require_relative 'pay_pal_restap_is/models/card_request' +require_relative 'pay_pal_restap_is/models/card_response' +require_relative 'pay_pal_restap_is/models/card_stored_credential' +require_relative 'pay_pal_restap_is/models/card_supplementary_data' +require_relative 'pay_pal_restap_is/models/card_verification' +require_relative 'pay_pal_restap_is/models/cobranded_card' +require_relative 'pay_pal_restap_is/models/confirm_order_request' +require_relative 'pay_pal_restap_is/models/customer_information' +require_relative 'pay_pal_restap_is/models/platform_fee' +require_relative 'pay_pal_restap_is/models/eps_payment_object' +require_relative 'pay_pal_restap_is/models/eps_payment_request' +require_relative 'pay_pal_restap_is/models/error_details' +require_relative 'pay_pal_restap_is/models/exchange_rate' +require_relative 'pay_pal_restap_is/models/experience_context' +require_relative 'pay_pal_restap_is/models/giropay_payment_object' +require_relative 'pay_pal_restap_is/models/giropay_payment_request' +require_relative 'pay_pal_restap_is/models/google_pay_wallet_response' +require_relative 'pay_pal_restap_is/models/google_pay_card_response' +require_relative 'pay_pal_restap_is/models/google_pay_decrypted_token_data' +require_relative 'pay_pal_restap_is/models/google_pay_request' +require_relative 'pay_pal_restap_is/models/ideal_payment_object' +require_relative 'pay_pal_restap_is/models/ideal_payment_request' +require_relative 'pay_pal_restap_is/models/item' +require_relative 'pay_pal_restap_is/models/level2_card_processing_data' +require_relative 'pay_pal_restap_is/models/level3_card_processing_data' +require_relative 'pay_pal_restap_is/models/line_item' +require_relative 'pay_pal_restap_is/models/money' +require_relative 'pay_pal_restap_is/models/my_bank_payment_object' +require_relative 'pay_pal_restap_is/models/my_bank_payment_request' +require_relative 'pay_pal_restap_is/models/net_amount_breakdown_item' +require_relative 'pay_pal_restap_is/models/network_token' +require_relative 'pay_pal_restap_is/models/network_transaction_reference' +require_relative 'pay_pal_restap_is/models/order' +require_relative 'pay_pal_restap_is/models/order_application_context' +require_relative 'pay_pal_restap_is/models/order_authorize_request' +require_relative 'pay_pal_restap_is/models/order_authorize_response' +require_relative 'pay_pal_restap_is/models/order_capture_request' +require_relative 'pay_pal_restap_is/models/order_confirm_application_context' +require_relative 'pay_pal_restap_is/models/order_request' +require_relative 'pay_pal_restap_is/models/order_tracker_request' +require_relative 'pay_pal_restap_is/models/p24_payment_object' +require_relative 'pay_pal_restap_is/models/p24_payment_request' +require_relative 'pay_pal_restap_is/models/patch' +require_relative 'pay_pal_restap_is/models/payee' +require_relative 'pay_pal_restap_is/models/payee_base' +require_relative 'pay_pal_restap_is/models/payer' +require_relative 'pay_pal_restap_is/models/payer_base' +require_relative 'pay_pal_restap_is/models/payment_collection' +require_relative 'pay_pal_restap_is/models/payment_instruction' +require_relative 'pay_pal_restap_is/models/payment_method_preference' +require_relative 'pay_pal_restap_is/models/payment_source' +require_relative 'pay_pal_restap_is/models/payment_source_response' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_attributes' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_attributes_response' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_customer' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_experience_context' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_response' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_response' +require_relative 'pay_pal_restap_is/models/phone_number' +require_relative 'pay_pal_restap_is/models/phone_with_type' +require_relative 'pay_pal_restap_is/models/processor_response' +require_relative 'pay_pal_restap_is/models/purchase_unit' +require_relative 'pay_pal_restap_is/models/purchase_unit_request' +require_relative 'pay_pal_restap_is/models/refund' +require_relative 'pay_pal_restap_is/models/refund_status_with_details' +require_relative 'pay_pal_restap_is/models/refund_status_details' +require_relative 'pay_pal_restap_is/models/seller_payable_breakdown' +require_relative 'pay_pal_restap_is/models/seller_protection' +require_relative 'pay_pal_restap_is/models/seller_receivable_breakdown' +require_relative 'pay_pal_restap_is/models/shipping_details' +require_relative 'pay_pal_restap_is/models/shipping_option' +require_relative 'pay_pal_restap_is/models/shipping_with_tracking_details' +require_relative 'pay_pal_restap_is/models/sofort_payment_object' +require_relative 'pay_pal_restap_is/models/sofort_payment_request' +require_relative 'pay_pal_restap_is/models/stored_payment_source' +require_relative 'pay_pal_restap_is/models/supplementary_data' +require_relative 'pay_pal_restap_is/models/tax_info' +require_relative 'pay_pal_restap_is/models/' \ + 'three_d_secure_authentication_response' +require_relative 'pay_pal_restap_is/models/token' +require_relative 'pay_pal_restap_is/models/order_tracker_response' +require_relative 'pay_pal_restap_is/models/order_tracker_item' +require_relative 'pay_pal_restap_is/models/trustly_payment_object' +require_relative 'pay_pal_restap_is/models/trustly_payment_request' +require_relative 'pay_pal_restap_is/models/universal_product_code' +require_relative 'pay_pal_restap_is/models/vault_instruction' +require_relative 'pay_pal_restap_is/models/vault_instruction_base' +require_relative 'pay_pal_restap_is/models/vault_response' +require_relative 'pay_pal_restap_is/models/venmo_wallet_vault_attributes' +require_relative 'pay_pal_restap_is/models/venmo_wallet_additional_attributes' +require_relative 'pay_pal_restap_is/models/venmo_wallet_attributes_response' +require_relative 'pay_pal_restap_is/models/venmo_wallet_experience_context' +require_relative 'pay_pal_restap_is/models/venmo_wallet_request' +require_relative 'pay_pal_restap_is/models/venmo_wallet_response' +require_relative 'pay_pal_restap_is/models/address' +require_relative 'pay_pal_restap_is/models/apple_pay_tokenized_card' +require_relative 'pay_pal_restap_is/models/google_pay_card_attributes' +require_relative 'pay_pal_restap_is/models/name' +require_relative 'pay_pal_restap_is/models/' \ + 'order_authorize_request_payment_source' +require_relative 'pay_pal_restap_is/models/' \ + 'order_authorize_response_payment_source' +require_relative 'pay_pal_restap_is/models/order_capture_request_payment_source' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_customer_request' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_instruction' +require_relative 'pay_pal_restap_is/models/phone_number_with_country_code' +require_relative 'pay_pal_restap_is/models/shipping_name' +require_relative 'pay_pal_restap_is/models/vault_customer' +require_relative 'pay_pal_restap_is/models/venmo_wallet_customer_information' +require_relative 'pay_pal_restap_is/models/payment_authorization' +require_relative 'pay_pal_restap_is/models/captured_payment' +require_relative 'pay_pal_restap_is/models/capture_request' +require_relative 'pay_pal_restap_is/models/refund_platform_fee' +require_relative 'pay_pal_restap_is/models/refund_payment_instruction' +require_relative 'pay_pal_restap_is/models/reauthorize_request' +require_relative 'pay_pal_restap_is/models/refund_request' +require_relative 'pay_pal_restap_is/models/related_identifiers' +require_relative 'pay_pal_restap_is/models/payment_supplementary_data' +require_relative 'pay_pal_restap_is/models/supplementary_purchase_data' +require_relative 'pay_pal_restap_is/models/capture_payment_instruction' +require_relative 'pay_pal_restap_is/models/ach_debit_response' +require_relative 'pay_pal_restap_is/models/address_details' +require_relative 'pay_pal_restap_is/models/apple_pay_payment_token' +require_relative 'pay_pal_restap_is/models/bank_payment_token' +require_relative 'pay_pal_restap_is/models/card_payment_token' +require_relative 'pay_pal_restap_is/models/card_response_entity' +require_relative 'pay_pal_restap_is/models/card_verification_details' +require_relative 'pay_pal_restap_is/models/customer_request' +require_relative 'pay_pal_restap_is/models/' \ + 'customer_vault_payment_tokens_response' +require_relative 'pay_pal_restap_is/models/payment_token_request_payment_source' +require_relative 'pay_pal_restap_is/models/vault_experience_context' +require_relative 'pay_pal_restap_is/models/network_transaction_reference_entity' +require_relative 'pay_pal_restap_is/models/' \ + 'payment_token_response_payment_source' +require_relative 'pay_pal_restap_is/models/payment_token_request' +require_relative 'pay_pal_restap_is/models/payment_token_response' +require_relative 'pay_pal_restap_is/models/vault_pay_pal_wallet_request' +require_relative 'pay_pal_restap_is/models/pay_pal_payment_token' +require_relative 'pay_pal_restap_is/models/phone' +require_relative 'pay_pal_restap_is/models/sepa_debit_response' +require_relative 'pay_pal_restap_is/models/setup_token_request' +require_relative 'pay_pal_restap_is/models/setup_token_response' +require_relative 'pay_pal_restap_is/models/vault_token_request' +require_relative 'pay_pal_restap_is/models/vault_sepa_debit_response' +require_relative 'pay_pal_restap_is/models/vault_venmo_request' +require_relative 'pay_pal_restap_is/models/venmo_payment_token' +require_relative 'pay_pal_restap_is/models/vaulted_digital_wallet' +require_relative 'pay_pal_restap_is/models/apple_pay_card' +require_relative 'pay_pal_restap_is/models/card_verification_processor_response' +require_relative 'pay_pal_restap_is/models/payment_token_request_card' +require_relative 'pay_pal_restap_is/models/sepa_debit_authorization_details' +require_relative 'pay_pal_restap_is/models/setup_token_card_experience_context' +require_relative 'pay_pal_restap_is/models/setup_token_request_card' +require_relative 'pay_pal_restap_is/models/setup_token_request_payment_source' +require_relative 'pay_pal_restap_is/models/setup_token_response_card' +require_relative 'pay_pal_restap_is/models/setup_token_response_payment_source' +require_relative 'pay_pal_restap_is/models/vault_venmo_experience_context' +require_relative 'pay_pal_restap_is/models/' \ + 'vaulted_digital_wallet_shipping_details' +require_relative 'pay_pal_restap_is/models/o_auth_token' +require_relative 'pay_pal_restap_is/models/card_brand' +require_relative 'pay_pal_restap_is/models/card_type' +require_relative 'pay_pal_restap_is/models/checkout_payment_intent' +require_relative 'pay_pal_restap_is/models/disbursement_mode' +require_relative 'pay_pal_restap_is/models/dispute_category' +require_relative 'pay_pal_restap_is/models/eci_flag' +require_relative 'pay_pal_restap_is/models/enrollment_status' +require_relative 'pay_pal_restap_is/models/liability_shift_indicator' +require_relative 'pay_pal_restap_is/models/order_status' +require_relative 'pay_pal_restap_is/models/pa_res_status' +require_relative 'pay_pal_restap_is/models/payee_payment_method_preference' +require_relative 'pay_pal_restap_is/models/payment_initiator' +require_relative 'pay_pal_restap_is/models/phone_type' +require_relative 'pay_pal_restap_is/models/processing_instruction' +require_relative 'pay_pal_restap_is/models/shipment_carrier' +require_relative 'pay_pal_restap_is/models/shipping_type' +require_relative 'pay_pal_restap_is/models/store_in_vault_instruction' +require_relative 'pay_pal_restap_is/models/stored_payment_source_payment_type' +require_relative 'pay_pal_restap_is/models/stored_payment_source_usage_type' +require_relative 'pay_pal_restap_is/models/order_tracker_status' +require_relative 'pay_pal_restap_is/models/apple_pay_payment_data_type' +require_relative 'pay_pal_restap_is/models/authorization_incomplete_reason' +require_relative 'pay_pal_restap_is/models/authorization_status' +require_relative 'pay_pal_restap_is/models/avs_code' +require_relative 'pay_pal_restap_is/models/capture_incomplete_reason' +require_relative 'pay_pal_restap_is/models/capture_status' +require_relative 'pay_pal_restap_is/models/card_verification_method' +require_relative 'pay_pal_restap_is/models/cvv_code' +require_relative 'pay_pal_restap_is/models/fullfillment_type' +require_relative 'pay_pal_restap_is/models/google_pay_authentication_method' +require_relative 'pay_pal_restap_is/models/google_pay_payment_method' +require_relative 'pay_pal_restap_is/models/item_category' +require_relative 'pay_pal_restap_is/models/link_http_method' +require_relative 'pay_pal_restap_is/models/' \ + 'order_application_context_landing_page' +require_relative 'pay_pal_restap_is/models/' \ + 'order_application_context_shipping_preference' +require_relative 'pay_pal_restap_is/models/' \ + 'order_application_context_user_action' +require_relative 'pay_pal_restap_is/models/patch_op' +require_relative 'pay_pal_restap_is/models/payment_advice_code' +require_relative 'pay_pal_restap_is/models/pay_pal_experience_landing_page' +require_relative 'pay_pal_restap_is/models/pay_pal_experience_user_action' +require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_customer_type' +require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern' +require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_usage_type' +require_relative 'pay_pal_restap_is/models/' \ + 'pay_pal_wallet_account_verification_status' +require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_status' +require_relative 'pay_pal_restap_is/models/processor_response_code' +require_relative 'pay_pal_restap_is/models/refund_incomplete_reason' +require_relative 'pay_pal_restap_is/models/refund_status' +require_relative 'pay_pal_restap_is/models/seller_protection_status' +require_relative 'pay_pal_restap_is/models/shipping_preference' +require_relative 'pay_pal_restap_is/models/standard_entry_class_code' +require_relative 'pay_pal_restap_is/models/tax_id_type' +require_relative 'pay_pal_restap_is/models/token_type' +require_relative 'pay_pal_restap_is/models/upc_type' +require_relative 'pay_pal_restap_is/models/vault_status' +require_relative 'pay_pal_restap_is/models/venmo_payment_token_customer_type' +require_relative 'pay_pal_restap_is/models/venmo_payment_token_usage_pattern' +require_relative 'pay_pal_restap_is/models/venmo_payment_token_usage_type' +require_relative 'pay_pal_restap_is/models/instrument_authorization_status' +require_relative 'pay_pal_restap_is/models/o_auth_provider_error' + +# Exceptions +require_relative 'pay_pal_restap_is/exceptions/api_exception' +require_relative 'pay_pal_restap_is/exceptions/error_exception' +require_relative 'pay_pal_restap_is/exceptions/o_auth_provider_exception' + +require_relative 'pay_pal_restap_is/configuration' + +# Controllers +require_relative 'pay_pal_restap_is/controllers/base_controller' +require_relative 'pay_pal_restap_is/controllers/orders_controller' +require_relative 'pay_pal_restap_is/controllers/payments_controller' +require_relative 'pay_pal_restap_is/controllers/vault_controller' +require_relative 'pay_pal_restap_is/controllers/o_auth_authorization_controller' diff --git a/lib/pay_pal_restap_is/api_helper.rb b/lib/pay_pal_restap_is/api_helper.rb new file mode 100644 index 0000000..bc3ab46 --- /dev/null +++ b/lib/pay_pal_restap_is/api_helper.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # API utility class + class APIHelper < CoreLibrary::ApiHelper + end +end diff --git a/lib/pay_pal_restap_is/client.rb b/lib/pay_pal_restap_is/client.rb new file mode 100644 index 0000000..944f5b6 --- /dev/null +++ b/lib/pay_pal_restap_is/client.rb @@ -0,0 +1,89 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # pay_pal_restap_is client class. + class Client + include CoreLibrary + attr_reader :config, :auth_managers + + # Returns the configured authentication Oauth2 instance. + def oauth2 + @auth_managers['Oauth2'] + end + + # Access to orders controller. + # @return [OrdersController] Returns the controller instance. + def orders + @orders ||= OrdersController.new @global_configuration + end + + # Access to payments controller. + # @return [PaymentsController] Returns the controller instance. + def payments + @payments ||= PaymentsController.new @global_configuration + end + + # Access to vault controller. + # @return [VaultController] Returns the controller instance. + def vault + @vault ||= VaultController.new @global_configuration + end + + # Access to o_auth_authorization controller. + # @return [OAuthAuthorizationController] Returns the controller instance. + def o_auth_authorization + @o_auth_authorization ||= OAuthAuthorizationController.new @global_configuration + end + + def initialize( + connection: nil, adapter: :net_http_persistent, timeout: 60, + max_retries: 0, retry_interval: 1, backoff_factor: 2, + retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], + retry_methods: %i[get put], http_callback: nil, + logging_configuration: nil, environment: Environment::SANDBOX, + o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, + client_credentials_auth_credentials: nil, config: nil + ) + @config = if config.nil? + Configuration.new( + connection: connection, adapter: adapter, timeout: timeout, + max_retries: max_retries, retry_interval: retry_interval, + backoff_factor: backoff_factor, + retry_statuses: retry_statuses, + retry_methods: retry_methods, http_callback: http_callback, + logging_configuration: logging_configuration, + environment: environment, + o_auth_client_id: o_auth_client_id, + o_auth_client_secret: o_auth_client_secret, + o_auth_token: o_auth_token, + client_credentials_auth_credentials: client_credentials_auth_credentials + ) + else + config + end + user_agent_params = BaseController.user_agent_parameters + + @global_configuration = GlobalConfiguration.new(client_configuration: @config) + .base_uri_executor(@config.method(:get_base_uri)) + .global_errors(BaseController::GLOBAL_ERRORS) + .user_agent(BaseController.user_agent, + agent_parameters: user_agent_params) + + initialize_auth_managers(@global_configuration) + @global_configuration = @global_configuration.auth_managers(@auth_managers) + end + + # Initializes the auth managers hash used for authenticating API calls. + # @param [GlobalConfiguration] global_config The global configuration of the SDK) + def initialize_auth_managers(global_config) + @auth_managers = {} + http_client_config = global_config.client_configuration + %w[Oauth2].each { |auth| @auth_managers[auth] = nil } + @auth_managers['Oauth2'] = OAuth2.new(http_client_config.client_credentials_auth_credentials, + global_config) + end + end +end diff --git a/lib/pay_pal_restap_is/configuration.rb b/lib/pay_pal_restap_is/configuration.rb new file mode 100644 index 0000000..bffee3d --- /dev/null +++ b/lib/pay_pal_restap_is/configuration.rb @@ -0,0 +1,163 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # An enum for SDK environments. + class Environment + # PRODUCTION: PayPal Live Environment + # SANDBOX: PayPal Sandbox Environment + ENVIRONMENT = [ + PRODUCTION = 'Production'.freeze, + SANDBOX = 'Sandbox'.freeze + ].freeze + end + + # An enum for API servers. + class Server + SERVER = [ + DEFAULT = 'default'.freeze + ].freeze + end + + # All configuration including auth info and base URI for the API access + # are configured in this class. + class Configuration < CoreLibrary::HttpClientConfiguration + def o_auth_client_id + @client_credentials_auth_credentials.o_auth_client_id + end + + def o_auth_client_secret + @client_credentials_auth_credentials.o_auth_client_secret + end + + def o_auth_token + @client_credentials_auth_credentials.o_auth_token + end + + # The attribute readers for properties. + attr_reader :environment, :client_credentials_auth_credentials + + class << self + attr_reader :environments + end + + def initialize( + connection: nil, adapter: :net_http_persistent, timeout: 60, + max_retries: 0, retry_interval: 1, backoff_factor: 2, + retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], + retry_methods: %i[get put], http_callback: nil, + logging_configuration: nil, environment: Environment::SANDBOX, + o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, + client_credentials_auth_credentials: nil + ) + + super connection: connection, adapter: adapter, timeout: timeout, + max_retries: max_retries, retry_interval: retry_interval, + backoff_factor: backoff_factor, retry_statuses: retry_statuses, + retry_methods: retry_methods, http_callback: http_callback, + logging_configuration: logging_configuration + + # Current API environment + @environment = String(environment) + + # OAuth 2 Client ID + @o_auth_client_id = o_auth_client_id + + # OAuth 2 Client Secret + @o_auth_client_secret = o_auth_client_secret + + # Object for storing information about the OAuth token + @o_auth_token = if o_auth_token.is_a? OAuthToken + OAuthToken.from_hash o_auth_token.to_hash + else + o_auth_token + end + + # Initializing OAuth 2 Client Credentials Grant credentials with the provided auth parameters + @client_credentials_auth_credentials = create_auth_credentials_object( + o_auth_client_id, o_auth_client_secret, o_auth_token, + client_credentials_auth_credentials + ) + + # The Http Client to use for making requests. + set_http_client CoreLibrary::FaradayClient.new(self) + end + + def clone_with(connection: nil, adapter: nil, timeout: nil, + max_retries: nil, retry_interval: nil, backoff_factor: nil, + retry_statuses: nil, retry_methods: nil, http_callback: nil, + logging_configuration: nil, environment: nil, + o_auth_client_id: nil, o_auth_client_secret: nil, + o_auth_token: nil, client_credentials_auth_credentials: nil) + connection ||= self.connection + adapter ||= self.adapter + timeout ||= self.timeout + max_retries ||= self.max_retries + retry_interval ||= self.retry_interval + backoff_factor ||= self.backoff_factor + retry_statuses ||= self.retry_statuses + retry_methods ||= self.retry_methods + http_callback ||= self.http_callback + logging_configuration ||= self.logging_configuration + environment ||= self.environment + client_credentials_auth_credentials = create_auth_credentials_object( + o_auth_client_id, o_auth_client_secret, o_auth_token, + client_credentials_auth_credentials || self.client_credentials_auth_credentials + ) + + Configuration.new( + connection: connection, adapter: adapter, timeout: timeout, + max_retries: max_retries, retry_interval: retry_interval, + backoff_factor: backoff_factor, retry_statuses: retry_statuses, + retry_methods: retry_methods, http_callback: http_callback, + logging_configuration: logging_configuration, environment: environment, + client_credentials_auth_credentials: client_credentials_auth_credentials + ) + end + + def create_auth_credentials_object(o_auth_client_id, o_auth_client_secret, + o_auth_token, + client_credentials_auth_credentials) + return client_credentials_auth_credentials if o_auth_client_id.nil? && + o_auth_client_secret.nil? && + o_auth_token.nil? + + warn('The \'o_auth_client_id\', \'o_auth_client_secret\', \'o_auth_token'\ + '\' params are deprecated. Use \'client_credentials_auth_credential'\ + 's\' param instead.') + + unless client_credentials_auth_credentials.nil? + return client_credentials_auth_credentials.clone_with( + o_auth_client_id: o_auth_client_id, + o_auth_client_secret: o_auth_client_secret, + o_auth_token: o_auth_token + ) + end + + ClientCredentialsAuthCredentials.new( + o_auth_client_id: o_auth_client_id, + o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token + ) + end + + # All the environments the SDK can run in. + ENVIRONMENTS = { + Environment::PRODUCTION => { + Server::DEFAULT => 'https://api-m.paypal.com' + }, + Environment::SANDBOX => { + Server::DEFAULT => 'https://api-m.sandbox.paypal.com' + } + }.freeze + + # Generates the appropriate base URI for the environment and the server. + # @param [Configuration::Server] server The server enum for which the base URI is + # required. + # @return [String] The base URI. + def get_base_uri(server = Server::DEFAULT) + ENVIRONMENTS[environment][server].clone + end + end +end diff --git a/lib/pay_pal_restap_is/controllers/base_controller.rb b/lib/pay_pal_restap_is/controllers/base_controller.rb new file mode 100644 index 0000000..66a4b91 --- /dev/null +++ b/lib/pay_pal_restap_is/controllers/base_controller.rb @@ -0,0 +1,71 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # BaseController. + class BaseController + include CoreLibrary + attr_accessor :config, :http_call_back + + def self.user_agent + 'PayPal REST API Ruby SDK, Version: 2.16.0, on OS {os-info}' + end + + def self.user_agent_parameters + { + '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false } + } + end + + GLOBAL_ERRORS = { + 'default' => ErrorCase.new + .error_message('HTTP response not OK.') + .exception_type(APIException) + }.freeze + + # Initialization constructor. + # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration. + def initialize(global_configuration) + @global_configuration = global_configuration + @config = @global_configuration.client_configuration + @http_call_back = @config.http_callback + @api_call = ApiCall.new(@global_configuration) + end + + # Creates a new builder for the Api Call instance. + # @return [ApiCall] The instance of ApiCall. + def new_api_call_builder + @api_call.new_builder + end + + # Creates a new instance of the request builder. + # @param [String] http_method The HTTP method to use in the request. + # @param [String] path The endpoint path to use in the request. + # @param [String] server The server to extract the base uri for the request. + # @return [RequestBuilder] The instance of RequestBuilder. + def new_request_builder(http_method, path, server) + RequestBuilder.new + .http_method(http_method) + .path(path) + .server(server) + end + + # Creates a new instance of the response handler. + # @return [ResponseHandler] The instance of ResponseHandler. + def new_response_handler + ResponseHandler.new + end + + # Creates a new instance of the parameter. + # @param [String|optional] key The key of the parameter. + # @param [Object] value The value of the parameter. + # @return [Parameter] The instance of Parameter. + def new_parameter(value, key: nil) + Parameter.new + .key(key) + .value(value) + end + end +end diff --git a/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb b/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb new file mode 100644 index 0000000..8eca236 --- /dev/null +++ b/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb @@ -0,0 +1,42 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OAuthAuthorizationController + class OAuthAuthorizationController < BaseController + # Create a new OAuth 2 token. + # @param [String] authorization Required parameter: Authorization header in + # Basic auth format + # @param [String] scope Optional parameter: Requested scopes as a + # space-delimited list. + # @param [Hash] _field_parameters Additional optional form parameters are + # supported by this endpoint. + # @return [ApiResponse] the complete http response with raw body and status code. + def request_token(options = {}, + _field_parameters: nil) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v1/oauth2/token', + Server::DEFAULT) + .form_param(new_parameter('client_credentials', key: 'grant_type')) + .header_param(new_parameter(options['authorization'], key: 'Authorization')) + .form_param(new_parameter(options['scope'], key: 'scope')) + .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) + .header_param(new_parameter('application/json', key: 'accept')) + .additional_form_params(_field_parameters)) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(OAuthToken.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'OAuth 2 provider returned an error.', + OAuthProviderException) + .local_error('401', + 'OAuth 2 provider says client authentication failed.', + OAuthProviderException)) + .execute + end + end +end diff --git a/lib/pay_pal_restap_is/controllers/orders_controller.rb b/lib/pay_pal_restap_is/controllers/orders_controller.rb new file mode 100644 index 0000000..32fc497 --- /dev/null +++ b/lib/pay_pal_restap_is/controllers/orders_controller.rb @@ -0,0 +1,517 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OrdersController + class OrdersController < BaseController + # Creates an order. Merchants and partners can add Level 2 and 3 data to + # payments to reduce risk and payment processing costs. For more information + # about processing payments, see che + # ckout or multiparty checkout.
Note: For + # error handling and troubleshooting, see Orders v2 + # errors.
+ # @param [OrderRequest] body Required parameter: Example: + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 6 hours. The API callers can request the times to up to 72 hours + # by speaking to their Account Manager. + # @param [String] pay_pal_partner_attribution_id Optional parameter: + # Example: + # @param [String] pay_pal_client_metadata_id Optional parameter: Example: + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @return [ApiResponse] the complete http response with raw body and status code. + def orders_create(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/checkout/orders', + Server::DEFAULT) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['pay_pal_partner_attribution_id'], key: 'PayPal-Partner-Attribution-Id')) + .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Order.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Shows details for an order, by ID.
Note: For + # error handling and troubleshooting, see Orders v2 + # errors.
+ # @param [String] id Required parameter: The ID of the order for which to + # show details. + # @param [String] fields Optional parameter: A comma-separated list of + # fields that should be returned for the order. Valid filter field is + # `payment_source`. + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_get(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v2/checkout/orders/{id}', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .query_param(new_parameter(options['fields'], key: 'fields')) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Order.method(:from_hash)) + .is_api_response(true) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Updates an order with a `CREATED` or `APPROVED` status. You cannot update + # an order with the `COMPLETED` status.

To make an update, you must + # provide a `reference_id`. If you omit this value with an order that + # contains only one purchase unit, PayPal sets the value to `default` which + # enables you to use the path: + # \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to + # reduce risk and payment processing costs. For more information about + # processing payments, see che + # ckout or multiparty checkout.
Note: For + # error handling and troubleshooting, see Orders v2 + # errors.
Patchable attributes or + # objects:

< + # /tr> + # + #
AttributeOpNotes
intentreplace
payerreplace, addUsing replace + # op for payer will replace the whole payer object + # with the value sent in + # request.
purchase_unitsreplace, + # add
purchase_units[].custom_idreplace, add, + # remove
purchase_units[].description + # replace, add, + # remove
purchase_units[].payee.email + # replace
purchase_units[].shipping + # .namereplace, + # add
purchase_units[].shipping.email_addres + # sreplace, + # add
purchase_units[].shipping.phone_number + # replace, + # add
purchase_units[].shipping.optionsreplace, + # add
purchase_units[].shipping.addressreplace, + # add
purchase_units[].shipping.type< + # /td>replace, + # add
purchase_units[].soft_descriptorreplace, + # remove
purchase_units[].amountreplace
purchase_units[].items< + # /td>replace, add, + # remove
purchase_units[].invoice_id< + # /td>replace, add, + # remove
purchase_units[].payment_instructio + # nreplace
purchase_units[]. + # payment_instruction.disbursement_modereplaceBy + # default, disbursement_mode is + # INSTANT.
purchase_units[].payment_inst + # ruction.payee_receivable_fx_rate_idreplace, add, + # remove
purchase_units[].payment_instructio + # n.platform_feesreplace, add, + # remove
purchase_units[].supplementary_data + # .airlinereplace, add, + # remove
purchase_units[].supplementary_data + # .cardreplace, add, + # remove
application_context.client_configur + # ationreplace, add
+ # @param [String] id Required parameter: The ID of the order to update. + # @param [Array[Patch]] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_patch(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::PATCH, + '/v2/checkout/orders/{id}', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .is_response_void(true) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Payer confirms their intent to pay for the the Order with the given + # payment source. + # @param [String] id Required parameter: The ID of the order for which the + # payer confirms their intent to pay. + # @param [String] pay_pal_client_metadata_id Optional parameter: Example: + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [ConfirmOrderRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_confirm(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/checkout/orders/{id}/confirm-payment-source', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Order.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Authorizes payment for an order. To successfully authorize payment for an + # order, the buyer must first approve the order or a valid payment_source + # must be provided in the request. A buyer can approve the order upon being + # redirected to the rel:approve URL that was returned in the HATEOAS links + # in the create order response.
Note: For error + # handling and troubleshooting, see Orders v2 + # errors.
+ # @param [String] id Required parameter: The ID of the order for which to + # authorize. + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 6 hours. The API callers can request the times to up to 72 hours + # by speaking to their Account Manager. + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [String] pay_pal_client_metadata_id Optional parameter: Example: + # @param [String] pay_pal_auth_assertion Optional parameter: An + # API-caller-provided JSON Web Token (JWT) assertion that identifies the + # merchant. For details, see PayPal-Auth-Assertion + # . + # @param [OrderAuthorizeRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_authorize(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/checkout/orders/{id}/authorize', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) + .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(OrderAuthorizeResponse.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The authorized payment failed due to insufficient permissions'\ + '.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Captures payment for an order. To successfully capture payment for an + # order, the buyer must first approve the order or a valid payment_source + # must be provided in the request. A buyer can approve the order upon being + # redirected to the rel:approve URL that was returned in the HATEOAS links + # in the create order response.
Note: For error + # handling and troubleshooting, see Orders v2 + # errors.
+ # @param [String] id Required parameter: The ID of the order for which to + # capture a payment. + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 6 hours. The API callers can request the times to up to 72 hours + # by speaking to their Account Manager. + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [String] pay_pal_client_metadata_id Optional parameter: Example: + # @param [String] pay_pal_auth_assertion Optional parameter: An + # API-caller-provided JSON Web Token (JWT) assertion that identifies the + # merchant. For details, see PayPal-Auth-Assertion + # . + # @param [OrderCaptureRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_capture(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/checkout/orders/{id}/capture', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) + .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Order.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The authorized payment failed due to insufficient permissions'\ + '.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Adds tracking information for an Order. + # @param [String] id Required parameter: The ID of the order that the + # tracking information is associated with. + # @param [OrderTrackerRequest] body Required parameter: Example: + # @param [String] pay_pal_auth_assertion Optional parameter: An + # API-caller-provided JSON Web Token (JWT) assertion that identifies the + # merchant. For details, see PayPal-Auth-Assertion + # . + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_track_create(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/checkout/orders/{id}/track', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Order.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Updates or cancels the tracking information for a PayPal order, by ID. + # Updatable attributes or + # objects:

AttributeOpNotes
itemsreplaceUs + # ing replace op for items will replace the entire + # items object with the value sent in + # request.
notify_payerreplace, + # add
statusreplace + # Only patching status to CANCELLED is currently + # supported.
+ # @param [String] id Required parameter: The ID of the order that the + # tracking information is associated with. + # @param [String] tracker_id Required parameter: The order tracking ID. + # @param [Array[Patch]] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def orders_trackers_patch(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::PATCH, + '/v2/checkout/orders/{id}/trackers/{tracker_id}', + Server::DEFAULT) + .template_param(new_parameter(options['id'], key: 'id') + .should_encode(true)) + .template_param(new_parameter(options['tracker_id'], key: 'tracker_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .is_response_void(true) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + end +end diff --git a/lib/pay_pal_restap_is/controllers/payments_controller.rb b/lib/pay_pal_restap_is/controllers/payments_controller.rb new file mode 100644 index 0000000..3b91d3c --- /dev/null +++ b/lib/pay_pal_restap_is/controllers/payments_controller.rb @@ -0,0 +1,400 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # PaymentsController + class PaymentsController < BaseController + # Shows details for an authorized payment, by ID. + # @param [String] authorization_id Required parameter: The ID of the + # authorized payment for which to show details. + # @return [ApiResponse] the complete http response with raw body and status code. + def authorizations_get(authorization_id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v2/payments/authorizations/{authorization_id}', + Server::DEFAULT) + .template_param(new_parameter(authorization_id, key: 'authorization_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(PaymentAuthorization.method(:from_hash)) + .is_api_response(true) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Captures an authorized payment, by ID. + # @param [String] authorization_id Required parameter: The PayPal-generated + # ID for the authorized payment to capture. + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 45 days. + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [CaptureRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def authorizations_capture(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/payments/authorizations/{authorization_id}/capture', + Server::DEFAULT) + .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(CapturedPayment.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'The request failed because it is not well-formed or is'\ + ' syntactically incorrect or violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('422', + 'The request failed because it is semantically incorrect or'\ + ' failed business validation.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Reauthorizes an authorized PayPal account payment, by ID. To ensure that + # funds are still available, reauthorize a payment after its initial + # three-day honor period expires. Within the 29-day authorization period, + # you can issue multiple re-authorizations after the honor period + # expires.

If 30 days have transpired since the date of the + # original authorization, you must create an authorized payment instead of + # reauthorizing the original authorized payment.

A reauthorized + # payment itself has a new honor period of three days.

You can + # reauthorize an authorized payment from 4 to 29 days after the 3-day honor + # period. The allowed amount depends on context and geography, for example + # in US it is up to 115% of the original authorized amount, not to exceed an + # increase of $75 USD.

Supports only the `amount` request + # parameter.
Note: This request is currently not + # supported for Partner use cases.
+ # @param [String] authorization_id Required parameter: The PayPal-generated + # ID for the authorized payment to reauthorize. + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 45 days. + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [ReauthorizeRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def authorizations_reauthorize(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/payments/authorizations/{authorization_id}/reauthorize', + Server::DEFAULT) + .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(PaymentAuthorization.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'The request failed because it is not well-formed or is'\ + ' syntactically incorrect or violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('422', + 'The request failed because it either is semantically incorrect'\ + ' or failed business validation.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Voids, or cancels, an authorized payment, by ID. You cannot void an + # authorized payment that has been fully captured. + # @param [String] authorization_id Required parameter: The PayPal-generated + # ID for the authorized payment to void. + # @param [String] pay_pal_auth_assertion Optional parameter: An + # API-caller-provided JSON Web Token (JWT) assertion that identifies the + # merchant. For details, see + # [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse + # rtion).
Note:For three party transactions in + # which a partner is managing the API calls on behalf of a merchant, the + # partner must identify the merchant using either a PayPal-Auth-Assertion + # header or an access token with target_subject.
+ # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @return [ApiResponse] the complete http response with raw body and status code. + def authorizations_void(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/payments/authorizations/{authorization_id}/void', + Server::DEFAULT) + .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') + .should_encode(true)) + .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .is_nullable_response(true) + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(PaymentAuthorization.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'The request failed because it is not well-formed or is'\ + ' syntactically incorrect or violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('409', + 'The request failed because a previous call for the given'\ + ' resource is in progress.', + ErrorException) + .local_error('422', + 'The request failed because it either is semantically incorrect'\ + ' or failed business validation.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Shows details for a captured payment, by ID. + # @param [String] capture_id Required parameter: The PayPal-generated ID for + # the captured payment for which to show details. + # @return [ApiResponse] the complete http response with raw body and status code. + def captures_get(capture_id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v2/payments/captures/{capture_id}', + Server::DEFAULT) + .template_param(new_parameter(capture_id, key: 'capture_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(CapturedPayment.method(:from_hash)) + .is_api_response(true) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Refunds a captured payment, by ID. For a full refund, include an empty + # payload in the JSON request body. For a partial refund, include an + # amount object in the JSON request body. + # @param [String] capture_id Required parameter: The PayPal-generated ID for + # the captured payment to refund. + # @param [String] pay_pal_request_id Optional parameter: The server stores + # keys for 45 days. + # @param [String] prefer Optional parameter: The preferred server response + # upon successful completion of the request. Value + # is:
  • return=minimal. The server returns a minimal + # response to optimize communication between the API caller and the server. + # A minimal response includes the id, status and + # HATEOAS links.
  • return=representation. The server + # returns a complete resource representation, including the current state of + # the resource.
+ # @param [String] pay_pal_auth_assertion Optional parameter: An + # API-caller-provided JSON Web Token (JWT) assertion that identifies the + # merchant. For details, see + # [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse + # rtion).
Note:For three party transactions in + # which a partner is managing the API calls on behalf of a merchant, the + # partner must identify the merchant using either a PayPal-Auth-Assertion + # header or an access token with target_subject.
+ # @param [RefundRequest] body Optional parameter: Example: + # @return [ApiResponse] the complete http response with raw body and status code. + def captures_refund(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v2/payments/captures/{capture_id}/refund', + Server::DEFAULT) + .template_param(new_parameter(options['capture_id'], key: 'capture_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter(options['prefer'], key: 'Prefer')) + .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Refund.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'The request failed because it is not well-formed or is'\ + ' syntactically incorrect or violates schema.', + ErrorException) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('409', + 'The request failed because a previous call for the given'\ + ' resource is in progress.', + ErrorException) + .local_error('422', + 'The request failed because it either is semantically incorrect'\ + ' or failed business validation.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + + # Shows details for a refund, by ID. + # @param [String] refund_id Required parameter: The PayPal-generated ID for + # the refund for which to show details. + # @return [ApiResponse] the complete http response with raw body and status code. + def refunds_get(refund_id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v2/payments/refunds/{refund_id}', + Server::DEFAULT) + .template_param(new_parameter(refund_id, key: 'refund_id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(Refund.method(:from_hash)) + .is_api_response(true) + .local_error('401', + 'Authentication failed due to missing authorization header, or'\ + ' invalid authentication credentials.', + ErrorException) + .local_error('403', + 'The request failed because the caller has insufficient'\ + ' permissions.', + ErrorException) + .local_error('404', + 'The request failed because the resource does not exist.', + ErrorException) + .local_error('500', + 'The request failed because an internal server error occurred.', + APIException) + .local_error('default', + 'The error response.', + ErrorException)) + .execute + end + end +end diff --git a/lib/pay_pal_restap_is/controllers/vault_controller.rb b/lib/pay_pal_restap_is/controllers/vault_controller.rb new file mode 100644 index 0000000..a2b43c9 --- /dev/null +++ b/lib/pay_pal_restap_is/controllers/vault_controller.rb @@ -0,0 +1,224 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # VaultController + class VaultController < BaseController + # Creates a Payment Token from the given payment source and adds it to the + # Vault of the associated customer. + # @param [String] pay_pal_request_id Required parameter: The server stores + # keys for 3 hours. + # @param [PaymentTokenRequest] body Required parameter: Payment Token + # creation with a financial instrument and an optional customer_id. + # @return [ApiResponse] the complete http response with raw body and status code. + def payment_tokens_create(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v3/vault/payment-tokens', + Server::DEFAULT) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(PaymentTokenResponse.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('404', + 'Request contains reference to resources that do not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + + # Returns all payment tokens for a customer. + # @param [String] customer_id Required parameter: A unique identifier + # representing a specific customer in merchant's/partner's system or + # records. + # @param [Integer] page_size Optional parameter: A non-negative, non-zero + # integer indicating the maximum number of results to return at one time. + # @param [Integer] page Optional parameter: A non-negative, non-zero integer + # representing the page of the results. + # @param [TrueClass | FalseClass] total_required Optional parameter: A + # boolean indicating total number of items (total_items) and pages + # (total_pages) are expected to be returned in the response. + # @return [ApiResponse] the complete http response with raw body and status code. + def customer_payment_tokens_get(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v3/vault/payment-tokens', + Server::DEFAULT) + .query_param(new_parameter(options['customer_id'], key: 'customer_id')) + .query_param(new_parameter(options['page_size'], key: 'page_size')) + .query_param(new_parameter(options['page'], key: 'page')) + .query_param(new_parameter(options['total_required'], key: 'total_required')) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(CustomerVaultPaymentTokensResponse.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + + # Returns a readable representation of vaulted payment source associated + # with the payment token id. + # @param [String] id Required parameter: ID of the payment token. + # @return [ApiResponse] the complete http response with raw body and status code. + def payment_tokens_get(id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v3/vault/payment-tokens/{id}', + Server::DEFAULT) + .template_param(new_parameter(id, key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(PaymentTokenResponse.method(:from_hash)) + .is_api_response(true) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + + # Delete the payment token associated with the payment token id. + # @param [String] id Required parameter: ID of the payment token. + # @return [ApiResponse] the complete http response with raw body and status code. + def payment_tokens_delete(id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::DELETE, + '/v3/vault/payment-tokens/{id}', + Server::DEFAULT) + .template_param(new_parameter(id, key: 'id') + .should_encode(true)) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .is_response_void(true) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + + # Creates a Setup Token from the given payment source and adds it to the + # Vault of the associated customer. + # @param [String] pay_pal_request_id Required parameter: The server stores + # keys for 3 hours. + # @param [SetupTokenRequest] body Required parameter: Setup Token creation + # with a instrument type optional financial instrument details and + # customer_id. + # @return [ApiResponse] the complete http response with raw body and status code. + def setup_tokens_create(options = {}) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::POST, + '/v3/vault/setup-tokens', + Server::DEFAULT) + .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) + .header_param(new_parameter('application/json', key: 'Content-Type')) + .body_param(new_parameter(options['body'])) + .header_param(new_parameter('application/json', key: 'accept')) + .body_serializer(proc do |param| param.to_json unless param.nil? end) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(SetupTokenResponse.method(:from_hash)) + .is_api_response(true) + .local_error('400', + 'Request is not well-formed, syntactically incorrect, or'\ + ' violates schema.', + ErrorException) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + + # Returns a readable representation of temporarily vaulted payment source + # associated with the setup token id. + # @param [String] id Required parameter: ID of the setup token. + # @return [ApiResponse] the complete http response with raw body and status code. + def setup_tokens_get(id) + new_api_call_builder + .request(new_request_builder(HttpMethodEnum::GET, + '/v3/vault/setup-tokens/{id}', + Server::DEFAULT) + .template_param(new_parameter(id, key: 'id') + .should_encode(true)) + .header_param(new_parameter('application/json', key: 'accept')) + .auth(Single.new('Oauth2'))) + .response(new_response_handler + .deserializer(APIHelper.method(:custom_type_deserializer)) + .deserialize_into(SetupTokenResponse.method(:from_hash)) + .is_api_response(true) + .local_error('403', + 'Authorization failed due to insufficient permissions.', + ErrorException) + .local_error('404', + 'The specified resource does not exist.', + ErrorException) + .local_error('422', + 'The requested action could not be performed, semantically'\ + ' incorrect, or failed business validation.', + ErrorException) + .local_error('500', + 'An internal server error has occurred.', + ErrorException)) + .execute + end + end +end diff --git a/lib/pay_pal_restap_is/exceptions/api_exception.rb b/lib/pay_pal_restap_is/exceptions/api_exception.rb new file mode 100644 index 0000000..5efa0e6 --- /dev/null +++ b/lib/pay_pal_restap_is/exceptions/api_exception.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Class for exceptions when there is a network error, status code error, etc. + class APIException < CoreLibrary::ApiException + end +end diff --git a/lib/pay_pal_restap_is/exceptions/error_exception.rb b/lib/pay_pal_restap_is/exceptions/error_exception.rb new file mode 100644 index 0000000..fb6d096 --- /dev/null +++ b/lib/pay_pal_restap_is/exceptions/error_exception.rb @@ -0,0 +1,71 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The error details. + class ErrorException < APIException + SKIP = Object.new + private_constant :SKIP + + # The human-readable, unique name of the error. + # @return [String] + attr_accessor :name + + # The message that describes the error. + # @return [String] + attr_accessor :message + + # The PayPal internal ID. Used for correlation purposes. + # @return [String] + attr_accessor :debug_id + + # An array of additional details about the error. + # @return [Array[ErrorDetails]] + attr_accessor :details + + # An array of request-related [HATEOAS + # links](/api/rest/responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The constructor. + # @param [String] The reason for raising an exception. + # @param [HttpResponse] The HttpReponse of the API call. + def initialize(reason, response) + super(reason, response) + hash = APIHelper.json_deserialize(@response.raw_body) + unbox(hash) + end + + # Populates this object by extracting properties from a hash. + # @param [Hash] The deserialized response sent by the server in the + # response body. + def unbox(hash) + @name = hash.key?('name') ? hash['name'] : nil + @message = hash.key?('message') ? hash['message'] : nil + @debug_id = hash.key?('debug_id') ? hash['debug_id'] : nil + # Parameter is an array, so we need to iterate through it + @details = nil + unless hash['details'].nil? + @details = [] + hash['details'].each do |structure| + @details << (ErrorDetails.from_hash(structure) if structure) + end + end + + @details = SKIP unless hash.key?('details') + # Parameter is an array, so we need to iterate through it + @links = nil + unless hash['links'].nil? + @links = [] + hash['links'].each do |structure| + @links << (LinkDescription.from_hash(structure) if structure) + end + end + + @links = SKIP unless hash.key?('links') + end + end +end diff --git a/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb b/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb new file mode 100644 index 0000000..4f166e0 --- /dev/null +++ b/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb @@ -0,0 +1,48 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OAuth 2 Authorization endpoint exception. + class OAuthProviderException < APIException + SKIP = Object.new + private_constant :SKIP + + # Gets or sets error code. + # @return [OAuthProviderError] + attr_accessor :error + + # Gets or sets human-readable text providing additional information on + # error. + # Used to assist the client developer in understanding the error that + # occurred. + # @return [String] + attr_accessor :error_description + + # Gets or sets a URI identifying a human-readable web page with information + # about the error, used to provide the client developer with additional + # information about the error. + # @return [String] + attr_accessor :error_uri + + # The constructor. + # @param [String] The reason for raising an exception. + # @param [HttpResponse] The HttpReponse of the API call. + def initialize(reason, response) + super(reason, response) + hash = APIHelper.json_deserialize(@response.raw_body) + unbox(hash) + end + + # Populates this object by extracting properties from a hash. + # @param [Hash] The deserialized response sent by the server in the + # response body. + def unbox(hash) + @error = hash.key?('error') ? hash['error'] : nil + @error_description = + hash.key?('error_description') ? hash['error_description'] : SKIP + @error_uri = hash.key?('error_uri') ? hash['error_uri'] : SKIP + end + end +end diff --git a/lib/pay_pal_restap_is/http/api_response.rb b/lib/pay_pal_restap_is/http/api_response.rb new file mode 100644 index 0000000..177c7bd --- /dev/null +++ b/lib/pay_pal_restap_is/http/api_response.rb @@ -0,0 +1,21 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Http response received. + class ApiResponse < CoreLibrary::ApiResponse + + + # The constructor + # @param [HttpResponse] http_response The original, raw response from the api. + # @param [Object] data The data field specified for the response. + # @param [Array] errors Any errors returned by the server. + def initialize(http_response, + data: nil, + errors: nil) + super + end + end +end diff --git a/lib/pay_pal_restap_is/http/auth/o_auth2.rb b/lib/pay_pal_restap_is/http/auth/o_auth2.rb new file mode 100644 index 0000000..e32bb60 --- /dev/null +++ b/lib/pay_pal_restap_is/http/auth/o_auth2.rb @@ -0,0 +1,136 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Utility class for OAuth 2 authorization and token management. + class OAuth2 < CoreLibrary::HeaderAuth + include CoreLibrary + # Display error message on occurrence of authentication failure. + # @returns [String] The oAuth error message. + def error_message + 'ClientCredentialsAuth: OAuthToken is undefined or expired.' + end + + # Initialization constructor. + def initialize(client_credentials_auth_credentials, config) + @_o_auth_client_id = client_credentials_auth_credentials.o_auth_client_id unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_client_id.nil? + @_o_auth_client_secret = client_credentials_auth_credentials.o_auth_client_secret unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_client_secret.nil? + @_o_auth_token = client_credentials_auth_credentials.o_auth_token unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_token.nil? + @_o_auth_clock_skew = client_credentials_auth_credentials.o_auth_clock_skew unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_clock_skew.nil? + @_o_auth_token_provider = client_credentials_auth_credentials.o_auth_token_provider unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_token_provider.nil? + @_o_auth_on_token_update = client_credentials_auth_credentials.o_auth_on_token_update unless + client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_on_token_update.nil? + @_o_auth_api = OAuthAuthorizationController.new(config) + super({}) + end + + # Validates the oAuth token. + # @return [Boolean] true if the token is present and not expired. + def valid + @_o_auth_token = get_token_from_provider + @_o_auth_token.is_a?(OAuthToken) && !token_expired?(@_o_auth_token) + end + + # Builds the basic auth header for endpoints in the OAuth Authorization Controller. + # @return [String] The value of the Authentication header. + def build_basic_auth_header + "Basic #{AuthHelper.get_base64_encoded_value(@_o_auth_client_id, @_o_auth_client_secret)}" + end + + # Fetches the token. + # @param [Hash] additional_params Any additional form parameters. + # @return [OAuthToken] The oAuth token instance. + def fetch_token(additional_params: nil) + token = @_o_auth_api.request_token( + { + 'authorization' => build_basic_auth_header + }, + _field_parameters: additional_params + ).data + if token.respond_to?('expires_in') && !token.expires_in.nil? + token.expiry = AuthHelper.get_token_expiry(token.expires_in, Time.now.utc.to_i) + end + token + end + + # Checks if OAuth token has expired. + # @param [OAuthToken] token The oAuth token instance. + # @return [Boolean] true if the token's expiry exist and also the token is expired, false otherwise. + def token_expired?(token) + token.respond_to?('expiry') && AuthHelper.token_expired?(token.expiry, @_o_auth_clock_skew) + end + + def apply(http_request) + auth_params = { 'Authorization' => "Bearer #{@_o_auth_token.access_token}" } + AuthHelper.apply(auth_params, http_request.method(:add_header)) + end + + private + + # This provides the OAuth Token from either the user configured callbacks or from default provider. + # @return [OAuthToken] The fetched oauth token. + def get_token_from_provider + return @_o_auth_token if @_o_auth_token && !token_expired?(@_o_auth_token) + + if @_o_auth_token_provider + o_auth_token = @_o_auth_token_provider.call(@_o_auth_token, self) + @_o_auth_on_token_update&.call(o_auth_token) + return o_auth_token + end + begin + o_auth_token = fetch_token + @_o_auth_on_token_update&.call(o_auth_token) + o_auth_token + rescue ApiException + @_o_auth_token + end + end + end + + # Data class for ClientCredentialsAuthCredentials. + class ClientCredentialsAuthCredentials + attr_reader :o_auth_client_id, :o_auth_client_secret, :o_auth_token, + :o_auth_token_provider, :o_auth_on_token_update, + :o_auth_clock_skew + + def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, + o_auth_token_provider: nil, o_auth_on_token_update: nil, + o_auth_clock_skew: nil) + raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? + raise ArgumentError, 'o_auth_client_secret cannot be nil' if o_auth_client_secret.nil? + + @o_auth_client_id = o_auth_client_id + @o_auth_client_secret = o_auth_client_secret + @o_auth_token = o_auth_token + @o_auth_token_provider = o_auth_token_provider + @o_auth_on_token_update = o_auth_on_token_update + @o_auth_clock_skew = o_auth_clock_skew + end + + def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, + o_auth_token: nil, o_auth_token_provider: nil, + o_auth_on_token_update: nil, o_auth_clock_skew: nil) + o_auth_client_id ||= self.o_auth_client_id + o_auth_client_secret ||= self.o_auth_client_secret + o_auth_token ||= self.o_auth_token + o_auth_token_provider ||= self.o_auth_token_provider + o_auth_on_token_update ||= self.o_auth_on_token_update + o_auth_clock_skew ||= self.o_auth_clock_skew + + ClientCredentialsAuthCredentials.new( + o_auth_client_id: o_auth_client_id, + o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token, + o_auth_token_provider: o_auth_token_provider, + o_auth_on_token_update: o_auth_on_token_update, + o_auth_clock_skew: o_auth_clock_skew + ) + end + end +end diff --git a/lib/pay_pal_restap_is/http/http_call_back.rb b/lib/pay_pal_restap_is/http/http_call_back.rb new file mode 100644 index 0000000..7d38753 --- /dev/null +++ b/lib/pay_pal_restap_is/http/http_call_back.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # HttpCallBack allows defining callables for pre and post API calls. + class HttpCallBack < CoreLibrary::HttpCallback + end +end diff --git a/lib/pay_pal_restap_is/http/http_method_enum.rb b/lib/pay_pal_restap_is/http/http_method_enum.rb new file mode 100644 index 0000000..161b9d5 --- /dev/null +++ b/lib/pay_pal_restap_is/http/http_method_enum.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # HTTP Methods Enumeration. + class HttpMethodEnum < CoreLibrary::HttpMethod + end +end diff --git a/lib/pay_pal_restap_is/http/http_request.rb b/lib/pay_pal_restap_is/http/http_request.rb new file mode 100644 index 0000000..d158deb --- /dev/null +++ b/lib/pay_pal_restap_is/http/http_request.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Represents a single Http Request. + class HttpRequest < CoreLibrary::HttpRequest + end +end diff --git a/lib/pay_pal_restap_is/http/http_response.rb b/lib/pay_pal_restap_is/http/http_response.rb new file mode 100644 index 0000000..78f10dd --- /dev/null +++ b/lib/pay_pal_restap_is/http/http_response.rb @@ -0,0 +1,10 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Http response received. + class HttpResponse < CoreLibrary::HttpResponse + end +end diff --git a/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb b/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb new file mode 100644 index 0000000..29e6f09 --- /dev/null +++ b/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb @@ -0,0 +1,114 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Initializes a new instance of RequestLoggingConfiguration. + class RequestLoggingConfiguration < CoreLibrary::ApiRequestLoggingConfiguration + # @param log_body [Boolean] Indicates whether the message body should be logged. Default is false. + # @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false. + # @param headers_to_exclude [Array] Array of headers not displayed in logging. Default is an empty array. + # @param headers_to_include [Array] Array of headers to be displayed in logging. Default is an empty array. + # @param headers_to_unmask [Array] Array of headers which values are non-sensitive to display in logging. + # Default is an empty array. + def initialize(log_body: false, log_headers: false, headers_to_include: nil, + headers_to_exclude: nil, headers_to_unmask: nil, + include_query_in_path: false) + super( + log_body, + log_headers, + headers_to_exclude, + headers_to_include, + headers_to_unmask, + include_query_in_path + ) + end + + def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil, + headers_to_exclude: nil, headers_to_unmask: nil, include_query_in_path: nil) + log_body ||= self.log_body + log_headers ||= self.log_headers + headers_to_include ||= self.headers_to_include + headers_to_exclude ||= self.headers_to_exclude + headers_to_unmask ||= self.headers_to_unmask + include_query_in_path ||= self.include_query_in_path + + RequestLoggingConfiguration.class.new(log_body: log_body, log_headers: log_headers, + headers_to_include: headers_to_include, + headers_to_exclude: headers_to_exclude, + headers_to_unmask: headers_to_unmask, + include_query_in_path: include_query_in_path) + end + end + + # Initializes a new instance of ResponseLoggingConfiguration. + class ResponseLoggingConfiguration < CoreLibrary::ApiResponseLoggingConfiguration + # @param log_body [Boolean] Indicates whether the message body should be logged. Default is false. + # @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false. + # @param headers_to_exclude [Array] Array of headers not displayed in logging. Default is an empty array. + # @param headers_to_include [Array] Array of headers to be displayed in logging. Default is an empty array. + # @param headers_to_unmask [Array] Array of headers which values are non-sensitive to display in logging. + # Default is an empty array. + def initialize(log_body: false, log_headers: false, headers_to_include: nil, + headers_to_exclude: nil, headers_to_unmask: nil) + super( + log_body, + log_headers, + headers_to_exclude, + headers_to_include, + headers_to_unmask + ) + end + + def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil, + headers_to_exclude: nil, headers_to_unmask: nil) + log_body ||= self.log_body + log_headers ||= self.log_headers + headers_to_include ||= self.headers_to_include + headers_to_exclude ||= self.headers_to_exclude + headers_to_unmask ||= self.headers_to_unmask + + ResponseLoggingConfiguration.new(log_body: log_body, log_headers: log_headers, + headers_to_include: headers_to_include, + headers_to_exclude: headers_to_exclude, + headers_to_unmask: headers_to_unmask) + end + end + + # Initializes a new instance of LoggingConfiguration. + class LoggingConfiguration < CoreLibrary::ApiLoggingConfiguration + # @param logger [LoggerInterface] The logger to use for logging messages. + # @param log_level [LogLevel] The log level to determine which messages should be logged. + # @param request_logging_config [RequestLoggingConfiguration] Options for logging HTTP requests. + # @param response_logging_config [ResponseLoggingConfiguration] Options for logging HTTP responses. + # @param mask_sensitive_headers [Boolean] Indicates whether sensitive headers should be masked in logged messages. + def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true, + request_logging_config: nil, + response_logging_config: nil) + request_logging_config ||= RequestLoggingConfiguration.new + response_logging_config ||= ResponseLoggingConfiguration.new + super( + logger, + log_level, + request_logging_config, + response_logging_config, + mask_sensitive_headers + ) + end + + def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil, + request_logging_config: nil, response_logging_config: nil) + logger ||= self.logger + log_level ||= self.log_level + mask_sensitive_headers = self.mask_sensitive_headers ||= mask_sensitive_headers + request_logging_config ||= self.request_logging_config.clone + response_logging_config ||= self.response_logging_config.clone + + LoggingConfiguration.new(logger: logger, log_level: log_level, + mask_sensitive_headers: mask_sensitive_headers, + request_logging_config: request_logging_config, + response_logging_config: response_logging_config) + end + end +end diff --git a/lib/pay_pal_restap_is/logging/sdk_logger.rb b/lib/pay_pal_restap_is/logging/sdk_logger.rb new file mode 100644 index 0000000..4f4e335 --- /dev/null +++ b/lib/pay_pal_restap_is/logging/sdk_logger.rb @@ -0,0 +1,17 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Represents the generic logger facade + class AbstractLogger < Logger + # Logs a message with a specified log level and additional parameters. + # @param level [Symbol] The log level of the message. + # @param message [String] The message to log. + # @param params [Hash] Additional parameters to include in the log message. + def log(level, message, params) + raise NotImplementedError, 'This method needs to be implemented in a child class.' + end + end +end diff --git a/lib/pay_pal_restap_is/models/ach_debit_response.rb b/lib/pay_pal_restap_is/models/ach_debit_response.rb new file mode 100644 index 0000000..344b7ba --- /dev/null +++ b/lib/pay_pal_restap_is/models/ach_debit_response.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A Resource representing a response of vaulted a ACH Debit Account. + class ACHDebitResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The ach debit verification status. + # @return [String] + attr_accessor :verification_status + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['verification_status'] = 'verification_status' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + verification_status + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(verification_status: 'NOT_VERIFIED') + @verification_status = verification_status unless verification_status == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + verification_status = hash['verification_status'] ||= 'NOT_VERIFIED' + + # Create object from extracted values. + ACHDebitResponse.new(verification_status: verification_status) + end + end +end diff --git a/lib/pay_pal_restap_is/models/activity_timestamps.rb b/lib/pay_pal_restap_is/models/activity_timestamps.rb new file mode 100644 index 0000000..1bd536a --- /dev/null +++ b/lib/pay_pal_restap_is/models/activity_timestamps.rb @@ -0,0 +1,68 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The date and time stamps that are common to authorized payment, captured + # payment, and refund transactions. + class ActivityTimestamps < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + create_time + update_time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(create_time: SKIP, update_time: SKIP) + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + + # Create object from extracted values. + ActivityTimestamps.new(create_time: create_time, + update_time: update_time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/address.rb b/lib/pay_pal_restap_is/models/address.rb new file mode 100644 index 0000000..b535446 --- /dev/null +++ b/lib/pay_pal_restap_is/models/address.rb @@ -0,0 +1,116 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wi + # ki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the + # autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-cont + # rols-the-autocomplete-attribute). + class Address < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The first line of the address, such as number and street, for example, + # `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. + # This field needs to pass the full address. + # @return [String] + attr_accessor :address_line_1 + + # The second line of the address, for example, a suite or apartment number. + # @return [String] + attr_accessor :address_line_2 + + # A city, town, or village. Smaller than `admin_area_level_1`. + # @return [String] + attr_accessor :admin_area_2 + + # The highest-level sub-division in a country, which is usually a province, + # state, or ISO-3166-2 subdivision. This data is formatted for postal + # delivery, for example, `CA` and not `California`. Value, by country, + # is:
  • UK. A county.
  • US. A state.
  • Canada. A + # province.
  • Japan. A prefecture.
  • Switzerland. A + # *kanton*.
+ # @return [String] + attr_accessor :admin_area_1 + + # The postal code, which is the ZIP code or equivalent. Typically required + # for countries with a postal code or an equivalent. See [postal + # code](https://en.wikipedia.org/wiki/Postal_code). + # @return [String] + attr_accessor :postal_code + + # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that + # identifies the country or region.
Note: The + # country code for Great Britain is GB and not UK + # as used in the top-level domain names for that country. Use the `C2` + # country code for China worldwide for comparable uncontrolled price (CUP) + # method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['address_line_1'] = 'address_line_1' + @_hash['address_line_2'] = 'address_line_2' + @_hash['admin_area_2'] = 'admin_area_2' + @_hash['admin_area_1'] = 'admin_area_1' + @_hash['postal_code'] = 'postal_code' + @_hash['country_code'] = 'country_code' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + address_line_1 + address_line_2 + admin_area_2 + admin_area_1 + postal_code + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(country_code:, address_line_1: SKIP, address_line_2: SKIP, + admin_area_2: SKIP, admin_area_1: SKIP, postal_code: SKIP) + @address_line_1 = address_line_1 unless address_line_1 == SKIP + @address_line_2 = address_line_2 unless address_line_2 == SKIP + @admin_area_2 = admin_area_2 unless admin_area_2 == SKIP + @admin_area_1 = admin_area_1 unless admin_area_1 == SKIP + @postal_code = postal_code unless postal_code == SKIP + @country_code = country_code + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + country_code = hash.key?('country_code') ? hash['country_code'] : nil + address_line_1 = + hash.key?('address_line_1') ? hash['address_line_1'] : SKIP + address_line_2 = + hash.key?('address_line_2') ? hash['address_line_2'] : SKIP + admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP + admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP + postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP + + # Create object from extracted values. + Address.new(country_code: country_code, + address_line_1: address_line_1, + address_line_2: address_line_2, + admin_area_2: admin_area_2, + admin_area_1: admin_area_1, + postal_code: postal_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/address_details.rb b/lib/pay_pal_restap_is/models/address_details.rb new file mode 100644 index 0000000..7b58991 --- /dev/null +++ b/lib/pay_pal_restap_is/models/address_details.rb @@ -0,0 +1,160 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Address request details. + class AddressDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The first line of the address, such as number and street, for example, + # `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. + # This field needs to pass the full address. + # @return [String] + attr_accessor :address_line_1 + + # The second line of the address, for example, a suite or apartment number. + # @return [String] + attr_accessor :address_line_2 + + # A city, town, or village. Smaller than `admin_area_level_1`. + # @return [String] + attr_accessor :admin_area_2 + + # The highest-level sub-division in a country, which is usually a province, + # state, or ISO-3166-2 subdivision. This data is formatted for postal + # delivery, for example, `CA` and not `California`. Value, by country, + # is:
  • UK. A county.
  • US. A state.
  • Canada. A + # province.
  • Japan. A prefecture.
  • Switzerland. A + # *kanton*.
+ # @return [String] + attr_accessor :admin_area_1 + + # The postal code, which is the ZIP code or equivalent. Typically required + # for countries with a postal code or an equivalent. See [postal + # code](https://en.wikipedia.org/wiki/Postal_code). + # @return [String] + attr_accessor :postal_code + + # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that + # identifies the country or region.
Note: The + # country code for Great Britain is GB and not UK + # as used in the top-level domain names for that country. Use the `C2` + # country code for China worldwide for comparable uncontrolled price (CUP) + # method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The resource ID of the address. + # @return [String] + attr_accessor :id + + # The name of the company or business associated to the address. + # @return [String] + attr_accessor :company + + # The phone number that can go on the mailing label with the address to + # track the shipping. Phone number is in E.164 format. + # @return [String] + attr_accessor :phone + + # The phone number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [Phone] + attr_accessor :phone_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['address_line_1'] = 'address_line_1' + @_hash['address_line_2'] = 'address_line_2' + @_hash['admin_area_2'] = 'admin_area_2' + @_hash['admin_area_1'] = 'admin_area_1' + @_hash['postal_code'] = 'postal_code' + @_hash['country_code'] = 'country_code' + @_hash['name'] = 'name' + @_hash['id'] = 'id' + @_hash['company'] = 'company' + @_hash['phone'] = 'phone' + @_hash['phone_number'] = 'phone_number' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + address_line_1 + address_line_2 + admin_area_2 + admin_area_1 + postal_code + name + id + company + phone + phone_number + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(country_code:, address_line_1: SKIP, address_line_2: SKIP, + admin_area_2: SKIP, admin_area_1: SKIP, postal_code: SKIP, + name: SKIP, id: SKIP, company: SKIP, phone: SKIP, + phone_number: SKIP) + @address_line_1 = address_line_1 unless address_line_1 == SKIP + @address_line_2 = address_line_2 unless address_line_2 == SKIP + @admin_area_2 = admin_area_2 unless admin_area_2 == SKIP + @admin_area_1 = admin_area_1 unless admin_area_1 == SKIP + @postal_code = postal_code unless postal_code == SKIP + @country_code = country_code + @name = name unless name == SKIP + @id = id unless id == SKIP + @company = company unless company == SKIP + @phone = phone unless phone == SKIP + @phone_number = phone_number unless phone_number == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + country_code = hash.key?('country_code') ? hash['country_code'] : nil + address_line_1 = + hash.key?('address_line_1') ? hash['address_line_1'] : SKIP + address_line_2 = + hash.key?('address_line_2') ? hash['address_line_2'] : SKIP + admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP + admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP + postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + id = hash.key?('id') ? hash['id'] : SKIP + company = hash.key?('company') ? hash['company'] : SKIP + phone = hash.key?('phone') ? hash['phone'] : SKIP + phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number'] + + # Create object from extracted values. + AddressDetails.new(country_code: country_code, + address_line_1: address_line_1, + address_line_2: address_line_2, + admin_area_2: admin_area_2, + admin_area_1: admin_area_1, + postal_code: postal_code, + name: name, + id: id, + company: company, + phone: phone, + phone_number: phone_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/amount_breakdown.rb b/lib/pay_pal_restap_is/models/amount_breakdown.rb new file mode 100644 index 0000000..f86a214 --- /dev/null +++ b/lib/pay_pal_restap_is/models/amount_breakdown.rb @@ -0,0 +1,115 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The breakdown of the amount. Breakdown provides details such as total item + # amount, total tax amount, shipping, handling, insurance, and discounts, if + # any. + class AmountBreakdown < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :item_total + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :shipping + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :handling + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :tax_total + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :insurance + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :shipping_discount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :discount + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['item_total'] = 'item_total' + @_hash['shipping'] = 'shipping' + @_hash['handling'] = 'handling' + @_hash['tax_total'] = 'tax_total' + @_hash['insurance'] = 'insurance' + @_hash['shipping_discount'] = 'shipping_discount' + @_hash['discount'] = 'discount' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + item_total + shipping + handling + tax_total + insurance + shipping_discount + discount + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(item_total: SKIP, shipping: SKIP, handling: SKIP, + tax_total: SKIP, insurance: SKIP, shipping_discount: SKIP, + discount: SKIP) + @item_total = item_total unless item_total == SKIP + @shipping = shipping unless shipping == SKIP + @handling = handling unless handling == SKIP + @tax_total = tax_total unless tax_total == SKIP + @insurance = insurance unless insurance == SKIP + @shipping_discount = shipping_discount unless shipping_discount == SKIP + @discount = discount unless discount == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + item_total = Money.from_hash(hash['item_total']) if hash['item_total'] + shipping = Money.from_hash(hash['shipping']) if hash['shipping'] + handling = Money.from_hash(hash['handling']) if hash['handling'] + tax_total = Money.from_hash(hash['tax_total']) if hash['tax_total'] + insurance = Money.from_hash(hash['insurance']) if hash['insurance'] + shipping_discount = Money.from_hash(hash['shipping_discount']) if hash['shipping_discount'] + discount = Money.from_hash(hash['discount']) if hash['discount'] + + # Create object from extracted values. + AmountBreakdown.new(item_total: item_total, + shipping: shipping, + handling: handling, + tax_total: tax_total, + insurance: insurance, + shipping_discount: shipping_discount, + discount: discount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/amount_with_breakdown.rb b/lib/pay_pal_restap_is/models/amount_with_breakdown.rb new file mode 100644 index 0000000..9d9296c --- /dev/null +++ b/lib/pay_pal_restap_is/models/amount_with_breakdown.rb @@ -0,0 +1,80 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The total order amount with an optional breakdown that provides details, + # such as the total item amount, total tax amount, shipping, handling, + # insurance, and discounts, if any.
If you specify `amount.breakdown`, the + # amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` + # plus `insurance` minus `shipping_discount` minus discount.
The amount + # must be a positive number. For listed of supported currencies and decimal + # precision, see the PayPal REST APIs Currency Codes. + class AmountWithBreakdown < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The [three-character ISO-4217 currency + # code](/api/rest/reference/currency-codes/) that identifies the currency. + # @return [String] + attr_accessor :currency_code + + # The value, which might be:
  • An integer for currencies like `JPY` + # that are not typically fractional.
  • A decimal fraction for + # currencies like `TND` that are subdivided into thousandths.
For + # the required number of decimal places for a currency code, see [Currency + # Codes](/api/rest/reference/currency-codes/). + # @return [String] + attr_accessor :value + + # The breakdown of the amount. Breakdown provides details such as total item + # amount, total tax amount, shipping, handling, insurance, and discounts, if + # any. + # @return [AmountBreakdown] + attr_accessor :breakdown + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['currency_code'] = 'currency_code' + @_hash['value'] = 'value' + @_hash['breakdown'] = 'breakdown' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + breakdown + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(currency_code:, value:, breakdown: SKIP) + @currency_code = currency_code + @value = value + @breakdown = breakdown unless breakdown == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + currency_code = hash.key?('currency_code') ? hash['currency_code'] : nil + value = hash.key?('value') ? hash['value'] : nil + breakdown = AmountBreakdown.from_hash(hash['breakdown']) if hash['breakdown'] + + # Create object from extracted values. + AmountWithBreakdown.new(currency_code: currency_code, + value: value, + breakdown: breakdown) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_attributes.rb b/lib/pay_pal_restap_is/models/apple_pay_attributes.rb new file mode 100644 index 0000000..2a5291b --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_attributes.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with apple pay. + class ApplePayAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a customer in PayPal's system of record. + # @return [CustomerInformation] + attr_accessor :customer + + # Base vaulting specification. The object can be extended for specific use + # cases within each payment_source that supports vaulting. + # @return [VaultInstruction] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(customer: SKIP, vault: SKIP) + @customer = customer unless customer == SKIP + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + customer = CustomerInformation.from_hash(hash['customer']) if hash['customer'] + vault = VaultInstruction.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + ApplePayAttributes.new(customer: customer, + vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb b/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb new file mode 100644 index 0000000..edc00f7 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of Apple Pay. + class ApplePayAttributesResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a saved payment source. + # @return [VaultResponse] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault: SKIP) + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + ApplePayAttributesResponse.new(vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_card.rb b/lib/pay_pal_restap_is/models/apple_pay_card.rb new file mode 100644 index 0000000..7efdf41 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_card.rb @@ -0,0 +1,94 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment card to be used to fund a payment. Can be a credit or debit + # card. + class ApplePayCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['type'] = 'type' + @_hash['brand'] = 'brand' + @_hash['billing_address'] = 'billing_address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + type + brand + billing_address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, type: SKIP, brand: SKIP, + billing_address: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @type = type unless type == SKIP + @brand = brand unless brand == SKIP + @billing_address = billing_address unless billing_address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + + # Create object from extracted values. + ApplePayCard.new(name: name, + last_digits: last_digits, + type: type, + brand: brand, + billing_address: billing_address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_card_response.rb b/lib/pay_pal_restap_is/models/apple_pay_card_response.rb new file mode 100644 index 0000000..7d1bbc8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_card_response.rb @@ -0,0 +1,167 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The Card from Apple Pay Wallet used to fund the payment. + class ApplePayCardResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # Array of brands or networks associated with the card. + # @return [Array[CardBrand]] + attr_accessor :available_networks + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # Additional attributes associated with the use of this card. + # @return [CardAttributesResponse] + attr_accessor :attributes + + # Representation of card details as received in the request. + # @return [CardFromRequest] + attr_accessor :from_request + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # Bank Identification Number (BIN) details used to fund a payment. + # @return [BinDetails] + attr_accessor :bin_details + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['brand'] = 'brand' + @_hash['available_networks'] = 'available_networks' + @_hash['type'] = 'type' + @_hash['authentication_result'] = 'authentication_result' + @_hash['attributes'] = 'attributes' + @_hash['from_request'] = 'from_request' + @_hash['expiry'] = 'expiry' + @_hash['bin_details'] = 'bin_details' + @_hash['billing_address'] = 'billing_address' + @_hash['country_code'] = 'country_code' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + brand + available_networks + type + authentication_result + attributes + from_request + expiry + bin_details + billing_address + country_code + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, + available_networks: SKIP, type: SKIP, + authentication_result: SKIP, attributes: SKIP, + from_request: SKIP, expiry: SKIP, bin_details: SKIP, + billing_address: SKIP, country_code: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @brand = brand unless brand == SKIP + @available_networks = available_networks unless available_networks == SKIP + @type = type unless type == SKIP + @authentication_result = authentication_result unless authentication_result == SKIP + @attributes = attributes unless attributes == SKIP + @from_request = from_request unless from_request == SKIP + @expiry = expiry unless expiry == SKIP + @bin_details = bin_details unless bin_details == SKIP + @billing_address = billing_address unless billing_address == SKIP + @country_code = country_code unless country_code == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + available_networks = + hash.key?('available_networks') ? hash['available_networks'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + attributes = CardAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] + from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request'] + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + + # Create object from extracted values. + ApplePayCardResponse.new(name: name, + last_digits: last_digits, + brand: brand, + available_networks: available_networks, + type: type, + authentication_result: authentication_result, + attributes: attributes, + from_request: from_request, + expiry: expiry, + bin_details: bin_details, + billing_address: billing_address, + country_code: country_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb b/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb new file mode 100644 index 0000000..c649fb4 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb @@ -0,0 +1,95 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information about the Payment data obtained by decrypting Apple Pay token. + class ApplePayDecryptedTokenData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :transaction_amount + + # The payment card to use to fund a payment. Can be a credit or debit card. + # @return [ApplePayTokenizedCard] + attr_accessor :tokenized_card + + # Apple Pay Hex-encoded device manufacturer identifier. The pattern is + # defined by an external party and supports Unicode. + # @return [String] + attr_accessor :device_manufacturer_id + + # Indicates the type of payment data passed, in case of Non China the + # payment data is 3DSECURE and for China it is EMV. + # @return [ApplePayPaymentDataType] + attr_accessor :payment_data_type + + # Information about the decrypted apple pay payment data for the token like + # cryptogram, eci indicator. + # @return [ApplePayPaymentData] + attr_accessor :payment_data + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['transaction_amount'] = 'transaction_amount' + @_hash['tokenized_card'] = 'tokenized_card' + @_hash['device_manufacturer_id'] = 'device_manufacturer_id' + @_hash['payment_data_type'] = 'payment_data_type' + @_hash['payment_data'] = 'payment_data' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + transaction_amount + device_manufacturer_id + payment_data_type + payment_data + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(tokenized_card:, transaction_amount: SKIP, + device_manufacturer_id: SKIP, payment_data_type: SKIP, + payment_data: SKIP) + @transaction_amount = transaction_amount unless transaction_amount == SKIP + @tokenized_card = tokenized_card + @device_manufacturer_id = device_manufacturer_id unless device_manufacturer_id == SKIP + @payment_data_type = payment_data_type unless payment_data_type == SKIP + @payment_data = payment_data unless payment_data == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + tokenized_card = ApplePayTokenizedCard.from_hash(hash['tokenized_card']) if + hash['tokenized_card'] + transaction_amount = Money.from_hash(hash['transaction_amount']) if + hash['transaction_amount'] + device_manufacturer_id = + hash.key?('device_manufacturer_id') ? hash['device_manufacturer_id'] : SKIP + payment_data_type = + hash.key?('payment_data_type') ? hash['payment_data_type'] : SKIP + payment_data = ApplePayPaymentData.from_hash(hash['payment_data']) if hash['payment_data'] + + # Create object from extracted values. + ApplePayDecryptedTokenData.new(tokenized_card: tokenized_card, + transaction_amount: transaction_amount, + device_manufacturer_id: device_manufacturer_id, + payment_data_type: payment_data_type, + payment_data: payment_data) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb new file mode 100644 index 0000000..333adde --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb @@ -0,0 +1,83 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information about the decrypted apple pay payment data for the token like + # cryptogram, eci indicator. + class ApplePayPaymentData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Online payment cryptogram, as defined by 3D Secure. The pattern is defined + # by an external party and supports Unicode. + # @return [String] + attr_accessor :cryptogram + + # ECI indicator, as defined by 3- Secure. The pattern is defined by an + # external party and supports Unicode. + # @return [String] + attr_accessor :eci_indicator + + # Encoded Apple Pay EMV Payment Structure used for payments in China. The + # pattern is defined by an external party and supports Unicode. + # @return [String] + attr_accessor :emv_data + + # Bank Key encrypted Apple Pay PIN. The pattern is defined by an external + # party and supports Unicode. + # @return [String] + attr_accessor :pin + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['cryptogram'] = 'cryptogram' + @_hash['eci_indicator'] = 'eci_indicator' + @_hash['emv_data'] = 'emv_data' + @_hash['pin'] = 'pin' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + cryptogram + eci_indicator + emv_data + pin + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(cryptogram: SKIP, eci_indicator: SKIP, emv_data: SKIP, + pin: SKIP) + @cryptogram = cryptogram unless cryptogram == SKIP + @eci_indicator = eci_indicator unless eci_indicator == SKIP + @emv_data = emv_data unless emv_data == SKIP + @pin = pin unless pin == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP + eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP + emv_data = hash.key?('emv_data') ? hash['emv_data'] : SKIP + pin = hash.key?('pin') ? hash['pin'] : SKIP + + # Create object from extracted values. + ApplePayPaymentData.new(cryptogram: cryptogram, + eci_indicator: eci_indicator, + emv_data: emv_data, + pin: pin) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb new file mode 100644 index 0000000..d8604d0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb @@ -0,0 +1,24 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Indicates the type of payment data passed, in case of Non China the payment + # data is 3DSECURE and for China it is EMV. + class ApplePayPaymentDataType + APPLE_PAY_PAYMENT_DATA_TYPE = [ + # TODO: Write general description for ENUM_3DSECURE + ENUM_3DSECURE = '3DSECURE'.freeze, + + # TODO: Write general description for EMV + EMV = 'EMV'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb new file mode 100644 index 0000000..f610184 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb @@ -0,0 +1,114 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using ApplePay. + class ApplePayPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # ApplePay transaction identifier, this will be the unique identifier for + # this transaction provided by Apple. The pattern is defined by an external + # party and supports Unicode. + # @return [String] + attr_accessor :id + + # Encrypted ApplePay token, containing card information. This token would be + # base64encoded. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :token + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumber] + attr_accessor :phone_number + + # The Card from Apple Pay Wallet used to fund the payment. + # @return [ApplePayCardResponse] + attr_accessor :card + + # Additional attributes associated with the use of Apple Pay. + # @return [ApplePayAttributesResponse] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['token'] = 'token' + @_hash['name'] = 'name' + @_hash['email_address'] = 'email_address' + @_hash['phone_number'] = 'phone_number' + @_hash['card'] = 'card' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + token + name + email_address + phone_number + card + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, token: SKIP, name: SKIP, email_address: SKIP, + phone_number: SKIP, card: SKIP, attributes: SKIP) + @id = id unless id == SKIP + @token = token unless token == SKIP + @name = name unless name == SKIP + @email_address = email_address unless email_address == SKIP + @phone_number = phone_number unless phone_number == SKIP + @card = card unless card == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + token = hash.key?('token') ? hash['token'] : SKIP + name = hash.key?('name') ? hash['name'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] + card = ApplePayCardResponse.from_hash(hash['card']) if hash['card'] + attributes = ApplePayAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] + + # Create object from extracted values. + ApplePayPaymentObject.new(id: id, + token: token, + name: name, + email_address: email_address, + phone_number: phone_number, + card: card, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb new file mode 100644 index 0000000..c33531f --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb @@ -0,0 +1,51 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A resource representing a response for Apple Pay. + class ApplePayPaymentToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to be used to fund a payment. Can be a credit or debit + # card. + # @return [ApplePayCard] + attr_accessor :card + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP) + @card = card unless card == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = ApplePayCard.from_hash(hash['card']) if hash['card'] + + # Create object from extracted values. + ApplePayPaymentToken.new(card: card) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_request.rb b/lib/pay_pal_restap_is/models/apple_pay_request.rb new file mode 100644 index 0000000..07b9a0e --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_request.rb @@ -0,0 +1,137 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using ApplePay. + class ApplePayRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # ApplePay transaction identifier, this will be the unique identifier for + # this transaction provided by Apple. The pattern is defined by an external + # party and supports Unicode. + # @return [String] + attr_accessor :id + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumber] + attr_accessor :phone_number + + # Information about the Payment data obtained by decrypting Apple Pay token. + # @return [ApplePayDecryptedTokenData] + attr_accessor :decrypted_token + + # Provides additional details to process a payment using a `card` that has + # been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only + # with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ # @return [CardStoredCredential] + attr_accessor :stored_credential + + # The PayPal-generated ID for the vaulted payment source. This ID should be + # stored on the merchant's server so the saved payment source can be used + # for future transactions. + # @return [String] + attr_accessor :vault_id + + # Additional attributes associated with apple pay. + # @return [ApplePayAttributes] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['name'] = 'name' + @_hash['email_address'] = 'email_address' + @_hash['phone_number'] = 'phone_number' + @_hash['decrypted_token'] = 'decrypted_token' + @_hash['stored_credential'] = 'stored_credential' + @_hash['vault_id'] = 'vault_id' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + name + email_address + phone_number + decrypted_token + stored_credential + vault_id + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, name: SKIP, email_address: SKIP, + phone_number: SKIP, decrypted_token: SKIP, + stored_credential: SKIP, vault_id: SKIP, attributes: SKIP) + @id = id unless id == SKIP + @name = name unless name == SKIP + @email_address = email_address unless email_address == SKIP + @phone_number = phone_number unless phone_number == SKIP + @decrypted_token = decrypted_token unless decrypted_token == SKIP + @stored_credential = stored_credential unless stored_credential == SKIP + @vault_id = vault_id unless vault_id == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + name = hash.key?('name') ? hash['name'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] + decrypted_token = ApplePayDecryptedTokenData.from_hash(hash['decrypted_token']) if + hash['decrypted_token'] + stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if + hash['stored_credential'] + vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP + attributes = ApplePayAttributes.from_hash(hash['attributes']) if hash['attributes'] + + # Create object from extracted values. + ApplePayRequest.new(id: id, + name: name, + email_address: email_address, + phone_number: phone_number, + decrypted_token: decrypted_token, + stored_credential: stored_credential, + vault_id: vault_id, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb b/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb new file mode 100644 index 0000000..8e1b861 --- /dev/null +++ b/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb @@ -0,0 +1,113 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment card to use to fund a payment. Can be a credit or debit card. + class ApplePayTokenizedCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The primary account number (PAN) for the payment card. + # @return [String] + attr_accessor :number + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :card_type + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['number'] = 'number' + @_hash['expiry'] = 'expiry' + @_hash['card_type'] = 'card_type' + @_hash['type'] = 'type' + @_hash['brand'] = 'brand' + @_hash['billing_address'] = 'billing_address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + number + expiry + card_type + type + brand + billing_address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, number: SKIP, expiry: SKIP, card_type: SKIP, + type: SKIP, brand: SKIP, billing_address: SKIP) + @name = name unless name == SKIP + @number = number unless number == SKIP + @expiry = expiry unless expiry == SKIP + @card_type = card_type unless card_type == SKIP + @type = type unless type == SKIP + @brand = brand unless brand == SKIP + @billing_address = billing_address unless billing_address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + number = hash.key?('number') ? hash['number'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + card_type = hash.key?('card_type') ? hash['card_type'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + + # Create object from extracted values. + ApplePayTokenizedCard.new(name: name, + number: number, + expiry: expiry, + card_type: card_type, + type: type, + brand: brand, + billing_address: billing_address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/authentication_response.rb b/lib/pay_pal_restap_is/models/authentication_response.rb new file mode 100644 index 0000000..3a8da83 --- /dev/null +++ b/lib/pay_pal_restap_is/models/authentication_response.rb @@ -0,0 +1,61 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Results of Authentication such as 3D Secure. + class AuthenticationResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Liability shift indicator. The outcome of the issuer's authentication. + # @return [LiabilityShiftIndicator] + attr_accessor :liability_shift + + # Results of 3D Secure Authentication. + # @return [ThreeDSecureAuthenticationResponse] + attr_accessor :three_d_secure + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['liability_shift'] = 'liability_shift' + @_hash['three_d_secure'] = 'three_d_secure' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + liability_shift + three_d_secure + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(liability_shift: SKIP, three_d_secure: SKIP) + @liability_shift = liability_shift unless liability_shift == SKIP + @three_d_secure = three_d_secure unless three_d_secure == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + liability_shift = + hash.key?('liability_shift') ? hash['liability_shift'] : SKIP + three_d_secure = ThreeDSecureAuthenticationResponse.from_hash(hash['three_d_secure']) if + hash['three_d_secure'] + + # Create object from extracted values. + AuthenticationResponse.new(liability_shift: liability_shift, + three_d_secure: three_d_secure) + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization.rb b/lib/pay_pal_restap_is/models/authorization.rb new file mode 100644 index 0000000..ac5e18d --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization.rb @@ -0,0 +1,192 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The authorized payment transaction. + class Authorization < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status for the authorized payment. + # @return [AuthorizationStatus] + attr_accessor :status + + # The details of the authorized payment status. + # @return [AuthorizationStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the authorized payment. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :network_transaction_reference + + # The level of protection offered as defined by [PayPal Seller Protection + # for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtection] + attr_accessor :seller_protection + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :expiration_time + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['seller_protection'] = 'seller_protection' + @_hash['expiration_time'] = 'expiration_time' + @_hash['links'] = 'links' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + network_transaction_reference + seller_protection + expiration_time + links + create_time + update_time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + network_transaction_reference: SKIP, seller_protection: SKIP, + expiration_time: SKIP, links: SKIP, create_time: SKIP, + update_time: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @seller_protection = seller_protection unless seller_protection == SKIP + @expiration_time = expiration_time unless expiration_time == SKIP + @links = links unless links == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) + end + seller_protection = SellerProtection.from_hash(hash['seller_protection']) if + hash['seller_protection'] + expiration_time = + hash.key?('expiration_time') ? hash['expiration_time'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + + # Create object from extracted values. + Authorization.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + network_transaction_reference: network_transaction_reference, + seller_protection: seller_protection, + expiration_time: expiration_time, + links: links, + create_time: create_time, + update_time: update_time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb b/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb new file mode 100644 index 0000000..27e4f60 --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The reason why the authorized status is `PENDING`. + class AuthorizationIncompleteReason + AUTHORIZATION_INCOMPLETE_REASON = [ + # TODO: Write general description for PENDING_REVIEW + PENDING_REVIEW = 'PENDING_REVIEW'.freeze, + + # TODO: Write general description for DECLINED_BY_RISK_FRAUD_FILTERS + DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization_status.rb b/lib/pay_pal_restap_is/models/authorization_status.rb new file mode 100644 index 0000000..6a0d814 --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization_status.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status for the authorized payment. + class AuthorizationStatus + AUTHORIZATION_STATUS = [ + # TODO: Write general description for CREATED + CREATED = 'CREATED'.freeze, + + # TODO: Write general description for CAPTURED + CAPTURED = 'CAPTURED'.freeze, + + # TODO: Write general description for DENIED + DENIED = 'DENIED'.freeze, + + # TODO: Write general description for PARTIALLY_CAPTURED + PARTIALLY_CAPTURED = 'PARTIALLY_CAPTURED'.freeze, + + # TODO: Write general description for VOIDED + VOIDED = 'VOIDED'.freeze, + + # TODO: Write general description for PENDING + PENDING = 'PENDING'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization_status_details.rb b/lib/pay_pal_restap_is/models/authorization_status_details.rb new file mode 100644 index 0000000..5b75c41 --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization_status_details.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details of the authorized payment status. + class AuthorizationStatusDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The reason why the authorized status is `PENDING`. + # @return [AuthorizationIncompleteReason] + attr_accessor :reason + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['reason'] = 'reason' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + reason + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(reason: SKIP) + @reason = reason unless reason == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + reason = hash.key?('reason') ? hash['reason'] : SKIP + + # Create object from extracted values. + AuthorizationStatusDetails.new(reason: reason) + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization_status_with_details.rb b/lib/pay_pal_restap_is/models/authorization_status_with_details.rb new file mode 100644 index 0000000..d27ce8e --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization_status_with_details.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status fields and status details for an authorized payment. + class AuthorizationStatusWithDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status for the authorized payment. + # @return [AuthorizationStatus] + attr_accessor :status + + # The details of the authorized payment status. + # @return [AuthorizationStatusDetails] + attr_accessor :status_details + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + + # Create object from extracted values. + AuthorizationStatusWithDetails.new(status: status, + status_details: status_details) + end + end +end diff --git a/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb b/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb new file mode 100644 index 0000000..709d347 --- /dev/null +++ b/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb @@ -0,0 +1,205 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The authorization with additional payment details, such as risk assessment + # and processor response. These details are populated only for certain payment + # methods. + class AuthorizationWithAdditionalData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status for the authorized payment. + # @return [AuthorizationStatus] + attr_accessor :status + + # The details of the authorized payment status. + # @return [AuthorizationStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the authorized payment. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :network_transaction_reference + + # The level of protection offered as defined by [PayPal Seller Protection + # for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtection] + attr_accessor :seller_protection + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :expiration_time + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # The processor response information for payment requests, such as direct + # credit card transactions. + # @return [ProcessorResponse] + attr_accessor :processor_response + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['seller_protection'] = 'seller_protection' + @_hash['expiration_time'] = 'expiration_time' + @_hash['links'] = 'links' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash['processor_response'] = 'processor_response' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + network_transaction_reference + seller_protection + expiration_time + links + create_time + update_time + processor_response + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + network_transaction_reference: SKIP, seller_protection: SKIP, + expiration_time: SKIP, links: SKIP, create_time: SKIP, + update_time: SKIP, processor_response: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @seller_protection = seller_protection unless seller_protection == SKIP + @expiration_time = expiration_time unless expiration_time == SKIP + @links = links unless links == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + @processor_response = processor_response unless processor_response == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) + end + seller_protection = SellerProtection.from_hash(hash['seller_protection']) if + hash['seller_protection'] + expiration_time = + hash.key?('expiration_time') ? hash['expiration_time'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + processor_response = ProcessorResponse.from_hash(hash['processor_response']) if + hash['processor_response'] + + # Create object from extracted values. + AuthorizationWithAdditionalData.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + network_transaction_reference: network_transaction_reference, + seller_protection: seller_protection, + expiration_time: expiration_time, + links: links, + create_time: create_time, + update_time: update_time, + processor_response: processor_response) + end + end +end diff --git a/lib/pay_pal_restap_is/models/avs_code.rb b/lib/pay_pal_restap_is/models/avs_code.rb new file mode 100644 index 0000000..290418c --- /dev/null +++ b/lib/pay_pal_restap_is/models/avs_code.rb @@ -0,0 +1,90 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The address verification code for Visa, Discover, Mastercard, or American + # Express transactions. + class AVSCode + AVS_CODE = [ + # TODO: Write general description for A + A = 'A'.freeze, + + # TODO: Write general description for B + B = 'B'.freeze, + + # TODO: Write general description for C + C = 'C'.freeze, + + # TODO: Write general description for D + D = 'D'.freeze, + + # TODO: Write general description for E + E = 'E'.freeze, + + # TODO: Write general description for F + F = 'F'.freeze, + + # TODO: Write general description for G + G = 'G'.freeze, + + # TODO: Write general description for I + I = 'I'.freeze, + + # TODO: Write general description for M + M = 'M'.freeze, + + # TODO: Write general description for N + N = 'N'.freeze, + + # TODO: Write general description for P + P = 'P'.freeze, + + # TODO: Write general description for R + R = 'R'.freeze, + + # TODO: Write general description for S + S = 'S'.freeze, + + # TODO: Write general description for U + U = 'U'.freeze, + + # TODO: Write general description for W + W = 'W'.freeze, + + # TODO: Write general description for X + X = 'X'.freeze, + + # TODO: Write general description for Y + Y = 'Y'.freeze, + + # TODO: Write general description for Z + Z = 'Z'.freeze, + + # TODO: Write general description for NULL + NULL = 'Null'.freeze, + + # TODO: Write general description for ENUM_0 + ENUM_0 = '0'.freeze, + + # TODO: Write general description for ENUM_1 + ENUM_1 = '1'.freeze, + + # TODO: Write general description for ENUM_2 + ENUM_2 = '2'.freeze, + + # TODO: Write general description for ENUM_3 + ENUM_3 = '3'.freeze, + + # TODO: Write general description for ENUM_4 + ENUM_4 = '4'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/bancontact_payment_object.rb b/lib/pay_pal_restap_is/models/bancontact_payment_object.rb new file mode 100644 index 0000000..2780e11 --- /dev/null +++ b/lib/pay_pal_restap_is/models/bancontact_payment_object.rb @@ -0,0 +1,95 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay Bancontact. + class BancontactPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # The last digits of the card used to fund the Bancontact payment. + # @return [String] + attr_accessor :card_last_digits + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash['card_last_digits'] = 'card_last_digits' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + iban_last_chars + card_last_digits + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP, + iban_last_chars: SKIP, card_last_digits: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + @card_last_digits = card_last_digits unless card_last_digits == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + card_last_digits = + hash.key?('card_last_digits') ? hash['card_last_digits'] : SKIP + + # Create object from extracted values. + BancontactPaymentObject.new(name: name, + country_code: country_code, + bic: bic, + iban_last_chars: iban_last_chars, + card_last_digits: card_last_digits) + end + end +end diff --git a/lib/pay_pal_restap_is/models/bancontact_payment_request.rb b/lib/pay_pal_restap_is/models/bancontact_payment_request.rb new file mode 100644 index 0000000..4e6868a --- /dev/null +++ b/lib/pay_pal_restap_is/models/bancontact_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Bancontact. + class BancontactPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + BancontactPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/bank_payment_token.rb b/lib/pay_pal_restap_is/models/bank_payment_token.rb new file mode 100644 index 0000000..7e54433 --- /dev/null +++ b/lib/pay_pal_restap_is/models/bank_payment_token.rb @@ -0,0 +1,59 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Full representation of a Bank Payment Token. + class BankPaymentToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # A Resource representing a response of vaulted a ACH Debit Account. + # @return [ACHDebitResponse] + attr_accessor :ach_debit + + # A Resource representing a response of vaulted a ACH Debit Account. + # @return [SEPADebitResponse] + attr_accessor :sepa_debit + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['ach_debit'] = 'ach_debit' + @_hash['sepa_debit'] = 'sepa_debit' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + ach_debit + sepa_debit + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(ach_debit: SKIP, sepa_debit: SKIP) + @ach_debit = ach_debit unless ach_debit == SKIP + @sepa_debit = sepa_debit unless sepa_debit == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + ach_debit = ACHDebitResponse.from_hash(hash['ach_debit']) if hash['ach_debit'] + sepa_debit = SEPADebitResponse.from_hash(hash['sepa_debit']) if hash['sepa_debit'] + + # Create object from extracted values. + BankPaymentToken.new(ach_debit: ach_debit, + sepa_debit: sepa_debit) + end + end +end diff --git a/lib/pay_pal_restap_is/models/base_model.rb b/lib/pay_pal_restap_is/models/base_model.rb new file mode 100644 index 0000000..50f278e --- /dev/null +++ b/lib/pay_pal_restap_is/models/base_model.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Base model. + class BaseModel < CoreLibrary::BaseModel + # Returns a Hash representation of the current object. + def to_hash + # validating the model being serialized + self.class.validate(self) if self.class.respond_to?(:validate) + + hash = {} + instance_variables.each do |name| + value = instance_variable_get(name) + name = name[1..] + key = self.class.names.key?(name) ? self.class.names[name] : name + optional_fields = self.class.optionals + nullable_fields = self.class.nullables + if value.nil? + next unless nullable_fields.include?(name) + + if !optional_fields.include?(name) && !nullable_fields.include?(name) + raise ArgumentError, + "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value." + end + end + + hash[key] = nil + unless value.nil? + if respond_to?("to_custom_#{name}") + if (value.instance_of? Array) || (value.instance_of? Hash) + params = [hash, key] + hash[key] = send("to_custom_#{name}", *params) + else + hash[key] = send("to_custom_#{name}") + end + elsif respond_to?("to_union_type_#{name}") + hash[key] = send("to_union_type_#{name}") + elsif value.instance_of? Array + hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v } + elsif value.instance_of? Hash + hash[key] = {} + value.each do |k, v| + hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v + end + else + hash[key] = value.is_a?(BaseModel) ? value.to_hash : value + end + end + end + hash + end + + # Returns a JSON representation of the curent object. + def to_json(options = {}) + hash = to_hash + hash.to_json(options) + end + end +end diff --git a/lib/pay_pal_restap_is/models/bin_details.rb b/lib/pay_pal_restap_is/models/bin_details.rb new file mode 100644 index 0000000..50b36b8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/bin_details.rb @@ -0,0 +1,88 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Bank Identification Number (BIN) details used to fund a payment. + class BinDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The Bank Identification Number (BIN) signifies the number that is being + # used to identify the granular level details (except the PII information) + # of the card. + # @return [String] + attr_accessor :bin + + # The issuer of the card instrument. + # @return [String] + attr_accessor :issuing_bank + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :bin_country_code + + # The type of card product assigned to the BIN by the issuer. These values + # are defined by the issuer and may change over time. Some examples include: + # PREPAID_GIFT, CONSUMER, CORPORATE. + # @return [Array[String]] + attr_accessor :products + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['bin'] = 'bin' + @_hash['issuing_bank'] = 'issuing_bank' + @_hash['bin_country_code'] = 'bin_country_code' + @_hash['products'] = 'products' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + bin + issuing_bank + bin_country_code + products + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(bin: SKIP, issuing_bank: SKIP, bin_country_code: SKIP, + products: SKIP) + @bin = bin unless bin == SKIP + @issuing_bank = issuing_bank unless issuing_bank == SKIP + @bin_country_code = bin_country_code unless bin_country_code == SKIP + @products = products unless products == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + bin = hash.key?('bin') ? hash['bin'] : SKIP + issuing_bank = hash.key?('issuing_bank') ? hash['issuing_bank'] : SKIP + bin_country_code = + hash.key?('bin_country_code') ? hash['bin_country_code'] : SKIP + products = hash.key?('products') ? hash['products'] : SKIP + + # Create object from extracted values. + BinDetails.new(bin: bin, + issuing_bank: issuing_bank, + bin_country_code: bin_country_code, + products: products) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_experience_context.rb b/lib/pay_pal_restap_is/models/blik_experience_context.rb new file mode 100644 index 0000000..757fa81 --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_experience_context.rb @@ -0,0 +1,122 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer experience during the approval process for the BLIK + # payment. + class BLIKExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The location from which the shipping address is derived. + # @return [ShippingPreference] + attr_accessor :shipping_preference + + # Describes the URL. + # @return [String] + attr_accessor :return_url + + # Describes the URL. + # @return [String] + attr_accessor :cancel_url + + # An Internet Protocol address (IP address). This address assigns a + # numerical label to each device that is connected to a computer network + # through the Internet Protocol. Supports IPv4 and IPv6 addresses. + # @return [String] + attr_accessor :consumer_ip + + # The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS + # X x.y; rv:42.0). + # @return [String] + attr_accessor :consumer_user_agent + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['consumer_ip'] = 'consumer_ip' + @_hash['consumer_user_agent'] = 'consumer_user_agent' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + shipping_preference + return_url + cancel_url + consumer_ip + consumer_user_agent + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, locale: SKIP, + shipping_preference: ShippingPreference::GET_FROM_FILE, + return_url: SKIP, cancel_url: SKIP, consumer_ip: SKIP, + consumer_user_agent: SKIP) + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @consumer_ip = consumer_ip unless consumer_ip == SKIP + @consumer_user_agent = consumer_user_agent unless consumer_user_agent == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + shipping_preference = + hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + consumer_ip = hash.key?('consumer_ip') ? hash['consumer_ip'] : SKIP + consumer_user_agent = + hash.key?('consumer_user_agent') ? hash['consumer_user_agent'] : SKIP + + # Create object from extracted values. + BLIKExperienceContext.new(brand_name: brand_name, + locale: locale, + shipping_preference: shipping_preference, + return_url: return_url, + cancel_url: cancel_url, + consumer_ip: consumer_ip, + consumer_user_agent: consumer_user_agent) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb b/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb new file mode 100644 index 0000000..928eb37 --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb @@ -0,0 +1,48 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using BLIK level_0 flow. + class BLIKLevel0PaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The 6-digit code used to authenticate a consumer within BLIK. + # @return [String] + attr_accessor :auth_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['auth_code'] = 'auth_code' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(auth_code:) + @auth_code = auth_code + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + auth_code = hash.key?('auth_code') ? hash['auth_code'] : nil + + # Create object from extracted values. + BLIKLevel0PaymentObject.new(auth_code: auth_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb b/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb new file mode 100644 index 0000000..c9f5c15 --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb @@ -0,0 +1,52 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using BLIK one-click flow. + class BLIKOneClickPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The merchant generated, unique reference serving as a primary identifier + # for accounts connected between Blik and a merchant. + # @return [String] + attr_accessor :consumer_reference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['consumer_reference'] = 'consumer_reference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + consumer_reference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(consumer_reference: SKIP) + @consumer_reference = consumer_reference unless consumer_reference == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + consumer_reference = + hash.key?('consumer_reference') ? hash['consumer_reference'] : SKIP + + # Create object from extracted values. + BLIKOneClickPaymentObject.new(consumer_reference: consumer_reference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb b/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb new file mode 100644 index 0000000..58b8f2f --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb @@ -0,0 +1,82 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using BLIK one-click flow. + class BLIKOneClickPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The 6-digit code used to authenticate a consumer within BLIK. + # @return [String] + attr_accessor :auth_code + + # The merchant generated, unique reference serving as a primary identifier + # for accounts connected between Blik and a merchant. + # @return [String] + attr_accessor :consumer_reference + + # A bank defined identifier used as a display name to allow the payer to + # differentiate between multiple registered bank accounts. + # @return [String] + attr_accessor :alias_label + + # A Blik-defined identifier for a specific Blik-enabled bank account that is + # associated with a given merchant. Used only in conjunction with a Consumer + # Reference. + # @return [String] + attr_accessor :alias_key + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['auth_code'] = 'auth_code' + @_hash['consumer_reference'] = 'consumer_reference' + @_hash['alias_label'] = 'alias_label' + @_hash['alias_key'] = 'alias_key' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + auth_code + alias_label + alias_key + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(consumer_reference:, auth_code: SKIP, alias_label: SKIP, + alias_key: SKIP) + @auth_code = auth_code unless auth_code == SKIP + @consumer_reference = consumer_reference + @alias_label = alias_label unless alias_label == SKIP + @alias_key = alias_key unless alias_key == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + consumer_reference = + hash.key?('consumer_reference') ? hash['consumer_reference'] : nil + auth_code = hash.key?('auth_code') ? hash['auth_code'] : SKIP + alias_label = hash.key?('alias_label') ? hash['alias_label'] : SKIP + alias_key = hash.key?('alias_key') ? hash['alias_key'] : SKIP + + # Create object from extracted values. + BLIKOneClickPaymentRequest.new(consumer_reference: consumer_reference, + auth_code: auth_code, + alias_label: alias_label, + alias_key: alias_key) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_payment_object.rb b/lib/pay_pal_restap_is/models/blik_payment_object.rb new file mode 100644 index 0000000..9f85236 --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_payment_object.rb @@ -0,0 +1,86 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using BLIK. + class BLIKPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email + + # Information used to pay using BLIK one-click flow. + # @return [BLIKOneClickPaymentObject] + attr_accessor :one_click + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['email'] = 'email' + @_hash['one_click'] = 'one_click' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + email + one_click + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, email: SKIP, one_click: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @email = email unless email == SKIP + @one_click = one_click unless one_click == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + email = hash.key?('email') ? hash['email'] : SKIP + one_click = BLIKOneClickPaymentObject.from_hash(hash['one_click']) if hash['one_click'] + + # Create object from extracted values. + BLIKPaymentObject.new(name: name, + country_code: country_code, + email: email, + one_click: one_click) + end + end +end diff --git a/lib/pay_pal_restap_is/models/blik_payment_request.rb b/lib/pay_pal_restap_is/models/blik_payment_request.rb new file mode 100644 index 0000000..4f4d5d5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/blik_payment_request.rb @@ -0,0 +1,105 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using BLIK. + class BLIKPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email + + # Customizes the payer experience during the approval process for the BLIK + # payment. + # @return [BLIKExperienceContext] + attr_accessor :experience_context + + # Information used to pay using BLIK level_0 flow. + # @return [BLIKLevel0PaymentObject] + attr_accessor :level_0 + + # Information used to pay using BLIK one-click flow. + # @return [BLIKOneClickPaymentRequest] + attr_accessor :one_click + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['email'] = 'email' + @_hash['experience_context'] = 'experience_context' + @_hash['level_0'] = 'level_0' + @_hash['one_click'] = 'one_click' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email + experience_context + level_0 + one_click + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, email: SKIP, experience_context: SKIP, + level_0: SKIP, one_click: SKIP) + @name = name + @country_code = country_code + @email = email unless email == SKIP + @experience_context = experience_context unless experience_context == SKIP + @level_0 = level_0 unless level_0 == SKIP + @one_click = one_click unless one_click == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + email = hash.key?('email') ? hash['email'] : SKIP + experience_context = BLIKExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + level_0 = BLIKLevel0PaymentObject.from_hash(hash['level_0']) if hash['level_0'] + one_click = BLIKOneClickPaymentRequest.from_hash(hash['one_click']) if hash['one_click'] + + # Create object from extracted values. + BLIKPaymentRequest.new(name: name, + country_code: country_code, + email: email, + experience_context: experience_context, + level_0: level_0, + one_click: one_click) + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture.rb b/lib/pay_pal_restap_is/models/capture.rb new file mode 100644 index 0000000..d954f92 --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture.rb @@ -0,0 +1,228 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A captured payment. + class Capture < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status of the captured payment. + # @return [CaptureStatus] + attr_accessor :status + + # The details of the captured payment status. + # @return [CaptureStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the captured payment. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :network_transaction_reference + + # The level of protection offered as defined by [PayPal Seller Protection + # for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtection] + attr_accessor :seller_protection + + # Indicates whether you can make additional captures against the authorized + # payment. Set to `true` if you do not intend to capture additional payments + # against the authorization. Set to `false` if you intend to capture + # additional payments against the authorization. + # @return [TrueClass | FalseClass] + attr_accessor :final_capture + + # The detailed breakdown of the capture activity. This is not available for + # transactions that are in pending state. + # @return [SellerReceivableBreakdown] + attr_accessor :seller_receivable_breakdown + + # The funds that are held on behalf of the merchant. + # @return [DisbursementMode] + attr_accessor :disbursement_mode + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The processor response information for payment requests, such as direct + # credit card transactions. + # @return [ProcessorResponse] + attr_accessor :processor_response + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['seller_protection'] = 'seller_protection' + @_hash['final_capture'] = 'final_capture' + @_hash['seller_receivable_breakdown'] = 'seller_receivable_breakdown' + @_hash['disbursement_mode'] = 'disbursement_mode' + @_hash['links'] = 'links' + @_hash['processor_response'] = 'processor_response' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + network_transaction_reference + seller_protection + final_capture + seller_receivable_breakdown + disbursement_mode + links + processor_response + create_time + update_time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + network_transaction_reference: SKIP, seller_protection: SKIP, + final_capture: false, seller_receivable_breakdown: SKIP, + disbursement_mode: DisbursementMode::INSTANT, links: SKIP, + processor_response: SKIP, create_time: SKIP, + update_time: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @seller_protection = seller_protection unless seller_protection == SKIP + @final_capture = final_capture unless final_capture == SKIP + unless seller_receivable_breakdown == SKIP + @seller_receivable_breakdown = + seller_receivable_breakdown + end + @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP + @links = links unless links == SKIP + @processor_response = processor_response unless processor_response == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = CaptureStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) + end + seller_protection = SellerProtection.from_hash(hash['seller_protection']) if + hash['seller_protection'] + final_capture = hash['final_capture'] ||= false + if hash['seller_receivable_breakdown'] + seller_receivable_breakdown = SellerReceivableBreakdown.from_hash(hash['seller_receivable_breakdown']) + end + disbursement_mode = + hash['disbursement_mode'] ||= DisbursementMode::INSTANT + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + processor_response = ProcessorResponse.from_hash(hash['processor_response']) if + hash['processor_response'] + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + + # Create object from extracted values. + Capture.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + network_transaction_reference: network_transaction_reference, + seller_protection: seller_protection, + final_capture: final_capture, + seller_receivable_breakdown: seller_receivable_breakdown, + disbursement_mode: disbursement_mode, + links: links, + processor_response: processor_response, + create_time: create_time, + update_time: update_time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb b/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb new file mode 100644 index 0000000..9dabf7d --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb @@ -0,0 +1,55 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The reason why the captured payment status is `PENDING` or `DENIED`. + class CaptureIncompleteReason + CAPTURE_INCOMPLETE_REASON = [ + # TODO: Write general description for BUYER_COMPLAINT + BUYER_COMPLAINT = 'BUYER_COMPLAINT'.freeze, + + # TODO: Write general description for CHARGEBACK + CHARGEBACK = 'CHARGEBACK'.freeze, + + # TODO: Write general description for ECHECK + ECHECK = 'ECHECK'.freeze, + + # TODO: Write general description for INTERNATIONAL_WITHDRAWAL + INTERNATIONAL_WITHDRAWAL = 'INTERNATIONAL_WITHDRAWAL'.freeze, + + # TODO: Write general description for OTHER + OTHER = 'OTHER'.freeze, + + # TODO: Write general description for PENDING_REVIEW + PENDING_REVIEW = 'PENDING_REVIEW'.freeze, + + # TODO: Write general description for + # RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION + RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION = 'RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION'.freeze, + + # TODO: Write general description for REFUNDED + REFUNDED = 'REFUNDED'.freeze, + + # TODO: Write general description for + # TRANSACTION_APPROVED_AWAITING_FUNDING + TRANSACTION_APPROVED_AWAITING_FUNDING = 'TRANSACTION_APPROVED_AWAITING_FUNDING'.freeze, + + # TODO: Write general description for UNILATERAL + UNILATERAL = 'UNILATERAL'.freeze, + + # TODO: Write general description for VERIFICATION_REQUIRED + VERIFICATION_REQUIRED = 'VERIFICATION_REQUIRED'.freeze, + + # TODO: Write general description for DECLINED_BY_RISK_FRAUD_FILTERS + DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_payment_instruction.rb b/lib/pay_pal_restap_is/models/capture_payment_instruction.rb new file mode 100644 index 0000000..877dbda --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_payment_instruction.rb @@ -0,0 +1,89 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Any additional payment instructions to be consider during payment + # processing. This processing instruction is applicable for Capturing an order + # or Authorizing an Order. + class CapturePaymentInstruction < BaseModel + SKIP = Object.new + private_constant :SKIP + + # An array of platform or partner fees, commissions, or brokerage fees that + # associated with the captured payment. + # @return [Array[PlatformFee]] + attr_accessor :platform_fees + + # The funds that are held on behalf of the merchant. + # @return [DisbursementMode] + attr_accessor :disbursement_mode + + # FX identifier generated returned by PayPal to be used for payment + # processing in order to honor FX rate (for eligible integrations) to be + # used when amount is settled/received into the payee account. + # @return [String] + attr_accessor :payee_receivable_fx_rate_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['platform_fees'] = 'platform_fees' + @_hash['disbursement_mode'] = 'disbursement_mode' + @_hash['payee_receivable_fx_rate_id'] = 'payee_receivable_fx_rate_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + platform_fees + disbursement_mode + payee_receivable_fx_rate_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(platform_fees: SKIP, + disbursement_mode: DisbursementMode::INSTANT, + payee_receivable_fx_rate_id: SKIP) + @platform_fees = platform_fees unless platform_fees == SKIP + @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP + unless payee_receivable_fx_rate_id == SKIP + @payee_receivable_fx_rate_id = + payee_receivable_fx_rate_id + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + # Parameter is an array, so we need to iterate through it + platform_fees = nil + unless hash['platform_fees'].nil? + platform_fees = [] + hash['platform_fees'].each do |structure| + platform_fees << (PlatformFee.from_hash(structure) if structure) + end + end + + platform_fees = SKIP unless hash.key?('platform_fees') + disbursement_mode = + hash['disbursement_mode'] ||= DisbursementMode::INSTANT + payee_receivable_fx_rate_id = + hash.key?('payee_receivable_fx_rate_id') ? hash['payee_receivable_fx_rate_id'] : SKIP + + # Create object from extracted values. + CapturePaymentInstruction.new(platform_fees: platform_fees, + disbursement_mode: disbursement_mode, + payee_receivable_fx_rate_id: payee_receivable_fx_rate_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_request.rb b/lib/pay_pal_restap_is/models/capture_request.rb new file mode 100644 index 0000000..8c88d83 --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_request.rb @@ -0,0 +1,108 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # CaptureRequest Model. + class CaptureRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # An informational note about this settlement. Appears in both the payer's + # transaction history and the emails that the payer receives. + # @return [String] + attr_accessor :note_to_payer + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # Indicates whether you can make additional captures against the authorized + # payment. Set to `true` if you do not intend to capture additional payments + # against the authorization. Set to `false` if you intend to capture + # additional payments against the authorization. + # @return [TrueClass | FalseClass] + attr_accessor :final_capture + + # Any additional payment instructions to be consider during payment + # processing. This processing instruction is applicable for Capturing an + # order or Authorizing an Order. + # @return [CapturePaymentInstruction] + attr_accessor :payment_instruction + + # The payment descriptor on the payer's account statement. + # @return [String] + attr_accessor :soft_descriptor + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['invoice_id'] = 'invoice_id' + @_hash['note_to_payer'] = 'note_to_payer' + @_hash['amount'] = 'amount' + @_hash['final_capture'] = 'final_capture' + @_hash['payment_instruction'] = 'payment_instruction' + @_hash['soft_descriptor'] = 'soft_descriptor' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + invoice_id + note_to_payer + amount + final_capture + payment_instruction + soft_descriptor + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(invoice_id: SKIP, note_to_payer: SKIP, amount: SKIP, + final_capture: false, payment_instruction: SKIP, + soft_descriptor: SKIP) + @invoice_id = invoice_id unless invoice_id == SKIP + @note_to_payer = note_to_payer unless note_to_payer == SKIP + @amount = amount unless amount == SKIP + @final_capture = final_capture unless final_capture == SKIP + @payment_instruction = payment_instruction unless payment_instruction == SKIP + @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + final_capture = hash['final_capture'] ||= false + payment_instruction = CapturePaymentInstruction.from_hash(hash['payment_instruction']) if + hash['payment_instruction'] + soft_descriptor = + hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP + + # Create object from extracted values. + CaptureRequest.new(invoice_id: invoice_id, + note_to_payer: note_to_payer, + amount: amount, + final_capture: final_capture, + payment_instruction: payment_instruction, + soft_descriptor: soft_descriptor) + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_status.rb b/lib/pay_pal_restap_is/models/capture_status.rb new file mode 100644 index 0000000..2e22343 --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_status.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status of the captured payment. + class CaptureStatus + CAPTURE_STATUS = [ + # TODO: Write general description for COMPLETED + COMPLETED = 'COMPLETED'.freeze, + + # TODO: Write general description for DECLINED + DECLINED = 'DECLINED'.freeze, + + # TODO: Write general description for PARTIALLY_REFUNDED + PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'.freeze, + + # TODO: Write general description for PENDING + PENDING = 'PENDING'.freeze, + + # TODO: Write general description for REFUNDED + REFUNDED = 'REFUNDED'.freeze, + + # TODO: Write general description for FAILED + FAILED = 'FAILED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_status_details.rb b/lib/pay_pal_restap_is/models/capture_status_details.rb new file mode 100644 index 0000000..11fda0c --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_status_details.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details of the captured payment status. + class CaptureStatusDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The reason why the captured payment status is `PENDING` or `DENIED`. + # @return [CaptureIncompleteReason] + attr_accessor :reason + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['reason'] = 'reason' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + reason + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(reason: SKIP) + @reason = reason unless reason == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + reason = hash.key?('reason') ? hash['reason'] : SKIP + + # Create object from extracted values. + CaptureStatusDetails.new(reason: reason) + end + end +end diff --git a/lib/pay_pal_restap_is/models/capture_status_with_details.rb b/lib/pay_pal_restap_is/models/capture_status_with_details.rb new file mode 100644 index 0000000..eb496df --- /dev/null +++ b/lib/pay_pal_restap_is/models/capture_status_with_details.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status and status details of a captured payment. + class CaptureStatusWithDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status of the captured payment. + # @return [CaptureStatus] + attr_accessor :status + + # The details of the captured payment status. + # @return [CaptureStatusDetails] + attr_accessor :status_details + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = CaptureStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + + # Create object from extracted values. + CaptureStatusWithDetails.new(status: status, + status_details: status_details) + end + end +end diff --git a/lib/pay_pal_restap_is/models/captured_payment.rb b/lib/pay_pal_restap_is/models/captured_payment.rb new file mode 100644 index 0000000..a2a61a5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/captured_payment.rb @@ -0,0 +1,248 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A captured payment. + class CapturedPayment < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status of the captured payment. + # @return [CaptureStatus] + attr_accessor :status + + # The details of the captured payment status. + # @return [CaptureStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the captured payment. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :network_transaction_reference + + # The level of protection offered as defined by [PayPal Seller Protection + # for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtection] + attr_accessor :seller_protection + + # Indicates whether you can make additional captures against the authorized + # payment. Set to `true` if you do not intend to capture additional payments + # against the authorization. Set to `false` if you intend to capture + # additional payments against the authorization. + # @return [TrueClass | FalseClass] + attr_accessor :final_capture + + # The detailed breakdown of the capture activity. This is not available for + # transactions that are in pending state. + # @return [SellerReceivableBreakdown] + attr_accessor :seller_receivable_breakdown + + # The funds that are held on behalf of the merchant. + # @return [DisbursementMode] + attr_accessor :disbursement_mode + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The processor response information for payment requests, such as direct + # credit card transactions. + # @return [ProcessorResponse] + attr_accessor :processor_response + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # The supplementary data. + # @return [PaymentSupplementaryData] + attr_accessor :supplementary_data + + # The details for the merchant who receives the funds and fulfills the + # order. The merchant is also known as the payee. + # @return [Payee] + attr_accessor :payee + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['seller_protection'] = 'seller_protection' + @_hash['final_capture'] = 'final_capture' + @_hash['seller_receivable_breakdown'] = 'seller_receivable_breakdown' + @_hash['disbursement_mode'] = 'disbursement_mode' + @_hash['links'] = 'links' + @_hash['processor_response'] = 'processor_response' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash['supplementary_data'] = 'supplementary_data' + @_hash['payee'] = 'payee' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + network_transaction_reference + seller_protection + final_capture + seller_receivable_breakdown + disbursement_mode + links + processor_response + create_time + update_time + supplementary_data + payee + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + network_transaction_reference: SKIP, seller_protection: SKIP, + final_capture: false, seller_receivable_breakdown: SKIP, + disbursement_mode: DisbursementMode::INSTANT, links: SKIP, + processor_response: SKIP, create_time: SKIP, + update_time: SKIP, supplementary_data: SKIP, payee: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @seller_protection = seller_protection unless seller_protection == SKIP + @final_capture = final_capture unless final_capture == SKIP + unless seller_receivable_breakdown == SKIP + @seller_receivable_breakdown = + seller_receivable_breakdown + end + @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP + @links = links unless links == SKIP + @processor_response = processor_response unless processor_response == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + @supplementary_data = supplementary_data unless supplementary_data == SKIP + @payee = payee unless payee == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = CaptureStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) + end + seller_protection = SellerProtection.from_hash(hash['seller_protection']) if + hash['seller_protection'] + final_capture = hash['final_capture'] ||= false + if hash['seller_receivable_breakdown'] + seller_receivable_breakdown = SellerReceivableBreakdown.from_hash(hash['seller_receivable_breakdown']) + end + disbursement_mode = + hash['disbursement_mode'] ||= DisbursementMode::INSTANT + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + processor_response = ProcessorResponse.from_hash(hash['processor_response']) if + hash['processor_response'] + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if + hash['supplementary_data'] + payee = Payee.from_hash(hash['payee']) if hash['payee'] + + # Create object from extracted values. + CapturedPayment.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + network_transaction_reference: network_transaction_reference, + seller_protection: seller_protection, + final_capture: final_capture, + seller_receivable_breakdown: seller_receivable_breakdown, + disbursement_mode: disbursement_mode, + links: links, + processor_response: processor_response, + create_time: create_time, + update_time: update_time, + supplementary_data: supplementary_data, + payee: payee) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_attributes.rb b/lib/pay_pal_restap_is/models/card_attributes.rb new file mode 100644 index 0000000..bd0c3e3 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_attributes.rb @@ -0,0 +1,70 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of this card. + class CardAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a customer in PayPal's system of record. + # @return [CustomerInformation] + attr_accessor :customer + + # Basic vault instruction specification that can be extended by specific + # payment sources that supports vaulting. + # @return [VaultInstructionBase] + attr_accessor :vault + + # The API caller can opt in to verify the card through PayPal offered + # verification services (e.g. Smart Dollar Auth, 3DS). + # @return [CardVerification] + attr_accessor :verification + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['vault'] = 'vault' + @_hash['verification'] = 'verification' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + vault + verification + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(customer: SKIP, vault: SKIP, verification: SKIP) + @customer = customer unless customer == SKIP + @vault = vault unless vault == SKIP + @verification = verification unless verification == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + customer = CustomerInformation.from_hash(hash['customer']) if hash['customer'] + vault = VaultInstructionBase.from_hash(hash['vault']) if hash['vault'] + verification = CardVerification.from_hash(hash['verification']) if hash['verification'] + + # Create object from extracted values. + CardAttributes.new(customer: customer, + vault: vault, + verification: verification) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_attributes_response.rb b/lib/pay_pal_restap_is/models/card_attributes_response.rb new file mode 100644 index 0000000..d685ef1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_attributes_response.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of this card. + class CardAttributesResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a saved payment source. + # @return [VaultResponse] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault: SKIP) + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + CardAttributesResponse.new(vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_brand.rb b/lib/pay_pal_restap_is/models/card_brand.rb new file mode 100644 index 0000000..0af81c0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_brand.rb @@ -0,0 +1,90 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + class CardBrand + CARD_BRAND = [ + # TODO: Write general description for VISA + VISA = 'VISA'.freeze, + + # TODO: Write general description for MASTERCARD + MASTERCARD = 'MASTERCARD'.freeze, + + # TODO: Write general description for DISCOVER + DISCOVER = 'DISCOVER'.freeze, + + # TODO: Write general description for AMEX + AMEX = 'AMEX'.freeze, + + # TODO: Write general description for SOLO + SOLO = 'SOLO'.freeze, + + # TODO: Write general description for JCB + JCB = 'JCB'.freeze, + + # TODO: Write general description for STAR + STAR = 'STAR'.freeze, + + # TODO: Write general description for DELTA + DELTA = 'DELTA'.freeze, + + # TODO: Write general description for SWITCH + SWITCH = 'SWITCH'.freeze, + + # TODO: Write general description for MAESTRO + MAESTRO = 'MAESTRO'.freeze, + + # TODO: Write general description for CB_NATIONALE + CB_NATIONALE = 'CB_NATIONALE'.freeze, + + # TODO: Write general description for CONFIGOGA + CONFIGOGA = 'CONFIGOGA'.freeze, + + # TODO: Write general description for CONFIDIS + CONFIDIS = 'CONFIDIS'.freeze, + + # TODO: Write general description for ELECTRON + ELECTRON = 'ELECTRON'.freeze, + + # TODO: Write general description for CETELEM + CETELEM = 'CETELEM'.freeze, + + # TODO: Write general description for CHINA_UNION_PAY + CHINA_UNION_PAY = 'CHINA_UNION_PAY'.freeze, + + # TODO: Write general description for DINERS + DINERS = 'DINERS'.freeze, + + # TODO: Write general description for ELO + ELO = 'ELO'.freeze, + + # TODO: Write general description for HIPER + HIPER = 'HIPER'.freeze, + + # TODO: Write general description for HIPERCARD + HIPERCARD = 'HIPERCARD'.freeze, + + # TODO: Write general description for RUPAY + RUPAY = 'RUPAY'.freeze, + + # TODO: Write general description for GE + GE = 'GE'.freeze, + + # TODO: Write general description for SYNCHRONY + SYNCHRONY = 'SYNCHRONY'.freeze, + + # TODO: Write general description for UNKNOWN + UNKNOWN = 'UNKNOWN'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_experience_context.rb b/lib/pay_pal_restap_is/models/card_experience_context.rb new file mode 100644 index 0000000..7497220 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_experience_context.rb @@ -0,0 +1,59 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer experience during the 3DS Approval for payment. + class CardExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Describes the URL. + # @return [String] + attr_accessor :return_url + + # Describes the URL. + # @return [String] + attr_accessor :cancel_url + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + return_url + cancel_url + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(return_url: SKIP, cancel_url: SKIP) + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + + # Create object from extracted values. + CardExperienceContext.new(return_url: return_url, + cancel_url: cancel_url) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_from_request.rb b/lib/pay_pal_restap_is/models/card_from_request.rb new file mode 100644 index 0000000..1e776c0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_from_request.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Representation of card details as received in the request. + class CardFromRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['expiry'] = 'expiry' + @_hash['last_digits'] = 'last_digits' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + expiry + last_digits + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(expiry: SKIP, last_digits: SKIP) + @expiry = expiry unless expiry == SKIP + @last_digits = last_digits unless last_digits == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + + # Create object from extracted values. + CardFromRequest.new(expiry: expiry, + last_digits: last_digits) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_payment_token.rb b/lib/pay_pal_restap_is/models/card_payment_token.rb new file mode 100644 index 0000000..0afea31 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_payment_token.rb @@ -0,0 +1,166 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Full representation of a Card Payment Token including network token. + class CardPaymentToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # Address request details. + # @return [AddressDetails] + attr_accessor :billing_address + + # Verification status of Card. + # @return [String] + attr_accessor :verification_status + + # Card Verification details including the authorization details and 3D + # SECURE details. + # @return [CardVerificationDetails] + attr_accessor :verification + + # Previous network transaction reference including id in response. + # @return [NetworkTransactionReferenceEntity] + attr_accessor :network_transaction_reference + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # Bank Identification Number (BIN) details used to fund a payment. + # @return [BinDetails] + attr_accessor :bin_details + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # Type of card. i.e Credit, Debit and so on. + # @return [Object] + attr_accessor :network_token + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['brand'] = 'brand' + @_hash['expiry'] = 'expiry' + @_hash['billing_address'] = 'billing_address' + @_hash['verification_status'] = 'verification_status' + @_hash['verification'] = 'verification' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['authentication_result'] = 'authentication_result' + @_hash['bin_details'] = 'bin_details' + @_hash['type'] = 'type' + @_hash['network_token'] = 'network_token' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + brand + expiry + billing_address + verification_status + verification + network_transaction_reference + authentication_result + bin_details + type + network_token + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, + billing_address: SKIP, verification_status: SKIP, + verification: SKIP, network_transaction_reference: SKIP, + authentication_result: SKIP, bin_details: SKIP, type: SKIP, + network_token: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @brand = brand unless brand == SKIP + @expiry = expiry unless expiry == SKIP + @billing_address = billing_address unless billing_address == SKIP + @verification_status = verification_status unless verification_status == SKIP + @verification = verification unless verification == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @authentication_result = authentication_result unless authentication_result == SKIP + @bin_details = bin_details unless bin_details == SKIP + @type = type unless type == SKIP + @network_token = network_token unless network_token == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + billing_address = AddressDetails.from_hash(hash['billing_address']) if + hash['billing_address'] + verification_status = + hash.key?('verification_status') ? hash['verification_status'] : SKIP + verification = CardVerificationDetails.from_hash(hash['verification']) if + hash['verification'] + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) + end + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] + type = hash.key?('type') ? hash['type'] : SKIP + network_token = hash.key?('network_token') ? hash['network_token'] : SKIP + + # Create object from extracted values. + CardPaymentToken.new(name: name, + last_digits: last_digits, + brand: brand, + expiry: expiry, + billing_address: billing_address, + verification_status: verification_status, + verification: verification, + network_transaction_reference: network_transaction_reference, + authentication_result: authentication_result, + bin_details: bin_details, + type: type, + network_token: network_token) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_request.rb b/lib/pay_pal_restap_is/models/card_request.rb new file mode 100644 index 0000000..eb2c75b --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_request.rb @@ -0,0 +1,165 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment card to use to fund a payment. Can be a credit or debit + # card.
Note: Passing card number, cvv and expiry + # directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which + # you do not have to take on the PCI SAQ D burden by using + # hosted fields - refer to this + # Integration Guide*.
+ class CardRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The primary account number (PAN) for the payment card. + # @return [String] + attr_accessor :number + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # The three- or four-digit security code of the card. Also known as the CVV, + # CVC, CVN, CVE, or CID. This parameter cannot be present in the request + # when `payment_initiator=MERCHANT`. + # @return [String] + attr_accessor :security_code + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # Additional attributes associated with the use of this card. + # @return [CardAttributes] + attr_accessor :attributes + + # The PayPal-generated ID for the vaulted payment source. This ID should be + # stored on the merchant's server so the saved payment source can be used + # for future transactions. + # @return [String] + attr_accessor :vault_id + + # Provides additional details to process a payment using a `card` that has + # been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only + # with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ # @return [CardStoredCredential] + attr_accessor :stored_credential + + # The Third Party Network token used to fund a payment. + # @return [NetworkToken] + attr_accessor :network_token + + # Customizes the payer experience during the 3DS Approval for payment. + # @return [CardExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['number'] = 'number' + @_hash['expiry'] = 'expiry' + @_hash['security_code'] = 'security_code' + @_hash['billing_address'] = 'billing_address' + @_hash['attributes'] = 'attributes' + @_hash['vault_id'] = 'vault_id' + @_hash['stored_credential'] = 'stored_credential' + @_hash['network_token'] = 'network_token' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + number + expiry + security_code + billing_address + attributes + vault_id + stored_credential + network_token + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, + billing_address: SKIP, attributes: SKIP, vault_id: SKIP, + stored_credential: SKIP, network_token: SKIP, + experience_context: SKIP) + @name = name unless name == SKIP + @number = number unless number == SKIP + @expiry = expiry unless expiry == SKIP + @security_code = security_code unless security_code == SKIP + @billing_address = billing_address unless billing_address == SKIP + @attributes = attributes unless attributes == SKIP + @vault_id = vault_id unless vault_id == SKIP + @stored_credential = stored_credential unless stored_credential == SKIP + @network_token = network_token unless network_token == SKIP + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + number = hash.key?('number') ? hash['number'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + security_code = hash.key?('security_code') ? hash['security_code'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + attributes = CardAttributes.from_hash(hash['attributes']) if hash['attributes'] + vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP + stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if + hash['stored_credential'] + network_token = NetworkToken.from_hash(hash['network_token']) if hash['network_token'] + experience_context = CardExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + CardRequest.new(name: name, + number: number, + expiry: expiry, + security_code: security_code, + billing_address: billing_address, + attributes: attributes, + vault_id: vault_id, + stored_credential: stored_credential, + network_token: network_token, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_response.rb b/lib/pay_pal_restap_is/models/card_response.rb new file mode 100644 index 0000000..79538eb --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_response.rb @@ -0,0 +1,139 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment card to use to fund a payment. Card can be a credit or debit + # card. + class CardResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # Array of brands or networks associated with the card. + # @return [Array[CardBrand]] + attr_accessor :available_networks + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # Additional attributes associated with the use of this card. + # @return [CardAttributesResponse] + attr_accessor :attributes + + # Representation of card details as received in the request. + # @return [CardFromRequest] + attr_accessor :from_request + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # Bank Identification Number (BIN) details used to fund a payment. + # @return [BinDetails] + attr_accessor :bin_details + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['brand'] = 'brand' + @_hash['available_networks'] = 'available_networks' + @_hash['type'] = 'type' + @_hash['authentication_result'] = 'authentication_result' + @_hash['attributes'] = 'attributes' + @_hash['from_request'] = 'from_request' + @_hash['expiry'] = 'expiry' + @_hash['bin_details'] = 'bin_details' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + brand + available_networks + type + authentication_result + attributes + from_request + expiry + bin_details + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, + available_networks: SKIP, type: SKIP, + authentication_result: SKIP, attributes: SKIP, + from_request: SKIP, expiry: SKIP, bin_details: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @brand = brand unless brand == SKIP + @available_networks = available_networks unless available_networks == SKIP + @type = type unless type == SKIP + @authentication_result = authentication_result unless authentication_result == SKIP + @attributes = attributes unless attributes == SKIP + @from_request = from_request unless from_request == SKIP + @expiry = expiry unless expiry == SKIP + @bin_details = bin_details unless bin_details == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + available_networks = + hash.key?('available_networks') ? hash['available_networks'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + attributes = CardAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] + from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request'] + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] + + # Create object from extracted values. + CardResponse.new(name: name, + last_digits: last_digits, + brand: brand, + available_networks: available_networks, + type: type, + authentication_result: authentication_result, + attributes: attributes, + from_request: from_request, + expiry: expiry, + bin_details: bin_details) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_response_entity.rb b/lib/pay_pal_restap_is/models/card_response_entity.rb new file mode 100644 index 0000000..b427ca5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_response_entity.rb @@ -0,0 +1,156 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Full representation of a Card Payment Token. + class CardResponseEntity < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # Address request details. + # @return [AddressDetails] + attr_accessor :billing_address + + # Verification status of Card. + # @return [String] + attr_accessor :verification_status + + # Card Verification details including the authorization details and 3D + # SECURE details. + # @return [CardVerificationDetails] + attr_accessor :verification + + # Previous network transaction reference including id in response. + # @return [NetworkTransactionReferenceEntity] + attr_accessor :network_transaction_reference + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # Bank Identification Number (BIN) details used to fund a payment. + # @return [BinDetails] + attr_accessor :bin_details + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['brand'] = 'brand' + @_hash['expiry'] = 'expiry' + @_hash['billing_address'] = 'billing_address' + @_hash['verification_status'] = 'verification_status' + @_hash['verification'] = 'verification' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['authentication_result'] = 'authentication_result' + @_hash['bin_details'] = 'bin_details' + @_hash['type'] = 'type' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + brand + expiry + billing_address + verification_status + verification + network_transaction_reference + authentication_result + bin_details + type + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, + billing_address: SKIP, verification_status: SKIP, + verification: SKIP, network_transaction_reference: SKIP, + authentication_result: SKIP, bin_details: SKIP, type: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @brand = brand unless brand == SKIP + @expiry = expiry unless expiry == SKIP + @billing_address = billing_address unless billing_address == SKIP + @verification_status = verification_status unless verification_status == SKIP + @verification = verification unless verification == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @authentication_result = authentication_result unless authentication_result == SKIP + @bin_details = bin_details unless bin_details == SKIP + @type = type unless type == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + billing_address = AddressDetails.from_hash(hash['billing_address']) if + hash['billing_address'] + verification_status = + hash.key?('verification_status') ? hash['verification_status'] : SKIP + verification = CardVerificationDetails.from_hash(hash['verification']) if + hash['verification'] + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) + end + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] + type = hash.key?('type') ? hash['type'] : SKIP + + # Create object from extracted values. + CardResponseEntity.new(name: name, + last_digits: last_digits, + brand: brand, + expiry: expiry, + billing_address: billing_address, + verification_status: verification_status, + verification: verification, + network_transaction_reference: network_transaction_reference, + authentication_result: authentication_result, + bin_details: bin_details, + type: type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_stored_credential.rb b/lib/pay_pal_restap_is/models/card_stored_credential.rb new file mode 100644 index 0000000..f7bea3d --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_stored_credential.rb @@ -0,0 +1,95 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Provides additional details to process a payment using a `card` that has + # been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ class CardStoredCredential < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The person or party who initiated or triggered the payment. + # @return [PaymentInitiator] + attr_accessor :payment_initiator + + # Indicates the type of the stored payment_source payment. + # @return [StoredPaymentSourcePaymentType] + attr_accessor :payment_type + + # Indicates if this is a `first` or `subsequent` payment using a stored + # payment source (also referred to as stored credential or card on file). + # @return [StoredPaymentSourceUsageType] + attr_accessor :usage + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :previous_network_transaction_reference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_initiator'] = 'payment_initiator' + @_hash['payment_type'] = 'payment_type' + @_hash['usage'] = 'usage' + @_hash['previous_network_transaction_reference'] = + 'previous_network_transaction_reference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + usage + previous_network_transaction_reference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_initiator:, payment_type:, + usage: StoredPaymentSourceUsageType::DERIVED, + previous_network_transaction_reference: SKIP) + @payment_initiator = payment_initiator + @payment_type = payment_type + @usage = usage unless usage == SKIP + unless previous_network_transaction_reference == SKIP + @previous_network_transaction_reference = + previous_network_transaction_reference + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_initiator = + hash.key?('payment_initiator') ? hash['payment_initiator'] : nil + payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil + usage = hash['usage'] ||= StoredPaymentSourceUsageType::DERIVED + if hash['previous_network_transaction_reference'] + previous_network_transaction_reference = NetworkTransactionReference.from_hash(hash['previous_network_transaction_reference']) + end + + # Create object from extracted values. + CardStoredCredential.new(payment_initiator: payment_initiator, + payment_type: payment_type, + usage: usage, + previous_network_transaction_reference: previous_network_transaction_reference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_supplementary_data.rb b/lib/pay_pal_restap_is/models/card_supplementary_data.rb new file mode 100644 index 0000000..908707c --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_supplementary_data.rb @@ -0,0 +1,71 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Merchants and partners can add Level 2 and 3 data to payments to reduce risk + # and payment processing costs. For more information about processing + # payments, see check + # out or multiparty checkout. + class CardSupplementaryData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The level 2 card processing data collections. If your merchant account has + # been configured for Level 2 processing this field will be passed to the + # processor on your behalf. Please contact your PayPal Technical Account + # Manager to define level 2 data for your business. + # @return [Level2CardProcessingData] + attr_accessor :level_2 + + # The level 3 card processing data collections, If your merchant account has + # been configured for Level 3 processing this field will be passed to the + # processor on your behalf. Please contact your PayPal Technical Account + # Manager to define level 3 data for your business. + # @return [Level3CardProcessingData] + attr_accessor :level_3 + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['level_2'] = 'level_2' + @_hash['level_3'] = 'level_3' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + level_2 + level_3 + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(level_2: SKIP, level_3: SKIP) + @level_2 = level_2 unless level_2 == SKIP + @level_3 = level_3 unless level_3 == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + level_2 = Level2CardProcessingData.from_hash(hash['level_2']) if hash['level_2'] + level_3 = Level3CardProcessingData.from_hash(hash['level_3']) if hash['level_3'] + + # Create object from extracted values. + CardSupplementaryData.new(level_2: level_2, + level_3: level_3) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_type.rb b/lib/pay_pal_restap_is/models/card_type.rb new file mode 100644 index 0000000..7c698aa --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_type.rb @@ -0,0 +1,32 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Type of card. i.e Credit, Debit and so on. + class CardType + CARD_TYPE = [ + # TODO: Write general description for CREDIT + CREDIT = 'CREDIT'.freeze, + + # TODO: Write general description for DEBIT + DEBIT = 'DEBIT'.freeze, + + # TODO: Write general description for PREPAID + PREPAID = 'PREPAID'.freeze, + + # TODO: Write general description for STORE + STORE = 'STORE'.freeze, + + # TODO: Write general description for UNKNOWN + UNKNOWN = 'UNKNOWN'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_verification.rb b/lib/pay_pal_restap_is/models/card_verification.rb new file mode 100644 index 0000000..2974b18 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_verification.rb @@ -0,0 +1,51 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The API caller can opt in to verify the card through PayPal offered + # verification services (e.g. Smart Dollar Auth, 3DS). + class CardVerification < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The method used for card verification. + # @return [CardVerificationMethod] + attr_accessor :method + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['method'] = 'method' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + method + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(method: CardVerificationMethod::SCA_WHEN_REQUIRED) + @method = method unless method == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + method = hash['method'] ||= CardVerificationMethod::SCA_WHEN_REQUIRED + + # Create object from extracted values. + CardVerification.new(method: method) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_verification_details.rb b/lib/pay_pal_restap_is/models/card_verification_details.rb new file mode 100644 index 0000000..def8259 --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_verification_details.rb @@ -0,0 +1,111 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Card Verification details including the authorization details and 3D SECURE + # details. + class CardVerificationDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Transaction Identifier as given by the network to indicate a previously + # executed CIT authorization. Only present when authorization is successful + # for a verification. + # @return [String] + attr_accessor :network_transaction_id + + # The date that the transaction was authorized by the scheme. This field may + # not be returned for all networks. MasterCard refers to this field as + # "BankNet reference date". + # @return [String] + attr_accessor :date + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :network + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :time + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The processor response information for payment requests, such as direct + # credit card transactions. + # @return [CardVerificationProcessorResponse] + attr_accessor :processor_response + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['network_transaction_id'] = 'network_transaction_id' + @_hash['date'] = 'date' + @_hash['network'] = 'network' + @_hash['time'] = 'time' + @_hash['amount'] = 'amount' + @_hash['processor_response'] = 'processor_response' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + network_transaction_id + date + network + time + amount + processor_response + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(network_transaction_id: SKIP, date: SKIP, network: SKIP, + time: SKIP, amount: SKIP, processor_response: SKIP) + @network_transaction_id = network_transaction_id unless network_transaction_id == SKIP + @date = date unless date == SKIP + @network = network unless network == SKIP + @time = time unless time == SKIP + @amount = amount unless amount == SKIP + @processor_response = processor_response unless processor_response == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + network_transaction_id = + hash.key?('network_transaction_id') ? hash['network_transaction_id'] : SKIP + date = hash.key?('date') ? hash['date'] : SKIP + network = hash.key?('network') ? hash['network'] : SKIP + time = hash.key?('time') ? hash['time'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + if hash['processor_response'] + processor_response = CardVerificationProcessorResponse.from_hash(hash['processor_response']) + end + + # Create object from extracted values. + CardVerificationDetails.new(network_transaction_id: network_transaction_id, + date: date, + network: network, + time: time, + amount: amount, + processor_response: processor_response) + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_verification_method.rb b/lib/pay_pal_restap_is/models/card_verification_method.rb new file mode 100644 index 0000000..ec5fa1d --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_verification_method.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The method used for card verification. + class CardVerificationMethod + CARD_VERIFICATION_METHOD = [ + # TODO: Write general description for SCA_ALWAYS + SCA_ALWAYS = 'SCA_ALWAYS'.freeze, + + # TODO: Write general description for SCA_WHEN_REQUIRED + SCA_WHEN_REQUIRED = 'SCA_WHEN_REQUIRED'.freeze, + + # TODO: Write general description for ENUM_3D_SECURE + ENUM_3D_SECURE = '3D_SECURE'.freeze, + + # TODO: Write general description for AVS_CVV + AVS_CVV = 'AVS_CVV'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/card_verification_processor_response.rb b/lib/pay_pal_restap_is/models/card_verification_processor_response.rb new file mode 100644 index 0000000..da7a4ec --- /dev/null +++ b/lib/pay_pal_restap_is/models/card_verification_processor_response.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The processor response information for payment requests, such as direct + # credit card transactions. + class CardVerificationProcessorResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The address verification code for Visa, Discover, Mastercard, or American + # Express transactions. + # @return [AVSCode] + attr_accessor :avs_code + + # The card verification value code for for Visa, Discover, Mastercard, or + # American Express. + # @return [CVVCode] + attr_accessor :cvv_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['avs_code'] = 'avs_code' + @_hash['cvv_code'] = 'cvv_code' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + avs_code + cvv_code + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(avs_code: SKIP, cvv_code: SKIP) + @avs_code = avs_code unless avs_code == SKIP + @cvv_code = cvv_code unless cvv_code == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP + cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP + + # Create object from extracted values. + CardVerificationProcessorResponse.new(avs_code: avs_code, + cvv_code: cvv_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/checkout_payment_intent.rb b/lib/pay_pal_restap_is/models/checkout_payment_intent.rb new file mode 100644 index 0000000..38e7269 --- /dev/null +++ b/lib/pay_pal_restap_is/models/checkout_payment_intent.rb @@ -0,0 +1,24 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The intent to either capture payment immediately or authorize a payment for + # an order after order creation. + class CheckoutPaymentIntent + CHECKOUT_PAYMENT_INTENT = [ + # TODO: Write general description for CAPTURE + CAPTURE = 'CAPTURE'.freeze, + + # TODO: Write general description for AUTHORIZE + AUTHORIZE = 'AUTHORIZE'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/cobranded_card.rb b/lib/pay_pal_restap_is/models/cobranded_card.rb new file mode 100644 index 0000000..115786c --- /dev/null +++ b/lib/pay_pal_restap_is/models/cobranded_card.rb @@ -0,0 +1,70 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Details about the merchant cobranded card used for order purchase. + class CobrandedCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Array of labels for the cobranded card. + # @return [Array[String]] + attr_accessor :labels + + # The details for the merchant who receives the funds and fulfills the + # order. The merchant is also known as the payee. + # @return [PayeeBase] + attr_accessor :payee + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['labels'] = 'labels' + @_hash['payee'] = 'payee' + @_hash['amount'] = 'amount' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + labels + payee + amount + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(labels: SKIP, payee: SKIP, amount: SKIP) + @labels = labels unless labels == SKIP + @payee = payee unless payee == SKIP + @amount = amount unless amount == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + labels = hash.key?('labels') ? hash['labels'] : SKIP + payee = PayeeBase.from_hash(hash['payee']) if hash['payee'] + amount = Money.from_hash(hash['amount']) if hash['amount'] + + # Create object from extracted values. + CobrandedCard.new(labels: labels, + payee: payee, + amount: amount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/confirm_order_request.rb b/lib/pay_pal_restap_is/models/confirm_order_request.rb new file mode 100644 index 0000000..6bd33f3 --- /dev/null +++ b/lib/pay_pal_restap_is/models/confirm_order_request.rb @@ -0,0 +1,74 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Payer confirms the intent to pay for the Order using the provided payment + # source. + class ConfirmOrderRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment source definition. + # @return [PaymentSource] + attr_accessor :payment_source + + # The instruction to process an order. + # @return [ProcessingInstruction] + attr_accessor :processing_instruction + + # Customizes the payer confirmation experience. + # @return [OrderConfirmApplicationContext] + attr_accessor :application_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_source'] = 'payment_source' + @_hash['processing_instruction'] = 'processing_instruction' + @_hash['application_context'] = 'application_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + processing_instruction + application_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize( + payment_source:, + processing_instruction: ProcessingInstruction::NO_INSTRUCTION, + application_context: SKIP + ) + @payment_source = payment_source + @processing_instruction = processing_instruction unless processing_instruction == SKIP + @application_context = application_context unless application_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source'] + processing_instruction = + hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION + application_context = OrderConfirmApplicationContext.from_hash(hash['application_context']) if + hash['application_context'] + + # Create object from extracted values. + ConfirmOrderRequest.new(payment_source: payment_source, + processing_instruction: processing_instruction, + application_context: application_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/customer_information.rb b/lib/pay_pal_restap_is/models/customer_information.rb new file mode 100644 index 0000000..ef34c67 --- /dev/null +++ b/lib/pay_pal_restap_is/models/customer_information.rb @@ -0,0 +1,72 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a customer in PayPal's system of record. + class CustomerInformation < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['email_address'] = 'email_address' + @_hash['phone'] = 'phone' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + email_address + phone + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, email_address: SKIP, phone: SKIP) + @id = id unless id == SKIP + @email_address = email_address unless email_address == SKIP + @phone = phone unless phone == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + + # Create object from extracted values. + CustomerInformation.new(id: id, + email_address: email_address, + phone: phone) + end + end +end diff --git a/lib/pay_pal_restap_is/models/customer_request.rb b/lib/pay_pal_restap_is/models/customer_request.rb new file mode 100644 index 0000000..e4d6e68 --- /dev/null +++ b/lib/pay_pal_restap_is/models/customer_request.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customer in merchant's or partner's system of records. + class CustomerRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # Merchants and partners may already have a data-store where their customer + # information is persisted. Use merchant_customer_id to associate the + # PayPal-generated customer.id to your representation of a customer. + # @return [String] + attr_accessor :merchant_customer_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['merchant_customer_id'] = 'merchant_customer_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + merchant_customer_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, merchant_customer_id: SKIP) + @id = id unless id == SKIP + @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + merchant_customer_id = + hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP + + # Create object from extracted values. + CustomerRequest.new(id: id, + merchant_customer_id: merchant_customer_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb b/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb new file mode 100644 index 0000000..987f642 --- /dev/null +++ b/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb @@ -0,0 +1,105 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Collection of payment tokens saved for a given customer. + class CustomerVaultPaymentTokensResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Total number of items. + # @return [Integer] + attr_accessor :total_items + + # Total number of pages. + # @return [Integer] + attr_accessor :total_pages + + # Customer in merchant's or partner's system of records. + # @return [CustomerRequest] + attr_accessor :customer + + # Customer in merchant's or partner's system of records. + # @return [Array[PaymentTokenResponse]] + attr_accessor :payment_tokens + + # An array of related [HATEOAS links](/api/rest/responses/#hateoas). + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['total_items'] = 'total_items' + @_hash['total_pages'] = 'total_pages' + @_hash['customer'] = 'customer' + @_hash['payment_tokens'] = 'payment_tokens' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + total_items + total_pages + customer + payment_tokens + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(total_items: SKIP, total_pages: SKIP, customer: SKIP, + payment_tokens: SKIP, links: SKIP) + @total_items = total_items unless total_items == SKIP + @total_pages = total_pages unless total_pages == SKIP + @customer = customer unless customer == SKIP + @payment_tokens = payment_tokens unless payment_tokens == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + total_items = hash.key?('total_items') ? hash['total_items'] : SKIP + total_pages = hash.key?('total_pages') ? hash['total_pages'] : SKIP + customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] + # Parameter is an array, so we need to iterate through it + payment_tokens = nil + unless hash['payment_tokens'].nil? + payment_tokens = [] + hash['payment_tokens'].each do |structure| + payment_tokens << (PaymentTokenResponse.from_hash(structure) if structure) + end + end + + payment_tokens = SKIP unless hash.key?('payment_tokens') + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + CustomerVaultPaymentTokensResponse.new(total_items: total_items, + total_pages: total_pages, + customer: customer, + payment_tokens: payment_tokens, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/cvv_code.rb b/lib/pay_pal_restap_is/models/cvv_code.rb new file mode 100644 index 0000000..81c4c4e --- /dev/null +++ b/lib/pay_pal_restap_is/models/cvv_code.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The card verification value code for for Visa, Discover, Mastercard, or + # American Express. + class CVVCode + CVV_CODE = [ + # TODO: Write general description for E + E = 'E'.freeze, + + # TODO: Write general description for I + I = 'I'.freeze, + + # TODO: Write general description for M + M = 'M'.freeze, + + # TODO: Write general description for N + N = 'N'.freeze, + + # TODO: Write general description for P + P = 'P'.freeze, + + # TODO: Write general description for S + S = 'S'.freeze, + + # TODO: Write general description for U + U = 'U'.freeze, + + # TODO: Write general description for X + X = 'X'.freeze, + + # TODO: Write general description for ENUM_ALL_OTHERS + ENUM_ALL_OTHERS = 'All others'.freeze, + + # TODO: Write general description for ENUM_0 + ENUM_0 = '0'.freeze, + + # TODO: Write general description for ENUM_1 + ENUM_1 = '1'.freeze, + + # TODO: Write general description for ENUM_2 + ENUM_2 = '2'.freeze, + + # TODO: Write general description for ENUM_3 + ENUM_3 = '3'.freeze, + + # TODO: Write general description for ENUM_4 + ENUM_4 = '4'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/disbursement_mode.rb b/lib/pay_pal_restap_is/models/disbursement_mode.rb new file mode 100644 index 0000000..1a0db37 --- /dev/null +++ b/lib/pay_pal_restap_is/models/disbursement_mode.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The funds that are held on behalf of the merchant. + class DisbursementMode + DISBURSEMENT_MODE = [ + # TODO: Write general description for INSTANT + INSTANT = 'INSTANT'.freeze, + + # TODO: Write general description for DELAYED + DELAYED = 'DELAYED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/dispute_category.rb b/lib/pay_pal_restap_is/models/dispute_category.rb new file mode 100644 index 0000000..b1b4db1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/dispute_category.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The condition that is covered for the transaction. + class DisputeCategory + DISPUTE_CATEGORY = [ + # TODO: Write general description for ITEM_NOT_RECEIVED + ITEM_NOT_RECEIVED = 'ITEM_NOT_RECEIVED'.freeze, + + # TODO: Write general description for UNAUTHORIZED_TRANSACTION + UNAUTHORIZED_TRANSACTION = 'UNAUTHORIZED_TRANSACTION'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/eci_flag.rb b/lib/pay_pal_restap_is/models/eci_flag.rb new file mode 100644 index 0000000..4863adf --- /dev/null +++ b/lib/pay_pal_restap_is/models/eci_flag.rb @@ -0,0 +1,39 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data + # elements that indicate the transaction was processed electronically. This + # should be passed on the authorization transaction to the Gateway/Processor. + class ECIFlag + ECI_FLAG = [ + # TODO: Write general description for MASTERCARD_NON_3D_SECURE_TRANSACTION + MASTERCARD_NON_3D_SECURE_TRANSACTION = 'MASTERCARD_NON_3D_SECURE_TRANSACTION'.freeze, + + # TODO: Write general description for + # MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION + MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION = 'MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION'.freeze, + + # TODO: Write general description for + # MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION + MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION = 'MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION'.freeze, + + # TODO: Write general description for FULLY_AUTHENTICATED_TRANSACTION + FULLY_AUTHENTICATED_TRANSACTION = 'FULLY_AUTHENTICATED_TRANSACTION'.freeze, + + # TODO: Write general description for ATTEMPTED_AUTHENTICATION_TRANSACTION + ATTEMPTED_AUTHENTICATION_TRANSACTION = 'ATTEMPTED_AUTHENTICATION_TRANSACTION'.freeze, + + # TODO: Write general description for NON_3D_SECURE_TRANSACTION + NON_3D_SECURE_TRANSACTION = 'NON_3D_SECURE_TRANSACTION'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/enrollment_status.rb b/lib/pay_pal_restap_is/models/enrollment_status.rb new file mode 100644 index 0000000..89351ca --- /dev/null +++ b/lib/pay_pal_restap_is/models/enrollment_status.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Status of Authentication eligibility. + class EnrollmentStatus + ENROLLMENT_STATUS = [ + # TODO: Write general description for Y + Y = 'Y'.freeze, + + # TODO: Write general description for N + N = 'N'.freeze, + + # TODO: Write general description for U + U = 'U'.freeze, + + # TODO: Write general description for B + B = 'B'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/eps_payment_object.rb b/lib/pay_pal_restap_is/models/eps_payment_object.rb new file mode 100644 index 0000000..6fc9b40 --- /dev/null +++ b/lib/pay_pal_restap_is/models/eps_payment_object.rb @@ -0,0 +1,74 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using eps. + class EPSPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + + # Create object from extracted values. + EPSPaymentObject.new(name: name, + country_code: country_code, + bic: bic) + end + end +end diff --git a/lib/pay_pal_restap_is/models/eps_payment_request.rb b/lib/pay_pal_restap_is/models/eps_payment_request.rb new file mode 100644 index 0000000..294678f --- /dev/null +++ b/lib/pay_pal_restap_is/models/eps_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using eps. + class EPSPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + EPSPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/error_details.rb b/lib/pay_pal_restap_is/models/error_details.rb new file mode 100644 index 0000000..c99d8bd --- /dev/null +++ b/lib/pay_pal_restap_is/models/error_details.rb @@ -0,0 +1,110 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The error details. Required for client-side `4XX` errors. + class ErrorDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The field that caused the error. If this field is in the body, set this + # value to the field's JSON pointer value. Required for client-side errors. + # @return [String] + attr_accessor :field + + # The value of the field that caused the error. + # @return [String] + attr_accessor :value + + # The location of the field that caused the error. Value is `body`, `path`, + # or `query`. + # @return [String] + attr_accessor :location + + # The unique, fine-grained application-level error code. + # @return [String] + attr_accessor :issue + + # An array of request-related [HATEOAS + # links](/api/rest/responses/#hateoas-links) that are either relevant to the + # issue by providing additional information or offering potential + # resolutions. + # @return [Array[LinkDescription]] + attr_accessor :links + + # The human-readable description for an issue. The description can change + # over the lifetime of an API, so clients must not depend on this value. + # @return [String] + attr_accessor :description + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['field'] = 'field' + @_hash['value'] = 'value' + @_hash['location'] = 'location' + @_hash['issue'] = 'issue' + @_hash['links'] = 'links' + @_hash['description'] = 'description' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + field + value + location + links + description + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(issue:, field: SKIP, value: SKIP, location: 'body', + links: SKIP, description: SKIP) + @field = field unless field == SKIP + @value = value unless value == SKIP + @location = location unless location == SKIP + @issue = issue + @links = links unless links == SKIP + @description = description unless description == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + issue = hash.key?('issue') ? hash['issue'] : nil + field = hash.key?('field') ? hash['field'] : SKIP + value = hash.key?('value') ? hash['value'] : SKIP + location = hash['location'] ||= 'body' + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + description = hash.key?('description') ? hash['description'] : SKIP + + # Create object from extracted values. + ErrorDetails.new(issue: issue, + field: field, + value: value, + location: location, + links: links, + description: description) + end + end +end diff --git a/lib/pay_pal_restap_is/models/exchange_rate.rb b/lib/pay_pal_restap_is/models/exchange_rate.rb new file mode 100644 index 0000000..1e8595d --- /dev/null +++ b/lib/pay_pal_restap_is/models/exchange_rate.rb @@ -0,0 +1,75 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The exchange rate that determines the amount to convert from one currency to + # another currency. + class ExchangeRate < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The [three-character ISO-4217 currency + # code](/api/rest/reference/currency-codes/) that identifies the currency. + # @return [String] + attr_accessor :source_currency + + # The [three-character ISO-4217 currency + # code](/api/rest/reference/currency-codes/) that identifies the currency. + # @return [String] + attr_accessor :target_currency + + # The target currency amount. Equivalent to one unit of the source currency. + # Formatted as integer or decimal value with one to 15 digits to the right + # of the decimal point. + # @return [String] + attr_accessor :value + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['source_currency'] = 'source_currency' + @_hash['target_currency'] = 'target_currency' + @_hash['value'] = 'value' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + source_currency + target_currency + value + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(source_currency: SKIP, target_currency: SKIP, value: SKIP) + @source_currency = source_currency unless source_currency == SKIP + @target_currency = target_currency unless target_currency == SKIP + @value = value unless value == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + source_currency = + hash.key?('source_currency') ? hash['source_currency'] : SKIP + target_currency = + hash.key?('target_currency') ? hash['target_currency'] : SKIP + value = hash.key?('value') ? hash['value'] : SKIP + + # Create object from extracted values. + ExchangeRate.new(source_currency: source_currency, + target_currency: target_currency, + value: value) + end + end +end diff --git a/lib/pay_pal_restap_is/models/experience_context.rb b/lib/pay_pal_restap_is/models/experience_context.rb new file mode 100644 index 0000000..568adbe --- /dev/null +++ b/lib/pay_pal_restap_is/models/experience_context.rb @@ -0,0 +1,98 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer experience during the approval process for the payment. + class ExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The location from which the shipping address is derived. + # @return [ShippingPreference] + attr_accessor :shipping_preference + + # Describes the URL. + # @return [String] + attr_accessor :return_url + + # Describes the URL. + # @return [String] + attr_accessor :cancel_url + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + shipping_preference + return_url + cancel_url + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, locale: SKIP, + shipping_preference: ShippingPreference::GET_FROM_FILE, + return_url: SKIP, cancel_url: SKIP) + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + shipping_preference = + hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + + # Create object from extracted values. + ExperienceContext.new(brand_name: brand_name, + locale: locale, + shipping_preference: shipping_preference, + return_url: return_url, + cancel_url: cancel_url) + end + end +end diff --git a/lib/pay_pal_restap_is/models/fullfillment_type.rb b/lib/pay_pal_restap_is/models/fullfillment_type.rb new file mode 100644 index 0000000..2a46111 --- /dev/null +++ b/lib/pay_pal_restap_is/models/fullfillment_type.rb @@ -0,0 +1,31 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A classification for the method of purchase fulfillment (e.g shipping, + # in-store pickup, etc). Either `type` or `options` may be present, but not + # both. + class FullfillmentType + FULLFILLMENT_TYPE = [ + # TODO: Write general description for SHIPPING + SHIPPING = 'SHIPPING'.freeze, + + # TODO: Write general description for PICKUP_IN_PERSON + PICKUP_IN_PERSON = 'PICKUP_IN_PERSON'.freeze, + + # TODO: Write general description for PICKUP_IN_STORE + PICKUP_IN_STORE = 'PICKUP_IN_STORE'.freeze, + + # TODO: Write general description for PICKUP_FROM_PERSON + PICKUP_FROM_PERSON = 'PICKUP_FROM_PERSON'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/giropay_payment_object.rb b/lib/pay_pal_restap_is/models/giropay_payment_object.rb new file mode 100644 index 0000000..3f43d9d --- /dev/null +++ b/lib/pay_pal_restap_is/models/giropay_payment_object.rb @@ -0,0 +1,74 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using giropay. + class GiropayPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + + # Create object from extracted values. + GiropayPaymentObject.new(name: name, + country_code: country_code, + bic: bic) + end + end +end diff --git a/lib/pay_pal_restap_is/models/giropay_payment_request.rb b/lib/pay_pal_restap_is/models/giropay_payment_request.rb new file mode 100644 index 0000000..12d23fc --- /dev/null +++ b/lib/pay_pal_restap_is/models/giropay_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using giropay. + class GiropayPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + GiropayPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb b/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb new file mode 100644 index 0000000..350c816 --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Authentication Method which is used for the card transaction. + class GooglePayAuthenticationMethod + GOOGLE_PAY_AUTHENTICATION_METHOD = [ + # TODO: Write general description for PAN_ONLY + PAN_ONLY = 'PAN_ONLY'.freeze, + + # TODO: Write general description for CRYPTOGRAM_3DS + CRYPTOGRAM_3DS = 'CRYPTOGRAM_3DS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb b/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb new file mode 100644 index 0000000..cf1936e --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb @@ -0,0 +1,51 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of this card. + class GooglePayCardAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The API caller can opt in to verify the card through PayPal offered + # verification services (e.g. Smart Dollar Auth, 3DS). + # @return [CardVerification] + attr_accessor :verification + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['verification'] = 'verification' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + verification + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(verification: SKIP) + @verification = verification unless verification == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + verification = CardVerification.from_hash(hash['verification']) if hash['verification'] + + # Create object from extracted values. + GooglePayCardAttributes.new(verification: verification) + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_card_response.rb b/lib/pay_pal_restap_is/models/google_pay_card_response.rb new file mode 100644 index 0000000..c9e940a --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_card_response.rb @@ -0,0 +1,104 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment card to use to fund a Google Pay payment response. Can be a + # credit or debit card. + class GooglePayCardResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['type'] = 'type' + @_hash['brand'] = 'brand' + @_hash['billing_address'] = 'billing_address' + @_hash['authentication_result'] = 'authentication_result' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + type + brand + billing_address + authentication_result + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, type: SKIP, brand: SKIP, + billing_address: SKIP, authentication_result: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @type = type unless type == SKIP + @brand = brand unless brand == SKIP + @billing_address = billing_address unless billing_address == SKIP + @authentication_result = authentication_result unless authentication_result == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + + # Create object from extracted values. + GooglePayCardResponse.new(name: name, + last_digits: last_digits, + type: type, + brand: brand, + billing_address: billing_address, + authentication_result: authentication_result) + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb b/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb new file mode 100644 index 0000000..1deeeed --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb @@ -0,0 +1,105 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Details shared by Google for the merchant to be shared with PayPal. This is + # required to process the transaction using the Google Pay payment method. + class GooglePayDecryptedTokenData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # A unique ID that identifies the message in case it needs to be revoked or + # located at a later time. + # @return [String] + attr_accessor :message_id + + # Date and time at which the message expires as UTC milliseconds since + # epoch. Integrators should reject any message that's expired. + # @return [String] + attr_accessor :message_expiration + + # The type of the payment credential. Currently, only CARD is supported. + # @return [GooglePayPaymentMethod] + attr_accessor :payment_method + + # Authentication Method which is used for the card transaction. + # @return [GooglePayAuthenticationMethod] + attr_accessor :authentication_method + + # Base-64 cryptographic identifier used by card schemes to validate the + # token verification result. This is a conditionally required field if + # authentication_method is CRYPTOGRAM_3DS. + # @return [String] + attr_accessor :cryptogram + + # Electronic Commerce Indicator may not always be present. It is only + # returned for tokens on the Visa card network. This value is passed through + # in the payment authorization request. + # @return [String] + attr_accessor :eci_indicator + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['message_id'] = 'message_id' + @_hash['message_expiration'] = 'message_expiration' + @_hash['payment_method'] = 'payment_method' + @_hash['authentication_method'] = 'authentication_method' + @_hash['cryptogram'] = 'cryptogram' + @_hash['eci_indicator'] = 'eci_indicator' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + message_id + message_expiration + cryptogram + eci_indicator + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_method:, authentication_method:, message_id: SKIP, + message_expiration: SKIP, cryptogram: SKIP, + eci_indicator: SKIP) + @message_id = message_id unless message_id == SKIP + @message_expiration = message_expiration unless message_expiration == SKIP + @payment_method = payment_method + @authentication_method = authentication_method + @cryptogram = cryptogram unless cryptogram == SKIP + @eci_indicator = eci_indicator unless eci_indicator == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_method = + hash.key?('payment_method') ? hash['payment_method'] : nil + authentication_method = + hash.key?('authentication_method') ? hash['authentication_method'] : nil + message_id = hash.key?('message_id') ? hash['message_id'] : SKIP + message_expiration = + hash.key?('message_expiration') ? hash['message_expiration'] : SKIP + cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP + eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP + + # Create object from extracted values. + GooglePayDecryptedTokenData.new(payment_method: payment_method, + authentication_method: authentication_method, + message_id: message_id, + message_expiration: message_expiration, + cryptogram: cryptogram, + eci_indicator: eci_indicator) + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_payment_method.rb b/lib/pay_pal_restap_is/models/google_pay_payment_method.rb new file mode 100644 index 0000000..5b5cc64 --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_payment_method.rb @@ -0,0 +1,20 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The type of the payment credential. Currently, only CARD is supported. + class GooglePayPaymentMethod + GOOGLE_PAY_PAYMENT_METHOD = [ + # TODO: Write general description for CARD + CARD = 'CARD'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_request.rb b/lib/pay_pal_restap_is/models/google_pay_request.rb new file mode 100644 index 0000000..cf80231 --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_request.rb @@ -0,0 +1,118 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Google Pay. + class GooglePayRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumberWithCountryCode] + attr_accessor :phone_number + + # The payment card information. + # @return [Object] + attr_accessor :card + + # Details shared by Google for the merchant to be shared with PayPal. This + # is required to process the transaction using the Google Pay payment + # method. + # @return [GooglePayDecryptedTokenData] + attr_accessor :decrypted_token + + # Details shared by Google for the merchant to be shared with PayPal. This + # is required to process the transaction using the Google Pay payment + # method. + # @return [Object] + attr_accessor :assurance_details + + # Additional attributes associated with the use of this card. + # @return [GooglePayCardAttributes] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['email_address'] = 'email_address' + @_hash['phone_number'] = 'phone_number' + @_hash['card'] = 'card' + @_hash['decrypted_token'] = 'decrypted_token' + @_hash['assurance_details'] = 'assurance_details' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + email_address + phone_number + card + decrypted_token + assurance_details + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, email_address: SKIP, phone_number: SKIP, + card: SKIP, decrypted_token: SKIP, assurance_details: SKIP, + attributes: SKIP) + @name = name unless name == SKIP + @email_address = email_address unless email_address == SKIP + @phone_number = phone_number unless phone_number == SKIP + @card = card unless card == SKIP + @decrypted_token = decrypted_token unless decrypted_token == SKIP + @assurance_details = assurance_details unless assurance_details == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone_number = PhoneNumberWithCountryCode.from_hash(hash['phone_number']) if + hash['phone_number'] + card = hash.key?('card') ? hash['card'] : SKIP + decrypted_token = GooglePayDecryptedTokenData.from_hash(hash['decrypted_token']) if + hash['decrypted_token'] + assurance_details = + hash.key?('assurance_details') ? hash['assurance_details'] : SKIP + attributes = GooglePayCardAttributes.from_hash(hash['attributes']) if hash['attributes'] + + # Create object from extracted values. + GooglePayRequest.new(name: name, + email_address: email_address, + phone_number: phone_number, + card: card, + decrypted_token: decrypted_token, + assurance_details: assurance_details, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb b/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb new file mode 100644 index 0000000..f5e5aa8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Google Pay Wallet payment data. + class GooglePayWalletResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumberWithCountryCode] + attr_accessor :phone_number + + # The payment card to use to fund a Google Pay payment response. Can be a + # credit or debit card. + # @return [GooglePayCardResponse] + attr_accessor :card + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['email_address'] = 'email_address' + @_hash['phone_number'] = 'phone_number' + @_hash['card'] = 'card' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + email_address + phone_number + card + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, email_address: SKIP, phone_number: SKIP, + card: SKIP) + @name = name unless name == SKIP + @email_address = email_address unless email_address == SKIP + @phone_number = phone_number unless phone_number == SKIP + @card = card unless card == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone_number = PhoneNumberWithCountryCode.from_hash(hash['phone_number']) if + hash['phone_number'] + card = GooglePayCardResponse.from_hash(hash['card']) if hash['card'] + + # Create object from extracted values. + GooglePayWalletResponse.new(name: name, + email_address: email_address, + phone_number: phone_number, + card: card) + end + end +end diff --git a/lib/pay_pal_restap_is/models/ideal_payment_object.rb b/lib/pay_pal_restap_is/models/ideal_payment_object.rb new file mode 100644 index 0000000..d4310fc --- /dev/null +++ b/lib/pay_pal_restap_is/models/ideal_payment_object.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using iDEAL. + class IDEALPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + iban_last_chars + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP, + iban_last_chars: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + + # Create object from extracted values. + IDEALPaymentObject.new(name: name, + country_code: country_code, + bic: bic, + iban_last_chars: iban_last_chars) + end + end +end diff --git a/lib/pay_pal_restap_is/models/ideal_payment_request.rb b/lib/pay_pal_restap_is/models/ideal_payment_request.rb new file mode 100644 index 0000000..560d190 --- /dev/null +++ b/lib/pay_pal_restap_is/models/ideal_payment_request.rb @@ -0,0 +1,83 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using iDEAL. + class IDEALPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + bic + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, bic: SKIP, experience_context: SKIP) + @name = name + @country_code = country_code + @bic = bic unless bic == SKIP + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + bic = hash.key?('bic') ? hash['bic'] : SKIP + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + IDEALPaymentRequest.new(name: name, + country_code: country_code, + bic: bic, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/instrument_authorization_status.rb b/lib/pay_pal_restap_is/models/instrument_authorization_status.rb new file mode 100644 index 0000000..dd18ed0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/instrument_authorization_status.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The authorization status of the wallet instrument. + class InstrumentAuthorizationStatus + INSTRUMENT_AUTHORIZATION_STATUS = [ + # TODO: Write general description for AUTHORIZED + AUTHORIZED = 'AUTHORIZED'.freeze, + + # TODO: Write general description for BLOCKED + BLOCKED = 'BLOCKED'.freeze, + + # TODO: Write general description for FAILED + FAILED = 'FAILED'.freeze, + + # TODO: Write general description for NOT_APPLICABLE + NOT_APPLICABLE = 'NOT_APPLICABLE'.freeze, + + # TODO: Write general description for NOT_SUPPORTED + NOT_SUPPORTED = 'NOT_SUPPORTED'.freeze, + + # TODO: Write general description for UNAUTHORIZED + UNAUTHORIZED = 'UNAUTHORIZED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/item.rb b/lib/pay_pal_restap_is/models/item.rb new file mode 100644 index 0000000..ce2c880 --- /dev/null +++ b/lib/pay_pal_restap_is/models/item.rb @@ -0,0 +1,134 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details for the items to be purchased. + class Item < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The item name or title. + # @return [String] + attr_accessor :name + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :unit_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :tax + + # The item quantity. Must be a whole number. + # @return [String] + attr_accessor :quantity + + # The detailed item description. + # @return [String] + attr_accessor :description + + # The stock keeping unit (SKU) for the item. + # @return [String] + attr_accessor :sku + + # The URL to the item being purchased. Visible to buyer and used in buyer + # experiences. + # @return [String] + attr_accessor :url + + # The item category type. + # @return [ItemCategory] + attr_accessor :category + + # The URL of the item's image. File type and size restrictions apply. An + # image that violates these restrictions will not be honored. + # @return [String] + attr_accessor :image_url + + # The Universal Product Code of the item. + # @return [UniversalProductCode] + attr_accessor :upc + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['unit_amount'] = 'unit_amount' + @_hash['tax'] = 'tax' + @_hash['quantity'] = 'quantity' + @_hash['description'] = 'description' + @_hash['sku'] = 'sku' + @_hash['url'] = 'url' + @_hash['category'] = 'category' + @_hash['image_url'] = 'image_url' + @_hash['upc'] = 'upc' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + tax + description + sku + url + category + image_url + upc + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, unit_amount:, quantity:, tax: SKIP, description: SKIP, + sku: SKIP, url: SKIP, category: SKIP, image_url: SKIP, + upc: SKIP) + @name = name + @unit_amount = unit_amount + @tax = tax unless tax == SKIP + @quantity = quantity + @description = description unless description == SKIP + @sku = sku unless sku == SKIP + @url = url unless url == SKIP + @category = category unless category == SKIP + @image_url = image_url unless image_url == SKIP + @upc = upc unless upc == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + unit_amount = Money.from_hash(hash['unit_amount']) if hash['unit_amount'] + quantity = hash.key?('quantity') ? hash['quantity'] : nil + tax = Money.from_hash(hash['tax']) if hash['tax'] + description = hash.key?('description') ? hash['description'] : SKIP + sku = hash.key?('sku') ? hash['sku'] : SKIP + url = hash.key?('url') ? hash['url'] : SKIP + category = hash.key?('category') ? hash['category'] : SKIP + image_url = hash.key?('image_url') ? hash['image_url'] : SKIP + upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] + + # Create object from extracted values. + Item.new(name: name, + unit_amount: unit_amount, + quantity: quantity, + tax: tax, + description: description, + sku: sku, + url: url, + category: category, + image_url: image_url, + upc: upc) + end + end +end diff --git a/lib/pay_pal_restap_is/models/item_category.rb b/lib/pay_pal_restap_is/models/item_category.rb new file mode 100644 index 0000000..b6b4c0d --- /dev/null +++ b/lib/pay_pal_restap_is/models/item_category.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The item category type. + class ItemCategory + ITEM_CATEGORY = [ + # TODO: Write general description for DIGITAL_GOODS + DIGITAL_GOODS = 'DIGITAL_GOODS'.freeze, + + # TODO: Write general description for PHYSICAL_GOODS + PHYSICAL_GOODS = 'PHYSICAL_GOODS'.freeze, + + # TODO: Write general description for DONATION + DONATION = 'DONATION'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/level2_card_processing_data.rb b/lib/pay_pal_restap_is/models/level2_card_processing_data.rb new file mode 100644 index 0000000..960b7c6 --- /dev/null +++ b/lib/pay_pal_restap_is/models/level2_card_processing_data.rb @@ -0,0 +1,64 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The level 2 card processing data collections. If your merchant account has + # been configured for Level 2 processing this field will be passed to the + # processor on your behalf. Please contact your PayPal Technical Account + # Manager to define level 2 data for your business. + class Level2CardProcessingData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Use this field to pass a purchase identification value of up to 12 ASCII + # characters for AIB and 17 ASCII characters for all other processors. + # @return [String] + attr_accessor :invoice_id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :tax_total + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['invoice_id'] = 'invoice_id' + @_hash['tax_total'] = 'tax_total' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + invoice_id + tax_total + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(invoice_id: SKIP, tax_total: SKIP) + @invoice_id = invoice_id unless invoice_id == SKIP + @tax_total = tax_total unless tax_total == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + tax_total = Money.from_hash(hash['tax_total']) if hash['tax_total'] + + # Create object from extracted values. + Level2CardProcessingData.new(invoice_id: invoice_id, + tax_total: tax_total) + end + end +end diff --git a/lib/pay_pal_restap_is/models/level3_card_processing_data.rb b/lib/pay_pal_restap_is/models/level3_card_processing_data.rb new file mode 100644 index 0000000..1353c0d --- /dev/null +++ b/lib/pay_pal_restap_is/models/level3_card_processing_data.rb @@ -0,0 +1,120 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The level 3 card processing data collections, If your merchant account has + # been configured for Level 3 processing this field will be passed to the + # processor on your behalf. Please contact your PayPal Technical Account + # Manager to define level 3 data for your business. + class Level3CardProcessingData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :shipping_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :duty_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :discount_amount + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :shipping_address + + # Use this field to specify the postal code of the shipping location. + # @return [String] + attr_accessor :ships_from_postal_code + + # A list of the items that were purchased with this payment. If your + # merchant account has been configured for Level 3 processing this field + # will be passed to the processor on your behalf. + # @return [Array[LineItem]] + attr_accessor :line_items + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['shipping_amount'] = 'shipping_amount' + @_hash['duty_amount'] = 'duty_amount' + @_hash['discount_amount'] = 'discount_amount' + @_hash['shipping_address'] = 'shipping_address' + @_hash['ships_from_postal_code'] = 'ships_from_postal_code' + @_hash['line_items'] = 'line_items' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + shipping_amount + duty_amount + discount_amount + shipping_address + ships_from_postal_code + line_items + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(shipping_amount: SKIP, duty_amount: SKIP, + discount_amount: SKIP, shipping_address: SKIP, + ships_from_postal_code: SKIP, line_items: SKIP) + @shipping_amount = shipping_amount unless shipping_amount == SKIP + @duty_amount = duty_amount unless duty_amount == SKIP + @discount_amount = discount_amount unless discount_amount == SKIP + @shipping_address = shipping_address unless shipping_address == SKIP + @ships_from_postal_code = ships_from_postal_code unless ships_from_postal_code == SKIP + @line_items = line_items unless line_items == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + shipping_amount = Money.from_hash(hash['shipping_amount']) if hash['shipping_amount'] + duty_amount = Money.from_hash(hash['duty_amount']) if hash['duty_amount'] + discount_amount = Money.from_hash(hash['discount_amount']) if hash['discount_amount'] + shipping_address = Address.from_hash(hash['shipping_address']) if hash['shipping_address'] + ships_from_postal_code = + hash.key?('ships_from_postal_code') ? hash['ships_from_postal_code'] : SKIP + # Parameter is an array, so we need to iterate through it + line_items = nil + unless hash['line_items'].nil? + line_items = [] + hash['line_items'].each do |structure| + line_items << (LineItem.from_hash(structure) if structure) + end + end + + line_items = SKIP unless hash.key?('line_items') + + # Create object from extracted values. + Level3CardProcessingData.new(shipping_amount: shipping_amount, + duty_amount: duty_amount, + discount_amount: discount_amount, + shipping_address: shipping_address, + ships_from_postal_code: ships_from_postal_code, + line_items: line_items) + end + end +end diff --git a/lib/pay_pal_restap_is/models/liability_shift_indicator.rb b/lib/pay_pal_restap_is/models/liability_shift_indicator.rb new file mode 100644 index 0000000..2809c74 --- /dev/null +++ b/lib/pay_pal_restap_is/models/liability_shift_indicator.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Liability shift indicator. The outcome of the issuer's authentication. + class LiabilityShiftIndicator + LIABILITY_SHIFT_INDICATOR = [ + # TODO: Write general description for NO + NO = 'NO'.freeze, + + # TODO: Write general description for POSSIBLE + POSSIBLE = 'POSSIBLE'.freeze, + + # TODO: Write general description for UNKNOWN + UNKNOWN = 'UNKNOWN'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/line_item.rb b/lib/pay_pal_restap_is/models/line_item.rb new file mode 100644 index 0000000..6b56069 --- /dev/null +++ b/lib/pay_pal_restap_is/models/line_item.rb @@ -0,0 +1,176 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The line items for this purchase. If your merchant account has been + # configured for Level 3 processing this field will be passed to the processor + # on your behalf. + class LineItem < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The item name or title. + # @return [String] + attr_accessor :name + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :unit_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :tax + + # The item quantity. Must be a whole number. + # @return [String] + attr_accessor :quantity + + # The detailed item description. + # @return [String] + attr_accessor :description + + # The stock keeping unit (SKU) for the item. + # @return [String] + attr_accessor :sku + + # The URL to the item being purchased. Visible to buyer and used in buyer + # experiences. + # @return [String] + attr_accessor :url + + # The URL of the item's image. File type and size restrictions apply. An + # image that violates these restrictions will not be honored. + # @return [String] + attr_accessor :image_url + + # The Universal Product Code of the item. + # @return [UniversalProductCode] + attr_accessor :upc + + # Code used to classify items purchased and track the total amount spent + # across various categories of products and services. Different corporate + # purchasing organizations may use different standards, but the United + # Nations Standard Products and Services Code (UNSPSC) is frequently used. + # @return [String] + attr_accessor :commodity_code + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :discount_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :total_amount + + # Unit of measure is a standard used to express the magnitude of a quantity + # in international trade. Most commonly used (but not limited to) examples + # are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic + # inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), + # Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon + # (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK). + # @return [String] + attr_accessor :unit_of_measure + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['unit_amount'] = 'unit_amount' + @_hash['tax'] = 'tax' + @_hash['quantity'] = 'quantity' + @_hash['description'] = 'description' + @_hash['sku'] = 'sku' + @_hash['url'] = 'url' + @_hash['image_url'] = 'image_url' + @_hash['upc'] = 'upc' + @_hash['commodity_code'] = 'commodity_code' + @_hash['discount_amount'] = 'discount_amount' + @_hash['total_amount'] = 'total_amount' + @_hash['unit_of_measure'] = 'unit_of_measure' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + tax + description + sku + url + image_url + upc + commodity_code + discount_amount + total_amount + unit_of_measure + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, unit_amount:, quantity:, tax: SKIP, description: SKIP, + sku: SKIP, url: SKIP, image_url: SKIP, upc: SKIP, + commodity_code: SKIP, discount_amount: SKIP, + total_amount: SKIP, unit_of_measure: SKIP) + @name = name + @unit_amount = unit_amount + @tax = tax unless tax == SKIP + @quantity = quantity + @description = description unless description == SKIP + @sku = sku unless sku == SKIP + @url = url unless url == SKIP + @image_url = image_url unless image_url == SKIP + @upc = upc unless upc == SKIP + @commodity_code = commodity_code unless commodity_code == SKIP + @discount_amount = discount_amount unless discount_amount == SKIP + @total_amount = total_amount unless total_amount == SKIP + @unit_of_measure = unit_of_measure unless unit_of_measure == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + unit_amount = Money.from_hash(hash['unit_amount']) if hash['unit_amount'] + quantity = hash.key?('quantity') ? hash['quantity'] : nil + tax = Money.from_hash(hash['tax']) if hash['tax'] + description = hash.key?('description') ? hash['description'] : SKIP + sku = hash.key?('sku') ? hash['sku'] : SKIP + url = hash.key?('url') ? hash['url'] : SKIP + image_url = hash.key?('image_url') ? hash['image_url'] : SKIP + upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] + commodity_code = + hash.key?('commodity_code') ? hash['commodity_code'] : SKIP + discount_amount = Money.from_hash(hash['discount_amount']) if hash['discount_amount'] + total_amount = Money.from_hash(hash['total_amount']) if hash['total_amount'] + unit_of_measure = + hash.key?('unit_of_measure') ? hash['unit_of_measure'] : SKIP + + # Create object from extracted values. + LineItem.new(name: name, + unit_amount: unit_amount, + quantity: quantity, + tax: tax, + description: description, + sku: sku, + url: url, + image_url: image_url, + upc: upc, + commodity_code: commodity_code, + discount_amount: discount_amount, + total_amount: total_amount, + unit_of_measure: unit_of_measure) + end + end +end diff --git a/lib/pay_pal_restap_is/models/link_description.rb b/lib/pay_pal_restap_is/models/link_description.rb new file mode 100644 index 0000000..5605a70 --- /dev/null +++ b/lib/pay_pal_restap_is/models/link_description.rb @@ -0,0 +1,75 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) + # information. + class LinkDescription < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The complete target URL. To make the related call, combine the method with + # this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. + # For pre-processing, include the `$`, `(`, and `)` characters. The `href` + # is the key HATEOAS component that links a completed call with a subsequent + # call. + # @return [String] + attr_accessor :href + + # The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), + # which serves as an ID for a link that unambiguously describes the + # semantics of the link. See [Link + # Relations](https://www.iana.org/assignments/link-relations/link-relations. + # xhtml). + # @return [String] + attr_accessor :rel + + # The HTTP method required to make the related call. + # @return [LinkHTTPMethod] + attr_accessor :method + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['href'] = 'href' + @_hash['rel'] = 'rel' + @_hash['method'] = 'method' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + method + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(href:, rel:, method: SKIP) + @href = href + @rel = rel + @method = method unless method == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + href = hash.key?('href') ? hash['href'] : nil + rel = hash.key?('rel') ? hash['rel'] : nil + method = hash.key?('method') ? hash['method'] : SKIP + + # Create object from extracted values. + LinkDescription.new(href: href, + rel: rel, + method: method) + end + end +end diff --git a/lib/pay_pal_restap_is/models/link_http_method.rb b/lib/pay_pal_restap_is/models/link_http_method.rb new file mode 100644 index 0000000..0f64c77 --- /dev/null +++ b/lib/pay_pal_restap_is/models/link_http_method.rb @@ -0,0 +1,41 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The HTTP method required to make the related call. + class LinkHTTPMethod + LINK_HTTP_METHOD = [ + # TODO: Write general description for GET + GET = 'GET'.freeze, + + # TODO: Write general description for POST + POST = 'POST'.freeze, + + # TODO: Write general description for PUT + PUT = 'PUT'.freeze, + + # TODO: Write general description for DELETE + DELETE = 'DELETE'.freeze, + + # TODO: Write general description for HEAD + HEAD = 'HEAD'.freeze, + + # TODO: Write general description for CONNECT + CONNECT = 'CONNECT'.freeze, + + # TODO: Write general description for OPTIONS + OPTIONS = 'OPTIONS'.freeze, + + # TODO: Write general description for PATCH + PATCH = 'PATCH'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/money.rb b/lib/pay_pal_restap_is/models/money.rb new file mode 100644 index 0000000..a1c606e --- /dev/null +++ b/lib/pay_pal_restap_is/models/money.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The currency and amount for a financial transaction, such as a balance or + # payment due. + class Money < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The [three-character ISO-4217 currency + # code](/api/rest/reference/currency-codes/) that identifies the currency. + # @return [String] + attr_accessor :currency_code + + # The value, which might be:
  • An integer for currencies like `JPY` + # that are not typically fractional.
  • A decimal fraction for + # currencies like `TND` that are subdivided into thousandths.
For + # the required number of decimal places for a currency code, see [Currency + # Codes](/api/rest/reference/currency-codes/). + # @return [String] + attr_accessor :value + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['currency_code'] = 'currency_code' + @_hash['value'] = 'value' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(currency_code:, value:) + @currency_code = currency_code + @value = value + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + currency_code = hash.key?('currency_code') ? hash['currency_code'] : nil + value = hash.key?('value') ? hash['value'] : nil + + # Create object from extracted values. + Money.new(currency_code: currency_code, + value: value) + end + end +end diff --git a/lib/pay_pal_restap_is/models/my_bank_payment_object.rb b/lib/pay_pal_restap_is/models/my_bank_payment_object.rb new file mode 100644 index 0000000..917e443 --- /dev/null +++ b/lib/pay_pal_restap_is/models/my_bank_payment_object.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using MyBank. + class MyBankPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + iban_last_chars + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP, + iban_last_chars: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + + # Create object from extracted values. + MyBankPaymentObject.new(name: name, + country_code: country_code, + bic: bic, + iban_last_chars: iban_last_chars) + end + end +end diff --git a/lib/pay_pal_restap_is/models/my_bank_payment_request.rb b/lib/pay_pal_restap_is/models/my_bank_payment_request.rb new file mode 100644 index 0000000..2d9cde2 --- /dev/null +++ b/lib/pay_pal_restap_is/models/my_bank_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using MyBank. + class MyBankPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + MyBankPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/name.rb b/lib/pay_pal_restap_is/models/name.rb new file mode 100644 index 0000000..8f64eb3 --- /dev/null +++ b/lib/pay_pal_restap_is/models/name.rb @@ -0,0 +1,61 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The name of the party. + class Name < BaseModel + SKIP = Object.new + private_constant :SKIP + + # When the party is a person, the party's given, or first, name. + # @return [String] + attr_accessor :given_name + + # When the party is a person, the party's surname or family name. Also known + # as the last name. Required when the party is a person. Use also to store + # multiple surnames including the matronymic, or mother's, surname. + # @return [String] + attr_accessor :surname + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['given_name'] = 'given_name' + @_hash['surname'] = 'surname' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + given_name + surname + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(given_name: SKIP, surname: SKIP) + @given_name = given_name unless given_name == SKIP + @surname = surname unless surname == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + given_name = hash.key?('given_name') ? hash['given_name'] : SKIP + surname = hash.key?('surname') ? hash['surname'] : SKIP + + # Create object from extracted values. + Name.new(given_name: given_name, + surname: surname) + end + end +end diff --git a/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb b/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb new file mode 100644 index 0000000..d944db7 --- /dev/null +++ b/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The net amount. Returned when the currency of the refund is different from + # the currency of the PayPal account where the merchant holds their funds. + class NetAmountBreakdownItem < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :payable_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :converted_amount + + # The exchange rate that determines the amount to convert from one currency + # to another currency. + # @return [ExchangeRate] + attr_accessor :exchange_rate + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payable_amount'] = 'payable_amount' + @_hash['converted_amount'] = 'converted_amount' + @_hash['exchange_rate'] = 'exchange_rate' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payable_amount + converted_amount + exchange_rate + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payable_amount: SKIP, converted_amount: SKIP, + exchange_rate: SKIP) + @payable_amount = payable_amount unless payable_amount == SKIP + @converted_amount = converted_amount unless converted_amount == SKIP + @exchange_rate = exchange_rate unless exchange_rate == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payable_amount = Money.from_hash(hash['payable_amount']) if hash['payable_amount'] + converted_amount = Money.from_hash(hash['converted_amount']) if hash['converted_amount'] + exchange_rate = ExchangeRate.from_hash(hash['exchange_rate']) if hash['exchange_rate'] + + # Create object from extracted values. + NetAmountBreakdownItem.new(payable_amount: payable_amount, + converted_amount: converted_amount, + exchange_rate: exchange_rate) + end + end +end diff --git a/lib/pay_pal_restap_is/models/network_token.rb b/lib/pay_pal_restap_is/models/network_token.rb new file mode 100644 index 0000000..25972db --- /dev/null +++ b/lib/pay_pal_restap_is/models/network_token.rb @@ -0,0 +1,95 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The Third Party Network token used to fund a payment. + class NetworkToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Third party network token number. + # @return [String] + attr_accessor :number + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # An Encrypted one-time use value that's sent along with Network Token. This + # field is not required to be present for recurring transactions. + # @return [String] + attr_accessor :cryptogram + + # Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data + # elements that indicate the transaction was processed electronically. This + # should be passed on the authorization transaction to the + # Gateway/Processor. + # @return [ECIFlag] + attr_accessor :eci_flag + + # A TRID, or a Token Requestor ID, is an identifier used by merchants to + # request network tokens from card networks. A TRID is a precursor to + # obtaining a network token for a credit card primary account number (PAN), + # and will aid in enabling secure card on file (COF) payments and reducing + # fraud. + # @return [String] + attr_accessor :token_requestor_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['number'] = 'number' + @_hash['expiry'] = 'expiry' + @_hash['cryptogram'] = 'cryptogram' + @_hash['eci_flag'] = 'eci_flag' + @_hash['token_requestor_id'] = 'token_requestor_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + cryptogram + eci_flag + token_requestor_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(number:, expiry:, cryptogram: SKIP, eci_flag: SKIP, + token_requestor_id: SKIP) + @number = number + @expiry = expiry + @cryptogram = cryptogram unless cryptogram == SKIP + @eci_flag = eci_flag unless eci_flag == SKIP + @token_requestor_id = token_requestor_id unless token_requestor_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + number = hash.key?('number') ? hash['number'] : nil + expiry = hash.key?('expiry') ? hash['expiry'] : nil + cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP + eci_flag = hash.key?('eci_flag') ? hash['eci_flag'] : SKIP + token_requestor_id = + hash.key?('token_requestor_id') ? hash['token_requestor_id'] : SKIP + + # Create object from extracted values. + NetworkToken.new(number: number, + expiry: expiry, + cryptogram: cryptogram, + eci_flag: eci_flag, + token_requestor_id: token_requestor_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/network_transaction_reference.rb b/lib/pay_pal_restap_is/models/network_transaction_reference.rb new file mode 100644 index 0000000..757cdc8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/network_transaction_reference.rb @@ -0,0 +1,90 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Reference values used by the card network to identify a transaction. + class NetworkTransactionReference < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Transaction reference id returned by the scheme. For Visa and Amex, this + # is the "Tran id" field in response. For MasterCard, this is the "BankNet + # reference id" field in response. For Discover, this is the "NRID" field in + # response. The pattern we expect for this field from Visa/Amex/CB/Discover + # is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric + # with special character -. + # @return [String] + attr_accessor :id + + # The date that the transaction was authorized by the scheme. This field may + # not be returned for all networks. MasterCard refers to this field as + # "BankNet reference date. + # @return [String] + attr_accessor :date + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :network + + # Reference ID issued for the card transaction. This ID can be used to track + # the transaction across processors, card brands and issuing banks. + # @return [String] + attr_accessor :acquirer_reference_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['date'] = 'date' + @_hash['network'] = 'network' + @_hash['acquirer_reference_number'] = 'acquirer_reference_number' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + date + network + acquirer_reference_number + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id:, date: SKIP, network: SKIP, + acquirer_reference_number: SKIP) + @id = id + @date = date unless date == SKIP + @network = network unless network == SKIP + unless acquirer_reference_number == SKIP + @acquirer_reference_number = + acquirer_reference_number + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + date = hash.key?('date') ? hash['date'] : SKIP + network = hash.key?('network') ? hash['network'] : SKIP + acquirer_reference_number = + hash.key?('acquirer_reference_number') ? hash['acquirer_reference_number'] : SKIP + + # Create object from extracted values. + NetworkTransactionReference.new(id: id, + date: date, + network: network, + acquirer_reference_number: acquirer_reference_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb b/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb new file mode 100644 index 0000000..a224583 --- /dev/null +++ b/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb @@ -0,0 +1,88 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Previous network transaction reference including id and network. + class NetworkTransactionReferenceEntity < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Transaction reference id returned by the scheme. For Visa and Amex, this + # is the "Tran id" field in response. For MasterCard, this is the "BankNet + # reference id" field in response. For Discover, this is the "NRID" field in + # response. The pattern we expect for this field from Visa/Amex/CB/Discover + # is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric + # with special character -. + # @return [String] + attr_accessor :id + + # The date that the transaction was authorized by the scheme. This field may + # not be returned for all networks. MasterCard refers to this field as + # "BankNet reference date. + # @return [String] + attr_accessor :date + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :network + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['date'] = 'date' + @_hash['network'] = 'network' + @_hash['time'] = 'time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + date + network + time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id:, date: SKIP, network: SKIP, time: SKIP) + @id = id + @date = date unless date == SKIP + @network = network unless network == SKIP + @time = time unless time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + date = hash.key?('date') ? hash['date'] : SKIP + network = hash.key?('network') ? hash['network'] : SKIP + time = hash.key?('time') ? hash['time'] : SKIP + + # Create object from extracted values. + NetworkTransactionReferenceEntity.new(id: id, + date: date, + network: network, + time: time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/o_auth_provider_error.rb b/lib/pay_pal_restap_is/models/o_auth_provider_error.rb new file mode 100644 index 0000000..a109a64 --- /dev/null +++ b/lib/pay_pal_restap_is/models/o_auth_provider_error.rb @@ -0,0 +1,45 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OAuth 2 Authorization error codes + class OAuthProviderError + O_AUTH_PROVIDER_ERROR = [ + # The request is missing a required parameter, includes an unsupported + # parameter value (other than grant type), repeats a parameter, includes + # multiple credentials, utilizes more than one mechanism for + # authenticating the client, or is otherwise malformed. + INVALID_REQUEST = 'invalid_request'.freeze, + + # Client authentication failed (e.g., unknown client, no client + # authentication included, or unsupported authentication method). + INVALID_CLIENT = 'invalid_client'.freeze, + + # The provided authorization grant (e.g., authorization code, resource + # owner credentials) or refresh token is invalid, expired, revoked, does + # not match the redirection URI used in the authorization request, or was + # issued to another client. + INVALID_GRANT = 'invalid_grant'.freeze, + + # The authenticated client is not authorized to use this authorization + # grant type. + UNAUTHORIZED_CLIENT = 'unauthorized_client'.freeze, + + # The authorization grant type is not supported by the authorization + # server. + UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'.freeze, + + # The requested scope is invalid, unknown, malformed, or exceeds the scope + # granted by the resource owner. + INVALID_SCOPE = 'invalid_scope'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + O_AUTH_PROVIDER_ERROR.include?(value) + end + end +end diff --git a/lib/pay_pal_restap_is/models/o_auth_token.rb b/lib/pay_pal_restap_is/models/o_auth_token.rb new file mode 100644 index 0000000..338ae47 --- /dev/null +++ b/lib/pay_pal_restap_is/models/o_auth_token.rb @@ -0,0 +1,106 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OAuth 2 Authorization endpoint response + class OAuthToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Access token + # @return [String] + attr_accessor :access_token + + # Type of access token + # @return [String] + attr_accessor :token_type + + # Time in seconds before the access token expires + # @return [Integer] + attr_accessor :expires_in + + # List of scopes granted + # This is a space-delimited list of strings. + # @return [String] + attr_accessor :scope + + # Time of token expiry as unix timestamp (UTC) + # @return [Integer] + attr_accessor :expiry + + # Refresh token + # Used to get a new access token when it expires. + # @return [String] + attr_accessor :refresh_token + + # An ID token response type is of JSON Web Token (JWT) that contains claims + # about the identity of the authenticated user. + # @return [String] + attr_accessor :id_token + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['access_token'] = 'access_token' + @_hash['token_type'] = 'token_type' + @_hash['expires_in'] = 'expires_in' + @_hash['scope'] = 'scope' + @_hash['expiry'] = 'expiry' + @_hash['refresh_token'] = 'refresh_token' + @_hash['id_token'] = 'id_token' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + expires_in + scope + expiry + refresh_token + id_token + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(access_token:, token_type:, expires_in: SKIP, scope: SKIP, + expiry: SKIP, refresh_token: SKIP, id_token: SKIP) + @access_token = access_token + @token_type = token_type + @expires_in = expires_in unless expires_in == SKIP + @scope = scope unless scope == SKIP + @expiry = expiry unless expiry == SKIP + @refresh_token = refresh_token unless refresh_token == SKIP + @id_token = id_token unless id_token == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + access_token = hash.key?('access_token') ? hash['access_token'] : nil + token_type = hash.key?('token_type') ? hash['token_type'] : nil + expires_in = hash.key?('expires_in') ? hash['expires_in'] : SKIP + scope = hash.key?('scope') ? hash['scope'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + refresh_token = hash.key?('refresh_token') ? hash['refresh_token'] : SKIP + id_token = hash.key?('id_token') ? hash['id_token'] : SKIP + + # Create object from extracted values. + OAuthToken.new(access_token: access_token, + token_type: token_type, + expires_in: expires_in, + scope: scope, + expiry: expiry, + refresh_token: refresh_token, + id_token: id_token) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order.rb b/lib/pay_pal_restap_is/models/order.rb new file mode 100644 index 0000000..f1b71a2 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order.rb @@ -0,0 +1,178 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The order details. + class Order < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # The ID of the order. + # @return [String] + attr_accessor :id + + # The payment source used to fund the payment. + # @return [PaymentSourceResponse] + attr_accessor :payment_source + + # The intent to either capture payment immediately or authorize a payment + # for an order after order creation. + # @return [CheckoutPaymentIntent] + attr_accessor :intent + + # The instruction to process an order. + # @return [ProcessingInstruction] + attr_accessor :processing_instruction + + # The instruction to process an order. + # @return [Payer] + attr_accessor :payer + + # An array of purchase units. Each purchase unit establishes a contract + # between a customer and merchant. Each purchase unit represents either a + # full or partial order that the customer intends to purchase from the + # merchant. + # @return [Array[PurchaseUnit]] + attr_accessor :purchase_units + + # The order status. + # @return [OrderStatus] + attr_accessor :status + + # An array of request-related HATEOAS links. To complete payer approval, use + # the `approve` link to redirect the payer. The API caller has 3 hours + # (default setting, this which can be changed by your account manager to + # 24/48/72 hours to accommodate your use case) from the time the order is + # created, to redirect your payer. Once redirected, the API caller has 3 + # hours for the payer to approve the order and either authorize or capture + # the order. If you are not using the PayPal JavaScript SDK to initiate + # PayPal Checkout (in context) ensure that you include + # `application_context.return_url` is specified or you will get "We're + # sorry, Things don't appear to be working at the moment" after the payer + # approves the payment. + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash['id'] = 'id' + @_hash['payment_source'] = 'payment_source' + @_hash['intent'] = 'intent' + @_hash['processing_instruction'] = 'processing_instruction' + @_hash['payer'] = 'payer' + @_hash['purchase_units'] = 'purchase_units' + @_hash['status'] = 'status' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + create_time + update_time + id + payment_source + intent + processing_instruction + payer + purchase_units + status + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize( + create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP, + intent: SKIP, + processing_instruction: ProcessingInstruction::NO_INSTRUCTION, + payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP + ) + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + @id = id unless id == SKIP + @payment_source = payment_source unless payment_source == SKIP + @intent = intent unless intent == SKIP + @processing_instruction = processing_instruction unless processing_instruction == SKIP + @payer = payer unless payer == SKIP + @purchase_units = purchase_units unless purchase_units == SKIP + @status = status unless status == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + id = hash.key?('id') ? hash['id'] : SKIP + payment_source = PaymentSourceResponse.from_hash(hash['payment_source']) if + hash['payment_source'] + intent = hash.key?('intent') ? hash['intent'] : SKIP + processing_instruction = + hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION + payer = Payer.from_hash(hash['payer']) if hash['payer'] + # Parameter is an array, so we need to iterate through it + purchase_units = nil + unless hash['purchase_units'].nil? + purchase_units = [] + hash['purchase_units'].each do |structure| + purchase_units << (PurchaseUnit.from_hash(structure) if structure) + end + end + + purchase_units = SKIP unless hash.key?('purchase_units') + status = hash.key?('status') ? hash['status'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + Order.new(create_time: create_time, + update_time: update_time, + id: id, + payment_source: payment_source, + intent: intent, + processing_instruction: processing_instruction, + payer: payer, + purchase_units: purchase_units, + status: status, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_application_context.rb b/lib/pay_pal_restap_is/models/order_application_context.rb new file mode 100644 index 0000000..24c1890 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_application_context.rb @@ -0,0 +1,193 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer experience during the approval process for the payment + # with PayPal.
Note: Partners and Marketplaces + # might configure brand_name and shipping_preference + # during partner account setup, which overrides the request + # values.
+ class OrderApplicationContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # DEPRECATED. The label that overrides the business name in the PayPal + # account on the PayPal site. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.brand_name`). Please specify + # this field in the `experience_context` object instead of the + # `application_context` object. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal + # site for customer checkout. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.landing_page`). Please specify + # this field in the `experience_context` object instead of the + # `application_context` object. + # @return [OrderApplicationContextLandingPage] + attr_accessor :landing_page + + # DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the + # shipping address to the customer.
  • Enables the customer to choose + # an address on the PayPal site.
  • Restricts the customer from + # changing the address during the payment-approval process.
. The + # fields in `application_context` are now available in the + # `experience_context` object under the `payment_source` which supports them + # (eg. `payment_source.paypal.experience_context.shipping_preference`). + # Please specify this field in the `experience_context` object instead of + # the `application_context` object. + # @return [OrderApplicationContextShippingPreference] + attr_accessor :shipping_preference + + # DEPRECATED. Configures a Continue or Pay + # Now checkout flow. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.user_action`). Please specify + # this field in the `experience_context` object instead of the + # `application_context` object. + # @return [OrderApplicationContextUserAction] + attr_accessor :user_action + + # The customer and merchant payment preferences. + # @return [PaymentMethodPreference] + attr_accessor :payment_method + + # DEPRECATED. The URL where the customer is redirected after the customer + # approves the payment. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.return_url`). Please specify + # this field in the `experience_context` object instead of the + # `application_context` object. + # @return [String] + attr_accessor :return_url + + # DEPRECATED. The URL where the customer is redirected after the customer + # cancels the payment. The fields in `application_context` are now available + # in the `experience_context` object under the `payment_source` which + # supports them (eg. `payment_source.paypal.experience_context.cancel_url`). + # Please specify this field in the `experience_context` object instead of + # the `application_context` object. + # @return [String] + attr_accessor :cancel_url + + # Provides additional details to process a payment using a `payment_source` + # that has been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only + # with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ # @return [StoredPaymentSource] + attr_accessor :stored_payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['landing_page'] = 'landing_page' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['user_action'] = 'user_action' + @_hash['payment_method'] = 'payment_method' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['stored_payment_source'] = 'stored_payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + landing_page + shipping_preference + user_action + payment_method + return_url + cancel_url + stored_payment_source + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize( + brand_name: SKIP, locale: SKIP, + landing_page: OrderApplicationContextLandingPage::NO_PREFERENCE, + shipping_preference: OrderApplicationContextShippingPreference::GET_FROM_FILE, + user_action: OrderApplicationContextUserAction::CONTINUE, + payment_method: SKIP, return_url: SKIP, cancel_url: SKIP, + stored_payment_source: SKIP + ) + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @landing_page = landing_page unless landing_page == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @user_action = user_action unless user_action == SKIP + @payment_method = payment_method unless payment_method == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @stored_payment_source = stored_payment_source unless stored_payment_source == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + landing_page = + hash['landing_page'] ||= OrderApplicationContextLandingPage::NO_PREFERENCE + shipping_preference = + hash['shipping_preference'] ||= OrderApplicationContextShippingPreference::GET_FROM_FILE + user_action = + hash['user_action'] ||= OrderApplicationContextUserAction::CONTINUE + payment_method = PaymentMethodPreference.from_hash(hash['payment_method']) if + hash['payment_method'] + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + stored_payment_source = StoredPaymentSource.from_hash(hash['stored_payment_source']) if + hash['stored_payment_source'] + + # Create object from extracted values. + OrderApplicationContext.new(brand_name: brand_name, + locale: locale, + landing_page: landing_page, + shipping_preference: shipping_preference, + user_action: user_action, + payment_method: payment_method, + return_url: return_url, + cancel_url: cancel_url, + stored_payment_source: stored_payment_source) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb b/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb new file mode 100644 index 0000000..9f8fc37 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb @@ -0,0 +1,32 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site + # for customer checkout. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.landing_page`). Please specify + # this field in the `experience_context` object instead of the + # `application_context` object. + class OrderApplicationContextLandingPage + ORDER_APPLICATION_CONTEXT_LANDING_PAGE = [ + # TODO: Write general description for LOGIN + LOGIN = 'LOGIN'.freeze, + + # TODO: Write general description for BILLING + BILLING = 'BILLING'.freeze, + + # TODO: Write general description for NO_PREFERENCE + NO_PREFERENCE = 'NO_PREFERENCE'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb b/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb new file mode 100644 index 0000000..f059f54 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb @@ -0,0 +1,34 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the + # shipping address to the customer.
  • Enables the customer to choose an + # address on the PayPal site.
  • Restricts the customer from changing the + # address during the payment-approval process.
. The fields in + # `application_context` are now available in the `experience_context` object + # under the `payment_source` which supports them (eg. + # `payment_source.paypal.experience_context.shipping_preference`). Please + # specify this field in the `experience_context` object instead of the + # `application_context` object. + class OrderApplicationContextShippingPreference + ORDER_APPLICATION_CONTEXT_SHIPPING_PREFERENCE = [ + # TODO: Write general description for GET_FROM_FILE + GET_FROM_FILE = 'GET_FROM_FILE'.freeze, + + # TODO: Write general description for NO_SHIPPING + NO_SHIPPING = 'NO_SHIPPING'.freeze, + + # TODO: Write general description for SET_PROVIDED_ADDRESS + SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_application_context_user_action.rb b/lib/pay_pal_restap_is/models/order_application_context_user_action.rb new file mode 100644 index 0000000..89637b1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_application_context_user_action.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # DEPRECATED. Configures a Continue or Pay + # Now checkout flow. The fields in `application_context` are now + # available in the `experience_context` object under the `payment_source` + # which supports them (eg. + # `payment_source.paypal.experience_context.user_action`). Please specify this + # field in the `experience_context` object instead of the + # `application_context` object. + class OrderApplicationContextUserAction + ORDER_APPLICATION_CONTEXT_USER_ACTION = [ + # TODO: Write general description for CONTINUE + CONTINUE = 'CONTINUE'.freeze, + + # TODO: Write general description for PAY_NOW + PAY_NOW = 'PAY_NOW'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_authorize_request.rb b/lib/pay_pal_restap_is/models/order_authorize_request.rb new file mode 100644 index 0000000..07c53a8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_authorize_request.rb @@ -0,0 +1,51 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The authorization of an order request. + class OrderAuthorizeRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment source definition. + # @return [OrderAuthorizeRequestPaymentSource] + attr_accessor :payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_source'] = 'payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payment_source + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_source: SKIP) + @payment_source = payment_source unless payment_source == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_source = OrderAuthorizeRequestPaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + + # Create object from extracted values. + OrderAuthorizeRequest.new(payment_source: payment_source) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb b/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb new file mode 100644 index 0000000..7993f84 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb @@ -0,0 +1,104 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment source definition. + class OrderAuthorizeRequestPaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to use to fund a payment. Can be a credit or debit + # card.
Note: Passing card number, cvv and + # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by + # which you do not have to take on the PCI SAQ D burden by + # using hosted fields - refer to this + # Integration Guide*.
+ # @return [CardRequest] + attr_accessor :card + + # The tokenized payment source to fund a payment. + # @return [Token] + attr_accessor :token + + # A resource that identifies a PayPal Wallet is used for payment. + # @return [PayPalWallet] + attr_accessor :paypal + + # Information needed to pay using ApplePay. + # @return [ApplePayRequest] + attr_accessor :apple_pay + + # Information needed to pay using Google Pay. + # @return [GooglePayRequest] + attr_accessor :google_pay + + # Information needed to pay using Venmo. + # @return [VenmoWalletRequest] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['token'] = 'token' + @_hash['paypal'] = 'paypal' + @_hash['apple_pay'] = 'apple_pay' + @_hash['google_pay'] = 'google_pay' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + token + paypal + apple_pay + google_pay + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP, + google_pay: SKIP, venmo: SKIP) + @card = card unless card == SKIP + @token = token unless token == SKIP + @paypal = paypal unless paypal == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @google_pay = google_pay unless google_pay == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardRequest.from_hash(hash['card']) if hash['card'] + token = Token.from_hash(hash['token']) if hash['token'] + paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] + apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] + google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] + venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + OrderAuthorizeRequestPaymentSource.new(card: card, + token: token, + paypal: paypal, + apple_pay: apple_pay, + google_pay: google_pay, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_authorize_response.rb b/lib/pay_pal_restap_is/models/order_authorize_response.rb new file mode 100644 index 0000000..661dde4 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_authorize_response.rb @@ -0,0 +1,171 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # OrderAuthorizeResponse Model. + class OrderAuthorizeResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # The ID of the order. + # @return [String] + attr_accessor :id + + # The payment source used to fund the payment. + # @return [OrderAuthorizeResponsePaymentSource] + attr_accessor :payment_source + + # The intent to either capture payment immediately or authorize a payment + # for an order after order creation. + # @return [CheckoutPaymentIntent] + attr_accessor :intent + + # The instruction to process an order. + # @return [ProcessingInstruction] + attr_accessor :processing_instruction + + # The instruction to process an order. + # @return [Payer] + attr_accessor :payer + + # An array of purchase units. Each purchase unit establishes a contract + # between a customer and merchant. Each purchase unit represents either a + # full or partial order that the customer intends to purchase from the + # merchant. + # @return [Array[PurchaseUnit]] + attr_accessor :purchase_units + + # The order status. + # @return [OrderStatus] + attr_accessor :status + + # An array of request-related [HATEOAS + # links](/api/rest/responses/#hateoas-links) that are either relevant to the + # issue by providing additional information or offering potential + # resolutions. + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash['id'] = 'id' + @_hash['payment_source'] = 'payment_source' + @_hash['intent'] = 'intent' + @_hash['processing_instruction'] = 'processing_instruction' + @_hash['payer'] = 'payer' + @_hash['purchase_units'] = 'purchase_units' + @_hash['status'] = 'status' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + create_time + update_time + id + payment_source + intent + processing_instruction + payer + purchase_units + status + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize( + create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP, + intent: SKIP, + processing_instruction: ProcessingInstruction::NO_INSTRUCTION, + payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP + ) + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + @id = id unless id == SKIP + @payment_source = payment_source unless payment_source == SKIP + @intent = intent unless intent == SKIP + @processing_instruction = processing_instruction unless processing_instruction == SKIP + @payer = payer unless payer == SKIP + @purchase_units = purchase_units unless purchase_units == SKIP + @status = status unless status == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + id = hash.key?('id') ? hash['id'] : SKIP + payment_source = OrderAuthorizeResponsePaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + intent = hash.key?('intent') ? hash['intent'] : SKIP + processing_instruction = + hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION + payer = Payer.from_hash(hash['payer']) if hash['payer'] + # Parameter is an array, so we need to iterate through it + purchase_units = nil + unless hash['purchase_units'].nil? + purchase_units = [] + hash['purchase_units'].each do |structure| + purchase_units << (PurchaseUnit.from_hash(structure) if structure) + end + end + + purchase_units = SKIP unless hash.key?('purchase_units') + status = hash.key?('status') ? hash['status'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + OrderAuthorizeResponse.new(create_time: create_time, + update_time: update_time, + id: id, + payment_source: payment_source, + intent: intent, + processing_instruction: processing_instruction, + payer: payer, + purchase_units: purchase_units, + status: status, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb b/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb new file mode 100644 index 0000000..0994a35 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb @@ -0,0 +1,88 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment source used to fund the payment. + class OrderAuthorizeResponsePaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to use to fund a payment. Card can be a credit or debit + # card. + # @return [CardResponse] + attr_accessor :card + + # The PayPal Wallet response. + # @return [PayPalWalletResponse] + attr_accessor :paypal + + # Information needed to pay using ApplePay. + # @return [ApplePayPaymentObject] + attr_accessor :apple_pay + + # Google Pay Wallet payment data. + # @return [GooglePayWalletResponse] + attr_accessor :google_pay + + # Venmo wallet response. + # @return [VenmoWalletResponse] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['paypal'] = 'paypal' + @_hash['apple_pay'] = 'apple_pay' + @_hash['google_pay'] = 'google_pay' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + paypal + apple_pay + google_pay + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, paypal: SKIP, apple_pay: SKIP, google_pay: SKIP, + venmo: SKIP) + @card = card unless card == SKIP + @paypal = paypal unless paypal == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @google_pay = google_pay unless google_pay == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardResponse.from_hash(hash['card']) if hash['card'] + paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal'] + apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay'] + google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay'] + venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + OrderAuthorizeResponsePaymentSource.new(card: card, + paypal: paypal, + apple_pay: apple_pay, + google_pay: google_pay, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_capture_request.rb b/lib/pay_pal_restap_is/models/order_capture_request.rb new file mode 100644 index 0000000..95a61ef --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_capture_request.rb @@ -0,0 +1,51 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Completes an capture payment for an order. + class OrderCaptureRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment source definition. + # @return [OrderCaptureRequestPaymentSource] + attr_accessor :payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_source'] = 'payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payment_source + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_source: SKIP) + @payment_source = payment_source unless payment_source == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_source = OrderCaptureRequestPaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + + # Create object from extracted values. + OrderCaptureRequest.new(payment_source: payment_source) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb b/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb new file mode 100644 index 0000000..f670428 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb @@ -0,0 +1,104 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment source definition. + class OrderCaptureRequestPaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to use to fund a payment. Can be a credit or debit + # card.
Note: Passing card number, cvv and + # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by + # which you do not have to take on the PCI SAQ D burden by + # using hosted fields - refer to this + # Integration Guide*.
+ # @return [CardRequest] + attr_accessor :card + + # The tokenized payment source to fund a payment. + # @return [Token] + attr_accessor :token + + # A resource that identifies a PayPal Wallet is used for payment. + # @return [PayPalWallet] + attr_accessor :paypal + + # Information needed to pay using ApplePay. + # @return [ApplePayRequest] + attr_accessor :apple_pay + + # Information needed to pay using Google Pay. + # @return [GooglePayRequest] + attr_accessor :google_pay + + # Information needed to pay using Venmo. + # @return [VenmoWalletRequest] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['token'] = 'token' + @_hash['paypal'] = 'paypal' + @_hash['apple_pay'] = 'apple_pay' + @_hash['google_pay'] = 'google_pay' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + token + paypal + apple_pay + google_pay + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP, + google_pay: SKIP, venmo: SKIP) + @card = card unless card == SKIP + @token = token unless token == SKIP + @paypal = paypal unless paypal == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @google_pay = google_pay unless google_pay == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardRequest.from_hash(hash['card']) if hash['card'] + token = Token.from_hash(hash['token']) if hash['token'] + paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] + apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] + google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] + venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + OrderCaptureRequestPaymentSource.new(card: card, + token: token, + paypal: paypal, + apple_pay: apple_pay, + google_pay: google_pay, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_confirm_application_context.rb b/lib/pay_pal_restap_is/models/order_confirm_application_context.rb new file mode 100644 index 0000000..b340acd --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_confirm_application_context.rb @@ -0,0 +1,109 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer confirmation experience. + class OrderConfirmApplicationContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Label to present to your payer as part of the PayPal hosted web + # experience. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The URL where the customer is redirected after the customer approves the + # payment. + # @return [String] + attr_accessor :return_url + + # The URL where the customer is redirected after the customer cancels the + # payment. + # @return [String] + attr_accessor :cancel_url + + # Provides additional details to process a payment using a `payment_source` + # that has been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only + # with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ # @return [StoredPaymentSource] + attr_accessor :stored_payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['stored_payment_source'] = 'stored_payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + return_url + cancel_url + stored_payment_source + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, + cancel_url: SKIP, stored_payment_source: SKIP) + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @stored_payment_source = stored_payment_source unless stored_payment_source == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + stored_payment_source = StoredPaymentSource.from_hash(hash['stored_payment_source']) if + hash['stored_payment_source'] + + # Create object from extracted values. + OrderConfirmApplicationContext.new(brand_name: brand_name, + locale: locale, + return_url: return_url, + cancel_url: cancel_url, + stored_payment_source: stored_payment_source) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_request.rb b/lib/pay_pal_restap_is/models/order_request.rb new file mode 100644 index 0000000..763a933 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_request.rb @@ -0,0 +1,103 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The order request details. + class OrderRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The intent to either capture payment immediately or authorize a payment + # for an order after order creation. + # @return [CheckoutPaymentIntent] + attr_accessor :intent + + # The intent to either capture payment immediately or authorize a payment + # for an order after order creation. + # @return [Payer] + attr_accessor :payer + + # An array of purchase units. Each purchase unit establishes a contract + # between a payer and the payee. Each purchase unit represents either a full + # or partial order that the payer intends to purchase from the payee. + # @return [Array[PurchaseUnitRequest]] + attr_accessor :purchase_units + + # The payment source definition. + # @return [PaymentSource] + attr_accessor :payment_source + + # Customizes the payer experience during the approval process for the + # payment with PayPal.
Note: Partners and + # Marketplaces might configure brand_name and + # shipping_preference during partner account setup, which + # overrides the request values.
+ # @return [OrderApplicationContext] + attr_accessor :application_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['intent'] = 'intent' + @_hash['payer'] = 'payer' + @_hash['purchase_units'] = 'purchase_units' + @_hash['payment_source'] = 'payment_source' + @_hash['application_context'] = 'application_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payer + payment_source + application_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(intent:, purchase_units:, payer: SKIP, payment_source: SKIP, + application_context: SKIP) + @intent = intent + @payer = payer unless payer == SKIP + @purchase_units = purchase_units + @payment_source = payment_source unless payment_source == SKIP + @application_context = application_context unless application_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + intent = hash.key?('intent') ? hash['intent'] : nil + # Parameter is an array, so we need to iterate through it + purchase_units = nil + unless hash['purchase_units'].nil? + purchase_units = [] + hash['purchase_units'].each do |structure| + purchase_units << (PurchaseUnitRequest.from_hash(structure) if structure) + end + end + + purchase_units = nil unless hash.key?('purchase_units') + payer = Payer.from_hash(hash['payer']) if hash['payer'] + payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source'] + application_context = OrderApplicationContext.from_hash(hash['application_context']) if + hash['application_context'] + + # Create object from extracted values. + OrderRequest.new(intent: intent, + purchase_units: purchase_units, + payer: payer, + payment_source: payment_source, + application_context: application_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_status.rb b/lib/pay_pal_restap_is/models/order_status.rb new file mode 100644 index 0000000..3c79f3a --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_status.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The order status. + class OrderStatus + ORDER_STATUS = [ + # TODO: Write general description for CREATED + CREATED = 'CREATED'.freeze, + + # TODO: Write general description for SAVED + SAVED = 'SAVED'.freeze, + + # TODO: Write general description for APPROVED + APPROVED = 'APPROVED'.freeze, + + # TODO: Write general description for VOIDED + VOIDED = 'VOIDED'.freeze, + + # TODO: Write general description for COMPLETED + COMPLETED = 'COMPLETED'.freeze, + + # TODO: Write general description for PAYER_ACTION_REQUIRED + PAYER_ACTION_REQUIRED = 'PAYER_ACTION_REQUIRED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_tracker_item.rb b/lib/pay_pal_restap_is/models/order_tracker_item.rb new file mode 100644 index 0000000..5ee670e --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_tracker_item.rb @@ -0,0 +1,99 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details of the items in the shipment. + class OrderTrackerItem < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The item name or title. + # @return [String] + attr_accessor :name + + # The item quantity. Must be a whole number. + # @return [String] + attr_accessor :quantity + + # The stock keeping unit (SKU) for the item. This can contain unicode + # characters. + # @return [String] + attr_accessor :sku + + # The URL to the item being purchased. Visible to buyer and used in buyer + # experiences. + # @return [String] + attr_accessor :url + + # The URL of the item's image. File type and size restrictions apply. An + # image that violates these restrictions will not be honored. + # @return [String] + attr_accessor :image_url + + # The Universal Product Code of the item. + # @return [UniversalProductCode] + attr_accessor :upc + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['quantity'] = 'quantity' + @_hash['sku'] = 'sku' + @_hash['url'] = 'url' + @_hash['image_url'] = 'image_url' + @_hash['upc'] = 'upc' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + quantity + sku + url + image_url + upc + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, quantity: SKIP, sku: SKIP, url: SKIP, + image_url: SKIP, upc: SKIP) + @name = name unless name == SKIP + @quantity = quantity unless quantity == SKIP + @sku = sku unless sku == SKIP + @url = url unless url == SKIP + @image_url = image_url unless image_url == SKIP + @upc = upc unless upc == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + quantity = hash.key?('quantity') ? hash['quantity'] : SKIP + sku = hash.key?('sku') ? hash['sku'] : SKIP + url = hash.key?('url') ? hash['url'] : SKIP + image_url = hash.key?('image_url') ? hash['image_url'] : SKIP + upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] + + # Create object from extracted values. + OrderTrackerItem.new(name: name, + quantity: quantity, + sku: sku, + url: url, + image_url: image_url, + upc: upc) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_tracker_request.rb b/lib/pay_pal_restap_is/models/order_tracker_request.rb new file mode 100644 index 0000000..6e27474 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_tracker_request.rb @@ -0,0 +1,116 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The tracking details of an order. + class OrderTrackerRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The tracking number for the shipment. This property supports Unicode. + # @return [String] + attr_accessor :tracking_number + + # The carrier for the shipment. Some carriers have a global version as well + # as local subsidiaries. The subsidiaries are repeated over many countries + # and might also have an entry in the global list. Choose the carrier for + # your country. If the carrier is not available for your country, choose the + # global version of the carrier. If your carrier name is not in the list, + # set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For + # allowed values, see Carriers. + # @return [ShipmentCarrier] + attr_accessor :carrier + + # The name of the carrier for the shipment. Provide this value only if the + # carrier parameter is OTHER. This property supports Unicode. + # @return [String] + attr_accessor :carrier_name_other + + # The PayPal capture ID. + # @return [String] + attr_accessor :capture_id + + # If true, sends an email notification to the payer of the PayPal + # transaction. The email contains the tracking information that was uploaded + # through the API. + # @return [TrueClass | FalseClass] + attr_accessor :notify_payer + + # An array of details of items in the shipment. + # @return [Array[OrderTrackerItem]] + attr_accessor :items + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['tracking_number'] = 'tracking_number' + @_hash['carrier'] = 'carrier' + @_hash['carrier_name_other'] = 'carrier_name_other' + @_hash['capture_id'] = 'capture_id' + @_hash['notify_payer'] = 'notify_payer' + @_hash['items'] = 'items' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + tracking_number + carrier + carrier_name_other + notify_payer + items + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(capture_id:, tracking_number: SKIP, carrier: SKIP, + carrier_name_other: SKIP, notify_payer: false, items: SKIP) + @tracking_number = tracking_number unless tracking_number == SKIP + @carrier = carrier unless carrier == SKIP + @carrier_name_other = carrier_name_other unless carrier_name_other == SKIP + @capture_id = capture_id + @notify_payer = notify_payer unless notify_payer == SKIP + @items = items unless items == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + capture_id = hash.key?('capture_id') ? hash['capture_id'] : nil + tracking_number = + hash.key?('tracking_number') ? hash['tracking_number'] : SKIP + carrier = hash.key?('carrier') ? hash['carrier'] : SKIP + carrier_name_other = + hash.key?('carrier_name_other') ? hash['carrier_name_other'] : SKIP + notify_payer = hash['notify_payer'] ||= false + # Parameter is an array, so we need to iterate through it + items = nil + unless hash['items'].nil? + items = [] + hash['items'].each do |structure| + items << (OrderTrackerItem.from_hash(structure) if structure) + end + end + + items = SKIP unless hash.key?('items') + + # Create object from extracted values. + OrderTrackerRequest.new(capture_id: capture_id, + tracking_number: tracking_number, + carrier: carrier, + carrier_name_other: carrier_name_other, + notify_payer: notify_payer, + items: items) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_tracker_response.rb b/lib/pay_pal_restap_is/models/order_tracker_response.rb new file mode 100644 index 0000000..cc123a4 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_tracker_response.rb @@ -0,0 +1,122 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The tracking response on creation of tracker. + class OrderTrackerResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The tracker id. + # @return [String] + attr_accessor :id + + # The status of the item shipment. + # @return [OrderTrackerStatus] + attr_accessor :status + + # An array of details of items in the shipment. + # @return [Array[OrderTrackerItem]] + attr_accessor :items + + # An array of request-related HATEOAS links. + # @return [Array[LinkDescription]] + attr_accessor :links + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['status'] = 'status' + @_hash['items'] = 'items' + @_hash['links'] = 'links' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + status + items + links + create_time + update_time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, status: SKIP, items: SKIP, links: SKIP, + create_time: SKIP, update_time: SKIP) + @id = id unless id == SKIP + @status = status unless status == SKIP + @items = items unless items == SKIP + @links = links unless links == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + status = hash.key?('status') ? hash['status'] : SKIP + # Parameter is an array, so we need to iterate through it + items = nil + unless hash['items'].nil? + items = [] + hash['items'].each do |structure| + items << (OrderTrackerItem.from_hash(structure) if structure) + end + end + + items = SKIP unless hash.key?('items') + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + + # Create object from extracted values. + OrderTrackerResponse.new(id: id, + status: status, + items: items, + links: links, + create_time: create_time, + update_time: update_time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/order_tracker_status.rb b/lib/pay_pal_restap_is/models/order_tracker_status.rb new file mode 100644 index 0000000..910d0c6 --- /dev/null +++ b/lib/pay_pal_restap_is/models/order_tracker_status.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status of the item shipment. + class OrderTrackerStatus + ORDER_TRACKER_STATUS = [ + # TODO: Write general description for CANCELLED + CANCELLED = 'CANCELLED'.freeze, + + # TODO: Write general description for SHIPPED + SHIPPED = 'SHIPPED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/p24_payment_object.rb b/lib/pay_pal_restap_is/models/p24_payment_object.rb new file mode 100644 index 0000000..400b2bc --- /dev/null +++ b/lib/pay_pal_restap_is/models/p24_payment_object.rb @@ -0,0 +1,108 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using P24(Przelewy24). + class P24PaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # P24 generated payment description. + # @return [String] + attr_accessor :payment_descriptor + + # Numeric identifier of the payment scheme or bank used for the payment. + # @return [String] + attr_accessor :method_id + + # Friendly name of the payment scheme or bank used for the payment. + # @return [String] + attr_accessor :method_description + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['email'] = 'email' + @_hash['country_code'] = 'country_code' + @_hash['payment_descriptor'] = 'payment_descriptor' + @_hash['method_id'] = 'method_id' + @_hash['method_description'] = 'method_description' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + email + country_code + payment_descriptor + method_id + method_description + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, email: SKIP, country_code: SKIP, + payment_descriptor: SKIP, method_id: SKIP, + method_description: SKIP) + @name = name unless name == SKIP + @email = email unless email == SKIP + @country_code = country_code unless country_code == SKIP + @payment_descriptor = payment_descriptor unless payment_descriptor == SKIP + @method_id = method_id unless method_id == SKIP + @method_description = method_description unless method_description == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + email = hash.key?('email') ? hash['email'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + payment_descriptor = + hash.key?('payment_descriptor') ? hash['payment_descriptor'] : SKIP + method_id = hash.key?('method_id') ? hash['method_id'] : SKIP + method_description = + hash.key?('method_description') ? hash['method_description'] : SKIP + + # Create object from extracted values. + P24PaymentObject.new(name: name, + email: email, + country_code: country_code, + payment_descriptor: payment_descriptor, + method_id: method_id, + method_description: method_description) + end + end +end diff --git a/lib/pay_pal_restap_is/models/p24_payment_request.rb b/lib/pay_pal_restap_is/models/p24_payment_request.rb new file mode 100644 index 0000000..b5f0e39 --- /dev/null +++ b/lib/pay_pal_restap_is/models/p24_payment_request.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using P24 (Przelewy24). + class P24PaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['email'] = 'email' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, email:, country_code:, experience_context: SKIP) + @name = name + @email = email + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + email = hash.key?('email') ? hash['email'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + P24PaymentRequest.new(name: name, + email: email, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pa_res_status.rb b/lib/pay_pal_restap_is/models/pa_res_status.rb new file mode 100644 index 0000000..a1788c9 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pa_res_status.rb @@ -0,0 +1,42 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Transactions status result identifier. The outcome of the issuer's + # authentication. + class PAResStatus + PA_RES_STATUS = [ + # TODO: Write general description for Y + Y = 'Y'.freeze, + + # TODO: Write general description for N + N = 'N'.freeze, + + # TODO: Write general description for U + U = 'U'.freeze, + + # TODO: Write general description for A + A = 'A'.freeze, + + # TODO: Write general description for C + C = 'C'.freeze, + + # TODO: Write general description for R + R = 'R'.freeze, + + # TODO: Write general description for D + D = 'D'.freeze, + + # TODO: Write general description for I + I = 'I'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/patch.rb b/lib/pay_pal_restap_is/models/patch.rb new file mode 100644 index 0000000..c6f28b2 --- /dev/null +++ b/lib/pay_pal_restap_is/models/patch.rb @@ -0,0 +1,83 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The JSON patch object to apply partial updates to resources. + class Patch < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The operation. + # @return [PatchOp] + attr_accessor :op + + # The JSON Pointer to the + # target document location at which to complete the operation. + # @return [String] + attr_accessor :path + + # The value to apply. The remove, copy, and + # move operations do not require a value. Since JSON Patch allows any + # type for value, the type property is not + # specified. + # @return [Object] + attr_accessor :value + + # The JSON Pointer to the + # target document location from which to move the value. Required for the + # move operation. + # @return [String] + attr_accessor :from + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['op'] = 'op' + @_hash['path'] = 'path' + @_hash['value'] = 'value' + @_hash['from'] = 'from' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + path + value + from + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(op:, path: SKIP, value: SKIP, from: SKIP) + @op = op + @path = path unless path == SKIP + @value = value unless value == SKIP + @from = from unless from == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + op = hash.key?('op') ? hash['op'] : nil + path = hash.key?('path') ? hash['path'] : SKIP + value = hash.key?('value') ? hash['value'] : SKIP + from = hash.key?('from') ? hash['from'] : SKIP + + # Create object from extracted values. + Patch.new(op: op, + path: path, + value: value, + from: from) + end + end +end diff --git a/lib/pay_pal_restap_is/models/patch_op.rb b/lib/pay_pal_restap_is/models/patch_op.rb new file mode 100644 index 0000000..f8e4f8c --- /dev/null +++ b/lib/pay_pal_restap_is/models/patch_op.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The operation. + class PatchOp + PATCH_OP = [ + # TODO: Write general description for ADD + ADD = 'add'.freeze, + + # TODO: Write general description for REMOVE + REMOVE = 'remove'.freeze, + + # TODO: Write general description for REPLACE + REPLACE = 'replace'.freeze, + + # TODO: Write general description for MOVE + MOVE = 'move'.freeze, + + # TODO: Write general description for COPY + COPY = 'copy'.freeze, + + # TODO: Write general description for TEST + TEST = 'test'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb b/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb new file mode 100644 index 0000000..c732e5e --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The type of landing page to show on the PayPal site for customer checkout. + class PayPalExperienceLandingPage + PAY_PAL_EXPERIENCE_LANDING_PAGE = [ + # TODO: Write general description for LOGIN + LOGIN = 'LOGIN'.freeze, + + # TODO: Write general description for GUEST_CHECKOUT + GUEST_CHECKOUT = 'GUEST_CHECKOUT'.freeze, + + # TODO: Write general description for NO_PREFERENCE + NO_PREFERENCE = 'NO_PREFERENCE'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb b/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb new file mode 100644 index 0000000..0e17299 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb @@ -0,0 +1,24 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Configures a Continue or Pay Now checkout + # flow. + class PayPalExperienceUserAction + PAY_PAL_EXPERIENCE_USER_ACTION = [ + # TODO: Write general description for CONTINUE + CONTINUE = 'CONTINUE'.freeze, + + # TODO: Write general description for PAY_NOW + PAY_NOW = 'PAY_NOW'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb new file mode 100644 index 0000000..aba8431 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb @@ -0,0 +1,180 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # PayPalPaymentToken Model. + class PayPalPaymentToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The description displayed to the consumer on the approval flow for a + # digital wallet, as well as on the merchant view of the payment token + # management experience. exp: PayPal.com. + # @return [String] + attr_accessor :description + + # The shipping details. + # @return [VaultedDigitalWalletShippingDetails] + attr_accessor :shipping + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # The usage type associated with a digital wallet payment token. + # @return [String] + attr_accessor :usage_type + + # The customer type associated with a digital wallet payment token. This is + # to indicate whether the customer acting on the merchant / platform is + # either a business or a consumer. + # @return [String] + attr_accessor :customer_type + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :payer_id + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :account_id + + # The phone number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [Phone] + attr_accessor :phone_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['description'] = 'description' + @_hash['shipping'] = 'shipping' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['email_address'] = 'email_address' + @_hash['payer_id'] = 'payer_id' + @_hash['name'] = 'name' + @_hash['phone'] = 'phone' + @_hash['address'] = 'address' + @_hash['account_id'] = 'account_id' + @_hash['phone_number'] = 'phone_number' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + shipping + permit_multiple_payment_tokens + usage_type + customer_type + email_address + payer_id + name + phone + address + account_id + phone_number + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(description: SKIP, shipping: SKIP, + permit_multiple_payment_tokens: false, usage_type: SKIP, + customer_type: SKIP, email_address: SKIP, payer_id: SKIP, + name: SKIP, phone: SKIP, address: SKIP, account_id: SKIP, + phone_number: SKIP) + @description = description unless description == SKIP + @shipping = shipping unless shipping == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + @usage_type = usage_type unless usage_type == SKIP + @customer_type = customer_type unless customer_type == SKIP + @email_address = email_address unless email_address == SKIP + @payer_id = payer_id unless payer_id == SKIP + @name = name unless name == SKIP + @phone = phone unless phone == SKIP + @address = address unless address == SKIP + @account_id = account_id unless account_id == SKIP + @phone_number = phone_number unless phone_number == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + description = hash.key?('description') ? hash['description'] : SKIP + shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if + hash['shipping'] + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP + customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + address = Address.from_hash(hash['address']) if hash['address'] + account_id = hash.key?('account_id') ? hash['account_id'] : SKIP + phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number'] + + # Create object from extracted values. + PayPalPaymentToken.new(description: description, + shipping: shipping, + permit_multiple_payment_tokens: permit_multiple_payment_tokens, + usage_type: usage_type, + customer_type: customer_type, + email_address: email_address, + payer_id: payer_id, + name: name, + phone: phone, + address: address, + account_id: account_id, + phone_number: phone_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb new file mode 100644 index 0000000..45aa40e --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb @@ -0,0 +1,25 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The customer type associated with the PayPal payment token. This is to + # indicate whether the customer acting on the merchant / platform is either a + # business or a consumer. + class PayPalPaymentTokenCustomerType + PAY_PAL_PAYMENT_TOKEN_CUSTOMER_TYPE = [ + # TODO: Write general description for CONSUMER + CONSUMER = 'CONSUMER'.freeze, + + # TODO: Write general description for BUSINESS + BUSINESS = 'BUSINESS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb new file mode 100644 index 0000000..f9e598c --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Expected business/pricing model for the billing agreement. + class PayPalPaymentTokenUsagePattern + PAY_PAL_PAYMENT_TOKEN_USAGE_PATTERN = [ + # TODO: Write general description for IMMEDIATE + IMMEDIATE = 'IMMEDIATE'.freeze, + + # TODO: Write general description for DEFERRED + DEFERRED = 'DEFERRED'.freeze, + + # TODO: Write general description for RECURRING_PREPAID + RECURRING_PREPAID = 'RECURRING_PREPAID'.freeze, + + # TODO: Write general description for RECURRING_POSTPAID + RECURRING_POSTPAID = 'RECURRING_POSTPAID'.freeze, + + # TODO: Write general description for THRESHOLD_PREPAID + THRESHOLD_PREPAID = 'THRESHOLD_PREPAID'.freeze, + + # TODO: Write general description for THRESHOLD_POSTPAID + THRESHOLD_POSTPAID = 'THRESHOLD_POSTPAID'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb new file mode 100644 index 0000000..58055ad --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The usage type associated with the PayPal payment token. + class PayPalPaymentTokenUsageType + PAY_PAL_PAYMENT_TOKEN_USAGE_TYPE = [ + # TODO: Write general description for MERCHANT + MERCHANT = 'MERCHANT'.freeze, + + # TODO: Write general description for PLATFORM + PLATFORM = 'PLATFORM'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet.rb new file mode 100644 index 0000000..28d7f3d --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet.rb @@ -0,0 +1,158 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A resource that identifies a PayPal Wallet is used for payment. + class PayPalWallet < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the vaulted payment source. This ID should be + # stored on the merchant's server so the saved payment source can be used + # for future transactions. + # @return [String] + attr_accessor :vault_id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # The stand-alone date, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent + # special legal values, such as a date of birth, you should use dates with + # no associated time or time-zone data. Whenever possible, use the standard + # `date_time` type. This regular expression does not validate all dates. For + # example, February 31 is valid and nothing is known about leap years. + # @return [String] + attr_accessor :birth_date + + # The tax ID of the customer. The customer is also known as the payer. Both + # `tax_id` and `tax_id_type` are required. + # @return [TaxInfo] + attr_accessor :tax_info + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # Additional attributes associated with the use of this PayPal Wallet. + # @return [PayPalWalletAttributes] + attr_accessor :attributes + + # Customizes the payer experience during the approval process for payment + # with PayPal.
Note: Partners and Marketplaces + # might configure brand_name and + # shipping_preference during partner account setup, which + # overrides the request values.
+ # @return [PayPalWalletExperienceContext] + attr_accessor :experience_context + + # The PayPal billing agreement ID. References an approved recurring payment + # for goods or services. + # @return [String] + attr_accessor :billing_agreement_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault_id'] = 'vault_id' + @_hash['email_address'] = 'email_address' + @_hash['name'] = 'name' + @_hash['phone'] = 'phone' + @_hash['birth_date'] = 'birth_date' + @_hash['tax_info'] = 'tax_info' + @_hash['address'] = 'address' + @_hash['attributes'] = 'attributes' + @_hash['experience_context'] = 'experience_context' + @_hash['billing_agreement_id'] = 'billing_agreement_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault_id + email_address + name + phone + birth_date + tax_info + address + attributes + experience_context + billing_agreement_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault_id: SKIP, email_address: SKIP, name: SKIP, phone: SKIP, + birth_date: SKIP, tax_info: SKIP, address: SKIP, + attributes: SKIP, experience_context: SKIP, + billing_agreement_id: SKIP) + @vault_id = vault_id unless vault_id == SKIP + @email_address = email_address unless email_address == SKIP + @name = name unless name == SKIP + @phone = phone unless phone == SKIP + @birth_date = birth_date unless birth_date == SKIP + @tax_info = tax_info unless tax_info == SKIP + @address = address unless address == SKIP + @attributes = attributes unless attributes == SKIP + @experience_context = experience_context unless experience_context == SKIP + @billing_agreement_id = billing_agreement_id unless billing_agreement_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP + tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] + address = Address.from_hash(hash['address']) if hash['address'] + attributes = PayPalWalletAttributes.from_hash(hash['attributes']) if hash['attributes'] + experience_context = PayPalWalletExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + billing_agreement_id = + hash.key?('billing_agreement_id') ? hash['billing_agreement_id'] : SKIP + + # Create object from extracted values. + PayPalWallet.new(vault_id: vault_id, + email_address: email_address, + name: name, + phone: phone, + birth_date: birth_date, + tax_info: tax_info, + address: address, + attributes: attributes, + experience_context: experience_context, + billing_agreement_id: billing_agreement_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb new file mode 100644 index 0000000..813b9cb --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb @@ -0,0 +1,24 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The account status indicates whether the buyer has verified the financial + # details associated with their PayPal account. + class PayPalWalletAccountVerificationStatus + PAY_PAL_WALLET_ACCOUNT_VERIFICATION_STATUS = [ + # TODO: Write general description for VERIFIED + VERIFIED = 'VERIFIED'.freeze, + + # TODO: Write general description for UNVERIFIED + UNVERIFIED = 'UNVERIFIED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb new file mode 100644 index 0000000..9dd0f18 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb @@ -0,0 +1,59 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of this PayPal Wallet. + class PayPalWalletAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [PayPalWalletCustomerRequest] + attr_accessor :customer + + # TODO: Write general description for this method + # @return [PayPalWalletVaultInstruction] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(customer: SKIP, vault: SKIP) + @customer = customer unless customer == SKIP + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + customer = PayPalWalletCustomerRequest.from_hash(hash['customer']) if hash['customer'] + vault = PayPalWalletVaultInstruction.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + PayPalWalletAttributes.new(customer: customer, + vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb new file mode 100644 index 0000000..d8ada22 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb @@ -0,0 +1,70 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of a PayPal Wallet. + class PayPalWalletAttributesResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a saved PayPal Wallet payment source. + # @return [PayPalWalletVaultResponse] + attr_accessor :vault + + # An array of merchant cobranded cards used by buyer to complete an order. + # This array will be present if a merchant has onboarded their cobranded + # card with PayPal and provided corresponding label(s). + # @return [Array[CobrandedCard]] + attr_accessor :cobranded_cards + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault'] = 'vault' + @_hash['cobranded_cards'] = 'cobranded_cards' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault + cobranded_cards + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault: SKIP, cobranded_cards: SKIP) + @vault = vault unless vault == SKIP + @cobranded_cards = cobranded_cards unless cobranded_cards == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault = PayPalWalletVaultResponse.from_hash(hash['vault']) if hash['vault'] + # Parameter is an array, so we need to iterate through it + cobranded_cards = nil + unless hash['cobranded_cards'].nil? + cobranded_cards = [] + hash['cobranded_cards'].each do |structure| + cobranded_cards << (CobrandedCard.from_hash(structure) if structure) + end + end + + cobranded_cards = SKIP unless hash.key?('cobranded_cards') + + # Create object from extracted values. + PayPalWalletAttributesResponse.new(vault: vault, + cobranded_cards: cobranded_cards) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb new file mode 100644 index 0000000..1765088 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a customer in PayPal's system of record. + class PayPalWalletCustomer < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # Merchants and partners may already have a data-store where their customer + # information is persisted. Use merchant_customer_id to associate the + # PayPal-generated customer.id to your representation of a customer. + # @return [String] + attr_accessor :merchant_customer_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['email_address'] = 'email_address' + @_hash['phone'] = 'phone' + @_hash['merchant_customer_id'] = 'merchant_customer_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + email_address + phone + merchant_customer_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, email_address: SKIP, phone: SKIP, + merchant_customer_id: SKIP) + @id = id unless id == SKIP + @email_address = email_address unless email_address == SKIP + @phone = phone unless phone == SKIP + @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + merchant_customer_id = + hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP + + # Create object from extracted values. + PayPalWalletCustomer.new(id: id, + email_address: email_address, + phone: phone, + merchant_customer_id: merchant_customer_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb new file mode 100644 index 0000000..d151db1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # PayPalWalletCustomerRequest Model. + class PayPalWalletCustomerRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # Merchants and partners may already have a data-store where their customer + # information is persisted. Use merchant_customer_id to associate the + # PayPal-generated customer.id to your representation of a customer. + # @return [String] + attr_accessor :merchant_customer_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['email_address'] = 'email_address' + @_hash['phone'] = 'phone' + @_hash['merchant_customer_id'] = 'merchant_customer_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + email_address + phone + merchant_customer_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, email_address: SKIP, phone: SKIP, + merchant_customer_id: SKIP) + @id = id unless id == SKIP + @email_address = email_address unless email_address == SKIP + @phone = phone unless phone == SKIP + @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + merchant_customer_id = + hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP + + # Create object from extracted values. + PayPalWalletCustomerRequest.new(id: id, + email_address: email_address, + phone: phone, + merchant_customer_id: merchant_customer_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb new file mode 100644 index 0000000..fdf0c61 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb @@ -0,0 +1,140 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the payer experience during the approval process for payment with + # PayPal.
Note: Partners and Marketplaces might + # configure brand_name and shipping_preference + # during partner account setup, which overrides the request + # values.
+ class PayPalWalletExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The location from which the shipping address is derived. + # @return [ShippingPreference] + attr_accessor :shipping_preference + + # Describes the URL. + # @return [String] + attr_accessor :return_url + + # Describes the URL. + # @return [String] + attr_accessor :cancel_url + + # The type of landing page to show on the PayPal site for customer checkout. + # @return [PayPalExperienceLandingPage] + attr_accessor :landing_page + + # Configures a Continue or Pay Now + # checkout flow. + # @return [PayPalExperienceUserAction] + attr_accessor :user_action + + # The merchant-preferred payment methods. + # @return [PayeePaymentMethodPreference] + attr_accessor :payment_method_preference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['landing_page'] = 'landing_page' + @_hash['user_action'] = 'user_action' + @_hash['payment_method_preference'] = 'payment_method_preference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + shipping_preference + return_url + cancel_url + landing_page + user_action + payment_method_preference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize( + brand_name: SKIP, locale: SKIP, + shipping_preference: ShippingPreference::GET_FROM_FILE, return_url: SKIP, + cancel_url: SKIP, + landing_page: PayPalExperienceLandingPage::NO_PREFERENCE, + user_action: PayPalExperienceUserAction::CONTINUE, + payment_method_preference: PayeePaymentMethodPreference::UNRESTRICTED + ) + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @landing_page = landing_page unless landing_page == SKIP + @user_action = user_action unless user_action == SKIP + unless payment_method_preference == SKIP + @payment_method_preference = + payment_method_preference + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + shipping_preference = + hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + landing_page = + hash['landing_page'] ||= PayPalExperienceLandingPage::NO_PREFERENCE + user_action = hash['user_action'] ||= PayPalExperienceUserAction::CONTINUE + payment_method_preference = + hash['payment_method_preference'] ||= PayeePaymentMethodPreference::UNRESTRICTED + + # Create object from extracted values. + PayPalWalletExperienceContext.new(brand_name: brand_name, + locale: locale, + shipping_preference: shipping_preference, + return_url: return_url, + cancel_url: cancel_url, + landing_page: landing_page, + user_action: user_action, + payment_method_preference: payment_method_preference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb new file mode 100644 index 0000000..75abd22 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb @@ -0,0 +1,156 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The PayPal Wallet response. + class PayPalWalletResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The PayPal payer ID, which is a masked version of the PayPal account + # number intended for use with third parties. The account number is + # reversibly encrypted and a proprietary variant of Base32 is used to encode + # the result. + # @return [String] + attr_accessor :account_id + + # The account status indicates whether the buyer has verified the financial + # details associated with their PayPal account. + # @return [PayPalWalletAccountVerificationStatus] + attr_accessor :account_status + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone type. + # @return [PhoneType] + attr_accessor :phone_type + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumber] + attr_accessor :phone_number + + # The stand-alone date, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent + # special legal values, such as a date of birth, you should use dates with + # no associated time or time-zone data. Whenever possible, use the standard + # `date_time` type. This regular expression does not validate all dates. For + # example, February 31 is valid and nothing is known about leap years. + # @return [String] + attr_accessor :birth_date + + # The tax ID of the customer. The customer is also known as the payer. Both + # `tax_id` and `tax_id_type` are required. + # @return [TaxInfo] + attr_accessor :tax_info + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # Additional attributes associated with the use of a PayPal Wallet. + # @return [PayPalWalletAttributesResponse] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['account_id'] = 'account_id' + @_hash['account_status'] = 'account_status' + @_hash['name'] = 'name' + @_hash['phone_type'] = 'phone_type' + @_hash['phone_number'] = 'phone_number' + @_hash['birth_date'] = 'birth_date' + @_hash['tax_info'] = 'tax_info' + @_hash['address'] = 'address' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + account_id + account_status + name + phone_type + phone_number + birth_date + tax_info + address + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, account_id: SKIP, account_status: SKIP, + name: SKIP, phone_type: SKIP, phone_number: SKIP, + birth_date: SKIP, tax_info: SKIP, address: SKIP, + attributes: SKIP) + @email_address = email_address unless email_address == SKIP + @account_id = account_id unless account_id == SKIP + @account_status = account_status unless account_status == SKIP + @name = name unless name == SKIP + @phone_type = phone_type unless phone_type == SKIP + @phone_number = phone_number unless phone_number == SKIP + @birth_date = birth_date unless birth_date == SKIP + @tax_info = tax_info unless tax_info == SKIP + @address = address unless address == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + account_id = hash.key?('account_id') ? hash['account_id'] : SKIP + account_status = + hash.key?('account_status') ? hash['account_status'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone_type = hash.key?('phone_type') ? hash['phone_type'] : SKIP + phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] + birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP + tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] + address = Address.from_hash(hash['address']) if hash['address'] + attributes = PayPalWalletAttributesResponse.from_hash(hash['attributes']) if + hash['attributes'] + + # Create object from extracted values. + PayPalWalletResponse.new(email_address: email_address, + account_id: account_id, + account_status: account_status, + name: name, + phone_type: phone_type, + phone_number: phone_number, + birth_date: birth_date, + tax_info: tax_info, + address: address, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb new file mode 100644 index 0000000..d1acb55 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb @@ -0,0 +1,115 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # PayPalWalletVaultInstruction Model. + class PayPalWalletVaultInstruction < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Defines how and when the payment source gets vaulted. + # @return [StoreInVaultInstruction] + attr_accessor :store_in_vault + + # The description displayed to PayPal consumer on the approval flow for + # PayPal, as well as on the PayPal payment token management experience on + # PayPal.com. + # @return [String] + attr_accessor :description + + # Expected business/pricing model for the billing agreement. + # @return [PayPalPaymentTokenUsagePattern] + attr_accessor :usage_pattern + + # The usage type associated with the PayPal payment token. + # @return [PayPalPaymentTokenUsageType] + attr_accessor :usage_type + + # The customer type associated with the PayPal payment token. This is to + # indicate whether the customer acting on the merchant / platform is either + # a business or a consumer. + # @return [PayPalPaymentTokenCustomerType] + attr_accessor :customer_type + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['store_in_vault'] = 'store_in_vault' + @_hash['description'] = 'description' + @_hash['usage_pattern'] = 'usage_pattern' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + store_in_vault + description + usage_pattern + customer_type + permit_multiple_payment_tokens + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(usage_type:, store_in_vault: SKIP, description: SKIP, + usage_pattern: SKIP, + customer_type: PayPalPaymentTokenCustomerType::CONSUMER, + permit_multiple_payment_tokens: false) + @store_in_vault = store_in_vault unless store_in_vault == SKIP + @description = description unless description == SKIP + @usage_pattern = usage_pattern unless usage_pattern == SKIP + @usage_type = usage_type + @customer_type = customer_type unless customer_type == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + usage_type = hash.key?('usage_type') ? hash['usage_type'] : nil + store_in_vault = + hash.key?('store_in_vault') ? hash['store_in_vault'] : SKIP + description = hash.key?('description') ? hash['description'] : SKIP + usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP + customer_type = + hash['customer_type'] ||= PayPalPaymentTokenCustomerType::CONSUMER + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + + # Create object from extracted values. + PayPalWalletVaultInstruction.new(usage_type: usage_type, + store_in_vault: store_in_vault, + description: description, + usage_pattern: usage_pattern, + customer_type: customer_type, + permit_multiple_payment_tokens: permit_multiple_payment_tokens) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb new file mode 100644 index 0000000..0f7f429 --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb @@ -0,0 +1,86 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a saved PayPal Wallet payment source. + class PayPalWalletVaultResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the saved payment source. + # @return [String] + attr_accessor :id + + # The vault status. + # @return [PayPalWalletVaultStatus] + attr_accessor :status + + # An array of request-related HATEOAS links. + # @return [Array[LinkDescription]] + attr_accessor :links + + # The details about a customer in PayPal's system of record. + # @return [PayPalWalletCustomer] + attr_accessor :customer + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['status'] = 'status' + @_hash['links'] = 'links' + @_hash['customer'] = 'customer' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + status + links + customer + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, status: SKIP, links: SKIP, customer: SKIP) + @id = id unless id == SKIP + @status = status unless status == SKIP + @links = links unless links == SKIP + @customer = customer unless customer == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + status = hash.key?('status') ? hash['status'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + customer = PayPalWalletCustomer.from_hash(hash['customer']) if hash['customer'] + + # Create object from extracted values. + PayPalWalletVaultResponse.new(id: id, + status: status, + links: links, + customer: customer) + end + end +end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb new file mode 100644 index 0000000..e98437a --- /dev/null +++ b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The vault status. + class PayPalWalletVaultStatus + PAY_PAL_WALLET_VAULT_STATUS = [ + # TODO: Write general description for VAULTED + VAULTED = 'VAULTED'.freeze, + + # TODO: Write general description for CREATED + CREATED = 'CREATED'.freeze, + + # TODO: Write general description for APPROVED + APPROVED = 'APPROVED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/payee.rb b/lib/pay_pal_restap_is/models/payee.rb new file mode 100644 index 0000000..581be30 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payee.rb @@ -0,0 +1,65 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The merchant who receives the funds and fulfills the order. The merchant is + # also known as the payee., The details for the merchant who receives the + # funds and fulfills the order. The merchant is also known as the payee. + class Payee < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :merchant_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['merchant_id'] = 'merchant_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + merchant_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, merchant_id: SKIP) + @email_address = email_address unless email_address == SKIP + @merchant_id = merchant_id unless merchant_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP + + # Create object from extracted values. + Payee.new(email_address: email_address, + merchant_id: merchant_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payee_base.rb b/lib/pay_pal_restap_is/models/payee_base.rb new file mode 100644 index 0000000..c1b442f --- /dev/null +++ b/lib/pay_pal_restap_is/models/payee_base.rb @@ -0,0 +1,64 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details for the merchant who receives the funds and fulfills the order. + # The merchant is also known as the payee. + class PayeeBase < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :merchant_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['merchant_id'] = 'merchant_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + merchant_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, merchant_id: SKIP) + @email_address = email_address unless email_address == SKIP + @merchant_id = merchant_id unless merchant_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP + + # Create object from extracted values. + PayeeBase.new(email_address: email_address, + merchant_id: merchant_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb b/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb new file mode 100644 index 0000000..e71dbcb --- /dev/null +++ b/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The merchant-preferred payment methods. + class PayeePaymentMethodPreference + PAYEE_PAYMENT_METHOD_PREFERENCE = [ + # TODO: Write general description for UNRESTRICTED + UNRESTRICTED = 'UNRESTRICTED'.freeze, + + # TODO: Write general description for IMMEDIATE_PAYMENT_REQUIRED + IMMEDIATE_PAYMENT_REQUIRED = 'IMMEDIATE_PAYMENT_REQUIRED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/payer.rb b/lib/pay_pal_restap_is/models/payer.rb new file mode 100644 index 0000000..503795b --- /dev/null +++ b/lib/pay_pal_restap_is/models/payer.rb @@ -0,0 +1,120 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Payer Model. + class Payer < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :payer_id + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # The stand-alone date, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent + # special legal values, such as a date of birth, you should use dates with + # no associated time or time-zone data. Whenever possible, use the standard + # `date_time` type. This regular expression does not validate all dates. For + # example, February 31 is valid and nothing is known about leap years. + # @return [String] + attr_accessor :birth_date + + # The tax ID of the customer. The customer is also known as the payer. Both + # `tax_id` and `tax_id_type` are required. + # @return [TaxInfo] + attr_accessor :tax_info + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['payer_id'] = 'payer_id' + @_hash['name'] = 'name' + @_hash['phone'] = 'phone' + @_hash['birth_date'] = 'birth_date' + @_hash['tax_info'] = 'tax_info' + @_hash['address'] = 'address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + payer_id + name + phone + birth_date + tax_info + address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, payer_id: SKIP, name: SKIP, phone: SKIP, + birth_date: SKIP, tax_info: SKIP, address: SKIP) + @email_address = email_address unless email_address == SKIP + @payer_id = payer_id unless payer_id == SKIP + @name = name unless name == SKIP + @phone = phone unless phone == SKIP + @birth_date = birth_date unless birth_date == SKIP + @tax_info = tax_info unless tax_info == SKIP + @address = address unless address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP + tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] + address = Address.from_hash(hash['address']) if hash['address'] + + # Create object from extracted values. + Payer.new(email_address: email_address, + payer_id: payer_id, + name: name, + phone: phone, + birth_date: birth_date, + tax_info: tax_info, + address: address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payer_base.rb b/lib/pay_pal_restap_is/models/payer_base.rb new file mode 100644 index 0000000..bc4d30a --- /dev/null +++ b/lib/pay_pal_restap_is/models/payer_base.rb @@ -0,0 +1,64 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The customer who approves and pays for the order. The customer is also known + # as the payer. + class PayerBase < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :payer_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['payer_id'] = 'payer_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + payer_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, payer_id: SKIP) + @email_address = email_address unless email_address == SKIP + @payer_id = payer_id unless payer_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP + + # Create object from extracted values. + PayerBase.new(email_address: email_address, + payer_id: payer_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_advice_code.rb b/lib/pay_pal_restap_is/models/payment_advice_code.rb new file mode 100644 index 0000000..71bfdc4 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_advice_code.rb @@ -0,0 +1,30 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The declined payment transactions might have payment advice codes. The card + # networks, like Visa and Mastercard, return payment advice codes. + class PaymentAdviceCode + PAYMENT_ADVICE_CODE = [ + # TODO: Write general description for ENUM_01 + ENUM_01 = '01'.freeze, + + # TODO: Write general description for ENUM_02 + ENUM_02 = '02'.freeze, + + # TODO: Write general description for ENUM_03 + ENUM_03 = '03'.freeze, + + # TODO: Write general description for ENUM_21 + ENUM_21 = '21'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_authorization.rb b/lib/pay_pal_restap_is/models/payment_authorization.rb new file mode 100644 index 0000000..bf66ded --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_authorization.rb @@ -0,0 +1,212 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The authorized payment transaction. + class PaymentAuthorization < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status for the authorized payment. + # @return [AuthorizationStatus] + attr_accessor :status + + # The details of the authorized payment status. + # @return [AuthorizationStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the authorized payment. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :network_transaction_reference + + # The level of protection offered as defined by [PayPal Seller Protection + # for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtection] + attr_accessor :seller_protection + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :expiration_time + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # The supplementary data. + # @return [PaymentSupplementaryData] + attr_accessor :supplementary_data + + # The details for the merchant who receives the funds and fulfills the + # order. The merchant is also known as the payee. + # @return [Payee] + attr_accessor :payee + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['seller_protection'] = 'seller_protection' + @_hash['expiration_time'] = 'expiration_time' + @_hash['links'] = 'links' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash['supplementary_data'] = 'supplementary_data' + @_hash['payee'] = 'payee' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + network_transaction_reference + seller_protection + expiration_time + links + create_time + update_time + supplementary_data + payee + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + network_transaction_reference: SKIP, seller_protection: SKIP, + expiration_time: SKIP, links: SKIP, create_time: SKIP, + update_time: SKIP, supplementary_data: SKIP, payee: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @seller_protection = seller_protection unless seller_protection == SKIP + @expiration_time = expiration_time unless expiration_time == SKIP + @links = links unless links == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + @supplementary_data = supplementary_data unless supplementary_data == SKIP + @payee = payee unless payee == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) + end + seller_protection = SellerProtection.from_hash(hash['seller_protection']) if + hash['seller_protection'] + expiration_time = + hash.key?('expiration_time') ? hash['expiration_time'] : SKIP + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if + hash['supplementary_data'] + payee = Payee.from_hash(hash['payee']) if hash['payee'] + + # Create object from extracted values. + PaymentAuthorization.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + network_transaction_reference: network_transaction_reference, + seller_protection: seller_protection, + expiration_time: expiration_time, + links: links, + create_time: create_time, + update_time: update_time, + supplementary_data: supplementary_data, + payee: payee) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_collection.rb b/lib/pay_pal_restap_is/models/payment_collection.rb new file mode 100644 index 0000000..f5ec4f8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_collection.rb @@ -0,0 +1,99 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The collection of payments, or transactions, for a purchase unit in an + # order. For example, authorized payments, captured payments, and refunds. + class PaymentCollection < BaseModel + SKIP = Object.new + private_constant :SKIP + + # An array of authorized payments for a purchase unit. A purchase unit can + # have zero or more authorized payments. + # @return [Array[AuthorizationWithAdditionalData]] + attr_accessor :authorizations + + # An array of captured payments for a purchase unit. A purchase unit can + # have zero or more captured payments. + # @return [Array[Capture]] + attr_accessor :captures + + # An array of refunds for a purchase unit. A purchase unit can have zero or + # more refunds. + # @return [Array[Refund]] + attr_accessor :refunds + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['authorizations'] = 'authorizations' + @_hash['captures'] = 'captures' + @_hash['refunds'] = 'refunds' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + authorizations + captures + refunds + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(authorizations: SKIP, captures: SKIP, refunds: SKIP) + @authorizations = authorizations unless authorizations == SKIP + @captures = captures unless captures == SKIP + @refunds = refunds unless refunds == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + # Parameter is an array, so we need to iterate through it + authorizations = nil + unless hash['authorizations'].nil? + authorizations = [] + hash['authorizations'].each do |structure| + authorizations << (AuthorizationWithAdditionalData.from_hash(structure) if structure) + end + end + + authorizations = SKIP unless hash.key?('authorizations') + # Parameter is an array, so we need to iterate through it + captures = nil + unless hash['captures'].nil? + captures = [] + hash['captures'].each do |structure| + captures << (Capture.from_hash(structure) if structure) + end + end + + captures = SKIP unless hash.key?('captures') + # Parameter is an array, so we need to iterate through it + refunds = nil + unless hash['refunds'].nil? + refunds = [] + hash['refunds'].each do |structure| + refunds << (Refund.from_hash(structure) if structure) + end + end + + refunds = SKIP unless hash.key?('refunds') + + # Create object from extracted values. + PaymentCollection.new(authorizations: authorizations, + captures: captures, + refunds: refunds) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_initiator.rb b/lib/pay_pal_restap_is/models/payment_initiator.rb new file mode 100644 index 0000000..c7af62b --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_initiator.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The person or party who initiated or triggered the payment. + class PaymentInitiator + PAYMENT_INITIATOR = [ + # TODO: Write general description for CUSTOMER + CUSTOMER = 'CUSTOMER'.freeze, + + # TODO: Write general description for MERCHANT + MERCHANT = 'MERCHANT'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_instruction.rb b/lib/pay_pal_restap_is/models/payment_instruction.rb new file mode 100644 index 0000000..0696350 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_instruction.rb @@ -0,0 +1,105 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Any additional payment instructions to be consider during payment + # processing. This processing instruction is applicable for Capturing an order + # or Authorizing an Order. + class PaymentInstruction < BaseModel + SKIP = Object.new + private_constant :SKIP + + # An array of various fees, commissions, tips, or donations. This field is + # only applicable to merchants that been enabled for PayPal Complete + # Payments Platform for Marketplaces and Platforms capability. + # @return [Array[PlatformFee]] + attr_accessor :platform_fees + + # The funds that are held on behalf of the merchant. + # @return [DisbursementMode] + attr_accessor :disbursement_mode + + # This field is only enabled for selected merchants/partners to use and + # provides the ability to trigger a specific pricing rate/plan for a payment + # transaction. The list of eligible 'payee_pricing_tier_id' would be + # provided to you by your Account Manager. Specifying values other than the + # one provided to you by your account manager would result in an error. + # @return [String] + attr_accessor :payee_pricing_tier_id + + # FX identifier generated returned by PayPal to be used for payment + # processing in order to honor FX rate (for eligible integrations) to be + # used when amount is settled/received into the payee account. + # @return [String] + attr_accessor :payee_receivable_fx_rate_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['platform_fees'] = 'platform_fees' + @_hash['disbursement_mode'] = 'disbursement_mode' + @_hash['payee_pricing_tier_id'] = 'payee_pricing_tier_id' + @_hash['payee_receivable_fx_rate_id'] = 'payee_receivable_fx_rate_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + platform_fees + disbursement_mode + payee_pricing_tier_id + payee_receivable_fx_rate_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(platform_fees: SKIP, + disbursement_mode: DisbursementMode::INSTANT, + payee_pricing_tier_id: SKIP, + payee_receivable_fx_rate_id: SKIP) + @platform_fees = platform_fees unless platform_fees == SKIP + @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP + @payee_pricing_tier_id = payee_pricing_tier_id unless payee_pricing_tier_id == SKIP + unless payee_receivable_fx_rate_id == SKIP + @payee_receivable_fx_rate_id = + payee_receivable_fx_rate_id + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + # Parameter is an array, so we need to iterate through it + platform_fees = nil + unless hash['platform_fees'].nil? + platform_fees = [] + hash['platform_fees'].each do |structure| + platform_fees << (PlatformFee.from_hash(structure) if structure) + end + end + + platform_fees = SKIP unless hash.key?('platform_fees') + disbursement_mode = + hash['disbursement_mode'] ||= DisbursementMode::INSTANT + payee_pricing_tier_id = + hash.key?('payee_pricing_tier_id') ? hash['payee_pricing_tier_id'] : SKIP + payee_receivable_fx_rate_id = + hash.key?('payee_receivable_fx_rate_id') ? hash['payee_receivable_fx_rate_id'] : SKIP + + # Create object from extracted values. + PaymentInstruction.new(platform_fees: platform_fees, + disbursement_mode: disbursement_mode, + payee_pricing_tier_id: payee_pricing_tier_id, + payee_receivable_fx_rate_id: payee_receivable_fx_rate_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_method_preference.rb b/lib/pay_pal_restap_is/models/payment_method_preference.rb new file mode 100644 index 0000000..970f817 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_method_preference.rb @@ -0,0 +1,72 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The customer and merchant payment preferences. + class PaymentMethodPreference < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The merchant-preferred payment methods. + # @return [PayeePaymentMethodPreference] + attr_accessor :payee_preferred + + # NACHA (the regulatory body governing the ACH network) requires that API + # callers (merchants, partners) obtain the consumer’s explicit authorization + # before initiating a transaction. To stay compliant, you’ll need to make + # sure that you retain a compliant authorization for each transaction that + # you originate to the ACH Network using this API. ACH transactions are + # categorized (using SEC codes) by how you capture authorization from the + # Receiver (the person whose bank account is being debited or credited). + # PayPal supports the following SEC codes. + # @return [StandardEntryClassCode] + attr_accessor :standard_entry_class_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payee_preferred'] = 'payee_preferred' + @_hash['standard_entry_class_code'] = 'standard_entry_class_code' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payee_preferred + standard_entry_class_code + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payee_preferred: PayeePaymentMethodPreference::UNRESTRICTED, + standard_entry_class_code: StandardEntryClassCode::WEB) + @payee_preferred = payee_preferred unless payee_preferred == SKIP + unless standard_entry_class_code == SKIP + @standard_entry_class_code = + standard_entry_class_code + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payee_preferred = + hash['payee_preferred'] ||= PayeePaymentMethodPreference::UNRESTRICTED + standard_entry_class_code = + hash['standard_entry_class_code'] ||= StandardEntryClassCode::WEB + + # Create object from extracted values. + PaymentMethodPreference.new(payee_preferred: payee_preferred, + standard_entry_class_code: standard_entry_class_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_source.rb b/lib/pay_pal_restap_is/models/payment_source.rb new file mode 100644 index 0000000..730a62f --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_source.rb @@ -0,0 +1,187 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment source definition. + class PaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to use to fund a payment. Can be a credit or debit + # card.
Note: Passing card number, cvv and + # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by + # which you do not have to take on the PCI SAQ D burden by + # using hosted fields - refer to this + # Integration Guide*.
+ # @return [CardRequest] + attr_accessor :card + + # The tokenized payment source to fund a payment. + # @return [Token] + attr_accessor :token + + # A resource that identifies a PayPal Wallet is used for payment. + # @return [PayPalWallet] + attr_accessor :paypal + + # Information needed to pay using Bancontact. + # @return [BancontactPaymentRequest] + attr_accessor :bancontact + + # Information needed to pay using BLIK. + # @return [BLIKPaymentRequest] + attr_accessor :blik + + # Information needed to pay using eps. + # @return [EPSPaymentRequest] + attr_accessor :eps + + # Information needed to pay using giropay. + # @return [GiropayPaymentRequest] + attr_accessor :giropay + + # Information needed to pay using iDEAL. + # @return [IDEALPaymentRequest] + attr_accessor :ideal + + # Information needed to pay using MyBank. + # @return [MyBankPaymentRequest] + attr_accessor :mybank + + # Information needed to pay using P24 (Przelewy24). + # @return [P24PaymentRequest] + attr_accessor :p24 + + # Information needed to pay using Sofort. + # @return [SofortPaymentRequest] + attr_accessor :sofort + + # Information needed to pay using Trustly. + # @return [TrustlyPaymentRequest] + attr_accessor :trustly + + # Information needed to pay using ApplePay. + # @return [ApplePayRequest] + attr_accessor :apple_pay + + # Information needed to pay using Google Pay. + # @return [GooglePayRequest] + attr_accessor :google_pay + + # Information needed to pay using Venmo. + # @return [VenmoWalletRequest] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['token'] = 'token' + @_hash['paypal'] = 'paypal' + @_hash['bancontact'] = 'bancontact' + @_hash['blik'] = 'blik' + @_hash['eps'] = 'eps' + @_hash['giropay'] = 'giropay' + @_hash['ideal'] = 'ideal' + @_hash['mybank'] = 'mybank' + @_hash['p24'] = 'p24' + @_hash['sofort'] = 'sofort' + @_hash['trustly'] = 'trustly' + @_hash['apple_pay'] = 'apple_pay' + @_hash['google_pay'] = 'google_pay' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + token + paypal + bancontact + blik + eps + giropay + ideal + mybank + p24 + sofort + trustly + apple_pay + google_pay + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, token: SKIP, paypal: SKIP, bancontact: SKIP, + blik: SKIP, eps: SKIP, giropay: SKIP, ideal: SKIP, + mybank: SKIP, p24: SKIP, sofort: SKIP, trustly: SKIP, + apple_pay: SKIP, google_pay: SKIP, venmo: SKIP) + @card = card unless card == SKIP + @token = token unless token == SKIP + @paypal = paypal unless paypal == SKIP + @bancontact = bancontact unless bancontact == SKIP + @blik = blik unless blik == SKIP + @eps = eps unless eps == SKIP + @giropay = giropay unless giropay == SKIP + @ideal = ideal unless ideal == SKIP + @mybank = mybank unless mybank == SKIP + @p24 = p24 unless p24 == SKIP + @sofort = sofort unless sofort == SKIP + @trustly = trustly unless trustly == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @google_pay = google_pay unless google_pay == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardRequest.from_hash(hash['card']) if hash['card'] + token = Token.from_hash(hash['token']) if hash['token'] + paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] + bancontact = BancontactPaymentRequest.from_hash(hash['bancontact']) if hash['bancontact'] + blik = BLIKPaymentRequest.from_hash(hash['blik']) if hash['blik'] + eps = EPSPaymentRequest.from_hash(hash['eps']) if hash['eps'] + giropay = GiropayPaymentRequest.from_hash(hash['giropay']) if hash['giropay'] + ideal = IDEALPaymentRequest.from_hash(hash['ideal']) if hash['ideal'] + mybank = MyBankPaymentRequest.from_hash(hash['mybank']) if hash['mybank'] + p24 = P24PaymentRequest.from_hash(hash['p24']) if hash['p24'] + sofort = SofortPaymentRequest.from_hash(hash['sofort']) if hash['sofort'] + trustly = TrustlyPaymentRequest.from_hash(hash['trustly']) if hash['trustly'] + apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] + google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] + venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + PaymentSource.new(card: card, + token: token, + paypal: paypal, + bancontact: bancontact, + blik: blik, + eps: eps, + giropay: giropay, + ideal: ideal, + mybank: mybank, + p24: p24, + sofort: sofort, + trustly: trustly, + apple_pay: apple_pay, + google_pay: google_pay, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_source_response.rb b/lib/pay_pal_restap_is/models/payment_source_response.rb new file mode 100644 index 0000000..1f37676 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_source_response.rb @@ -0,0 +1,171 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment source used to fund the payment. + class PaymentSourceResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The payment card to use to fund a payment. Card can be a credit or debit + # card. + # @return [CardResponse] + attr_accessor :card + + # The PayPal Wallet response. + # @return [PayPalWalletResponse] + attr_accessor :paypal + + # Information used to pay Bancontact. + # @return [BancontactPaymentObject] + attr_accessor :bancontact + + # Information used to pay using BLIK. + # @return [BLIKPaymentObject] + attr_accessor :blik + + # Information used to pay using eps. + # @return [EPSPaymentObject] + attr_accessor :eps + + # Information needed to pay using giropay. + # @return [GiropayPaymentObject] + attr_accessor :giropay + + # Information used to pay using iDEAL. + # @return [IDEALPaymentObject] + attr_accessor :ideal + + # Information used to pay using MyBank. + # @return [MyBankPaymentObject] + attr_accessor :mybank + + # Information used to pay using P24(Przelewy24). + # @return [P24PaymentObject] + attr_accessor :p24 + + # Information used to pay using Sofort. + # @return [SofortPaymentObject] + attr_accessor :sofort + + # Information needed to pay using Trustly. + # @return [TrustlyPaymentObject] + attr_accessor :trustly + + # Information needed to pay using ApplePay. + # @return [ApplePayPaymentObject] + attr_accessor :apple_pay + + # Google Pay Wallet payment data. + # @return [GooglePayWalletResponse] + attr_accessor :google_pay + + # Venmo wallet response. + # @return [VenmoWalletResponse] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['paypal'] = 'paypal' + @_hash['bancontact'] = 'bancontact' + @_hash['blik'] = 'blik' + @_hash['eps'] = 'eps' + @_hash['giropay'] = 'giropay' + @_hash['ideal'] = 'ideal' + @_hash['mybank'] = 'mybank' + @_hash['p24'] = 'p24' + @_hash['sofort'] = 'sofort' + @_hash['trustly'] = 'trustly' + @_hash['apple_pay'] = 'apple_pay' + @_hash['google_pay'] = 'google_pay' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + paypal + bancontact + blik + eps + giropay + ideal + mybank + p24 + sofort + trustly + apple_pay + google_pay + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, paypal: SKIP, bancontact: SKIP, blik: SKIP, + eps: SKIP, giropay: SKIP, ideal: SKIP, mybank: SKIP, + p24: SKIP, sofort: SKIP, trustly: SKIP, apple_pay: SKIP, + google_pay: SKIP, venmo: SKIP) + @card = card unless card == SKIP + @paypal = paypal unless paypal == SKIP + @bancontact = bancontact unless bancontact == SKIP + @blik = blik unless blik == SKIP + @eps = eps unless eps == SKIP + @giropay = giropay unless giropay == SKIP + @ideal = ideal unless ideal == SKIP + @mybank = mybank unless mybank == SKIP + @p24 = p24 unless p24 == SKIP + @sofort = sofort unless sofort == SKIP + @trustly = trustly unless trustly == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @google_pay = google_pay unless google_pay == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardResponse.from_hash(hash['card']) if hash['card'] + paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal'] + bancontact = BancontactPaymentObject.from_hash(hash['bancontact']) if hash['bancontact'] + blik = BLIKPaymentObject.from_hash(hash['blik']) if hash['blik'] + eps = EPSPaymentObject.from_hash(hash['eps']) if hash['eps'] + giropay = GiropayPaymentObject.from_hash(hash['giropay']) if hash['giropay'] + ideal = IDEALPaymentObject.from_hash(hash['ideal']) if hash['ideal'] + mybank = MyBankPaymentObject.from_hash(hash['mybank']) if hash['mybank'] + p24 = P24PaymentObject.from_hash(hash['p24']) if hash['p24'] + sofort = SofortPaymentObject.from_hash(hash['sofort']) if hash['sofort'] + trustly = TrustlyPaymentObject.from_hash(hash['trustly']) if hash['trustly'] + apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay'] + google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay'] + venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + PaymentSourceResponse.new(card: card, + paypal: paypal, + bancontact: bancontact, + blik: blik, + eps: eps, + giropay: giropay, + ideal: ideal, + mybank: mybank, + p24: p24, + sofort: sofort, + trustly: trustly, + apple_pay: apple_pay, + google_pay: google_pay, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_supplementary_data.rb b/lib/pay_pal_restap_is/models/payment_supplementary_data.rb new file mode 100644 index 0000000..d661eee --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_supplementary_data.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The supplementary data. + class PaymentSupplementaryData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Identifiers related to a specific resource. + # @return [RelatedIdentifiers] + attr_accessor :related_ids + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['related_ids'] = 'related_ids' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + related_ids + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(related_ids: SKIP) + @related_ids = related_ids unless related_ids == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + related_ids = RelatedIdentifiers.from_hash(hash['related_ids']) if hash['related_ids'] + + # Create object from extracted values. + PaymentSupplementaryData.new(related_ids: related_ids) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_token_request.rb b/lib/pay_pal_restap_is/models/payment_token_request.rb new file mode 100644 index 0000000..491b6bb --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_token_request.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Payment Token Request where the `source` defines the type of instrument to + # be stored. + class PaymentTokenRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Customer in merchant's or partner's system of records. + # @return [CustomerRequest] + attr_accessor :customer + + # The payment method to vault with the instrument details. + # @return [PaymentTokenRequestPaymentSource] + attr_accessor :payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['payment_source'] = 'payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_source:, customer: SKIP) + @customer = customer unless customer == SKIP + @payment_source = payment_source + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_source = PaymentTokenRequestPaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] + + # Create object from extracted values. + PaymentTokenRequest.new(payment_source: payment_source, + customer: customer) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_token_request_card.rb b/lib/pay_pal_restap_is/models/payment_token_request_card.rb new file mode 100644 index 0000000..5ca9019 --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_token_request_card.rb @@ -0,0 +1,134 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A Resource representing a request to vault a Card. + class PaymentTokenRequestCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The primary account number (PAN) for the payment card. + # @return [String] + attr_accessor :number + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # The three- or four-digit security code of the card. Also known as the CVV, + # CVC, CVN, CVE, or CID. This parameter cannot be present in the request + # when `payment_initiator=MERCHANT`. + # @return [String] + attr_accessor :security_code + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Object] + attr_accessor :network_transaction_reference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['number'] = 'number' + @_hash['expiry'] = 'expiry' + @_hash['security_code'] = 'security_code' + @_hash['type'] = 'type' + @_hash['brand'] = 'brand' + @_hash['billing_address'] = 'billing_address' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + number + expiry + security_code + type + brand + billing_address + network_transaction_reference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, + type: SKIP, brand: SKIP, billing_address: SKIP, + network_transaction_reference: SKIP) + @name = name unless name == SKIP + @number = number unless number == SKIP + @expiry = expiry unless expiry == SKIP + @security_code = security_code unless security_code == SKIP + @type = type unless type == SKIP + @brand = brand unless brand == SKIP + @billing_address = billing_address unless billing_address == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + number = hash.key?('number') ? hash['number'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + security_code = hash.key?('security_code') ? hash['security_code'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + network_transaction_reference = + hash.key?('network_transaction_reference') ? hash['network_transaction_reference'] : SKIP + + # Create object from extracted values. + PaymentTokenRequestCard.new(name: name, + number: number, + expiry: expiry, + security_code: security_code, + type: type, + brand: brand, + billing_address: billing_address, + network_transaction_reference: network_transaction_reference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb b/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb new file mode 100644 index 0000000..2100e0c --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb @@ -0,0 +1,59 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment method to vault with the instrument details. + class PaymentTokenRequestPaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # A Resource representing a request to vault a Card. + # @return [PaymentTokenRequestCard] + attr_accessor :card + + # The Tokenized Payment Source representing a Request to Vault a Token. + # @return [VaultTokenRequest] + attr_accessor :token + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['token'] = 'token' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + token + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, token: SKIP) + @card = card unless card == SKIP + @token = token unless token == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = PaymentTokenRequestCard.from_hash(hash['card']) if hash['card'] + token = VaultTokenRequest.from_hash(hash['token']) if hash['token'] + + # Create object from extracted values. + PaymentTokenRequestPaymentSource.new(card: card, + token: token) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_token_response.rb b/lib/pay_pal_restap_is/models/payment_token_response.rb new file mode 100644 index 0000000..ce079fe --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_token_response.rb @@ -0,0 +1,87 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Full representation of a saved payment token. + class PaymentTokenResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the vault token. + # @return [String] + attr_accessor :id + + # Customer in merchant's or partner's system of records. + # @return [CustomerRequest] + attr_accessor :customer + + # The vaulted payment method details. + # @return [PaymentTokenResponsePaymentSource] + attr_accessor :payment_source + + # An array of related [HATEOAS links](/api/rest/responses/#hateoas). + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['customer'] = 'customer' + @_hash['payment_source'] = 'payment_source' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + customer + payment_source + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, customer: SKIP, payment_source: SKIP, links: SKIP) + @id = id unless id == SKIP + @customer = customer unless customer == SKIP + @payment_source = payment_source unless payment_source == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] + payment_source = PaymentTokenResponsePaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + PaymentTokenResponse.new(id: id, + customer: customer, + payment_source: payment_source, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb b/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb new file mode 100644 index 0000000..eb2c50d --- /dev/null +++ b/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb @@ -0,0 +1,87 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The vaulted payment method details. + class PaymentTokenResponsePaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Full representation of a Card Payment Token including network token. + # @return [CardPaymentToken] + attr_accessor :card + + # Full representation of a Card Payment Token including network token. + # @return [PayPalPaymentToken] + attr_accessor :paypal + + # Full representation of a Card Payment Token including network token. + # @return [VenmoPaymentToken] + attr_accessor :venmo + + # A resource representing a response for Apple Pay. + # @return [ApplePayPaymentToken] + attr_accessor :apple_pay + + # Full representation of a Bank Payment Token. + # @return [BankPaymentToken] + attr_accessor :bank + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['paypal'] = 'paypal' + @_hash['venmo'] = 'venmo' + @_hash['apple_pay'] = 'apple_pay' + @_hash['bank'] = 'bank' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + paypal + venmo + apple_pay + bank + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, paypal: SKIP, venmo: SKIP, apple_pay: SKIP, + bank: SKIP) + @card = card unless card == SKIP + @paypal = paypal unless paypal == SKIP + @venmo = venmo unless venmo == SKIP + @apple_pay = apple_pay unless apple_pay == SKIP + @bank = bank unless bank == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardPaymentToken.from_hash(hash['card']) if hash['card'] + paypal = PayPalPaymentToken.from_hash(hash['paypal']) if hash['paypal'] + venmo = VenmoPaymentToken.from_hash(hash['venmo']) if hash['venmo'] + apple_pay = ApplePayPaymentToken.from_hash(hash['apple_pay']) if hash['apple_pay'] + bank = BankPaymentToken.from_hash(hash['bank']) if hash['bank'] + + # Create object from extracted values. + PaymentTokenResponsePaymentSource.new(card: card, + paypal: paypal, + venmo: venmo, + apple_pay: apple_pay, + bank: bank) + end + end +end diff --git a/lib/pay_pal_restap_is/models/phone.rb b/lib/pay_pal_restap_is/models/phone.rb new file mode 100644 index 0000000..f8cce01 --- /dev/null +++ b/lib/pay_pal_restap_is/models/phone.rb @@ -0,0 +1,77 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The phone number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + class Phone < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The country calling code (CC), in its canonical international [E.164 + # numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The + # combined length of the CC and the national number must not be greater than + # 15 digits. The national number consists of a national destination code + # (NDC) and subscriber number (SN). + # @return [String] + attr_accessor :country_code + + # The national number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of + # the country calling code (CC) and the national number must not be greater + # than 15 digits. The national number consists of a national destination + # code (NDC) and subscriber number (SN). + # @return [String] + attr_accessor :national_number + + # The extension number. + # @return [String] + attr_accessor :extension_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['country_code'] = 'country_code' + @_hash['national_number'] = 'national_number' + @_hash['extension_number'] = 'extension_number' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + extension_number + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(country_code:, national_number:, extension_number: SKIP) + @country_code = country_code + @national_number = national_number + @extension_number = extension_number unless extension_number == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + country_code = hash.key?('country_code') ? hash['country_code'] : nil + national_number = + hash.key?('national_number') ? hash['national_number'] : nil + extension_number = + hash.key?('extension_number') ? hash['extension_number'] : SKIP + + # Create object from extracted values. + Phone.new(country_code: country_code, + national_number: national_number, + extension_number: extension_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/phone_number.rb b/lib/pay_pal_restap_is/models/phone_number.rb new file mode 100644 index 0000000..2336277 --- /dev/null +++ b/lib/pay_pal_restap_is/models/phone_number.rb @@ -0,0 +1,54 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + class PhoneNumber < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The national number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of + # the country calling code (CC) and the national number must not be greater + # than 15 digits. The national number consists of a national destination + # code (NDC) and subscriber number (SN). + # @return [String] + attr_accessor :national_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['national_number'] = 'national_number' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(national_number:) + @national_number = national_number + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + national_number = + hash.key?('national_number') ? hash['national_number'] : nil + + # Create object from extracted values. + PhoneNumber.new(national_number: national_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb b/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb new file mode 100644 index 0000000..9a832b1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb @@ -0,0 +1,66 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + class PhoneNumberWithCountryCode < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The country calling code (CC), in its canonical international [E.164 + # numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The + # combined length of the CC and the national number must not be greater than + # 15 digits. The national number consists of a national destination code + # (NDC) and subscriber number (SN). + # @return [String] + attr_accessor :country_code + + # The national number, in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of + # the country calling code (CC) and the national number must not be greater + # than 15 digits. The national number consists of a national destination + # code (NDC) and subscriber number (SN). + # @return [String] + attr_accessor :national_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['country_code'] = 'country_code' + @_hash['national_number'] = 'national_number' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(country_code:, national_number:) + @country_code = country_code + @national_number = national_number + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + country_code = hash.key?('country_code') ? hash['country_code'] : nil + national_number = + hash.key?('national_number') ? hash['national_number'] : nil + + # Create object from extracted values. + PhoneNumberWithCountryCode.new(country_code: country_code, + national_number: national_number) + end + end +end diff --git a/lib/pay_pal_restap_is/models/phone_type.rb b/lib/pay_pal_restap_is/models/phone_type.rb new file mode 100644 index 0000000..d19f048 --- /dev/null +++ b/lib/pay_pal_restap_is/models/phone_type.rb @@ -0,0 +1,32 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The phone type. + class PhoneType + PHONE_TYPE = [ + # TODO: Write general description for FAX + FAX = 'FAX'.freeze, + + # TODO: Write general description for HOME + HOME = 'HOME'.freeze, + + # TODO: Write general description for MOBILE + MOBILE = 'MOBILE'.freeze, + + # TODO: Write general description for OTHER + OTHER = 'OTHER'.freeze, + + # TODO: Write general description for PAGER + PAGER = 'PAGER'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/phone_with_type.rb b/lib/pay_pal_restap_is/models/phone_with_type.rb new file mode 100644 index 0000000..065affc --- /dev/null +++ b/lib/pay_pal_restap_is/models/phone_with_type.rb @@ -0,0 +1,59 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The phone information. + class PhoneWithType < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The phone type. + # @return [PhoneType] + attr_accessor :phone_type + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumber] + attr_accessor :phone_number + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['phone_type'] = 'phone_type' + @_hash['phone_number'] = 'phone_number' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + phone_type + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(phone_number:, phone_type: SKIP) + @phone_type = phone_type unless phone_type == SKIP + @phone_number = phone_number + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] + phone_type = hash.key?('phone_type') ? hash['phone_type'] : SKIP + + # Create object from extracted values. + PhoneWithType.new(phone_number: phone_number, + phone_type: phone_type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/platform_fee.rb b/lib/pay_pal_restap_is/models/platform_fee.rb new file mode 100644 index 0000000..a6b617b --- /dev/null +++ b/lib/pay_pal_restap_is/models/platform_fee.rb @@ -0,0 +1,63 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The platform or partner fee, commission, or brokerage fee that is associated + # with the transaction. Not a separate or isolated transaction leg from the + # external perspective. The platform fee is limited in scope and is always + # associated with the original payment for the purchase unit. + class PlatformFee < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The details for the merchant who receives the funds and fulfills the + # order. The merchant is also known as the payee. + # @return [PayeeBase] + attr_accessor :payee + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['amount'] = 'amount' + @_hash['payee'] = 'payee' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + payee + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(amount:, payee: SKIP) + @amount = amount + @payee = payee unless payee == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + amount = Money.from_hash(hash['amount']) if hash['amount'] + payee = PayeeBase.from_hash(hash['payee']) if hash['payee'] + + # Create object from extracted values. + PlatformFee.new(amount: amount, + payee: payee) + end + end +end diff --git a/lib/pay_pal_restap_is/models/processing_instruction.rb b/lib/pay_pal_restap_is/models/processing_instruction.rb new file mode 100644 index 0000000..64100d7 --- /dev/null +++ b/lib/pay_pal_restap_is/models/processing_instruction.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The instruction to process an order. + class ProcessingInstruction + PROCESSING_INSTRUCTION = [ + # TODO: Write general description for ORDER_COMPLETE_ON_PAYMENT_APPROVAL + ORDER_COMPLETE_ON_PAYMENT_APPROVAL = 'ORDER_COMPLETE_ON_PAYMENT_APPROVAL'.freeze, + + # TODO: Write general description for NO_INSTRUCTION + NO_INSTRUCTION = 'NO_INSTRUCTION'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/processor_response.rb b/lib/pay_pal_restap_is/models/processor_response.rb new file mode 100644 index 0000000..124d44b --- /dev/null +++ b/lib/pay_pal_restap_is/models/processor_response.rb @@ -0,0 +1,83 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The processor response information for payment requests, such as direct + # credit card transactions. + class ProcessorResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The address verification code for Visa, Discover, Mastercard, or American + # Express transactions. + # @return [AVSCode] + attr_accessor :avs_code + + # The card verification value code for for Visa, Discover, Mastercard, or + # American Express. + # @return [CVVCode] + attr_accessor :cvv_code + + # Processor response code for the non-PayPal payment processor errors. + # @return [ProcessorResponseCode] + attr_accessor :response_code + + # The declined payment transactions might have payment advice codes. The + # card networks, like Visa and Mastercard, return payment advice codes. + # @return [PaymentAdviceCode] + attr_accessor :payment_advice_code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['avs_code'] = 'avs_code' + @_hash['cvv_code'] = 'cvv_code' + @_hash['response_code'] = 'response_code' + @_hash['payment_advice_code'] = 'payment_advice_code' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + avs_code + cvv_code + response_code + payment_advice_code + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(avs_code: SKIP, cvv_code: SKIP, response_code: SKIP, + payment_advice_code: SKIP) + @avs_code = avs_code unless avs_code == SKIP + @cvv_code = cvv_code unless cvv_code == SKIP + @response_code = response_code unless response_code == SKIP + @payment_advice_code = payment_advice_code unless payment_advice_code == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP + cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP + response_code = hash.key?('response_code') ? hash['response_code'] : SKIP + payment_advice_code = + hash.key?('payment_advice_code') ? hash['payment_advice_code'] : SKIP + + # Create object from extracted values. + ProcessorResponse.new(avs_code: avs_code, + cvv_code: cvv_code, + response_code: response_code, + payment_advice_code: payment_advice_code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/processor_response_code.rb b/lib/pay_pal_restap_is/models/processor_response_code.rb new file mode 100644 index 0000000..520d3fe --- /dev/null +++ b/lib/pay_pal_restap_is/models/processor_response_code.rb @@ -0,0 +1,479 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Processor response code for the non-PayPal payment processor errors. + class ProcessorResponseCode + PROCESSOR_RESPONSE_CODE = [ + # TODO: Write general description for ENUM_0000 + ENUM_0000 = '0000'.freeze, + + # TODO: Write general description for ENUM_00N7 + ENUM_00N7 = '00N7'.freeze, + + # TODO: Write general description for ENUM_0100 + ENUM_0100 = '0100'.freeze, + + # TODO: Write general description for ENUM_0390 + ENUM_0390 = '0390'.freeze, + + # TODO: Write general description for ENUM_0500 + ENUM_0500 = '0500'.freeze, + + # TODO: Write general description for ENUM_0580 + ENUM_0580 = '0580'.freeze, + + # TODO: Write general description for ENUM_0800 + ENUM_0800 = '0800'.freeze, + + # TODO: Write general description for ENUM_0880 + ENUM_0880 = '0880'.freeze, + + # TODO: Write general description for ENUM_0890 + ENUM_0890 = '0890'.freeze, + + # TODO: Write general description for ENUM_0960 + ENUM_0960 = '0960'.freeze, + + # TODO: Write general description for ENUM_0R00 + ENUM_0R00 = '0R00'.freeze, + + # TODO: Write general description for ENUM_1000 + ENUM_1000 = '1000'.freeze, + + # TODO: Write general description for ENUM_10BR + ENUM_10BR = '10BR'.freeze, + + # TODO: Write general description for ENUM_1300 + ENUM_1300 = '1300'.freeze, + + # TODO: Write general description for ENUM_1310 + ENUM_1310 = '1310'.freeze, + + # TODO: Write general description for ENUM_1312 + ENUM_1312 = '1312'.freeze, + + # TODO: Write general description for ENUM_1317 + ENUM_1317 = '1317'.freeze, + + # TODO: Write general description for ENUM_1320 + ENUM_1320 = '1320'.freeze, + + # TODO: Write general description for ENUM_1330 + ENUM_1330 = '1330'.freeze, + + # TODO: Write general description for ENUM_1335 + ENUM_1335 = '1335'.freeze, + + # TODO: Write general description for ENUM_1340 + ENUM_1340 = '1340'.freeze, + + # TODO: Write general description for ENUM_1350 + ENUM_1350 = '1350'.freeze, + + # TODO: Write general description for ENUM_1352 + ENUM_1352 = '1352'.freeze, + + # TODO: Write general description for ENUM_1360 + ENUM_1360 = '1360'.freeze, + + # TODO: Write general description for ENUM_1370 + ENUM_1370 = '1370'.freeze, + + # TODO: Write general description for ENUM_1380 + ENUM_1380 = '1380'.freeze, + + # TODO: Write general description for ENUM_1382 + ENUM_1382 = '1382'.freeze, + + # TODO: Write general description for ENUM_1384 + ENUM_1384 = '1384'.freeze, + + # TODO: Write general description for ENUM_1390 + ENUM_1390 = '1390'.freeze, + + # TODO: Write general description for ENUM_1393 + ENUM_1393 = '1393'.freeze, + + # TODO: Write general description for ENUM_5100 + ENUM_5100 = '5100'.freeze, + + # TODO: Write general description for ENUM_5110 + ENUM_5110 = '5110'.freeze, + + # TODO: Write general description for ENUM_5120 + ENUM_5120 = '5120'.freeze, + + # TODO: Write general description for ENUM_5130 + ENUM_5130 = '5130'.freeze, + + # TODO: Write general description for ENUM_5135 + ENUM_5135 = '5135'.freeze, + + # TODO: Write general description for ENUM_5140 + ENUM_5140 = '5140'.freeze, + + # TODO: Write general description for ENUM_5150 + ENUM_5150 = '5150'.freeze, + + # TODO: Write general description for ENUM_5160 + ENUM_5160 = '5160'.freeze, + + # TODO: Write general description for ENUM_5170 + ENUM_5170 = '5170'.freeze, + + # TODO: Write general description for ENUM_5180 + ENUM_5180 = '5180'.freeze, + + # TODO: Write general description for ENUM_5190 + ENUM_5190 = '5190'.freeze, + + # TODO: Write general description for ENUM_5200 + ENUM_5200 = '5200'.freeze, + + # TODO: Write general description for ENUM_5210 + ENUM_5210 = '5210'.freeze, + + # TODO: Write general description for ENUM_5400 + ENUM_5400 = '5400'.freeze, + + # TODO: Write general description for ENUM_5500 + ENUM_5500 = '5500'.freeze, + + # TODO: Write general description for ENUM_5650 + ENUM_5650 = '5650'.freeze, + + # TODO: Write general description for ENUM_5700 + ENUM_5700 = '5700'.freeze, + + # TODO: Write general description for ENUM_5710 + ENUM_5710 = '5710'.freeze, + + # TODO: Write general description for ENUM_5800 + ENUM_5800 = '5800'.freeze, + + # TODO: Write general description for ENUM_5900 + ENUM_5900 = '5900'.freeze, + + # TODO: Write general description for ENUM_5910 + ENUM_5910 = '5910'.freeze, + + # TODO: Write general description for ENUM_5920 + ENUM_5920 = '5920'.freeze, + + # TODO: Write general description for ENUM_5930 + ENUM_5930 = '5930'.freeze, + + # TODO: Write general description for ENUM_5950 + ENUM_5950 = '5950'.freeze, + + # TODO: Write general description for ENUM_6300 + ENUM_6300 = '6300'.freeze, + + # TODO: Write general description for ENUM_7600 + ENUM_7600 = '7600'.freeze, + + # TODO: Write general description for ENUM_7700 + ENUM_7700 = '7700'.freeze, + + # TODO: Write general description for ENUM_7710 + ENUM_7710 = '7710'.freeze, + + # TODO: Write general description for ENUM_7800 + ENUM_7800 = '7800'.freeze, + + # TODO: Write general description for ENUM_7900 + ENUM_7900 = '7900'.freeze, + + # TODO: Write general description for ENUM_8000 + ENUM_8000 = '8000'.freeze, + + # TODO: Write general description for ENUM_8010 + ENUM_8010 = '8010'.freeze, + + # TODO: Write general description for ENUM_8020 + ENUM_8020 = '8020'.freeze, + + # TODO: Write general description for ENUM_8030 + ENUM_8030 = '8030'.freeze, + + # TODO: Write general description for ENUM_8100 + ENUM_8100 = '8100'.freeze, + + # TODO: Write general description for ENUM_8110 + ENUM_8110 = '8110'.freeze, + + # TODO: Write general description for ENUM_8220 + ENUM_8220 = '8220'.freeze, + + # TODO: Write general description for ENUM_9100 + ENUM_9100 = '9100'.freeze, + + # TODO: Write general description for ENUM_9500 + ENUM_9500 = '9500'.freeze, + + # TODO: Write general description for ENUM_9510 + ENUM_9510 = '9510'.freeze, + + # TODO: Write general description for ENUM_9520 + ENUM_9520 = '9520'.freeze, + + # TODO: Write general description for ENUM_9530 + ENUM_9530 = '9530'.freeze, + + # TODO: Write general description for ENUM_9540 + ENUM_9540 = '9540'.freeze, + + # TODO: Write general description for ENUM_9600 + ENUM_9600 = '9600'.freeze, + + # TODO: Write general description for PCNR + PCNR = 'PCNR'.freeze, + + # TODO: Write general description for PCVV + PCVV = 'PCVV'.freeze, + + # TODO: Write general description for PP06 + PP06 = 'PP06'.freeze, + + # TODO: Write general description for PPRN + PPRN = 'PPRN'.freeze, + + # TODO: Write general description for PPAD + PPAD = 'PPAD'.freeze, + + # TODO: Write general description for PPAB + PPAB = 'PPAB'.freeze, + + # TODO: Write general description for PPAE + PPAE = 'PPAE'.freeze, + + # TODO: Write general description for PPAG + PPAG = 'PPAG'.freeze, + + # TODO: Write general description for PPAI + PPAI = 'PPAI'.freeze, + + # TODO: Write general description for PPAR + PPAR = 'PPAR'.freeze, + + # TODO: Write general description for PPAU + PPAU = 'PPAU'.freeze, + + # TODO: Write general description for PPAV + PPAV = 'PPAV'.freeze, + + # TODO: Write general description for PPAX + PPAX = 'PPAX'.freeze, + + # TODO: Write general description for PPBG + PPBG = 'PPBG'.freeze, + + # TODO: Write general description for PPC2 + PPC2 = 'PPC2'.freeze, + + # TODO: Write general description for PPCE + PPCE = 'PPCE'.freeze, + + # TODO: Write general description for PPCO + PPCO = 'PPCO'.freeze, + + # TODO: Write general description for PPCR + PPCR = 'PPCR'.freeze, + + # TODO: Write general description for PPCT + PPCT = 'PPCT'.freeze, + + # TODO: Write general description for PPCU + PPCU = 'PPCU'.freeze, + + # TODO: Write general description for PPD3 + PPD3 = 'PPD3'.freeze, + + # TODO: Write general description for PPDC + PPDC = 'PPDC'.freeze, + + # TODO: Write general description for PPDI + PPDI = 'PPDI'.freeze, + + # TODO: Write general description for PPDV + PPDV = 'PPDV'.freeze, + + # TODO: Write general description for PPDT + PPDT = 'PPDT'.freeze, + + # TODO: Write general description for PPEF + PPEF = 'PPEF'.freeze, + + # TODO: Write general description for PPEL + PPEL = 'PPEL'.freeze, + + # TODO: Write general description for PPER + PPER = 'PPER'.freeze, + + # TODO: Write general description for PPEX + PPEX = 'PPEX'.freeze, + + # TODO: Write general description for PPFE + PPFE = 'PPFE'.freeze, + + # TODO: Write general description for PPFI + PPFI = 'PPFI'.freeze, + + # TODO: Write general description for PPFR + PPFR = 'PPFR'.freeze, + + # TODO: Write general description for PPFV + PPFV = 'PPFV'.freeze, + + # TODO: Write general description for PPGR + PPGR = 'PPGR'.freeze, + + # TODO: Write general description for PPH1 + PPH1 = 'PPH1'.freeze, + + # TODO: Write general description for PPIF + PPIF = 'PPIF'.freeze, + + # TODO: Write general description for PPII + PPII = 'PPII'.freeze, + + # TODO: Write general description for PPIM + PPIM = 'PPIM'.freeze, + + # TODO: Write general description for PPIT + PPIT = 'PPIT'.freeze, + + # TODO: Write general description for PPLR + PPLR = 'PPLR'.freeze, + + # TODO: Write general description for PPLS + PPLS = 'PPLS'.freeze, + + # TODO: Write general description for PPMB + PPMB = 'PPMB'.freeze, + + # TODO: Write general description for PPMC + PPMC = 'PPMC'.freeze, + + # TODO: Write general description for PPMD + PPMD = 'PPMD'.freeze, + + # TODO: Write general description for PPNC + PPNC = 'PPNC'.freeze, + + # TODO: Write general description for PPNL + PPNL = 'PPNL'.freeze, + + # TODO: Write general description for PPNM + PPNM = 'PPNM'.freeze, + + # TODO: Write general description for PPNT + PPNT = 'PPNT'.freeze, + + # TODO: Write general description for PPPH + PPPH = 'PPPH'.freeze, + + # TODO: Write general description for PPPI + PPPI = 'PPPI'.freeze, + + # TODO: Write general description for PPPM + PPPM = 'PPPM'.freeze, + + # TODO: Write general description for PPQC + PPQC = 'PPQC'.freeze, + + # TODO: Write general description for PPRE + PPRE = 'PPRE'.freeze, + + # TODO: Write general description for PPRF + PPRF = 'PPRF'.freeze, + + # TODO: Write general description for PPRR + PPRR = 'PPRR'.freeze, + + # TODO: Write general description for PPS0 + PPS0 = 'PPS0'.freeze, + + # TODO: Write general description for PPS1 + PPS1 = 'PPS1'.freeze, + + # TODO: Write general description for PPS2 + PPS2 = 'PPS2'.freeze, + + # TODO: Write general description for PPS3 + PPS3 = 'PPS3'.freeze, + + # TODO: Write general description for PPS4 + PPS4 = 'PPS4'.freeze, + + # TODO: Write general description for PPS5 + PPS5 = 'PPS5'.freeze, + + # TODO: Write general description for PPS6 + PPS6 = 'PPS6'.freeze, + + # TODO: Write general description for PPSC + PPSC = 'PPSC'.freeze, + + # TODO: Write general description for PPSD + PPSD = 'PPSD'.freeze, + + # TODO: Write general description for PPSE + PPSE = 'PPSE'.freeze, + + # TODO: Write general description for PPTE + PPTE = 'PPTE'.freeze, + + # TODO: Write general description for PPTF + PPTF = 'PPTF'.freeze, + + # TODO: Write general description for PPTI + PPTI = 'PPTI'.freeze, + + # TODO: Write general description for PPTR + PPTR = 'PPTR'.freeze, + + # TODO: Write general description for PPTT + PPTT = 'PPTT'.freeze, + + # TODO: Write general description for PPTV + PPTV = 'PPTV'.freeze, + + # TODO: Write general description for PPUA + PPUA = 'PPUA'.freeze, + + # TODO: Write general description for PPUC + PPUC = 'PPUC'.freeze, + + # TODO: Write general description for PPUE + PPUE = 'PPUE'.freeze, + + # TODO: Write general description for PPUI + PPUI = 'PPUI'.freeze, + + # TODO: Write general description for PPUP + PPUP = 'PPUP'.freeze, + + # TODO: Write general description for PPUR + PPUR = 'PPUR'.freeze, + + # TODO: Write general description for PPVC + PPVC = 'PPVC'.freeze, + + # TODO: Write general description for PPVE + PPVE = 'PPVE'.freeze, + + # TODO: Write general description for PPVT + PPVT = 'PPVT'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/purchase_unit.rb b/lib/pay_pal_restap_is/models/purchase_unit.rb new file mode 100644 index 0000000..deb9819 --- /dev/null +++ b/lib/pay_pal_restap_is/models/purchase_unit.rb @@ -0,0 +1,215 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The purchase unit details. Used to capture required information for the + # payment contract. + class PurchaseUnit < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The API caller-provided external ID for the purchase unit. Required for + # multiple purchase units when you must update the order through `PATCH`. If + # you omit this value and the order contains only one purchase unit, PayPal + # sets this value to `default`.
Note: If there + # are multiple purchase units, reference_id is required for + # each purchase unit.
+ # @return [String] + attr_accessor :reference_id + + # The total order amount with an optional breakdown that provides details, + # such as the total item amount, total tax amount, shipping, handling, + # insurance, and discounts, if any.
If you specify `amount.breakdown`, + # the amount equals `item_total` plus `tax_total` plus `shipping` plus + # `handling` plus `insurance` minus `shipping_discount` minus + # discount.
The amount must be a positive number. For listed of + # supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. + # @return [AmountWithBreakdown] + attr_accessor :amount + + # The merchant who receives the funds and fulfills the order. The merchant + # is also known as the payee. + # @return [Payee] + attr_accessor :payee + + # Any additional payment instructions to be consider during payment + # processing. This processing instruction is applicable for Capturing an + # order or Authorizing an Order. + # @return [PaymentInstruction] + attr_accessor :payment_instruction + + # The purchase description. + # @return [String] + attr_accessor :description + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # The API caller-provided external invoice ID for this order. + # @return [String] + attr_accessor :invoice_id + + # The PayPal-generated ID for the purchase unit. This ID appears in both the + # payer's transaction history and the emails that the payer receives. In + # addition, this ID is available in transaction and settlement reports that + # merchants and API callers can use to reconcile transactions. This ID is + # only available when an order is saved by calling + # v2/checkout/orders/id/save. + # @return [String] + attr_accessor :id + + # The payment descriptor on account transactions on the customer's credit + # card statement, that PayPal sends to processors. The maximum length of the + # soft descriptor information that you can pass in the API field is 22 + # characters, in the following format:22 - len(PAYPAL * (8)) - + # len(Descriptor in Payment Receiving Preferences of Merchant + # account + 1)The PAYPAL prefix uses 8 characters.

The + # soft descriptor supports the following ASCII + # characters:
  • Alphanumeric + # characters
  • Dashes
  • Asterisks
  • Periods + # (.)
  • Spaces
For Wallet payments marketplace + # integrations:
  • The merchant descriptor in the Payment Receiving + # Preferences must be the marketplace name.
  • You can't use the + # remaining space to show the customer service number.
  • The remaining + # spaces can be a combination of seller name and country.

For + # unbranded payments (Direct Card) marketplace integrations, use a + # combination of the seller name and phone number. + # @return [String] + attr_accessor :soft_descriptor + + # An array of items that the customer purchases from the merchant. + # @return [Array[Item]] + attr_accessor :items + + # The order shipping details. + # @return [ShippingWithTrackingDetails] + attr_accessor :shipping + + # Supplementary data about a payment. This object passes information that + # can be used to improve risk assessments and processing costs, for example, + # by providing Level 2 and Level 3 payment data. + # @return [SupplementaryData] + attr_accessor :supplementary_data + + # The collection of payments, or transactions, for a purchase unit in an + # order. For example, authorized payments, captured payments, and refunds. + # @return [PaymentCollection] + attr_accessor :payments + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['reference_id'] = 'reference_id' + @_hash['amount'] = 'amount' + @_hash['payee'] = 'payee' + @_hash['payment_instruction'] = 'payment_instruction' + @_hash['description'] = 'description' + @_hash['custom_id'] = 'custom_id' + @_hash['invoice_id'] = 'invoice_id' + @_hash['id'] = 'id' + @_hash['soft_descriptor'] = 'soft_descriptor' + @_hash['items'] = 'items' + @_hash['shipping'] = 'shipping' + @_hash['supplementary_data'] = 'supplementary_data' + @_hash['payments'] = 'payments' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + reference_id + amount + payee + payment_instruction + description + custom_id + invoice_id + id + soft_descriptor + items + shipping + supplementary_data + payments + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(reference_id: SKIP, amount: SKIP, payee: SKIP, + payment_instruction: SKIP, description: SKIP, + custom_id: SKIP, invoice_id: SKIP, id: SKIP, + soft_descriptor: SKIP, items: SKIP, shipping: SKIP, + supplementary_data: SKIP, payments: SKIP) + @reference_id = reference_id unless reference_id == SKIP + @amount = amount unless amount == SKIP + @payee = payee unless payee == SKIP + @payment_instruction = payment_instruction unless payment_instruction == SKIP + @description = description unless description == SKIP + @custom_id = custom_id unless custom_id == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @id = id unless id == SKIP + @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP + @items = items unless items == SKIP + @shipping = shipping unless shipping == SKIP + @supplementary_data = supplementary_data unless supplementary_data == SKIP + @payments = payments unless payments == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + reference_id = hash.key?('reference_id') ? hash['reference_id'] : SKIP + amount = AmountWithBreakdown.from_hash(hash['amount']) if hash['amount'] + payee = Payee.from_hash(hash['payee']) if hash['payee'] + payment_instruction = PaymentInstruction.from_hash(hash['payment_instruction']) if + hash['payment_instruction'] + description = hash.key?('description') ? hash['description'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + id = hash.key?('id') ? hash['id'] : SKIP + soft_descriptor = + hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP + # Parameter is an array, so we need to iterate through it + items = nil + unless hash['items'].nil? + items = [] + hash['items'].each do |structure| + items << (Item.from_hash(structure) if structure) + end + end + + items = SKIP unless hash.key?('items') + shipping = ShippingWithTrackingDetails.from_hash(hash['shipping']) if hash['shipping'] + supplementary_data = SupplementaryData.from_hash(hash['supplementary_data']) if + hash['supplementary_data'] + payments = PaymentCollection.from_hash(hash['payments']) if hash['payments'] + + # Create object from extracted values. + PurchaseUnit.new(reference_id: reference_id, + amount: amount, + payee: payee, + payment_instruction: payment_instruction, + description: description, + custom_id: custom_id, + invoice_id: invoice_id, + id: id, + soft_descriptor: soft_descriptor, + items: items, + shipping: shipping, + supplementary_data: supplementary_data, + payments: payments) + end + end +end diff --git a/lib/pay_pal_restap_is/models/purchase_unit_request.rb b/lib/pay_pal_restap_is/models/purchase_unit_request.rb new file mode 100644 index 0000000..916e0cd --- /dev/null +++ b/lib/pay_pal_restap_is/models/purchase_unit_request.rb @@ -0,0 +1,193 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The purchase unit request. Includes required information for the payment + # contract. + class PurchaseUnitRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The API caller-provided external ID for the purchase unit. Required for + # multiple purchase units when you must update the order through `PATCH`. If + # you omit this value and the order contains only one purchase unit, PayPal + # sets this value to `default`. + # @return [String] + attr_accessor :reference_id + + # The total order amount with an optional breakdown that provides details, + # such as the total item amount, total tax amount, shipping, handling, + # insurance, and discounts, if any.
If you specify `amount.breakdown`, + # the amount equals `item_total` plus `tax_total` plus `shipping` plus + # `handling` plus `insurance` minus `shipping_discount` minus + # discount.
The amount must be a positive number. For listed of + # supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. + # @return [AmountWithBreakdown] + attr_accessor :amount + + # The merchant who receives the funds and fulfills the order. The merchant + # is also known as the payee. + # @return [Payee] + attr_accessor :payee + + # Any additional payment instructions to be consider during payment + # processing. This processing instruction is applicable for Capturing an + # order or Authorizing an Order. + # @return [PaymentInstruction] + attr_accessor :payment_instruction + + # The purchase description. The maximum length of the character is dependent + # on the type of characters used. The character length is specified assuming + # a US ASCII character. Depending on type of character; (e.g. accented + # character, Japanese characters) the number of characters that that can be + # specified as input might not equal the permissible max length. + # @return [String] + attr_accessor :description + + # The API caller-provided external ID. Used to reconcile client transactions + # with PayPal transactions. Appears in transaction and settlement reports + # but is not visible to the payer. + # @return [String] + attr_accessor :custom_id + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The soft descriptor is the dynamic text used to construct the statement + # descriptor that appears on a payer's card statement.

If an Order is + # paid using the "PayPal Wallet", the statement descriptor will appear in + # following format on the payer's card statement: + # PAYPAL_prefix+(space)+merchant_descriptor+(spa + # ce)+ soft_descriptor
Note: + # The merchant descriptor is the descriptor of the merchant’s payment + # receiving preferences which can be seen by logging into the merchant + # account + # https://www.sandbox.paypal.com/businessprofile/settings/info/editThe PAYPAL prefix uses 8 characters. Only the first 22 + # characters will be displayed in the statement.
For example, + # if:
  • The PayPal prefix toggle is PAYPAL *.
  • The + # merchant descriptor in the profile is Janes Gift.
  • The + # soft descriptor is 800-123-1234.
Then, the statement + # descriptor on the card is PAYPAL * Janes Gift 80. + # @return [String] + attr_accessor :soft_descriptor + + # An array of items that the customer purchases from the merchant. + # @return [Array[Item]] + attr_accessor :items + + # The shipping details. + # @return [ShippingDetails] + attr_accessor :shipping + + # Supplementary data about a payment. This object passes information that + # can be used to improve risk assessments and processing costs, for example, + # by providing Level 2 and Level 3 payment data. + # @return [SupplementaryData] + attr_accessor :supplementary_data + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['reference_id'] = 'reference_id' + @_hash['amount'] = 'amount' + @_hash['payee'] = 'payee' + @_hash['payment_instruction'] = 'payment_instruction' + @_hash['description'] = 'description' + @_hash['custom_id'] = 'custom_id' + @_hash['invoice_id'] = 'invoice_id' + @_hash['soft_descriptor'] = 'soft_descriptor' + @_hash['items'] = 'items' + @_hash['shipping'] = 'shipping' + @_hash['supplementary_data'] = 'supplementary_data' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + reference_id + payee + payment_instruction + description + custom_id + invoice_id + soft_descriptor + items + shipping + supplementary_data + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(amount:, reference_id: SKIP, payee: SKIP, + payment_instruction: SKIP, description: SKIP, + custom_id: SKIP, invoice_id: SKIP, soft_descriptor: SKIP, + items: SKIP, shipping: SKIP, supplementary_data: SKIP) + @reference_id = reference_id unless reference_id == SKIP + @amount = amount + @payee = payee unless payee == SKIP + @payment_instruction = payment_instruction unless payment_instruction == SKIP + @description = description unless description == SKIP + @custom_id = custom_id unless custom_id == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP + @items = items unless items == SKIP + @shipping = shipping unless shipping == SKIP + @supplementary_data = supplementary_data unless supplementary_data == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + amount = AmountWithBreakdown.from_hash(hash['amount']) if hash['amount'] + reference_id = hash.key?('reference_id') ? hash['reference_id'] : SKIP + payee = Payee.from_hash(hash['payee']) if hash['payee'] + payment_instruction = PaymentInstruction.from_hash(hash['payment_instruction']) if + hash['payment_instruction'] + description = hash.key?('description') ? hash['description'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + soft_descriptor = + hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP + # Parameter is an array, so we need to iterate through it + items = nil + unless hash['items'].nil? + items = [] + hash['items'].each do |structure| + items << (Item.from_hash(structure) if structure) + end + end + + items = SKIP unless hash.key?('items') + shipping = ShippingDetails.from_hash(hash['shipping']) if hash['shipping'] + supplementary_data = SupplementaryData.from_hash(hash['supplementary_data']) if + hash['supplementary_data'] + + # Create object from extracted values. + PurchaseUnitRequest.new(amount: amount, + reference_id: reference_id, + payee: payee, + payment_instruction: payment_instruction, + description: description, + custom_id: custom_id, + invoice_id: invoice_id, + soft_descriptor: soft_descriptor, + items: items, + shipping: shipping, + supplementary_data: supplementary_data) + end + end +end diff --git a/lib/pay_pal_restap_is/models/reauthorize_request.rb b/lib/pay_pal_restap_is/models/reauthorize_request.rb new file mode 100644 index 0000000..d5f0b75 --- /dev/null +++ b/lib/pay_pal_restap_is/models/reauthorize_request.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Reauthorizes an authorized PayPal account payment, by ID. To ensure that + # funds are still available, reauthorize a payment after its initial three-day + # honor period expires. You can reauthorize a payment only once from days four + # to 29.

If 30 days have transpired since the date of the original + # authorization, you must create an authorized payment instead of + # reauthorizing the original authorized payment.

A reauthorized + # payment itself has a new honor period of three days.

You can + # reauthorize an authorized payment once. The allowed amount depends on + # context and geography, for example in US it is up to 115% of the original + # authorized amount, not to exceed an increase of $75 USD.

Supports + # only the `amount` request parameter.
Note: This + # request is currently not supported for Partner use cases.
+ class ReauthorizeRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['amount'] = 'amount' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + amount + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(amount: SKIP) + @amount = amount unless amount == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + amount = Money.from_hash(hash['amount']) if hash['amount'] + + # Create object from extracted values. + ReauthorizeRequest.new(amount: amount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund.rb b/lib/pay_pal_restap_is/models/refund.rb new file mode 100644 index 0000000..8837744 --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund.rb @@ -0,0 +1,195 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The refund information. + class Refund < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status of the refund. + # @return [RefundStatus] + attr_accessor :status + + # The details of the refund status. + # @return [RefundStatusDetails] + attr_accessor :status_details + + # The PayPal-generated ID for the refund. + # @return [String] + attr_accessor :id + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. + # @return [String] + attr_accessor :custom_id + + # Reference ID issued for the card transaction. This ID can be used to track + # the transaction across processors, card brands and issuing banks. + # @return [String] + attr_accessor :acquirer_reference_number + + # The reason for the refund. Appears in both the payer's transaction history + # and the emails that the payer receives. + # @return [String] + attr_accessor :note_to_payer + + # The breakdown of the refund. + # @return [SellerPayableBreakdown] + attr_accessor :seller_payable_breakdown + + # The details for the merchant who receives the funds and fulfills the + # order. The merchant is also known as the payee. + # @return [PayeeBase] + attr_accessor :payer + + # An array of related [HATEOAS + # links](/docs/api/reference/api-responses/#hateoas-links). + # @return [Array[LinkDescription]] + attr_accessor :links + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :create_time + + # The date and time, in [Internet date and time + # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are + # required while fractional seconds are + # optional.
Note: The regular expression + # provides guidance but does not reject all invalid dates.
+ # @return [String] + attr_accessor :update_time + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash['id'] = 'id' + @_hash['amount'] = 'amount' + @_hash['invoice_id'] = 'invoice_id' + @_hash['custom_id'] = 'custom_id' + @_hash['acquirer_reference_number'] = 'acquirer_reference_number' + @_hash['note_to_payer'] = 'note_to_payer' + @_hash['seller_payable_breakdown'] = 'seller_payable_breakdown' + @_hash['payer'] = 'payer' + @_hash['links'] = 'links' + @_hash['create_time'] = 'create_time' + @_hash['update_time'] = 'update_time' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + id + amount + invoice_id + custom_id + acquirer_reference_number + note_to_payer + seller_payable_breakdown + payer + links + create_time + update_time + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, + invoice_id: SKIP, custom_id: SKIP, + acquirer_reference_number: SKIP, note_to_payer: SKIP, + seller_payable_breakdown: SKIP, payer: SKIP, links: SKIP, + create_time: SKIP, update_time: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + @id = id unless id == SKIP + @amount = amount unless amount == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @custom_id = custom_id unless custom_id == SKIP + unless acquirer_reference_number == SKIP + @acquirer_reference_number = + acquirer_reference_number + end + @note_to_payer = note_to_payer unless note_to_payer == SKIP + @seller_payable_breakdown = seller_payable_breakdown unless seller_payable_breakdown == SKIP + @payer = payer unless payer == SKIP + @links = links unless links == SKIP + @create_time = create_time unless create_time == SKIP + @update_time = update_time unless update_time == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = RefundStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + id = hash.key?('id') ? hash['id'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + acquirer_reference_number = + hash.key?('acquirer_reference_number') ? hash['acquirer_reference_number'] : SKIP + note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP + if hash['seller_payable_breakdown'] + seller_payable_breakdown = SellerPayableBreakdown.from_hash(hash['seller_payable_breakdown']) + end + payer = PayeeBase.from_hash(hash['payer']) if hash['payer'] + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + create_time = hash.key?('create_time') ? hash['create_time'] : SKIP + update_time = hash.key?('update_time') ? hash['update_time'] : SKIP + + # Create object from extracted values. + Refund.new(status: status, + status_details: status_details, + id: id, + amount: amount, + invoice_id: invoice_id, + custom_id: custom_id, + acquirer_reference_number: acquirer_reference_number, + note_to_payer: note_to_payer, + seller_payable_breakdown: seller_payable_breakdown, + payer: payer, + links: links, + create_time: create_time, + update_time: update_time) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb b/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb new file mode 100644 index 0000000..a75d34b --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb @@ -0,0 +1,20 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The reason why the refund has the `PENDING` or `FAILED` status. + class RefundIncompleteReason + REFUND_INCOMPLETE_REASON = [ + # TODO: Write general description for ECHECK + ECHECK = 'ECHECK'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_payment_instruction.rb b/lib/pay_pal_restap_is/models/refund_payment_instruction.rb new file mode 100644 index 0000000..86f12fd --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_payment_instruction.rb @@ -0,0 +1,68 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Any additional payments instructions during refund payment processing. This + # object is only applicable to merchants that have been enabled for PayPal + # Commerce Platform for Marketplaces and Platforms capability. Please speak to + # your account manager if you want to use this capability. + class RefundPaymentInstruction < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Specifies the amount that the API caller will contribute to the refund + # being processed. The amount needs to be lower than platform_fees amount + # originally captured or the amount that is remaining if multiple refunds + # have been processed. This field is only applicable to merchants that have + # been enabled for PayPal Commerce Platform for Marketplaces and Platforms + # capability. Please speak to your account manager if you want to use this + # capability. + # @return [Array[RefundPlatformFee]] + attr_accessor :platform_fees + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['platform_fees'] = 'platform_fees' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + platform_fees + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(platform_fees: SKIP) + @platform_fees = platform_fees unless platform_fees == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + # Parameter is an array, so we need to iterate through it + platform_fees = nil + unless hash['platform_fees'].nil? + platform_fees = [] + hash['platform_fees'].each do |structure| + platform_fees << (RefundPlatformFee.from_hash(structure) if structure) + end + end + + platform_fees = SKIP unless hash.key?('platform_fees') + + # Create object from extracted values. + RefundPaymentInstruction.new(platform_fees: platform_fees) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_platform_fee.rb b/lib/pay_pal_restap_is/models/refund_platform_fee.rb new file mode 100644 index 0000000..f2266dd --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_platform_fee.rb @@ -0,0 +1,52 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The platform or partner fee, commission, or brokerage fee that is associated + # with the transaction. Not a separate or isolated transaction leg from the + # external perspective. The platform fee is limited in scope and is always + # associated with the original payment for the purchase unit. + class RefundPlatformFee < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['amount'] = 'amount' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(amount:) + @amount = amount + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + amount = Money.from_hash(hash['amount']) if hash['amount'] + + # Create object from extracted values. + RefundPlatformFee.new(amount: amount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_request.rb b/lib/pay_pal_restap_is/models/refund_request.rb new file mode 100644 index 0000000..99e4939 --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_request.rb @@ -0,0 +1,100 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Refunds a captured payment, by ID. For a full refund, include an empty + # request body. For a partial refund, include an amount object in + # the request body. + class RefundRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # The API caller-provided external ID. Used to reconcile API + # caller-initiated transactions with PayPal transactions. Appears in + # transaction and settlement reports. The pattern is defined by an external + # party and supports Unicode. + # @return [String] + attr_accessor :custom_id + + # The API caller-provided external invoice ID for this order. The pattern is + # defined by an external party and supports Unicode. + # @return [String] + attr_accessor :invoice_id + + # The reason for the refund. Appears in both the payer's transaction history + # and the emails that the payer receives. The pattern is defined by an + # external party and supports Unicode. + # @return [String] + attr_accessor :note_to_payer + + # Any additional payments instructions during refund payment processing. + # This object is only applicable to merchants that have been enabled for + # PayPal Commerce Platform for Marketplaces and Platforms capability. Please + # speak to your account manager if you want to use this capability. + # @return [RefundPaymentInstruction] + attr_accessor :payment_instruction + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['amount'] = 'amount' + @_hash['custom_id'] = 'custom_id' + @_hash['invoice_id'] = 'invoice_id' + @_hash['note_to_payer'] = 'note_to_payer' + @_hash['payment_instruction'] = 'payment_instruction' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + amount + custom_id + invoice_id + note_to_payer + payment_instruction + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(amount: SKIP, custom_id: SKIP, invoice_id: SKIP, + note_to_payer: SKIP, payment_instruction: SKIP) + @amount = amount unless amount == SKIP + @custom_id = custom_id unless custom_id == SKIP + @invoice_id = invoice_id unless invoice_id == SKIP + @note_to_payer = note_to_payer unless note_to_payer == SKIP + @payment_instruction = payment_instruction unless payment_instruction == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + amount = Money.from_hash(hash['amount']) if hash['amount'] + custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP + payment_instruction = RefundPaymentInstruction.from_hash(hash['payment_instruction']) if + hash['payment_instruction'] + + # Create object from extracted values. + RefundRequest.new(amount: amount, + custom_id: custom_id, + invoice_id: invoice_id, + note_to_payer: note_to_payer, + payment_instruction: payment_instruction) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_status.rb b/lib/pay_pal_restap_is/models/refund_status.rb new file mode 100644 index 0000000..53864cd --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_status.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The status of the refund. + class RefundStatus + REFUND_STATUS = [ + # TODO: Write general description for CANCELLED + CANCELLED = 'CANCELLED'.freeze, + + # TODO: Write general description for FAILED + FAILED = 'FAILED'.freeze, + + # TODO: Write general description for PENDING + PENDING = 'PENDING'.freeze, + + # TODO: Write general description for COMPLETED + COMPLETED = 'COMPLETED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_status_details.rb b/lib/pay_pal_restap_is/models/refund_status_details.rb new file mode 100644 index 0000000..ebb0801 --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_status_details.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details of the refund status. + class RefundStatusDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The reason why the refund has the `PENDING` or `FAILED` status. + # @return [RefundIncompleteReason] + attr_accessor :reason + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['reason'] = 'reason' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + reason + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(reason: SKIP) + @reason = reason unless reason == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + reason = hash.key?('reason') ? hash['reason'] : SKIP + + # Create object from extracted values. + RefundStatusDetails.new(reason: reason) + end + end +end diff --git a/lib/pay_pal_restap_is/models/refund_status_with_details.rb b/lib/pay_pal_restap_is/models/refund_status_with_details.rb new file mode 100644 index 0000000..1529141 --- /dev/null +++ b/lib/pay_pal_restap_is/models/refund_status_with_details.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The refund status with details. + class RefundStatusWithDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The status of the refund. + # @return [RefundStatus] + attr_accessor :status + + # The details of the refund status. + # @return [RefundStatusDetails] + attr_accessor :status_details + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['status_details'] = 'status_details' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + status_details + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, status_details: SKIP) + @status = status unless status == SKIP + @status_details = status_details unless status_details == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + status_details = RefundStatusDetails.from_hash(hash['status_details']) if + hash['status_details'] + + # Create object from extracted values. + RefundStatusWithDetails.new(status: status, + status_details: status_details) + end + end +end diff --git a/lib/pay_pal_restap_is/models/related_identifiers.rb b/lib/pay_pal_restap_is/models/related_identifiers.rb new file mode 100644 index 0000000..b1e4104 --- /dev/null +++ b/lib/pay_pal_restap_is/models/related_identifiers.rb @@ -0,0 +1,69 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Identifiers related to a specific resource. + class RelatedIdentifiers < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Order ID related to the resource. + # @return [String] + attr_accessor :order_id + + # Authorization ID related to the resource. + # @return [String] + attr_accessor :authorization_id + + # Capture ID related to the resource. + # @return [String] + attr_accessor :capture_id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['order_id'] = 'order_id' + @_hash['authorization_id'] = 'authorization_id' + @_hash['capture_id'] = 'capture_id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + order_id + authorization_id + capture_id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(order_id: SKIP, authorization_id: SKIP, capture_id: SKIP) + @order_id = order_id unless order_id == SKIP + @authorization_id = authorization_id unless authorization_id == SKIP + @capture_id = capture_id unless capture_id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + order_id = hash.key?('order_id') ? hash['order_id'] : SKIP + authorization_id = + hash.key?('authorization_id') ? hash['authorization_id'] : SKIP + capture_id = hash.key?('capture_id') ? hash['capture_id'] : SKIP + + # Create object from extracted values. + RelatedIdentifiers.new(order_id: order_id, + authorization_id: authorization_id, + capture_id: capture_id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb b/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb new file mode 100644 index 0000000..6e47412 --- /dev/null +++ b/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb @@ -0,0 +1,156 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The breakdown of the refund. + class SellerPayableBreakdown < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :gross_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :paypal_fee + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :paypal_fee_in_receivable_currency + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :net_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :net_amount_in_receivable_currency + + # An array of platform or partner fees, commissions, or brokerage fees for + # the refund. + # @return [Array[PlatformFee]] + attr_accessor :platform_fees + + # An array of breakdown values for the net amount. Returned when the + # currency of the refund is different from the currency of the PayPal + # account where the payee holds their funds. + # @return [Array[NetAmountBreakdownItem]] + attr_accessor :net_amount_breakdown + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :total_refunded_amount + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['gross_amount'] = 'gross_amount' + @_hash['paypal_fee'] = 'paypal_fee' + @_hash['paypal_fee_in_receivable_currency'] = + 'paypal_fee_in_receivable_currency' + @_hash['net_amount'] = 'net_amount' + @_hash['net_amount_in_receivable_currency'] = + 'net_amount_in_receivable_currency' + @_hash['platform_fees'] = 'platform_fees' + @_hash['net_amount_breakdown'] = 'net_amount_breakdown' + @_hash['total_refunded_amount'] = 'total_refunded_amount' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + gross_amount + paypal_fee + paypal_fee_in_receivable_currency + net_amount + net_amount_in_receivable_currency + platform_fees + net_amount_breakdown + total_refunded_amount + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(gross_amount: SKIP, paypal_fee: SKIP, + paypal_fee_in_receivable_currency: SKIP, net_amount: SKIP, + net_amount_in_receivable_currency: SKIP, platform_fees: SKIP, + net_amount_breakdown: SKIP, total_refunded_amount: SKIP) + @gross_amount = gross_amount unless gross_amount == SKIP + @paypal_fee = paypal_fee unless paypal_fee == SKIP + unless paypal_fee_in_receivable_currency == SKIP + @paypal_fee_in_receivable_currency = + paypal_fee_in_receivable_currency + end + @net_amount = net_amount unless net_amount == SKIP + unless net_amount_in_receivable_currency == SKIP + @net_amount_in_receivable_currency = + net_amount_in_receivable_currency + end + @platform_fees = platform_fees unless platform_fees == SKIP + @net_amount_breakdown = net_amount_breakdown unless net_amount_breakdown == SKIP + @total_refunded_amount = total_refunded_amount unless total_refunded_amount == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + gross_amount = Money.from_hash(hash['gross_amount']) if hash['gross_amount'] + paypal_fee = Money.from_hash(hash['paypal_fee']) if hash['paypal_fee'] + if hash['paypal_fee_in_receivable_currency'] + paypal_fee_in_receivable_currency = Money.from_hash(hash['paypal_fee_in_receivable_currency']) + end + net_amount = Money.from_hash(hash['net_amount']) if hash['net_amount'] + if hash['net_amount_in_receivable_currency'] + net_amount_in_receivable_currency = Money.from_hash(hash['net_amount_in_receivable_currency']) + end + # Parameter is an array, so we need to iterate through it + platform_fees = nil + unless hash['platform_fees'].nil? + platform_fees = [] + hash['platform_fees'].each do |structure| + platform_fees << (PlatformFee.from_hash(structure) if structure) + end + end + + platform_fees = SKIP unless hash.key?('platform_fees') + # Parameter is an array, so we need to iterate through it + net_amount_breakdown = nil + unless hash['net_amount_breakdown'].nil? + net_amount_breakdown = [] + hash['net_amount_breakdown'].each do |structure| + net_amount_breakdown << (NetAmountBreakdownItem.from_hash(structure) if structure) + end + end + + net_amount_breakdown = SKIP unless hash.key?('net_amount_breakdown') + total_refunded_amount = Money.from_hash(hash['total_refunded_amount']) if + hash['total_refunded_amount'] + + # Create object from extracted values. + SellerPayableBreakdown.new(gross_amount: gross_amount, + paypal_fee: paypal_fee, + paypal_fee_in_receivable_currency: paypal_fee_in_receivable_currency, + net_amount: net_amount, + net_amount_in_receivable_currency: net_amount_in_receivable_currency, + platform_fees: platform_fees, + net_amount_breakdown: net_amount_breakdown, + total_refunded_amount: total_refunded_amount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/seller_protection.rb b/lib/pay_pal_restap_is/models/seller_protection.rb new file mode 100644 index 0000000..fbc7a31 --- /dev/null +++ b/lib/pay_pal_restap_is/models/seller_protection.rb @@ -0,0 +1,65 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The level of protection offered as defined by [PayPal Seller Protection for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) + # . + class SellerProtection < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Indicates whether the transaction is eligible for seller protection. For + # information, see [PayPal Seller Protection for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio + # n). + # @return [SellerProtectionStatus] + attr_accessor :status + + # An array of conditions that are covered for the transaction. + # @return [Array[DisputeCategory]] + attr_accessor :dispute_categories + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash['dispute_categories'] = 'dispute_categories' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + dispute_categories + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP, dispute_categories: SKIP) + @status = status unless status == SKIP + @dispute_categories = dispute_categories unless dispute_categories == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + dispute_categories = + hash.key?('dispute_categories') ? hash['dispute_categories'] : SKIP + + # Create object from extracted values. + SellerProtection.new(status: status, + dispute_categories: dispute_categories) + end + end +end diff --git a/lib/pay_pal_restap_is/models/seller_protection_status.rb b/lib/pay_pal_restap_is/models/seller_protection_status.rb new file mode 100644 index 0000000..617ae01 --- /dev/null +++ b/lib/pay_pal_restap_is/models/seller_protection_status.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Indicates whether the transaction is eligible for seller protection. For + # information, see [PayPal Seller Protection for + # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) + # . + class SellerProtectionStatus + SELLER_PROTECTION_STATUS = [ + # TODO: Write general description for ELIGIBLE + ELIGIBLE = 'ELIGIBLE'.freeze, + + # TODO: Write general description for PARTIALLY_ELIGIBLE + PARTIALLY_ELIGIBLE = 'PARTIALLY_ELIGIBLE'.freeze, + + # TODO: Write general description for NOT_ELIGIBLE + NOT_ELIGIBLE = 'NOT_ELIGIBLE'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb b/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb new file mode 100644 index 0000000..f6cb4d5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb @@ -0,0 +1,129 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The detailed breakdown of the capture activity. This is not available for + # transactions that are in pending state. + class SellerReceivableBreakdown < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :gross_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :paypal_fee + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :paypal_fee_in_receivable_currency + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :net_amount + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :receivable_amount + + # The exchange rate that determines the amount to convert from one currency + # to another currency. + # @return [ExchangeRate] + attr_accessor :exchange_rate + + # An array of platform or partner fees, commissions, or brokerage fees that + # associated with the captured payment. + # @return [Array[PlatformFee]] + attr_accessor :platform_fees + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['gross_amount'] = 'gross_amount' + @_hash['paypal_fee'] = 'paypal_fee' + @_hash['paypal_fee_in_receivable_currency'] = + 'paypal_fee_in_receivable_currency' + @_hash['net_amount'] = 'net_amount' + @_hash['receivable_amount'] = 'receivable_amount' + @_hash['exchange_rate'] = 'exchange_rate' + @_hash['platform_fees'] = 'platform_fees' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + paypal_fee + paypal_fee_in_receivable_currency + net_amount + receivable_amount + exchange_rate + platform_fees + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(gross_amount:, paypal_fee: SKIP, + paypal_fee_in_receivable_currency: SKIP, net_amount: SKIP, + receivable_amount: SKIP, exchange_rate: SKIP, + platform_fees: SKIP) + @gross_amount = gross_amount + @paypal_fee = paypal_fee unless paypal_fee == SKIP + unless paypal_fee_in_receivable_currency == SKIP + @paypal_fee_in_receivable_currency = + paypal_fee_in_receivable_currency + end + @net_amount = net_amount unless net_amount == SKIP + @receivable_amount = receivable_amount unless receivable_amount == SKIP + @exchange_rate = exchange_rate unless exchange_rate == SKIP + @platform_fees = platform_fees unless platform_fees == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + gross_amount = Money.from_hash(hash['gross_amount']) if hash['gross_amount'] + paypal_fee = Money.from_hash(hash['paypal_fee']) if hash['paypal_fee'] + if hash['paypal_fee_in_receivable_currency'] + paypal_fee_in_receivable_currency = Money.from_hash(hash['paypal_fee_in_receivable_currency']) + end + net_amount = Money.from_hash(hash['net_amount']) if hash['net_amount'] + receivable_amount = Money.from_hash(hash['receivable_amount']) if hash['receivable_amount'] + exchange_rate = ExchangeRate.from_hash(hash['exchange_rate']) if hash['exchange_rate'] + # Parameter is an array, so we need to iterate through it + platform_fees = nil + unless hash['platform_fees'].nil? + platform_fees = [] + hash['platform_fees'].each do |structure| + platform_fees << (PlatformFee.from_hash(structure) if structure) + end + end + + platform_fees = SKIP unless hash.key?('platform_fees') + + # Create object from extracted values. + SellerReceivableBreakdown.new(gross_amount: gross_amount, + paypal_fee: paypal_fee, + paypal_fee_in_receivable_currency: paypal_fee_in_receivable_currency, + net_amount: net_amount, + receivable_amount: receivable_amount, + exchange_rate: exchange_rate, + platform_fees: platform_fees) + end + end +end diff --git a/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb b/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb new file mode 100644 index 0000000..8100102 --- /dev/null +++ b/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Authorization details. + class SEPADebitAuthorizationDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The authorization status of the wallet instrument. + # @return [InstrumentAuthorizationStatus] + attr_accessor :status + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['status'] = 'status' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + status + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(status: SKIP) + @status = status unless status == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + status = hash.key?('status') ? hash['status'] : SKIP + + # Create object from extracted values. + SEPADebitAuthorizationDetails.new(status: status) + end + end +end diff --git a/lib/pay_pal_restap_is/models/sepa_debit_response.rb b/lib/pay_pal_restap_is/models/sepa_debit_response.rb new file mode 100644 index 0000000..3262bdb --- /dev/null +++ b/lib/pay_pal_restap_is/models/sepa_debit_response.rb @@ -0,0 +1,87 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # SEPADebitResponse Model. + class SEPADebitResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # The last characters of the IBAN used to pay. + # @return [Object] + attr_accessor :account_holder_name + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # Authorization details. + # @return [SEPADebitAuthorizationDetails] + attr_accessor :authorization_details + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash['account_holder_name'] = 'account_holder_name' + @_hash['billing_address'] = 'billing_address' + @_hash['authorization_details'] = 'authorization_details' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + iban_last_chars + account_holder_name + billing_address + authorization_details + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(iban_last_chars: SKIP, account_holder_name: SKIP, + billing_address: SKIP, authorization_details: SKIP) + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + @account_holder_name = account_holder_name unless account_holder_name == SKIP + @billing_address = billing_address unless billing_address == SKIP + @authorization_details = authorization_details unless authorization_details == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + account_holder_name = + hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + if hash['authorization_details'] + authorization_details = SEPADebitAuthorizationDetails.from_hash(hash['authorization_details']) + end + + # Create object from extracted values. + SEPADebitResponse.new(iban_last_chars: iban_last_chars, + account_holder_name: account_holder_name, + billing_address: billing_address, + authorization_details: authorization_details) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb b/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb new file mode 100644 index 0000000..111e7e0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb @@ -0,0 +1,103 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the Vault creation flow experience for your customers. + class SetupTokenCardExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The URL where the customer is redirected after customer approves leaves + # the flow. It is a required field for contingency flows like PayPal wallet, + # 3DS. + # @return [String] + attr_accessor :return_url + + # The URL where the customer is redirected after customer cancels or leaves + # the flow. It is a required field for contingency flows like PayPal wallet, + # 3DS. + # @return [String] + attr_accessor :cancel_url + + # Vault Instruction on action to be performed after a successful payer + # approval. + # @return [String] + attr_accessor :vault_instruction + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['vault_instruction'] = 'vault_instruction' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + return_url + cancel_url + vault_instruction + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, + cancel_url: SKIP, + vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @vault_instruction = vault_instruction unless vault_instruction == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + vault_instruction = + hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' + + # Create object from extracted values. + SetupTokenCardExperienceContext.new(brand_name: brand_name, + locale: locale, + return_url: return_url, + cancel_url: cancel_url, + vault_instruction: vault_instruction) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_request.rb b/lib/pay_pal_restap_is/models/setup_token_request.rb new file mode 100644 index 0000000..593439f --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_request.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Setup Token Request where the `source` defines the type of instrument to be + # stored. + class SetupTokenRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Customer in merchant's or partner's system of records. + # @return [CustomerRequest] + attr_accessor :customer + + # The payment method to vault with the instrument details. + # @return [SetupTokenRequestPaymentSource] + attr_accessor :payment_source + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['payment_source'] = 'payment_source' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_source:, customer: SKIP) + @customer = customer unless customer == SKIP + @payment_source = payment_source + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_source = SetupTokenRequestPaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] + + # Create object from extracted values. + SetupTokenRequest.new(payment_source: payment_source, + customer: customer) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_request_card.rb b/lib/pay_pal_restap_is/models/setup_token_request_card.rb new file mode 100644 index 0000000..f7c43c8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_request_card.rb @@ -0,0 +1,150 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A Resource representing a request to vault a Card. + class SetupTokenRequestCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The primary account number (PAN) for the payment card. + # @return [String] + attr_accessor :number + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # The three- or four-digit security code of the card. Also known as the CVV, + # CVC, CVN, CVE, or CID. This parameter cannot be present in the request + # when `payment_initiator=MERCHANT`. + # @return [String] + attr_accessor :security_code + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # The verification method of the card. + # @return [String] + attr_accessor :verification_method + + # Customizes the Vault creation flow experience for your customers. + # @return [SetupTokenCardExperienceContext] + attr_accessor :experience_context + + # Customizes the Vault creation flow experience for your customers. + # @return [Object] + attr_accessor :network_transaction_reference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['number'] = 'number' + @_hash['expiry'] = 'expiry' + @_hash['security_code'] = 'security_code' + @_hash['type'] = 'type' + @_hash['brand'] = 'brand' + @_hash['billing_address'] = 'billing_address' + @_hash['verification_method'] = 'verification_method' + @_hash['experience_context'] = 'experience_context' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + number + expiry + security_code + type + brand + billing_address + verification_method + experience_context + network_transaction_reference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, + type: SKIP, brand: SKIP, billing_address: SKIP, + verification_method: SKIP, experience_context: SKIP, + network_transaction_reference: SKIP) + @name = name unless name == SKIP + @number = number unless number == SKIP + @expiry = expiry unless expiry == SKIP + @security_code = security_code unless security_code == SKIP + @type = type unless type == SKIP + @brand = brand unless brand == SKIP + @billing_address = billing_address unless billing_address == SKIP + @verification_method = verification_method unless verification_method == SKIP + @experience_context = experience_context unless experience_context == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + number = hash.key?('number') ? hash['number'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + security_code = hash.key?('security_code') ? hash['security_code'] : SKIP + type = hash.key?('type') ? hash['type'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + verification_method = + hash.key?('verification_method') ? hash['verification_method'] : SKIP + experience_context = SetupTokenCardExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + network_transaction_reference = + hash.key?('network_transaction_reference') ? hash['network_transaction_reference'] : SKIP + + # Create object from extracted values. + SetupTokenRequestCard.new(name: name, + number: number, + expiry: expiry, + security_code: security_code, + type: type, + brand: brand, + billing_address: billing_address, + verification_method: verification_method, + experience_context: experience_context, + network_transaction_reference: network_transaction_reference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb b/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb new file mode 100644 index 0000000..35d87ef --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb @@ -0,0 +1,77 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The payment method to vault with the instrument details. + class SetupTokenRequestPaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # A Resource representing a request to vault a Card. + # @return [SetupTokenRequestCard] + attr_accessor :card + + # A resource representing a request to vault PayPal Wallet. + # @return [VaultPayPalWalletRequest] + attr_accessor :paypal + + # A resource representing a request to vault PayPal Wallet. + # @return [VaultVenmoRequest] + attr_accessor :venmo + + # The Tokenized Payment Source representing a Request to Vault a Token. + # @return [VaultTokenRequest] + attr_accessor :token + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['paypal'] = 'paypal' + @_hash['venmo'] = 'venmo' + @_hash['token'] = 'token' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + paypal + venmo + token + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, paypal: SKIP, venmo: SKIP, token: SKIP) + @card = card unless card == SKIP + @paypal = paypal unless paypal == SKIP + @venmo = venmo unless venmo == SKIP + @token = token unless token == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = SetupTokenRequestCard.from_hash(hash['card']) if hash['card'] + paypal = VaultPayPalWalletRequest.from_hash(hash['paypal']) if hash['paypal'] + venmo = VaultVenmoRequest.from_hash(hash['venmo']) if hash['venmo'] + token = VaultTokenRequest.from_hash(hash['token']) if hash['token'] + + # Create object from extracted values. + SetupTokenRequestPaymentSource.new(card: card, + paypal: paypal, + venmo: venmo, + token: token) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_response.rb b/lib/pay_pal_restap_is/models/setup_token_response.rb new file mode 100644 index 0000000..b7df301 --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_response.rb @@ -0,0 +1,106 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Minimal representation of a cached setup token. + class SetupTokenResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the vault token. + # @return [String] + attr_accessor :id + + # Ordinal number for sorting. + # @return [Integer] + attr_accessor :ordinal + + # Customer in merchant's or partner's system of records. + # @return [CustomerRequest] + attr_accessor :customer + + # The status of the payment token. + # @return [String] + attr_accessor :status + + # The setup payment method details. + # @return [SetupTokenResponsePaymentSource] + attr_accessor :payment_source + + # An array of related [HATEOAS links](/api/rest/responses/#hateoas). + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['ordinal'] = 'ordinal' + @_hash['customer'] = 'customer' + @_hash['status'] = 'status' + @_hash['payment_source'] = 'payment_source' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + ordinal + customer + status + payment_source + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, ordinal: SKIP, customer: SKIP, status: 'CREATED', + payment_source: SKIP, links: SKIP) + @id = id unless id == SKIP + @ordinal = ordinal unless ordinal == SKIP + @customer = customer unless customer == SKIP + @status = status unless status == SKIP + @payment_source = payment_source unless payment_source == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + ordinal = hash.key?('ordinal') ? hash['ordinal'] : SKIP + customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] + status = hash['status'] ||= 'CREATED' + payment_source = SetupTokenResponsePaymentSource.from_hash(hash['payment_source']) if + hash['payment_source'] + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + SetupTokenResponse.new(id: id, + ordinal: ordinal, + customer: customer, + status: status, + payment_source: payment_source, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_response_card.rb b/lib/pay_pal_restap_is/models/setup_token_response_card.rb new file mode 100644 index 0000000..92d8ec1 --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_response_card.rb @@ -0,0 +1,156 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # SetupTokenResponseCard Model. + class SetupTokenResponseCard < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The card holder's name as it appears on the card. + # @return [String] + attr_accessor :name + + # The last digits of the payment card. + # @return [String] + attr_accessor :last_digits + + # The card network or brand. Applies to credit, debit, gift, and payment + # cards. + # @return [CardBrand] + attr_accessor :brand + + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date + # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). + # @return [String] + attr_accessor :expiry + + # Address request details. + # @return [AddressDetails] + attr_accessor :billing_address + + # Verification status of Card. + # @return [String] + attr_accessor :verification_status + + # Card Verification details including the authorization details and 3D + # SECURE details. + # @return [CardVerificationDetails] + attr_accessor :verification + + # Previous network transaction reference including id in response. + # @return [NetworkTransactionReferenceEntity] + attr_accessor :network_transaction_reference + + # Results of Authentication such as 3D Secure. + # @return [AuthenticationResponse] + attr_accessor :authentication_result + + # Bank Identification Number (BIN) details used to fund a payment. + # @return [BinDetails] + attr_accessor :bin_details + + # Type of card. i.e Credit, Debit and so on. + # @return [CardType] + attr_accessor :type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['last_digits'] = 'last_digits' + @_hash['brand'] = 'brand' + @_hash['expiry'] = 'expiry' + @_hash['billing_address'] = 'billing_address' + @_hash['verification_status'] = 'verification_status' + @_hash['verification'] = 'verification' + @_hash['network_transaction_reference'] = + 'network_transaction_reference' + @_hash['authentication_result'] = 'authentication_result' + @_hash['bin_details'] = 'bin_details' + @_hash['type'] = 'type' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + last_digits + brand + expiry + billing_address + verification_status + verification + network_transaction_reference + authentication_result + bin_details + type + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, + billing_address: SKIP, verification_status: SKIP, + verification: SKIP, network_transaction_reference: SKIP, + authentication_result: SKIP, bin_details: SKIP, type: SKIP) + @name = name unless name == SKIP + @last_digits = last_digits unless last_digits == SKIP + @brand = brand unless brand == SKIP + @expiry = expiry unless expiry == SKIP + @billing_address = billing_address unless billing_address == SKIP + @verification_status = verification_status unless verification_status == SKIP + @verification = verification unless verification == SKIP + unless network_transaction_reference == SKIP + @network_transaction_reference = + network_transaction_reference + end + @authentication_result = authentication_result unless authentication_result == SKIP + @bin_details = bin_details unless bin_details == SKIP + @type = type unless type == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP + brand = hash.key?('brand') ? hash['brand'] : SKIP + expiry = hash.key?('expiry') ? hash['expiry'] : SKIP + billing_address = AddressDetails.from_hash(hash['billing_address']) if + hash['billing_address'] + verification_status = + hash.key?('verification_status') ? hash['verification_status'] : SKIP + verification = CardVerificationDetails.from_hash(hash['verification']) if + hash['verification'] + if hash['network_transaction_reference'] + network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) + end + authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if + hash['authentication_result'] + bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] + type = hash.key?('type') ? hash['type'] : SKIP + + # Create object from extracted values. + SetupTokenResponseCard.new(name: name, + last_digits: last_digits, + brand: brand, + expiry: expiry, + billing_address: billing_address, + verification_status: verification_status, + verification: verification, + network_transaction_reference: network_transaction_reference, + authentication_result: authentication_result, + bin_details: bin_details, + type: type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb b/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb new file mode 100644 index 0000000..d3d9d80 --- /dev/null +++ b/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb @@ -0,0 +1,68 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The setup payment method details. + class SetupTokenResponsePaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # TODO: Write general description for this method + # @return [SetupTokenResponseCard] + attr_accessor :card + + # TODO: Write general description for this method + # @return [PayPalPaymentToken] + attr_accessor :paypal + + # TODO: Write general description for this method + # @return [VenmoPaymentToken] + attr_accessor :venmo + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash['paypal'] = 'paypal' + @_hash['venmo'] = 'venmo' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + paypal + venmo + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP, paypal: SKIP, venmo: SKIP) + @card = card unless card == SKIP + @paypal = paypal unless paypal == SKIP + @venmo = venmo unless venmo == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = SetupTokenResponseCard.from_hash(hash['card']) if hash['card'] + paypal = PayPalPaymentToken.from_hash(hash['paypal']) if hash['paypal'] + venmo = VenmoPaymentToken.from_hash(hash['venmo']) if hash['venmo'] + + # Create object from extracted values. + SetupTokenResponsePaymentSource.new(card: card, + paypal: paypal, + venmo: venmo) + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipment_carrier.rb b/lib/pay_pal_restap_is/models/shipment_carrier.rb new file mode 100644 index 0000000..ed32133 --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipment_carrier.rb @@ -0,0 +1,3852 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The carrier for the shipment. Some carriers have a global version as well as + # local subsidiaries. The subsidiaries are repeated over many countries and + # might also have an entry in the global list. Choose the carrier for your + # country. If the carrier is not available for your country, choose the global + # version of the carrier. If your carrier name is not in the list, set + # `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For + # allowed values, see Carriers. + class ShipmentCarrier + SHIPMENT_CARRIER = [ + # TODO: Write general description for DPD_RU + DPD_RU = 'DPD_RU'.freeze, + + # TODO: Write general description for BG_BULGARIAN_POST + BG_BULGARIAN_POST = 'BG_BULGARIAN_POST'.freeze, + + # TODO: Write general description for KR_KOREA_POST + KR_KOREA_POST = 'KR_KOREA_POST'.freeze, + + # TODO: Write general description for ZA_COURIERIT + ZA_COURIERIT = 'ZA_COURIERIT'.freeze, + + # TODO: Write general description for FR_EXAPAQ + FR_EXAPAQ = 'FR_EXAPAQ'.freeze, + + # TODO: Write general description for ARE_EMIRATES_POST + ARE_EMIRATES_POST = 'ARE_EMIRATES_POST'.freeze, + + # TODO: Write general description for GAC + GAC = 'GAC'.freeze, + + # TODO: Write general description for GEIS + GEIS = 'GEIS'.freeze, + + # TODO: Write general description for SF_EX + SF_EX = 'SF_EX'.freeze, + + # TODO: Write general description for PAGO + PAGO = 'PAGO'.freeze, + + # TODO: Write general description for MYHERMES + MYHERMES = 'MYHERMES'.freeze, + + # TODO: Write general description for DIAMOND_EUROGISTICS + DIAMOND_EUROGISTICS = 'DIAMOND_EUROGISTICS'.freeze, + + # TODO: Write general description for CORPORATECOURIERS_WEBHOOK + CORPORATECOURIERS_WEBHOOK = 'CORPORATECOURIERS_WEBHOOK'.freeze, + + # TODO: Write general description for BOND + BOND = 'BOND'.freeze, + + # TODO: Write general description for OMNIPARCEL + OMNIPARCEL = 'OMNIPARCEL'.freeze, + + # TODO: Write general description for SK_POSTA + SK_POSTA = 'SK_POSTA'.freeze, + + # TODO: Write general description for PUROLATOR + PUROLATOR = 'PUROLATOR'.freeze, + + # TODO: Write general description for FETCHR_WEBHOOK + FETCHR_WEBHOOK = 'FETCHR_WEBHOOK'.freeze, + + # TODO: Write general description for THEDELIVERYGROUP + THEDELIVERYGROUP = 'THEDELIVERYGROUP'.freeze, + + # TODO: Write general description for CELLO_SQUARE + CELLO_SQUARE = 'CELLO_SQUARE'.freeze, + + # TODO: Write general description for TARRIVE + TARRIVE = 'TARRIVE'.freeze, + + # TODO: Write general description for COLLIVERY + COLLIVERY = 'COLLIVERY'.freeze, + + # TODO: Write general description for MAINFREIGHT + MAINFREIGHT = 'MAINFREIGHT'.freeze, + + # TODO: Write general description for IND_FIRSTFLIGHT + IND_FIRSTFLIGHT = 'IND_FIRSTFLIGHT'.freeze, + + # TODO: Write general description for ACSWORLDWIDE + ACSWORLDWIDE = 'ACSWORLDWIDE'.freeze, + + # TODO: Write general description for AMSTAN + AMSTAN = 'AMSTAN'.freeze, + + # TODO: Write general description for OKAYPARCEL + OKAYPARCEL = 'OKAYPARCEL'.freeze, + + # TODO: Write general description for ENVIALIA_REFERENCE + ENVIALIA_REFERENCE = 'ENVIALIA_REFERENCE'.freeze, + + # TODO: Write general description for SEUR_ES + SEUR_ES = 'SEUR_ES'.freeze, + + # TODO: Write general description for CONTINENTAL + CONTINENTAL = 'CONTINENTAL'.freeze, + + # TODO: Write general description for FDSEXPRESS + FDSEXPRESS = 'FDSEXPRESS'.freeze, + + # TODO: Write general description for AMAZON_FBA_SWISHIP + AMAZON_FBA_SWISHIP = 'AMAZON_FBA_SWISHIP'.freeze, + + # TODO: Write general description for WYNGS + WYNGS = 'WYNGS'.freeze, + + # TODO: Write general description for DHL_ACTIVE_TRACING + DHL_ACTIVE_TRACING = 'DHL_ACTIVE_TRACING'.freeze, + + # TODO: Write general description for ZYLLEM + ZYLLEM = 'ZYLLEM'.freeze, + + # TODO: Write general description for RUSTON + RUSTON = 'RUSTON'.freeze, + + # TODO: Write general description for XPOST + XPOST = 'XPOST'.freeze, + + # TODO: Write general description for CORREOS_ES + CORREOS_ES = 'CORREOS_ES'.freeze, + + # TODO: Write general description for DHL_FR + DHL_FR = 'DHL_FR'.freeze, + + # TODO: Write general description for PAN_ASIA + PAN_ASIA = 'PAN_ASIA'.freeze, + + # TODO: Write general description for BRT_IT + BRT_IT = 'BRT_IT'.freeze, + + # TODO: Write general description for SRE_KOREA + SRE_KOREA = 'SRE_KOREA'.freeze, + + # TODO: Write general description for SPEEDEE + SPEEDEE = 'SPEEDEE'.freeze, + + # TODO: Write general description for TNT_UK + TNT_UK = 'TNT_UK'.freeze, + + # TODO: Write general description for VENIPAK + VENIPAK = 'VENIPAK'.freeze, + + # TODO: Write general description for SHREENANDANCOURIER + SHREENANDANCOURIER = 'SHREENANDANCOURIER'.freeze, + + # TODO: Write general description for CROSHOT + CROSHOT = 'CROSHOT'.freeze, + + # TODO: Write general description for NIPOST_NG + NIPOST_NG = 'NIPOST_NG'.freeze, + + # TODO: Write general description for EPST_GLBL + EPST_GLBL = 'EPST_GLBL'.freeze, + + # TODO: Write general description for NEWGISTICS + NEWGISTICS = 'NEWGISTICS'.freeze, + + # TODO: Write general description for POST_SLOVENIA + POST_SLOVENIA = 'POST_SLOVENIA'.freeze, + + # TODO: Write general description for JERSEY_POST + JERSEY_POST = 'JERSEY_POST'.freeze, + + # TODO: Write general description for BOMBINOEXP + BOMBINOEXP = 'BOMBINOEXP'.freeze, + + # TODO: Write general description for WMG + WMG = 'WMG'.freeze, + + # TODO: Write general description for XQ_EXPRESS + XQ_EXPRESS = 'XQ_EXPRESS'.freeze, + + # TODO: Write general description for FURDECO + FURDECO = 'FURDECO'.freeze, + + # TODO: Write general description for LHT_EXPRESS + LHT_EXPRESS = 'LHT_EXPRESS'.freeze, + + # TODO: Write general description for SOUTH_AFRICAN_POST_OFFICE + SOUTH_AFRICAN_POST_OFFICE = 'SOUTH_AFRICAN_POST_OFFICE'.freeze, + + # TODO: Write general description for SPOTON + SPOTON = 'SPOTON'.freeze, + + # TODO: Write general description for DIMERCO + DIMERCO = 'DIMERCO'.freeze, + + # TODO: Write general description for CYPRUS_POST_CYP + CYPRUS_POST_CYP = 'CYPRUS_POST_CYP'.freeze, + + # TODO: Write general description for ABCUSTOM + ABCUSTOM = 'ABCUSTOM'.freeze, + + # TODO: Write general description for IND_DELIVREE + IND_DELIVREE = 'IND_DELIVREE'.freeze, + + # TODO: Write general description for CN_BESTEXPRESS + CN_BESTEXPRESS = 'CN_BESTEXPRESS'.freeze, + + # TODO: Write general description for DX_SFTP + DX_SFTP = 'DX_SFTP'.freeze, + + # TODO: Write general description for PICKUPP_MYS + PICKUPP_MYS = 'PICKUPP_MYS'.freeze, + + # TODO: Write general description for FMX + FMX = 'FMX'.freeze, + + # TODO: Write general description for HELLMANN + HELLMANN = 'HELLMANN'.freeze, + + # TODO: Write general description for SHIP_IT_ASIA + SHIP_IT_ASIA = 'SHIP_IT_ASIA'.freeze, + + # TODO: Write general description for KERRY_ECOMMERCE + KERRY_ECOMMERCE = 'KERRY_ECOMMERCE'.freeze, + + # TODO: Write general description for FRETERAPIDO + FRETERAPIDO = 'FRETERAPIDO'.freeze, + + # TODO: Write general description for PITNEY_BOWES + PITNEY_BOWES = 'PITNEY_BOWES'.freeze, + + # TODO: Write general description for XPRESSEN_DK + XPRESSEN_DK = 'XPRESSEN_DK'.freeze, + + # TODO: Write general description for SEUR_SP_API + SEUR_SP_API = 'SEUR_SP_API'.freeze, + + # TODO: Write general description for DELIVERYONTIME + DELIVERYONTIME = 'DELIVERYONTIME'.freeze, + + # TODO: Write general description for JINSUNG + JINSUNG = 'JINSUNG'.freeze, + + # TODO: Write general description for TRANS_KARGO + TRANS_KARGO = 'TRANS_KARGO'.freeze, + + # TODO: Write general description for SWISHIP_DE + SWISHIP_DE = 'SWISHIP_DE'.freeze, + + # TODO: Write general description for IVOY_WEBHOOK + IVOY_WEBHOOK = 'IVOY_WEBHOOK'.freeze, + + # TODO: Write general description for AIRMEE_WEBHOOK + AIRMEE_WEBHOOK = 'AIRMEE_WEBHOOK'.freeze, + + # TODO: Write general description for DHL_BENELUX + DHL_BENELUX = 'DHL_BENELUX'.freeze, + + # TODO: Write general description for FIRSTMILE + FIRSTMILE = 'FIRSTMILE'.freeze, + + # TODO: Write general description for FASTWAY_IR + FASTWAY_IR = 'FASTWAY_IR'.freeze, + + # TODO: Write general description for HH_EXP + HH_EXP = 'HH_EXP'.freeze, + + # TODO: Write general description for MYS_MYPOST_ONLINE + MYS_MYPOST_ONLINE = 'MYS_MYPOST_ONLINE'.freeze, + + # TODO: Write general description for TNT_NL + TNT_NL = 'TNT_NL'.freeze, + + # TODO: Write general description for TIPSA + TIPSA = 'TIPSA'.freeze, + + # TODO: Write general description for TAQBIN_MY + TAQBIN_MY = 'TAQBIN_MY'.freeze, + + # TODO: Write general description for KGMHUB + KGMHUB = 'KGMHUB'.freeze, + + # TODO: Write general description for INTEXPRESS + INTEXPRESS = 'INTEXPRESS'.freeze, + + # TODO: Write general description for OVERSE_EXP + OVERSE_EXP = 'OVERSE_EXP'.freeze, + + # TODO: Write general description for ONECLICK + ONECLICK = 'ONECLICK'.freeze, + + # TODO: Write general description for ROADRUNNER_FREIGHT + ROADRUNNER_FREIGHT = 'ROADRUNNER_FREIGHT'.freeze, + + # TODO: Write general description for GLS_CROTIA + GLS_CROTIA = 'GLS_CROTIA'.freeze, + + # TODO: Write general description for MRW_FTP + MRW_FTP = 'MRW_FTP'.freeze, + + # TODO: Write general description for BLUEX + BLUEX = 'BLUEX'.freeze, + + # TODO: Write general description for DYLT + DYLT = 'DYLT'.freeze, + + # TODO: Write general description for DPD_IR + DPD_IR = 'DPD_IR'.freeze, + + # TODO: Write general description for SIN_GLBL + SIN_GLBL = 'SIN_GLBL'.freeze, + + # TODO: Write general description for TUFFNELLS_REFERENCE + TUFFNELLS_REFERENCE = 'TUFFNELLS_REFERENCE'.freeze, + + # TODO: Write general description for CJPACKET + CJPACKET = 'CJPACKET'.freeze, + + # TODO: Write general description for MILKMAN + MILKMAN = 'MILKMAN'.freeze, + + # TODO: Write general description for ASIGNA + ASIGNA = 'ASIGNA'.freeze, + + # TODO: Write general description for ONEWORLDEXPRESS + ONEWORLDEXPRESS = 'ONEWORLDEXPRESS'.freeze, + + # TODO: Write general description for ROYAL_MAIL + ROYAL_MAIL = 'ROYAL_MAIL'.freeze, + + # TODO: Write general description for VIA_EXPRESS + VIA_EXPRESS = 'VIA_EXPRESS'.freeze, + + # TODO: Write general description for TIGFREIGHT + TIGFREIGHT = 'TIGFREIGHT'.freeze, + + # TODO: Write general description for ZTO_EXPRESS + ZTO_EXPRESS = 'ZTO_EXPRESS'.freeze, + + # TODO: Write general description for TWO_GO + TWO_GO = 'TWO_GO'.freeze, + + # TODO: Write general description for IML + IML = 'IML'.freeze, + + # TODO: Write general description for INTEL_VALLEY + INTEL_VALLEY = 'INTEL_VALLEY'.freeze, + + # TODO: Write general description for EFS + EFS = 'EFS'.freeze, + + # TODO: Write general description for UK_UK_MAIL + UK_UK_MAIL = 'UK_UK_MAIL'.freeze, + + # TODO: Write general description for RAM + RAM = 'RAM'.freeze, + + # TODO: Write general description for ALLIEDEXPRESS + ALLIEDEXPRESS = 'ALLIEDEXPRESS'.freeze, + + # TODO: Write general description for APC_OVERNIGHT + APC_OVERNIGHT = 'APC_OVERNIGHT'.freeze, + + # TODO: Write general description for SHIPPIT + SHIPPIT = 'SHIPPIT'.freeze, + + # TODO: Write general description for TFM + TFM = 'TFM'.freeze, + + # TODO: Write general description for M_XPRESS + M_XPRESS = 'M_XPRESS'.freeze, + + # TODO: Write general description for HDB_BOX + HDB_BOX = 'HDB_BOX'.freeze, + + # TODO: Write general description for CLEVY_LINKS + CLEVY_LINKS = 'CLEVY_LINKS'.freeze, + + # TODO: Write general description for IBEONE + IBEONE = 'IBEONE'.freeze, + + # TODO: Write general description for FIEGE_NL + FIEGE_NL = 'FIEGE_NL'.freeze, + + # TODO: Write general description for KWE_GLOBAL + KWE_GLOBAL = 'KWE_GLOBAL'.freeze, + + # TODO: Write general description for CTC_EXPRESS + CTC_EXPRESS = 'CTC_EXPRESS'.freeze, + + # TODO: Write general description for LAO_POST + LAO_POST = 'LAO_POST'.freeze, + + # TODO: Write general description for AMAZON + AMAZON = 'AMAZON'.freeze, + + # TODO: Write general description for MORE_LINK + MORE_LINK = 'MORE_LINK'.freeze, + + # TODO: Write general description for JX + JX = 'JX'.freeze, + + # TODO: Write general description for EASY_MAIL + EASY_MAIL = 'EASY_MAIL'.freeze, + + # TODO: Write general description for ADUIEPYLE + ADUIEPYLE = 'ADUIEPYLE'.freeze, + + # TODO: Write general description for GB_PANTHER + GB_PANTHER = 'GB_PANTHER'.freeze, + + # TODO: Write general description for EXPRESSSALE + EXPRESSSALE = 'EXPRESSSALE'.freeze, + + # TODO: Write general description for SG_DETRACK + SG_DETRACK = 'SG_DETRACK'.freeze, + + # TODO: Write general description for TRUNKRS_WEBHOOK + TRUNKRS_WEBHOOK = 'TRUNKRS_WEBHOOK'.freeze, + + # TODO: Write general description for MATDESPATCH + MATDESPATCH = 'MATDESPATCH'.freeze, + + # TODO: Write general description for DICOM + DICOM = 'DICOM'.freeze, + + # TODO: Write general description for MBW + MBW = 'MBW'.freeze, + + # TODO: Write general description for KHM_CAMBODIA_POST + KHM_CAMBODIA_POST = 'KHM_CAMBODIA_POST'.freeze, + + # TODO: Write general description for SINOTRANS + SINOTRANS = 'SINOTRANS'.freeze, + + # TODO: Write general description for BRT_IT_PARCELID + BRT_IT_PARCELID = 'BRT_IT_PARCELID'.freeze, + + # TODO: Write general description for DHL_SUPPLY_CHAIN + DHL_SUPPLY_CHAIN = 'DHL_SUPPLY_CHAIN'.freeze, + + # TODO: Write general description for DHL_PL + DHL_PL = 'DHL_PL'.freeze, + + # TODO: Write general description for TOPYOU + TOPYOU = 'TOPYOU'.freeze, + + # TODO: Write general description for PALEXPRESS + PALEXPRESS = 'PALEXPRESS'.freeze, + + # TODO: Write general description for DHL_SG + DHL_SG = 'DHL_SG'.freeze, + + # TODO: Write general description for CN_WEDO + CN_WEDO = 'CN_WEDO'.freeze, + + # TODO: Write general description for FULFILLME + FULFILLME = 'FULFILLME'.freeze, + + # TODO: Write general description for DPD_DELISTRACK + DPD_DELISTRACK = 'DPD_DELISTRACK'.freeze, + + # TODO: Write general description for UPS_REFERENCE + UPS_REFERENCE = 'UPS_REFERENCE'.freeze, + + # TODO: Write general description for CARIBOU + CARIBOU = 'CARIBOU'.freeze, + + # TODO: Write general description for LOCUS_WEBHOOK + LOCUS_WEBHOOK = 'LOCUS_WEBHOOK'.freeze, + + # TODO: Write general description for DSV + DSV = 'DSV'.freeze, + + # TODO: Write general description for CN_GOFLY + CN_GOFLY = 'CN_GOFLY'.freeze, + + # TODO: Write general description for P2P_TRC + P2P_TRC = 'P2P_TRC'.freeze, + + # TODO: Write general description for DIRECTPARCELS + DIRECTPARCELS = 'DIRECTPARCELS'.freeze, + + # TODO: Write general description for NOVA_POSHTA_INT + NOVA_POSHTA_INT = 'NOVA_POSHTA_INT'.freeze, + + # TODO: Write general description for FEDEX_POLAND + FEDEX_POLAND = 'FEDEX_POLAND'.freeze, + + # TODO: Write general description for CN_JCEX + CN_JCEX = 'CN_JCEX'.freeze, + + # TODO: Write general description for FAR_INTERNATIONAL + FAR_INTERNATIONAL = 'FAR_INTERNATIONAL'.freeze, + + # TODO: Write general description for IDEXPRESS + IDEXPRESS = 'IDEXPRESS'.freeze, + + # TODO: Write general description for GANGBAO + GANGBAO = 'GANGBAO'.freeze, + + # TODO: Write general description for NEWAY + NEWAY = 'NEWAY'.freeze, + + # TODO: Write general description for POSTNL_INT_3_S + POSTNL_INT_3_S = 'POSTNL_INT_3_S'.freeze, + + # TODO: Write general description for RPX_ID + RPX_ID = 'RPX_ID'.freeze, + + # TODO: Write general description for DESIGNERTRANSPORT_WEBHOOK + DESIGNERTRANSPORT_WEBHOOK = 'DESIGNERTRANSPORT_WEBHOOK'.freeze, + + # TODO: Write general description for GLS_SLOVEN + GLS_SLOVEN = 'GLS_SLOVEN'.freeze, + + # TODO: Write general description for PARCELLED_IN + PARCELLED_IN = 'PARCELLED_IN'.freeze, + + # TODO: Write general description for GSI_EXPRESS + GSI_EXPRESS = 'GSI_EXPRESS'.freeze, + + # TODO: Write general description for CON_WAY + CON_WAY = 'CON_WAY'.freeze, + + # TODO: Write general description for BROUWER_TRANSPORT + BROUWER_TRANSPORT = 'BROUWER_TRANSPORT'.freeze, + + # TODO: Write general description for CPEX + CPEX = 'CPEX'.freeze, + + # TODO: Write general description for ISRAEL_POST + ISRAEL_POST = 'ISRAEL_POST'.freeze, + + # TODO: Write general description for DTDC_IN + DTDC_IN = 'DTDC_IN'.freeze, + + # TODO: Write general description for PTT_POST + PTT_POST = 'PTT_POST'.freeze, + + # TODO: Write general description for XDE_WEBHOOK + XDE_WEBHOOK = 'XDE_WEBHOOK'.freeze, + + # TODO: Write general description for TOLOS + TOLOS = 'TOLOS'.freeze, + + # TODO: Write general description for GIAO_HANG + GIAO_HANG = 'GIAO_HANG'.freeze, + + # TODO: Write general description for GEODIS_ESPACE + GEODIS_ESPACE = 'GEODIS_ESPACE'.freeze, + + # TODO: Write general description for MAGYAR_HU + MAGYAR_HU = 'MAGYAR_HU'.freeze, + + # TODO: Write general description for DOORDASH_WEBHOOK + DOORDASH_WEBHOOK = 'DOORDASH_WEBHOOK'.freeze, + + # TODO: Write general description for TIKI_ID + TIKI_ID = 'TIKI_ID'.freeze, + + # TODO: Write general description for CJ_HK_INTERNATIONAL + CJ_HK_INTERNATIONAL = 'CJ_HK_INTERNATIONAL'.freeze, + + # TODO: Write general description for STAR_TRACK_EXPRESS + STAR_TRACK_EXPRESS = 'STAR_TRACK_EXPRESS'.freeze, + + # TODO: Write general description for HELTHJEM + HELTHJEM = 'HELTHJEM'.freeze, + + # TODO: Write general description for SFB2C + SFB2C = 'SFB2C'.freeze, + + # TODO: Write general description for FREIGHTQUOTE + FREIGHTQUOTE = 'FREIGHTQUOTE'.freeze, + + # TODO: Write general description for LANDMARK_GLOBAL_REFERENCE + LANDMARK_GLOBAL_REFERENCE = 'LANDMARK_GLOBAL_REFERENCE'.freeze, + + # TODO: Write general description for PARCEL2GO + PARCEL2GO = 'PARCEL2GO'.freeze, + + # TODO: Write general description for DELNEXT + DELNEXT = 'DELNEXT'.freeze, + + # TODO: Write general description for RCL + RCL = 'RCL'.freeze, + + # TODO: Write general description for CGS_EXPRESS + CGS_EXPRESS = 'CGS_EXPRESS'.freeze, + + # TODO: Write general description for HK_POST + HK_POST = 'HK_POST'.freeze, + + # TODO: Write general description for SAP_EXPRESS + SAP_EXPRESS = 'SAP_EXPRESS'.freeze, + + # TODO: Write general description for PARCELPOST_SG + PARCELPOST_SG = 'PARCELPOST_SG'.freeze, + + # TODO: Write general description for HERMES + HERMES = 'HERMES'.freeze, + + # TODO: Write general description for IND_SAFEEXPRESS + IND_SAFEEXPRESS = 'IND_SAFEEXPRESS'.freeze, + + # TODO: Write general description for TOPHATTEREXPRESS + TOPHATTEREXPRESS = 'TOPHATTEREXPRESS'.freeze, + + # TODO: Write general description for MGLOBAL + MGLOBAL = 'MGLOBAL'.freeze, + + # TODO: Write general description for AVERITT + AVERITT = 'AVERITT'.freeze, + + # TODO: Write general description for LEADER + LEADER = 'LEADER'.freeze, + + # TODO: Write general description for _2EBOX + _2EBOX = '_2EBOX'.freeze, + + # TODO: Write general description for SG_SPEEDPOST + SG_SPEEDPOST = 'SG_SPEEDPOST'.freeze, + + # TODO: Write general description for DBSCHENKER_SE + DBSCHENKER_SE = 'DBSCHENKER_SE'.freeze, + + # TODO: Write general description for ISR_POST_DOMESTIC + ISR_POST_DOMESTIC = 'ISR_POST_DOMESTIC'.freeze, + + # TODO: Write general description for BESTWAYPARCEL + BESTWAYPARCEL = 'BESTWAYPARCEL'.freeze, + + # TODO: Write general description for ASENDIA_DE + ASENDIA_DE = 'ASENDIA_DE'.freeze, + + # TODO: Write general description for NIGHTLINE_UK + NIGHTLINE_UK = 'NIGHTLINE_UK'.freeze, + + # TODO: Write general description for TAQBIN_SG + TAQBIN_SG = 'TAQBIN_SG'.freeze, + + # TODO: Write general description for TCK_EXPRESS + TCK_EXPRESS = 'TCK_EXPRESS'.freeze, + + # TODO: Write general description for ENDEAVOUR_DELIVERY + ENDEAVOUR_DELIVERY = 'ENDEAVOUR_DELIVERY'.freeze, + + # TODO: Write general description for NANJINGWOYUAN + NANJINGWOYUAN = 'NANJINGWOYUAN'.freeze, + + # TODO: Write general description for HEPPNER_FR + HEPPNER_FR = 'HEPPNER_FR'.freeze, + + # TODO: Write general description for EMPS_CN + EMPS_CN = 'EMPS_CN'.freeze, + + # TODO: Write general description for FONSEN + FONSEN = 'FONSEN'.freeze, + + # TODO: Write general description for PICKRR + PICKRR = 'PICKRR'.freeze, + + # TODO: Write general description for APC_OVERNIGHT_CONNUM + APC_OVERNIGHT_CONNUM = 'APC_OVERNIGHT_CONNUM'.freeze, + + # TODO: Write general description for STAR_TRACK_NEXT_FLIGHT + STAR_TRACK_NEXT_FLIGHT = 'STAR_TRACK_NEXT_FLIGHT'.freeze, + + # TODO: Write general description for DAJIN + DAJIN = 'DAJIN'.freeze, + + # TODO: Write general description for UPS_FREIGHT + UPS_FREIGHT = 'UPS_FREIGHT'.freeze, + + # TODO: Write general description for POSTA_PLUS + POSTA_PLUS = 'POSTA_PLUS'.freeze, + + # TODO: Write general description for CEVA + CEVA = 'CEVA'.freeze, + + # TODO: Write general description for ANSERX + ANSERX = 'ANSERX'.freeze, + + # TODO: Write general description for JS_EXPRESS + JS_EXPRESS = 'JS_EXPRESS'.freeze, + + # TODO: Write general description for PADTF + PADTF = 'PADTF'.freeze, + + # TODO: Write general description for UPS_MAIL_INNOVATIONS + UPS_MAIL_INNOVATIONS = 'UPS_MAIL_INNOVATIONS'.freeze, + + # TODO: Write general description for EZSHIP + EZSHIP = 'EZSHIP'.freeze, + + # TODO: Write general description for SYPOST + SYPOST = 'SYPOST'.freeze, + + # TODO: Write general description for AMAZON_SHIP_MCF + AMAZON_SHIP_MCF = 'AMAZON_SHIP_MCF'.freeze, + + # TODO: Write general description for YUSEN + YUSEN = 'YUSEN'.freeze, + + # TODO: Write general description for BRING + BRING = 'BRING'.freeze, + + # TODO: Write general description for SDA_IT + SDA_IT = 'SDA_IT'.freeze, + + # TODO: Write general description for GBA + GBA = 'GBA'.freeze, + + # TODO: Write general description for NEWEGGEXPRESS + NEWEGGEXPRESS = 'NEWEGGEXPRESS'.freeze, + + # TODO: Write general description for SPEEDCOURIERS_GR + SPEEDCOURIERS_GR = 'SPEEDCOURIERS_GR'.freeze, + + # TODO: Write general description for FORRUN + FORRUN = 'FORRUN'.freeze, + + # TODO: Write general description for PICKUP + PICKUP = 'PICKUP'.freeze, + + # TODO: Write general description for ECMS + ECMS = 'ECMS'.freeze, + + # TODO: Write general description for INTELIPOST + INTELIPOST = 'INTELIPOST'.freeze, + + # TODO: Write general description for FLASHEXPRESS + FLASHEXPRESS = 'FLASHEXPRESS'.freeze, + + # TODO: Write general description for CN_STO + CN_STO = 'CN_STO'.freeze, + + # TODO: Write general description for SEKO_SFTP + SEKO_SFTP = 'SEKO_SFTP'.freeze, + + # TODO: Write general description for HOME_DELIVERY_SOLUTIONS + HOME_DELIVERY_SOLUTIONS = 'HOME_DELIVERY_SOLUTIONS'.freeze, + + # TODO: Write general description for DPD_HGRY + DPD_HGRY = 'DPD_HGRY'.freeze, + + # TODO: Write general description for KERRYTTC_VN + KERRYTTC_VN = 'KERRYTTC_VN'.freeze, + + # TODO: Write general description for JOYING_BOX + JOYING_BOX = 'JOYING_BOX'.freeze, + + # TODO: Write general description for TOTAL_EXPRESS + TOTAL_EXPRESS = 'TOTAL_EXPRESS'.freeze, + + # TODO: Write general description for ZJS_EXPRESS + ZJS_EXPRESS = 'ZJS_EXPRESS'.freeze, + + # TODO: Write general description for STARKEN + STARKEN = 'STARKEN'.freeze, + + # TODO: Write general description for DEMANDSHIP + DEMANDSHIP = 'DEMANDSHIP'.freeze, + + # TODO: Write general description for CN_DPEX + CN_DPEX = 'CN_DPEX'.freeze, + + # TODO: Write general description for AUPOST_CN + AUPOST_CN = 'AUPOST_CN'.freeze, + + # TODO: Write general description for LOGISTERS + LOGISTERS = 'LOGISTERS'.freeze, + + # TODO: Write general description for GOGLOBALPOST + GOGLOBALPOST = 'GOGLOBALPOST'.freeze, + + # TODO: Write general description for GLS_CZ + GLS_CZ = 'GLS_CZ'.freeze, + + # TODO: Write general description for PAACK_WEBHOOK + PAACK_WEBHOOK = 'PAACK_WEBHOOK'.freeze, + + # TODO: Write general description for GRAB_WEBHOOK + GRAB_WEBHOOK = 'GRAB_WEBHOOK'.freeze, + + # TODO: Write general description for PARCELPOINT + PARCELPOINT = 'PARCELPOINT'.freeze, + + # TODO: Write general description for ICUMULUS + ICUMULUS = 'ICUMULUS'.freeze, + + # TODO: Write general description for DAIGLOBALTRACK + DAIGLOBALTRACK = 'DAIGLOBALTRACK'.freeze, + + # TODO: Write general description for GLOBAL_IPARCEL + GLOBAL_IPARCEL = 'GLOBAL_IPARCEL'.freeze, + + # TODO: Write general description for YURTICI_KARGO + YURTICI_KARGO = 'YURTICI_KARGO'.freeze, + + # TODO: Write general description for CN_PAYPAL_PACKAGE + CN_PAYPAL_PACKAGE = 'CN_PAYPAL_PACKAGE'.freeze, + + # TODO: Write general description for PARCEL_2_POST + PARCEL_2_POST = 'PARCEL_2_POST'.freeze, + + # TODO: Write general description for GLS_IT + GLS_IT = 'GLS_IT'.freeze, + + # TODO: Write general description for PIL_LOGISTICS + PIL_LOGISTICS = 'PIL_LOGISTICS'.freeze, + + # TODO: Write general description for HEPPNER + HEPPNER = 'HEPPNER'.freeze, + + # TODO: Write general description for GENERAL_OVERNIGHT + GENERAL_OVERNIGHT = 'GENERAL_OVERNIGHT'.freeze, + + # TODO: Write general description for HAPPY2POINT + HAPPY2POINT = 'HAPPY2POINT'.freeze, + + # TODO: Write general description for CHITCHATS + CHITCHATS = 'CHITCHATS'.freeze, + + # TODO: Write general description for SMOOTH + SMOOTH = 'SMOOTH'.freeze, + + # TODO: Write general description for CLE_LOGISTICS + CLE_LOGISTICS = 'CLE_LOGISTICS'.freeze, + + # TODO: Write general description for FIEGE + FIEGE = 'FIEGE'.freeze, + + # TODO: Write general description for MX_CARGO + MX_CARGO = 'MX_CARGO'.freeze, + + # TODO: Write general description for ZIINGFINALMILE + ZIINGFINALMILE = 'ZIINGFINALMILE'.freeze, + + # TODO: Write general description for DAYTON_FREIGHT + DAYTON_FREIGHT = 'DAYTON_FREIGHT'.freeze, + + # TODO: Write general description for TCS + TCS = 'TCS'.freeze, + + # TODO: Write general description for AEX + AEX = 'AEX'.freeze, + + # TODO: Write general description for HERMES_DE + HERMES_DE = 'HERMES_DE'.freeze, + + # TODO: Write general description for ROUTIFIC_WEBHOOK + ROUTIFIC_WEBHOOK = 'ROUTIFIC_WEBHOOK'.freeze, + + # TODO: Write general description for GLOBAVEND + GLOBAVEND = 'GLOBAVEND'.freeze, + + # TODO: Write general description for CJ_LOGISTICS + CJ_LOGISTICS = 'CJ_LOGISTICS'.freeze, + + # TODO: Write general description for PALLET_NETWORK + PALLET_NETWORK = 'PALLET_NETWORK'.freeze, + + # TODO: Write general description for RAF_PH + RAF_PH = 'RAF_PH'.freeze, + + # TODO: Write general description for UK_XDP + UK_XDP = 'UK_XDP'.freeze, + + # TODO: Write general description for PAPER_EXPRESS + PAPER_EXPRESS = 'PAPER_EXPRESS'.freeze, + + # TODO: Write general description for LA_POSTE_SUIVI + LA_POSTE_SUIVI = 'LA_POSTE_SUIVI'.freeze, + + # TODO: Write general description for PAQUETEXPRESS + PAQUETEXPRESS = 'PAQUETEXPRESS'.freeze, + + # TODO: Write general description for LIEFERY + LIEFERY = 'LIEFERY'.freeze, + + # TODO: Write general description for STRECK_TRANSPORT + STRECK_TRANSPORT = 'STRECK_TRANSPORT'.freeze, + + # TODO: Write general description for PONY_EXPRESS + PONY_EXPRESS = 'PONY_EXPRESS'.freeze, + + # TODO: Write general description for ALWAYS_EXPRESS + ALWAYS_EXPRESS = 'ALWAYS_EXPRESS'.freeze, + + # TODO: Write general description for GBS_BROKER + GBS_BROKER = 'GBS_BROKER'.freeze, + + # TODO: Write general description for CITYLINK_MY + CITYLINK_MY = 'CITYLINK_MY'.freeze, + + # TODO: Write general description for ALLJOY + ALLJOY = 'ALLJOY'.freeze, + + # TODO: Write general description for YODEL + YODEL = 'YODEL'.freeze, + + # TODO: Write general description for YODEL_DIR + YODEL_DIR = 'YODEL_DIR'.freeze, + + # TODO: Write general description for STONE3PL + STONE3PL = 'STONE3PL'.freeze, + + # TODO: Write general description for PARCELPAL_WEBHOOK + PARCELPAL_WEBHOOK = 'PARCELPAL_WEBHOOK'.freeze, + + # TODO: Write general description for DHL_ECOMERCE_ASA + DHL_ECOMERCE_ASA = 'DHL_ECOMERCE_ASA'.freeze, + + # TODO: Write general description for SIMPLYPOST + SIMPLYPOST = 'SIMPLYPOST'.freeze, + + # TODO: Write general description for KY_EXPRESS + KY_EXPRESS = 'KY_EXPRESS'.freeze, + + # TODO: Write general description for SHENZHEN + SHENZHEN = 'SHENZHEN'.freeze, + + # TODO: Write general description for US_LASERSHIP + US_LASERSHIP = 'US_LASERSHIP'.freeze, + + # TODO: Write general description for UC_EXPRE + UC_EXPRE = 'UC_EXPRE'.freeze, + + # TODO: Write general description for DIDADI + DIDADI = 'DIDADI'.freeze, + + # TODO: Write general description for CJ_KR + CJ_KR = 'CJ_KR'.freeze, + + # TODO: Write general description for DBSCHENKER_B2B + DBSCHENKER_B2B = 'DBSCHENKER_B2B'.freeze, + + # TODO: Write general description for MXE + MXE = 'MXE'.freeze, + + # TODO: Write general description for CAE_DELIVERS + CAE_DELIVERS = 'CAE_DELIVERS'.freeze, + + # TODO: Write general description for PFCEXPRESS + PFCEXPRESS = 'PFCEXPRESS'.freeze, + + # TODO: Write general description for WHISTL + WHISTL = 'WHISTL'.freeze, + + # TODO: Write general description for WEPOST + WEPOST = 'WEPOST'.freeze, + + # TODO: Write general description for DHL_PARCEL_ES + DHL_PARCEL_ES = 'DHL_PARCEL_ES'.freeze, + + # TODO: Write general description for DDEXPRESS + DDEXPRESS = 'DDEXPRESS'.freeze, + + # TODO: Write general description for ARAMEX_AU + ARAMEX_AU = 'ARAMEX_AU'.freeze, + + # TODO: Write general description for BNEED + BNEED = 'BNEED'.freeze, + + # TODO: Write general description for HK_TGX + HK_TGX = 'HK_TGX'.freeze, + + # TODO: Write general description for LATVIJAS_PASTS + LATVIJAS_PASTS = 'LATVIJAS_PASTS'.freeze, + + # TODO: Write general description for VIAEUROPE + VIAEUROPE = 'VIAEUROPE'.freeze, + + # TODO: Write general description for CORREO_UY + CORREO_UY = 'CORREO_UY'.freeze, + + # TODO: Write general description for CHRONOPOST_FR + CHRONOPOST_FR = 'CHRONOPOST_FR'.freeze, + + # TODO: Write general description for J_NET + J_NET = 'J_NET'.freeze, + + # TODO: Write general description for _6LS + _6LS = '_6LS'.freeze, + + # TODO: Write general description for BLR_BELPOST + BLR_BELPOST = 'BLR_BELPOST'.freeze, + + # TODO: Write general description for BIRDSYSTEM + BIRDSYSTEM = 'BIRDSYSTEM'.freeze, + + # TODO: Write general description for DOBROPOST + DOBROPOST = 'DOBROPOST'.freeze, + + # TODO: Write general description for WAHANA_ID + WAHANA_ID = 'WAHANA_ID'.freeze, + + # TODO: Write general description for WEASHIP + WEASHIP = 'WEASHIP'.freeze, + + # TODO: Write general description for SONICTL + SONICTL = 'SONICTL'.freeze, + + # TODO: Write general description for KWT + KWT = 'KWT'.freeze, + + # TODO: Write general description for AFLLOG_FTP + AFLLOG_FTP = 'AFLLOG_FTP'.freeze, + + # TODO: Write general description for SKYNET_WORLDWIDE + SKYNET_WORLDWIDE = 'SKYNET_WORLDWIDE'.freeze, + + # TODO: Write general description for NOVA_POSHTA + NOVA_POSHTA = 'NOVA_POSHTA'.freeze, + + # TODO: Write general description for SEINO + SEINO = 'SEINO'.freeze, + + # TODO: Write general description for SZENDEX + SZENDEX = 'SZENDEX'.freeze, + + # TODO: Write general description for BPOST_INT + BPOST_INT = 'BPOST_INT'.freeze, + + # TODO: Write general description for DBSCHENKER_SV + DBSCHENKER_SV = 'DBSCHENKER_SV'.freeze, + + # TODO: Write general description for AO_DEUTSCHLAND + AO_DEUTSCHLAND = 'AO_DEUTSCHLAND'.freeze, + + # TODO: Write general description for EU_FLEET_SOLUTIONS + EU_FLEET_SOLUTIONS = 'EU_FLEET_SOLUTIONS'.freeze, + + # TODO: Write general description for PCFCORP + PCFCORP = 'PCFCORP'.freeze, + + # TODO: Write general description for LINKBRIDGE + LINKBRIDGE = 'LINKBRIDGE'.freeze, + + # TODO: Write general description for PRIMAMULTICIPTA + PRIMAMULTICIPTA = 'PRIMAMULTICIPTA'.freeze, + + # TODO: Write general description for COUREX + COUREX = 'COUREX'.freeze, + + # TODO: Write general description for ZAJIL_EXPRESS + ZAJIL_EXPRESS = 'ZAJIL_EXPRESS'.freeze, + + # TODO: Write general description for COLLECTCO + COLLECTCO = 'COLLECTCO'.freeze, + + # TODO: Write general description for JTEXPRESS + JTEXPRESS = 'JTEXPRESS'.freeze, + + # TODO: Write general description for FEDEX_UK + FEDEX_UK = 'FEDEX_UK'.freeze, + + # TODO: Write general description for USHIP + USHIP = 'USHIP'.freeze, + + # TODO: Write general description for PIXSELL + PIXSELL = 'PIXSELL'.freeze, + + # TODO: Write general description for SHIPTOR + SHIPTOR = 'SHIPTOR'.freeze, + + # TODO: Write general description for CDEK + CDEK = 'CDEK'.freeze, + + # TODO: Write general description for VNM_VIETTELPOST + VNM_VIETTELPOST = 'VNM_VIETTELPOST'.freeze, + + # TODO: Write general description for CJ_CENTURY + CJ_CENTURY = 'CJ_CENTURY'.freeze, + + # TODO: Write general description for GSO + GSO = 'GSO'.freeze, + + # TODO: Write general description for VIWO + VIWO = 'VIWO'.freeze, + + # TODO: Write general description for SKYBOX + SKYBOX = 'SKYBOX'.freeze, + + # TODO: Write general description for KERRYTJ + KERRYTJ = 'KERRYTJ'.freeze, + + # TODO: Write general description for NTLOGISTICS_VN + NTLOGISTICS_VN = 'NTLOGISTICS_VN'.freeze, + + # TODO: Write general description for SDH_SCM + SDH_SCM = 'SDH_SCM'.freeze, + + # TODO: Write general description for ZINC + ZINC = 'ZINC'.freeze, + + # TODO: Write general description for DPE_SOUTH_AFRC + DPE_SOUTH_AFRC = 'DPE_SOUTH_AFRC'.freeze, + + # TODO: Write general description for CESKA_CZ + CESKA_CZ = 'CESKA_CZ'.freeze, + + # TODO: Write general description for ACS_GR + ACS_GR = 'ACS_GR'.freeze, + + # TODO: Write general description for DEALERSEND + DEALERSEND = 'DEALERSEND'.freeze, + + # TODO: Write general description for JOCOM + JOCOM = 'JOCOM'.freeze, + + # TODO: Write general description for CSE + CSE = 'CSE'.freeze, + + # TODO: Write general description for TFORCE_FINALMILE + TFORCE_FINALMILE = 'TFORCE_FINALMILE'.freeze, + + # TODO: Write general description for SHIP_GATE + SHIP_GATE = 'SHIP_GATE'.freeze, + + # TODO: Write general description for SHIPTER + SHIPTER = 'SHIPTER'.freeze, + + # TODO: Write general description for NATIONAL_SAMEDAY + NATIONAL_SAMEDAY = 'NATIONAL_SAMEDAY'.freeze, + + # TODO: Write general description for YUNEXPRESS + YUNEXPRESS = 'YUNEXPRESS'.freeze, + + # TODO: Write general description for CAINIAO + CAINIAO = 'CAINIAO'.freeze, + + # TODO: Write general description for DMS_MATRIX + DMS_MATRIX = 'DMS_MATRIX'.freeze, + + # TODO: Write general description for DIRECTLOG + DIRECTLOG = 'DIRECTLOG'.freeze, + + # TODO: Write general description for ASENDIA_US + ASENDIA_US = 'ASENDIA_US'.freeze, + + # TODO: Write general description for _3JMSLOGISTICS + _3JMSLOGISTICS = '_3JMSLOGISTICS'.freeze, + + # TODO: Write general description for LICCARDI_EXPRESS + LICCARDI_EXPRESS = 'LICCARDI_EXPRESS'.freeze, + + # TODO: Write general description for SKY_POSTAL + SKY_POSTAL = 'SKY_POSTAL'.freeze, + + # TODO: Write general description for CNWANGTONG + CNWANGTONG = 'CNWANGTONG'.freeze, + + # TODO: Write general description for POSTNORD_LOGISTICS_DK + POSTNORD_LOGISTICS_DK = 'POSTNORD_LOGISTICS_DK'.freeze, + + # TODO: Write general description for LOGISTIKA + LOGISTIKA = 'LOGISTIKA'.freeze, + + # TODO: Write general description for CELERITAS + CELERITAS = 'CELERITAS'.freeze, + + # TODO: Write general description for PRESSIODE + PRESSIODE = 'PRESSIODE'.freeze, + + # TODO: Write general description for SHREE_MARUTI + SHREE_MARUTI = 'SHREE_MARUTI'.freeze, + + # TODO: Write general description for LOGISTICSWORLDWIDE_HK + LOGISTICSWORLDWIDE_HK = 'LOGISTICSWORLDWIDE_HK'.freeze, + + # TODO: Write general description for EFEX + EFEX = 'EFEX'.freeze, + + # TODO: Write general description for LOTTE + LOTTE = 'LOTTE'.freeze, + + # TODO: Write general description for LONESTAR + LONESTAR = 'LONESTAR'.freeze, + + # TODO: Write general description for APRISAEXPRESS + APRISAEXPRESS = 'APRISAEXPRESS'.freeze, + + # TODO: Write general description for BEL_RS + BEL_RS = 'BEL_RS'.freeze, + + # TODO: Write general description for OSM_WORLDWIDE + OSM_WORLDWIDE = 'OSM_WORLDWIDE'.freeze, + + # TODO: Write general description for WESTGATE_GL + WESTGATE_GL = 'WESTGATE_GL'.freeze, + + # TODO: Write general description for FASTRACK + FASTRACK = 'FASTRACK'.freeze, + + # TODO: Write general description for DTD_EXPR + DTD_EXPR = 'DTD_EXPR'.freeze, + + # TODO: Write general description for ALFATREX + ALFATREX = 'ALFATREX'.freeze, + + # TODO: Write general description for PROMEDDELIVERY + PROMEDDELIVERY = 'PROMEDDELIVERY'.freeze, + + # TODO: Write general description for THABIT_LOGISTICS + THABIT_LOGISTICS = 'THABIT_LOGISTICS'.freeze, + + # TODO: Write general description for HCT_LOGISTICS + HCT_LOGISTICS = 'HCT_LOGISTICS'.freeze, + + # TODO: Write general description for CARRY_FLAP + CARRY_FLAP = 'CARRY_FLAP'.freeze, + + # TODO: Write general description for US_OLD_DOMINION + US_OLD_DOMINION = 'US_OLD_DOMINION'.freeze, + + # TODO: Write general description for ANICAM_BOX + ANICAM_BOX = 'ANICAM_BOX'.freeze, + + # TODO: Write general description for WANBEXPRESS + WANBEXPRESS = 'WANBEXPRESS'.freeze, + + # TODO: Write general description for AN_POST + AN_POST = 'AN_POST'.freeze, + + # TODO: Write general description for DPD_LOCAL + DPD_LOCAL = 'DPD_LOCAL'.freeze, + + # TODO: Write general description for STALLIONEXPRESS + STALLIONEXPRESS = 'STALLIONEXPRESS'.freeze, + + # TODO: Write general description for RAIDEREX + RAIDEREX = 'RAIDEREX'.freeze, + + # TODO: Write general description for SHOPFANS + SHOPFANS = 'SHOPFANS'.freeze, + + # TODO: Write general description for KYUNGDONG_PARCEL + KYUNGDONG_PARCEL = 'KYUNGDONG_PARCEL'.freeze, + + # TODO: Write general description for CHAMPION_LOGISTICS + CHAMPION_LOGISTICS = 'CHAMPION_LOGISTICS'.freeze, + + # TODO: Write general description for PICKUPP_SGP + PICKUPP_SGP = 'PICKUPP_SGP'.freeze, + + # TODO: Write general description for MORNING_EXPRESS + MORNING_EXPRESS = 'MORNING_EXPRESS'.freeze, + + # TODO: Write general description for NACEX + NACEX = 'NACEX'.freeze, + + # TODO: Write general description for THENILE_WEBHOOK + THENILE_WEBHOOK = 'THENILE_WEBHOOK'.freeze, + + # TODO: Write general description for HOLISOL + HOLISOL = 'HOLISOL'.freeze, + + # TODO: Write general description for LBCEXPRESS_FTP + LBCEXPRESS_FTP = 'LBCEXPRESS_FTP'.freeze, + + # TODO: Write general description for KURASI + KURASI = 'KURASI'.freeze, + + # TODO: Write general description for USF_REDDAWAY + USF_REDDAWAY = 'USF_REDDAWAY'.freeze, + + # TODO: Write general description for APG + APG = 'APG'.freeze, + + # TODO: Write general description for CN_BOXC + CN_BOXC = 'CN_BOXC'.freeze, + + # TODO: Write general description for ECOSCOOTING + ECOSCOOTING = 'ECOSCOOTING'.freeze, + + # TODO: Write general description for MAINWAY + MAINWAY = 'MAINWAY'.freeze, + + # TODO: Write general description for PAPERFLY + PAPERFLY = 'PAPERFLY'.freeze, + + # TODO: Write general description for HOUNDEXPRESS + HOUNDEXPRESS = 'HOUNDEXPRESS'.freeze, + + # TODO: Write general description for BOX_BERRY + BOX_BERRY = 'BOX_BERRY'.freeze, + + # TODO: Write general description for EP_BOX + EP_BOX = 'EP_BOX'.freeze, + + # TODO: Write general description for PLUS_LOG_UK + PLUS_LOG_UK = 'PLUS_LOG_UK'.freeze, + + # TODO: Write general description for FULFILLA + FULFILLA = 'FULFILLA'.freeze, + + # TODO: Write general description for ASE + ASE = 'ASE'.freeze, + + # TODO: Write general description for MAIL_PLUS + MAIL_PLUS = 'MAIL_PLUS'.freeze, + + # TODO: Write general description for XPO_LOGISTICS + XPO_LOGISTICS = 'XPO_LOGISTICS'.freeze, + + # TODO: Write general description for WNDIRECT + WNDIRECT = 'WNDIRECT'.freeze, + + # TODO: Write general description for CLOUDWISH_ASIA + CLOUDWISH_ASIA = 'CLOUDWISH_ASIA'.freeze, + + # TODO: Write general description for ZELERIS + ZELERIS = 'ZELERIS'.freeze, + + # TODO: Write general description for GIO_EXPRESS + GIO_EXPRESS = 'GIO_EXPRESS'.freeze, + + # TODO: Write general description for OCS_WORLDWIDE + OCS_WORLDWIDE = 'OCS_WORLDWIDE'.freeze, + + # TODO: Write general description for ARK_LOGISTICS + ARK_LOGISTICS = 'ARK_LOGISTICS'.freeze, + + # TODO: Write general description for AQUILINE + AQUILINE = 'AQUILINE'.freeze, + + # TODO: Write general description for PILOT_FREIGHT + PILOT_FREIGHT = 'PILOT_FREIGHT'.freeze, + + # TODO: Write general description for QWINTRY + QWINTRY = 'QWINTRY'.freeze, + + # TODO: Write general description for DANSKE_FRAGT + DANSKE_FRAGT = 'DANSKE_FRAGT'.freeze, + + # TODO: Write general description for CARRIERS + CARRIERS = 'CARRIERS'.freeze, + + # TODO: Write general description for AIR_CANADA_GLOBAL + AIR_CANADA_GLOBAL = 'AIR_CANADA_GLOBAL'.freeze, + + # TODO: Write general description for PRESIDENT_TRANS + PRESIDENT_TRANS = 'PRESIDENT_TRANS'.freeze, + + # TODO: Write general description for STEPFORWARDFS + STEPFORWARDFS = 'STEPFORWARDFS'.freeze, + + # TODO: Write general description for SKYNET_UK + SKYNET_UK = 'SKYNET_UK'.freeze, + + # TODO: Write general description for PITTOHIO + PITTOHIO = 'PITTOHIO'.freeze, + + # TODO: Write general description for CORREOS_EXPRESS + CORREOS_EXPRESS = 'CORREOS_EXPRESS'.freeze, + + # TODO: Write general description for RL_US + RL_US = 'RL_US'.freeze, + + # TODO: Write general description for MARA_XPRESS + MARA_XPRESS = 'MARA_XPRESS'.freeze, + + # TODO: Write general description for DESTINY + DESTINY = 'DESTINY'.freeze, + + # TODO: Write general description for UK_YODEL + UK_YODEL = 'UK_YODEL'.freeze, + + # TODO: Write general description for COMET_TECH + COMET_TECH = 'COMET_TECH'.freeze, + + # TODO: Write general description for DHL_PARCEL_RU + DHL_PARCEL_RU = 'DHL_PARCEL_RU'.freeze, + + # TODO: Write general description for TNT_REFR + TNT_REFR = 'TNT_REFR'.freeze, + + # TODO: Write general description for SHREE_ANJANI_COURIER + SHREE_ANJANI_COURIER = 'SHREE_ANJANI_COURIER'.freeze, + + # TODO: Write general description for MIKROPAKKET_BE + MIKROPAKKET_BE = 'MIKROPAKKET_BE'.freeze, + + # TODO: Write general description for ETS_EXPRESS + ETS_EXPRESS = 'ETS_EXPRESS'.freeze, + + # TODO: Write general description for COLIS_PRIVE + COLIS_PRIVE = 'COLIS_PRIVE'.freeze, + + # TODO: Write general description for CN_YUNDA + CN_YUNDA = 'CN_YUNDA'.freeze, + + # TODO: Write general description for AAA_COOPER + AAA_COOPER = 'AAA_COOPER'.freeze, + + # TODO: Write general description for ROCKET_PARCEL + ROCKET_PARCEL = 'ROCKET_PARCEL'.freeze, + + # TODO: Write general description for _360LION + _360LION = '_360LION'.freeze, + + # TODO: Write general description for PANDU + PANDU = 'PANDU'.freeze, + + # TODO: Write general description for PROFESSIONAL_COURIERS + PROFESSIONAL_COURIERS = 'PROFESSIONAL_COURIERS'.freeze, + + # TODO: Write general description for FLYTEXPRESS + FLYTEXPRESS = 'FLYTEXPRESS'.freeze, + + # TODO: Write general description for LOGISTICSWORLDWIDE_MY + LOGISTICSWORLDWIDE_MY = 'LOGISTICSWORLDWIDE_MY'.freeze, + + # TODO: Write general description for CORREOS_DE_ESPANA + CORREOS_DE_ESPANA = 'CORREOS_DE_ESPANA'.freeze, + + # TODO: Write general description for IMX + IMX = 'IMX'.freeze, + + # TODO: Write general description for FOUR_PX_EXPRESS + FOUR_PX_EXPRESS = 'FOUR_PX_EXPRESS'.freeze, + + # TODO: Write general description for XPRESSBEES + XPRESSBEES = 'XPRESSBEES'.freeze, + + # TODO: Write general description for PICKUPP_VNM + PICKUPP_VNM = 'PICKUPP_VNM'.freeze, + + # TODO: Write general description for STARTRACK_EXPRESS1 + STARTRACK_EXPRESS1 = 'STARTRACK_EXPRESS'.freeze, + + # TODO: Write general description for FR_COLISSIMO + FR_COLISSIMO = 'FR_COLISSIMO'.freeze, + + # TODO: Write general description for NACEX_SPAIN_REFERENCE + NACEX_SPAIN_REFERENCE = 'NACEX_SPAIN_REFERENCE'.freeze, + + # TODO: Write general description for DHL_SUPPLY_CHAIN_AU + DHL_SUPPLY_CHAIN_AU = 'DHL_SUPPLY_CHAIN_AU'.freeze, + + # TODO: Write general description for ESHIPPING + ESHIPPING = 'ESHIPPING'.freeze, + + # TODO: Write general description for SHREETIRUPATI + SHREETIRUPATI = 'SHREETIRUPATI'.freeze, + + # TODO: Write general description for HX_EXPRESS + HX_EXPRESS = 'HX_EXPRESS'.freeze, + + # TODO: Write general description for INDOPAKET + INDOPAKET = 'INDOPAKET'.freeze, + + # TODO: Write general description for CN_17POST + CN_17POST = 'CN_17POST'.freeze, + + # TODO: Write general description for K1_EXPRESS + K1_EXPRESS = 'K1_EXPRESS'.freeze, + + # TODO: Write general description for CJ_GLS + CJ_GLS = 'CJ_GLS'.freeze, + + # TODO: Write general description for MYS_GDEX + MYS_GDEX = 'MYS_GDEX'.freeze, + + # TODO: Write general description for NATIONEX + NATIONEX = 'NATIONEX'.freeze, + + # TODO: Write general description for ANJUN + ANJUN = 'ANJUN'.freeze, + + # TODO: Write general description for FARGOOD + FARGOOD = 'FARGOOD'.freeze, + + # TODO: Write general description for SMG_EXPRESS + SMG_EXPRESS = 'SMG_EXPRESS'.freeze, + + # TODO: Write general description for RZYEXPRESS + RZYEXPRESS = 'RZYEXPRESS'.freeze, + + # TODO: Write general description for SEFL + SEFL = 'SEFL'.freeze, + + # TODO: Write general description for TNT_CLICK_IT + TNT_CLICK_IT = 'TNT_CLICK_IT'.freeze, + + # TODO: Write general description for HDB + HDB = 'HDB'.freeze, + + # TODO: Write general description for HIPSHIPPER + HIPSHIPPER = 'HIPSHIPPER'.freeze, + + # TODO: Write general description for RPXLOGISTICS + RPXLOGISTICS = 'RPXLOGISTICS'.freeze, + + # TODO: Write general description for KUEHNE + KUEHNE = 'KUEHNE'.freeze, + + # TODO: Write general description for IT_NEXIVE + IT_NEXIVE = 'IT_NEXIVE'.freeze, + + # TODO: Write general description for PTS + PTS = 'PTS'.freeze, + + # TODO: Write general description for SWISS_POST_FTP + SWISS_POST_FTP = 'SWISS_POST_FTP'.freeze, + + # TODO: Write general description for FASTRK_SERV + FASTRK_SERV = 'FASTRK_SERV'.freeze, + + # TODO: Write general description for _4_72 + _4_72 = '_4_72'.freeze, + + # TODO: Write general description for US_YRC + US_YRC = 'US_YRC'.freeze, + + # TODO: Write general description for POSTNL_INTL_3S + POSTNL_INTL_3S = 'POSTNL_INTL_3S'.freeze, + + # TODO: Write general description for ELIAN_POST + ELIAN_POST = 'ELIAN_POST'.freeze, + + # TODO: Write general description for CUBYN + CUBYN = 'CUBYN'.freeze, + + # TODO: Write general description for SAU_SAUDI_POST + SAU_SAUDI_POST = 'SAU_SAUDI_POST'.freeze, + + # TODO: Write general description for ABXEXPRESS_MY + ABXEXPRESS_MY = 'ABXEXPRESS_MY'.freeze, + + # TODO: Write general description for HUAHAN_EXPRESS + HUAHAN_EXPRESS = 'HUAHAN_EXPRESS'.freeze, + + # TODO: Write general description for IND_JAYONEXPRESS + IND_JAYONEXPRESS = 'IND_JAYONEXPRESS'.freeze, + + # TODO: Write general description for ZES_EXPRESS + ZES_EXPRESS = 'ZES_EXPRESS'.freeze, + + # TODO: Write general description for ZEPTO_EXPRESS + ZEPTO_EXPRESS = 'ZEPTO_EXPRESS'.freeze, + + # TODO: Write general description for SKYNET_ZA + SKYNET_ZA = 'SKYNET_ZA'.freeze, + + # TODO: Write general description for ZEEK_2_DOOR + ZEEK_2_DOOR = 'ZEEK_2_DOOR'.freeze, + + # TODO: Write general description for BLINKLASTMILE + BLINKLASTMILE = 'BLINKLASTMILE'.freeze, + + # TODO: Write general description for POSTA_UKR + POSTA_UKR = 'POSTA_UKR'.freeze, + + # TODO: Write general description for CHROBINSON + CHROBINSON = 'CHROBINSON'.freeze, + + # TODO: Write general description for CN_POST56 + CN_POST56 = 'CN_POST56'.freeze, + + # TODO: Write general description for COURANT_PLUS + COURANT_PLUS = 'COURANT_PLUS'.freeze, + + # TODO: Write general description for SCUDEX_EXPRESS + SCUDEX_EXPRESS = 'SCUDEX_EXPRESS'.freeze, + + # TODO: Write general description for SHIPENTEGRA + SHIPENTEGRA = 'SHIPENTEGRA'.freeze, + + # TODO: Write general description for B_TWO_C_EUROPE + B_TWO_C_EUROPE = 'B_TWO_C_EUROPE'.freeze, + + # TODO: Write general description for COPE + COPE = 'COPE'.freeze, + + # TODO: Write general description for IND_GATI + IND_GATI = 'IND_GATI'.freeze, + + # TODO: Write general description for CN_WISHPOST + CN_WISHPOST = 'CN_WISHPOST'.freeze, + + # TODO: Write general description for NACEX_ES + NACEX_ES = 'NACEX_ES'.freeze, + + # TODO: Write general description for TAQBIN_HK + TAQBIN_HK = 'TAQBIN_HK'.freeze, + + # TODO: Write general description for GLOBALTRANZ + GLOBALTRANZ = 'GLOBALTRANZ'.freeze, + + # TODO: Write general description for HKD + HKD = 'HKD'.freeze, + + # TODO: Write general description for BJSHOMEDELIVERY + BJSHOMEDELIVERY = 'BJSHOMEDELIVERY'.freeze, + + # TODO: Write general description for OMNIVA + OMNIVA = 'OMNIVA'.freeze, + + # TODO: Write general description for SUTTON + SUTTON = 'SUTTON'.freeze, + + # TODO: Write general description for PANTHER_REFERENCE + PANTHER_REFERENCE = 'PANTHER_REFERENCE'.freeze, + + # TODO: Write general description for SFCSERVICE + SFCSERVICE = 'SFCSERVICE'.freeze, + + # TODO: Write general description for LTL + LTL = 'LTL'.freeze, + + # TODO: Write general description for PARKNPARCEL + PARKNPARCEL = 'PARKNPARCEL'.freeze, + + # TODO: Write general description for SPRING_GDS + SPRING_GDS = 'SPRING_GDS'.freeze, + + # TODO: Write general description for ECEXPRESS + ECEXPRESS = 'ECEXPRESS'.freeze, + + # TODO: Write general description for INTERPARCEL_AU + INTERPARCEL_AU = 'INTERPARCEL_AU'.freeze, + + # TODO: Write general description for AGILITY + AGILITY = 'AGILITY'.freeze, + + # TODO: Write general description for XL_EXPRESS + XL_EXPRESS = 'XL_EXPRESS'.freeze, + + # TODO: Write general description for ADERONLINE + ADERONLINE = 'ADERONLINE'.freeze, + + # TODO: Write general description for DIRECTCOURIERS + DIRECTCOURIERS = 'DIRECTCOURIERS'.freeze, + + # TODO: Write general description for PLANZER + PLANZER = 'PLANZER'.freeze, + + # TODO: Write general description for SENDING + SENDING = 'SENDING'.freeze, + + # TODO: Write general description for NINJAVAN_WB + NINJAVAN_WB = 'NINJAVAN_WB'.freeze, + + # TODO: Write general description for NATIONWIDE_MY + NATIONWIDE_MY = 'NATIONWIDE_MY'.freeze, + + # TODO: Write general description for SENDIT + SENDIT = 'SENDIT'.freeze, + + # TODO: Write general description for GB_ARROW + GB_ARROW = 'GB_ARROW'.freeze, + + # TODO: Write general description for IND_GOJAVAS + IND_GOJAVAS = 'IND_GOJAVAS'.freeze, + + # TODO: Write general description for KPOST + KPOST = 'KPOST'.freeze, + + # TODO: Write general description for DHL_FREIGHT + DHL_FREIGHT = 'DHL_FREIGHT'.freeze, + + # TODO: Write general description for BLUECARE + BLUECARE = 'BLUECARE'.freeze, + + # TODO: Write general description for JINDOUYUN + JINDOUYUN = 'JINDOUYUN'.freeze, + + # TODO: Write general description for TRACKON + TRACKON = 'TRACKON'.freeze, + + # TODO: Write general description for GB_TUFFNELLS + GB_TUFFNELLS = 'GB_TUFFNELLS'.freeze, + + # TODO: Write general description for TRUMPCARD + TRUMPCARD = 'TRUMPCARD'.freeze, + + # TODO: Write general description for ETOTAL + ETOTAL = 'ETOTAL'.freeze, + + # TODO: Write general description for SFPLUS_WEBHOOK + SFPLUS_WEBHOOK = 'SFPLUS_WEBHOOK'.freeze, + + # TODO: Write general description for SEKOLOGISTICS + SEKOLOGISTICS = 'SEKOLOGISTICS'.freeze, + + # TODO: Write general description for HERMES_2MANN_HANDLING + HERMES_2MANN_HANDLING = 'HERMES_2MANN_HANDLING'.freeze, + + # TODO: Write general description for DPD_LOCAL_REF + DPD_LOCAL_REF = 'DPD_LOCAL_REF'.freeze, + + # TODO: Write general description for UDS + UDS = 'UDS'.freeze, + + # TODO: Write general description for ZA_SPECIALISED_FREIGHT + ZA_SPECIALISED_FREIGHT = 'ZA_SPECIALISED_FREIGHT'.freeze, + + # TODO: Write general description for THA_KERRY + THA_KERRY = 'THA_KERRY'.freeze, + + # TODO: Write general description for PRT_INT_SEUR + PRT_INT_SEUR = 'PRT_INT_SEUR'.freeze, + + # TODO: Write general description for BRA_CORREIOS + BRA_CORREIOS = 'BRA_CORREIOS'.freeze, + + # TODO: Write general description for NZ_NZ_POST + NZ_NZ_POST = 'NZ_NZ_POST'.freeze, + + # TODO: Write general description for CN_EQUICK + CN_EQUICK = 'CN_EQUICK'.freeze, + + # TODO: Write general description for MYS_EMS + MYS_EMS = 'MYS_EMS'.freeze, + + # TODO: Write general description for GB_NORSK + GB_NORSK = 'GB_NORSK'.freeze, + + # TODO: Write general description for ESP_MRW + ESP_MRW = 'ESP_MRW'.freeze, + + # TODO: Write general description for ESP_PACKLINK + ESP_PACKLINK = 'ESP_PACKLINK'.freeze, + + # TODO: Write general description for KANGAROO_MY + KANGAROO_MY = 'KANGAROO_MY'.freeze, + + # TODO: Write general description for RPX + RPX = 'RPX'.freeze, + + # TODO: Write general description for XDP_UK_REFERENCE + XDP_UK_REFERENCE = 'XDP_UK_REFERENCE'.freeze, + + # TODO: Write general description for NINJAVAN_MY + NINJAVAN_MY = 'NINJAVAN_MY'.freeze, + + # TODO: Write general description for ADICIONAL + ADICIONAL = 'ADICIONAL'.freeze, + + # TODO: Write general description for NINJAVAN_ID + NINJAVAN_ID = 'NINJAVAN_ID'.freeze, + + # TODO: Write general description for ROADBULL + ROADBULL = 'ROADBULL'.freeze, + + # TODO: Write general description for YAKIT + YAKIT = 'YAKIT'.freeze, + + # TODO: Write general description for MAILAMERICAS + MAILAMERICAS = 'MAILAMERICAS'.freeze, + + # TODO: Write general description for MIKROPAKKET + MIKROPAKKET = 'MIKROPAKKET'.freeze, + + # TODO: Write general description for DYNALOGIC + DYNALOGIC = 'DYNALOGIC'.freeze, + + # TODO: Write general description for DHL_ES + DHL_ES = 'DHL_ES'.freeze, + + # TODO: Write general description for DHL_PARCEL_NL + DHL_PARCEL_NL = 'DHL_PARCEL_NL'.freeze, + + # TODO: Write general description for DHL_GLOBAL_MAIL_ASIA + DHL_GLOBAL_MAIL_ASIA = 'DHL_GLOBAL_MAIL_ASIA'.freeze, + + # TODO: Write general description for DAWN_WING + DAWN_WING = 'DAWN_WING'.freeze, + + # TODO: Write general description for GENIKI_GR + GENIKI_GR = 'GENIKI_GR'.freeze, + + # TODO: Write general description for HERMESWORLD_UK + HERMESWORLD_UK = 'HERMESWORLD_UK'.freeze, + + # TODO: Write general description for ALPHAFAST + ALPHAFAST = 'ALPHAFAST'.freeze, + + # TODO: Write general description for BUYLOGIC + BUYLOGIC = 'BUYLOGIC'.freeze, + + # TODO: Write general description for EKART + EKART = 'EKART'.freeze, + + # TODO: Write general description for MEX_SENDA + MEX_SENDA = 'MEX_SENDA'.freeze, + + # TODO: Write general description for SFC_LOGISTICS + SFC_LOGISTICS = 'SFC_LOGISTICS'.freeze, + + # TODO: Write general description for POST_SERBIA + POST_SERBIA = 'POST_SERBIA'.freeze, + + # TODO: Write general description for IND_DELHIVERY + IND_DELHIVERY = 'IND_DELHIVERY'.freeze, + + # TODO: Write general description for DE_DPD_DELISTRACK + DE_DPD_DELISTRACK = 'DE_DPD_DELISTRACK'.freeze, + + # TODO: Write general description for RPD2MAN + RPD2MAN = 'RPD2MAN'.freeze, + + # TODO: Write general description for CN_SF_EXPRESS + CN_SF_EXPRESS = 'CN_SF_EXPRESS'.freeze, + + # TODO: Write general description for YANWEN + YANWEN = 'YANWEN'.freeze, + + # TODO: Write general description for MYS_SKYNET + MYS_SKYNET = 'MYS_SKYNET'.freeze, + + # TODO: Write general description for CORREOS_DE_MEXICO + CORREOS_DE_MEXICO = 'CORREOS_DE_MEXICO'.freeze, + + # TODO: Write general description for CBL_LOGISTICA + CBL_LOGISTICA = 'CBL_LOGISTICA'.freeze, + + # TODO: Write general description for MEX_ESTAFETA + MEX_ESTAFETA = 'MEX_ESTAFETA'.freeze, + + # TODO: Write general description for AU_AUSTRIAN_POST + AU_AUSTRIAN_POST = 'AU_AUSTRIAN_POST'.freeze, + + # TODO: Write general description for RINCOS + RINCOS = 'RINCOS'.freeze, + + # TODO: Write general description for NLD_DHL + NLD_DHL = 'NLD_DHL'.freeze, + + # TODO: Write general description for RUSSIAN_POST + RUSSIAN_POST = 'RUSSIAN_POST'.freeze, + + # TODO: Write general description for COURIERS_PLEASE + COURIERS_PLEASE = 'COURIERS_PLEASE'.freeze, + + # TODO: Write general description for POSTNORD_LOGISTICS + POSTNORD_LOGISTICS = 'POSTNORD_LOGISTICS'.freeze, + + # TODO: Write general description for FEDEX + FEDEX = 'FEDEX'.freeze, + + # TODO: Write general description for DPE_EXPRESS + DPE_EXPRESS = 'DPE_EXPRESS'.freeze, + + # TODO: Write general description for DPD + DPD = 'DPD'.freeze, + + # TODO: Write general description for ADSONE + ADSONE = 'ADSONE'.freeze, + + # TODO: Write general description for IDN_JNE + IDN_JNE = 'IDN_JNE'.freeze, + + # TODO: Write general description for THECOURIERGUY + THECOURIERGUY = 'THECOURIERGUY'.freeze, + + # TODO: Write general description for CNEXPS + CNEXPS = 'CNEXPS'.freeze, + + # TODO: Write general description for PRT_CHRONOPOST + PRT_CHRONOPOST = 'PRT_CHRONOPOST'.freeze, + + # TODO: Write general description for LANDMARK_GLOBAL + LANDMARK_GLOBAL = 'LANDMARK_GLOBAL'.freeze, + + # TODO: Write general description for IT_DHL_ECOMMERCE + IT_DHL_ECOMMERCE = 'IT_DHL_ECOMMERCE'.freeze, + + # TODO: Write general description for ESP_NACEX + ESP_NACEX = 'ESP_NACEX'.freeze, + + # TODO: Write general description for PRT_CTT + PRT_CTT = 'PRT_CTT'.freeze, + + # TODO: Write general description for BE_KIALA + BE_KIALA = 'BE_KIALA'.freeze, + + # TODO: Write general description for ASENDIA_UK + ASENDIA_UK = 'ASENDIA_UK'.freeze, + + # TODO: Write general description for GLOBAL_TNT + GLOBAL_TNT = 'GLOBAL_TNT'.freeze, + + # TODO: Write general description for POSTUR_IS + POSTUR_IS = 'POSTUR_IS'.freeze, + + # TODO: Write general description for EPARCEL_KR + EPARCEL_KR = 'EPARCEL_KR'.freeze, + + # TODO: Write general description for INPOST_PACZKOMATY + INPOST_PACZKOMATY = 'INPOST_PACZKOMATY'.freeze, + + # TODO: Write general description for IT_POSTE_ITALIA + IT_POSTE_ITALIA = 'IT_POSTE_ITALIA'.freeze, + + # TODO: Write general description for BE_BPOST + BE_BPOST = 'BE_BPOST'.freeze, + + # TODO: Write general description for PL_POCZTA_POLSKA + PL_POCZTA_POLSKA = 'PL_POCZTA_POLSKA'.freeze, + + # TODO: Write general description for MYS_MYS_POST + MYS_MYS_POST = 'MYS_MYS_POST'.freeze, + + # TODO: Write general description for SG_SG_POST + SG_SG_POST = 'SG_SG_POST'.freeze, + + # TODO: Write general description for THA_THAILAND_POST + THA_THAILAND_POST = 'THA_THAILAND_POST'.freeze, + + # TODO: Write general description for LEXSHIP + LEXSHIP = 'LEXSHIP'.freeze, + + # TODO: Write general description for FASTWAY_NZ + FASTWAY_NZ = 'FASTWAY_NZ'.freeze, + + # TODO: Write general description for DHL_AU + DHL_AU = 'DHL_AU'.freeze, + + # TODO: Write general description for COSTMETICSNOW + COSTMETICSNOW = 'COSTMETICSNOW'.freeze, + + # TODO: Write general description for PFLOGISTICS + PFLOGISTICS = 'PFLOGISTICS'.freeze, + + # TODO: Write general description for LOOMIS_EXPRESS + LOOMIS_EXPRESS = 'LOOMIS_EXPRESS'.freeze, + + # TODO: Write general description for GLS_ITALY + GLS_ITALY = 'GLS_ITALY'.freeze, + + # TODO: Write general description for LINE + LINE = 'LINE'.freeze, + + # TODO: Write general description for GEL_EXPRESS + GEL_EXPRESS = 'GEL_EXPRESS'.freeze, + + # TODO: Write general description for HUODULL + HUODULL = 'HUODULL'.freeze, + + # TODO: Write general description for NINJAVAN_SG + NINJAVAN_SG = 'NINJAVAN_SG'.freeze, + + # TODO: Write general description for JANIO + JANIO = 'JANIO'.freeze, + + # TODO: Write general description for AO_COURIER + AO_COURIER = 'AO_COURIER'.freeze, + + # TODO: Write general description for BRT_IT_SENDER_REF + BRT_IT_SENDER_REF = 'BRT_IT_SENDER_REF'.freeze, + + # TODO: Write general description for SAILPOST + SAILPOST = 'SAILPOST'.freeze, + + # TODO: Write general description for LALAMOVE + LALAMOVE = 'LALAMOVE'.freeze, + + # TODO: Write general description for NEWZEALAND_COURIERS + NEWZEALAND_COURIERS = 'NEWZEALAND_COURIERS'.freeze, + + # TODO: Write general description for ETOMARS + ETOMARS = 'ETOMARS'.freeze, + + # TODO: Write general description for VIRTRANSPORT + VIRTRANSPORT = 'VIRTRANSPORT'.freeze, + + # TODO: Write general description for WIZMO + WIZMO = 'WIZMO'.freeze, + + # TODO: Write general description for PALLETWAYS + PALLETWAYS = 'PALLETWAYS'.freeze, + + # TODO: Write general description for I_DIKA + I_DIKA = 'I_DIKA'.freeze, + + # TODO: Write general description for CFL_LOGISTICS + CFL_LOGISTICS = 'CFL_LOGISTICS'.freeze, + + # TODO: Write general description for GEMWORLDWIDE + GEMWORLDWIDE = 'GEMWORLDWIDE'.freeze, + + # TODO: Write general description for GLOBAL_EXPRESS + GLOBAL_EXPRESS = 'GLOBAL_EXPRESS'.freeze, + + # TODO: Write general description for LOGISTYX_TRANSGROUP + LOGISTYX_TRANSGROUP = 'LOGISTYX_TRANSGROUP'.freeze, + + # TODO: Write general description for WESTBANK_COURIER + WESTBANK_COURIER = 'WESTBANK_COURIER'.freeze, + + # TODO: Write general description for ARCO_SPEDIZIONI + ARCO_SPEDIZIONI = 'ARCO_SPEDIZIONI'.freeze, + + # TODO: Write general description for YDH_EXPRESS + YDH_EXPRESS = 'YDH_EXPRESS'.freeze, + + # TODO: Write general description for PARCELINKLOGISTICS + PARCELINKLOGISTICS = 'PARCELINKLOGISTICS'.freeze, + + # TODO: Write general description for CNDEXPRESS + CNDEXPRESS = 'CNDEXPRESS'.freeze, + + # TODO: Write general description for NOX_NIGHT_TIME_EXPRESS + NOX_NIGHT_TIME_EXPRESS = 'NOX_NIGHT_TIME_EXPRESS'.freeze, + + # TODO: Write general description for AERONET + AERONET = 'AERONET'.freeze, + + # TODO: Write general description for LTIANEXP + LTIANEXP = 'LTIANEXP'.freeze, + + # TODO: Write general description for INTEGRA2_FTP + INTEGRA2_FTP = 'INTEGRA2_FTP'.freeze, + + # TODO: Write general description for PARCELONE + PARCELONE = 'PARCELONE'.freeze, + + # TODO: Write general description for NOX_NACHTEXPRESS + NOX_NACHTEXPRESS = 'NOX_NACHTEXPRESS'.freeze, + + # TODO: Write general description for CN_CHINA_POST_EMS + CN_CHINA_POST_EMS = 'CN_CHINA_POST_EMS'.freeze, + + # TODO: Write general description for CHUKOU1 + CHUKOU1 = 'CHUKOU1'.freeze, + + # TODO: Write general description for GLS_SLOV + GLS_SLOV = 'GLS_SLOV'.freeze, + + # TODO: Write general description for ORANGE_DS + ORANGE_DS = 'ORANGE_DS'.freeze, + + # TODO: Write general description for JOOM_LOGIS + JOOM_LOGIS = 'JOOM_LOGIS'.freeze, + + # TODO: Write general description for AUS_STARTRACK + AUS_STARTRACK = 'AUS_STARTRACK'.freeze, + + # TODO: Write general description for DHL + DHL = 'DHL'.freeze, + + # TODO: Write general description for GB_APC + GB_APC = 'GB_APC'.freeze, + + # TODO: Write general description for BONDSCOURIERS + BONDSCOURIERS = 'BONDSCOURIERS'.freeze, + + # TODO: Write general description for JPN_JAPAN_POST + JPN_JAPAN_POST = 'JPN_JAPAN_POST'.freeze, + + # TODO: Write general description for USPS + USPS = 'USPS'.freeze, + + # TODO: Write general description for WINIT + WINIT = 'WINIT'.freeze, + + # TODO: Write general description for ARG_OCA + ARG_OCA = 'ARG_OCA'.freeze, + + # TODO: Write general description for TW_TAIWAN_POST + TW_TAIWAN_POST = 'TW_TAIWAN_POST'.freeze, + + # TODO: Write general description for DMM_NETWORK + DMM_NETWORK = 'DMM_NETWORK'.freeze, + + # TODO: Write general description for TNT + TNT = 'TNT'.freeze, + + # TODO: Write general description for BH_POSTA + BH_POSTA = 'BH_POSTA'.freeze, + + # TODO: Write general description for SWE_POSTNORD + SWE_POSTNORD = 'SWE_POSTNORD'.freeze, + + # TODO: Write general description for CA_CANADA_POST + CA_CANADA_POST = 'CA_CANADA_POST'.freeze, + + # TODO: Write general description for WISELOADS + WISELOADS = 'WISELOADS'.freeze, + + # TODO: Write general description for ASENDIA_HK + ASENDIA_HK = 'ASENDIA_HK'.freeze, + + # TODO: Write general description for NLD_GLS + NLD_GLS = 'NLD_GLS'.freeze, + + # TODO: Write general description for MEX_REDPACK + MEX_REDPACK = 'MEX_REDPACK'.freeze, + + # TODO: Write general description for JET_SHIP + JET_SHIP = 'JET_SHIP'.freeze, + + # TODO: Write general description for DE_DHL_EXPRESS + DE_DHL_EXPRESS = 'DE_DHL_EXPRESS'.freeze, + + # TODO: Write general description for NINJAVAN_THAI + NINJAVAN_THAI = 'NINJAVAN_THAI'.freeze, + + # TODO: Write general description for RABEN_GROUP + RABEN_GROUP = 'RABEN_GROUP'.freeze, + + # TODO: Write general description for ESP_ASM + ESP_ASM = 'ESP_ASM'.freeze, + + # TODO: Write general description for HRV_HRVATSKA + HRV_HRVATSKA = 'HRV_HRVATSKA'.freeze, + + # TODO: Write general description for GLOBAL_ESTES + GLOBAL_ESTES = 'GLOBAL_ESTES'.freeze, + + # TODO: Write general description for LTU_LIETUVOS + LTU_LIETUVOS = 'LTU_LIETUVOS'.freeze, + + # TODO: Write general description for BEL_DHL + BEL_DHL = 'BEL_DHL'.freeze, + + # TODO: Write general description for AU_AU_POST + AU_AU_POST = 'AU_AU_POST'.freeze, + + # TODO: Write general description for SPEEDEXCOURIER + SPEEDEXCOURIER = 'SPEEDEXCOURIER'.freeze, + + # TODO: Write general description for FR_COLIS + FR_COLIS = 'FR_COLIS'.freeze, + + # TODO: Write general description for ARAMEX + ARAMEX = 'ARAMEX'.freeze, + + # TODO: Write general description for DPEX + DPEX = 'DPEX'.freeze, + + # TODO: Write general description for MYS_AIRPAK + MYS_AIRPAK = 'MYS_AIRPAK'.freeze, + + # TODO: Write general description for CUCKOOEXPRESS + CUCKOOEXPRESS = 'CUCKOOEXPRESS'.freeze, + + # TODO: Write general description for DPD_POLAND + DPD_POLAND = 'DPD_POLAND'.freeze, + + # TODO: Write general description for NLD_POSTNL + NLD_POSTNL = 'NLD_POSTNL'.freeze, + + # TODO: Write general description for NIM_EXPRESS + NIM_EXPRESS = 'NIM_EXPRESS'.freeze, + + # TODO: Write general description for QUANTIUM + QUANTIUM = 'QUANTIUM'.freeze, + + # TODO: Write general description for SENDLE + SENDLE = 'SENDLE'.freeze, + + # TODO: Write general description for ESP_REDUR + ESP_REDUR = 'ESP_REDUR'.freeze, + + # TODO: Write general description for MATKAHUOLTO + MATKAHUOLTO = 'MATKAHUOLTO'.freeze, + + # TODO: Write general description for CPACKET + CPACKET = 'CPACKET'.freeze, + + # TODO: Write general description for POSTI + POSTI = 'POSTI'.freeze, + + # TODO: Write general description for HUNTER_EXPRESS + HUNTER_EXPRESS = 'HUNTER_EXPRESS'.freeze, + + # TODO: Write general description for CHOIR_EXP + CHOIR_EXP = 'CHOIR_EXP'.freeze, + + # TODO: Write general description for LEGION_EXPRESS + LEGION_EXPRESS = 'LEGION_EXPRESS'.freeze, + + # TODO: Write general description for AUSTRIAN_POST_EXPRESS + AUSTRIAN_POST_EXPRESS = 'AUSTRIAN_POST_EXPRESS'.freeze, + + # TODO: Write general description for GRUPO + GRUPO = 'GRUPO'.freeze, + + # TODO: Write general description for POSTA_RO + POSTA_RO = 'POSTA_RO'.freeze, + + # TODO: Write general description for INTERPARCEL_UK + INTERPARCEL_UK = 'INTERPARCEL_UK'.freeze, + + # TODO: Write general description for GLOBAL_ABF + GLOBAL_ABF = 'GLOBAL_ABF'.freeze, + + # TODO: Write general description for POSTEN_NORGE + POSTEN_NORGE = 'POSTEN_NORGE'.freeze, + + # TODO: Write general description for XPERT_DELIVERY + XPERT_DELIVERY = 'XPERT_DELIVERY'.freeze, + + # TODO: Write general description for DHL_REFR + DHL_REFR = 'DHL_REFR'.freeze, + + # TODO: Write general description for DHL_HK + DHL_HK = 'DHL_HK'.freeze, + + # TODO: Write general description for SKYNET_UAE + SKYNET_UAE = 'SKYNET_UAE'.freeze, + + # TODO: Write general description for GOJEK + GOJEK = 'GOJEK'.freeze, + + # TODO: Write general description for YODEL_INTNL + YODEL_INTNL = 'YODEL_INTNL'.freeze, + + # TODO: Write general description for JANCO + JANCO = 'JANCO'.freeze, + + # TODO: Write general description for YTO + YTO = 'YTO'.freeze, + + # TODO: Write general description for WISE_EXPRESS + WISE_EXPRESS = 'WISE_EXPRESS'.freeze, + + # TODO: Write general description for JTEXPRESS_VN + JTEXPRESS_VN = 'JTEXPRESS_VN'.freeze, + + # TODO: Write general description for FEDEX_INTL_MLSERV + FEDEX_INTL_MLSERV = 'FEDEX_INTL_MLSERV'.freeze, + + # TODO: Write general description for VAMOX + VAMOX = 'VAMOX'.freeze, + + # TODO: Write general description for AMS_GRP + AMS_GRP = 'AMS_GRP'.freeze, + + # TODO: Write general description for DHL_JP + DHL_JP = 'DHL_JP'.freeze, + + # TODO: Write general description for HRPARCEL + HRPARCEL = 'HRPARCEL'.freeze, + + # TODO: Write general description for GESWL + GESWL = 'GESWL'.freeze, + + # TODO: Write general description for BLUESTAR + BLUESTAR = 'BLUESTAR'.freeze, + + # TODO: Write general description for CDEK_TR + CDEK_TR = 'CDEK_TR'.freeze, + + # TODO: Write general description for DESCARTES + DESCARTES = 'DESCARTES'.freeze, + + # TODO: Write general description for DELTEC_UK + DELTEC_UK = 'DELTEC_UK'.freeze, + + # TODO: Write general description for DTDC_EXPRESS + DTDC_EXPRESS = 'DTDC_EXPRESS'.freeze, + + # TODO: Write general description for TOURLINE + TOURLINE = 'TOURLINE'.freeze, + + # TODO: Write general description for BH_WORLDWIDE + BH_WORLDWIDE = 'BH_WORLDWIDE'.freeze, + + # TODO: Write general description for OCS + OCS = 'OCS'.freeze, + + # TODO: Write general description for YINGNUO_LOGISTICS + YINGNUO_LOGISTICS = 'YINGNUO_LOGISTICS'.freeze, + + # TODO: Write general description for UPS + UPS = 'UPS'.freeze, + + # TODO: Write general description for TOLL + TOLL = 'TOLL'.freeze, + + # TODO: Write general description for PRT_SEUR + PRT_SEUR = 'PRT_SEUR'.freeze, + + # TODO: Write general description for DTDC_AU + DTDC_AU = 'DTDC_AU'.freeze, + + # TODO: Write general description for THA_DYNAMIC_LOGISTICS + THA_DYNAMIC_LOGISTICS = 'THA_DYNAMIC_LOGISTICS'.freeze, + + # TODO: Write general description for UBI_LOGISTICS + UBI_LOGISTICS = 'UBI_LOGISTICS'.freeze, + + # TODO: Write general description for FEDEX_CROSSBORDER + FEDEX_CROSSBORDER = 'FEDEX_CROSSBORDER'.freeze, + + # TODO: Write general description for A1POST + A1POST = 'A1POST'.freeze, + + # TODO: Write general description for TAZMANIAN_FREIGHT + TAZMANIAN_FREIGHT = 'TAZMANIAN_FREIGHT'.freeze, + + # TODO: Write general description for CJ_INT_MY + CJ_INT_MY = 'CJ_INT_MY'.freeze, + + # TODO: Write general description for SAIA_FREIGHT + SAIA_FREIGHT = 'SAIA_FREIGHT'.freeze, + + # TODO: Write general description for SG_QXPRESS + SG_QXPRESS = 'SG_QXPRESS'.freeze, + + # TODO: Write general description for NHANS_SOLUTIONS + NHANS_SOLUTIONS = 'NHANS_SOLUTIONS'.freeze, + + # TODO: Write general description for DPD_FR + DPD_FR = 'DPD_FR'.freeze, + + # TODO: Write general description for COORDINADORA + COORDINADORA = 'COORDINADORA'.freeze, + + # TODO: Write general description for ANDREANI + ANDREANI = 'ANDREANI'.freeze, + + # TODO: Write general description for DOORA + DOORA = 'DOORA'.freeze, + + # TODO: Write general description for INTERPARCEL_NZ + INTERPARCEL_NZ = 'INTERPARCEL_NZ'.freeze, + + # TODO: Write general description for PHL_JAMEXPRESS + PHL_JAMEXPRESS = 'PHL_JAMEXPRESS'.freeze, + + # TODO: Write general description for BEL_BELGIUM_POST + BEL_BELGIUM_POST = 'BEL_BELGIUM_POST'.freeze, + + # TODO: Write general description for US_APC + US_APC = 'US_APC'.freeze, + + # TODO: Write general description for IDN_POS + IDN_POS = 'IDN_POS'.freeze, + + # TODO: Write general description for FR_MONDIAL + FR_MONDIAL = 'FR_MONDIAL'.freeze, + + # TODO: Write general description for DE_DHL + DE_DHL = 'DE_DHL'.freeze, + + # TODO: Write general description for HK_RPX + HK_RPX = 'HK_RPX'.freeze, + + # TODO: Write general description for DHL_PIECEID + DHL_PIECEID = 'DHL_PIECEID'.freeze, + + # TODO: Write general description for VNPOST_EMS + VNPOST_EMS = 'VNPOST_EMS'.freeze, + + # TODO: Write general description for RRDONNELLEY + RRDONNELLEY = 'RRDONNELLEY'.freeze, + + # TODO: Write general description for DPD_DE + DPD_DE = 'DPD_DE'.freeze, + + # TODO: Write general description for DELCART_IN + DELCART_IN = 'DELCART_IN'.freeze, + + # TODO: Write general description for IMEXGLOBALSOLUTIONS + IMEXGLOBALSOLUTIONS = 'IMEXGLOBALSOLUTIONS'.freeze, + + # TODO: Write general description for ACOMMERCE + ACOMMERCE = 'ACOMMERCE'.freeze, + + # TODO: Write general description for EURODIS + EURODIS = 'EURODIS'.freeze, + + # TODO: Write general description for CANPAR + CANPAR = 'CANPAR'.freeze, + + # TODO: Write general description for GLS + GLS = 'GLS'.freeze, + + # TODO: Write general description for IND_ECOM + IND_ECOM = 'IND_ECOM'.freeze, + + # TODO: Write general description for ESP_ENVIALIA + ESP_ENVIALIA = 'ESP_ENVIALIA'.freeze, + + # TODO: Write general description for DHL_UK + DHL_UK = 'DHL_UK'.freeze, + + # TODO: Write general description for SMSA_EXPRESS + SMSA_EXPRESS = 'SMSA_EXPRESS'.freeze, + + # TODO: Write general description for TNT_FR + TNT_FR = 'TNT_FR'.freeze, + + # TODO: Write general description for DEX_I + DEX_I = 'DEX_I'.freeze, + + # TODO: Write general description for BUDBEE_WEBHOOK + BUDBEE_WEBHOOK = 'BUDBEE_WEBHOOK'.freeze, + + # TODO: Write general description for COPA_COURIER + COPA_COURIER = 'COPA_COURIER'.freeze, + + # TODO: Write general description for VNM_VIETNAM_POST + VNM_VIETNAM_POST = 'VNM_VIETNAM_POST'.freeze, + + # TODO: Write general description for DPD_HK + DPD_HK = 'DPD_HK'.freeze, + + # TODO: Write general description for TOLL_NZ + TOLL_NZ = 'TOLL_NZ'.freeze, + + # TODO: Write general description for ECHO + ECHO = 'ECHO'.freeze, + + # TODO: Write general description for FEDEX_FR + FEDEX_FR = 'FEDEX_FR'.freeze, + + # TODO: Write general description for BORDEREXPRESS + BORDEREXPRESS = 'BORDEREXPRESS'.freeze, + + # TODO: Write general description for MAILPLUS_JPN + MAILPLUS_JPN = 'MAILPLUS_JPN'.freeze, + + # TODO: Write general description for TNT_UK_REFR + TNT_UK_REFR = 'TNT_UK_REFR'.freeze, + + # TODO: Write general description for KEC + KEC = 'KEC'.freeze, + + # TODO: Write general description for DPD_RO + DPD_RO = 'DPD_RO'.freeze, + + # TODO: Write general description for TNT_JP + TNT_JP = 'TNT_JP'.freeze, + + # TODO: Write general description for TH_CJ + TH_CJ = 'TH_CJ'.freeze, + + # TODO: Write general description for EC_CN + EC_CN = 'EC_CN'.freeze, + + # TODO: Write general description for FASTWAY_UK + FASTWAY_UK = 'FASTWAY_UK'.freeze, + + # TODO: Write general description for FASTWAY_US + FASTWAY_US = 'FASTWAY_US'.freeze, + + # TODO: Write general description for GLS_DE + GLS_DE = 'GLS_DE'.freeze, + + # TODO: Write general description for GLS_ES + GLS_ES = 'GLS_ES'.freeze, + + # TODO: Write general description for GLS_FR + GLS_FR = 'GLS_FR'.freeze, + + # TODO: Write general description for MONDIAL_BE + MONDIAL_BE = 'MONDIAL_BE'.freeze, + + # TODO: Write general description for SGT_IT + SGT_IT = 'SGT_IT'.freeze, + + # TODO: Write general description for TNT_CN + TNT_CN = 'TNT_CN'.freeze, + + # TODO: Write general description for TNT_DE + TNT_DE = 'TNT_DE'.freeze, + + # TODO: Write general description for TNT_ES + TNT_ES = 'TNT_ES'.freeze, + + # TODO: Write general description for TNT_PL + TNT_PL = 'TNT_PL'.freeze, + + # TODO: Write general description for PARCELFORCE + PARCELFORCE = 'PARCELFORCE'.freeze, + + # TODO: Write general description for SWISS_POST + SWISS_POST = 'SWISS_POST'.freeze, + + # TODO: Write general description for TOLL_IPEC + TOLL_IPEC = 'TOLL_IPEC'.freeze, + + # TODO: Write general description for AIR_21 + AIR_21 = 'AIR_21'.freeze, + + # TODO: Write general description for AIRSPEED + AIRSPEED = 'AIRSPEED'.freeze, + + # TODO: Write general description for BERT + BERT = 'BERT'.freeze, + + # TODO: Write general description for BLUEDART + BLUEDART = 'BLUEDART'.freeze, + + # TODO: Write general description for COLLECTPLUS + COLLECTPLUS = 'COLLECTPLUS'.freeze, + + # TODO: Write general description for COURIERPLUS + COURIERPLUS = 'COURIERPLUS'.freeze, + + # TODO: Write general description for COURIER_POST + COURIER_POST = 'COURIER_POST'.freeze, + + # TODO: Write general description for DHL_GLOBAL_MAIL + DHL_GLOBAL_MAIL = 'DHL_GLOBAL_MAIL'.freeze, + + # TODO: Write general description for DPD_UK + DPD_UK = 'DPD_UK'.freeze, + + # TODO: Write general description for DELTEC_DE + DELTEC_DE = 'DELTEC_DE'.freeze, + + # TODO: Write general description for DEUTSCHE_DE + DEUTSCHE_DE = 'DEUTSCHE_DE'.freeze, + + # TODO: Write general description for DOTZOT + DOTZOT = 'DOTZOT'.freeze, + + # TODO: Write general description for ELTA_GR + ELTA_GR = 'ELTA_GR'.freeze, + + # TODO: Write general description for EMS_CN + EMS_CN = 'EMS_CN'.freeze, + + # TODO: Write general description for ECARGO + ECARGO = 'ECARGO'.freeze, + + # TODO: Write general description for ENSENDA + ENSENDA = 'ENSENDA'.freeze, + + # TODO: Write general description for FERCAM_IT + FERCAM_IT = 'FERCAM_IT'.freeze, + + # TODO: Write general description for FASTWAY_ZA + FASTWAY_ZA = 'FASTWAY_ZA'.freeze, + + # TODO: Write general description for FASTWAY_AU + FASTWAY_AU = 'FASTWAY_AU'.freeze, + + # TODO: Write general description for FIRST_LOGISITCS + FIRST_LOGISITCS = 'FIRST_LOGISITCS'.freeze, + + # TODO: Write general description for GEODIS + GEODIS = 'GEODIS'.freeze, + + # TODO: Write general description for GLOBEGISTICS + GLOBEGISTICS = 'GLOBEGISTICS'.freeze, + + # TODO: Write general description for GREYHOUND + GREYHOUND = 'GREYHOUND'.freeze, + + # TODO: Write general description for JETSHIP_MY + JETSHIP_MY = 'JETSHIP_MY'.freeze, + + # TODO: Write general description for LION_PARCEL + LION_PARCEL = 'LION_PARCEL'.freeze, + + # TODO: Write general description for AEROFLASH + AEROFLASH = 'AEROFLASH'.freeze, + + # TODO: Write general description for ONTRAC + ONTRAC = 'ONTRAC'.freeze, + + # TODO: Write general description for SAGAWA + SAGAWA = 'SAGAWA'.freeze, + + # TODO: Write general description for SIODEMKA + SIODEMKA = 'SIODEMKA'.freeze, + + # TODO: Write general description for STARTRACK + STARTRACK = 'STARTRACK'.freeze, + + # TODO: Write general description for TNT_AU + TNT_AU = 'TNT_AU'.freeze, + + # TODO: Write general description for TNT_IT + TNT_IT = 'TNT_IT'.freeze, + + # TODO: Write general description for TRANSMISSION + TRANSMISSION = 'TRANSMISSION'.freeze, + + # TODO: Write general description for YAMATO + YAMATO = 'YAMATO'.freeze, + + # TODO: Write general description for DHL_IT + DHL_IT = 'DHL_IT'.freeze, + + # TODO: Write general description for DHL_AT + DHL_AT = 'DHL_AT'.freeze, + + # TODO: Write general description for LOGISTICSWORLDWIDE_KR + LOGISTICSWORLDWIDE_KR = 'LOGISTICSWORLDWIDE_KR'.freeze, + + # TODO: Write general description for GLS_SPAIN + GLS_SPAIN = 'GLS_SPAIN'.freeze, + + # TODO: Write general description for AMAZON_UK_API + AMAZON_UK_API = 'AMAZON_UK_API'.freeze, + + # TODO: Write general description for DPD_FR_REFERENCE + DPD_FR_REFERENCE = 'DPD_FR_REFERENCE'.freeze, + + # TODO: Write general description for DHLPARCEL_UK + DHLPARCEL_UK = 'DHLPARCEL_UK'.freeze, + + # TODO: Write general description for MEGASAVE + MEGASAVE = 'MEGASAVE'.freeze, + + # TODO: Write general description for QUALITYPOST + QUALITYPOST = 'QUALITYPOST'.freeze, + + # TODO: Write general description for IDS_LOGISTICS + IDS_LOGISTICS = 'IDS_LOGISTICS'.freeze, + + # TODO: Write general description for JOYINGBOX1 + JOYINGBOX1 = 'JOYINGBOX'.freeze, + + # TODO: Write general description for PANTHER_ORDER_NUMBER + PANTHER_ORDER_NUMBER = 'PANTHER_ORDER_NUMBER'.freeze, + + # TODO: Write general description for WATKINS_SHEPARD + WATKINS_SHEPARD = 'WATKINS_SHEPARD'.freeze, + + # TODO: Write general description for FASTTRACK + FASTTRACK = 'FASTTRACK'.freeze, + + # TODO: Write general description for UP_EXPRESS + UP_EXPRESS = 'UP_EXPRESS'.freeze, + + # TODO: Write general description for ELOGISTICA + ELOGISTICA = 'ELOGISTICA'.freeze, + + # TODO: Write general description for ECOURIER + ECOURIER = 'ECOURIER'.freeze, + + # TODO: Write general description for CJ_PHILIPPINES + CJ_PHILIPPINES = 'CJ_PHILIPPINES'.freeze, + + # TODO: Write general description for SPEEDEX + SPEEDEX = 'SPEEDEX'.freeze, + + # TODO: Write general description for ORANGECONNEX + ORANGECONNEX = 'ORANGECONNEX'.freeze, + + # TODO: Write general description for TECOR + TECOR = 'TECOR'.freeze, + + # TODO: Write general description for SAEE + SAEE = 'SAEE'.freeze, + + # TODO: Write general description for GLS_ITALY_FTP + GLS_ITALY_FTP = 'GLS_ITALY_FTP'.freeze, + + # TODO: Write general description for DELIVERE + DELIVERE = 'DELIVERE'.freeze, + + # TODO: Write general description for YYCOM + YYCOM = 'YYCOM'.freeze, + + # TODO: Write general description for ADICIONAL_PT + ADICIONAL_PT = 'ADICIONAL_PT'.freeze, + + # TODO: Write general description for DKSH + DKSH = 'DKSH'.freeze, + + # TODO: Write general description for NIPPON_EXPRESS_FTP + NIPPON_EXPRESS_FTP = 'NIPPON_EXPRESS_FTP'.freeze, + + # TODO: Write general description for GOLS + GOLS = 'GOLS'.freeze, + + # TODO: Write general description for FUJEXP + FUJEXP = 'FUJEXP'.freeze, + + # TODO: Write general description for QTRACK + QTRACK = 'QTRACK'.freeze, + + # TODO: Write general description for OMLOGISTICS_API + OMLOGISTICS_API = 'OMLOGISTICS_API'.freeze, + + # TODO: Write general description for GDPHARM + GDPHARM = 'GDPHARM'.freeze, + + # TODO: Write general description for MISUMI_CN + MISUMI_CN = 'MISUMI_CN'.freeze, + + # TODO: Write general description for AIR_CANADA + AIR_CANADA = 'AIR_CANADA'.freeze, + + # TODO: Write general description for CITY56_WEBHOOK + CITY56_WEBHOOK = 'CITY56_WEBHOOK'.freeze, + + # TODO: Write general description for SAGAWA_API + SAGAWA_API = 'SAGAWA_API'.freeze, + + # TODO: Write general description for KEDAEX + KEDAEX = 'KEDAEX'.freeze, + + # TODO: Write general description for PGEON_API + PGEON_API = 'PGEON_API'.freeze, + + # TODO: Write general description for WEWORLDEXPRESS + WEWORLDEXPRESS = 'WEWORLDEXPRESS'.freeze, + + # TODO: Write general description for JT_LOGISTICS + JT_LOGISTICS = 'JT_LOGISTICS'.freeze, + + # TODO: Write general description for TRUSK + TRUSK = 'TRUSK'.freeze, + + # TODO: Write general description for VIAXPRESS + VIAXPRESS = 'VIAXPRESS'.freeze, + + # TODO: Write general description for DHL_SUPPLYCHAIN_ID + DHL_SUPPLYCHAIN_ID = 'DHL_SUPPLYCHAIN_ID'.freeze, + + # TODO: Write general description for ZUELLIGPHARMA_SFTP + ZUELLIGPHARMA_SFTP = 'ZUELLIGPHARMA_SFTP'.freeze, + + # TODO: Write general description for MEEST + MEEST = 'MEEST'.freeze, + + # TODO: Write general description for TOLL_PRIORITY + TOLL_PRIORITY = 'TOLL_PRIORITY'.freeze, + + # TODO: Write general description for MOTHERSHIP_API + MOTHERSHIP_API = 'MOTHERSHIP_API'.freeze, + + # TODO: Write general description for CAPITAL + CAPITAL = 'CAPITAL'.freeze, + + # TODO: Write general description for EUROPAKET_API + EUROPAKET_API = 'EUROPAKET_API'.freeze, + + # TODO: Write general description for HFD + HFD = 'HFD'.freeze, + + # TODO: Write general description for TOURLINE_REFERENCE + TOURLINE_REFERENCE = 'TOURLINE_REFERENCE'.freeze, + + # TODO: Write general description for GIO_ECOURIER + GIO_ECOURIER = 'GIO_ECOURIER'.freeze, + + # TODO: Write general description for CN_LOGISTICS + CN_LOGISTICS = 'CN_LOGISTICS'.freeze, + + # TODO: Write general description for PANDION + PANDION = 'PANDION'.freeze, + + # TODO: Write general description for BPOST_API + BPOST_API = 'BPOST_API'.freeze, + + # TODO: Write general description for PASSPORTSHIPPING + PASSPORTSHIPPING = 'PASSPORTSHIPPING'.freeze, + + # TODO: Write general description for PAKAJO + PAKAJO = 'PAKAJO'.freeze, + + # TODO: Write general description for DACHSER + DACHSER = 'DACHSER'.freeze, + + # TODO: Write general description for YUSEN_SFTP + YUSEN_SFTP = 'YUSEN_SFTP'.freeze, + + # TODO: Write general description for SHYPLITE + SHYPLITE = 'SHYPLITE'.freeze, + + # TODO: Write general description for XYY + XYY = 'XYY'.freeze, + + # TODO: Write general description for MWD + MWD = 'MWD'.freeze, + + # TODO: Write general description for FAXECARGO + FAXECARGO = 'FAXECARGO'.freeze, + + # TODO: Write general description for MAZET + MAZET = 'MAZET'.freeze, + + # TODO: Write general description for FIRST_LOGISTICS_API + FIRST_LOGISTICS_API = 'FIRST_LOGISTICS_API'.freeze, + + # TODO: Write general description for SPRINT_PACK + SPRINT_PACK = 'SPRINT_PACK'.freeze, + + # TODO: Write general description for HERMES_DE_FTP + HERMES_DE_FTP = 'HERMES_DE_FTP'.freeze, + + # TODO: Write general description for CONCISE + CONCISE = 'CONCISE'.freeze, + + # TODO: Write general description for KERRY_EXPRESS_TW_API + KERRY_EXPRESS_TW_API = 'KERRY_EXPRESS_TW_API'.freeze, + + # TODO: Write general description for EWE + EWE = 'EWE'.freeze, + + # TODO: Write general description for FASTDESPATCH + FASTDESPATCH = 'FASTDESPATCH'.freeze, + + # TODO: Write general description for ABCUSTOM_SFTP + ABCUSTOM_SFTP = 'ABCUSTOM_SFTP'.freeze, + + # TODO: Write general description for CHAZKI + CHAZKI = 'CHAZKI'.freeze, + + # TODO: Write general description for SHIPPIE + SHIPPIE = 'SHIPPIE'.freeze, + + # TODO: Write general description for GEODIS_API + GEODIS_API = 'GEODIS_API'.freeze, + + # TODO: Write general description for NAQEL_EXPRESS + NAQEL_EXPRESS = 'NAQEL_EXPRESS'.freeze, + + # TODO: Write general description for PAPA_WEBHOOK + PAPA_WEBHOOK = 'PAPA_WEBHOOK'.freeze, + + # TODO: Write general description for FORWARDAIR + FORWARDAIR = 'FORWARDAIR'.freeze, + + # TODO: Write general description for DIALOGO_LOGISTICA_API + DIALOGO_LOGISTICA_API = 'DIALOGO_LOGISTICA_API'.freeze, + + # TODO: Write general description for LALAMOVE_API + LALAMOVE_API = 'LALAMOVE_API'.freeze, + + # TODO: Write general description for TOMYDOOR + TOMYDOOR = 'TOMYDOOR'.freeze, + + # TODO: Write general description for KRONOS_WEBHOOK + KRONOS_WEBHOOK = 'KRONOS_WEBHOOK'.freeze, + + # TODO: Write general description for JTCARGO + JTCARGO = 'JTCARGO'.freeze, + + # TODO: Write general description for T_CAT + T_CAT = 'T_CAT'.freeze, + + # TODO: Write general description for CONCISE_WEBHOOK + CONCISE_WEBHOOK = 'CONCISE_WEBHOOK'.freeze, + + # TODO: Write general description for TELEPORT_WEBHOOK + TELEPORT_WEBHOOK = 'TELEPORT_WEBHOOK'.freeze, + + # TODO: Write general description for CUSTOMCO_API + CUSTOMCO_API = 'CUSTOMCO_API'.freeze, + + # TODO: Write general description for SPX_TH + SPX_TH = 'SPX_TH'.freeze, + + # TODO: Write general description for BOLLORE_LOGISTICS + BOLLORE_LOGISTICS = 'BOLLORE_LOGISTICS'.freeze, + + # TODO: Write general description for CLICKLINK_SFTP + CLICKLINK_SFTP = 'CLICKLINK_SFTP'.freeze, + + # TODO: Write general description for M3LOGISTICS + M3LOGISTICS = 'M3LOGISTICS'.freeze, + + # TODO: Write general description for VNPOST_API + VNPOST_API = 'VNPOST_API'.freeze, + + # TODO: Write general description for AXLEHIRE_FTP + AXLEHIRE_FTP = 'AXLEHIRE_FTP'.freeze, + + # TODO: Write general description for SHADOWFAX + SHADOWFAX = 'SHADOWFAX'.freeze, + + # TODO: Write general description for MYHERMES_UK_API + MYHERMES_UK_API = 'MYHERMES_UK_API'.freeze, + + # TODO: Write general description for DAIICHI + DAIICHI = 'DAIICHI'.freeze, + + # TODO: Write general description for MENSAJEROSURBANOS_API + MENSAJEROSURBANOS_API = 'MENSAJEROSURBANOS_API'.freeze, + + # TODO: Write general description for POLARSPEED + POLARSPEED = 'POLARSPEED'.freeze, + + # TODO: Write general description for IDEXPRESS_ID + IDEXPRESS_ID = 'IDEXPRESS_ID'.freeze, + + # TODO: Write general description for PAYO + PAYO = 'PAYO'.freeze, + + # TODO: Write general description for WHISTL_SFTP + WHISTL_SFTP = 'WHISTL_SFTP'.freeze, + + # TODO: Write general description for INTEX_DE + INTEX_DE = 'INTEX_DE'.freeze, + + # TODO: Write general description for TRANS2U + TRANS2U = 'TRANS2U'.freeze, + + # TODO: Write general description for PRODUCTCAREGROUP_SFTP + PRODUCTCAREGROUP_SFTP = 'PRODUCTCAREGROUP_SFTP'.freeze, + + # TODO: Write general description for BIGSMART + BIGSMART = 'BIGSMART'.freeze, + + # TODO: Write general description for EXPEDITORS_API_REF + EXPEDITORS_API_REF = 'EXPEDITORS_API_REF'.freeze, + + # TODO: Write general description for AITWORLDWIDE_API + AITWORLDWIDE_API = 'AITWORLDWIDE_API'.freeze, + + # TODO: Write general description for WORLDCOURIER + WORLDCOURIER = 'WORLDCOURIER'.freeze, + + # TODO: Write general description for QUIQUP + QUIQUP = 'QUIQUP'.freeze, + + # TODO: Write general description for AGEDISS_SFTP + AGEDISS_SFTP = 'AGEDISS_SFTP'.freeze, + + # TODO: Write general description for ANDREANI_API + ANDREANI_API = 'ANDREANI_API'.freeze, + + # TODO: Write general description for CRLEXPRESS + CRLEXPRESS = 'CRLEXPRESS'.freeze, + + # TODO: Write general description for SMARTCAT + SMARTCAT = 'SMARTCAT'.freeze, + + # TODO: Write general description for CROSSFLIGHT + CROSSFLIGHT = 'CROSSFLIGHT'.freeze, + + # TODO: Write general description for PROCARRIER + PROCARRIER = 'PROCARRIER'.freeze, + + # TODO: Write general description for DHL_REFERENCE_API + DHL_REFERENCE_API = 'DHL_REFERENCE_API'.freeze, + + # TODO: Write general description for SEINO_API + SEINO_API = 'SEINO_API'.freeze, + + # TODO: Write general description for WSPEXPRESS + WSPEXPRESS = 'WSPEXPRESS'.freeze, + + # TODO: Write general description for KRONOS + KRONOS = 'KRONOS'.freeze, + + # TODO: Write general description for TOTAL_EXPRESS_API + TOTAL_EXPRESS_API = 'TOTAL_EXPRESS_API'.freeze, + + # TODO: Write general description for PARCLL + PARCLL = 'PARCLL'.freeze, + + # TODO: Write general description for XPEDIGO + XPEDIGO = 'XPEDIGO'.freeze, + + # TODO: Write general description for STAR_TRACK_WEBHOOK + STAR_TRACK_WEBHOOK = 'STAR_TRACK_WEBHOOK'.freeze, + + # TODO: Write general description for GPOST + GPOST = 'GPOST'.freeze, + + # TODO: Write general description for UCS + UCS = 'UCS'.freeze, + + # TODO: Write general description for DMFGROUP + DMFGROUP = 'DMFGROUP'.freeze, + + # TODO: Write general description for COORDINADORA_API + COORDINADORA_API = 'COORDINADORA_API'.freeze, + + # TODO: Write general description for MARKEN + MARKEN = 'MARKEN'.freeze, + + # TODO: Write general description for NTL + NTL = 'NTL'.freeze, + + # TODO: Write general description for REDJEPAKKETJE + REDJEPAKKETJE = 'REDJEPAKKETJE'.freeze, + + # TODO: Write general description for ALLIED_EXPRESS_FTP + ALLIED_EXPRESS_FTP = 'ALLIED_EXPRESS_FTP'.freeze, + + # TODO: Write general description for MONDIALRELAY_ES + MONDIALRELAY_ES = 'MONDIALRELAY_ES'.freeze, + + # TODO: Write general description for NAEKO_FTP + NAEKO_FTP = 'NAEKO_FTP'.freeze, + + # TODO: Write general description for MHI + MHI = 'MHI'.freeze, + + # TODO: Write general description for SHIPPIFY + SHIPPIFY = 'SHIPPIFY'.freeze, + + # TODO: Write general description for MALCA_AMIT_API + MALCA_AMIT_API = 'MALCA_AMIT_API'.freeze, + + # TODO: Write general description for JTEXPRESS_SG_API + JTEXPRESS_SG_API = 'JTEXPRESS_SG_API'.freeze, + + # TODO: Write general description for DACHSER_WEB + DACHSER_WEB = 'DACHSER_WEB'.freeze, + + # TODO: Write general description for FLIGHTLG + FLIGHTLG = 'FLIGHTLG'.freeze, + + # TODO: Write general description for CAGO + CAGO = 'CAGO'.freeze, + + # TODO: Write general description for COM1EXPRESS + COM1EXPRESS = 'COM1EXPRESS'.freeze, + + # TODO: Write general description for TONAMI_FTP + TONAMI_FTP = 'TONAMI_FTP'.freeze, + + # TODO: Write general description for PACKFLEET + PACKFLEET = 'PACKFLEET'.freeze, + + # TODO: Write general description for PUROLATOR_INTERNATIONAL + PUROLATOR_INTERNATIONAL = 'PUROLATOR_INTERNATIONAL'.freeze, + + # TODO: Write general description for WINESHIPPING_WEBHOOK + WINESHIPPING_WEBHOOK = 'WINESHIPPING_WEBHOOK'.freeze, + + # TODO: Write general description for DHL_ES_SFTP + DHL_ES_SFTP = 'DHL_ES_SFTP'.freeze, + + # TODO: Write general description for PCHOME_API + PCHOME_API = 'PCHOME_API'.freeze, + + # TODO: Write general description for CESKAPOSTA_API + CESKAPOSTA_API = 'CESKAPOSTA_API'.freeze, + + # TODO: Write general description for GORUSH + GORUSH = 'GORUSH'.freeze, + + # TODO: Write general description for HOMERUNNER + HOMERUNNER = 'HOMERUNNER'.freeze, + + # TODO: Write general description for AMAZON_ORDER + AMAZON_ORDER = 'AMAZON_ORDER'.freeze, + + # TODO: Write general description for EFWNOW_API + EFWNOW_API = 'EFWNOW_API'.freeze, + + # TODO: Write general description for CBL_LOGISTICA_API + CBL_LOGISTICA_API = 'CBL_LOGISTICA_API'.freeze, + + # TODO: Write general description for NIMBUSPOST + NIMBUSPOST = 'NIMBUSPOST'.freeze, + + # TODO: Write general description for LOGWIN_LOGISTICS + LOGWIN_LOGISTICS = 'LOGWIN_LOGISTICS'.freeze, + + # TODO: Write general description for NOWLOG_API + NOWLOG_API = 'NOWLOG_API'.freeze, + + # TODO: Write general description for DPD_NL + DPD_NL = 'DPD_NL'.freeze, + + # TODO: Write general description for GODEPENDABLE + GODEPENDABLE = 'GODEPENDABLE'.freeze, + + # TODO: Write general description for ESDEX + ESDEX = 'ESDEX'.freeze, + + # TODO: Write general description for LOGISYSTEMS_SFTP + LOGISYSTEMS_SFTP = 'LOGISYSTEMS_SFTP'.freeze, + + # TODO: Write general description for EXPEDITORS + EXPEDITORS = 'EXPEDITORS'.freeze, + + # TODO: Write general description for SNTGLOBAL_API + SNTGLOBAL_API = 'SNTGLOBAL_API'.freeze, + + # TODO: Write general description for SHIPX + SHIPX = 'SHIPX'.freeze, + + # TODO: Write general description for QINTL_API + QINTL_API = 'QINTL_API'.freeze, + + # TODO: Write general description for PACKS + PACKS = 'PACKS'.freeze, + + # TODO: Write general description for POSTNL_INTERNATIONAL + POSTNL_INTERNATIONAL = 'POSTNL_INTERNATIONAL'.freeze, + + # TODO: Write general description for AMAZON_EMAIL_PUSH + AMAZON_EMAIL_PUSH = 'AMAZON_EMAIL_PUSH'.freeze, + + # TODO: Write general description for DHL_API + DHL_API = 'DHL_API'.freeze, + + # TODO: Write general description for SPX + SPX = 'SPX'.freeze, + + # TODO: Write general description for AXLEHIRE + AXLEHIRE = 'AXLEHIRE'.freeze, + + # TODO: Write general description for ICSCOURIER + ICSCOURIER = 'ICSCOURIER'.freeze, + + # TODO: Write general description for DIALOGO_LOGISTICA + DIALOGO_LOGISTICA = 'DIALOGO_LOGISTICA'.freeze, + + # TODO: Write general description for SHUNBANG_EXPRESS + SHUNBANG_EXPRESS = 'SHUNBANG_EXPRESS'.freeze, + + # TODO: Write general description for TCS_API + TCS_API = 'TCS_API'.freeze, + + # TODO: Write general description for SF_EXPRESS_CN + SF_EXPRESS_CN = 'SF_EXPRESS_CN'.freeze, + + # TODO: Write general description for PACKETA + PACKETA = 'PACKETA'.freeze, + + # TODO: Write general description for SIC_TELIWAY + SIC_TELIWAY = 'SIC_TELIWAY'.freeze, + + # TODO: Write general description for MONDIALRELAY_FR + MONDIALRELAY_FR = 'MONDIALRELAY_FR'.freeze, + + # TODO: Write general description for INTIME_FTP + INTIME_FTP = 'INTIME_FTP'.freeze, + + # TODO: Write general description for JD_EXPRESS + JD_EXPRESS = 'JD_EXPRESS'.freeze, + + # TODO: Write general description for FASTBOX + FASTBOX = 'FASTBOX'.freeze, + + # TODO: Write general description for PATHEON + PATHEON = 'PATHEON'.freeze, + + # TODO: Write general description for INDIA_POST + INDIA_POST = 'INDIA_POST'.freeze, + + # TODO: Write general description for TIPSA_REF + TIPSA_REF = 'TIPSA_REF'.freeze, + + # TODO: Write general description for ECOFREIGHT + ECOFREIGHT = 'ECOFREIGHT'.freeze, + + # TODO: Write general description for VOX + VOX = 'VOX'.freeze, + + # TODO: Write general description for DIRECTFREIGHT_AU_REF + DIRECTFREIGHT_AU_REF = 'DIRECTFREIGHT_AU_REF'.freeze, + + # TODO: Write general description for BESTTRANSPORT_SFTP + BESTTRANSPORT_SFTP = 'BESTTRANSPORT_SFTP'.freeze, + + # TODO: Write general description for AUSTRALIA_POST_API + AUSTRALIA_POST_API = 'AUSTRALIA_POST_API'.freeze, + + # TODO: Write general description for FRAGILEPAK_SFTP + FRAGILEPAK_SFTP = 'FRAGILEPAK_SFTP'.freeze, + + # TODO: Write general description for FLIPXP + FLIPXP = 'FLIPXP'.freeze, + + # TODO: Write general description for VALUE_WEBHOOK + VALUE_WEBHOOK = 'VALUE_WEBHOOK'.freeze, + + # TODO: Write general description for DAESHIN + DAESHIN = 'DAESHIN'.freeze, + + # TODO: Write general description for SHERPA + SHERPA = 'SHERPA'.freeze, + + # TODO: Write general description for MWD_API + MWD_API = 'MWD_API'.freeze, + + # TODO: Write general description for SMARTKARGO + SMARTKARGO = 'SMARTKARGO'.freeze, + + # TODO: Write general description for DNJ_EXPRESS + DNJ_EXPRESS = 'DNJ_EXPRESS'.freeze, + + # TODO: Write general description for GOPEOPLE + GOPEOPLE = 'GOPEOPLE'.freeze, + + # TODO: Write general description for MYSENDLE_API + MYSENDLE_API = 'MYSENDLE_API'.freeze, + + # TODO: Write general description for ARAMEX_API + ARAMEX_API = 'ARAMEX_API'.freeze, + + # TODO: Write general description for PIDGE + PIDGE = 'PIDGE'.freeze, + + # TODO: Write general description for THAIPARCELS + THAIPARCELS = 'THAIPARCELS'.freeze, + + # TODO: Write general description for PANTHER_REFERENCE_API + PANTHER_REFERENCE_API = 'PANTHER_REFERENCE_API'.freeze, + + # TODO: Write general description for POSTAPLUS1 + POSTAPLUS1 = 'POSTAPLUS'.freeze, + + # TODO: Write general description for BUFFALO + BUFFALO = 'BUFFALO'.freeze, + + # TODO: Write general description for U_ENVIOS + U_ENVIOS = 'U_ENVIOS'.freeze, + + # TODO: Write general description for ELITE_CO + ELITE_CO = 'ELITE_CO'.freeze, + + # TODO: Write general description for BARQEXP + BARQEXP = 'BARQEXP'.freeze, + + # TODO: Write general description for ROCHE_INTERNAL_SFTP + ROCHE_INTERNAL_SFTP = 'ROCHE_INTERNAL_SFTP'.freeze, + + # TODO: Write general description for DBSCHENKER_ICELAND + DBSCHENKER_ICELAND = 'DBSCHENKER_ICELAND'.freeze, + + # TODO: Write general description for TNT_FR_REFERENCE + TNT_FR_REFERENCE = 'TNT_FR_REFERENCE'.freeze, + + # TODO: Write general description for NEWGISTICSAPI + NEWGISTICSAPI = 'NEWGISTICSAPI'.freeze, + + # TODO: Write general description for GLOVO + GLOVO = 'GLOVO'.freeze, + + # TODO: Write general description for GWLOGIS_API + GWLOGIS_API = 'GWLOGIS_API'.freeze, + + # TODO: Write general description for SPREETAIL_API + SPREETAIL_API = 'SPREETAIL_API'.freeze, + + # TODO: Write general description for MOOVA + MOOVA = 'MOOVA'.freeze, + + # TODO: Write general description for PLYCONGROUP + PLYCONGROUP = 'PLYCONGROUP'.freeze, + + # TODO: Write general description for USPS_WEBHOOK + USPS_WEBHOOK = 'USPS_WEBHOOK'.freeze, + + # TODO: Write general description for REIMAGINEDELIVERY + REIMAGINEDELIVERY = 'REIMAGINEDELIVERY'.freeze, + + # TODO: Write general description for EDF_FTP + EDF_FTP = 'EDF_FTP'.freeze, + + # TODO: Write general description for DAO365 + DAO365 = 'DAO365'.freeze, + + # TODO: Write general description for BIOCAIR_FTP + BIOCAIR_FTP = 'BIOCAIR_FTP'.freeze, + + # TODO: Write general description for RANSA_WEBHOOK + RANSA_WEBHOOK = 'RANSA_WEBHOOK'.freeze, + + # TODO: Write general description for SHIPXPRES + SHIPXPRES = 'SHIPXPRES'.freeze, + + # TODO: Write general description for COURANT_PLUS_API + COURANT_PLUS_API = 'COURANT_PLUS_API'.freeze, + + # TODO: Write general description for SHIPA + SHIPA = 'SHIPA'.freeze, + + # TODO: Write general description for HOMELOGISTICS + HOMELOGISTICS = 'HOMELOGISTICS'.freeze, + + # TODO: Write general description for DX + DX = 'DX'.freeze, + + # TODO: Write general description for POSTE_ITALIANE_PACCOCELERE + POSTE_ITALIANE_PACCOCELERE = 'POSTE_ITALIANE_PACCOCELERE'.freeze, + + # TODO: Write general description for TOLL_WEBHOOK + TOLL_WEBHOOK = 'TOLL_WEBHOOK'.freeze, + + # TODO: Write general description for LCTBR_API + LCTBR_API = 'LCTBR_API'.freeze, + + # TODO: Write general description for DX_FREIGHT + DX_FREIGHT = 'DX_FREIGHT'.freeze, + + # TODO: Write general description for DHL_SFTP + DHL_SFTP = 'DHL_SFTP'.freeze, + + # TODO: Write general description for SHIPROCKET + SHIPROCKET = 'SHIPROCKET'.freeze, + + # TODO: Write general description for UBER_WEBHOOK + UBER_WEBHOOK = 'UBER_WEBHOOK'.freeze, + + # TODO: Write general description for STATOVERNIGHT + STATOVERNIGHT = 'STATOVERNIGHT'.freeze, + + # TODO: Write general description for BURD + BURD = 'BURD'.freeze, + + # TODO: Write general description for FASTSHIP + FASTSHIP = 'FASTSHIP'.freeze, + + # TODO: Write general description for IBVENTURE_WEBHOOK + IBVENTURE_WEBHOOK = 'IBVENTURE_WEBHOOK'.freeze, + + # TODO: Write general description for GATI_KWE_API + GATI_KWE_API = 'GATI_KWE_API'.freeze, + + # TODO: Write general description for CRYOPDP_FTP + CRYOPDP_FTP = 'CRYOPDP_FTP'.freeze, + + # TODO: Write general description for HUBBED + HUBBED = 'HUBBED'.freeze, + + # TODO: Write general description for TIPSA_API + TIPSA_API = 'TIPSA_API'.freeze, + + # TODO: Write general description for ARASKARGO + ARASKARGO = 'ARASKARGO'.freeze, + + # TODO: Write general description for THIJS_NL + THIJS_NL = 'THIJS_NL'.freeze, + + # TODO: Write general description for ATSHEALTHCARE_REFERENCE + ATSHEALTHCARE_REFERENCE = 'ATSHEALTHCARE_REFERENCE'.freeze, + + # TODO: Write general description for ENUM_99MINUTOS + ENUM_99MINUTOS = '99MINUTOS'.freeze, + + # TODO: Write general description for HELLENIC_POST + HELLENIC_POST = 'HELLENIC_POST'.freeze, + + # TODO: Write general description for HSM_GLOBAL + HSM_GLOBAL = 'HSM_GLOBAL'.freeze, + + # TODO: Write general description for MNX + MNX = 'MNX'.freeze, + + # TODO: Write general description for NMTRANSFER + NMTRANSFER = 'NMTRANSFER'.freeze, + + # TODO: Write general description for LOGYSTO + LOGYSTO = 'LOGYSTO'.freeze, + + # TODO: Write general description for INDIA_POST_INT + INDIA_POST_INT = 'INDIA_POST_INT'.freeze, + + # TODO: Write general description for AMAZON_FBA_SWISHIP_IN + AMAZON_FBA_SWISHIP_IN = 'AMAZON_FBA_SWISHIP_IN'.freeze, + + # TODO: Write general description for SRT_TRANSPORT + SRT_TRANSPORT = 'SRT_TRANSPORT'.freeze, + + # TODO: Write general description for BOMI + BOMI = 'BOMI'.freeze, + + # TODO: Write general description for DELIVERR_SFTP + DELIVERR_SFTP = 'DELIVERR_SFTP'.freeze, + + # TODO: Write general description for HSDEXPRESS + HSDEXPRESS = 'HSDEXPRESS'.freeze, + + # TODO: Write general description for SIMPLETIRE_WEBHOOK + SIMPLETIRE_WEBHOOK = 'SIMPLETIRE_WEBHOOK'.freeze, + + # TODO: Write general description for HUNTER_EXPRESS_SFTP + HUNTER_EXPRESS_SFTP = 'HUNTER_EXPRESS_SFTP'.freeze, + + # TODO: Write general description for UPS_API + UPS_API = 'UPS_API'.freeze, + + # TODO: Write general description for WOOYOUNG_LOGISTICS_SFTP + WOOYOUNG_LOGISTICS_SFTP = 'WOOYOUNG_LOGISTICS_SFTP'.freeze, + + # TODO: Write general description for PHSE_API + PHSE_API = 'PHSE_API'.freeze, + + # TODO: Write general description for WISH_EMAIL_PUSH + WISH_EMAIL_PUSH = 'WISH_EMAIL_PUSH'.freeze, + + # TODO: Write general description for NORTHLINE + NORTHLINE = 'NORTHLINE'.freeze, + + # TODO: Write general description for MEDAFRICA + MEDAFRICA = 'MEDAFRICA'.freeze, + + # TODO: Write general description for DPD_AT_SFTP + DPD_AT_SFTP = 'DPD_AT_SFTP'.freeze, + + # TODO: Write general description for ANTERAJA + ANTERAJA = 'ANTERAJA'.freeze, + + # TODO: Write general description for DHL_GLOBAL_FORWARDING_API + DHL_GLOBAL_FORWARDING_API = 'DHL_GLOBAL_FORWARDING_API'.freeze, + + # TODO: Write general description for LBCEXPRESS_API + LBCEXPRESS_API = 'LBCEXPRESS_API'.freeze, + + # TODO: Write general description for SIMSGLOBAL + SIMSGLOBAL = 'SIMSGLOBAL'.freeze, + + # TODO: Write general description for CDLDELIVERS + CDLDELIVERS = 'CDLDELIVERS'.freeze, + + # TODO: Write general description for TYP + TYP = 'TYP'.freeze, + + # TODO: Write general description for TESTING_COURIER_WEBHOOK + TESTING_COURIER_WEBHOOK = 'TESTING_COURIER_WEBHOOK'.freeze, + + # TODO: Write general description for PANDAGO_API + PANDAGO_API = 'PANDAGO_API'.freeze, + + # TODO: Write general description for ROYAL_MAIL_FTP + ROYAL_MAIL_FTP = 'ROYAL_MAIL_FTP'.freeze, + + # TODO: Write general description for THUNDEREXPRESS + THUNDEREXPRESS = 'THUNDEREXPRESS'.freeze, + + # TODO: Write general description for SECRETLAB_WEBHOOK + SECRETLAB_WEBHOOK = 'SECRETLAB_WEBHOOK'.freeze, + + # TODO: Write general description for SETEL + SETEL = 'SETEL'.freeze, + + # TODO: Write general description for JD_WORLDWIDE + JD_WORLDWIDE = 'JD_WORLDWIDE'.freeze, + + # TODO: Write general description for DPD_RU_API + DPD_RU_API = 'DPD_RU_API'.freeze, + + # TODO: Write general description for ARGENTS_WEBHOOK + ARGENTS_WEBHOOK = 'ARGENTS_WEBHOOK'.freeze, + + # TODO: Write general description for POSTONE + POSTONE = 'POSTONE'.freeze, + + # TODO: Write general description for TUSKLOGISTICS + TUSKLOGISTICS = 'TUSKLOGISTICS'.freeze, + + # TODO: Write general description for RHENUS_UK_API + RHENUS_UK_API = 'RHENUS_UK_API'.freeze, + + # TODO: Write general description for TAQBIN_SG_API + TAQBIN_SG_API = 'TAQBIN_SG_API'.freeze, + + # TODO: Write general description for INNTRALOG_SFTP + INNTRALOG_SFTP = 'INNTRALOG_SFTP'.freeze, + + # TODO: Write general description for DAYROSS + DAYROSS = 'DAYROSS'.freeze, + + # TODO: Write general description for CORREOSEXPRESS_API + CORREOSEXPRESS_API = 'CORREOSEXPRESS_API'.freeze, + + # TODO: Write general description for INTERNATIONAL_SEUR_API + INTERNATIONAL_SEUR_API = 'INTERNATIONAL_SEUR_API'.freeze, + + # TODO: Write general description for YODEL_API + YODEL_API = 'YODEL_API'.freeze, + + # TODO: Write general description for HEROEXPRESS + HEROEXPRESS = 'HEROEXPRESS'.freeze, + + # TODO: Write general description for DHL_SUPPLYCHAIN_IN + DHL_SUPPLYCHAIN_IN = 'DHL_SUPPLYCHAIN_IN'.freeze, + + # TODO: Write general description for URGENT_CARGUS + URGENT_CARGUS = 'URGENT_CARGUS'.freeze, + + # TODO: Write general description for FRONTDOORCORP + FRONTDOORCORP = 'FRONTDOORCORP'.freeze, + + # TODO: Write general description for JTEXPRESS_PH + JTEXPRESS_PH = 'JTEXPRESS_PH'.freeze, + + # TODO: Write general description for PARCELSTARS_WEBHOOK + PARCELSTARS_WEBHOOK = 'PARCELSTARS_WEBHOOK'.freeze, + + # TODO: Write general description for DPD_SK_SFTP + DPD_SK_SFTP = 'DPD_SK_SFTP'.freeze, + + # TODO: Write general description for MOVIANTO + MOVIANTO = 'MOVIANTO'.freeze, + + # TODO: Write general description for OZEPARTS_SHIPPING + OZEPARTS_SHIPPING = 'OZEPARTS_SHIPPING'.freeze, + + # TODO: Write general description for KARGOMKOLAY + KARGOMKOLAY = 'KARGOMKOLAY'.freeze, + + # TODO: Write general description for TRUNKRS + TRUNKRS = 'TRUNKRS'.freeze, + + # TODO: Write general description for OMNIRPS_WEBHOOK + OMNIRPS_WEBHOOK = 'OMNIRPS_WEBHOOK'.freeze, + + # TODO: Write general description for CHILEXPRESS + CHILEXPRESS = 'CHILEXPRESS'.freeze, + + # TODO: Write general description for TESTING_COURIER + TESTING_COURIER = 'TESTING_COURIER'.freeze, + + # TODO: Write general description for JNE_API + JNE_API = 'JNE_API'.freeze, + + # TODO: Write general description for BJSHOMEDELIVERY_FTP + BJSHOMEDELIVERY_FTP = 'BJSHOMEDELIVERY_FTP'.freeze, + + # TODO: Write general description for DEXPRESS_WEBHOOK + DEXPRESS_WEBHOOK = 'DEXPRESS_WEBHOOK'.freeze, + + # TODO: Write general description for USPS_API + USPS_API = 'USPS_API'.freeze, + + # TODO: Write general description for TRANSVIRTUAL + TRANSVIRTUAL = 'TRANSVIRTUAL'.freeze, + + # TODO: Write general description for SOLISTICA_API + SOLISTICA_API = 'SOLISTICA_API'.freeze, + + # TODO: Write general description for CHIENVENTURE_WEBHOOK + CHIENVENTURE_WEBHOOK = 'CHIENVENTURE_WEBHOOK'.freeze, + + # TODO: Write general description for DPD_UK_SFTP + DPD_UK_SFTP = 'DPD_UK_SFTP'.freeze, + + # TODO: Write general description for INPOST_UK + INPOST_UK = 'INPOST_UK'.freeze, + + # TODO: Write general description for JAVIT + JAVIT = 'JAVIT'.freeze, + + # TODO: Write general description for ZTO_DOMESTIC + ZTO_DOMESTIC = 'ZTO_DOMESTIC'.freeze, + + # TODO: Write general description for DHL_GT_API + DHL_GT_API = 'DHL_GT_API'.freeze, + + # TODO: Write general description for CEVA_TRACKING + CEVA_TRACKING = 'CEVA_TRACKING'.freeze, + + # TODO: Write general description for KOMON_EXPRESS + KOMON_EXPRESS = 'KOMON_EXPRESS'.freeze, + + # TODO: Write general description for EASTWESTCOURIER_FTP + EASTWESTCOURIER_FTP = 'EASTWESTCOURIER_FTP'.freeze, + + # TODO: Write general description for DANNIAO + DANNIAO = 'DANNIAO'.freeze, + + # TODO: Write general description for SPECTRAN + SPECTRAN = 'SPECTRAN'.freeze, + + # TODO: Write general description for DELIVER_IT + DELIVER_IT = 'DELIVER_IT'.freeze, + + # TODO: Write general description for RELAISCOLIS + RELAISCOLIS = 'RELAISCOLIS'.freeze, + + # TODO: Write general description for GLS_SPAIN_API + GLS_SPAIN_API = 'GLS_SPAIN_API'.freeze, + + # TODO: Write general description for POSTPLUS + POSTPLUS = 'POSTPLUS'.freeze, + + # TODO: Write general description for AIRTERRA + AIRTERRA = 'AIRTERRA'.freeze, + + # TODO: Write general description for GIO_ECOURIER_API + GIO_ECOURIER_API = 'GIO_ECOURIER_API'.freeze, + + # TODO: Write general description for DPD_CH_SFTP + DPD_CH_SFTP = 'DPD_CH_SFTP'.freeze, + + # TODO: Write general description for FEDEX_API + FEDEX_API = 'FEDEX_API'.freeze, + + # TODO: Write general description for INTERSMARTTRANS + INTERSMARTTRANS = 'INTERSMARTTRANS'.freeze, + + # TODO: Write general description for HERMES_UK_SFTP + HERMES_UK_SFTP = 'HERMES_UK_SFTP'.freeze, + + # TODO: Write general description for EXELOT_FTP + EXELOT_FTP = 'EXELOT_FTP'.freeze, + + # TODO: Write general description for DHL_PA_API + DHL_PA_API = 'DHL_PA_API'.freeze, + + # TODO: Write general description for VIRTRANSPORT_SFTP + VIRTRANSPORT_SFTP = 'VIRTRANSPORT_SFTP'.freeze, + + # TODO: Write general description for WORLDNET + WORLDNET = 'WORLDNET'.freeze, + + # TODO: Write general description for INSTABOX_WEBHOOK + INSTABOX_WEBHOOK = 'INSTABOX_WEBHOOK'.freeze, + + # TODO: Write general description for KNG + KNG = 'KNG'.freeze, + + # TODO: Write general description for FLASHEXPRESS_WEBHOOK + FLASHEXPRESS_WEBHOOK = 'FLASHEXPRESS_WEBHOOK'.freeze, + + # TODO: Write general description for MAGYAR_POSTA_API + MAGYAR_POSTA_API = 'MAGYAR_POSTA_API'.freeze, + + # TODO: Write general description for WESHIP_API + WESHIP_API = 'WESHIP_API'.freeze, + + # TODO: Write general description for OHI_WEBHOOK + OHI_WEBHOOK = 'OHI_WEBHOOK'.freeze, + + # TODO: Write general description for MUDITA + MUDITA = 'MUDITA'.freeze, + + # TODO: Write general description for BLUEDART_API + BLUEDART_API = 'BLUEDART_API'.freeze, + + # TODO: Write general description for T_CAT_API + T_CAT_API = 'T_CAT_API'.freeze, + + # TODO: Write general description for ADS + ADS = 'ADS'.freeze, + + # TODO: Write general description for HERMES_IT + HERMES_IT = 'HERMES_IT'.freeze, + + # TODO: Write general description for FITZMARK_API + FITZMARK_API = 'FITZMARK_API'.freeze, + + # TODO: Write general description for POSTI_API + POSTI_API = 'POSTI_API'.freeze, + + # TODO: Write general description for SMSA_EXPRESS_WEBHOOK + SMSA_EXPRESS_WEBHOOK = 'SMSA_EXPRESS_WEBHOOK'.freeze, + + # TODO: Write general description for TAMERGROUP_WEBHOOK + TAMERGROUP_WEBHOOK = 'TAMERGROUP_WEBHOOK'.freeze, + + # TODO: Write general description for LIVRAPIDE + LIVRAPIDE = 'LIVRAPIDE'.freeze, + + # TODO: Write general description for NIPPON_EXPRESS + NIPPON_EXPRESS = 'NIPPON_EXPRESS'.freeze, + + # TODO: Write general description for BETTERTRUCKS + BETTERTRUCKS = 'BETTERTRUCKS'.freeze, + + # TODO: Write general description for FAN + FAN = 'FAN'.freeze, + + # TODO: Write general description for PB_USPSFLATS_FTP + PB_USPSFLATS_FTP = 'PB_USPSFLATS_FTP'.freeze, + + # TODO: Write general description for PARCELRIGHT + PARCELRIGHT = 'PARCELRIGHT'.freeze, + + # TODO: Write general description for ITHINKLOGISTICS + ITHINKLOGISTICS = 'ITHINKLOGISTICS'.freeze, + + # TODO: Write general description for KERRY_EXPRESS_TH_WEBHOOK + KERRY_EXPRESS_TH_WEBHOOK = 'KERRY_EXPRESS_TH_WEBHOOK'.freeze, + + # TODO: Write general description for ECOUTIER + ECOUTIER = 'ECOUTIER'.freeze, + + # TODO: Write general description for SHOWL + SHOWL = 'SHOWL'.freeze, + + # TODO: Write general description for BRT_IT_API + BRT_IT_API = 'BRT_IT_API'.freeze, + + # TODO: Write general description for RIXONHK_API + RIXONHK_API = 'RIXONHK_API'.freeze, + + # TODO: Write general description for DBSCHENKER_API + DBSCHENKER_API = 'DBSCHENKER_API'.freeze, + + # TODO: Write general description for ILYANGLOGIS + ILYANGLOGIS = 'ILYANGLOGIS'.freeze, + + # TODO: Write general description for MAIL_BOX_ETC + MAIL_BOX_ETC = 'MAIL_BOX_ETC'.freeze, + + # TODO: Write general description for WESHIP + WESHIP = 'WESHIP'.freeze, + + # TODO: Write general description for DHL_GLOBAL_MAIL_API + DHL_GLOBAL_MAIL_API = 'DHL_GLOBAL_MAIL_API'.freeze, + + # TODO: Write general description for ACTIVOS24_API + ACTIVOS24_API = 'ACTIVOS24_API'.freeze, + + # TODO: Write general description for ATSHEALTHCARE + ATSHEALTHCARE = 'ATSHEALTHCARE'.freeze, + + # TODO: Write general description for LUWJISTIK + LUWJISTIK = 'LUWJISTIK'.freeze, + + # TODO: Write general description for GW_WORLD + GW_WORLD = 'GW_WORLD'.freeze, + + # TODO: Write general description for FAIRSENDEN_API + FAIRSENDEN_API = 'FAIRSENDEN_API'.freeze, + + # TODO: Write general description for SERVIP_WEBHOOK + SERVIP_WEBHOOK = 'SERVIP_WEBHOOK'.freeze, + + # TODO: Write general description for SWISHIP + SWISHIP = 'SWISHIP'.freeze, + + # TODO: Write general description for TANET + TANET = 'TANET'.freeze, + + # TODO: Write general description for HOTSIN_CARGO + HOTSIN_CARGO = 'HOTSIN_CARGO'.freeze, + + # TODO: Write general description for DIREX + DIREX = 'DIREX'.freeze, + + # TODO: Write general description for HUANTONG + HUANTONG = 'HUANTONG'.freeze, + + # TODO: Write general description for IMILE_API + IMILE_API = 'IMILE_API'.freeze, + + # TODO: Write general description for BDMNET + BDMNET = 'BDMNET'.freeze, + + # TODO: Write general description for AUEXPRESS + AUEXPRESS = 'AUEXPRESS'.freeze, + + # TODO: Write general description for NYTLOGISTICS + NYTLOGISTICS = 'NYTLOGISTICS'.freeze, + + # TODO: Write general description for DSV_REFERENCE + DSV_REFERENCE = 'DSV_REFERENCE'.freeze, + + # TODO: Write general description for NOVOFARMA_WEBHOOK + NOVOFARMA_WEBHOOK = 'NOVOFARMA_WEBHOOK'.freeze, + + # TODO: Write general description for AITWORLDWIDE_SFTP + AITWORLDWIDE_SFTP = 'AITWORLDWIDE_SFTP'.freeze, + + # TODO: Write general description for SHOPOLIVE + SHOPOLIVE = 'SHOPOLIVE'.freeze, + + # TODO: Write general description for FNF_ZA + FNF_ZA = 'FNF_ZA'.freeze, + + # TODO: Write general description for DHL_ECOMMERCE_GC + DHL_ECOMMERCE_GC = 'DHL_ECOMMERCE_GC'.freeze, + + # TODO: Write general description for FETCHR + FETCHR = 'FETCHR'.freeze, + + # TODO: Write general description for STARLINKS_API + STARLINKS_API = 'STARLINKS_API'.freeze, + + # TODO: Write general description for YYEXPRESS + YYEXPRESS = 'YYEXPRESS'.freeze, + + # TODO: Write general description for SERVIENTREGA + SERVIENTREGA = 'SERVIENTREGA'.freeze, + + # TODO: Write general description for HANJIN + HANJIN = 'HANJIN'.freeze, + + # TODO: Write general description for SPANISH_SEUR_FTP + SPANISH_SEUR_FTP = 'SPANISH_SEUR_FTP'.freeze, + + # TODO: Write general description for DX_B2B_CONNUM + DX_B2B_CONNUM = 'DX_B2B_CONNUM'.freeze, + + # TODO: Write general description for HELTHJEM_API + HELTHJEM_API = 'HELTHJEM_API'.freeze, + + # TODO: Write general description for INEXPOST + INEXPOST = 'INEXPOST'.freeze, + + # TODO: Write general description for A2B_BA + A2B_BA = 'A2B_BA'.freeze, + + # TODO: Write general description for RHENUS_GROUP + RHENUS_GROUP = 'RHENUS_GROUP'.freeze, + + # TODO: Write general description for SBERLOGISTICS_RU + SBERLOGISTICS_RU = 'SBERLOGISTICS_RU'.freeze, + + # TODO: Write general description for MALCA_AMIT + MALCA_AMIT = 'MALCA_AMIT'.freeze, + + # TODO: Write general description for PPL + PPL = 'PPL'.freeze, + + # TODO: Write general description for OSM_WORLDWIDE_SFTP + OSM_WORLDWIDE_SFTP = 'OSM_WORLDWIDE_SFTP'.freeze, + + # TODO: Write general description for ACILOGISTIX + ACILOGISTIX = 'ACILOGISTIX'.freeze, + + # TODO: Write general description for OPTIMACOURIER + OPTIMACOURIER = 'OPTIMACOURIER'.freeze, + + # TODO: Write general description for NOVA_POSHTA_API + NOVA_POSHTA_API = 'NOVA_POSHTA_API'.freeze, + + # TODO: Write general description for LOGGI + LOGGI = 'LOGGI'.freeze, + + # TODO: Write general description for YIFAN + YIFAN = 'YIFAN'.freeze, + + # TODO: Write general description for MYDYNALOGIC + MYDYNALOGIC = 'MYDYNALOGIC'.freeze, + + # TODO: Write general description for MORNINGLOBAL + MORNINGLOBAL = 'MORNINGLOBAL'.freeze, + + # TODO: Write general description for CONCISE_API + CONCISE_API = 'CONCISE_API'.freeze, + + # TODO: Write general description for FXTRAN + FXTRAN = 'FXTRAN'.freeze, + + # TODO: Write general description for DELIVERYOURPARCEL_ZA + DELIVERYOURPARCEL_ZA = 'DELIVERYOURPARCEL_ZA'.freeze, + + # TODO: Write general description for UPARCEL + UPARCEL = 'UPARCEL'.freeze, + + # TODO: Write general description for MOBI_BR + MOBI_BR = 'MOBI_BR'.freeze, + + # TODO: Write general description for LOGINEXT_WEBHOOK + LOGINEXT_WEBHOOK = 'LOGINEXT_WEBHOOK'.freeze, + + # TODO: Write general description for EMS + EMS = 'EMS'.freeze, + + # TODO: Write general description for SPEEDY + SPEEDY = 'SPEEDY'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_details.rb b/lib/pay_pal_restap_is/models/shipping_details.rb new file mode 100644 index 0000000..4b85d38 --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_details.rb @@ -0,0 +1,94 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The shipping details. + class ShippingDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The name of the party. + # @return [ShippingName] + attr_accessor :name + + # A classification for the method of purchase fulfillment (e.g shipping, + # in-store pickup, etc). Either `type` or `options` may be present, but not + # both. + # @return [FullfillmentType] + attr_accessor :type + + # An array of shipping options that the payee or merchant offers to the + # payer to ship or pick up their items. + # @return [Array[ShippingOption]] + attr_accessor :options + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['type'] = 'type' + @_hash['options'] = 'options' + @_hash['address'] = 'address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + type + options + address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, type: SKIP, options: SKIP, address: SKIP) + @name = name unless name == SKIP + @type = type unless type == SKIP + @options = options unless options == SKIP + @address = address unless address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = ShippingName.from_hash(hash['name']) if hash['name'] + type = hash.key?('type') ? hash['type'] : SKIP + # Parameter is an array, so we need to iterate through it + options = nil + unless hash['options'].nil? + options = [] + hash['options'].each do |structure| + options << (ShippingOption.from_hash(structure) if structure) + end + end + + options = SKIP unless hash.key?('options') + address = Address.from_hash(hash['address']) if hash['address'] + + # Create object from extracted values. + ShippingDetails.new(name: name, + type: type, + options: options, + address: address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_name.rb b/lib/pay_pal_restap_is/models/shipping_name.rb new file mode 100644 index 0000000..c77869c --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_name.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The name of the party. + class ShippingName < BaseModel + SKIP = Object.new + private_constant :SKIP + + # When the party is a person, the party's full name. + # @return [String] + attr_accessor :full_name + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['full_name'] = 'full_name' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + full_name + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(full_name: SKIP) + @full_name = full_name unless full_name == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + full_name = hash.key?('full_name') ? hash['full_name'] : SKIP + + # Create object from extracted values. + ShippingName.new(full_name: full_name) + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_option.rb b/lib/pay_pal_restap_is/models/shipping_option.rb new file mode 100644 index 0000000..0781f87 --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_option.rb @@ -0,0 +1,94 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The options that the payee or merchant offers to the payer to ship or pick + # up their items. + class ShippingOption < BaseModel + SKIP = Object.new + private_constant :SKIP + + # A unique ID that identifies a payer-selected shipping option. + # @return [String] + attr_accessor :id + + # A description that the payer sees, which helps them choose an appropriate + # shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, + # `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this + # description to the payer's locale. + # @return [String] + attr_accessor :label + + # A classification for the method of purchase fulfillment. + # @return [ShippingType] + attr_accessor :type + + # The currency and amount for a financial transaction, such as a balance or + # payment due. + # @return [Money] + attr_accessor :amount + + # If the API request sets `selected = true`, it represents the shipping + # option that the payee or merchant expects to be pre-selected for the payer + # when they first view the `shipping.options` in the PayPal Checkout + # experience. As part of the response if a `shipping.option` contains + # `selected=true`, it represents the shipping option that the payer selected + # during the course of checkout with PayPal. Only one `shipping.option` can + # be set to `selected=true`. + # @return [TrueClass | FalseClass] + attr_accessor :selected + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['label'] = 'label' + @_hash['type'] = 'type' + @_hash['amount'] = 'amount' + @_hash['selected'] = 'selected' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + type + amount + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id:, label:, selected:, type: SKIP, amount: SKIP) + @id = id + @label = label + @type = type unless type == SKIP + @amount = amount unless amount == SKIP + @selected = selected + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + label = hash.key?('label') ? hash['label'] : nil + selected = hash.key?('selected') ? hash['selected'] : nil + type = hash.key?('type') ? hash['type'] : SKIP + amount = Money.from_hash(hash['amount']) if hash['amount'] + + # Create object from extracted values. + ShippingOption.new(id: id, + label: label, + selected: selected, + type: type, + amount: amount) + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_preference.rb b/lib/pay_pal_restap_is/models/shipping_preference.rb new file mode 100644 index 0000000..9db3e81 --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_preference.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The location from which the shipping address is derived. + class ShippingPreference + SHIPPING_PREFERENCE = [ + # TODO: Write general description for GET_FROM_FILE + GET_FROM_FILE = 'GET_FROM_FILE'.freeze, + + # TODO: Write general description for NO_SHIPPING + NO_SHIPPING = 'NO_SHIPPING'.freeze, + + # TODO: Write general description for SET_PROVIDED_ADDRESS + SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_type.rb b/lib/pay_pal_restap_is/models/shipping_type.rb new file mode 100644 index 0000000..f2de97f --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_type.rb @@ -0,0 +1,29 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A classification for the method of purchase fulfillment. + class ShippingType + SHIPPING_TYPE = [ + # TODO: Write general description for SHIPPING + SHIPPING = 'SHIPPING'.freeze, + + # TODO: Write general description for PICKUP + PICKUP = 'PICKUP'.freeze, + + # TODO: Write general description for PICKUP_IN_STORE + PICKUP_IN_STORE = 'PICKUP_IN_STORE'.freeze, + + # TODO: Write general description for PICKUP_FROM_PERSON + PICKUP_FROM_PERSON = 'PICKUP_FROM_PERSON'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb b/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb new file mode 100644 index 0000000..7d8bfd8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb @@ -0,0 +1,113 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The order shipping details. + class ShippingWithTrackingDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The name of the party. + # @return [ShippingName] + attr_accessor :name + + # A classification for the method of purchase fulfillment (e.g shipping, + # in-store pickup, etc). Either `type` or `options` may be present, but not + # both. + # @return [FullfillmentType] + attr_accessor :type + + # An array of shipping options that the payee or merchant offers to the + # payer to ship or pick up their items. + # @return [Array[ShippingOption]] + attr_accessor :options + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # An array of trackers for a transaction. + # @return [Array[OrderTrackerResponse]] + attr_accessor :trackers + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['type'] = 'type' + @_hash['options'] = 'options' + @_hash['address'] = 'address' + @_hash['trackers'] = 'trackers' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + type + options + address + trackers + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, type: SKIP, options: SKIP, address: SKIP, + trackers: SKIP) + @name = name unless name == SKIP + @type = type unless type == SKIP + @options = options unless options == SKIP + @address = address unless address == SKIP + @trackers = trackers unless trackers == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = ShippingName.from_hash(hash['name']) if hash['name'] + type = hash.key?('type') ? hash['type'] : SKIP + # Parameter is an array, so we need to iterate through it + options = nil + unless hash['options'].nil? + options = [] + hash['options'].each do |structure| + options << (ShippingOption.from_hash(structure) if structure) + end + end + + options = SKIP unless hash.key?('options') + address = Address.from_hash(hash['address']) if hash['address'] + # Parameter is an array, so we need to iterate through it + trackers = nil + unless hash['trackers'].nil? + trackers = [] + hash['trackers'].each do |structure| + trackers << (OrderTrackerResponse.from_hash(structure) if structure) + end + end + + trackers = SKIP unless hash.key?('trackers') + + # Create object from extracted values. + ShippingWithTrackingDetails.new(name: name, + type: type, + options: options, + address: address, + trackers: trackers) + end + end +end diff --git a/lib/pay_pal_restap_is/models/sofort_payment_object.rb b/lib/pay_pal_restap_is/models/sofort_payment_object.rb new file mode 100644 index 0000000..bde504b --- /dev/null +++ b/lib/pay_pal_restap_is/models/sofort_payment_object.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information used to pay using Sofort. + class SofortPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + iban_last_chars + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP, + iban_last_chars: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + + # Create object from extracted values. + SofortPaymentObject.new(name: name, + country_code: country_code, + bic: bic, + iban_last_chars: iban_last_chars) + end + end +end diff --git a/lib/pay_pal_restap_is/models/sofort_payment_request.rb b/lib/pay_pal_restap_is/models/sofort_payment_request.rb new file mode 100644 index 0000000..f184766 --- /dev/null +++ b/lib/pay_pal_restap_is/models/sofort_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Sofort. + class SofortPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + SofortPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/standard_entry_class_code.rb b/lib/pay_pal_restap_is/models/standard_entry_class_code.rb new file mode 100644 index 0000000..f1facdf --- /dev/null +++ b/lib/pay_pal_restap_is/models/standard_entry_class_code.rb @@ -0,0 +1,36 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # NACHA (the regulatory body governing the ACH network) requires that API + # callers (merchants, partners) obtain the consumer’s explicit authorization + # before initiating a transaction. To stay compliant, you’ll need to make sure + # that you retain a compliant authorization for each transaction that you + # originate to the ACH Network using this API. ACH transactions are + # categorized (using SEC codes) by how you capture authorization from the + # Receiver (the person whose bank account is being debited or credited). + # PayPal supports the following SEC codes. + class StandardEntryClassCode + STANDARD_ENTRY_CLASS_CODE = [ + # TODO: Write general description for TEL + TEL = 'TEL'.freeze, + + # TODO: Write general description for WEB + WEB = 'WEB'.freeze, + + # TODO: Write general description for CCD + CCD = 'CCD'.freeze, + + # TODO: Write general description for PPD + PPD = 'PPD'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb b/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb new file mode 100644 index 0000000..5dd1877 --- /dev/null +++ b/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb @@ -0,0 +1,20 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Defines how and when the payment source gets vaulted. + class StoreInVaultInstruction + STORE_IN_VAULT_INSTRUCTION = [ + # TODO: Write general description for ON_SUCCESS + ON_SUCCESS = 'ON_SUCCESS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source.rb b/lib/pay_pal_restap_is/models/stored_payment_source.rb new file mode 100644 index 0000000..f287208 --- /dev/null +++ b/lib/pay_pal_restap_is/models/stored_payment_source.rb @@ -0,0 +1,95 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Provides additional details to process a payment using a `payment_source` + # that has been stored or is intended to be stored (also referred to as + # stored_credential or card-on-file).
Parameter + # compatibility:
  • `payment_type=ONE_TIME` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with + # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or + # `previous_network_transaction_reference` is compatible only with + # `payment_initiator=MERCHANT`.
  • Only one of the parameters - + # `previous_transaction_reference` and + # `previous_network_transaction_reference` - can be present in the + # request.
+ class StoredPaymentSource < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The person or party who initiated or triggered the payment. + # @return [PaymentInitiator] + attr_accessor :payment_initiator + + # Indicates the type of the stored payment_source payment. + # @return [StoredPaymentSourcePaymentType] + attr_accessor :payment_type + + # Indicates if this is a `first` or `subsequent` payment using a stored + # payment source (also referred to as stored credential or card on file). + # @return [StoredPaymentSourceUsageType] + attr_accessor :usage + + # Reference values used by the card network to identify a transaction. + # @return [NetworkTransactionReference] + attr_accessor :previous_network_transaction_reference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['payment_initiator'] = 'payment_initiator' + @_hash['payment_type'] = 'payment_type' + @_hash['usage'] = 'usage' + @_hash['previous_network_transaction_reference'] = + 'previous_network_transaction_reference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + usage + previous_network_transaction_reference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(payment_initiator:, payment_type:, + usage: StoredPaymentSourceUsageType::DERIVED, + previous_network_transaction_reference: SKIP) + @payment_initiator = payment_initiator + @payment_type = payment_type + @usage = usage unless usage == SKIP + unless previous_network_transaction_reference == SKIP + @previous_network_transaction_reference = + previous_network_transaction_reference + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + payment_initiator = + hash.key?('payment_initiator') ? hash['payment_initiator'] : nil + payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil + usage = hash['usage'] ||= StoredPaymentSourceUsageType::DERIVED + if hash['previous_network_transaction_reference'] + previous_network_transaction_reference = NetworkTransactionReference.from_hash(hash['previous_network_transaction_reference']) + end + + # Create object from extracted values. + StoredPaymentSource.new(payment_initiator: payment_initiator, + payment_type: payment_type, + usage: usage, + previous_network_transaction_reference: previous_network_transaction_reference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb b/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb new file mode 100644 index 0000000..8a2293a --- /dev/null +++ b/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Indicates the type of the stored payment_source payment. + class StoredPaymentSourcePaymentType + STORED_PAYMENT_SOURCE_PAYMENT_TYPE = [ + # TODO: Write general description for ONE_TIME + ONE_TIME = 'ONE_TIME'.freeze, + + # TODO: Write general description for RECURRING + RECURRING = 'RECURRING'.freeze, + + # TODO: Write general description for UNSCHEDULED + UNSCHEDULED = 'UNSCHEDULED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb b/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb new file mode 100644 index 0000000..490c416 --- /dev/null +++ b/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb @@ -0,0 +1,27 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Indicates if this is a `first` or `subsequent` payment using a stored + # payment source (also referred to as stored credential or card on file). + class StoredPaymentSourceUsageType + STORED_PAYMENT_SOURCE_USAGE_TYPE = [ + # TODO: Write general description for FIRST + FIRST = 'FIRST'.freeze, + + # TODO: Write general description for SUBSEQUENT + SUBSEQUENT = 'SUBSEQUENT'.freeze, + + # TODO: Write general description for DERIVED + DERIVED = 'DERIVED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/supplementary_data.rb b/lib/pay_pal_restap_is/models/supplementary_data.rb new file mode 100644 index 0000000..90eef5e --- /dev/null +++ b/lib/pay_pal_restap_is/models/supplementary_data.rb @@ -0,0 +1,58 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Supplementary data about a payment. This object passes information that can + # be used to improve risk assessments and processing costs, for example, by + # providing Level 2 and Level 3 payment data. + class SupplementaryData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Merchants and partners can add Level 2 and 3 data to payments to reduce + # risk and payment processing costs. For more information about processing + # payments, see che + # ckout or multiparty checkout. + # @return [CardSupplementaryData] + attr_accessor :card + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['card'] = 'card' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + card + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(card: SKIP) + @card = card unless card == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + card = CardSupplementaryData.from_hash(hash['card']) if hash['card'] + + # Create object from extracted values. + SupplementaryData.new(card: card) + end + end +end diff --git a/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb b/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb new file mode 100644 index 0000000..1bb753b --- /dev/null +++ b/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb @@ -0,0 +1,63 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The capture identification-related fields. Includes the invoice ID, custom + # ID, note to payer, and soft descriptor. + class SupplementaryPurchaseData < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The API caller-provided external invoice number for this order. Appears in + # both the payer's transaction history and the emails that the payer + # receives. + # @return [String] + attr_accessor :invoice_id + + # An informational note about this settlement. Appears in both the payer's + # transaction history and the emails that the payer receives. + # @return [String] + attr_accessor :note_to_payer + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['invoice_id'] = 'invoice_id' + @_hash['note_to_payer'] = 'note_to_payer' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + invoice_id + note_to_payer + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(invoice_id: SKIP, note_to_payer: SKIP) + @invoice_id = invoice_id unless invoice_id == SKIP + @note_to_payer = note_to_payer unless note_to_payer == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP + note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP + + # Create object from extracted values. + SupplementaryPurchaseData.new(invoice_id: invoice_id, + note_to_payer: note_to_payer) + end + end +end diff --git a/lib/pay_pal_restap_is/models/tax_id_type.rb b/lib/pay_pal_restap_is/models/tax_id_type.rb new file mode 100644 index 0000000..8e8ffae --- /dev/null +++ b/lib/pay_pal_restap_is/models/tax_id_type.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The customer's tax ID type. + class TaxIdType + TAX_ID_TYPE = [ + # TODO: Write general description for BR_CPF + BR_CPF = 'BR_CPF'.freeze, + + # TODO: Write general description for BR_CNPJ + BR_CNPJ = 'BR_CNPJ'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/tax_info.rb b/lib/pay_pal_restap_is/models/tax_info.rb new file mode 100644 index 0000000..3fbb8c8 --- /dev/null +++ b/lib/pay_pal_restap_is/models/tax_info.rb @@ -0,0 +1,57 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The tax ID of the customer. The customer is also known as the payer. Both + # `tax_id` and `tax_id_type` are required. + class TaxInfo < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The customer's tax ID value. + # @return [String] + attr_accessor :tax_id + + # The customer's tax ID type. + # @return [TaxIdType] + attr_accessor :tax_id_type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['tax_id'] = 'tax_id' + @_hash['tax_id_type'] = 'tax_id_type' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(tax_id:, tax_id_type:) + @tax_id = tax_id + @tax_id_type = tax_id_type + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + tax_id = hash.key?('tax_id') ? hash['tax_id'] : nil + tax_id_type = hash.key?('tax_id_type') ? hash['tax_id_type'] : nil + + # Create object from extracted values. + TaxInfo.new(tax_id: tax_id, + tax_id_type: tax_id_type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb b/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb new file mode 100644 index 0000000..f24a67b --- /dev/null +++ b/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb @@ -0,0 +1,62 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Results of 3D Secure Authentication. + class ThreeDSecureAuthenticationResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Transactions status result identifier. The outcome of the issuer's + # authentication. + # @return [PAResStatus] + attr_accessor :authentication_status + + # Status of Authentication eligibility. + # @return [EnrollmentStatus] + attr_accessor :enrollment_status + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['authentication_status'] = 'authentication_status' + @_hash['enrollment_status'] = 'enrollment_status' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + authentication_status + enrollment_status + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(authentication_status: SKIP, enrollment_status: SKIP) + @authentication_status = authentication_status unless authentication_status == SKIP + @enrollment_status = enrollment_status unless enrollment_status == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + authentication_status = + hash.key?('authentication_status') ? hash['authentication_status'] : SKIP + enrollment_status = + hash.key?('enrollment_status') ? hash['enrollment_status'] : SKIP + + # Create object from extracted values. + ThreeDSecureAuthenticationResponse.new(authentication_status: authentication_status, + enrollment_status: enrollment_status) + end + end +end diff --git a/lib/pay_pal_restap_is/models/token.rb b/lib/pay_pal_restap_is/models/token.rb new file mode 100644 index 0000000..76f18b2 --- /dev/null +++ b/lib/pay_pal_restap_is/models/token.rb @@ -0,0 +1,56 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The tokenized payment source to fund a payment. + class Token < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the token. + # @return [String] + attr_accessor :id + + # The tokenization method that generated the ID. + # @return [TokenType] + attr_accessor :type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['type'] = 'type' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id:, type:) + @id = id + @type = type + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + type = hash.key?('type') ? hash['type'] : nil + + # Create object from extracted values. + Token.new(id: id, + type: type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/token_type.rb b/lib/pay_pal_restap_is/models/token_type.rb new file mode 100644 index 0000000..45540dd --- /dev/null +++ b/lib/pay_pal_restap_is/models/token_type.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The tokenization method that generated the ID. + class TokenType + TOKEN_TYPE = [ + # TODO: Write general description for BILLING_AGREEMENT + BILLING_AGREEMENT = 'BILLING_AGREEMENT'.freeze, + + # TODO: Write general description for SETUP_TOKEN + SETUP_TOKEN = 'SETUP_TOKEN'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/trustly_payment_object.rb b/lib/pay_pal_restap_is/models/trustly_payment_object.rb new file mode 100644 index 0000000..ddb5925 --- /dev/null +++ b/lib/pay_pal_restap_is/models/trustly_payment_object.rb @@ -0,0 +1,85 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Trustly. + class TrustlyPaymentObject < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # The business identification code (BIC). In payments systems, a BIC is used + # to identify a specific business, most commonly a bank. + # @return [String] + attr_accessor :bic + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['bic'] = 'bic' + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + country_code + bic + iban_last_chars + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, country_code: SKIP, bic: SKIP, + iban_last_chars: SKIP) + @name = name unless name == SKIP + @country_code = country_code unless country_code == SKIP + @bic = bic unless bic == SKIP + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : SKIP + country_code = hash.key?('country_code') ? hash['country_code'] : SKIP + bic = hash.key?('bic') ? hash['bic'] : SKIP + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + + # Create object from extracted values. + TrustlyPaymentObject.new(name: name, + country_code: country_code, + bic: bic, + iban_last_chars: iban_last_chars) + end + end +end diff --git a/lib/pay_pal_restap_is/models/trustly_payment_request.rb b/lib/pay_pal_restap_is/models/trustly_payment_request.rb new file mode 100644 index 0000000..7a6e714 --- /dev/null +++ b/lib/pay_pal_restap_is/models/trustly_payment_request.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Trustly. + class TrustlyPaymentRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The full name representation like Mr J Smith. + # @return [String] + attr_accessor :name + + # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) + # that identifies the country or region.
Note: + # The country code for Great Britain is GB and not + # UK as used in the top-level domain names for that country. + # Use the `C2` country code for China worldwide for comparable uncontrolled + # price (CUP) method, bank card, and cross-border transactions.
+ # @return [String] + attr_accessor :country_code + + # Customizes the payer experience during the approval process for the + # payment. + # @return [ExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['country_code'] = 'country_code' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name:, country_code:, experience_context: SKIP) + @name = name + @country_code = country_code + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = hash.key?('name') ? hash['name'] : nil + country_code = hash.key?('country_code') ? hash['country_code'] : nil + experience_context = ExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + TrustlyPaymentRequest.new(name: name, + country_code: country_code, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/universal_product_code.rb b/lib/pay_pal_restap_is/models/universal_product_code.rb new file mode 100644 index 0000000..7d0479c --- /dev/null +++ b/lib/pay_pal_restap_is/models/universal_product_code.rb @@ -0,0 +1,56 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The Universal Product Code of the item. + class UniversalProductCode < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The Universal Product Code type. + # @return [UPCType] + attr_accessor :type + + # The UPC product code of the item. + # @return [String] + attr_accessor :code + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['type'] = 'type' + @_hash['code'] = 'code' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(type:, code:) + @type = type + @code = code + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + type = hash.key?('type') ? hash['type'] : nil + code = hash.key?('code') ? hash['code'] : nil + + # Create object from extracted values. + UniversalProductCode.new(type: type, + code: code) + end + end +end diff --git a/lib/pay_pal_restap_is/models/upc_type.rb b/lib/pay_pal_restap_is/models/upc_type.rb new file mode 100644 index 0000000..9261741 --- /dev/null +++ b/lib/pay_pal_restap_is/models/upc_type.rb @@ -0,0 +1,38 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The Universal Product Code type. + class UPCType + UPC_TYPE = [ + # TODO: Write general description for UPCA + UPCA = 'UPC-A'.freeze, + + # TODO: Write general description for UPCB + UPCB = 'UPC-B'.freeze, + + # TODO: Write general description for UPCC + UPCC = 'UPC-C'.freeze, + + # TODO: Write general description for UPCD + UPCD = 'UPC-D'.freeze, + + # TODO: Write general description for UPCE + UPCE = 'UPC-E'.freeze, + + # TODO: Write general description for UPC2 + UPC2 = 'UPC-2'.freeze, + + # TODO: Write general description for UPC5 + UPC5 = 'UPC-5'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_customer.rb b/lib/pay_pal_restap_is/models/vault_customer.rb new file mode 100644 index 0000000..65017b7 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_customer.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a customer in PayPal's system of record. + class VaultCustomer < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP) + @id = id unless id == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + + # Create object from extracted values. + VaultCustomer.new(id: id) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_experience_context.rb b/lib/pay_pal_restap_is/models/vault_experience_context.rb new file mode 100644 index 0000000..02b2d65 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_experience_context.rb @@ -0,0 +1,112 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the Vault creation flow experience for your customers. + class VaultExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the + # language in which to localize the error-related strings, such as messages, + # issues, and suggested actions. The tag is made up of the [ISO 639-2 + # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), + # the optional [ISO-15924 script + # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 + # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region + # code](https://unstats.un.org/unsd/methodology/m49/). + # @return [String] + attr_accessor :locale + + # The URL where the customer is redirected after customer approves leaves + # the flow. It is a required field for contingency flows like PayPal wallet, + # 3DS. + # @return [String] + attr_accessor :return_url + + # The URL where the customer is redirected after customer cancels or leaves + # the flow. It is a required field for contingency flows like PayPal wallet, + # 3DS. + # @return [String] + attr_accessor :cancel_url + + # The shipping preference. This only applies to PayPal payment source. + # @return [String] + attr_accessor :shipping_preference + + # Vault Instruction on action to be performed after a successful payer + # approval. + # @return [String] + attr_accessor :vault_instruction + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['locale'] = 'locale' + @_hash['return_url'] = 'return_url' + @_hash['cancel_url'] = 'cancel_url' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['vault_instruction'] = 'vault_instruction' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + locale + return_url + cancel_url + shipping_preference + vault_instruction + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, + cancel_url: SKIP, shipping_preference: 'GET_FROM_FILE', + vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') + @brand_name = brand_name unless brand_name == SKIP + @locale = locale unless locale == SKIP + @return_url = return_url unless return_url == SKIP + @cancel_url = cancel_url unless cancel_url == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @vault_instruction = vault_instruction unless vault_instruction == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + locale = hash.key?('locale') ? hash['locale'] : SKIP + return_url = hash.key?('return_url') ? hash['return_url'] : SKIP + cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP + shipping_preference = hash['shipping_preference'] ||= 'GET_FROM_FILE' + vault_instruction = + hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' + + # Create object from extracted values. + VaultExperienceContext.new(brand_name: brand_name, + locale: locale, + return_url: return_url, + cancel_url: cancel_url, + shipping_preference: shipping_preference, + vault_instruction: vault_instruction) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_instruction.rb b/lib/pay_pal_restap_is/models/vault_instruction.rb new file mode 100644 index 0000000..fc02c8d --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_instruction.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Base vaulting specification. The object can be extended for specific use + # cases within each payment_source that supports vaulting. + class VaultInstruction < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Defines how and when the payment source gets vaulted. + # @return [StoreInVaultInstruction] + attr_accessor :store_in_vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['store_in_vault'] = 'store_in_vault' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(store_in_vault:) + @store_in_vault = store_in_vault + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + store_in_vault = + hash.key?('store_in_vault') ? hash['store_in_vault'] : nil + + # Create object from extracted values. + VaultInstruction.new(store_in_vault: store_in_vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_instruction_base.rb b/lib/pay_pal_restap_is/models/vault_instruction_base.rb new file mode 100644 index 0000000..ea770c0 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_instruction_base.rb @@ -0,0 +1,52 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Basic vault instruction specification that can be extended by specific + # payment sources that supports vaulting. + class VaultInstructionBase < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Defines how and when the payment source gets vaulted. + # @return [StoreInVaultInstruction] + attr_accessor :store_in_vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['store_in_vault'] = 'store_in_vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + store_in_vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(store_in_vault: SKIP) + @store_in_vault = store_in_vault unless store_in_vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + store_in_vault = + hash.key?('store_in_vault') ? hash['store_in_vault'] : SKIP + + # Create object from extracted values. + VaultInstructionBase.new(store_in_vault: store_in_vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb b/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb new file mode 100644 index 0000000..d1aaafa --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb @@ -0,0 +1,115 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A resource representing a request to vault PayPal Wallet. + class VaultPayPalWalletRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The description displayed to the consumer on the approval flow for a + # digital wallet, as well as on the merchant view of the payment token + # management experience. exp: PayPal.com. + # @return [String] + attr_accessor :description + + # The shipping details. + # @return [VaultedDigitalWalletShippingDetails] + attr_accessor :shipping + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # The usage type associated with a digital wallet payment token. + # @return [String] + attr_accessor :usage_type + + # The customer type associated with a digital wallet payment token. This is + # to indicate whether the customer acting on the merchant / platform is + # either a business or a consumer. + # @return [String] + attr_accessor :customer_type + + # Customizes the Vault creation flow experience for your customers. + # @return [VaultExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['description'] = 'description' + @_hash['shipping'] = 'shipping' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + shipping + permit_multiple_payment_tokens + usage_type + customer_type + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(description: SKIP, shipping: SKIP, + permit_multiple_payment_tokens: false, usage_type: SKIP, + customer_type: SKIP, experience_context: SKIP) + @description = description unless description == SKIP + @shipping = shipping unless shipping == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + @usage_type = usage_type unless usage_type == SKIP + @customer_type = customer_type unless customer_type == SKIP + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + description = hash.key?('description') ? hash['description'] : SKIP + shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if + hash['shipping'] + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP + customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP + experience_context = VaultExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + VaultPayPalWalletRequest.new(description: description, + shipping: shipping, + permit_multiple_payment_tokens: permit_multiple_payment_tokens, + usage_type: usage_type, + customer_type: customer_type, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_response.rb b/lib/pay_pal_restap_is/models/vault_response.rb new file mode 100644 index 0000000..d99219f --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_response.rb @@ -0,0 +1,86 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a saved payment source. + class VaultResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the saved payment source. + # @return [String] + attr_accessor :id + + # The vault status. + # @return [VaultStatus] + attr_accessor :status + + # The details about a customer in PayPal's system of record. + # @return [VaultCustomer] + attr_accessor :customer + + # An array of request-related HATEOAS links. + # @return [Array[LinkDescription]] + attr_accessor :links + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['status'] = 'status' + @_hash['customer'] = 'customer' + @_hash['links'] = 'links' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + status + customer + links + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, status: SKIP, customer: SKIP, links: SKIP) + @id = id unless id == SKIP + @status = status unless status == SKIP + @customer = customer unless customer == SKIP + @links = links unless links == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + status = hash.key?('status') ? hash['status'] : SKIP + customer = VaultCustomer.from_hash(hash['customer']) if hash['customer'] + # Parameter is an array, so we need to iterate through it + links = nil + unless hash['links'].nil? + links = [] + hash['links'].each do |structure| + links << (LinkDescription.from_hash(structure) if structure) + end + end + + links = SKIP unless hash.key?('links') + + # Create object from extracted values. + VaultResponse.new(id: id, + status: status, + customer: customer, + links: links) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb b/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb new file mode 100644 index 0000000..7216070 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb @@ -0,0 +1,76 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # An API resource used in the response of securely storing a SEPA Debit. + class VaultSEPADebitResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The last characters of the IBAN used to pay. + # @return [String] + attr_accessor :iban_last_chars + + # The last characters of the IBAN used to pay. + # @return [Object] + attr_accessor :account_holder_name + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :billing_address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['iban_last_chars'] = 'iban_last_chars' + @_hash['account_holder_name'] = 'account_holder_name' + @_hash['billing_address'] = 'billing_address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + iban_last_chars + account_holder_name + billing_address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(iban_last_chars: SKIP, account_holder_name: SKIP, + billing_address: SKIP) + @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP + @account_holder_name = account_holder_name unless account_holder_name == SKIP + @billing_address = billing_address unless billing_address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + iban_last_chars = + hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP + account_holder_name = + hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP + billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] + + # Create object from extracted values. + VaultSEPADebitResponse.new(iban_last_chars: iban_last_chars, + account_holder_name: account_holder_name, + billing_address: billing_address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_status.rb b/lib/pay_pal_restap_is/models/vault_status.rb new file mode 100644 index 0000000..ca2e567 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_status.rb @@ -0,0 +1,26 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The vault status. + class VaultStatus + VAULT_STATUS = [ + # TODO: Write general description for VAULTED + VAULTED = 'VAULTED'.freeze, + + # TODO: Write general description for CREATED + CREATED = 'CREATED'.freeze, + + # TODO: Write general description for APPROVED + APPROVED = 'APPROVED'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_token_request.rb b/lib/pay_pal_restap_is/models/vault_token_request.rb new file mode 100644 index 0000000..2e7a958 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_token_request.rb @@ -0,0 +1,56 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The Tokenized Payment Source representing a Request to Vault a Token. + class VaultTokenRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the token. + # @return [String] + attr_accessor :id + + # The tokenization method that generated the ID. + # @return [TokenType] + attr_accessor :type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['type'] = 'type' + @_hash + end + + # An array for optional fields + def self.optionals + [] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id:, type:) + @id = id + @type = type + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : nil + type = hash.key?('type') ? hash['type'] : nil + + # Create object from extracted values. + VaultTokenRequest.new(id: id, + type: type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb b/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb new file mode 100644 index 0000000..e2c8eb5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb @@ -0,0 +1,73 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the Vault creation flow experience for your customers. + class VaultVenmoExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The label that overrides the business name in the PayPal account on the + # PayPal site. The pattern is defined by an external party and supports + # Unicode. + # @return [String] + attr_accessor :brand_name + + # The shipping preference. This only applies to PayPal payment source. + # @return [String] + attr_accessor :shipping_preference + + # Vault Instruction on action to be performed after a successful payer + # approval. + # @return [String] + attr_accessor :vault_instruction + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash['vault_instruction'] = 'vault_instruction' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + shipping_preference + vault_instruction + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, shipping_preference: 'GET_FROM_FILE', + vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') + @brand_name = brand_name unless brand_name == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + @vault_instruction = vault_instruction unless vault_instruction == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + shipping_preference = hash['shipping_preference'] ||= 'GET_FROM_FILE' + vault_instruction = + hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' + + # Create object from extracted values. + VaultVenmoExperienceContext.new(brand_name: brand_name, + shipping_preference: shipping_preference, + vault_instruction: vault_instruction) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vault_venmo_request.rb b/lib/pay_pal_restap_is/models/vault_venmo_request.rb new file mode 100644 index 0000000..3e7a392 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vault_venmo_request.rb @@ -0,0 +1,115 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # VaultVenmoRequest Model. + class VaultVenmoRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The description displayed to the consumer on the approval flow for a + # digital wallet, as well as on the merchant view of the payment token + # management experience. exp: PayPal.com. + # @return [String] + attr_accessor :description + + # The shipping details. + # @return [VaultedDigitalWalletShippingDetails] + attr_accessor :shipping + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # The usage type associated with a digital wallet payment token. + # @return [String] + attr_accessor :usage_type + + # The customer type associated with a digital wallet payment token. This is + # to indicate whether the customer acting on the merchant / platform is + # either a business or a consumer. + # @return [String] + attr_accessor :customer_type + + # Customizes the Vault creation flow experience for your customers. + # @return [VaultVenmoExperienceContext] + attr_accessor :experience_context + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['description'] = 'description' + @_hash['shipping'] = 'shipping' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['experience_context'] = 'experience_context' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + shipping + permit_multiple_payment_tokens + usage_type + customer_type + experience_context + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(description: SKIP, shipping: SKIP, + permit_multiple_payment_tokens: false, usage_type: SKIP, + customer_type: SKIP, experience_context: SKIP) + @description = description unless description == SKIP + @shipping = shipping unless shipping == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + @usage_type = usage_type unless usage_type == SKIP + @customer_type = customer_type unless customer_type == SKIP + @experience_context = experience_context unless experience_context == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + description = hash.key?('description') ? hash['description'] : SKIP + shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if + hash['shipping'] + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP + customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP + experience_context = VaultVenmoExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + + # Create object from extracted values. + VaultVenmoRequest.new(description: description, + shipping: shipping, + permit_multiple_payment_tokens: permit_multiple_payment_tokens, + usage_type: usage_type, + customer_type: customer_type, + experience_context: experience_context) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb b/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb new file mode 100644 index 0000000..db516d5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb @@ -0,0 +1,106 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Resource consolidating common request and response attributes for vaulting a + # Digital Wallet. + class VaultedDigitalWallet < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The description displayed to the consumer on the approval flow for a + # digital wallet, as well as on the merchant view of the payment token + # management experience. exp: PayPal.com. + # @return [String] + attr_accessor :description + + # The shipping details. + # @return [VaultedDigitalWalletShippingDetails] + attr_accessor :shipping + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # The usage type associated with a digital wallet payment token. + # @return [String] + attr_accessor :usage_type + + # The customer type associated with a digital wallet payment token. This is + # to indicate whether the customer acting on the merchant / platform is + # either a business or a consumer. + # @return [String] + attr_accessor :customer_type + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['description'] = 'description' + @_hash['shipping'] = 'shipping' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + shipping + permit_multiple_payment_tokens + usage_type + customer_type + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(description: SKIP, shipping: SKIP, + permit_multiple_payment_tokens: false, usage_type: SKIP, + customer_type: SKIP) + @description = description unless description == SKIP + @shipping = shipping unless shipping == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + @usage_type = usage_type unless usage_type == SKIP + @customer_type = customer_type unless customer_type == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + description = hash.key?('description') ? hash['description'] : SKIP + shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if + hash['shipping'] + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP + customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP + + # Create object from extracted values. + VaultedDigitalWallet.new(description: description, + shipping: shipping, + permit_multiple_payment_tokens: permit_multiple_payment_tokens, + usage_type: usage_type, + customer_type: customer_type) + end + end +end diff --git a/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb b/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb new file mode 100644 index 0000000..f80cb7d --- /dev/null +++ b/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb @@ -0,0 +1,75 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The shipping details. + class VaultedDigitalWalletShippingDetails < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The name of the party. + # @return [ShippingName] + attr_accessor :name + + # A classification for the method of purchase fulfillment (e.g shipping, + # in-store pickup, etc). Either `type` or `options` may be present, but not + # both. + # @return [FullfillmentType] + attr_accessor :type + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['name'] = 'name' + @_hash['type'] = 'type' + @_hash['address'] = 'address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + name + type + address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(name: SKIP, type: SKIP, address: SKIP) + @name = name unless name == SKIP + @type = type unless type == SKIP + @address = address unless address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + name = ShippingName.from_hash(hash['name']) if hash['name'] + type = hash.key?('type') ? hash['type'] : SKIP + address = Address.from_hash(hash['address']) if hash['address'] + + # Create object from extracted values. + VaultedDigitalWalletShippingDetails.new(name: name, + type: type, + address: address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token.rb b/lib/pay_pal_restap_is/models/venmo_payment_token.rb new file mode 100644 index 0000000..64c0241 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_payment_token.rb @@ -0,0 +1,169 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # VenmoPaymentToken Model. + class VenmoPaymentToken < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The description displayed to the consumer on the approval flow for a + # digital wallet, as well as on the merchant view of the payment token + # management experience. exp: PayPal.com. + # @return [String] + attr_accessor :description + + # The shipping details. + # @return [VaultedDigitalWalletShippingDetails] + attr_accessor :shipping + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same PayPal account. This only applies to + # PayPal payment source. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # The usage type associated with a digital wallet payment token. + # @return [String] + attr_accessor :usage_type + + # The customer type associated with a digital wallet payment token. This is + # to indicate whether the customer acting on the merchant / platform is + # either a business or a consumer. + # @return [String] + attr_accessor :customer_type + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The account identifier for a PayPal account. + # @return [String] + attr_accessor :payer_id + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone information. + # @return [PhoneWithType] + attr_accessor :phone + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # The Venmo username, as chosen by the user. + # @return [String] + attr_accessor :user_name + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['description'] = 'description' + @_hash['shipping'] = 'shipping' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['email_address'] = 'email_address' + @_hash['payer_id'] = 'payer_id' + @_hash['name'] = 'name' + @_hash['phone'] = 'phone' + @_hash['address'] = 'address' + @_hash['user_name'] = 'user_name' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + shipping + permit_multiple_payment_tokens + usage_type + customer_type + email_address + payer_id + name + phone + address + user_name + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(description: SKIP, shipping: SKIP, + permit_multiple_payment_tokens: false, usage_type: SKIP, + customer_type: SKIP, email_address: SKIP, payer_id: SKIP, + name: SKIP, phone: SKIP, address: SKIP, user_name: SKIP) + @description = description unless description == SKIP + @shipping = shipping unless shipping == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + @usage_type = usage_type unless usage_type == SKIP + @customer_type = customer_type unless customer_type == SKIP + @email_address = email_address unless email_address == SKIP + @payer_id = payer_id unless payer_id == SKIP + @name = name unless name == SKIP + @phone = phone unless phone == SKIP + @address = address unless address == SKIP + @user_name = user_name unless user_name == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + description = hash.key?('description') ? hash['description'] : SKIP + shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if + hash['shipping'] + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP + customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] + address = Address.from_hash(hash['address']) if hash['address'] + user_name = hash.key?('user_name') ? hash['user_name'] : SKIP + + # Create object from extracted values. + VenmoPaymentToken.new(description: description, + shipping: shipping, + permit_multiple_payment_tokens: permit_multiple_payment_tokens, + usage_type: usage_type, + customer_type: customer_type, + email_address: email_address, + payer_id: payer_id, + name: name, + phone: phone, + address: address, + user_name: user_name) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb new file mode 100644 index 0000000..25f3626 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb @@ -0,0 +1,25 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The customer type associated with the Venmo payment token. This is to + # indicate whether the customer acting on the merchant / platform is either a + # business or a consumer. + class VenmoPaymentTokenCustomerType + VENMO_PAYMENT_TOKEN_CUSTOMER_TYPE = [ + # TODO: Write general description for CONSUMER + CONSUMER = 'CONSUMER'.freeze, + + # TODO: Write general description for BUSINESS + BUSINESS = 'BUSINESS'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb new file mode 100644 index 0000000..c12432f --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb @@ -0,0 +1,35 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Expected business/pricing model for the billing agreement. + class VenmoPaymentTokenUsagePattern + VENMO_PAYMENT_TOKEN_USAGE_PATTERN = [ + # TODO: Write general description for IMMEDIATE + IMMEDIATE = 'IMMEDIATE'.freeze, + + # TODO: Write general description for DEFERRED + DEFERRED = 'DEFERRED'.freeze, + + # TODO: Write general description for RECURRING_PREPAID + RECURRING_PREPAID = 'RECURRING_PREPAID'.freeze, + + # TODO: Write general description for RECURRING_POSTPAID + RECURRING_POSTPAID = 'RECURRING_POSTPAID'.freeze, + + # TODO: Write general description for THRESHOLD_PREPAID + THRESHOLD_PREPAID = 'THRESHOLD_PREPAID'.freeze, + + # TODO: Write general description for THRESHOLD_POSTPAID + THRESHOLD_POSTPAID = 'THRESHOLD_POSTPAID'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb new file mode 100644 index 0000000..b1f273f --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb @@ -0,0 +1,23 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The usage type associated with the Venmo payment token. + class VenmoPaymentTokenUsageType + VENMO_PAYMENT_TOKEN_USAGE_TYPE = [ + # TODO: Write general description for MERCHANT + MERCHANT = 'MERCHANT'.freeze, + + # TODO: Write general description for PLATFORM + PLATFORM = 'PLATFORM'.freeze + ].freeze + + def self.validate(value) + return false if value.nil? + + true + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb b/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb new file mode 100644 index 0000000..eacb018 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb @@ -0,0 +1,60 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of this Venmo Wallet. + class VenmoWalletAdditionalAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a customer in PayPal's system of record. + # @return [VenmoWalletCustomerInformation] + attr_accessor :customer + + # Resource consolidating common request and response attirbutes for vaulting + # Venmo Wallet. + # @return [VenmoWalletVaultAttributes] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['customer'] = 'customer' + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + customer + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(customer: SKIP, vault: SKIP) + @customer = customer unless customer == SKIP + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + customer = VenmoWalletCustomerInformation.from_hash(hash['customer']) if hash['customer'] + vault = VenmoWalletVaultAttributes.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + VenmoWalletAdditionalAttributes.new(customer: customer, + vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb b/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb new file mode 100644 index 0000000..9004dc5 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb @@ -0,0 +1,50 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Additional attributes associated with the use of a Venmo Wallet. + class VenmoWalletAttributesResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The details about a saved payment source. + # @return [VaultResponse] + attr_accessor :vault + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault'] = 'vault' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault: SKIP) + @vault = vault unless vault == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] + + # Create object from extracted values. + VenmoWalletAttributesResponse.new(vault: vault) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb b/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb new file mode 100644 index 0000000..ddf1b87 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb @@ -0,0 +1,63 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # The details about a customer in PayPal's system of record. + class VenmoWalletCustomerInformation < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The unique ID for a customer generated by PayPal. + # @return [String] + attr_accessor :id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['id'] = 'id' + @_hash['email_address'] = 'email_address' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + id + email_address + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(id: SKIP, email_address: SKIP) + @id = id unless id == SKIP + @email_address = email_address unless email_address == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + id = hash.key?('id') ? hash['id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + + # Create object from extracted values. + VenmoWalletCustomerInformation.new(id: id, + email_address: email_address) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb b/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb new file mode 100644 index 0000000..64c3652 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb @@ -0,0 +1,65 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Customizes the buyer experience during the approval process for payment with + # Venmo.
Note: Partners and Marketplaces might + # configure shipping_preference during partner account setup, + # which overrides the request values.
+ class VenmoWalletExperienceContext < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The business name of the merchant. The pattern is defined by an external + # party and supports Unicode. + # @return [String] + attr_accessor :brand_name + + # The location from which the shipping address is derived. + # @return [ShippingPreference] + attr_accessor :shipping_preference + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['brand_name'] = 'brand_name' + @_hash['shipping_preference'] = 'shipping_preference' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + brand_name + shipping_preference + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(brand_name: SKIP, + shipping_preference: ShippingPreference::GET_FROM_FILE) + @brand_name = brand_name unless brand_name == SKIP + @shipping_preference = shipping_preference unless shipping_preference == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP + shipping_preference = + hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE + + # Create object from extracted values. + VenmoWalletExperienceContext.new(brand_name: brand_name, + shipping_preference: shipping_preference) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_request.rb b/lib/pay_pal_restap_is/models/venmo_wallet_request.rb new file mode 100644 index 0000000..5d90f99 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_request.rb @@ -0,0 +1,89 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Information needed to pay using Venmo. + class VenmoWalletRequest < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The PayPal-generated ID for the vaulted payment source. This ID should be + # stored on the merchant's server so the saved payment source can be used + # for future transactions. + # @return [String] + attr_accessor :vault_id + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # Customizes the buyer experience during the approval process for payment + # with Venmo.
Note: Partners and Marketplaces + # might configure shipping_preference during partner account + # setup, which overrides the request values.
+ # @return [VenmoWalletExperienceContext] + attr_accessor :experience_context + + # Additional attributes associated with the use of this Venmo Wallet. + # @return [VenmoWalletAdditionalAttributes] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['vault_id'] = 'vault_id' + @_hash['email_address'] = 'email_address' + @_hash['experience_context'] = 'experience_context' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + vault_id + email_address + experience_context + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(vault_id: SKIP, email_address: SKIP, + experience_context: SKIP, attributes: SKIP) + @vault_id = vault_id unless vault_id == SKIP + @email_address = email_address unless email_address == SKIP + @experience_context = experience_context unless experience_context == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + experience_context = VenmoWalletExperienceContext.from_hash(hash['experience_context']) if + hash['experience_context'] + attributes = VenmoWalletAdditionalAttributes.from_hash(hash['attributes']) if + hash['attributes'] + + # Create object from extracted values. + VenmoWalletRequest.new(vault_id: vault_id, + email_address: email_address, + experience_context: experience_context, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_response.rb b/lib/pay_pal_restap_is/models/venmo_wallet_response.rb new file mode 100644 index 0000000..d4f73d3 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_response.rb @@ -0,0 +1,120 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Venmo wallet response. + class VenmoWalletResponse < BaseModel + SKIP = Object.new + private_constant :SKIP + + # The internationalized email address.
Note: Up + # to 64 characters are allowed before and 255 characters are allowed after + # the @ sign. However, the generally accepted maximum length + # for an email address is 254 characters. The pattern verifies that an + # unquoted @ sign exists.
+ # @return [String] + attr_accessor :email_address + + # The PayPal payer ID, which is a masked version of the PayPal account + # number intended for use with third parties. The account number is + # reversibly encrypted and a proprietary variant of Base32 is used to encode + # the result. + # @return [String] + attr_accessor :account_id + + # The Venmo user name chosen by the user, also know as a Venmo handle. + # @return [String] + attr_accessor :user_name + + # The name of the party. + # @return [Name] + attr_accessor :name + + # The phone number in its canonical international [E.164 numbering plan + # format](https://www.itu.int/rec/T-REC-E.164/en). + # @return [PhoneNumber] + attr_accessor :phone_number + + # The portable international postal address. Maps to + # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ + # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: + # the autocomplete + # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co + # ntrols-the-autocomplete-attribute). + # @return [Address] + attr_accessor :address + + # Additional attributes associated with the use of a Venmo Wallet. + # @return [VenmoWalletAttributesResponse] + attr_accessor :attributes + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['email_address'] = 'email_address' + @_hash['account_id'] = 'account_id' + @_hash['user_name'] = 'user_name' + @_hash['name'] = 'name' + @_hash['phone_number'] = 'phone_number' + @_hash['address'] = 'address' + @_hash['attributes'] = 'attributes' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + email_address + account_id + user_name + name + phone_number + address + attributes + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(email_address: SKIP, account_id: SKIP, user_name: SKIP, + name: SKIP, phone_number: SKIP, address: SKIP, + attributes: SKIP) + @email_address = email_address unless email_address == SKIP + @account_id = account_id unless account_id == SKIP + @user_name = user_name unless user_name == SKIP + @name = name unless name == SKIP + @phone_number = phone_number unless phone_number == SKIP + @address = address unless address == SKIP + @attributes = attributes unless attributes == SKIP + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + email_address = hash.key?('email_address') ? hash['email_address'] : SKIP + account_id = hash.key?('account_id') ? hash['account_id'] : SKIP + user_name = hash.key?('user_name') ? hash['user_name'] : SKIP + name = Name.from_hash(hash['name']) if hash['name'] + phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] + address = Address.from_hash(hash['address']) if hash['address'] + attributes = VenmoWalletAttributesResponse.from_hash(hash['attributes']) if + hash['attributes'] + + # Create object from extracted values. + VenmoWalletResponse.new(email_address: email_address, + account_id: account_id, + user_name: user_name, + name: name, + phone_number: phone_number, + address: address, + attributes: attributes) + end + end +end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb b/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb new file mode 100644 index 0000000..c292a90 --- /dev/null +++ b/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb @@ -0,0 +1,114 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # Resource consolidating common request and response attirbutes for vaulting + # Venmo Wallet. + class VenmoWalletVaultAttributes < BaseModel + SKIP = Object.new + private_constant :SKIP + + # Defines how and when the payment source gets vaulted. + # @return [StoreInVaultInstruction] + attr_accessor :store_in_vault + + # The description displayed to Venmo consumer on the approval flow for + # Venmo, as well as on the Venmo payment token management experience on + # Venmo.com. + # @return [String] + attr_accessor :description + + # Expected business/pricing model for the billing agreement. + # @return [VenmoPaymentTokenUsagePattern] + attr_accessor :usage_pattern + + # The usage type associated with the Venmo payment token. + # @return [VenmoPaymentTokenUsageType] + attr_accessor :usage_type + + # The customer type associated with the Venmo payment token. This is to + # indicate whether the customer acting on the merchant / platform is either + # a business or a consumer. + # @return [VenmoPaymentTokenCustomerType] + attr_accessor :customer_type + + # Create multiple payment tokens for the same payer, merchant/platform + # combination. Use this when the customer has not logged in at + # merchant/platform. The payment token thus generated, can then also be used + # to create the customer account at merchant/platform. Use this also when + # multiple payment tokens are required for the same payer, different + # customer at merchant/platform. This helps to identify customers distinctly + # even though they may share the same Venmo account. + # @return [TrueClass | FalseClass] + attr_accessor :permit_multiple_payment_tokens + + # A mapping from model property names to API property names. + def self.names + @_hash = {} if @_hash.nil? + @_hash['store_in_vault'] = 'store_in_vault' + @_hash['description'] = 'description' + @_hash['usage_pattern'] = 'usage_pattern' + @_hash['usage_type'] = 'usage_type' + @_hash['customer_type'] = 'customer_type' + @_hash['permit_multiple_payment_tokens'] = + 'permit_multiple_payment_tokens' + @_hash + end + + # An array for optional fields + def self.optionals + %w[ + description + usage_pattern + customer_type + permit_multiple_payment_tokens + ] + end + + # An array for nullable fields + def self.nullables + [] + end + + def initialize(store_in_vault:, usage_type:, description: SKIP, + usage_pattern: SKIP, + customer_type: VenmoPaymentTokenCustomerType::CONSUMER, + permit_multiple_payment_tokens: false) + @store_in_vault = store_in_vault + @description = description unless description == SKIP + @usage_pattern = usage_pattern unless usage_pattern == SKIP + @usage_type = usage_type + @customer_type = customer_type unless customer_type == SKIP + unless permit_multiple_payment_tokens == SKIP + @permit_multiple_payment_tokens = + permit_multiple_payment_tokens + end + end + + # Creates an instance of the object from a hash. + def self.from_hash(hash) + return nil unless hash + + # Extract variables from the hash. + store_in_vault = + hash.key?('store_in_vault') ? hash['store_in_vault'] : nil + usage_type = hash.key?('usage_type') ? hash['usage_type'] : nil + description = hash.key?('description') ? hash['description'] : SKIP + usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP + customer_type = + hash['customer_type'] ||= VenmoPaymentTokenCustomerType::CONSUMER + permit_multiple_payment_tokens = + hash['permit_multiple_payment_tokens'] ||= false + + # Create object from extracted values. + VenmoWalletVaultAttributes.new(store_in_vault: store_in_vault, + usage_type: usage_type, + description: description, + usage_pattern: usage_pattern, + customer_type: customer_type, + permit_multiple_payment_tokens: permit_multiple_payment_tokens) + end + end +end diff --git a/lib/pay_pal_restap_is/utilities/date_time_helper.rb b/lib/pay_pal_restap_is/utilities/date_time_helper.rb new file mode 100644 index 0000000..92da2f1 --- /dev/null +++ b/lib/pay_pal_restap_is/utilities/date_time_helper.rb @@ -0,0 +1,11 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +require 'date' +module PayPalRestapIs + # A utility that supports dateTime conversion to different formats + class DateTimeHelper < CoreLibrary::DateTimeHelper + end +end diff --git a/lib/pay_pal_restap_is/utilities/file_wrapper.rb b/lib/pay_pal_restap_is/utilities/file_wrapper.rb new file mode 100644 index 0000000..71d7150 --- /dev/null +++ b/lib/pay_pal_restap_is/utilities/file_wrapper.rb @@ -0,0 +1,16 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +module PayPalRestapIs + # A utility to allow users to set the content-type for files + class FileWrapper < CoreLibrary::FileWrapper + # The constructor. + # @param [File] file The file to be sent in the request. + # @param [string] content_type The content type of the provided file. + def initialize(file, content_type: 'application/octet-stream') + super + end + end +end diff --git a/pay_pal_restap_is.gemspec b/pay_pal_restap_is.gemspec new file mode 100644 index 0000000..9153f98 --- /dev/null +++ b/pay_pal_restap_is.gemspec @@ -0,0 +1,16 @@ +Gem::Specification.new do |s| + s.name = 'pay_pal_restap_is' + s.version = '2.16.0' + s.summary = 'pay_pal_restap_is' + s.description = 'An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders., Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview., The Payment Method Tokens API saves payment methods so payers don\'t have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token.

The permanent token represents a payment method that\'s saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.

The Payment Method Tokens API is available in the US only.' + s.authors = ['APIMatic SDK Generator'] + s.email = ['support@apimatic.io'] + s.homepage = 'https://apimatic.io' + s.licenses = ['MIT'] + s.add_dependency('apimatic_core_interfaces', '~> 0.2.1') + s.add_dependency('apimatic_core', '~> 0.3.9') + s.add_dependency('apimatic_faraday_client_adapter', '~> 0.1.4') + s.required_ruby_version = ['>= 2.6'] + s.files = Dir['{bin,lib,man,test,spec}/**/*', 'README*', 'LICENSE*'] + s.require_paths = ['lib'] +end diff --git a/test/flows/flow_test_base.rb b/test/flows/flow_test_base.rb new file mode 100644 index 0000000..5ee8b09 --- /dev/null +++ b/test/flows/flow_test_base.rb @@ -0,0 +1,21 @@ +require 'json' +require 'minitest/autorun' +require 'pay_pal_restap_is' +require_relative '../flows/ui_flow_executor' +require 'dotenv' + +class FlowTestBase < Minitest::Test + include PayPalRestapIs + include CoreLibrary + Dotenv.load + + def setup_class + _config = Configuration.new( + environment: Environment::SANDBOX, + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: ENV['CLIENT_ID'], + o_auth_client_secret: ENV['CLIENT_SECRET'])) + @client = Client.new(config: _config) + @ui_flow_executor = UIFlowExecutor.new + end +end diff --git a/test/flows/tests/test_add_shipping_tracker_flow.rb b/test/flows/tests/test_add_shipping_tracker_flow.rb new file mode 100644 index 0000000..b354d2f --- /dev/null +++ b/test/flows/tests/test_add_shipping_tracker_flow.rb @@ -0,0 +1,108 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class AddShippingTrackerFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_add_shipping_tracker_flow + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '10.0'), + shipping: Money.new(currency_code: 'USD', value: '0.0'), + tax_total: Money.new(currency_code: 'USD', value: '0')) + ), + description: 'Camera Shop', + items: [ + Item.new( + name: 'Levis 501 Selvedge STF', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936'), + Item.new( + name: 'T-Shirt', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '1457432') + ], + shipping: ShippingDetails.new( + address: Address.new( + country_code: 'US', + address_line_1: '123 Main Street', + admin_area_1: 'CA', + admin_area_2: 'San Jose', + postal_code: '95131')) + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl'))) + ), + 'prefer' => 'return=representation' + } + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_order_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_order_api_response.status_code) + + request = { + 'id' => order_api_response.data.id, + 'body' => OrderTrackerRequest.new( + capture_id: captured_order_api_response.data.purchase_units.at(0).payments.captures.at(0).id, + tracking_number: '443844607820', + carrier: ShipmentCarrier::FEDEX, + notify_payer: false, + items: [ + OrderTrackerItem.new( + name: 'T-Shirt', + quantity: '1', + sku: 'sku02', + url: 'https://www.example.com/example', + image_url: 'https://www.example.com/example.jpg', + upc: UniversalProductCode.new( + type: UPCType::UPCA, + code: 'upc001')) + ]) + } + tracked_order_api_response = @orders_controller.orders_track_create(request) + assert_equal(201, tracked_order_api_response.status_code) + + request = { + 'id' => order_api_response.data.id, + 'tracker_id' => tracked_order_api_response.data.purchase_units.at(0).shipping.trackers.at(0).id, + 'body' => [Patch.new(op: PatchOp::REPLACE, path: '/notify_payer', value: true)] + } + order_tracker_api_response = @orders_controller.orders_trackers_patch(request) + assert_equal(204, order_tracker_api_response.status_code) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_authorization_flow.rb b/test/flows/tests/test_authorization_flow.rb new file mode 100644 index 0000000..8d86d4e --- /dev/null +++ b/test/flows/tests/test_authorization_flow.rb @@ -0,0 +1,75 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class AuthorizationFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + @payments_controller = @client.payments + end + + def test_authorization_flow + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::AUTHORIZE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '25.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '25.0'), + shipping: Money.new(currency_code: 'USD', value: '0.0'), + tax_total: Money.new(currency_code: 'USD', value: '0')) + ), + description: 'Clothing Shop', + items: [ + Item.new( + name: 'Levis 501', + unit_amount: Money.new(currency_code: 'USD', value: '25.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936') + ] + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN))) + ), + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + authorized_order_api_response = @orders_controller.orders_authorize(request) + assert_equal(201, authorized_order_api_response.status_code) + + request = { + 'authorization_id' => authorized_order_api_response.data.purchase_units.at(0).payments.authorizations.at(0).id, + 'prefer' => 'return=representation' + } + api_response = @payments_controller.authorizations_void(request) + assert_equal(200, api_response.status_code) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_authorize_and_capture_flow.rb b/test/flows/tests/test_authorize_and_capture_flow.rb new file mode 100644 index 0000000..e3f088a --- /dev/null +++ b/test/flows/tests/test_authorize_and_capture_flow.rb @@ -0,0 +1,88 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class AuthorizeAndCaptureFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + @payments_controller = @client.payments + end + + def test_authorize_and_capture_flow + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::AUTHORIZE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '25.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '25.0'), + shipping: Money.new(currency_code: 'USD', value: '0.0'), + tax_total: Money.new(currency_code: 'USD', value: '0')) + ), + description: 'Clothing Shop', + items: [ + Item.new( + name: 'Levis 501', + unit_amount: Money.new(currency_code: 'USD', value: '25.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936') + ] + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN))) + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + authorized_order_api_response = @orders_controller.orders_authorize(request) + assert_equal(201, authorized_order_api_response.status_code) + + request = { + 'authorization_id' => authorized_order_api_response.data.purchase_units.at(0).payments.authorizations.at(0).id, + 'prefer' => 'return=representation', + 'body' => CaptureRequest.new(final_capture: false) + } + captured_payment_api_response = @payments_controller.authorizations_capture(request) + assert_equal(201, captured_payment_api_response.status_code) + + authorized_payment_api_response = @payments_controller.authorizations_get( + authorized_order_api_response.data.purchase_units.at(0).payments.authorizations.at(0).id) + assert_equal(200, authorized_payment_api_response.status_code) + assert_equal(AuthorizationStatus::CAPTURED, authorized_payment_api_response.data.status) + + captured_api_response = @payments_controller.captures_get(captured_payment_api_response.data.id) + assert_equal(200, captured_api_response.status_code) + assert_equal(CaptureStatus::COMPLETED, captured_api_response.data.status) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end +end diff --git a/test/flows/tests/test_confirm_order_flow.rb b/test/flows/tests/test_confirm_order_flow.rb new file mode 100644 index 0000000..7ea2a81 --- /dev/null +++ b/test/flows/tests/test_confirm_order_flow.rb @@ -0,0 +1,69 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class ConfirmOrderFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_confirm_order_flow + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '100.00' + ), + reference_id: 'd9f80740-38f0-11e8-b467-0ed5f89f718b' + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN)) + ) + ), + 'prefer' => 'return=representation' + } + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'body' => ConfirmOrderRequest.new( + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + email_address: 'customer@example.com', + name: Name.new(given_name: 'John', surname: 'Doe'), + experience_context: PayPalWalletExperienceContext.new( + brand_name: 'EXAMPLE INC', + locale: 'en-US', + shipping_preference: ShippingPreference::SET_PROVIDED_ADDRESS, + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN, + user_action: PayPalExperienceUserAction::PAY_NOW, + payment_method_preference: PayeePaymentMethodPreference::IMMEDIATE_PAYMENT_REQUIRED)))), + 'prefer' => 'return=representation' + } + order_api_response = @orders_controller.orders_confirm(request) + assert_equal(200, order_api_response.status_code) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_patch_order_flow.rb b/test/flows/tests/test_patch_order_flow.rb new file mode 100644 index 0000000..f96a221 --- /dev/null +++ b/test/flows/tests/test_patch_order_flow.rb @@ -0,0 +1,100 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class PatchOrderFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + @payments_controller = @client.payments + end + + def test_patch_order_flow + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '10.0'), + shipping: Money.new(currency_code: 'USD', value: '0.0'), + tax_total: Money.new(currency_code: 'USD', value: '0')) + ), + description: 'Camera Shop', + items: [ + Item.new( + name: 'Levis 501 Selvedge STF', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936'), + Item.new( + name: 'T-Shirt', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '1457432') + ], + shipping: ShippingDetails.new( + address: Address.new( + country_code: 'US', + address_line_1: '123 Main Street', + admin_area_1: 'CA', + admin_area_2: 'San Jose', + postal_code: '95131')) + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl'))) + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'body' => [ + Patch.new( + op: PatchOp::REPLACE, + path: "/purchase_units/@reference_id=='default'/shipping/address", + value: { + 'address_line_1' => '1234 Main St', + 'address_line_2' => 'Floor 6', + 'admin_area_1' => 'CA', + 'admin_area_2' => 'San Francisco', + 'postal_code' => '94107', + 'country_code' => 'US' + }) + ] + } + + patched_order_api_response = @orders_controller.orders_patch(request) + assert_equal(204, patched_order_api_response.status_code) + + order_api_response = @orders_controller.orders_get({'id' => order_api_response.data.id}) + assert_equal(200, order_api_response.status_code) + assert_equal('1234 Main St', order_api_response.data.purchase_units.at(0).shipping.address.address_line_1) + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_payment_method_with_purchase_flow.rb b/test/flows/tests/test_payment_method_with_purchase_flow.rb new file mode 100644 index 0000000..c596603 --- /dev/null +++ b/test/flows/tests/test_payment_method_with_purchase_flow.rb @@ -0,0 +1,82 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class PaymentMethodWithPurchaseFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_payment_method_with_purchase_flow + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '10.0'), + shipping: Money.new(currency_code: 'USD', value: '0.0'), + tax_total: Money.new(currency_code: 'USD', value: '0')) + ), + description: 'Camera Shop', + items: [ + Item.new( + name: 'Levis 501 Selvedge STF', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936'), + Item.new( + name: 'T-Shirt', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '1457432') + ], + shipping: ShippingDetails.new( + address: Address.new( + country_code: 'US', + address_line_1: '123 Main Street', + admin_area_1: 'CA', + admin_area_2: 'San Jose', + postal_code: '95131')) + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl'))) + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_order_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_order_api_response.status_code) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end +end diff --git a/test/flows/tests/test_payment_method_without_purchase_flow.rb b/test/flows/tests/test_payment_method_without_purchase_flow.rb new file mode 100644 index 0000000..79b0fee --- /dev/null +++ b/test/flows/tests/test_payment_method_without_purchase_flow.rb @@ -0,0 +1,88 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class PaymentMethodWithoutPurchaseFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + @vault_controller = @client.vault + end + + def test_payment_method_without_purchase_flow + guid = SecureRandom.uuid + request = { + 'pay_pal_request_id' => guid, + 'body' => SetupTokenRequest.new( + payment_source: SetupTokenRequestPaymentSource.new( + paypal: VaultPayPalWalletRequest.new( + description: "Description for PayPal to be shown to PayPal payer", + permit_multiple_payment_tokens: true, + usage_type: 'MERCHANT', + customer_type: 'CONSUMER', + experience_context: VaultExperienceContext.new( + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl')))) + } + + setup_token_api_response = @vault_controller.setup_tokens_create(request) + assert_equal(201, setup_token_api_response.status_code) + + current_path = @ui_flow_executor.save_payment_method( + url: setup_token_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'pay_pal_request_id' => guid, + 'body' => PaymentTokenRequest.new( + payment_source: PaymentTokenRequestPaymentSource.new( + token: VaultTokenRequest.new( + id: setup_token_api_response.data.id, + type: TokenType::SETUP_TOKEN + ) + ) + ) + } + payment_token_api_response = @vault_controller.payment_tokens_create(request) + assert_equal(201, payment_token_api_response.status_code) + + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00' + ) + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + vault_id: payment_token_api_response.data.id + ) + ) + ), + 'pay_pal_request_id' => guid, + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(201, order_api_response.status_code) + + + setup_token_api_response = @vault_controller.setup_tokens_get(setup_token_api_response.data.id) + assert_equal(200, setup_token_api_response.status_code) + assert_equal('VAULTED', setup_token_api_response.data.status) + + payment_token_api_response = @vault_controller.payment_tokens_get(payment_token_api_response.data.id) + assert_equal(200, payment_token_api_response.status_code) + refute_nil(payment_token_api_response) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end +end diff --git a/test/flows/tests/test_refund_flow.rb b/test/flows/tests/test_refund_flow.rb new file mode 100644 index 0000000..804fa1e --- /dev/null +++ b/test/flows/tests/test_refund_flow.rb @@ -0,0 +1,76 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class RefundFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + @payments_controller = @client.payments + end + + def test_refund_flow + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '100.00' + ), + reference_id: 'd9f80740-38f0-11e8-b467-0ed5f89f718b' + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN)) + ) + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_order_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_order_api_response.status_code) + + request = { + 'capture_id' => captured_order_api_response.data.purchase_units.at(0) + .payments.captures.at(0).id, + 'pay_pal_request_id' => guid, + 'prefer' => 'return=representation' + } + + refund_api_response = @payments_controller.captures_refund(request) + assert_equal(201, refund_api_response.status_code) + + + refund_api_response = @payments_controller.refunds_get(refund_api_response.data.id) + assert_equal(200, refund_api_response.status_code) + assert_equal(RefundStatus::COMPLETED, refund_api_response.data.status) + + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_secure_3d_authentication_multi_step_flow.rb b/test/flows/tests/test_secure_3d_authentication_multi_step_flow.rb new file mode 100644 index 0000000..88828e2 --- /dev/null +++ b/test/flows/tests/test_secure_3d_authentication_multi_step_flow.rb @@ -0,0 +1,105 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class Secure3DAuthenticationMultiStepFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_secure_3d_authentication_multi_step + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '10.0')) + ), + description: 'Camera Shop', + custom_id: 'testcustom_id', + invoice_id: "invoic_number#{guid}", + items: [ + Item.new(name: 'Levis 501 Selvedge STF', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936'), + Item.new(name: 'T-Shirt', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '1457432') + ] + ) + ] + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(201, order_api_response.status_code) + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation', + 'pay_pal_request_id' => guid, + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'body' => OrderCaptureRequest.new( + payment_source: OrderCaptureRequestPaymentSource.new( + card: CardRequest.new( + name: 'John Doe', + number: '4868719460707704', + expiry: '2027-02', + billing_address: Address.new( + country_code: 'US', + address_line_1: '2211 N First Street', + admin_area_1: 'CA', + admin_area_2: 'San Jose', + postal_code: '95131'), + attributes: CardAttributes.new( + verification: CardVerification.new( + method: CardVerificationMethod::SCA_ALWAYS)), + experience_context: CardExperienceContext.new( + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl')) + ) + ) + } + exception = assert_raises ErrorException do + @orders_controller.orders_capture(request) + end + + assert_equal(422, exception.response_code) + + current_path = @ui_flow_executor.complete_helios_verification(url: exception.links.at(0).href, + submit_verification_form: false) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_order_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_order_api_response.status_code) + + order_api_response = @orders_controller.orders_get({'id' => order_api_response.data.id}) + assert_equal(200, order_api_response.status_code) + refute_nil(order_api_response.data.payment_source) + assert_equal(OrderStatus::COMPLETED, order_api_response.data.status) + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_secure_3d_authentication_single_step_flow.rb b/test/flows/tests/test_secure_3d_authentication_single_step_flow.rb new file mode 100644 index 0000000..c95dc22 --- /dev/null +++ b/test/flows/tests/test_secure_3d_authentication_single_step_flow.rb @@ -0,0 +1,90 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class Secure3DAuthenticationSingleStepFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_secure_3d_authentication_single_step + guid = SecureRandom.uuid + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '10.00', + breakdown: AmountBreakdown.new( + item_total: Money.new(currency_code: 'USD', value: '10.0')) + ), + description: 'Camera Shop', + custom_id: 'testcustom_id', + invoice_id: "invoic_number#{guid}", + items: [ + Item.new(name: 'Levis 501 Selvedge STF', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '5158936'), + Item.new(name: 'T-Shirt', + unit_amount: Money.new(currency_code: 'USD', value: '5.00'), + quantity: '1', + tax: Money.new(currency_code: 'USD', value: '0.00'), + sku: '1457432') + ] + ) + ], + payment_source: PaymentSource.new( + card: CardRequest.new( + name: 'John Doe', + number: '4868719995056080', + expiry: '2027-02', + billing_address: Address.new( + country_code: 'US', + address_line_1: '2211 N First Street', + admin_area_1: 'CA', + admin_area_2: 'San Jose', + postal_code: '95131'), + attributes: CardAttributes.new( + verification: CardVerification.new( + method: CardVerificationMethod::SCA_ALWAYS)), + experience_context: CardExperienceContext.new( + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl') + ) + ) + ), + 'pay_pal_request_id' => guid, + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(201, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_helios_verification(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_order_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_order_api_response.status_code) + + order_api_response = @orders_controller.orders_get({'id' => order_api_response.data.id}) + assert_equal(200, order_api_response.status_code) + assert_equal(OrderStatus::COMPLETED, order_api_response.data.status) + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/tests/test_standard_checkout_flow.rb b/test/flows/tests/test_standard_checkout_flow.rb new file mode 100644 index 0000000..94bf34b --- /dev/null +++ b/test/flows/tests/test_standard_checkout_flow.rb @@ -0,0 +1,58 @@ +require_relative '../flow_test_base' +require 'securerandom' + +class StandardCheckoutFlowTest < FlowTestBase + + def setup + setup_class + @orders_controller = @client.orders + end + + def test_standard_checkout_flow + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [ + PurchaseUnitRequest.new( + amount: AmountWithBreakdown.new( + currency_code: 'USD', + value: '100.00' + ), + reference_id: 'd9f80740-38f0-11e8-b467-0ed5f89f718b' + ) + ], + payment_source: PaymentSource.new( + paypal: PayPalWallet.new( + experience_context: PayPalWalletExperienceContext.new( + locale: 'en-US', + return_url: 'https://example.com/returnUrl', + cancel_url: 'https://example.com/cancelUrl', + landing_page: PayPalExperienceLandingPage::LOGIN)) + ) + ), + 'prefer' => 'return=representation' + } + + order_api_response = @orders_controller.orders_create(request) + assert_equal(200, order_api_response.status_code) + + current_path = @ui_flow_executor.complete_payment(url: order_api_response.data.links.at(1).href) + assert_equal '/returnUrl', current_path + + request = { + 'id' => order_api_response.data.id, + 'prefer' => 'return=representation' + } + captured_api_response = @orders_controller.orders_capture(request) + assert_equal(201, captured_api_response.status_code) + + order_api_response = @orders_controller.orders_get({'id' => order_api_response.data.id}) + assert_equal(200, order_api_response.status_code) + teardown + end + + def teardown + @ui_flow_executor.reset_browser_session + end + +end \ No newline at end of file diff --git a/test/flows/ui_flow_executor.rb b/test/flows/ui_flow_executor.rb new file mode 100644 index 0000000..bacdc72 --- /dev/null +++ b/test/flows/ui_flow_executor.rb @@ -0,0 +1,127 @@ +require 'selenium-webdriver' +require 'capybara/dsl' +require 'capybara/minitest' +require 'capybara/session/matchers' +require 'dotenv' + +class UIFlowExecutor + include Capybara::DSL + + def initialize + super + Capybara.register_driver :selenium_headless do |app| + options = Selenium::WebDriver::Firefox::Options.new + options.args << '--headless' + options.profile = Selenium::WebDriver::Firefox::Profile.new.tap do |profile| + # Increase memory limit for Firefox to avoid OUT_OF_MEMORY issue + profile['browser.cache.memory.capacity'] = 4096 # Set to 4GB + end + + Capybara::Selenium::Driver.new(app, browser: :firefox, options: options) + end + Capybara.default_max_wait_time = 10 + @driver = Capybara::Session.new(:selenium_headless) + @email = ENV['EMAIL'] + @password = ENV['PASSWORD'] + validate_email_and_password + end + + def complete_payment(url:, retry_attempts: 0) + begin + @driver.visit(url) + login + if @driver.has_button?('payment-submit-btn') + @driver.click_button('payment-submit-btn') + end + + if @driver.has_selector?("h1") + return @driver.current_path + end + rescue + if retry_attempts < 3 + complete_payment(url: url, retry_attempts: retry_attempts + 1) + end + end + end + + def save_payment_method(url:) + @driver.visit(url) + login + find_and_click_consent_button + if @driver.has_selector?("h1") + @driver.current_path + end + end + + def complete_helios_verification(url:, submit_verification_form: true) + @driver.visit(url) + if submit_verification_form + iframe = @driver.find('iframe[name="threedsIframeV2"]') + @driver.within_frame(iframe) do + @driver.within_frame do + @driver.find('input[type="text"]').set('1234') + @driver.find('input[type="submit"][value="SUBMIT"]').click + end + end + end + + if @driver.has_selector?("h1") + @driver.current_path + end + end + + def validate_email_and_password + if @email.nil? && @password.nil? + raise ArgumentError, "Both email and password are required." + elsif @email.nil? + raise ArgumentError, "Email is required." + elsif @password.nil? + raise ArgumentError, "Password is required." + end + end + + def reset_browser_session + @driver.reset_session! + @driver.quit + end + + private + def login + if @driver.has_field?('email') + @driver.fill_in('email', with: @email) + end + + if @driver.has_button?('btnNext') + @driver.click_button('btnNext') + end + + if @driver.has_field?('password') + @driver.fill_in('password', with: @password) + end + if @driver.has_button?('btnLogin') + @driver.click_button('btnLogin') + end + end + + def find_and_click_consent_button + max_attempts = 5 + attempts = 0 + page_loaded_successfully = false + + while !page_loaded_successfully && attempts < max_attempts + begin + @driver.click_button('consentButton') + if @driver.has_link?('Try again', exact: true) + @driver.find_link('Try again').click + attempts += 1 + next + end + page_loaded_successfully = @driver.has_selector?('h1') + rescue + @driver.go_back + attempts += 1 + end + end + end + +end diff --git a/test/unit_tests/controller_test_base.rb b/test/unit_tests/controller_test_base.rb new file mode 100644 index 0000000..0955d11 --- /dev/null +++ b/test/unit_tests/controller_test_base.rb @@ -0,0 +1,33 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v2.0 +# ( https://apimatic.io ). + +require 'json' +require 'minitest/autorun' +require 'minitest/hell' +require 'minitest/proveit' +require 'pay_pal_restap_is' +require 'dotenv' + +class ControllerTestBase < Minitest::Test + include PayPalRestapIs + include CoreLibrary + Dotenv.load + + # Create configuration and set any test parameters + def create_configuration + Configuration.new(environment: Environment::SANDBOX, + client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( + o_auth_client_id: ENV['CLIENT_ID'], + o_auth_client_secret: ENV['CLIENT_SECRET'] + ) + ) + end + + # Initializes the base test controller + def setup_class + _config = create_configuration + @client = Client.new(config: _config) + end +end diff --git a/test/unit_tests/test_orders_controller.rb b/test/unit_tests/test_orders_controller.rb new file mode 100644 index 0000000..7f752c8 --- /dev/null +++ b/test/unit_tests/test_orders_controller.rb @@ -0,0 +1,158 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v3.0 +# ( https://apimatic.io ). + +require_relative 'controller_test_base' + +class OrdersControllerTest < ControllerTestBase + + # Called only once for the class before any test has executed + def setup + setup_class + @controller = @client.orders + end + + def test_create_order_400_status_code + request = { + 'body' => OrderRequest.new( + intent: CheckoutPaymentIntent::CAPTURE, + purchase_units: [] + ), + 'pay_pal_request_id' => '', + 'pay_pal_partner_attribution_id' => 'PayPal-Partner-Attribution-Id', + 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', + 'prefer' => 'return=minimal' + } + + exception = assert_raises ErrorException do + @controller.orders_create(request) + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_patch_order_404_status_code + request = { + 'id' => 'id0', + 'body' => [ + Patch.new(op: PatchOp::ADD) + ] + } + exception = assert_raises ErrorException do + @controller.orders_patch(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_confirm_order_404_status_code + request = { + 'id' => 'id0', + 'body' => ConfirmOrderRequest.new( + payment_source: PaymentSource.new(paypal: PayPalWallet.new) + ), + 'prefer' => 'return=minimal' + } + exception = assert_raises ErrorException do + @controller.orders_confirm(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_authorize_order_404_status_code + request = { + 'id' => 'id0', + 'prefer' => 'return=minimal' + } + exception = assert_raises ErrorException do + @controller.orders_authorize(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_create_order_track_400_status_code + request = { + 'id' => 'id0', + 'body' => OrderTrackerRequest.new(capture_id: 'id0', notify_payer: false), + 'prefer' => 'return=minimal' + } + exception = assert_raises ErrorException do + @controller.orders_track_create(request) + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_patch_order_tracker_404_status_code + request = { + 'id' => 'id0', + 'tracker_id' => 'id0', + 'body' => [ + Patch.new( + op: PatchOp::REPLACE, + path: '/notify_payer', + value: true) + ] + } + exception = assert_raises ErrorException do + @controller.orders_trackers_patch(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_order_404_status_code + + exception = assert_raises ErrorException do + @controller.orders_get({ 'id' => 'id0' }) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + +end \ No newline at end of file diff --git a/test/unit_tests/test_payments_controller.rb b/test/unit_tests/test_payments_controller.rb new file mode 100644 index 0000000..9bca643 --- /dev/null +++ b/test/unit_tests/test_payments_controller.rb @@ -0,0 +1,150 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v3.0 +# ( https://apimatic.io ). + +require_relative 'controller_test_base' + +class PaymentsControllerTest < ControllerTestBase + # Called only once for the class before any test has executed + def setup + setup_class + @controller = @client.payments + end + + def test_get_authorization_404_status_code + exception = assert_raises ErrorException do + @controller.authorizations_get('id0') + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json;charset=UTF-8' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_capture_refund_404_status_code + request = { + 'capture_id' => 'id0', + 'pay_pal_request_id' => '', + 'prefer' => 'return=minimal' + } + + exception = assert_raises ErrorException do + @controller.captures_refund(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_refund_request_404_status_code + exception = assert_raises ErrorException do + @controller.refunds_get('id0') + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_capture_authorization_404_status_code + request = { + 'authorization_id' => 'id0', + 'prefer' => 'return=minimal', + 'body' => CaptureRequest.new(final_capture: false) + } + + exception = assert_raises ErrorException do + @controller.authorizations_capture(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json;charset=UTF-8' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_reauthorization_404_status_code + request = { + 'authorization_id' => 'id0', + 'prefer' => 'return=minimal' + } + + exception = assert_raises ErrorException do + @controller.authorizations_reauthorize(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json;charset=UTF-8' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_authorization_void_404_status_code + request = { + 'authorization_id' => 'id0', + 'prefer' => 'return=minimal' + } + + exception = assert_raises ErrorException do + @controller.authorizations_void(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_capture_refund_404_status_code + request = { + 'capture_id' => 'id0', + 'pay_pal_request_id' => '', + 'prefer' => 'return=minimal', + 'body' => RefundRequest.new( + amount: Money.new(currency_code: 'USD', value: '1.44'), + note_to_payer: 'Defective product') + } + + exception = assert_raises ErrorException do + @controller.captures_refund(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end +end \ No newline at end of file diff --git a/test/unit_tests/test_vault_controller.rb b/test/unit_tests/test_vault_controller.rb new file mode 100644 index 0000000..023a505 --- /dev/null +++ b/test/unit_tests/test_vault_controller.rb @@ -0,0 +1,186 @@ +# pay_pal_restap_is +# +# This file was automatically generated by APIMATIC v3.0 +# ( https://apimatic.io ). + +require_relative 'controller_test_base' + +class VaultControllerTest < ControllerTestBase + # Called only once for the class before any test has executed + def setup + setup_class + @controller = @client.vault + end + + def test_create_setup_token_400_status_code + request = { + 'pay_pal_request_id' => '', + 'body' => SetupTokenRequest.new(payment_source: SetupTokenRequestPaymentSource.new) + } + exception = assert_raises ErrorException do + @controller.setup_tokens_create(request) + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_create_payment_token_404_status_code + request = { + 'pay_pal_request_id' => '', + 'body' => PaymentTokenRequest.new(payment_source: PaymentTokenRequestPaymentSource.new) + } + exception = assert_raises ErrorException do + @controller.payment_tokens_create(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_create_payment_token_400_status_code + request = { + 'pay_pal_request_id' => '', + 'body' => PaymentTokenRequest.new( + payment_source: PaymentTokenRequestPaymentSource.new( + token: VaultTokenRequest.new(id: 'id0', type: TokenType::BILLING_AGREEMENT) + ) + ) + } + exception = assert_raises ErrorException do + @controller.payment_tokens_create(request) + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_setup_token_400_status_code + exception = assert_raises APIException do + @controller.setup_tokens_get('\'id0') + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_setup_token_404_status_code + exception = assert_raises APIException do + @controller.setup_tokens_get('payment-1') + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_payment_token_400_status_code + exception = assert_raises APIException do + @controller.payment_tokens_get("'dw") + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_payment_token_404_status_code + exception = assert_raises APIException do + @controller.payment_tokens_get('payment-1') + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_customer_payment_token_404_status_code + request = { + 'customer_id' => 'customer-1', + 'page_size' => 5, + 'page' => 1, + 'total_required' => false + } + + exception = assert_raises APIException do + @controller.customer_payment_tokens_get(request) + end + + refute_nil(exception.response) + assert_equal(404, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_get_customer_payment_token_400_status_code + request = { + 'customer_id' => "'dw", + 'page_size' => 5, + 'page' => 1, + 'total_required' => false + } + + exception = assert_raises ErrorException do + @controller.customer_payment_tokens_get(request) + end + + refute_nil(exception.response) + assert_equal(400, exception.response_code) + + # Test headers + expected_headers = {} + expected_headers['content-type'] = 'application/json' + + assert(ComparisonHelper.match_headers(expected_headers, exception.response.headers)) + end + + def test_delete_payment_token_204_status_code + api_response = @controller.payment_tokens_delete('payment-1') + + refute_nil(api_response) + assert_equal(204, api_response.status_code) + end +end \ No newline at end of file From 9ac9274d6b8a1b8d584d3d618f52d08ac1560de6 Mon Sep 17 00:00:00 2001 From: moizgillani Date: Tue, 10 Sep 2024 11:38:42 +0500 Subject: [PATCH 2/4] sdk files removed --- .rubocop.yml | 60 - Gemfile | 3 - LICENSE | 28 - README.md | 159 - doc/abstract-logger.md | 47 - doc/auth/oauth-2-client-credentials-grant.md | 87 - doc/client.md | 66 - doc/controllers/orders.md | 397 -- doc/controllers/payments.md | 327 -- doc/controllers/vault.md | 261 -- doc/http-request.md | 15 - doc/http-response.md | 15 - doc/logging-configuration.md | 15 - doc/models/ach-debit-response.md | 23 - doc/models/activity-timestamps.md | 25 - doc/models/address-details.md | 38 - doc/models/address.md | 33 - doc/models/amount-breakdown.md | 48 - doc/models/amount-with-breakdown.md | 48 - doc/models/apple-pay-attributes-response.md | 36 - doc/models/apple-pay-attributes.md | 36 - doc/models/apple-pay-card-response.md | 40 - doc/models/apple-pay-card.md | 38 - doc/models/apple-pay-decrypted-token-data.md | 45 - doc/models/apple-pay-payment-data-type.md | 16 - doc/models/apple-pay-payment-data.md | 29 - doc/models/apple-pay-payment-object.md | 35 - doc/models/apple-pay-payment-token.md | 36 - doc/models/apple-pay-request.md | 56 - doc/models/apple-pay-tokenized-card.md | 33 - doc/models/authentication-response.md | 28 - doc/models/authorization-incomplete-reason.md | 16 - doc/models/authorization-status-details.md | 23 - .../authorization-status-with-details.md | 27 - doc/models/authorization-status.md | 20 - .../authorization-with-additional-data.md | 44 - doc/models/authorization.md | 43 - doc/models/avs-code.md | 38 - doc/models/bancontact-payment-object.md | 31 - doc/models/bancontact-payment-request.md | 33 - doc/models/bank-payment-token.md | 44 - doc/models/bin-details.md | 33 - doc/models/blik-experience-context.md | 33 - doc/models/blik-level-0-payment-object.md | 23 - doc/models/blik-one-click-payment-object.md | 23 - doc/models/blik-one-click-payment-request.md | 29 - doc/models/blik-payment-object.md | 31 - doc/models/blik-payment-request.md | 46 - doc/models/capture-incomplete-reason.md | 26 - doc/models/capture-payment-instruction.md | 48 - doc/models/capture-request.md | 68 - doc/models/capture-status-details.md | 23 - doc/models/capture-status-with-details.md | 27 - doc/models/capture-status.md | 20 - doc/models/capture.md | 48 - doc/models/captured-payment.md | 50 - doc/models/card-attributes-response.md | 36 - doc/models/card-attributes.md | 40 - doc/models/card-brand.md | 38 - doc/models/card-experience-context.md | 25 - doc/models/card-from-request.md | 25 - doc/models/card-payment-token.md | 45 - doc/models/card-request.md | 43 - doc/models/card-response-entity.md | 44 - doc/models/card-response.md | 40 - doc/models/card-stored-credential.md | 34 - doc/models/card-supplementary-data.md | 53 - doc/models/card-type.md | 19 - doc/models/card-verification-details.md | 35 - doc/models/card-verification-method.md | 18 - .../card-verification-processor-response.md | 25 - doc/models/card-verification.md | 23 - doc/models/checkout-payment-intent.md | 16 - doc/models/cobranded-card.md | 36 - doc/models/confirm-order-request.md | 109 - doc/models/customer-information.md | 32 - doc/models/customer-request.md | 25 - .../customer-vault-payment-tokens-response.md | 274 -- doc/models/cvv-code.md | 28 - doc/models/disbursement-mode.md | 16 - doc/models/dispute-category.md | 16 - doc/models/eci-flag.md | 20 - doc/models/enrollment-status.md | 18 - doc/models/eps-payment-object.md | 27 - doc/models/eps-payment-request.md | 33 - doc/models/error-details.md | 44 - doc/models/error-exception.md | 81 - doc/models/exchange-rate.md | 27 - doc/models/experience-context.md | 31 - doc/models/fullfillment-type.md | 18 - doc/models/giropay-payment-object.md | 27 - doc/models/giropay-payment-request.md | 33 - .../google-pay-authentication-method.md | 16 - doc/models/google-pay-card-attributes.md | 25 - doc/models/google-pay-card-response.md | 39 - doc/models/google-pay-decrypted-token-data.md | 33 - doc/models/google-pay-payment-method.md | 15 - doc/models/google-pay-request.md | 46 - doc/models/google-pay-wallet-response.md | 45 - doc/models/ideal-payment-object.md | 29 - doc/models/ideal-payment-request.md | 35 - doc/models/instrument-authorization-status.md | 20 - doc/models/item-category.md | 17 - doc/models/item.md | 45 - doc/models/level-2-card-processing-data.md | 28 - doc/models/level-3-card-processing-data.md | 48 - doc/models/liability-shift-indicator.md | 17 - doc/models/line-item.md | 48 - doc/models/link-description.md | 27 - doc/models/link-http-method.md | 22 - doc/models/money.md | 25 - doc/models/my-bank-payment-object.md | 29 - doc/models/my-bank-payment-request.md | 33 - doc/models/name.md | 25 - doc/models/net-amount-breakdown-item.md | 37 - doc/models/network-token.md | 31 - .../network-transaction-reference-entity.md | 29 - doc/models/network-transaction-reference.md | 29 - doc/models/o-auth-provider-error.md | 20 - doc/models/o-auth-provider-exception.md | 27 - doc/models/o-auth-token.md | 35 - .../order-application-context-landing-page.md | 17 - ...application-context-shipping-preference.md | 17 - .../order-application-context-user-action.md | 16 - doc/models/order-application-context.md | 35 - .../order-authorize-request-payment-source.md | 109 - doc/models/order-authorize-request.md | 106 - ...order-authorize-response-payment-source.md | 88 - doc/models/order-authorize-response.md | 98 - .../order-capture-request-payment-source.md | 109 - doc/models/order-capture-request.md | 106 - .../order-confirm-application-context.md | 41 - doc/models/order-request.md | 190 - doc/models/order-status.md | 20 - doc/models/order-tracker-item.md | 32 - doc/models/order-tracker-request.md | 48 - doc/models/order-tracker-response.md | 63 - doc/models/order-tracker-status.md | 16 - doc/models/order.md | 77 - doc/models/p24-payment-object.md | 32 - doc/models/p24-payment-request.md | 35 - doc/models/pa-res-status.md | 22 - doc/models/patch-op.md | 20 - doc/models/patch.md | 32 - doc/models/pay-pal-experience-landing-page.md | 17 - doc/models/pay-pal-experience-user-action.md | 16 - .../pay-pal-payment-token-customer-type.md | 16 - .../pay-pal-payment-token-usage-pattern.md | 20 - .../pay-pal-payment-token-usage-type.md | 16 - doc/models/pay-pal-payment-token.md | 49 - ...-pal-wallet-account-verification-status.md | 16 - .../pay-pal-wallet-attributes-response.md | 75 - doc/models/pay-pal-wallet-attributes.md | 42 - doc/models/pay-pal-wallet-customer-request.md | 32 - doc/models/pay-pal-wallet-customer.md | 34 - .../pay-pal-wallet-experience-context.md | 37 - doc/models/pay-pal-wallet-response.md | 39 - .../pay-pal-wallet-vault-instruction.md | 31 - doc/models/pay-pal-wallet-vault-response.md | 45 - doc/models/pay-pal-wallet-vault-status.md | 17 - doc/models/pay-pal-wallet.md | 44 - doc/models/payee-base.md | 25 - doc/models/payee-payment-method-preference.md | 16 - doc/models/payee.md | 25 - doc/models/payer-base.md | 25 - doc/models/payer.md | 39 - doc/models/payment-advice-code.md | 18 - doc/models/payment-authorization.md | 45 - doc/models/payment-collection.md | 114 - doc/models/payment-initiator.md | 16 - doc/models/payment-instruction.md | 40 - doc/models/payment-method-preference.md | 25 - doc/models/payment-source-response.md | 74 - doc/models/payment-source.md | 101 - doc/models/payment-supplementary-data.md | 27 - doc/models/payment-token-request-card.md | 34 - .../payment-token-request-payment-source.md | 34 - doc/models/payment-token-request.md | 40 - .../payment-token-response-payment-source.md | 119 - doc/models/payment-token-response.md | 137 - doc/models/phone-number-with-country-code.md | 25 - doc/models/phone-number.md | 23 - doc/models/phone-type.md | 19 - doc/models/phone-with-type.md | 27 - doc/models/phone.md | 27 - doc/models/platform-fee.md | 31 - doc/models/processing-instruction.md | 16 - doc/models/processor-response-code.md | 168 - doc/models/processor-response.md | 29 - doc/models/purchase-unit-request.md | 102 - doc/models/purchase-unit.md | 103 - doc/models/reauthorize-request.md | 26 - doc/models/refund-incomplete-reason.md | 15 - doc/models/refund-payment-instruction.md | 36 - doc/models/refund-platform-fee.md | 26 - doc/models/refund-request.md | 55 - doc/models/refund-status-details.md | 23 - doc/models/refund-status-with-details.md | 27 - doc/models/refund-status.md | 18 - doc/models/refund.md | 44 - doc/models/related-identifiers.md | 27 - doc/models/seller-payable-breakdown.md | 49 - doc/models/seller-protection-status.md | 17 - doc/models/seller-protection.md | 27 - doc/models/seller-receivable-breakdown.md | 53 - .../sepa-debit-authorization-details.md | 23 - doc/models/sepa-debit-response.md | 39 - .../setup-token-card-experience-context.md | 31 - doc/models/setup-token-request-card.md | 36 - .../setup-token-request-payment-source.md | 76 - doc/models/setup-token-request.md | 80 - doc/models/setup-token-response-card.md | 42 - .../setup-token-response-payment-source.md | 78 - doc/models/setup-token-response.md | 90 - doc/models/shipment-carrier.md | 1290 ------ doc/models/shipping-details.md | 69 - doc/models/shipping-name.md | 23 - doc/models/shipping-option.md | 34 - doc/models/shipping-preference.md | 17 - doc/models/shipping-type.md | 18 - doc/models/shipping-with-tracking-details.md | 114 - doc/models/sofort-payment-object.md | 29 - doc/models/sofort-payment-request.md | 33 - doc/models/standard-entry-class-code.md | 18 - doc/models/store-in-vault-instruction.md | 15 - .../stored-payment-source-payment-type.md | 17 - .../stored-payment-source-usage-type.md | 17 - doc/models/stored-payment-source.md | 34 - doc/models/supplementary-data.md | 54 - doc/models/supplementary-purchase-data.md | 25 - doc/models/tax-id-type.md | 16 - doc/models/tax-info.md | 25 - .../three-d-secure-authentication-response.md | 25 - doc/models/token-type.md | 16 - doc/models/token.md | 25 - doc/models/trustly-payment-object.md | 29 - doc/models/trustly-payment-request.md | 33 - doc/models/universal-product-code.md | 25 - doc/models/upc-type.md | 21 - doc/models/vault-customer.md | 23 - doc/models/vault-experience-context.md | 33 - doc/models/vault-instruction-base.md | 23 - doc/models/vault-instruction.md | 23 - doc/models/vault-pay-pal-wallet-request.md | 45 - doc/models/vault-response.md | 37 - doc/models/vault-sepa-debit-response.md | 37 - doc/models/vault-status.md | 17 - doc/models/vault-token-request.md | 25 - doc/models/vault-venmo-experience-context.md | 27 - doc/models/vault-venmo-request.md | 43 - ...vaulted-digital-wallet-shipping-details.md | 36 - doc/models/vaulted-digital-wallet.md | 44 - .../venmo-payment-token-customer-type.md | 16 - .../venmo-payment-token-usage-pattern.md | 20 - doc/models/venmo-payment-token-usage-type.md | 16 - doc/models/venmo-payment-token.md | 48 - .../venmo-wallet-additional-attributes.md | 35 - .../venmo-wallet-attributes-response.md | 36 - .../venmo-wallet-customer-information.md | 25 - doc/models/venmo-wallet-experience-context.md | 25 - doc/models/venmo-wallet-request.md | 45 - doc/models/venmo-wallet-response.md | 38 - doc/models/venmo-wallet-vault-attributes.md | 33 - doc/request-logging-configuration.md | 16 - doc/response-logging-configuration.md | 15 - doc/utility-classes.md | 35 - lib/pay_pal_restap_is.rb | 306 -- lib/pay_pal_restap_is/api_helper.rb | 10 - lib/pay_pal_restap_is/client.rb | 89 - lib/pay_pal_restap_is/configuration.rb | 163 - .../controllers/base_controller.rb | 71 - .../o_auth_authorization_controller.rb | 42 - .../controllers/orders_controller.rb | 517 --- .../controllers/payments_controller.rb | 400 -- .../controllers/vault_controller.rb | 224 - .../exceptions/api_exception.rb | 10 - .../exceptions/error_exception.rb | 71 - .../exceptions/o_auth_provider_exception.rb | 48 - lib/pay_pal_restap_is/http/api_response.rb | 21 - lib/pay_pal_restap_is/http/auth/o_auth2.rb | 136 - lib/pay_pal_restap_is/http/http_call_back.rb | 10 - .../http/http_method_enum.rb | 10 - lib/pay_pal_restap_is/http/http_request.rb | 10 - lib/pay_pal_restap_is/http/http_response.rb | 10 - .../api_logging_configuration.rb | 114 - lib/pay_pal_restap_is/logging/sdk_logger.rb | 17 - .../models/ach_debit_response.rb | 50 - .../models/activity_timestamps.rb | 68 - lib/pay_pal_restap_is/models/address.rb | 116 - .../models/address_details.rb | 160 - .../models/amount_breakdown.rb | 115 - .../models/amount_with_breakdown.rb | 80 - .../models/apple_pay_attributes.rb | 60 - .../models/apple_pay_attributes_response.rb | 50 - .../models/apple_pay_card.rb | 94 - .../models/apple_pay_card_response.rb | 167 - .../models/apple_pay_decrypted_token_data.rb | 95 - .../models/apple_pay_payment_data.rb | 83 - .../models/apple_pay_payment_data_type.rb | 24 - .../models/apple_pay_payment_object.rb | 114 - .../models/apple_pay_payment_token.rb | 51 - .../models/apple_pay_request.rb | 137 - .../models/apple_pay_tokenized_card.rb | 113 - .../models/authentication_response.rb | 61 - lib/pay_pal_restap_is/models/authorization.rb | 192 - .../models/authorization_incomplete_reason.rb | 23 - .../models/authorization_status.rb | 35 - .../models/authorization_status_details.rb | 50 - .../authorization_status_with_details.rb | 60 - .../authorization_with_additional_data.rb | 205 - lib/pay_pal_restap_is/models/avs_code.rb | 90 - .../models/bancontact_payment_object.rb | 95 - .../models/bancontact_payment_request.rb | 73 - .../models/bank_payment_token.rb | 59 - lib/pay_pal_restap_is/models/base_model.rb | 62 - lib/pay_pal_restap_is/models/bin_details.rb | 88 - .../models/blik_experience_context.rb | 122 - .../models/blik_level0_payment_object.rb | 48 - .../models/blik_one_click_payment_object.rb | 52 - .../models/blik_one_click_payment_request.rb | 82 - .../models/blik_payment_object.rb | 86 - .../models/blik_payment_request.rb | 105 - lib/pay_pal_restap_is/models/capture.rb | 228 - .../models/capture_incomplete_reason.rb | 55 - .../models/capture_payment_instruction.rb | 89 - .../models/capture_request.rb | 108 - .../models/capture_status.rb | 35 - .../models/capture_status_details.rb | 50 - .../models/capture_status_with_details.rb | 60 - .../models/captured_payment.rb | 248 -- .../models/card_attributes.rb | 70 - .../models/card_attributes_response.rb | 50 - lib/pay_pal_restap_is/models/card_brand.rb | 90 - .../models/card_experience_context.rb | 59 - .../models/card_from_request.rb | 60 - .../models/card_payment_token.rb | 166 - lib/pay_pal_restap_is/models/card_request.rb | 165 - lib/pay_pal_restap_is/models/card_response.rb | 139 - .../models/card_response_entity.rb | 156 - .../models/card_stored_credential.rb | 95 - .../models/card_supplementary_data.rb | 71 - lib/pay_pal_restap_is/models/card_type.rb | 32 - .../models/card_verification.rb | 51 - .../models/card_verification_details.rb | 111 - .../models/card_verification_method.rb | 29 - .../card_verification_processor_response.rb | 62 - .../models/checkout_payment_intent.rb | 24 - .../models/cobranded_card.rb | 70 - .../models/confirm_order_request.rb | 74 - .../models/customer_information.rb | 72 - .../models/customer_request.rb | 62 - .../customer_vault_payment_tokens_response.rb | 105 - lib/pay_pal_restap_is/models/cvv_code.rb | 60 - .../models/disbursement_mode.rb | 23 - .../models/dispute_category.rb | 23 - lib/pay_pal_restap_is/models/eci_flag.rb | 39 - .../models/enrollment_status.rb | 29 - .../models/eps_payment_object.rb | 74 - .../models/eps_payment_request.rb | 73 - lib/pay_pal_restap_is/models/error_details.rb | 110 - lib/pay_pal_restap_is/models/exchange_rate.rb | 75 - .../models/experience_context.rb | 98 - .../models/fullfillment_type.rb | 31 - .../models/giropay_payment_object.rb | 74 - .../models/giropay_payment_request.rb | 73 - .../google_pay_authentication_method.rb | 23 - .../models/google_pay_card_attributes.rb | 51 - .../models/google_pay_card_response.rb | 104 - .../models/google_pay_decrypted_token_data.rb | 105 - .../models/google_pay_payment_method.rb | 20 - .../models/google_pay_request.rb | 118 - .../models/google_pay_wallet_response.rb | 85 - .../models/ideal_payment_object.rb | 85 - .../models/ideal_payment_request.rb | 83 - .../models/instrument_authorization_status.rb | 35 - lib/pay_pal_restap_is/models/item.rb | 134 - lib/pay_pal_restap_is/models/item_category.rb | 26 - .../models/level2_card_processing_data.rb | 64 - .../models/level3_card_processing_data.rb | 120 - .../models/liability_shift_indicator.rb | 26 - lib/pay_pal_restap_is/models/line_item.rb | 176 - .../models/link_description.rb | 75 - .../models/link_http_method.rb | 41 - lib/pay_pal_restap_is/models/money.rb | 62 - .../models/my_bank_payment_object.rb | 85 - .../models/my_bank_payment_request.rb | 73 - lib/pay_pal_restap_is/models/name.rb | 61 - .../models/net_amount_breakdown_item.rb | 73 - lib/pay_pal_restap_is/models/network_token.rb | 95 - .../models/network_transaction_reference.rb | 90 - .../network_transaction_reference_entity.rb | 88 - .../models/o_auth_provider_error.rb | 45 - lib/pay_pal_restap_is/models/o_auth_token.rb | 106 - lib/pay_pal_restap_is/models/order.rb | 178 - .../models/order_application_context.rb | 193 - .../order_application_context_landing_page.rb | 32 - ...application_context_shipping_preference.rb | 34 - .../order_application_context_user_action.rb | 29 - .../models/order_authorize_request.rb | 51 - .../order_authorize_request_payment_source.rb | 104 - .../models/order_authorize_response.rb | 171 - ...order_authorize_response_payment_source.rb | 88 - .../models/order_capture_request.rb | 51 - .../order_capture_request_payment_source.rb | 104 - .../order_confirm_application_context.rb | 109 - lib/pay_pal_restap_is/models/order_request.rb | 103 - lib/pay_pal_restap_is/models/order_status.rb | 35 - .../models/order_tracker_item.rb | 99 - .../models/order_tracker_request.rb | 116 - .../models/order_tracker_response.rb | 122 - .../models/order_tracker_status.rb | 23 - .../models/p24_payment_object.rb | 108 - .../models/p24_payment_request.rb | 85 - lib/pay_pal_restap_is/models/pa_res_status.rb | 42 - lib/pay_pal_restap_is/models/patch.rb | 83 - lib/pay_pal_restap_is/models/patch_op.rb | 35 - .../models/pay_pal_experience_landing_page.rb | 26 - .../models/pay_pal_experience_user_action.rb | 24 - .../models/pay_pal_payment_token.rb | 180 - .../pay_pal_payment_token_customer_type.rb | 25 - .../pay_pal_payment_token_usage_pattern.rb | 35 - .../pay_pal_payment_token_usage_type.rb | 23 - .../models/pay_pal_wallet.rb | 158 - ..._pal_wallet_account_verification_status.rb | 24 - .../models/pay_pal_wallet_attributes.rb | 59 - .../pay_pal_wallet_attributes_response.rb | 70 - .../models/pay_pal_wallet_customer.rb | 85 - .../models/pay_pal_wallet_customer_request.rb | 85 - .../pay_pal_wallet_experience_context.rb | 140 - .../models/pay_pal_wallet_response.rb | 156 - .../pay_pal_wallet_vault_instruction.rb | 115 - .../models/pay_pal_wallet_vault_response.rb | 86 - .../models/pay_pal_wallet_vault_status.rb | 26 - lib/pay_pal_restap_is/models/payee.rb | 65 - lib/pay_pal_restap_is/models/payee_base.rb | 64 - .../models/payee_payment_method_preference.rb | 23 - lib/pay_pal_restap_is/models/payer.rb | 120 - lib/pay_pal_restap_is/models/payer_base.rb | 64 - .../models/payment_advice_code.rb | 30 - .../models/payment_authorization.rb | 212 - .../models/payment_collection.rb | 99 - .../models/payment_initiator.rb | 23 - .../models/payment_instruction.rb | 105 - .../models/payment_method_preference.rb | 72 - .../models/payment_source.rb | 187 - .../models/payment_source_response.rb | 171 - .../models/payment_supplementary_data.rb | 50 - .../models/payment_token_request.rb | 60 - .../models/payment_token_request_card.rb | 134 - .../payment_token_request_payment_source.rb | 59 - .../models/payment_token_response.rb | 87 - .../payment_token_response_payment_source.rb | 87 - lib/pay_pal_restap_is/models/phone.rb | 77 - lib/pay_pal_restap_is/models/phone_number.rb | 54 - .../models/phone_number_with_country_code.rb | 66 - lib/pay_pal_restap_is/models/phone_type.rb | 32 - .../models/phone_with_type.rb | 59 - lib/pay_pal_restap_is/models/platform_fee.rb | 63 - .../models/processing_instruction.rb | 23 - .../models/processor_response.rb | 83 - .../models/processor_response_code.rb | 479 -- lib/pay_pal_restap_is/models/purchase_unit.rb | 215 - .../models/purchase_unit_request.rb | 193 - .../models/reauthorize_request.rb | 62 - lib/pay_pal_restap_is/models/refund.rb | 195 - .../models/refund_incomplete_reason.rb | 20 - .../models/refund_payment_instruction.rb | 68 - .../models/refund_platform_fee.rb | 52 - .../models/refund_request.rb | 100 - lib/pay_pal_restap_is/models/refund_status.rb | 29 - .../models/refund_status_details.rb | 50 - .../models/refund_status_with_details.rb | 60 - .../models/related_identifiers.rb | 69 - .../models/seller_payable_breakdown.rb | 156 - .../models/seller_protection.rb | 65 - .../models/seller_protection_status.rb | 29 - .../models/seller_receivable_breakdown.rb | 129 - .../sepa_debit_authorization_details.rb | 50 - .../models/sepa_debit_response.rb | 87 - .../setup_token_card_experience_context.rb | 103 - .../models/setup_token_request.rb | 60 - .../models/setup_token_request_card.rb | 150 - .../setup_token_request_payment_source.rb | 77 - .../models/setup_token_response.rb | 106 - .../models/setup_token_response_card.rb | 156 - .../setup_token_response_payment_source.rb | 68 - .../models/shipment_carrier.rb | 3852 ----------------- .../models/shipping_details.rb | 94 - lib/pay_pal_restap_is/models/shipping_name.rb | 50 - .../models/shipping_option.rb | 94 - .../models/shipping_preference.rb | 26 - lib/pay_pal_restap_is/models/shipping_type.rb | 29 - .../models/shipping_with_tracking_details.rb | 113 - .../models/sofort_payment_object.rb | 85 - .../models/sofort_payment_request.rb | 73 - .../models/standard_entry_class_code.rb | 36 - .../models/store_in_vault_instruction.rb | 20 - .../models/stored_payment_source.rb | 95 - .../stored_payment_source_payment_type.rb | 26 - .../stored_payment_source_usage_type.rb | 27 - .../models/supplementary_data.rb | 58 - .../models/supplementary_purchase_data.rb | 63 - lib/pay_pal_restap_is/models/tax_id_type.rb | 23 - lib/pay_pal_restap_is/models/tax_info.rb | 57 - .../three_d_secure_authentication_response.rb | 62 - lib/pay_pal_restap_is/models/token.rb | 56 - lib/pay_pal_restap_is/models/token_type.rb | 23 - .../models/trustly_payment_object.rb | 85 - .../models/trustly_payment_request.rb | 73 - .../models/universal_product_code.rb | 56 - lib/pay_pal_restap_is/models/upc_type.rb | 38 - .../models/vault_customer.rb | 50 - .../models/vault_experience_context.rb | 112 - .../models/vault_instruction.rb | 50 - .../models/vault_instruction_base.rb | 52 - .../models/vault_pay_pal_wallet_request.rb | 115 - .../models/vault_response.rb | 86 - .../models/vault_sepa_debit_response.rb | 76 - lib/pay_pal_restap_is/models/vault_status.rb | 26 - .../models/vault_token_request.rb | 56 - .../models/vault_venmo_experience_context.rb | 73 - .../models/vault_venmo_request.rb | 115 - .../models/vaulted_digital_wallet.rb | 106 - ...vaulted_digital_wallet_shipping_details.rb | 75 - .../models/venmo_payment_token.rb | 169 - .../venmo_payment_token_customer_type.rb | 25 - .../venmo_payment_token_usage_pattern.rb | 35 - .../models/venmo_payment_token_usage_type.rb | 23 - .../venmo_wallet_additional_attributes.rb | 60 - .../venmo_wallet_attributes_response.rb | 50 - .../venmo_wallet_customer_information.rb | 63 - .../models/venmo_wallet_experience_context.rb | 65 - .../models/venmo_wallet_request.rb | 89 - .../models/venmo_wallet_response.rb | 120 - .../models/venmo_wallet_vault_attributes.rb | 114 - .../utilities/date_time_helper.rb | 11 - .../utilities/file_wrapper.rb | 16 - pay_pal_restap_is.gemspec | 16 - 538 files changed, 38906 deletions(-) delete mode 100644 .rubocop.yml delete mode 100644 Gemfile delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 doc/abstract-logger.md delete mode 100644 doc/auth/oauth-2-client-credentials-grant.md delete mode 100644 doc/client.md delete mode 100644 doc/controllers/orders.md delete mode 100644 doc/controllers/payments.md delete mode 100644 doc/controllers/vault.md delete mode 100644 doc/http-request.md delete mode 100644 doc/http-response.md delete mode 100644 doc/logging-configuration.md delete mode 100644 doc/models/ach-debit-response.md delete mode 100644 doc/models/activity-timestamps.md delete mode 100644 doc/models/address-details.md delete mode 100644 doc/models/address.md delete mode 100644 doc/models/amount-breakdown.md delete mode 100644 doc/models/amount-with-breakdown.md delete mode 100644 doc/models/apple-pay-attributes-response.md delete mode 100644 doc/models/apple-pay-attributes.md delete mode 100644 doc/models/apple-pay-card-response.md delete mode 100644 doc/models/apple-pay-card.md delete mode 100644 doc/models/apple-pay-decrypted-token-data.md delete mode 100644 doc/models/apple-pay-payment-data-type.md delete mode 100644 doc/models/apple-pay-payment-data.md delete mode 100644 doc/models/apple-pay-payment-object.md delete mode 100644 doc/models/apple-pay-payment-token.md delete mode 100644 doc/models/apple-pay-request.md delete mode 100644 doc/models/apple-pay-tokenized-card.md delete mode 100644 doc/models/authentication-response.md delete mode 100644 doc/models/authorization-incomplete-reason.md delete mode 100644 doc/models/authorization-status-details.md delete mode 100644 doc/models/authorization-status-with-details.md delete mode 100644 doc/models/authorization-status.md delete mode 100644 doc/models/authorization-with-additional-data.md delete mode 100644 doc/models/authorization.md delete mode 100644 doc/models/avs-code.md delete mode 100644 doc/models/bancontact-payment-object.md delete mode 100644 doc/models/bancontact-payment-request.md delete mode 100644 doc/models/bank-payment-token.md delete mode 100644 doc/models/bin-details.md delete mode 100644 doc/models/blik-experience-context.md delete mode 100644 doc/models/blik-level-0-payment-object.md delete mode 100644 doc/models/blik-one-click-payment-object.md delete mode 100644 doc/models/blik-one-click-payment-request.md delete mode 100644 doc/models/blik-payment-object.md delete mode 100644 doc/models/blik-payment-request.md delete mode 100644 doc/models/capture-incomplete-reason.md delete mode 100644 doc/models/capture-payment-instruction.md delete mode 100644 doc/models/capture-request.md delete mode 100644 doc/models/capture-status-details.md delete mode 100644 doc/models/capture-status-with-details.md delete mode 100644 doc/models/capture-status.md delete mode 100644 doc/models/capture.md delete mode 100644 doc/models/captured-payment.md delete mode 100644 doc/models/card-attributes-response.md delete mode 100644 doc/models/card-attributes.md delete mode 100644 doc/models/card-brand.md delete mode 100644 doc/models/card-experience-context.md delete mode 100644 doc/models/card-from-request.md delete mode 100644 doc/models/card-payment-token.md delete mode 100644 doc/models/card-request.md delete mode 100644 doc/models/card-response-entity.md delete mode 100644 doc/models/card-response.md delete mode 100644 doc/models/card-stored-credential.md delete mode 100644 doc/models/card-supplementary-data.md delete mode 100644 doc/models/card-type.md delete mode 100644 doc/models/card-verification-details.md delete mode 100644 doc/models/card-verification-method.md delete mode 100644 doc/models/card-verification-processor-response.md delete mode 100644 doc/models/card-verification.md delete mode 100644 doc/models/checkout-payment-intent.md delete mode 100644 doc/models/cobranded-card.md delete mode 100644 doc/models/confirm-order-request.md delete mode 100644 doc/models/customer-information.md delete mode 100644 doc/models/customer-request.md delete mode 100644 doc/models/customer-vault-payment-tokens-response.md delete mode 100644 doc/models/cvv-code.md delete mode 100644 doc/models/disbursement-mode.md delete mode 100644 doc/models/dispute-category.md delete mode 100644 doc/models/eci-flag.md delete mode 100644 doc/models/enrollment-status.md delete mode 100644 doc/models/eps-payment-object.md delete mode 100644 doc/models/eps-payment-request.md delete mode 100644 doc/models/error-details.md delete mode 100644 doc/models/error-exception.md delete mode 100644 doc/models/exchange-rate.md delete mode 100644 doc/models/experience-context.md delete mode 100644 doc/models/fullfillment-type.md delete mode 100644 doc/models/giropay-payment-object.md delete mode 100644 doc/models/giropay-payment-request.md delete mode 100644 doc/models/google-pay-authentication-method.md delete mode 100644 doc/models/google-pay-card-attributes.md delete mode 100644 doc/models/google-pay-card-response.md delete mode 100644 doc/models/google-pay-decrypted-token-data.md delete mode 100644 doc/models/google-pay-payment-method.md delete mode 100644 doc/models/google-pay-request.md delete mode 100644 doc/models/google-pay-wallet-response.md delete mode 100644 doc/models/ideal-payment-object.md delete mode 100644 doc/models/ideal-payment-request.md delete mode 100644 doc/models/instrument-authorization-status.md delete mode 100644 doc/models/item-category.md delete mode 100644 doc/models/item.md delete mode 100644 doc/models/level-2-card-processing-data.md delete mode 100644 doc/models/level-3-card-processing-data.md delete mode 100644 doc/models/liability-shift-indicator.md delete mode 100644 doc/models/line-item.md delete mode 100644 doc/models/link-description.md delete mode 100644 doc/models/link-http-method.md delete mode 100644 doc/models/money.md delete mode 100644 doc/models/my-bank-payment-object.md delete mode 100644 doc/models/my-bank-payment-request.md delete mode 100644 doc/models/name.md delete mode 100644 doc/models/net-amount-breakdown-item.md delete mode 100644 doc/models/network-token.md delete mode 100644 doc/models/network-transaction-reference-entity.md delete mode 100644 doc/models/network-transaction-reference.md delete mode 100644 doc/models/o-auth-provider-error.md delete mode 100644 doc/models/o-auth-provider-exception.md delete mode 100644 doc/models/o-auth-token.md delete mode 100644 doc/models/order-application-context-landing-page.md delete mode 100644 doc/models/order-application-context-shipping-preference.md delete mode 100644 doc/models/order-application-context-user-action.md delete mode 100644 doc/models/order-application-context.md delete mode 100644 doc/models/order-authorize-request-payment-source.md delete mode 100644 doc/models/order-authorize-request.md delete mode 100644 doc/models/order-authorize-response-payment-source.md delete mode 100644 doc/models/order-authorize-response.md delete mode 100644 doc/models/order-capture-request-payment-source.md delete mode 100644 doc/models/order-capture-request.md delete mode 100644 doc/models/order-confirm-application-context.md delete mode 100644 doc/models/order-request.md delete mode 100644 doc/models/order-status.md delete mode 100644 doc/models/order-tracker-item.md delete mode 100644 doc/models/order-tracker-request.md delete mode 100644 doc/models/order-tracker-response.md delete mode 100644 doc/models/order-tracker-status.md delete mode 100644 doc/models/order.md delete mode 100644 doc/models/p24-payment-object.md delete mode 100644 doc/models/p24-payment-request.md delete mode 100644 doc/models/pa-res-status.md delete mode 100644 doc/models/patch-op.md delete mode 100644 doc/models/patch.md delete mode 100644 doc/models/pay-pal-experience-landing-page.md delete mode 100644 doc/models/pay-pal-experience-user-action.md delete mode 100644 doc/models/pay-pal-payment-token-customer-type.md delete mode 100644 doc/models/pay-pal-payment-token-usage-pattern.md delete mode 100644 doc/models/pay-pal-payment-token-usage-type.md delete mode 100644 doc/models/pay-pal-payment-token.md delete mode 100644 doc/models/pay-pal-wallet-account-verification-status.md delete mode 100644 doc/models/pay-pal-wallet-attributes-response.md delete mode 100644 doc/models/pay-pal-wallet-attributes.md delete mode 100644 doc/models/pay-pal-wallet-customer-request.md delete mode 100644 doc/models/pay-pal-wallet-customer.md delete mode 100644 doc/models/pay-pal-wallet-experience-context.md delete mode 100644 doc/models/pay-pal-wallet-response.md delete mode 100644 doc/models/pay-pal-wallet-vault-instruction.md delete mode 100644 doc/models/pay-pal-wallet-vault-response.md delete mode 100644 doc/models/pay-pal-wallet-vault-status.md delete mode 100644 doc/models/pay-pal-wallet.md delete mode 100644 doc/models/payee-base.md delete mode 100644 doc/models/payee-payment-method-preference.md delete mode 100644 doc/models/payee.md delete mode 100644 doc/models/payer-base.md delete mode 100644 doc/models/payer.md delete mode 100644 doc/models/payment-advice-code.md delete mode 100644 doc/models/payment-authorization.md delete mode 100644 doc/models/payment-collection.md delete mode 100644 doc/models/payment-initiator.md delete mode 100644 doc/models/payment-instruction.md delete mode 100644 doc/models/payment-method-preference.md delete mode 100644 doc/models/payment-source-response.md delete mode 100644 doc/models/payment-source.md delete mode 100644 doc/models/payment-supplementary-data.md delete mode 100644 doc/models/payment-token-request-card.md delete mode 100644 doc/models/payment-token-request-payment-source.md delete mode 100644 doc/models/payment-token-request.md delete mode 100644 doc/models/payment-token-response-payment-source.md delete mode 100644 doc/models/payment-token-response.md delete mode 100644 doc/models/phone-number-with-country-code.md delete mode 100644 doc/models/phone-number.md delete mode 100644 doc/models/phone-type.md delete mode 100644 doc/models/phone-with-type.md delete mode 100644 doc/models/phone.md delete mode 100644 doc/models/platform-fee.md delete mode 100644 doc/models/processing-instruction.md delete mode 100644 doc/models/processor-response-code.md delete mode 100644 doc/models/processor-response.md delete mode 100644 doc/models/purchase-unit-request.md delete mode 100644 doc/models/purchase-unit.md delete mode 100644 doc/models/reauthorize-request.md delete mode 100644 doc/models/refund-incomplete-reason.md delete mode 100644 doc/models/refund-payment-instruction.md delete mode 100644 doc/models/refund-platform-fee.md delete mode 100644 doc/models/refund-request.md delete mode 100644 doc/models/refund-status-details.md delete mode 100644 doc/models/refund-status-with-details.md delete mode 100644 doc/models/refund-status.md delete mode 100644 doc/models/refund.md delete mode 100644 doc/models/related-identifiers.md delete mode 100644 doc/models/seller-payable-breakdown.md delete mode 100644 doc/models/seller-protection-status.md delete mode 100644 doc/models/seller-protection.md delete mode 100644 doc/models/seller-receivable-breakdown.md delete mode 100644 doc/models/sepa-debit-authorization-details.md delete mode 100644 doc/models/sepa-debit-response.md delete mode 100644 doc/models/setup-token-card-experience-context.md delete mode 100644 doc/models/setup-token-request-card.md delete mode 100644 doc/models/setup-token-request-payment-source.md delete mode 100644 doc/models/setup-token-request.md delete mode 100644 doc/models/setup-token-response-card.md delete mode 100644 doc/models/setup-token-response-payment-source.md delete mode 100644 doc/models/setup-token-response.md delete mode 100644 doc/models/shipment-carrier.md delete mode 100644 doc/models/shipping-details.md delete mode 100644 doc/models/shipping-name.md delete mode 100644 doc/models/shipping-option.md delete mode 100644 doc/models/shipping-preference.md delete mode 100644 doc/models/shipping-type.md delete mode 100644 doc/models/shipping-with-tracking-details.md delete mode 100644 doc/models/sofort-payment-object.md delete mode 100644 doc/models/sofort-payment-request.md delete mode 100644 doc/models/standard-entry-class-code.md delete mode 100644 doc/models/store-in-vault-instruction.md delete mode 100644 doc/models/stored-payment-source-payment-type.md delete mode 100644 doc/models/stored-payment-source-usage-type.md delete mode 100644 doc/models/stored-payment-source.md delete mode 100644 doc/models/supplementary-data.md delete mode 100644 doc/models/supplementary-purchase-data.md delete mode 100644 doc/models/tax-id-type.md delete mode 100644 doc/models/tax-info.md delete mode 100644 doc/models/three-d-secure-authentication-response.md delete mode 100644 doc/models/token-type.md delete mode 100644 doc/models/token.md delete mode 100644 doc/models/trustly-payment-object.md delete mode 100644 doc/models/trustly-payment-request.md delete mode 100644 doc/models/universal-product-code.md delete mode 100644 doc/models/upc-type.md delete mode 100644 doc/models/vault-customer.md delete mode 100644 doc/models/vault-experience-context.md delete mode 100644 doc/models/vault-instruction-base.md delete mode 100644 doc/models/vault-instruction.md delete mode 100644 doc/models/vault-pay-pal-wallet-request.md delete mode 100644 doc/models/vault-response.md delete mode 100644 doc/models/vault-sepa-debit-response.md delete mode 100644 doc/models/vault-status.md delete mode 100644 doc/models/vault-token-request.md delete mode 100644 doc/models/vault-venmo-experience-context.md delete mode 100644 doc/models/vault-venmo-request.md delete mode 100644 doc/models/vaulted-digital-wallet-shipping-details.md delete mode 100644 doc/models/vaulted-digital-wallet.md delete mode 100644 doc/models/venmo-payment-token-customer-type.md delete mode 100644 doc/models/venmo-payment-token-usage-pattern.md delete mode 100644 doc/models/venmo-payment-token-usage-type.md delete mode 100644 doc/models/venmo-payment-token.md delete mode 100644 doc/models/venmo-wallet-additional-attributes.md delete mode 100644 doc/models/venmo-wallet-attributes-response.md delete mode 100644 doc/models/venmo-wallet-customer-information.md delete mode 100644 doc/models/venmo-wallet-experience-context.md delete mode 100644 doc/models/venmo-wallet-request.md delete mode 100644 doc/models/venmo-wallet-response.md delete mode 100644 doc/models/venmo-wallet-vault-attributes.md delete mode 100644 doc/request-logging-configuration.md delete mode 100644 doc/response-logging-configuration.md delete mode 100644 doc/utility-classes.md delete mode 100644 lib/pay_pal_restap_is.rb delete mode 100644 lib/pay_pal_restap_is/api_helper.rb delete mode 100644 lib/pay_pal_restap_is/client.rb delete mode 100644 lib/pay_pal_restap_is/configuration.rb delete mode 100644 lib/pay_pal_restap_is/controllers/base_controller.rb delete mode 100644 lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb delete mode 100644 lib/pay_pal_restap_is/controllers/orders_controller.rb delete mode 100644 lib/pay_pal_restap_is/controllers/payments_controller.rb delete mode 100644 lib/pay_pal_restap_is/controllers/vault_controller.rb delete mode 100644 lib/pay_pal_restap_is/exceptions/api_exception.rb delete mode 100644 lib/pay_pal_restap_is/exceptions/error_exception.rb delete mode 100644 lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb delete mode 100644 lib/pay_pal_restap_is/http/api_response.rb delete mode 100644 lib/pay_pal_restap_is/http/auth/o_auth2.rb delete mode 100644 lib/pay_pal_restap_is/http/http_call_back.rb delete mode 100644 lib/pay_pal_restap_is/http/http_method_enum.rb delete mode 100644 lib/pay_pal_restap_is/http/http_request.rb delete mode 100644 lib/pay_pal_restap_is/http/http_response.rb delete mode 100644 lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb delete mode 100644 lib/pay_pal_restap_is/logging/sdk_logger.rb delete mode 100644 lib/pay_pal_restap_is/models/ach_debit_response.rb delete mode 100644 lib/pay_pal_restap_is/models/activity_timestamps.rb delete mode 100644 lib/pay_pal_restap_is/models/address.rb delete mode 100644 lib/pay_pal_restap_is/models/address_details.rb delete mode 100644 lib/pay_pal_restap_is/models/amount_breakdown.rb delete mode 100644 lib/pay_pal_restap_is/models/amount_with_breakdown.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_attributes.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_card.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_card_response.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_data.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_payment_token.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_request.rb delete mode 100644 lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb delete mode 100644 lib/pay_pal_restap_is/models/authentication_response.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization_status.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization_status_details.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization_status_with_details.rb delete mode 100644 lib/pay_pal_restap_is/models/authorization_with_additional_data.rb delete mode 100644 lib/pay_pal_restap_is/models/avs_code.rb delete mode 100644 lib/pay_pal_restap_is/models/bancontact_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/bancontact_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/bank_payment_token.rb delete mode 100644 lib/pay_pal_restap_is/models/base_model.rb delete mode 100644 lib/pay_pal_restap_is/models/bin_details.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_level0_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/blik_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/capture.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_incomplete_reason.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_payment_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_request.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_status.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_status_details.rb delete mode 100644 lib/pay_pal_restap_is/models/capture_status_with_details.rb delete mode 100644 lib/pay_pal_restap_is/models/captured_payment.rb delete mode 100644 lib/pay_pal_restap_is/models/card_attributes.rb delete mode 100644 lib/pay_pal_restap_is/models/card_attributes_response.rb delete mode 100644 lib/pay_pal_restap_is/models/card_brand.rb delete mode 100644 lib/pay_pal_restap_is/models/card_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/card_from_request.rb delete mode 100644 lib/pay_pal_restap_is/models/card_payment_token.rb delete mode 100644 lib/pay_pal_restap_is/models/card_request.rb delete mode 100644 lib/pay_pal_restap_is/models/card_response.rb delete mode 100644 lib/pay_pal_restap_is/models/card_response_entity.rb delete mode 100644 lib/pay_pal_restap_is/models/card_stored_credential.rb delete mode 100644 lib/pay_pal_restap_is/models/card_supplementary_data.rb delete mode 100644 lib/pay_pal_restap_is/models/card_type.rb delete mode 100644 lib/pay_pal_restap_is/models/card_verification.rb delete mode 100644 lib/pay_pal_restap_is/models/card_verification_details.rb delete mode 100644 lib/pay_pal_restap_is/models/card_verification_method.rb delete mode 100644 lib/pay_pal_restap_is/models/card_verification_processor_response.rb delete mode 100644 lib/pay_pal_restap_is/models/checkout_payment_intent.rb delete mode 100644 lib/pay_pal_restap_is/models/cobranded_card.rb delete mode 100644 lib/pay_pal_restap_is/models/confirm_order_request.rb delete mode 100644 lib/pay_pal_restap_is/models/customer_information.rb delete mode 100644 lib/pay_pal_restap_is/models/customer_request.rb delete mode 100644 lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb delete mode 100644 lib/pay_pal_restap_is/models/cvv_code.rb delete mode 100644 lib/pay_pal_restap_is/models/disbursement_mode.rb delete mode 100644 lib/pay_pal_restap_is/models/dispute_category.rb delete mode 100644 lib/pay_pal_restap_is/models/eci_flag.rb delete mode 100644 lib/pay_pal_restap_is/models/enrollment_status.rb delete mode 100644 lib/pay_pal_restap_is/models/eps_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/eps_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/error_details.rb delete mode 100644 lib/pay_pal_restap_is/models/exchange_rate.rb delete mode 100644 lib/pay_pal_restap_is/models/experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/fullfillment_type.rb delete mode 100644 lib/pay_pal_restap_is/models/giropay_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/giropay_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_authentication_method.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_card_attributes.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_card_response.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_payment_method.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_request.rb delete mode 100644 lib/pay_pal_restap_is/models/google_pay_wallet_response.rb delete mode 100644 lib/pay_pal_restap_is/models/ideal_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/ideal_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/instrument_authorization_status.rb delete mode 100644 lib/pay_pal_restap_is/models/item.rb delete mode 100644 lib/pay_pal_restap_is/models/item_category.rb delete mode 100644 lib/pay_pal_restap_is/models/level2_card_processing_data.rb delete mode 100644 lib/pay_pal_restap_is/models/level3_card_processing_data.rb delete mode 100644 lib/pay_pal_restap_is/models/liability_shift_indicator.rb delete mode 100644 lib/pay_pal_restap_is/models/line_item.rb delete mode 100644 lib/pay_pal_restap_is/models/link_description.rb delete mode 100644 lib/pay_pal_restap_is/models/link_http_method.rb delete mode 100644 lib/pay_pal_restap_is/models/money.rb delete mode 100644 lib/pay_pal_restap_is/models/my_bank_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/my_bank_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/name.rb delete mode 100644 lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb delete mode 100644 lib/pay_pal_restap_is/models/network_token.rb delete mode 100644 lib/pay_pal_restap_is/models/network_transaction_reference.rb delete mode 100644 lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb delete mode 100644 lib/pay_pal_restap_is/models/o_auth_provider_error.rb delete mode 100644 lib/pay_pal_restap_is/models/o_auth_token.rb delete mode 100644 lib/pay_pal_restap_is/models/order.rb delete mode 100644 lib/pay_pal_restap_is/models/order_application_context.rb delete mode 100644 lib/pay_pal_restap_is/models/order_application_context_landing_page.rb delete mode 100644 lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb delete mode 100644 lib/pay_pal_restap_is/models/order_application_context_user_action.rb delete mode 100644 lib/pay_pal_restap_is/models/order_authorize_request.rb delete mode 100644 lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/order_authorize_response.rb delete mode 100644 lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/order_capture_request.rb delete mode 100644 lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/order_confirm_application_context.rb delete mode 100644 lib/pay_pal_restap_is/models/order_request.rb delete mode 100644 lib/pay_pal_restap_is/models/order_status.rb delete mode 100644 lib/pay_pal_restap_is/models/order_tracker_item.rb delete mode 100644 lib/pay_pal_restap_is/models/order_tracker_request.rb delete mode 100644 lib/pay_pal_restap_is/models/order_tracker_response.rb delete mode 100644 lib/pay_pal_restap_is/models/order_tracker_status.rb delete mode 100644 lib/pay_pal_restap_is/models/p24_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/p24_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/pa_res_status.rb delete mode 100644 lib/pay_pal_restap_is/models/patch.rb delete mode 100644 lib/pay_pal_restap_is/models/patch_op.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb delete mode 100644 lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb delete mode 100644 lib/pay_pal_restap_is/models/payee.rb delete mode 100644 lib/pay_pal_restap_is/models/payee_base.rb delete mode 100644 lib/pay_pal_restap_is/models/payee_payment_method_preference.rb delete mode 100644 lib/pay_pal_restap_is/models/payer.rb delete mode 100644 lib/pay_pal_restap_is/models/payer_base.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_advice_code.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_authorization.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_collection.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_initiator.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_method_preference.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_source_response.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_supplementary_data.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_token_request.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_token_request_card.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_token_response.rb delete mode 100644 lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/phone.rb delete mode 100644 lib/pay_pal_restap_is/models/phone_number.rb delete mode 100644 lib/pay_pal_restap_is/models/phone_number_with_country_code.rb delete mode 100644 lib/pay_pal_restap_is/models/phone_type.rb delete mode 100644 lib/pay_pal_restap_is/models/phone_with_type.rb delete mode 100644 lib/pay_pal_restap_is/models/platform_fee.rb delete mode 100644 lib/pay_pal_restap_is/models/processing_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/processor_response.rb delete mode 100644 lib/pay_pal_restap_is/models/processor_response_code.rb delete mode 100644 lib/pay_pal_restap_is/models/purchase_unit.rb delete mode 100644 lib/pay_pal_restap_is/models/purchase_unit_request.rb delete mode 100644 lib/pay_pal_restap_is/models/reauthorize_request.rb delete mode 100644 lib/pay_pal_restap_is/models/refund.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_incomplete_reason.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_payment_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_platform_fee.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_request.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_status.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_status_details.rb delete mode 100644 lib/pay_pal_restap_is/models/refund_status_with_details.rb delete mode 100644 lib/pay_pal_restap_is/models/related_identifiers.rb delete mode 100644 lib/pay_pal_restap_is/models/seller_payable_breakdown.rb delete mode 100644 lib/pay_pal_restap_is/models/seller_protection.rb delete mode 100644 lib/pay_pal_restap_is/models/seller_protection_status.rb delete mode 100644 lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb delete mode 100644 lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb delete mode 100644 lib/pay_pal_restap_is/models/sepa_debit_response.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_request.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_request_card.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_response.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_response_card.rb delete mode 100644 lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/shipment_carrier.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_details.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_name.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_option.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_preference.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_type.rb delete mode 100644 lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb delete mode 100644 lib/pay_pal_restap_is/models/sofort_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/sofort_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/standard_entry_class_code.rb delete mode 100644 lib/pay_pal_restap_is/models/store_in_vault_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/stored_payment_source.rb delete mode 100644 lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb delete mode 100644 lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb delete mode 100644 lib/pay_pal_restap_is/models/supplementary_data.rb delete mode 100644 lib/pay_pal_restap_is/models/supplementary_purchase_data.rb delete mode 100644 lib/pay_pal_restap_is/models/tax_id_type.rb delete mode 100644 lib/pay_pal_restap_is/models/tax_info.rb delete mode 100644 lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb delete mode 100644 lib/pay_pal_restap_is/models/token.rb delete mode 100644 lib/pay_pal_restap_is/models/token_type.rb delete mode 100644 lib/pay_pal_restap_is/models/trustly_payment_object.rb delete mode 100644 lib/pay_pal_restap_is/models/trustly_payment_request.rb delete mode 100644 lib/pay_pal_restap_is/models/universal_product_code.rb delete mode 100644 lib/pay_pal_restap_is/models/upc_type.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_customer.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_instruction.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_instruction_base.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_response.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_status.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_token_request.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/vault_venmo_request.rb delete mode 100644 lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb delete mode 100644 lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_request.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_response.rb delete mode 100644 lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb delete mode 100644 lib/pay_pal_restap_is/utilities/date_time_helper.rb delete mode 100644 lib/pay_pal_restap_is/utilities/file_wrapper.rb delete mode 100644 pay_pal_restap_is.gemspec diff --git a/.rubocop.yml b/.rubocop.yml deleted file mode 100644 index 08c50fe..0000000 --- a/.rubocop.yml +++ /dev/null @@ -1,60 +0,0 @@ -Metrics/ClassLength: - Enabled: false - -Metrics/MethodLength: - Enabled: false - -Metrics/BlockLength: - Enabled: false - -Metrics/ParameterLists: - Enabled: false - -Metrics/AbcSize: - Enabled: false - -Metrics/CyclomaticComplexity: - Enabled: false - -Metrics/PerceivedComplexity: - Enabled: false - -Layout/EndOfLine: - Enabled: false -Lint/UnderscorePrefixedVariableName: - Enabled: false - -Lint/MissingSuper: - Enabled: false - -Naming/AccessorMethodName: - Enabled: false - -Naming/MethodParameterName: - Enabled: false - -Naming/VariableNumber: - Enabled: false - -Style/AsciiComments: - Enabled: false - -Style/FrozenStringLiteralComment: - Enabled: false - -Style/RedundantAssignment: - Enabled: false - -Style/MultilineTernaryOperator: - Enabled: false - -Layout/MultilineMethodCallIndentation: - Enabled: false - -Style/KeywordParametersOrder: - Enabled: false - -AllCops: - Exclude: - - './test/**/*' - - './*' diff --git a/Gemfile b/Gemfile deleted file mode 100644 index fa75df1..0000000 --- a/Gemfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://rubygems.org' - -gemspec diff --git a/LICENSE b/LICENSE deleted file mode 100644 index b9181f7..0000000 --- a/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2024 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 6071f3b..0000000 --- a/README.md +++ /dev/null @@ -1,159 +0,0 @@ - -# Getting Started with PayPal REST APIs - -## Introduction - -An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders., Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview., The Payment Method Tokens API saves payment methods so payers don't have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token.

The permanent token represents a payment method that's saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.

The Payment Method Tokens API is available in the US only. - -Find out more here: [https://developer.paypal.com/docs/api/orders/v2/](https://developer.paypal.com/docs/api/orders/v2/) - -## Building - -The generated code depends on a few Ruby gems. The references to these gems are added in the gemspec file. The easiest way to resolve the dependencies, build the gem and install it is through Rake: - -1. Install Rake if not already installed: `gem install rake` -2. Install Bundler if not already installed: `gem install bundler` -3. From terminal/cmd navigate to the root directory of the SDK. -4. Invoke: `rake install` - -Alternatively, you can build and install the gem manually: - -1. From terminal/cmd navigate to the root directory of the SDK. -2. Run the build command: `gem build pay_pal_restap_is.gemspec` -3. Run the install command: `gem install pay_pal_restap_is-2.16.0.gem` - -![Installing Gem](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=buildSDK) - -## Installation - -The following section explains how to use the pay_pal_restap_is ruby gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE. - -### 1. Starting a new project - -Close any existing projects in RubyMine™ by selecting `File -> Close Project`. Next, click on `Create New Project` to create a new project from scratch. - -![Create a new project in RubyMine - Step 1](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject0) - -Next, provide `TestApp` as the project name, choose `Rails Application` as the project type, and click `OK`. - -![Create a new Rails Application in RubyMine - Step 2](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject1) - -In the next dialog make sure that the correct Ruby SDK is being used (>= 2.6 and <= 3.2) and click `OK`. - -![Create a new Rails Application in RubyMine - Step 3](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=createNewProject2) - -### 2. Add reference of the gem - -In order to use the `pay_pal_restap_is` gem in the new project we must add a gem reference. Locate the `Gemfile` in the Project Explorer window under the `TestApp` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: `gem 'pay_pal_restap_is', '2.16.0'` - -![Add new reference to the Gemfile](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addReference) - -### 3. Adding a new Rails Controller - -Once the `TestApp` project is created, a folder named `controllers` will be visible in the *Project Explorer* under the following path: `TestApp > app > controllers`. Right click on this folder and select `New -> Run Rails Generator...`. - -![Run Rails Generator on Controllers Folder](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addCode0) - -Selecting the said option will popup a small window where the generator names are displayed. Here, select the `controller` template. - -![Create a new Controller](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&step=addCode1) - -Next, a popup window will ask you for a Controller name and included Actions. For controller name provide `Hello` and include an action named `Index` and click `OK`. - -![Add a new Controller](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemVer=2.16.0&gemName=pay_pal_restap_is&step=addCode2) - -A new controller class named `HelloController` will be created in a file named `hello_controller.rb` containing a method named `Index`. - -1. Add the `require 'pay_pal_restap_is'` statement to require the gem in the controller file. -2. Add the `include PayPalRestapIs` statement to include the sdk module in the controller file. -3. In the `Index` method, add code for initialization and a sample for its usage. - -![Initialize the library](https://apidocs.io/illustration/ruby?workspaceFolder=PayPalRestapIs&gemName=pay_pal_restap_is&step=addCode3) - -## Initialize the API Client - -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/client.md) - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `environment` | `Environment` | The API environment.
**Default: `Environment.SANDBOX`** | -| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests | -| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests | -| `timeout` | `Float` | The value to use for connection timeout.
**Default: 60** | -| `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `retry_interval` | `Float` | Pause in seconds between retries.
**Default: 1** | -| `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff.
**Default: 2** | -| `retry_statuses` | `Array` | A list of HTTP statuses to retry.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array` | A list of HTTP methods to retry.
**Default: %i[get put]** | -| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. | -| `logging_configuration` | [`LoggingConfiguration`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/logging-configuration.md) | The SDK logging configuration for API calls | -| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | - -The API client can be initialized as follows: - -```ruby -client = PayPalRestapIs::Client.new( - client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( - o_auth_client_id: 'OAuthClientId', - o_auth_client_secret: 'OAuthClientSecret' - ), - environment: Environment::SANDBOX, - logging_configuration: LoggingConfiguration.new( - log_level: Logger::INFO, - request_logging_config: RequestLoggingConfiguration.new( - log_body: true - ), - response_logging_config: ResponseLoggingConfiguration.new( - log_headers: true - ) - ) -) -``` - -API calls return an `ApiResponse` object that includes the following fields: - -| Field | Description | -| --- | --- | -| `status_code` | Status code of the HTTP response | -| `reason_phrase` | Reason phrase of the HTTP response | -| `headers` | Headers of the HTTP response as a Hash | -| `raw_body` | The body of the HTTP response as a String | -| `request` | HTTP request info | -| `errors` | Errors, if they exist | -| `data` | The deserialized body of the HTTP response | - -## Environments - -The SDK can be configured to use a different environment for making API calls. Available environments are: - -### Fields - -| Name | Description | -| --- | --- | -| Production | PayPal Live Environment | -| Sandbox | **Default** PayPal Sandbox Environment | - -## Authorization - -This API uses the following authentication schemes. - -* [`Oauth2 (OAuth 2 Client Credentials Grant)`](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/auth/oauth-2-client-credentials-grant.md) - -## List of APIs - -* [Orders](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/orders.md) -* [Payments](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/payments.md) -* [Vault](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/controllers/vault.md) - -## Classes Documentation - -* [Utility Classes](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/utility-classes.md) -* [HttpResponse](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/http-response.md) -* [HttpRequest](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/http-request.md) -* [LoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/logging-configuration.md) -* [RequestLoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/request-logging-configuration.md) -* [ResponseLoggingConfiguration](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/response-logging-configuration.md) -* [Abstract Logger](https://www.github.com/moizgillani/paypal-ruby-sdk/tree/1.0.4/doc/abstract-logger.md) - diff --git a/doc/abstract-logger.md b/doc/abstract-logger.md deleted file mode 100644 index fa7a3d0..0000000 --- a/doc/abstract-logger.md +++ /dev/null @@ -1,47 +0,0 @@ - -# Abstract Logger - -An abstract class for custom logger implementation. - -## Logger Methods - -| Name | Description | Return Type | Parameters | Method Signature | -| --- | --- | --- | --- | --- | -| log | Logs a message with a specified log level and additional parameters. | nil | 1. level (Integer): The log level of the message.
2. message (String): The message template to log.
3. params: (Hash): The parameters to include in the log message. | log(level, message, params) | - -## Usage Example - -### Client Initialization with Custom Logger - -In order to provide custom logger implementation, the `AbstractLogger` class must be inherited so that you can override the `log` behavior. - -```ruby -require 'ougai' -require 'logger' - -include PayPalRestapIs - - -class CustomLogger < AbstractLogger - def initialize - @logger = Ougai::Logger.new($stdout) - end - def log(level, message, params) - case level - when Logger::INFO - @logger.info(message, params) - end - end -end -``` - -Following is how the custom logger implementation can be injected in the SDK client. - -```ruby -client = PayPalRestapIs::Client.new( - logging_configuration: LoggingConfiguration.new( - logger: CustomLogger.new - ) -) -``` - diff --git a/doc/auth/oauth-2-client-credentials-grant.md b/doc/auth/oauth-2-client-credentials-grant.md deleted file mode 100644 index 763740f..0000000 --- a/doc/auth/oauth-2-client-credentials-grant.md +++ /dev/null @@ -1,87 +0,0 @@ - -# OAuth 2 Client Credentials Grant - - - -Documentation for accessing and setting credentials for Oauth2. - -## Auth Credentials - -| Name | Type | Description | Getter | -| --- | --- | --- | --- | -| OAuthClientId | `String` | OAuth 2 Client ID | `o_auth_client_id` | -| OAuthClientSecret | `String` | OAuth 2 Client Secret | `o_auth_client_secret` | -| OAuthToken | `OAuthToken` | Object for storing information about the OAuth token | `o_auth_token` | -| OAuthTokenProvider | `proc { \| OAuthToken, OAuth2 \| }` | Registers a callback for oAuth Token Provider used for automatic token fetching/refreshing. | `o_auth_token_provider` | -| OAuthOnTokenUpdate | `proc { \| OAuthToken \| }` | Registers a callback for token update event. | `o_auth_on_token_update` | -| OAuthClockSkew | `Integer` | Clock skew time in seconds applied while checking the OAuth Token expiry. | `o_auth_clock_skew` | - - - -**Note:** Auth credentials can be set using named parameter for any of the above credentials (e.g. `o_auth_client_id`) in the client initialization. - -## Usage Example - -### Client Initialization - -You must initialize the client with *OAuth 2.0 Client Credentials Grant* credentials as shown in the following code snippet. This will fetch the OAuth token automatically when any of the endpoints, requiring *OAuth 2.0 Client Credentials Grant* autentication, are called. - -```ruby -client = PayPalRestapIs::Client.new( - client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( - o_auth_client_id: 'OAuthClientId', - o_auth_client_secret: 'OAuthClientSecret' - ) -) -``` - - - -Your application can also manually provide an OAuthToken using the setter `in` object. This function takes in an instance of OAuthToken containing information for authorizing client requests and refreshing the token itself. - -### Adding OAuth Token Update Callback - -Whenever the OAuth Token gets updated, the provided callback implementation will be executed. For instance, you may use it to store your access token whenever it gets updated. - -```ruby -client = PayPalRestapIs::Client.new( - client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( - o_auth_client_id: 'OAuthClientId', - o_auth_client_secret: 'OAuthClientSecret', - o_auth_on_token_update: Proc.new { | o_auth_token | - # Add the callback handler to perform operations like save to DB or file etc. - # It will be triggered whenever the token gets updated - save_token_to_database(o_auth_token) - } - ) -) -``` - -### Adding Custom OAuth Token Provider - - - -```ruby -def o_auth_token_provider(last_oauth_token, auth_manager) - # Add the callback handler to provide a new OAuth token - # It will be triggered whenever the last provided o_auth_token is null or expired - o_auth_token = load_token_from_database() - o_auth_token = auth_manager.fetch_token() if o_auth_token is nil? - return o_auth_token -end - -_o_auth_token_provider = proc do | last_oauth_token, auth_manager | - o_auth_token_provider(last_oauth_token, auth_manager) -end - - -client = PayPalRestapIs::Client.new( - client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( - o_auth_client_id: 'OAuthClientId', - o_auth_client_secret: 'OAuthClientSecret', - o_auth_token_provider: _o_auth_token_provider - ) -) -``` - - diff --git a/doc/client.md b/doc/client.md deleted file mode 100644 index c8f9b7e..0000000 --- a/doc/client.md +++ /dev/null @@ -1,66 +0,0 @@ - -# Client Class Documentation - -The following parameters are configurable for the API Client: - -| Parameter | Type | Description | -| --- | --- | --- | -| `environment` | `Environment` | The API environment.
**Default: `Environment.SANDBOX`** | -| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests | -| `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests | -| `timeout` | `Float` | The value to use for connection timeout.
**Default: 60** | -| `max_retries` | `Integer` | The number of times to retry an endpoint call if it fails.
**Default: 0** | -| `retry_interval` | `Float` | Pause in seconds between retries.
**Default: 1** | -| `backoff_factor` | `Float` | The amount to multiply each successive retry's interval amount by in order to provide backoff.
**Default: 2** | -| `retry_statuses` | `Array` | A list of HTTP statuses to retry.
**Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** | -| `retry_methods` | `Array` | A list of HTTP methods to retry.
**Default: %i[get put]** | -| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. | -| `logging_configuration` | [`LoggingConfiguration`](logging-configuration.md) | The SDK logging configuration for API calls | -| `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant | - -The API client can be initialized as follows: - -```ruby -client = PayPalRestapIs::Client.new( - client_credentials_auth_credentials: ClientCredentialsAuthCredentials.new( - o_auth_client_id: 'OAuthClientId', - o_auth_client_secret: 'OAuthClientSecret' - ), - environment: Environment::SANDBOX, - logging_configuration: LoggingConfiguration.new( - log_level: Logger::INFO, - request_logging_config: RequestLoggingConfiguration.new( - log_body: true - ), - response_logging_config: ResponseLoggingConfiguration.new( - log_headers: true - ) - ) -) -``` - -API calls return an `ApiResponse` object that includes the following fields: - -| Field | Description | -| --- | --- | -| `status_code` | Status code of the HTTP response | -| `reason_phrase` | Reason phrase of the HTTP response | -| `headers` | Headers of the HTTP response as a Hash | -| `raw_body` | The body of the HTTP response as a String | -| `request` | HTTP request info | -| `errors` | Errors, if they exist | -| `data` | The deserialized body of the HTTP response | - -## PayPal REST APIs Client - -The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK. - -## Controllers - -| Name | Description | -| --- | --- | -| orders | Gets OrdersController | -| payments | Gets PaymentsController | -| vault | Gets VaultController | -| o_auth_authorization | Gets OAuthAuthorizationController | - diff --git a/doc/controllers/orders.md b/doc/controllers/orders.md deleted file mode 100644 index 265eccf..0000000 --- a/doc/controllers/orders.md +++ /dev/null @@ -1,397 +0,0 @@ -# Orders - -Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders. - -```ruby -orders_controller = client.orders -``` - -## Class Name - -`OrdersController` - -## Methods - -* [Orders Create](../../doc/controllers/orders.md#orders-create) -* [Orders Get](../../doc/controllers/orders.md#orders-get) -* [Orders Patch](../../doc/controllers/orders.md#orders-patch) -* [Orders Confirm](../../doc/controllers/orders.md#orders-confirm) -* [Orders Authorize](../../doc/controllers/orders.md#orders-authorize) -* [Orders Capture](../../doc/controllers/orders.md#orders-capture) -* [Orders Track Create](../../doc/controllers/orders.md#orders-track-create) -* [Orders Trackers Patch](../../doc/controllers/orders.md#orders-trackers-patch) - - -# Orders Create - -Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
- -```ruby -def orders_create(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | -| `pay_pal_partner_attribution_id` | `String` | Header, Optional | - | -| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). - -## Example Usage - -```ruby -collect = { - 'body' => OrderRequest.new( - intent: CheckoutPaymentIntent::CAPTURE, - purchase_units: [ - PurchaseUnitRequest.new( - amount: AmountWithBreakdown.new( - currency_code: 'USD', - value: '100.00' - ), - reference_id: 'd9f80740-38f0-11e8-b467-0ed5f89f718b' - ) - ] - ), - 'pay_pal_request_id' => 'PayPal-Request-Id', - 'pay_pal_client_metadata_id' => 'PayPal-Client-Metadata-Id', - 'prefer' => 'return=minimal' -} - -result = orders_controller.orders_create(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Get - -Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
- -```ruby -def orders_get(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order for which to show details. | -| `fields` | `String` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). - -## Example Usage - -```ruby -collect = { - 'id' => 'id0' -} - -result = orders_controller.orders_get(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Patch - -Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.

To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.email_addressreplace, add
purchase_units[].shipping.phone_numberreplace, add
purchase_units[].shipping.optionsreplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.payee_receivable_fx_rate_idreplace, add, remove
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add
- -```ruby -def orders_patch(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order to update. | -| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'body' => [ - Patch.new( - op: PatchOp::ADD - ) - ] -} - -result = orders_controller.orders_patch(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Confirm - -Payer confirms their intent to pay for the the Order with the given payment source. - -```ruby -def orders_confirm(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order for which the payer confirms their intent to pay. | -| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `body` | [`ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'prefer' => 'return=minimal', - 'body' => ConfirmOrderRequest.new( - payment_source: PaymentSource.new, - processing_instruction: ProcessingInstruction::NO_INSTRUCTION - ) -} - -result = orders_controller.orders_confirm(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Authorize - -Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
- -```ruby -def orders_authorize(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order for which to authorize. | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | -| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | -| `body` | [`OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md). - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'prefer' => 'return=minimal' -} - -result = orders_controller.orders_authorize(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Capture - -Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
- -```ruby -def orders_capture(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order for which to capture a payment. | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `pay_pal_client_metadata_id` | `String` | Header, Optional | - | -| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | -| `body` | [`OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'prefer' => 'return=minimal' -} - -result = orders_controller.orders_capture(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Track Create - -Adds tracking information for an Order. - -```ruby -def orders_track_create(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with. | -| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - | -| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Order`](../../doc/models/order.md). - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'body' => OrderTrackerRequest.new( - capture_id: 'capture_id8', - notify_payer: false - ) -} - -result = orders_controller.orders_track_create(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Orders Trackers Patch - -Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
statusreplaceOnly patching status to CANCELLED is currently supported.
- -```ruby -def orders_trackers_patch(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | The ID of the order that the tracking information is associated with. | -| `tracker_id` | `String` | Template, Required | The order tracking ID. | -| `body` | [`Array`](../../doc/models/patch.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. - -## Example Usage - -```ruby -collect = { - 'id' => 'id0', - 'tracker_id' => 'tracker_id2', - 'body' => [ - Patch.new( - op: PatchOp::ADD - ) - ] -} - -result = orders_controller.orders_trackers_patch(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - diff --git a/doc/controllers/payments.md b/doc/controllers/payments.md deleted file mode 100644 index d1b2ae4..0000000 --- a/doc/controllers/payments.md +++ /dev/null @@ -1,327 +0,0 @@ -# Payments - -Use the `/payments` resource to authorize, capture, void authorizations, and retrieve captures. - -```ruby -payments_controller = client.payments -``` - -## Class Name - -`PaymentsController` - -## Methods - -* [Authorizations Get](../../doc/controllers/payments.md#authorizations-get) -* [Authorizations Capture](../../doc/controllers/payments.md#authorizations-capture) -* [Authorizations Reauthorize](../../doc/controllers/payments.md#authorizations-reauthorize) -* [Authorizations Void](../../doc/controllers/payments.md#authorizations-void) -* [Captures Get](../../doc/controllers/payments.md#captures-get) -* [Captures Refund](../../doc/controllers/payments.md#captures-refund) -* [Refunds Get](../../doc/controllers/payments.md#refunds-get) - - -# Authorizations Get - -Shows details for an authorized payment, by ID. - -```ruby -def authorizations_get(authorization_id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `authorization_id` | `String` | Template, Required | The ID of the authorized payment for which to show details. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). - -## Example Usage - -```ruby -authorization_id = 'authorization_id8' - -result = payments_controller.authorizations_get(authorization_id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Authorizations Capture - -Captures an authorized payment, by ID. - -```ruby -def authorizations_capture(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to capture. | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `body` | [`CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md). - -## Example Usage - -```ruby -collect = { - 'authorization_id' => 'authorization_id8', - 'prefer' => 'return=minimal', - 'body' => CaptureRequest.new( - final_capture: false - ) -} - -result = payments_controller.authorizations_capture(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The request failed because it is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Authorizations Reauthorize - -Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
- -```ruby -def authorizations_reauthorize(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `body` | [`ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). - -## Example Usage - -```ruby -collect = { - 'authorization_id' => 'authorization_id8', - 'prefer' => 'return=minimal' -} - -result = payments_controller.authorizations_reauthorize(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Authorizations Void - -Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured. - -```ruby -def authorizations_void(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `authorization_id` | `String` | Template, Required | The PayPal-generated ID for the authorized payment to void. | -| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md). - -## Example Usage - -```ruby -collect = { - 'authorization_id' => 'authorization_id8', - 'prefer' => 'return=minimal' -} - -result = payments_controller.authorizations_void(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Captures Get - -Shows details for a captured payment, by ID. - -```ruby -def captures_get(capture_id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md). - -## Example Usage - -```ruby -capture_id = 'capture_id2' - -result = payments_controller.captures_get(capture_id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Captures Refund - -Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body. - -```ruby -def captures_refund(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `capture_id` | `String` | Template, Required | The PayPal-generated ID for the captured payment to refund. | -| `pay_pal_request_id` | `String` | Header, Optional | The server stores keys for 45 days. | -| `prefer` | `String` | Header, Optional | The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
| -| `pay_pal_auth_assertion` | `String` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).
Note:For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.
| -| `body` | [`RefundRequest`](../../doc/models/refund-request.md) | Body, Optional | - | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md). - -## Example Usage - -```ruby -collect = { - 'capture_id' => '1234', - 'pay_pal_request_id' => '1234', - 'prefer' => 'return=minimal', - 'pay_pal_auth_assertion' => 'PayPal-Auth-Assertion', - 'body' => RefundRequest.new( - amount: Money.new( - currency_code: 'USD', - value: '1.44' - ), - note_to_payer: 'Defective product' - ) -} - -result = payments_controller.captures_refund(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 409 | The request failed because a previous call for the given resource is in progress. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Refunds Get - -Shows details for a refund, by ID. - -```ruby -def refunds_get(refund_id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `refund_id` | `String` | Template, Required | The PayPal-generated ID for the refund for which to show details. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md). - -## Example Usage - -```ruby -refund_id = 'refund_id4' - -result = payments_controller.refunds_get(refund_id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | The request failed because an internal server error occurred. | `APIException` | -| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) | - diff --git a/doc/controllers/vault.md b/doc/controllers/vault.md deleted file mode 100644 index b3512ed..0000000 --- a/doc/controllers/vault.md +++ /dev/null @@ -1,261 +0,0 @@ -# Vault - -Use the `/vault` resource to create, retrieve, and delete payment and setup tokens. - -```ruby -vault_controller = client.vault -``` - -## Class Name - -`VaultController` - -## Methods - -* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create) -* [Customer Payment-Tokens Get](../../doc/controllers/vault.md#customer-payment-tokens-get) -* [Payment-Tokens Get](../../doc/controllers/vault.md#payment-tokens-get) -* [Payment-Tokens Delete](../../doc/controllers/vault.md#payment-tokens-delete) -* [Setup-Tokens Create](../../doc/controllers/vault.md#setup-tokens-create) -* [Setup-Tokens Get](../../doc/controllers/vault.md#setup-tokens-get) - - -# Payment-Tokens Create - -Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer. - -```ruby -def payment_tokens_create(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `pay_pal_request_id` | `String` | Header, Required | The server stores keys for 3 hours. | -| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). - -## Example Usage - -```ruby -collect = { - 'pay_pal_request_id' => '12345', - 'body' => PaymentTokenRequest.new( - payment_source: PaymentTokenRequestPaymentSource.new( - token: VaultTokenRequest.new( - id: '1234', - type: TokenType::SETUP_TOKEN - ) - ) - ) -} - -result = vault_controller.payment_tokens_create(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Customer Payment-Tokens Get - -Returns all payment tokens for a customer. - -```ruby -def customer_payment_tokens_get(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer_id` | `String` | Query, Required | A unique identifier representing a specific customer in merchant's/partner's system or records. | -| `page_size` | `Integer` | Query, Optional | A non-negative, non-zero integer indicating the maximum number of results to return at one time. | -| `page` | `Integer` | Query, Optional | A non-negative, non-zero integer representing the page of the results. | -| `total_required` | `TrueClass \| FalseClass` | Query, Optional | A boolean indicating total number of items (total_items) and pages (total_pages) are expected to be returned in the response. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md). - -## Example Usage - -```ruby -collect = { - 'customer_id' => 'customer_id8', - 'page_size' => 5, - 'page' => 1, - 'total_required' => false -} - -result = vault_controller.customer_payment_tokens_get(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Payment-Tokens Get - -Returns a readable representation of vaulted payment source associated with the payment token id. - -```ruby -def payment_tokens_get(id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | ID of the payment token. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md). - -## Example Usage - -```ruby -id = 'id0' - -result = vault_controller.payment_tokens_get(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Payment-Tokens Delete - -Delete the payment token associated with the payment token id. - -```ruby -def payment_tokens_delete(id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | ID of the payment token. | - -## Response Type - -This method returns a `ApiResponse` instance. - -## Example Usage - -```ruby -id = 'id0' - -result = vault_controller.payment_tokens_delete(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Setup-Tokens Create - -Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer. - -```ruby -def setup_tokens_create(options = {}) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `pay_pal_request_id` | `String` | Header, Required | The server stores keys for 3 hours. | -| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md). - -## Example Usage - -```ruby -collect = { - 'pay_pal_request_id' => 'PayPal-Request-Id6', - 'body' => SetupTokenRequest.new( - payment_source: SetupTokenRequestPaymentSource.new - ) -} - -result = vault_controller.setup_tokens_create(collect) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - - -# Setup-Tokens Get - -Returns a readable representation of temporarily vaulted payment source associated with the setup token id. - -```ruby -def setup_tokens_get(id) -``` - -## Parameters - -| Parameter | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Template, Required | ID of the setup token. | - -## Response Type - -This method returns a `ApiResponse` instance. The `data` property in this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md). - -## Example Usage - -```ruby -id = 'id0' - -result = vault_controller.setup_tokens_get(id) -``` - -## Errors - -| HTTP Status Code | Error Description | Exception Class | -| --- | --- | --- | -| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) | -| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) | -| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) | -| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) | - diff --git a/doc/http-request.md b/doc/http-request.md deleted file mode 100644 index cb61110..0000000 --- a/doc/http-request.md +++ /dev/null @@ -1,15 +0,0 @@ - -# HttpRequest - -Represents a single Http Request. - -## Properties - -| Name | Type | Tag | Description | -| --- | --- | --- | --- | -| http_method | HttpMethodEnum | | The HTTP method of the request. | -| query_url | String | | The endpoint URL for the API request. | -| headers | Hash | Optional | Request headers. | -| parameters | Hash | Optional | Request body. | -| context | Hash | Optional | Request context for passing meta information about the request. | - diff --git a/doc/http-response.md b/doc/http-response.md deleted file mode 100644 index 69ab50d..0000000 --- a/doc/http-response.md +++ /dev/null @@ -1,15 +0,0 @@ - -# HttpResponse - -Http response received. - -## Properties - -| Name | Type | Description | -| --- | --- | --- | -| status_code | Integer | The status code returned by the server. | -| reason_phrase | String | The reason phrase returned by the server. | -| headers | Hash | Response headers. | -| raw_body | String | Response body. | -| request | [`HttpRequest`](http-request.md) | The request that resulted in this response. | - diff --git a/doc/logging-configuration.md b/doc/logging-configuration.md deleted file mode 100644 index ade0ec0..0000000 --- a/doc/logging-configuration.md +++ /dev/null @@ -1,15 +0,0 @@ - -# LoggingConfiguration - -Represents the logging configuration for API calls. - -## Parameters - -| Name | Type | Tag | Description | -| --- | --- | --- | --- | -| abstract_logger | [AbstractLogger](abstract-logger.md) | optional | Takes in your custom implementation of the abstract logger class here. **Default Implementation : `ConsoleLogger`** | -| log_level | Integer | optional | Defines the log message severity available in ruby logging module (e.g., DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN5). **Default : `Logger::INFO`** | -| mask_sensitive_headers | Boolean | optional | Toggles the global setting to mask sensitive HTTP headers in both requests and responses before logging, safeguarding confidential data. **Default : `true`** | -| request_logging_config | [RequestLoggingConfiguration](request-logging-configuration.md) | optional | The logging configuration for an API request. | -| response_logging_config | [ResponseLoggingConfiguration](response-logging-configuration.md) | optional | The logging configuration for an API response. | - diff --git a/doc/models/ach-debit-response.md b/doc/models/ach-debit-response.md deleted file mode 100644 index ebc1e25..0000000 --- a/doc/models/ach-debit-response.md +++ /dev/null @@ -1,23 +0,0 @@ - -# ACH Debit Response - -A Resource representing a response of vaulted a ACH Debit Account. - -## Structure - -`ACHDebitResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `verification_status` | `String` | Optional | The ach debit verification status.
**Default**: `'NOT_VERIFIED'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | - -## Example (as JSON) - -```json -{ - "verification_status": "NOT_VERIFIED" -} -``` - diff --git a/doc/models/activity-timestamps.md b/doc/models/activity-timestamps.md deleted file mode 100644 index 375a3d8..0000000 --- a/doc/models/activity-timestamps.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Activity Timestamps - -The date and time stamps that are common to authorized payment, captured payment, and refund transactions. - -## Structure - -`ActivityTimestamps` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "create_time": "create_time2", - "update_time": "update_time2" -} -``` - diff --git a/doc/models/address-details.md b/doc/models/address-details.md deleted file mode 100644 index 9cc148a..0000000 --- a/doc/models/address-details.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Address Details - -Address request details. - -## Structure - -`AddressDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `address_line_1` | `String` | Optional | The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.
**Constraints**: *Maximum Length*: `300` | -| `address_line_2` | `String` | Optional | The second line of the address, for example, a suite or apartment number.
**Constraints**: *Maximum Length*: `300` | -| `admin_area_2` | `String` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | -| `admin_area_1` | `String` | Optional | The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.

**Constraints**: *Maximum Length*: `300` | -| `postal_code` | `String` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` | -| `country_code` | `String` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `id` | `String` | Optional | The resource ID of the address.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Za-z-_]+$` | -| `company` | `String` | Optional | The name of the company or business associated to the address.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^.*$` | -| `phone` | `String` | Optional | The phone number that can go on the mailing label with the address to track the shipping. Phone number is in E.164 format.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^\+[1-9]\d{1,14}$` | -| `phone_number` | [`Phone`](../../doc/models/phone.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | - -## Example (as JSON) - -```json -{ - "address_line_1": "address_line_10", - "address_line_2": "address_line_20", - "admin_area_2": "admin_area_24", - "admin_area_1": "admin_area_16", - "postal_code": "postal_code2", - "country_code": "country_code0" -} -``` - diff --git a/doc/models/address.md b/doc/models/address.md deleted file mode 100644 index 54fb330..0000000 --- a/doc/models/address.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Address - -The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). - -## Structure - -`Address` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `address_line_1` | `String` | Optional | The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address.
**Constraints**: *Maximum Length*: `300` | -| `address_line_2` | `String` | Optional | The second line of the address, for example, a suite or apartment number.
**Constraints**: *Maximum Length*: `300` | -| `admin_area_2` | `String` | Optional | A city, town, or village. Smaller than `admin_area_level_1`.
**Constraints**: *Maximum Length*: `120` | -| `admin_area_1` | `String` | Optional | The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.

**Constraints**: *Maximum Length*: `300` | -| `postal_code` | `String` | Optional | The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code).
**Constraints**: *Maximum Length*: `60` | -| `country_code` | `String` | Required | The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | - -## Example (as JSON) - -```json -{ - "address_line_1": "address_line_18", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_22", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" -} -``` - diff --git a/doc/models/amount-breakdown.md b/doc/models/amount-breakdown.md deleted file mode 100644 index 00d190f..0000000 --- a/doc/models/amount-breakdown.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Amount Breakdown - -The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. - -## Structure - -`AmountBreakdown` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `item_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `shipping` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `handling` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `tax_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `insurance` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `shipping_discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `discount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "item_total": { - "currency_code": "currency_code0", - "value": "value6" - }, - "shipping": { - "currency_code": "currency_code0", - "value": "value6" - }, - "handling": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - }, - "insurance": { - "currency_code": "currency_code2", - "value": "value8" - } -} -``` - diff --git a/doc/models/amount-with-breakdown.md b/doc/models/amount-with-breakdown.md deleted file mode 100644 index 9b67d82..0000000 --- a/doc/models/amount-with-breakdown.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Amount With Breakdown - -The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. - -## Structure - -`AmountWithBreakdown` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `currency_code` | `String` | Required | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | -| `value` | `String` | Required | The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).
**Constraints**: *Maximum Length*: `32`, *Pattern*: `^((-?[0-9]+)\|(-?([0-9]+)?[.][0-9]+))$` | -| `breakdown` | [`AmountBreakdown`](../../doc/models/amount-breakdown.md) | Optional | The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any. | - -## Example (as JSON) - -```json -{ - "currency_code": "currency_code4", - "value": "value0", - "breakdown": { - "item_total": { - "currency_code": "currency_code0", - "value": "value6" - }, - "shipping": { - "currency_code": "currency_code0", - "value": "value6" - }, - "handling": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - }, - "insurance": { - "currency_code": "currency_code2", - "value": "value8" - } - } -} -``` - diff --git a/doc/models/apple-pay-attributes-response.md b/doc/models/apple-pay-attributes-response.md deleted file mode 100644 index f79c9fd..0000000 --- a/doc/models/apple-pay-attributes-response.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Apple Pay Attributes Response - -Additional attributes associated with the use of Apple Pay. - -## Structure - -`ApplePayAttributesResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | - -## Example (as JSON) - -```json -{ - "vault": { - "id": "id6", - "status": "APPROVED", - "customer": { - "id": "id0" - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] - } -} -``` - diff --git a/doc/models/apple-pay-attributes.md b/doc/models/apple-pay-attributes.md deleted file mode 100644 index b39586e..0000000 --- a/doc/models/apple-pay-attributes.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Apple Pay Attributes - -Additional attributes associated with apple pay. - -## Structure - -`ApplePayAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`CustomerInformation`](../../doc/models/customer-information.md) | Optional | The details about a customer in PayPal's system of record. | -| `vault` | [`VaultInstruction`](../../doc/models/vault-instruction.md) | Optional | Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting. | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "email_address": "email_address2", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - } - }, - "vault": { - "store_in_vault": "ON_SUCCESS" - } -} -``` - diff --git a/doc/models/apple-pay-card-response.md b/doc/models/apple-pay-card-response.md deleted file mode 100644 index c8a031e..0000000 --- a/doc/models/apple-pay-card-response.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Apple Pay Card Response - -The Card from Apple Pay Wallet used to fund the payment. - -## Structure - -`ApplePayCardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | -| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. | -| `from_request` | [`CardFromRequest`](../../doc/models/card-from-request.md) | Optional | Representation of card details as received in the request. | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | - -## Example (as JSON) - -```json -{ - "name": "name4", - "last_digits": "last_digits8", - "brand": "DINERS", - "available_networks": [ - "MASTERCARD" - ], - "type": "DEBIT" -} -``` - diff --git a/doc/models/apple-pay-card.md b/doc/models/apple-pay-card.md deleted file mode 100644 index 3bafd8c..0000000 --- a/doc/models/apple-pay-card.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Apple Pay Card - -The payment card to be used to fund a payment. Can be a credit or debit card. - -## Structure - -`ApplePayCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{2,4}$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "name": "name4", - "last_digits": "last_digits8", - "type": "UNKNOWN", - "brand": "CETELEM", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/apple-pay-decrypted-token-data.md b/doc/models/apple-pay-decrypted-token-data.md deleted file mode 100644 index da130ec..0000000 --- a/doc/models/apple-pay-decrypted-token-data.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Apple Pay Decrypted Token Data - -Information about the Payment data obtained by decrypting Apple Pay token. - -## Structure - -`ApplePayDecryptedTokenData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `transaction_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `tokenized_card` | [`ApplePayTokenizedCard`](../../doc/models/apple-pay-tokenized-card.md) | Required | The payment card to use to fund a payment. Can be a credit or debit card. | -| `device_manufacturer_id` | `String` | Optional | Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | -| `payment_data_type` | [`ApplePayPaymentDataType`](../../doc/models/apple-pay-payment-data-type.md) | Optional | Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_data` | [`ApplePayPaymentData`](../../doc/models/apple-pay-payment-data.md) | Optional | Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator. | - -## Example (as JSON) - -```json -{ - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id2", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } -} -``` - diff --git a/doc/models/apple-pay-payment-data-type.md b/doc/models/apple-pay-payment-data-type.md deleted file mode 100644 index 87e4229..0000000 --- a/doc/models/apple-pay-payment-data-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Apple Pay Payment Data Type - -Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV. - -## Enumeration - -`ApplePayPaymentDataType` - -## Fields - -| Name | -| --- | -| `ENUM_3DSECURE` | -| `EMV` | - diff --git a/doc/models/apple-pay-payment-data.md b/doc/models/apple-pay-payment-data.md deleted file mode 100644 index 57249d4..0000000 --- a/doc/models/apple-pay-payment-data.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Apple Pay Payment Data - -Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator. - -## Structure - -`ApplePayPaymentData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `cryptogram` | `String` | Optional | Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | -| `eci_indicator` | `String` | Optional | ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | -| `emv_data` | `String` | Optional | Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | -| `pin` | `String` | Optional | Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000`, *Pattern*: `^.*$` | - -## Example (as JSON) - -```json -{ - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" -} -``` - diff --git a/doc/models/apple-pay-payment-object.md b/doc/models/apple-pay-payment-object.md deleted file mode 100644 index 0d9eff8..0000000 --- a/doc/models/apple-pay-payment-object.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Apple Pay Payment Object - -Information needed to pay using ApplePay. - -## Structure - -`ApplePayPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | -| `token` | `String` | Optional | Encrypted ApplePay token, containing card information. This token would be base64encoded. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10000`, *Pattern*: `^.*$` | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `card` | [`ApplePayCardResponse`](../../doc/models/apple-pay-card-response.md) | Optional | The Card from Apple Pay Wallet used to fund the payment. | -| `attributes` | [`ApplePayAttributesResponse`](../../doc/models/apple-pay-attributes-response.md) | Optional | Additional attributes associated with the use of Apple Pay. | - -## Example (as JSON) - -```json -{ - "id": "id6", - "token": "token0", - "name": "name6", - "email_address": "email_address4", - "phone_number": { - "national_number": "national_number6" - } -} -``` - diff --git a/doc/models/apple-pay-payment-token.md b/doc/models/apple-pay-payment-token.md deleted file mode 100644 index 3859b38..0000000 --- a/doc/models/apple-pay-payment-token.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Apple Pay Payment Token - -A resource representing a response for Apple Pay. - -## Structure - -`ApplePayPaymentToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`ApplePayCard`](../../doc/models/apple-pay-card.md) | Optional | The payment card to be used to fund a payment. Can be a credit or debit card. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } -} -``` - diff --git a/doc/models/apple-pay-request.md b/doc/models/apple-pay-request.md deleted file mode 100644 index 2638111..0000000 --- a/doc/models/apple-pay-request.md +++ /dev/null @@ -1,56 +0,0 @@ - -# Apple Pay Request - -Information needed to pay using ApplePay. - -## Structure - -`ApplePayRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `decrypted_token` | [`ApplePayDecryptedTokenData`](../../doc/models/apple-pay-decrypted-token-data.md) | Optional | Information about the Payment data obtained by decrypting Apple Pay token. | -| `stored_credential` | [`CardStoredCredential`](../../doc/models/card-stored-credential.md) | Optional | Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| -| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `attributes` | [`ApplePayAttributes`](../../doc/models/apple-pay-attributes.md) | Optional | Additional attributes associated with apple pay. | - -## Example (as JSON) - -```json -{ - "id": "id6", - "name": "name6", - "email_address": "email_address4", - "phone_number": { - "national_number": "national_number6" - }, - "decrypted_token": { - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id6", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } - } -} -``` - diff --git a/doc/models/apple-pay-tokenized-card.md b/doc/models/apple-pay-tokenized-card.md deleted file mode 100644 index 5817c2b..0000000 --- a/doc/models/apple-pay-tokenized-card.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Apple Pay Tokenized Card - -The payment card to use to fund a payment. Can be a credit or debit card. - -## Structure - -`ApplePayTokenizedCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `card_type` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "name": "name8", - "number": "number6", - "expiry": "expiry6", - "card_type": "SYNCHRONY", - "type": "STORE" -} -``` - diff --git a/doc/models/authentication-response.md b/doc/models/authentication-response.md deleted file mode 100644 index ae390e6..0000000 --- a/doc/models/authentication-response.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Authentication Response - -Results of Authentication such as 3D Secure. - -## Structure - -`AuthenticationResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `liability_shift` | [`LiabilityShiftIndicator`](../../doc/models/liability-shift-indicator.md) | Optional | Liability shift indicator. The outcome of the issuer's authentication.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `three_d_secure` | [`ThreeDSecureAuthenticationResponse`](../../doc/models/three-d-secure-authentication-response.md) | Optional | Results of 3D Secure Authentication. | - -## Example (as JSON) - -```json -{ - "liability_shift": "POSSIBLE", - "three_d_secure": { - "authentication_status": "C", - "enrollment_status": "Y" - } -} -``` - diff --git a/doc/models/authorization-incomplete-reason.md b/doc/models/authorization-incomplete-reason.md deleted file mode 100644 index d145f01..0000000 --- a/doc/models/authorization-incomplete-reason.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Authorization Incomplete Reason - -The reason why the authorized status is `PENDING`. - -## Enumeration - -`AuthorizationIncompleteReason` - -## Fields - -| Name | -| --- | -| `PENDING_REVIEW` | -| `DECLINED_BY_RISK_FRAUD_FILTERS` | - diff --git a/doc/models/authorization-status-details.md b/doc/models/authorization-status-details.md deleted file mode 100644 index 2db8c6e..0000000 --- a/doc/models/authorization-status-details.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Authorization Status Details - -The details of the authorized payment status. - -## Structure - -`AuthorizationStatusDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `reason` | [`AuthorizationIncompleteReason`](../../doc/models/authorization-incomplete-reason.md) | Optional | The reason why the authorized status is `PENDING`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "reason": "PENDING_REVIEW" -} -``` - diff --git a/doc/models/authorization-status-with-details.md b/doc/models/authorization-status-with-details.md deleted file mode 100644 index 3936dd0..0000000 --- a/doc/models/authorization-status-with-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Authorization Status With Details - -The status fields and status details for an authorized payment. - -## Structure - -`AuthorizationStatusWithDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | -| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | - -## Example (as JSON) - -```json -{ - "status": "VOIDED", - "status_details": { - "reason": "PENDING_REVIEW" - } -} -``` - diff --git a/doc/models/authorization-status.md b/doc/models/authorization-status.md deleted file mode 100644 index 07147e9..0000000 --- a/doc/models/authorization-status.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Authorization Status - -The status for the authorized payment. - -## Enumeration - -`AuthorizationStatus` - -## Fields - -| Name | -| --- | -| `CREATED` | -| `CAPTURED` | -| `DENIED` | -| `PARTIALLY_CAPTURED` | -| `VOIDED` | -| `PENDING` | - diff --git a/doc/models/authorization-with-additional-data.md b/doc/models/authorization-with-additional-data.md deleted file mode 100644 index 6f6cc7b..0000000 --- a/doc/models/authorization-with-additional-data.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Authorization With Additional Data - -The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods. - -## Structure - -`AuthorizationWithAdditionalData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | -| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | -| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | -| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | -| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | - -## Example (as JSON) - -```json -{ - "status": "VOIDED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id6", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id6" -} -``` - diff --git a/doc/models/authorization.md b/doc/models/authorization.md deleted file mode 100644 index 51d1120..0000000 --- a/doc/models/authorization.md +++ /dev/null @@ -1,43 +0,0 @@ - -# Authorization - -The authorized payment transaction. - -## Structure - -`Authorization` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | -| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | -| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | -| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | -| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "status": "CREATED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id8", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id8" -} -``` - diff --git a/doc/models/avs-code.md b/doc/models/avs-code.md deleted file mode 100644 index 06db627..0000000 --- a/doc/models/avs-code.md +++ /dev/null @@ -1,38 +0,0 @@ - -# AVS Code - -The address verification code for Visa, Discover, Mastercard, or American Express transactions. - -## Enumeration - -`AVSCode` - -## Fields - -| Name | -| --- | -| `A` | -| `B` | -| `C` | -| `D` | -| `E` | -| `F` | -| `G` | -| `I` | -| `M` | -| `N` | -| `P` | -| `R` | -| `S` | -| `U` | -| `W` | -| `X` | -| `Y` | -| `Z` | -| `NULL` | -| `ENUM_0` | -| `ENUM_1` | -| `ENUM_2` | -| `ENUM_3` | -| `ENUM_4` | - diff --git a/doc/models/bancontact-payment-object.md b/doc/models/bancontact-payment-object.md deleted file mode 100644 index d6348ca..0000000 --- a/doc/models/bancontact-payment-object.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Bancontact Payment Object - -Information used to pay Bancontact. - -## Structure - -`BancontactPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | -| `card_last_digits` | `String` | Optional | The last digits of the card used to fund the Bancontact payment.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `[0-9]{4}` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code6", - "bic": "bic8", - "iban_last_chars": "iban_last_chars4", - "card_last_digits": "card_last_digits0" -} -``` - diff --git a/doc/models/bancontact-payment-request.md b/doc/models/bancontact-payment-request.md deleted file mode 100644 index d04fa40..0000000 --- a/doc/models/bancontact-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Bancontact Payment Request - -Information needed to pay using Bancontact. - -## Structure - -`BancontactPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "country_code": "country_code8", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/bank-payment-token.md b/doc/models/bank-payment-token.md deleted file mode 100644 index 1b61a3b..0000000 --- a/doc/models/bank-payment-token.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Bank Payment Token - -Full representation of a Bank Payment Token. - -## Structure - -`BankPaymentToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `ach_debit` | [`ACHDebitResponse`](../../doc/models/ach-debit-response.md) | Optional | A Resource representing a response of vaulted a ACH Debit Account. | -| `sepa_debit` | [`SEPADebitResponse`](../../doc/models/sepa-debit-response.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "ach_debit": { - "verification_status": "verification_status6" - }, - "sepa_debit": { - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } - } -} -``` - diff --git a/doc/models/bin-details.md b/doc/models/bin-details.md deleted file mode 100644 index 6116c94..0000000 --- a/doc/models/bin-details.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Bin Details - -Bank Identification Number (BIN) details used to fund a payment. - -## Structure - -`BinDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `bin` | `String` | Optional | The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[0-9]+$` | -| `issuing_bank` | `String` | Optional | The issuer of the card instrument.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | -| `bin_country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `products` | `Array` | Optional | The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255` | - -## Example (as JSON) - -```json -{ - "bin": "bin0", - "issuing_bank": "issuing_bank0", - "bin_country_code": "bin_country_code4", - "products": [ - "products8", - "products9", - "products0" - ] -} -``` - diff --git a/doc/models/blik-experience-context.md b/doc/models/blik-experience-context.md deleted file mode 100644 index 05df41c..0000000 --- a/doc/models/blik-experience-context.md +++ /dev/null @@ -1,33 +0,0 @@ - -# BLIK Experience Context - -Customizes the payer experience during the approval process for the BLIK payment. - -## Structure - -`BLIKExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | -| `return_url` | `String` | Optional | Describes the URL. | -| `cancel_url` | `String` | Optional | Describes the URL. | -| `consumer_ip` | `String` | Optional | An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses.
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `39`, *Pattern*: `^(([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])\.){3}([0-9]\|[1-9][0-9]\|1[0-9]{2}\|2[0-4][0-9]\|25[0-5])$\|^(([a-zA-Z]\|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]\|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$\|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}\|:))\|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}\|((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})\|:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3})\|:))\|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})\|((:[0-9A-Fa-f]{1,4})?:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})\|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})\|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})\|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:))\|(:(((:[0-9A-Fa-f]{1,4}){1,7})\|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)(\.(25[0-5]\|2[0-4]\d\|1\d\d\|[1-9]?\d)){3}))\|:)))(%.+)?\s*$` | -| `consumer_user_agent` | `String` | Optional | The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "brand_name": "brand_name0", - "locale": "locale4", - "return_url": "return_url2", - "cancel_url": "cancel_url4" -} -``` - diff --git a/doc/models/blik-level-0-payment-object.md b/doc/models/blik-level-0-payment-object.md deleted file mode 100644 index 79f6bea..0000000 --- a/doc/models/blik-level-0-payment-object.md +++ /dev/null @@ -1,23 +0,0 @@ - -# BLIK Level 0 Payment Object - -Information used to pay using BLIK level_0 flow. - -## Structure - -`BLIKLevel0PaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `auth_code` | `String` | Required | The 6-digit code used to authenticate a consumer within BLIK.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `6`, *Pattern*: `^[0-9]{6}$` | - -## Example (as JSON) - -```json -{ - "auth_code": "auth_code6" -} -``` - diff --git a/doc/models/blik-one-click-payment-object.md b/doc/models/blik-one-click-payment-object.md deleted file mode 100644 index 9a567bc..0000000 --- a/doc/models/blik-one-click-payment-object.md +++ /dev/null @@ -1,23 +0,0 @@ - -# BLIK One Click Payment Object - -Information used to pay using BLIK one-click flow. - -## Structure - -`BLIKOneClickPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `consumer_reference` | `String` | Optional | The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `64`, *Pattern*: `^[ -~]{3,64}$` | - -## Example (as JSON) - -```json -{ - "consumer_reference": "consumer_reference0" -} -``` - diff --git a/doc/models/blik-one-click-payment-request.md b/doc/models/blik-one-click-payment-request.md deleted file mode 100644 index 4905431..0000000 --- a/doc/models/blik-one-click-payment-request.md +++ /dev/null @@ -1,29 +0,0 @@ - -# BLIK One Click Payment Request - -Information used to pay using BLIK one-click flow. - -## Structure - -`BLIKOneClickPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `auth_code` | `String` | Optional | The 6-digit code used to authenticate a consumer within BLIK.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `6`, *Pattern*: `^[0-9]{6}$` | -| `consumer_reference` | `String` | Required | The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `64`, *Pattern*: `^[ -~]{3,64}$` | -| `alias_label` | `String` | Optional | A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `35`, *Pattern*: `^[ -~]{8,35}$` | -| `alias_key` | `String` | Optional | A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `19`, *Pattern*: `^[0-9]+$` | - -## Example (as JSON) - -```json -{ - "auth_code": "auth_code8", - "consumer_reference": "consumer_reference6", - "alias_label": "alias_label2", - "alias_key": "alias_key6" -} -``` - diff --git a/doc/models/blik-payment-object.md b/doc/models/blik-payment-object.md deleted file mode 100644 index 4f1f2a3..0000000 --- a/doc/models/blik-payment-object.md +++ /dev/null @@ -1,31 +0,0 @@ - -# BLIK Payment Object - -Information used to pay using BLIK. - -## Structure - -`BLIKPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `one_click` | [`BLIKOneClickPaymentObject`](../../doc/models/blik-one-click-payment-object.md) | Optional | Information used to pay using BLIK one-click flow. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "country_code": "country_code8", - "email": "email8", - "one_click": { - "consumer_reference": "consumer_reference2" - } -} -``` - diff --git a/doc/models/blik-payment-request.md b/doc/models/blik-payment-request.md deleted file mode 100644 index 6713d2a..0000000 --- a/doc/models/blik-payment-request.md +++ /dev/null @@ -1,46 +0,0 @@ - -# BLIK Payment Request - -Information needed to pay using BLIK. - -## Structure - -`BLIKPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `experience_context` | [`BLIKExperienceContext`](../../doc/models/blik-experience-context.md) | Optional | Customizes the payer experience during the approval process for the BLIK payment. | -| `level_0` | [`BLIKLevel0PaymentObject`](../../doc/models/blik-level-0-payment-object.md) | Optional | Information used to pay using BLIK level_0 flow. | -| `one_click` | [`BLIKOneClickPaymentRequest`](../../doc/models/blik-one-click-payment-request.md) | Optional | Information used to pay using BLIK one-click flow. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "country_code": "country_code8", - "email": "email8", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - }, - "level_0": { - "auth_code": "auth_code8" - }, - "one_click": { - "auth_code": "auth_code0", - "consumer_reference": "consumer_reference2", - "alias_label": "alias_label6", - "alias_key": "alias_key4" - } -} -``` - diff --git a/doc/models/capture-incomplete-reason.md b/doc/models/capture-incomplete-reason.md deleted file mode 100644 index bc27f97..0000000 --- a/doc/models/capture-incomplete-reason.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Capture Incomplete Reason - -The reason why the captured payment status is `PENDING` or `DENIED`. - -## Enumeration - -`CaptureIncompleteReason` - -## Fields - -| Name | -| --- | -| `BUYER_COMPLAINT` | -| `CHARGEBACK` | -| `ECHECK` | -| `INTERNATIONAL_WITHDRAWAL` | -| `OTHER` | -| `PENDING_REVIEW` | -| `RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION` | -| `REFUNDED` | -| `TRANSACTION_APPROVED_AWAITING_FUNDING` | -| `UNILATERAL` | -| `VERIFICATION_REQUIRED` | -| `DECLINED_BY_RISK_FRAUD_FILTERS` | - diff --git a/doc/models/capture-payment-instruction.md b/doc/models/capture-payment-instruction.md deleted file mode 100644 index 0806705..0000000 --- a/doc/models/capture-payment-instruction.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Capture Payment Instruction - -Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. - -## Structure - -`CapturePaymentInstruction` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | -| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | -| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^.*$` | - -## Example (as JSON) - -```json -{ - "disbursement_mode": "INSTANT", - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id8" -} -``` - diff --git a/doc/models/capture-request.md b/doc/models/capture-request.md deleted file mode 100644 index 0403a0e..0000000 --- a/doc/models/capture-request.md +++ /dev/null @@ -1,68 +0,0 @@ - -# Capture Request - -## Structure - -`CaptureRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.{1,127}$` | -| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.{1,255}$` | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | -| `payment_instruction` | [`CapturePaymentInstruction`](../../doc/models/capture-payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | -| `soft_descriptor` | `String` | Optional | The payment descriptor on the payer's account statement.
**Constraints**: *Maximum Length*: `22` | - -## Example (as JSON) - -```json -{ - "final_capture": false, - "invoice_id": "invoice_id4", - "note_to_payer": "note_to_payer6", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "disbursement_mode": "INSTANT", - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" - } -} -``` - diff --git a/doc/models/capture-status-details.md b/doc/models/capture-status-details.md deleted file mode 100644 index 815b5f1..0000000 --- a/doc/models/capture-status-details.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Capture Status Details - -The details of the captured payment status. - -## Structure - -`CaptureStatusDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `reason` | [`CaptureIncompleteReason`](../../doc/models/capture-incomplete-reason.md) | Optional | The reason why the captured payment status is `PENDING` or `DENIED`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "reason": "BUYER_COMPLAINT" -} -``` - diff --git a/doc/models/capture-status-with-details.md b/doc/models/capture-status-with-details.md deleted file mode 100644 index 86fc1af..0000000 --- a/doc/models/capture-status-with-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Capture Status With Details - -The status and status details of a captured payment. - -## Structure - -`CaptureStatusWithDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | -| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | - -## Example (as JSON) - -```json -{ - "status": "COMPLETED", - "status_details": { - "reason": "VERIFICATION_REQUIRED" - } -} -``` - diff --git a/doc/models/capture-status.md b/doc/models/capture-status.md deleted file mode 100644 index ce4005d..0000000 --- a/doc/models/capture-status.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Capture Status - -The status of the captured payment. - -## Enumeration - -`CaptureStatus` - -## Fields - -| Name | -| --- | -| `COMPLETED` | -| `DECLINED` | -| `PARTIALLY_REFUNDED` | -| `PENDING` | -| `REFUNDED` | -| `FAILED` | - diff --git a/doc/models/capture.md b/doc/models/capture.md deleted file mode 100644 index f1eff18..0000000 --- a/doc/models/capture.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Capture - -A captured payment. - -## Structure - -`Capture` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | -| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | -| `id` | `String` | Optional | The PayPal-generated ID for the captured payment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | -| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | -| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | -| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. | -| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "final_capture": false, - "disbursement_mode": "INSTANT", - "status": "PARTIALLY_REFUNDED", - "status_details": { - "reason": "VERIFICATION_REQUIRED" - }, - "id": "id6", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id6" -} -``` - diff --git a/doc/models/captured-payment.md b/doc/models/captured-payment.md deleted file mode 100644 index d0db123..0000000 --- a/doc/models/captured-payment.md +++ /dev/null @@ -1,50 +0,0 @@ - -# Captured Payment - -A captured payment. - -## Structure - -`CapturedPayment` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`CaptureStatus`](../../doc/models/capture-status.md) | Optional | The status of the captured payment. | -| `status_details` | [`CaptureStatusDetails`](../../doc/models/capture-status-details.md) | Optional | The details of the captured payment status. | -| `id` | `String` | Optional | The PayPal-generated ID for the captured payment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | -| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | -| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `final_capture` | `TrueClass \| FalseClass` | Optional | Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.
**Default**: `false` | -| `seller_receivable_breakdown` | [`SellerReceivableBreakdown`](../../doc/models/seller-receivable-breakdown.md) | Optional | The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. | -| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `processor_response` | [`ProcessorResponse`](../../doc/models/processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. | -| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | - -## Example (as JSON) - -```json -{ - "final_capture": false, - "disbursement_mode": "INSTANT", - "status": "PARTIALLY_REFUNDED", - "status_details": { - "reason": "VERIFICATION_REQUIRED" - }, - "id": "id4", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id4" -} -``` - diff --git a/doc/models/card-attributes-response.md b/doc/models/card-attributes-response.md deleted file mode 100644 index fb21af9..0000000 --- a/doc/models/card-attributes-response.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Card Attributes Response - -Additional attributes associated with the use of this card. - -## Structure - -`CardAttributesResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | - -## Example (as JSON) - -```json -{ - "vault": { - "id": "id6", - "status": "APPROVED", - "customer": { - "id": "id0" - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] - } -} -``` - diff --git a/doc/models/card-attributes.md b/doc/models/card-attributes.md deleted file mode 100644 index 081ceb0..0000000 --- a/doc/models/card-attributes.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Card Attributes - -Additional attributes associated with the use of this card. - -## Structure - -`CardAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`CustomerInformation`](../../doc/models/customer-information.md) | Optional | The details about a customer in PayPal's system of record. | -| `vault` | [`VaultInstructionBase`](../../doc/models/vault-instruction-base.md) | Optional | Basic vault instruction specification that can be extended by specific payment sources that supports vaulting. | -| `verification` | [`CardVerification`](../../doc/models/card-verification.md) | Optional | The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "email_address": "email_address2", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - } - }, - "vault": { - "store_in_vault": "ON_SUCCESS" - }, - "verification": { - "method": "3D_SECURE" - } -} -``` - diff --git a/doc/models/card-brand.md b/doc/models/card-brand.md deleted file mode 100644 index 1f8b771..0000000 --- a/doc/models/card-brand.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Card Brand - -The card network or brand. Applies to credit, debit, gift, and payment cards. - -## Enumeration - -`CardBrand` - -## Fields - -| Name | -| --- | -| `VISA` | -| `MASTERCARD` | -| `DISCOVER` | -| `AMEX` | -| `SOLO` | -| `JCB` | -| `STAR` | -| `DELTA` | -| `SWITCH` | -| `MAESTRO` | -| `CB_NATIONALE` | -| `CONFIGOGA` | -| `CONFIDIS` | -| `ELECTRON` | -| `CETELEM` | -| `CHINA_UNION_PAY` | -| `DINERS` | -| `ELO` | -| `HIPER` | -| `HIPERCARD` | -| `RUPAY` | -| `GE` | -| `SYNCHRONY` | -| `UNKNOWN` | - diff --git a/doc/models/card-experience-context.md b/doc/models/card-experience-context.md deleted file mode 100644 index 5247a36..0000000 --- a/doc/models/card-experience-context.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Card Experience Context - -Customizes the payer experience during the 3DS Approval for payment. - -## Structure - -`CardExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `return_url` | `String` | Optional | Describes the URL. | -| `cancel_url` | `String` | Optional | Describes the URL. | - -## Example (as JSON) - -```json -{ - "return_url": "return_url2", - "cancel_url": "cancel_url0" -} -``` - diff --git a/doc/models/card-from-request.md b/doc/models/card-from-request.md deleted file mode 100644 index 4d4e3dd..0000000 --- a/doc/models/card-from-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Card From Request - -Representation of card details as received in the request. - -## Structure - -`CardFromRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | - -## Example (as JSON) - -```json -{ - "expiry": "expiry6", - "last_digits": "last_digits2" -} -``` - diff --git a/doc/models/card-payment-token.md b/doc/models/card-payment-token.md deleted file mode 100644 index 7d4364f..0000000 --- a/doc/models/card-payment-token.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Card Payment Token - -Full representation of a Card Payment Token including network token. - -## Structure - -`CardPaymentToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | -| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | -| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | -| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `network_token` | `Object` | Optional | - | - -## Example (as JSON) - -```json -{ - "name": "name2", - "last_digits": "last_digits6", - "brand": "RUPAY", - "expiry": "expiry0", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/card-request.md b/doc/models/card-request.md deleted file mode 100644 index b8ecdcd..0000000 --- a/doc/models/card-request.md +++ /dev/null @@ -1,43 +0,0 @@ - -# Card Request - -The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
- -## Structure - -`CardRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `attributes` | [`CardAttributes`](../../doc/models/card-attributes.md) | Optional | Additional attributes associated with the use of this card. | -| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `stored_credential` | [`CardStoredCredential`](../../doc/models/card-stored-credential.md) | Optional | Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| -| `network_token` | [`NetworkToken`](../../doc/models/network-token.md) | Optional | The Third Party Network token used to fund a payment. | -| `experience_context` | [`CardExperienceContext`](../../doc/models/card-experience-context.md) | Optional | Customizes the payer experience during the 3DS Approval for payment. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "number": "number4", - "expiry": "expiry6", - "security_code": "security_code0", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/card-response-entity.md b/doc/models/card-response-entity.md deleted file mode 100644 index 79db2be..0000000 --- a/doc/models/card-response-entity.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Card Response Entity - -Full representation of a Card Payment Token. - -## Structure - -`CardResponseEntity` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | -| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | -| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | -| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "name": "name4", - "last_digits": "last_digits8", - "brand": "STAR", - "expiry": "expiry2", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/card-response.md b/doc/models/card-response.md deleted file mode 100644 index 43d9e8d..0000000 --- a/doc/models/card-response.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Card Response - -The payment card to use to fund a payment. Card can be a credit or debit card. - -## Structure - -`CardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Pattern*: `[0-9]{2,}` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `available_networks` | [`Array`](../../doc/models/card-brand.md) | Optional | Array of brands or networks associated with the card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `256`, *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | -| `attributes` | [`CardAttributesResponse`](../../doc/models/card-attributes-response.md) | Optional | Additional attributes associated with the use of this card. | -| `from_request` | [`CardFromRequest`](../../doc/models/card-from-request.md) | Optional | Representation of card details as received in the request. | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "last_digits": "last_digits4", - "brand": "CONFIDIS", - "available_networks": [ - "ELO", - "DINERS", - "CHINA_UNION_PAY" - ], - "type": "CREDIT" -} -``` - diff --git a/doc/models/card-stored-credential.md b/doc/models/card-stored-credential.md deleted file mode 100644 index 87fb950..0000000 --- a/doc/models/card-stored-credential.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Card Stored Credential - -Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
- -## Structure - -`CardStoredCredential` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_type` | [`StoredPaymentSourcePaymentType`](../../doc/models/stored-payment-source-payment-type.md) | Required | Indicates the type of the stored payment_source payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `previous_network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | - -## Example (as JSON) - -```json -{ - "payment_initiator": "CUSTOMER", - "payment_type": "ONE_TIME", - "usage": "DERIVED", - "previous_network_transaction_reference": { - "id": "id6", - "date": "date2", - "network": "VISA", - "acquirer_reference_number": "acquirer_reference_number8" - } -} -``` - diff --git a/doc/models/card-supplementary-data.md b/doc/models/card-supplementary-data.md deleted file mode 100644 index 1dbfc5f..0000000 --- a/doc/models/card-supplementary-data.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Card Supplementary Data - -Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. - -## Structure - -`CardSupplementaryData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `level_2` | [`Level2CardProcessingData`](../../doc/models/level-2-card-processing-data.md) | Optional | The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business. | -| `level_3` | [`Level3CardProcessingData`](../../doc/models/level-3-card-processing-data.md) | Optional | The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business. | - -## Example (as JSON) - -```json -{ - "level_2": { - "invoice_id": "invoice_id4", - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - } - }, - "level_3": { - "shipping_amount": { - "currency_code": "currency_code0", - "value": "value6" - }, - "duty_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "discount_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "shipping_address": { - "address_line_1": "address_line_10", - "address_line_2": "address_line_20", - "admin_area_2": "admin_area_24", - "admin_area_1": "admin_area_16", - "postal_code": "postal_code2", - "country_code": "country_code0" - }, - "ships_from_postal_code": "ships_from_postal_code4" - } -} -``` - diff --git a/doc/models/card-type.md b/doc/models/card-type.md deleted file mode 100644 index acb2601..0000000 --- a/doc/models/card-type.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Card Type - -Type of card. i.e Credit, Debit and so on. - -## Enumeration - -`CardType` - -## Fields - -| Name | -| --- | -| `CREDIT` | -| `DEBIT` | -| `PREPAID` | -| `STORE` | -| `UNKNOWN` | - diff --git a/doc/models/card-verification-details.md b/doc/models/card-verification-details.md deleted file mode 100644 index c72d441..0000000 --- a/doc/models/card-verification-details.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Card Verification Details - -Card Verification details including the authorization details and 3D SECURE details. - -## Structure - -`CardVerificationDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `network_transaction_id` | `String` | Optional | Transaction Identifier as given by the network to indicate a previously executed CIT authorization. Only present when authorization is successful for a verification.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `1024`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | -| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date".
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | -| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `processor_response` | [`CardVerificationProcessorResponse`](../../doc/models/card-verification-processor-response.md) | Optional | The processor response information for payment requests, such as direct credit card transactions. | - -## Example (as JSON) - -```json -{ - "network_transaction_id": "network_transaction_id4", - "date": "date8", - "network": "SOLO", - "time": "time2", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } -} -``` - diff --git a/doc/models/card-verification-method.md b/doc/models/card-verification-method.md deleted file mode 100644 index 2cc747c..0000000 --- a/doc/models/card-verification-method.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Card Verification Method - -The method used for card verification. - -## Enumeration - -`CardVerificationMethod` - -## Fields - -| Name | -| --- | -| `SCA_ALWAYS` | -| `SCA_WHEN_REQUIRED` | -| `ENUM_3D_SECURE` | -| `AVS_CVV` | - diff --git a/doc/models/card-verification-processor-response.md b/doc/models/card-verification-processor-response.md deleted file mode 100644 index 3736dcb..0000000 --- a/doc/models/card-verification-processor-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Card Verification Processor Response - -The processor response information for payment requests, such as direct credit card transactions. - -## Structure - -`CardVerificationProcessorResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `avs_code` | [`AVSCode`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. | -| `cvv_code` | [`CVVCode`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. | - -## Example (as JSON) - -```json -{ - "avs_code": "E", - "cvv_code": "All others" -} -``` - diff --git a/doc/models/card-verification.md b/doc/models/card-verification.md deleted file mode 100644 index 947af07..0000000 --- a/doc/models/card-verification.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Card Verification - -The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). - -## Structure - -`CardVerification` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `method` | [`CardVerificationMethod`](../../doc/models/card-verification-method.md) | Optional | The method used for card verification.
**Default**: `CardVerificationMethod::SCA_WHEN_REQUIRED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "method": "SCA_WHEN_REQUIRED" -} -``` - diff --git a/doc/models/checkout-payment-intent.md b/doc/models/checkout-payment-intent.md deleted file mode 100644 index e499f52..0000000 --- a/doc/models/checkout-payment-intent.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Checkout Payment Intent - -The intent to either capture payment immediately or authorize a payment for an order after order creation. - -## Enumeration - -`CheckoutPaymentIntent` - -## Fields - -| Name | -| --- | -| `CAPTURE` | -| `AUTHORIZE` | - diff --git a/doc/models/cobranded-card.md b/doc/models/cobranded-card.md deleted file mode 100644 index c0f07b4..0000000 --- a/doc/models/cobranded-card.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Cobranded Card - -Details about the merchant cobranded card used for order purchase. - -## Structure - -`CobrandedCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `labels` | `Array` | Optional | Array of labels for the cobranded card.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `25`, *Minimum Length*: `1`, *Maximum Length*: `256` | -| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "labels": [ - "labels2", - "labels3" - ], - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } -} -``` - diff --git a/doc/models/confirm-order-request.md b/doc/models/confirm-order-request.md deleted file mode 100644 index 5bc8119..0000000 --- a/doc/models/confirm-order-request.md +++ /dev/null @@ -1,109 +0,0 @@ - -# Confirm Order Request - -Payer confirms the intent to pay for the Order using the provided payment source. - -## Structure - -`ConfirmOrderRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Required | The payment source definition. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | -| `application_context` | [`OrderConfirmApplicationContext`](../../doc/models/order-confirm-application-context.md) | Optional | Customizes the payer confirmation experience. | - -## Example (as JSON) - -```json -{ - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "bancontact": { - "name": "name0", - "country_code": "country_code0", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } - }, - "blik": { - "name": "name2", - "country_code": "country_code2", - "email": "email4", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - }, - "level_0": { - "auth_code": "auth_code8" - }, - "one_click": { - "auth_code": "auth_code0", - "consumer_reference": "consumer_reference2", - "alias_label": "alias_label6", - "alias_key": "alias_key4" - } - } - }, - "processing_instruction": "NO_INSTRUCTION", - "application_context": { - "brand_name": "brand_name8", - "locale": "locale2", - "return_url": "return_url0", - "cancel_url": "cancel_url2", - "stored_payment_source": { - "payment_initiator": "CUSTOMER", - "payment_type": "RECURRING", - "usage": "FIRST", - "previous_network_transaction_reference": { - "id": "id6", - "date": "date2", - "network": "VISA", - "acquirer_reference_number": "acquirer_reference_number8" - } - } - } -} -``` - diff --git a/doc/models/customer-information.md b/doc/models/customer-information.md deleted file mode 100644 index aa9d482..0000000 --- a/doc/models/customer-information.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Customer Information - -The details about a customer in PayPal's system of record. - -## Structure - -`CustomerInformation` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | - -## Example (as JSON) - -```json -{ - "id": "id6", - "email_address": "email_address4", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - } -} -``` - diff --git a/doc/models/customer-request.md b/doc/models/customer-request.md deleted file mode 100644 index 1583b51..0000000 --- a/doc/models/customer-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Customer Request - -Customer in merchant's or partner's system of records. - -## Structure - -`CustomerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | - -## Example (as JSON) - -```json -{ - "id": "id8", - "merchant_customer_id": "merchant_customer_id0" -} -``` - diff --git a/doc/models/customer-vault-payment-tokens-response.md b/doc/models/customer-vault-payment-tokens-response.md deleted file mode 100644 index a38be5a..0000000 --- a/doc/models/customer-vault-payment-tokens-response.md +++ /dev/null @@ -1,274 +0,0 @@ - -# Customer Vault Payment Tokens Response - -Collection of payment tokens saved for a given customer. - -## Structure - -`CustomerVaultPaymentTokensResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `total_items` | `Integer` | Optional | Total number of items.
**Constraints**: `>= 1`, `<= 50` | -| `total_pages` | `Integer` | Optional | Total number of pages.
**Constraints**: `>= 1`, `<= 10` | -| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | -| `payment_tokens` | [`Array`](../../doc/models/payment-token-response.md) | Optional | **Constraints**: *Minimum Items*: `0`, *Maximum Items*: `64` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | - -## Example (as JSON) - -```json -{ - "total_items": 132, - "total_pages": 168, - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_tokens": [ - { - "id": "id4", - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "apple_pay": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "bank": { - "ach_debit": { - "verification_status": "verification_status6" - }, - "sepa_debit": { - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } - } - } - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] - }, - { - "id": "id4", - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "apple_pay": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "bank": { - "ach_debit": { - "verification_status": "verification_status6" - }, - "sepa_debit": { - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } - } - } - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] - } - ], - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] -} -``` - diff --git a/doc/models/cvv-code.md b/doc/models/cvv-code.md deleted file mode 100644 index 48872cd..0000000 --- a/doc/models/cvv-code.md +++ /dev/null @@ -1,28 +0,0 @@ - -# CVV Code - -The card verification value code for for Visa, Discover, Mastercard, or American Express. - -## Enumeration - -`CVVCode` - -## Fields - -| Name | -| --- | -| `E` | -| `I` | -| `M` | -| `N` | -| `P` | -| `S` | -| `U` | -| `X` | -| `ENUM_ALL_OTHERS` | -| `ENUM_0` | -| `ENUM_1` | -| `ENUM_2` | -| `ENUM_3` | -| `ENUM_4` | - diff --git a/doc/models/disbursement-mode.md b/doc/models/disbursement-mode.md deleted file mode 100644 index ce3a783..0000000 --- a/doc/models/disbursement-mode.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Disbursement Mode - -The funds that are held on behalf of the merchant. - -## Enumeration - -`DisbursementMode` - -## Fields - -| Name | -| --- | -| `INSTANT` | -| `DELAYED` | - diff --git a/doc/models/dispute-category.md b/doc/models/dispute-category.md deleted file mode 100644 index 248d986..0000000 --- a/doc/models/dispute-category.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Dispute Category - -The condition that is covered for the transaction. - -## Enumeration - -`DisputeCategory` - -## Fields - -| Name | -| --- | -| `ITEM_NOT_RECEIVED` | -| `UNAUTHORIZED_TRANSACTION` | - diff --git a/doc/models/eci-flag.md b/doc/models/eci-flag.md deleted file mode 100644 index f89dc2b..0000000 --- a/doc/models/eci-flag.md +++ /dev/null @@ -1,20 +0,0 @@ - -# ECI Flag - -Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor. - -## Enumeration - -`ECIFlag` - -## Fields - -| Name | -| --- | -| `MASTERCARD_NON_3D_SECURE_TRANSACTION` | -| `MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION` | -| `MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION` | -| `FULLY_AUTHENTICATED_TRANSACTION` | -| `ATTEMPTED_AUTHENTICATION_TRANSACTION` | -| `NON_3D_SECURE_TRANSACTION` | - diff --git a/doc/models/enrollment-status.md b/doc/models/enrollment-status.md deleted file mode 100644 index f256314..0000000 --- a/doc/models/enrollment-status.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Enrollment Status - -Status of Authentication eligibility. - -## Enumeration - -`EnrollmentStatus` - -## Fields - -| Name | -| --- | -| `Y` | -| `N` | -| `U` | -| `B` | - diff --git a/doc/models/eps-payment-object.md b/doc/models/eps-payment-object.md deleted file mode 100644 index 30a08ca..0000000 --- a/doc/models/eps-payment-object.md +++ /dev/null @@ -1,27 +0,0 @@ - -# EPS Payment Object - -Information used to pay using eps. - -## Structure - -`EPSPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code6", - "bic": "bic8" -} -``` - diff --git a/doc/models/eps-payment-request.md b/doc/models/eps-payment-request.md deleted file mode 100644 index 58229f1..0000000 --- a/doc/models/eps-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# EPS Payment Request - -Information needed to pay using eps. - -## Structure - -`EPSPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "country_code": "country_code2", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/error-details.md b/doc/models/error-details.md deleted file mode 100644 index af79a7d..0000000 --- a/doc/models/error-details.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Error Details - -The error details. Required for client-side `4XX` errors. - -## Structure - -`ErrorDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `field` | `String` | Optional | The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors. | -| `value` | `String` | Optional | The value of the field that caused the error. | -| `location` | `String` | Optional | The location of the field that caused the error. Value is `body`, `path`, or `query`.
**Default**: `'body'` | -| `issue` | `String` | Required | The unique, fine-grained application-level error code. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` | -| `description` | `String` | Optional | The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value. | - -## Example (as JSON) - -```json -{ - "location": "body", - "issue": "issue8", - "field": "field0", - "value": "value8", - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "description": "description4" -} -``` - diff --git a/doc/models/error-exception.md b/doc/models/error-exception.md deleted file mode 100644 index fa8252a..0000000 --- a/doc/models/error-exception.md +++ /dev/null @@ -1,81 +0,0 @@ - -# Error Exception - -The error details. - -## Structure - -`ErrorException` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The human-readable, unique name of the error. | -| `message` | `String` | Required | The message that describes the error. | -| `debug_id` | `String` | Required | The PayPal internal ID. Used for correlation purposes. | -| `details` | [`Array`](../../doc/models/error-details.md) | Optional | An array of additional details about the error. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links). | - -## Example (as JSON) - -```json -{ - "name": "name4", - "message": "message4", - "debug_id": "debug_id0", - "details": [ - { - "field": "field4", - "value": "value2", - "location": "location4", - "issue": "issue6", - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "description": "description0" - }, - { - "field": "field4", - "value": "value2", - "location": "location4", - "issue": "issue6", - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "description": "description0" - } - ], - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] -} -``` - diff --git a/doc/models/exchange-rate.md b/doc/models/exchange-rate.md deleted file mode 100644 index c6281ec..0000000 --- a/doc/models/exchange-rate.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Exchange Rate - -The exchange rate that determines the amount to convert from one currency to another currency. - -## Structure - -`ExchangeRate` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `source_currency` | `String` | Optional | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | -| `target_currency` | `String` | Optional | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | -| `value` | `String` | Optional | The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point. | - -## Example (as JSON) - -```json -{ - "source_currency": "source_currency0", - "target_currency": "target_currency2", - "value": "value2" -} -``` - diff --git a/doc/models/experience-context.md b/doc/models/experience-context.md deleted file mode 100644 index 4f2c07a..0000000 --- a/doc/models/experience-context.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Experience Context - -Customizes the payer experience during the approval process for the payment. - -## Structure - -`ExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | -| `return_url` | `String` | Optional | Describes the URL. | -| `cancel_url` | `String` | Optional | Describes the URL. | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "brand_name": "brand_name0", - "locale": "locale4", - "return_url": "return_url2", - "cancel_url": "cancel_url4" -} -``` - diff --git a/doc/models/fullfillment-type.md b/doc/models/fullfillment-type.md deleted file mode 100644 index 3c9598b..0000000 --- a/doc/models/fullfillment-type.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Fullfillment Type - -A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both. - -## Enumeration - -`FullfillmentType` - -## Fields - -| Name | -| --- | -| `SHIPPING` | -| `PICKUP_IN_PERSON` | -| `PICKUP_IN_STORE` | -| `PICKUP_FROM_PERSON` | - diff --git a/doc/models/giropay-payment-object.md b/doc/models/giropay-payment-object.md deleted file mode 100644 index 255dfd2..0000000 --- a/doc/models/giropay-payment-object.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Giropay Payment Object - -Information needed to pay using giropay. - -## Structure - -`GiropayPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code6", - "bic": "bic8" -} -``` - diff --git a/doc/models/giropay-payment-request.md b/doc/models/giropay-payment-request.md deleted file mode 100644 index 314dbf0..0000000 --- a/doc/models/giropay-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Giropay Payment Request - -Information needed to pay using giropay. - -## Structure - -`GiropayPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name8", - "country_code": "country_code8", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/google-pay-authentication-method.md b/doc/models/google-pay-authentication-method.md deleted file mode 100644 index b86c36e..0000000 --- a/doc/models/google-pay-authentication-method.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Google Pay Authentication Method - -Authentication Method which is used for the card transaction. - -## Enumeration - -`GooglePayAuthenticationMethod` - -## Fields - -| Name | -| --- | -| `PAN_ONLY` | -| `CRYPTOGRAM_3DS` | - diff --git a/doc/models/google-pay-card-attributes.md b/doc/models/google-pay-card-attributes.md deleted file mode 100644 index a0e64a0..0000000 --- a/doc/models/google-pay-card-attributes.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Google Pay Card Attributes - -Additional attributes associated with the use of this card. - -## Structure - -`GooglePayCardAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `verification` | [`CardVerification`](../../doc/models/card-verification.md) | Optional | The API caller can opt in to verify the card through PayPal offered verification services (e.g. Smart Dollar Auth, 3DS). | - -## Example (as JSON) - -```json -{ - "verification": { - "method": "3D_SECURE" - } -} -``` - diff --git a/doc/models/google-pay-card-response.md b/doc/models/google-pay-card-response.md deleted file mode 100644 index 174a861..0000000 --- a/doc/models/google-pay-card-response.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Google Pay Card Response - -The payment card to use to fund a Google Pay payment response. Can be a credit or debit card. - -## Structure - -`GooglePayCardResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{2,4}$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | - -## Example (as JSON) - -```json -{ - "name": "name4", - "last_digits": "last_digits8", - "type": "DEBIT", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/google-pay-decrypted-token-data.md b/doc/models/google-pay-decrypted-token-data.md deleted file mode 100644 index 6ce3826..0000000 --- a/doc/models/google-pay-decrypted-token-data.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Google Pay Decrypted Token Data - -Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method. - -## Structure - -`GooglePayDecryptedTokenData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `message_id` | `String` | Optional | A unique ID that identifies the message in case it needs to be revoked or located at a later time.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `250`, *Pattern*: `^.*$` | -| `message_expiration` | `String` | Optional | Date and time at which the message expires as UTC milliseconds since epoch. Integrators should reject any message that's expired.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `\d{13}` | -| `payment_method` | [`GooglePayPaymentMethod`](../../doc/models/google-pay-payment-method.md) | Required | The type of the payment credential. Currently, only CARD is supported.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4` | -| `authentication_method` | [`GooglePayAuthenticationMethod`](../../doc/models/google-pay-authentication-method.md) | Required | Authentication Method which is used for the card transaction.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50` | -| `cryptogram` | `String` | Optional | Base-64 cryptographic identifier used by card schemes to validate the token verification result. This is a conditionally required field if authentication_method is CRYPTOGRAM_3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | -| `eci_indicator` | `String` | Optional | Electronic Commerce Indicator may not always be present. It is only returned for tokens on the Visa card network. This value is passed through in the payment authorization request.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256`, *Pattern*: `^.*$` | - -## Example (as JSON) - -```json -{ - "message_id": "message_id4", - "message_expiration": "message_expiration8", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram0", - "eci_indicator": "eci_indicator4" -} -``` - diff --git a/doc/models/google-pay-payment-method.md b/doc/models/google-pay-payment-method.md deleted file mode 100644 index 5b7b60f..0000000 --- a/doc/models/google-pay-payment-method.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Google Pay Payment Method - -The type of the payment credential. Currently, only CARD is supported. - -## Enumeration - -`GooglePayPaymentMethod` - -## Fields - -| Name | -| --- | -| `CARD` | - diff --git a/doc/models/google-pay-request.md b/doc/models/google-pay-request.md deleted file mode 100644 index e440a19..0000000 --- a/doc/models/google-pay-request.md +++ /dev/null @@ -1,46 +0,0 @@ - -# Google Pay Request - -Information needed to pay using Google Pay. - -## Structure - -`GooglePayRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `phone_number` | [`PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `card` | `Object` | Optional | The payment card information. | -| `decrypted_token` | [`GooglePayDecryptedTokenData`](../../doc/models/google-pay-decrypted-token-data.md) | Optional | Details shared by Google for the merchant to be shared with PayPal. This is required to process the transaction using the Google Pay payment method. | -| `assurance_details` | `Object` | Optional | - | -| `attributes` | [`GooglePayCardAttributes`](../../doc/models/google-pay-card-attributes.md) | Optional | Additional attributes associated with the use of this card. | - -## Example (as JSON) - -```json -{ - "name": "name4", - "email_address": "email_address2", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "key1": "val1", - "key2": "val2" - }, - "decrypted_token": { - "message_id": "message_id0", - "message_expiration": "message_expiration2", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0" - } -} -``` - diff --git a/doc/models/google-pay-wallet-response.md b/doc/models/google-pay-wallet-response.md deleted file mode 100644 index c179879..0000000 --- a/doc/models/google-pay-wallet-response.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Google Pay Wallet Response - -Google Pay Wallet payment data. - -## Structure - -`GooglePayWalletResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `phone_number` | [`PhoneNumberWithCountryCode`](../../doc/models/phone-number-with-country-code.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `card` | [`GooglePayCardResponse`](../../doc/models/google-pay-card-response.md) | Optional | The payment card to use to fund a Google Pay payment response. Can be a credit or debit card. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "email_address": "email_address2", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } -} -``` - diff --git a/doc/models/ideal-payment-object.md b/doc/models/ideal-payment-object.md deleted file mode 100644 index 15b10dc..0000000 --- a/doc/models/ideal-payment-object.md +++ /dev/null @@ -1,29 +0,0 @@ - -# IDEAL Payment Object - -Information used to pay using iDEAL. - -## Structure - -`IDEALPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code4", - "bic": "bic8", - "iban_last_chars": "iban_last_chars4" -} -``` - diff --git a/doc/models/ideal-payment-request.md b/doc/models/ideal-payment-request.md deleted file mode 100644 index 9b5dda3..0000000 --- a/doc/models/ideal-payment-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# IDEAL Payment Request - -Information needed to pay using iDEAL. - -## Structure - -`IDEALPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code4", - "bic": "bic8", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/instrument-authorization-status.md b/doc/models/instrument-authorization-status.md deleted file mode 100644 index f119e0d..0000000 --- a/doc/models/instrument-authorization-status.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Instrument Authorization Status - -The authorization status of the wallet instrument. - -## Enumeration - -`InstrumentAuthorizationStatus` - -## Fields - -| Name | -| --- | -| `AUTHORIZED` | -| `BLOCKED` | -| `FAILED` | -| `NOT_APPLICABLE` | -| `NOT_SUPPORTED` | -| `UNAUTHORIZED` | - diff --git a/doc/models/item-category.md b/doc/models/item-category.md deleted file mode 100644 index 47cdb63..0000000 --- a/doc/models/item-category.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Item Category - -The item category type. - -## Enumeration - -`ItemCategory` - -## Fields - -| Name | -| --- | -| `DIGITAL_GOODS` | -| `PHYSICAL_GOODS` | -| `DONATION` | - diff --git a/doc/models/item.md b/doc/models/item.md deleted file mode 100644 index 107f9fb..0000000 --- a/doc/models/item.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Item - -The details for the items to be purchased. - -## Structure - -`Item` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `unit_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | -| `tax` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `quantity` | `String` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | -| `description` | `String` | Optional | The detailed item description.
**Constraints**: *Maximum Length*: `127` | -| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | -| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | -| `category` | [`ItemCategory`](../../doc/models/item-category.md) | Optional | The item category type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20` | -| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | -| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | - -## Example (as JSON) - -```json -{ - "name": "name2", - "unit_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax": { - "currency_code": "currency_code0", - "value": "value6" - }, - "quantity": "quantity8", - "description": "description2", - "sku": "sku8", - "url": "url6", - "category": "DIGITAL_GOODS" -} -``` - diff --git a/doc/models/level-2-card-processing-data.md b/doc/models/level-2-card-processing-data.md deleted file mode 100644 index ce61b0c..0000000 --- a/doc/models/level-2-card-processing-data.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Level 2 Card Processing Data - -The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business. - -## Structure - -`Level2CardProcessingData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `invoice_id` | `String` | Optional | Use this field to pass a purchase identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `17`, *Pattern*: `^[\w‘\-.,":;\!?]*$` | -| `tax_total` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "invoice_id": "invoice_id8", - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - } -} -``` - diff --git a/doc/models/level-3-card-processing-data.md b/doc/models/level-3-card-processing-data.md deleted file mode 100644 index 36280d2..0000000 --- a/doc/models/level-3-card-processing-data.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Level 3 Card Processing Data - -The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business. - -## Structure - -`Level3CardProcessingData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `shipping_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `duty_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `shipping_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `ships_from_postal_code` | `String` | Optional | Use this field to specify the postal code of the shipping location.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `60`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | -| `line_items` | [`Array`](../../doc/models/line-item.md) | Optional | A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `100` | - -## Example (as JSON) - -```json -{ - "shipping_amount": { - "currency_code": "currency_code0", - "value": "value6" - }, - "duty_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "discount_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "shipping_address": { - "address_line_1": "address_line_10", - "address_line_2": "address_line_20", - "admin_area_2": "admin_area_24", - "admin_area_1": "admin_area_16", - "postal_code": "postal_code2", - "country_code": "country_code0" - }, - "ships_from_postal_code": "ships_from_postal_code6" -} -``` - diff --git a/doc/models/liability-shift-indicator.md b/doc/models/liability-shift-indicator.md deleted file mode 100644 index dbd5882..0000000 --- a/doc/models/liability-shift-indicator.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Liability Shift Indicator - -Liability shift indicator. The outcome of the issuer's authentication. - -## Enumeration - -`LiabilityShiftIndicator` - -## Fields - -| Name | -| --- | -| `NO` | -| `POSSIBLE` | -| `UNKNOWN` | - diff --git a/doc/models/line-item.md b/doc/models/line-item.md deleted file mode 100644 index d6fbac8..0000000 --- a/doc/models/line-item.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Line Item - -The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. - -## Structure - -`LineItem` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `unit_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | -| `tax` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `quantity` | `String` | Required | The item quantity. Must be a whole number.
**Constraints**: *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | -| `description` | `String` | Optional | The detailed item description.
**Constraints**: *Maximum Length*: `127` | -| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item.
**Constraints**: *Maximum Length*: `127` | -| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | -| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | -| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | -| `commodity_code` | `String` | Optional | Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | -| `discount_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `total_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `unit_of_measure` | `String` | Optional | Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `12`, *Pattern*: `^[a-zA-Z0-9_'.-]*$` | - -## Example (as JSON) - -```json -{ - "name": "name8", - "unit_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax": { - "currency_code": "currency_code0", - "value": "value6" - }, - "quantity": "quantity4", - "description": "description8", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" -} -``` - diff --git a/doc/models/link-description.md b/doc/models/link-description.md deleted file mode 100644 index 03c01d4..0000000 --- a/doc/models/link-description.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Link Description - -The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information. - -## Structure - -`LinkDescription` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `href` | `String` | Required | The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call. | -| `rel` | `String` | Required | The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml). | -| `method` | [`LinkHTTPMethod`](../../doc/models/link-http-method.md) | Optional | The HTTP method required to make the related call. | - -## Example (as JSON) - -```json -{ - "href": "href2", - "rel": "rel6", - "method": "PUT" -} -``` - diff --git a/doc/models/link-http-method.md b/doc/models/link-http-method.md deleted file mode 100644 index 45341a5..0000000 --- a/doc/models/link-http-method.md +++ /dev/null @@ -1,22 +0,0 @@ - -# Link HTTP Method - -The HTTP method required to make the related call. - -## Enumeration - -`LinkHTTPMethod` - -## Fields - -| Name | -| --- | -| `GET` | -| `POST` | -| `PUT` | -| `DELETE` | -| `HEAD` | -| `CONNECT` | -| `OPTIONS` | -| `PATCH` | - diff --git a/doc/models/money.md b/doc/models/money.md deleted file mode 100644 index 76a33c3..0000000 --- a/doc/models/money.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Money - -The currency and amount for a financial transaction, such as a balance or payment due. - -## Structure - -`Money` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `currency_code` | `String` | Required | The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `3` | -| `value` | `String` | Required | The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/).
**Constraints**: *Maximum Length*: `32`, *Pattern*: `^((-?[0-9]+)\|(-?([0-9]+)?[.][0-9]+))$` | - -## Example (as JSON) - -```json -{ - "currency_code": "currency_code6", - "value": "value2" -} -``` - diff --git a/doc/models/my-bank-payment-object.md b/doc/models/my-bank-payment-object.md deleted file mode 100644 index cf7eef6..0000000 --- a/doc/models/my-bank-payment-object.md +++ /dev/null @@ -1,29 +0,0 @@ - -# My Bank Payment Object - -Information used to pay using MyBank. - -## Structure - -`MyBankPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | - -## Example (as JSON) - -```json -{ - "name": "name4", - "country_code": "country_code4", - "bic": "bic6", - "iban_last_chars": "iban_last_chars2" -} -``` - diff --git a/doc/models/my-bank-payment-request.md b/doc/models/my-bank-payment-request.md deleted file mode 100644 index c46d661..0000000 --- a/doc/models/my-bank-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# My Bank Payment Request - -Information needed to pay using MyBank. - -## Structure - -`MyBankPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name0", - "country_code": "country_code0", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/name.md b/doc/models/name.md deleted file mode 100644 index d8921e0..0000000 --- a/doc/models/name.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Name - -The name of the party. - -## Structure - -`Name` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `given_name` | `String` | Optional | When the party is a person, the party's given, or first, name.
**Constraints**: *Maximum Length*: `140` | -| `surname` | `String` | Optional | When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname.
**Constraints**: *Maximum Length*: `140` | - -## Example (as JSON) - -```json -{ - "given_name": "given_name2", - "surname": "surname8" -} -``` - diff --git a/doc/models/net-amount-breakdown-item.md b/doc/models/net-amount-breakdown-item.md deleted file mode 100644 index 48f1725..0000000 --- a/doc/models/net-amount-breakdown-item.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Net Amount Breakdown Item - -The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds. - -## Structure - -`NetAmountBreakdownItem` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payable_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `converted_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `exchange_rate` | [`ExchangeRate`](../../doc/models/exchange-rate.md) | Optional | The exchange rate that determines the amount to convert from one currency to another currency. | - -## Example (as JSON) - -```json -{ - "payable_amount": { - "currency_code": "currency_code8", - "value": "value4" - }, - "converted_amount": { - "currency_code": "currency_code0", - "value": "value6" - }, - "exchange_rate": { - "source_currency": "source_currency4", - "target_currency": "target_currency6", - "value": "value6" - } -} -``` - diff --git a/doc/models/network-token.md b/doc/models/network-token.md deleted file mode 100644 index 59580fd..0000000 --- a/doc/models/network-token.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Network Token - -The Third Party Network token used to fund a payment. - -## Structure - -`NetworkToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `number` | `String` | Required | Third party network token number.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | -| `expiry` | `String` | Required | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `cryptogram` | `String` | Optional | An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions.
**Constraints**: *Minimum Length*: `28`, *Maximum Length*: `32`, *Pattern*: `^.*$` | -| `eci_flag` | [`ECIFlag`](../../doc/models/eci-flag.md) | Optional | Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `token_requestor_id` | `String` | Optional | A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `11`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "number": "number0", - "expiry": "expiry0", - "cryptogram": "cryptogram2", - "eci_flag": "ATTEMPTED_AUTHENTICATION_TRANSACTION", - "token_requestor_id": "token_requestor_id8" -} -``` - diff --git a/doc/models/network-transaction-reference-entity.md b/doc/models/network-transaction-reference-entity.md deleted file mode 100644 index 78c64a7..0000000 --- a/doc/models/network-transaction-reference-entity.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Network Transaction Reference Entity - -Previous network transaction reference including id and network. - -## Structure - -`NetworkTransactionReferenceEntity` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Required | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | -| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | -| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "id": "id6", - "date": "date2", - "network": "VISA", - "time": "time6" -} -``` - diff --git a/doc/models/network-transaction-reference.md b/doc/models/network-transaction-reference.md deleted file mode 100644 index 9df617d..0000000 --- a/doc/models/network-transaction-reference.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Network Transaction Reference - -Reference values used by the card network to identify a transaction. - -## Structure - -`NetworkTransactionReference` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Required | Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
**Constraints**: *Minimum Length*: `9`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$` | -| `date` | `String` | Optional | The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `4`, *Pattern*: `^[0-9]+$` | -| `network` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `acquirer_reference_number` | `String` | Optional | Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9]+$` | - -## Example (as JSON) - -```json -{ - "id": "id6", - "date": "date8", - "network": "CB_NATIONALE", - "acquirer_reference_number": "acquirer_reference_number2" -} -``` - diff --git a/doc/models/o-auth-provider-error.md b/doc/models/o-auth-provider-error.md deleted file mode 100644 index ab73f72..0000000 --- a/doc/models/o-auth-provider-error.md +++ /dev/null @@ -1,20 +0,0 @@ - -# O Auth Provider Error - -OAuth 2 Authorization error codes - -## Enumeration - -`OAuthProviderError` - -## Fields - -| Name | Description | -| --- | --- | -| `INVALID_REQUEST` | The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed. | -| `INVALID_CLIENT` | Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). | -| `INVALID_GRANT` | The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. | -| `UNAUTHORIZED_CLIENT` | The authenticated client is not authorized to use this authorization grant type. | -| `UNSUPPORTED_GRANT_TYPE` | The authorization grant type is not supported by the authorization server. | -| `INVALID_SCOPE` | The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner. | - diff --git a/doc/models/o-auth-provider-exception.md b/doc/models/o-auth-provider-exception.md deleted file mode 100644 index 92f220d..0000000 --- a/doc/models/o-auth-provider-exception.md +++ /dev/null @@ -1,27 +0,0 @@ - -# O Auth Provider Exception - -OAuth 2 Authorization endpoint exception. - -## Structure - -`OAuthProviderException` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `error` | [`OAuthProviderError`](../../doc/models/o-auth-provider-error.md) | Required | Gets or sets error code. | -| `error_description` | `String` | Optional | Gets or sets human-readable text providing additional information on error.
Used to assist the client developer in understanding the error that occurred. | -| `error_uri` | `String` | Optional | Gets or sets a URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error. | - -## Example (as JSON) - -```json -{ - "error": "unsupported_grant_type", - "error_description": "error_description8", - "error_uri": "error_uri8" -} -``` - diff --git a/doc/models/o-auth-token.md b/doc/models/o-auth-token.md deleted file mode 100644 index 1e1c481..0000000 --- a/doc/models/o-auth-token.md +++ /dev/null @@ -1,35 +0,0 @@ - -# O Auth Token - -OAuth 2 Authorization endpoint response - -## Structure - -`OAuthToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `access_token` | `String` | Required | Access token | -| `token_type` | `String` | Required | Type of access token | -| `expires_in` | `Integer` | Optional | Time in seconds before the access token expires | -| `scope` | `String` | Optional | List of scopes granted
This is a space-delimited list of strings. | -| `expiry` | `Integer` | Optional | Time of token expiry as unix timestamp (UTC) | -| `refresh_token` | `String` | Optional | Refresh token
Used to get a new access token when it expires. | -| `id_token` | `String` | Optional | An ID token response type is of JSON Web Token (JWT) that contains claims about the identity of the authenticated user. | - -## Example (as JSON) - -```json -{ - "access_token": "access_token4", - "token_type": "token_type6", - "expires_in": 74, - "scope": "scope6", - "expiry": 88, - "refresh_token": "refresh_token6", - "id_token": "id_token6" -} -``` - diff --git a/doc/models/order-application-context-landing-page.md b/doc/models/order-application-context-landing-page.md deleted file mode 100644 index 7b60be3..0000000 --- a/doc/models/order-application-context-landing-page.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Order Application Context Landing Page - -DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object. - -## Enumeration - -`OrderApplicationContextLandingPage` - -## Fields - -| Name | -| --- | -| `LOGIN` | -| `BILLING` | -| `NO_PREFERENCE` | - diff --git a/doc/models/order-application-context-shipping-preference.md b/doc/models/order-application-context-shipping-preference.md deleted file mode 100644 index 165eb75..0000000 --- a/doc/models/order-application-context-shipping-preference.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Order Application Context Shipping Preference - -DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object. - -## Enumeration - -`OrderApplicationContextShippingPreference` - -## Fields - -| Name | -| --- | -| `GET_FROM_FILE` | -| `NO_SHIPPING` | -| `SET_PROVIDED_ADDRESS` | - diff --git a/doc/models/order-application-context-user-action.md b/doc/models/order-application-context-user-action.md deleted file mode 100644 index 502c030..0000000 --- a/doc/models/order-application-context-user-action.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Order Application Context User Action - -DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object. - -## Enumeration - -`OrderApplicationContextUserAction` - -## Fields - -| Name | -| --- | -| `CONTINUE` | -| `PAY_NOW` | - diff --git a/doc/models/order-application-context.md b/doc/models/order-application-context.md deleted file mode 100644 index 3ce805d..0000000 --- a/doc/models/order-application-context.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Order Application Context - -Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
- -## Structure - -`OrderApplicationContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `landing_page` | [`OrderApplicationContextLandingPage`](../../doc/models/order-application-context-landing-page.md) | Optional | DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | -| `shipping_preference` | [`OrderApplicationContextShippingPreference`](../../doc/models/order-application-context-shipping-preference.md) | Optional | DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[0-9A-Z_]+$` | -| `user_action` | [`OrderApplicationContextUserAction`](../../doc/models/order-application-context-user-action.md) | Optional | DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object.
**Default**: `OrderApplicationContextUserAction::CONTINUE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_method` | [`PaymentMethodPreference`](../../doc/models/payment-method-preference.md) | Optional | The customer and merchant payment preferences. | -| `return_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. | -| `cancel_url` | `String` | Optional | DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object. | -| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| - -## Example (as JSON) - -```json -{ - "landing_page": "NO_PREFERENCE", - "shipping_preference": "GET_FROM_FILE", - "user_action": "CONTINUE", - "brand_name": "brand_name2", - "locale": "locale6" -} -``` - diff --git a/doc/models/order-authorize-request-payment-source.md b/doc/models/order-authorize-request-payment-source.md deleted file mode 100644 index f2a38df..0000000 --- a/doc/models/order-authorize-request-payment-source.md +++ /dev/null @@ -1,109 +0,0 @@ - -# Order Authorize Request Payment Source - -The payment source definition. - -## Structure - -`OrderAuthorizeRequestPaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| -| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | -| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | -| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | -| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | -| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "apple_pay": { - "id": "id0", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - }, - "decrypted_token": { - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id6", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "key1": "val1", - "key2": "val2" - }, - "decrypted_token": { - "message_id": "message_id0", - "message_expiration": "message_expiration2", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0" - } - } -} -``` - diff --git a/doc/models/order-authorize-request.md b/doc/models/order-authorize-request.md deleted file mode 100644 index 24602a1..0000000 --- a/doc/models/order-authorize-request.md +++ /dev/null @@ -1,106 +0,0 @@ - -# Order Authorize Request - -The authorization of an order request. - -## Structure - -`OrderAuthorizeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payment_source` | [`OrderAuthorizeRequestPaymentSource`](../../doc/models/order-authorize-request-payment-source.md) | Optional | The payment source definition. | - -## Example (as JSON) - -```json -{ - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "apple_pay": { - "id": "id0", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - }, - "decrypted_token": { - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id6", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "key1": "val1", - "key2": "val2" - }, - "decrypted_token": { - "message_id": "message_id0", - "message_expiration": "message_expiration2", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0" - } - } - } -} -``` - diff --git a/doc/models/order-authorize-response-payment-source.md b/doc/models/order-authorize-response-payment-source.md deleted file mode 100644 index 428bcbc..0000000 --- a/doc/models/order-authorize-response-payment-source.md +++ /dev/null @@ -1,88 +0,0 @@ - -# Order Authorize Response Payment Source - -The payment source used to fund the payment. - -## Structure - -`OrderAuthorizeResponsePaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardResponse`](../../doc/models/card-response.md) | Optional | The payment card to use to fund a payment. Card can be a credit or debit card. | -| `paypal` | [`PayPalWalletResponse`](../../doc/models/pay-pal-wallet-response.md) | Optional | The PayPal Wallet response. | -| `apple_pay` | [`ApplePayPaymentObject`](../../doc/models/apple-pay-payment-object.md) | Optional | Information needed to pay using ApplePay. | -| `google_pay` | [`GooglePayWalletResponse`](../../doc/models/google-pay-wallet-response.md) | Optional | Google Pay Wallet payment data. | -| `venmo` | [`VenmoWalletResponse`](../../doc/models/venmo-wallet-response.md) | Optional | Venmo wallet response. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "available_networks": [ - "DELTA" - ], - "type": "UNKNOWN" - }, - "paypal": { - "email_address": "email_address0", - "account_id": "account_id4", - "account_status": "VERIFIED", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_type": "FAX" - }, - "apple_pay": { - "id": "id0", - "token": "token6", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "venmo": { - "email_address": "email_address4", - "account_id": "account_id8", - "user_name": "user_name2", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_number": { - "national_number": "national_number6" - } - } -} -``` - diff --git a/doc/models/order-authorize-response.md b/doc/models/order-authorize-response.md deleted file mode 100644 index c586539..0000000 --- a/doc/models/order-authorize-response.md +++ /dev/null @@ -1,98 +0,0 @@ - -# Order Authorize Response - -## Structure - -`OrderAuthorizeResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `id` | `String` | Optional | The ID of the order. | -| `payment_source` | [`OrderAuthorizeResponsePaymentSource`](../../doc/models/order-authorize-response-payment-source.md) | Optional | The payment source used to fund the payment. | -| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | -| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | -| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | -| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related [HATEOAS links](/api/rest/responses/#hateoas-links) that are either relevant to the issue by providing additional information or offering potential resolutions.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `4` | - -## Example (as JSON) - -```json -{ - "processing_instruction": "NO_INSTRUCTION", - "create_time": "create_time0", - "update_time": "update_time4", - "id": "id4", - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "available_networks": [ - "DELTA" - ], - "type": "UNKNOWN" - }, - "paypal": { - "email_address": "email_address0", - "account_id": "account_id4", - "account_status": "VERIFIED", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_type": "FAX" - }, - "apple_pay": { - "id": "id0", - "token": "token6", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "venmo": { - "email_address": "email_address4", - "account_id": "account_id8", - "user_name": "user_name2", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_number": { - "national_number": "national_number6" - } - } - }, - "intent": "CAPTURE" -} -``` - diff --git a/doc/models/order-capture-request-payment-source.md b/doc/models/order-capture-request-payment-source.md deleted file mode 100644 index 45462d2..0000000 --- a/doc/models/order-capture-request-payment-source.md +++ /dev/null @@ -1,109 +0,0 @@ - -# Order Capture Request Payment Source - -The payment source definition. - -## Structure - -`OrderCaptureRequestPaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| -| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | -| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | -| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | -| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | -| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "apple_pay": { - "id": "id0", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - }, - "decrypted_token": { - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id6", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "key1": "val1", - "key2": "val2" - }, - "decrypted_token": { - "message_id": "message_id0", - "message_expiration": "message_expiration2", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0" - } - } -} -``` - diff --git a/doc/models/order-capture-request.md b/doc/models/order-capture-request.md deleted file mode 100644 index f688224..0000000 --- a/doc/models/order-capture-request.md +++ /dev/null @@ -1,106 +0,0 @@ - -# Order Capture Request - -Completes an capture payment for an order. - -## Structure - -`OrderCaptureRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payment_source` | [`OrderCaptureRequestPaymentSource`](../../doc/models/order-capture-request-payment-source.md) | Optional | The payment source definition. | - -## Example (as JSON) - -```json -{ - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "apple_pay": { - "id": "id0", - "name": "name0", - "email_address": "email_address8", - "phone_number": { - "national_number": "national_number6" - }, - "decrypted_token": { - "transaction_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "tokenized_card": { - "name": "name4", - "number": "number2", - "expiry": "expiry2", - "card_type": "HIPER", - "type": "UNKNOWN" - }, - "device_manufacturer_id": "device_manufacturer_id6", - "payment_data_type": "3DSECURE", - "payment_data": { - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0", - "emv_data": "emv_data0", - "pin": "pin4" - } - } - }, - "google_pay": { - "name": "name8", - "email_address": "email_address6", - "phone_number": { - "country_code": "country_code2", - "national_number": "national_number6" - }, - "card": { - "key1": "val1", - "key2": "val2" - }, - "decrypted_token": { - "message_id": "message_id0", - "message_expiration": "message_expiration2", - "payment_method": "CARD", - "authentication_method": "PAN_ONLY", - "cryptogram": "cryptogram6", - "eci_indicator": "eci_indicator0" - } - } - } -} -``` - diff --git a/doc/models/order-confirm-application-context.md b/doc/models/order-confirm-application-context.md deleted file mode 100644 index 63608b8..0000000 --- a/doc/models/order-confirm-application-context.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Order Confirm Application Context - -Customizes the payer confirmation experience. - -## Structure - -`OrderConfirmApplicationContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | Label to present to your payer as part of the PayPal hosted web experience.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `return_url` | `String` | Optional | The URL where the customer is redirected after the customer approves the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | -| `cancel_url` | `String` | Optional | The URL where the customer is redirected after the customer cancels the payment.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `4000` | -| `stored_payment_source` | [`StoredPaymentSource`](../../doc/models/stored-payment-source.md) | Optional | Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
| - -## Example (as JSON) - -```json -{ - "brand_name": "brand_name6", - "locale": "locale0", - "return_url": "return_url8", - "cancel_url": "cancel_url0", - "stored_payment_source": { - "payment_initiator": "CUSTOMER", - "payment_type": "RECURRING", - "usage": "FIRST", - "previous_network_transaction_reference": { - "id": "id6", - "date": "date2", - "network": "VISA", - "acquirer_reference_number": "acquirer_reference_number8" - } - } -} -``` - diff --git a/doc/models/order-request.md b/doc/models/order-request.md deleted file mode 100644 index 441a391..0000000 --- a/doc/models/order-request.md +++ /dev/null @@ -1,190 +0,0 @@ - -# Order Request - -The order request details. - -## Structure - -`OrderRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Required | The intent to either capture payment immediately or authorize a payment for an order after order creation. | -| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | -| `purchase_units` | [`Array`](../../doc/models/purchase-unit-request.md) | Required | An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | -| `payment_source` | [`PaymentSource`](../../doc/models/payment-source.md) | Optional | The payment source definition. | -| `application_context` | [`OrderApplicationContext`](../../doc/models/order-application-context.md) | Optional | Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
| - -## Example (as JSON) - -```json -{ - "intent": "CAPTURE", - "purchase_units": [ - { - "reference_id": "reference_id4", - "amount": { - "currency_code": "currency_code6", - "value": "value0", - "breakdown": { - "item_total": { - "currency_code": "currency_code0", - "value": "value6" - }, - "shipping": { - "currency_code": "currency_code0", - "value": "value6" - }, - "handling": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - }, - "insurance": { - "currency_code": "currency_code2", - "value": "value8" - } - } - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "disbursement_mode": "INSTANT", - "payee_pricing_tier_id": "payee_pricing_tier_id2", - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" - }, - "description": "description6", - "custom_id": "custom_id4" - } - ], - "payer": { - "email_address": "email_address6", - "payer_id": "payer_id6", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date4" - }, - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "bancontact": { - "name": "name0", - "country_code": "country_code0", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } - }, - "blik": { - "name": "name2", - "country_code": "country_code2", - "email": "email4", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - }, - "level_0": { - "auth_code": "auth_code8" - }, - "one_click": { - "auth_code": "auth_code0", - "consumer_reference": "consumer_reference2", - "alias_label": "alias_label6", - "alias_key": "alias_key4" - } - } - }, - "application_context": { - "brand_name": "brand_name8", - "locale": "locale2", - "landing_page": "BILLING", - "shipping_preference": "SET_PROVIDED_ADDRESS", - "user_action": "CONTINUE" - } -} -``` - diff --git a/doc/models/order-status.md b/doc/models/order-status.md deleted file mode 100644 index 64f7c6f..0000000 --- a/doc/models/order-status.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Order Status - -The order status. - -## Enumeration - -`OrderStatus` - -## Fields - -| Name | -| --- | -| `CREATED` | -| `SAVED` | -| `APPROVED` | -| `VOIDED` | -| `COMPLETED` | -| `PAYER_ACTION_REQUIRED` | - diff --git a/doc/models/order-tracker-item.md b/doc/models/order-tracker-item.md deleted file mode 100644 index 2a08403..0000000 --- a/doc/models/order-tracker-item.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Order Tracker Item - -The details of the items in the shipment. - -## Structure - -`OrderTrackerItem` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The item name or title.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `quantity` | `String` | Optional | The item quantity. Must be a whole number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `10`, *Pattern*: `^[1-9][0-9]{0,9}$` | -| `sku` | `String` | Optional | The stock keeping unit (SKU) for the item. This can contain unicode characters.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `url` | `String` | Optional | The URL to the item being purchased. Visible to buyer and used in buyer experiences.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048` | -| `image_url` | `String` | Optional | The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2048`, *Pattern*: `^(https:)([/\|.\|\w\|\s\|-])*\.(?:jpg\|gif\|png\|jpeg\|JPG\|GIF\|PNG\|JPEG)` | -| `upc` | [`UniversalProductCode`](../../doc/models/universal-product-code.md) | Optional | The Universal Product Code of the item. | - -## Example (as JSON) - -```json -{ - "name": "name6", - "quantity": "quantity2", - "sku": "sku2", - "url": "url0", - "image_url": "image_url2" -} -``` - diff --git a/doc/models/order-tracker-request.md b/doc/models/order-tracker-request.md deleted file mode 100644 index 2fd4c7e..0000000 --- a/doc/models/order-tracker-request.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Order Tracker Request - -The tracking details of an order. - -## Structure - -`OrderTrackerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tracking_number` | `String` | Optional | The tracking number for the shipment. This property supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | -| `carrier` | [`ShipmentCarrier`](../../doc/models/shipment-carrier.md) | Optional | The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9A-Z_]+$` | -| `carrier_name_other` | `String` | Optional | The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64` | -| `capture_id` | `String` | Required | The PayPal capture ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[a-zA-Z0-9]*$` | -| `notify_payer` | `TrueClass \| FalseClass` | Optional | If true, sends an email notification to the payer of the PayPal transaction. The email contains the tracking information that was uploaded through the API.
**Default**: `false` | -| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. | - -## Example (as JSON) - -```json -{ - "capture_id": "capture_id0", - "notify_payer": false, - "tracking_number": "tracking_number6", - "carrier": "SNTGLOBAL_API", - "carrier_name_other": "carrier_name_other0", - "items": [ - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - }, - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - } - ] -} -``` - diff --git a/doc/models/order-tracker-response.md b/doc/models/order-tracker-response.md deleted file mode 100644 index 9ce7c54..0000000 --- a/doc/models/order-tracker-response.md +++ /dev/null @@ -1,63 +0,0 @@ - -# Order Tracker Response - -The tracking response on creation of tracker. - -## Structure - -`OrderTrackerResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The tracker id. | -| `status` | [`OrderTrackerStatus`](../../doc/models/order-tracker-status.md) | Optional | The status of the item shipment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9A-Z_]+$` | -| `items` | [`Array`](../../doc/models/order-tracker-item.md) | Optional | An array of details of items in the shipment. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "id": "id2", - "status": "CANCELLED", - "items": [ - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - }, - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - } - ], - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "create_time": "create_time8" -} -``` - diff --git a/doc/models/order-tracker-status.md b/doc/models/order-tracker-status.md deleted file mode 100644 index ce13a7a..0000000 --- a/doc/models/order-tracker-status.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Order Tracker Status - -The status of the item shipment. - -## Enumeration - -`OrderTrackerStatus` - -## Fields - -| Name | -| --- | -| `CANCELLED` | -| `SHIPPED` | - diff --git a/doc/models/order.md b/doc/models/order.md deleted file mode 100644 index 30a2fe5..0000000 --- a/doc/models/order.md +++ /dev/null @@ -1,77 +0,0 @@ - -# Order - -The order details. - -## Structure - -`Order` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `id` | `String` | Optional | The ID of the order. | -| `payment_source` | [`PaymentSourceResponse`](../../doc/models/payment-source-response.md) | Optional | The payment source used to fund the payment. | -| `intent` | [`CheckoutPaymentIntent`](../../doc/models/checkout-payment-intent.md) | Optional | The intent to either capture payment immediately or authorize a payment for an order after order creation. | -| `processing_instruction` | [`ProcessingInstruction`](../../doc/models/processing-instruction.md) | Optional | The instruction to process an order.
**Default**: `ProcessingInstruction::NO_INSTRUCTION`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9A-Z_]+$` | -| `payer` | [`Payer`](../../doc/models/payer.md) | Optional | - | -| `purchase_units` | [`Array`](../../doc/models/purchase-unit.md) | Optional | An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | -| `status` | [`OrderStatus`](../../doc/models/order-status.md) | Optional | The order status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. | - -## Example (as JSON) - -```json -{ - "processing_instruction": "NO_INSTRUCTION", - "create_time": "create_time8", - "update_time": "update_time4", - "id": "id2", - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "available_networks": [ - "DELTA" - ], - "type": "UNKNOWN" - }, - "paypal": { - "email_address": "email_address0", - "account_id": "account_id4", - "account_status": "VERIFIED", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_type": "FAX" - }, - "bancontact": { - "name": "name0", - "country_code": "country_code0", - "bic": "bic2", - "iban_last_chars": "iban_last_chars8", - "card_last_digits": "card_last_digits4" - }, - "blik": { - "name": "name2", - "country_code": "country_code2", - "email": "email4", - "one_click": { - "consumer_reference": "consumer_reference2" - } - }, - "eps": { - "name": "name6", - "country_code": "country_code6", - "bic": "bic8" - } - }, - "intent": "CAPTURE" -} -``` - diff --git a/doc/models/p24-payment-object.md b/doc/models/p24-payment-object.md deleted file mode 100644 index e127a9d..0000000 --- a/doc/models/p24-payment-object.md +++ /dev/null @@ -1,32 +0,0 @@ - -# P24 Payment Object - -Information used to pay using P24(Przelewy24). - -## Structure - -`P24PaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `payment_descriptor` | `String` | Optional | P24 generated payment description.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | -| `method_id` | `String` | Optional | Numeric identifier of the payment scheme or bank used for the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300` | -| `method_description` | `String` | Optional | Friendly name of the payment scheme or bank used for the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `2000` | - -## Example (as JSON) - -```json -{ - "name": "name4", - "email": "email2", - "country_code": "country_code4", - "payment_descriptor": "payment_descriptor8", - "method_id": "method_id8" -} -``` - diff --git a/doc/models/p24-payment-request.md b/doc/models/p24-payment-request.md deleted file mode 100644 index ae8f394..0000000 --- a/doc/models/p24-payment-request.md +++ /dev/null @@ -1,35 +0,0 @@ - -# P24 Payment Request - -Information needed to pay using P24 (Przelewy24). - -## Structure - -`P24PaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `email` | `String` | Required | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `^(?:[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\|\[(?:(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]\|2[0-4][0-9]\|[01]?[0-9][0-9]?\|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name6", - "email": "email0", - "country_code": "country_code6", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/pa-res-status.md b/doc/models/pa-res-status.md deleted file mode 100644 index f1a5579..0000000 --- a/doc/models/pa-res-status.md +++ /dev/null @@ -1,22 +0,0 @@ - -# PA Res Status - -Transactions status result identifier. The outcome of the issuer's authentication. - -## Enumeration - -`PAResStatus` - -## Fields - -| Name | -| --- | -| `Y` | -| `N` | -| `U` | -| `A` | -| `C` | -| `R` | -| `D` | -| `I` | - diff --git a/doc/models/patch-op.md b/doc/models/patch-op.md deleted file mode 100644 index e8ec8f7..0000000 --- a/doc/models/patch-op.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Patch Op - -The operation. - -## Enumeration - -`PatchOp` - -## Fields - -| Name | -| --- | -| `ADD` | -| `REMOVE` | -| `REPLACE` | -| `MOVE` | -| `COPY` | -| `TEST` | - diff --git a/doc/models/patch.md b/doc/models/patch.md deleted file mode 100644 index 69a98fe..0000000 --- a/doc/models/patch.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Patch - -The JSON patch object to apply partial updates to resources. - -## Structure - -`Patch` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `op` | [`PatchOp`](../../doc/models/patch-op.md) | Required | The operation. | -| `path` | `String` | Optional | The JSON Pointer to the target document location at which to complete the operation. | -| `value` | `Object` | Optional | The value to apply. The remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified. | -| `from` | `String` | Optional | The JSON Pointer to the target document location from which to move the value. Required for the move operation. | - -## Example (as JSON) - -```json -{ - "op": "add", - "path": "path6", - "value": { - "key1": "val1", - "key2": "val2" - }, - "from": "from0" -} -``` - diff --git a/doc/models/pay-pal-experience-landing-page.md b/doc/models/pay-pal-experience-landing-page.md deleted file mode 100644 index 76138a3..0000000 --- a/doc/models/pay-pal-experience-landing-page.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Pay Pal Experience Landing Page - -The type of landing page to show on the PayPal site for customer checkout. - -## Enumeration - -`PayPalExperienceLandingPage` - -## Fields - -| Name | -| --- | -| `LOGIN` | -| `GUEST_CHECKOUT` | -| `NO_PREFERENCE` | - diff --git a/doc/models/pay-pal-experience-user-action.md b/doc/models/pay-pal-experience-user-action.md deleted file mode 100644 index b83c10b..0000000 --- a/doc/models/pay-pal-experience-user-action.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Pay Pal Experience User Action - -Configures a Continue or Pay Now checkout flow. - -## Enumeration - -`PayPalExperienceUserAction` - -## Fields - -| Name | -| --- | -| `CONTINUE` | -| `PAY_NOW` | - diff --git a/doc/models/pay-pal-payment-token-customer-type.md b/doc/models/pay-pal-payment-token-customer-type.md deleted file mode 100644 index 1496795..0000000 --- a/doc/models/pay-pal-payment-token-customer-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Pay Pal Payment Token Customer Type - -The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. - -## Enumeration - -`PayPalPaymentTokenCustomerType` - -## Fields - -| Name | -| --- | -| `CONSUMER` | -| `BUSINESS` | - diff --git a/doc/models/pay-pal-payment-token-usage-pattern.md b/doc/models/pay-pal-payment-token-usage-pattern.md deleted file mode 100644 index ff90cbb..0000000 --- a/doc/models/pay-pal-payment-token-usage-pattern.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Pay Pal Payment Token Usage Pattern - -Expected business/pricing model for the billing agreement. - -## Enumeration - -`PayPalPaymentTokenUsagePattern` - -## Fields - -| Name | -| --- | -| `IMMEDIATE` | -| `DEFERRED` | -| `RECURRING_PREPAID` | -| `RECURRING_POSTPAID` | -| `THRESHOLD_PREPAID` | -| `THRESHOLD_POSTPAID` | - diff --git a/doc/models/pay-pal-payment-token-usage-type.md b/doc/models/pay-pal-payment-token-usage-type.md deleted file mode 100644 index c725536..0000000 --- a/doc/models/pay-pal-payment-token-usage-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Pay Pal Payment Token Usage Type - -The usage type associated with the PayPal payment token. - -## Enumeration - -`PayPalPaymentTokenUsageType` - -## Fields - -| Name | -| --- | -| `MERCHANT` | -| `PLATFORM` | - diff --git a/doc/models/pay-pal-payment-token.md b/doc/models/pay-pal-payment-token.md deleted file mode 100644 index 1defe7b..0000000 --- a/doc/models/pay-pal-payment-token.md +++ /dev/null @@ -1,49 +0,0 @@ - -# Pay Pal Payment Token - -## Structure - -`PayPalPaymentToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | -| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | -| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `account_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `phone_number` | [`Phone`](../../doc/models/phone.md) | Optional | The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | - -## Example (as JSON) - -```json -{ - "permit_multiple_payment_tokens": false, - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "usage_type": "usage_type6", - "customer_type": "customer_type0" -} -``` - diff --git a/doc/models/pay-pal-wallet-account-verification-status.md b/doc/models/pay-pal-wallet-account-verification-status.md deleted file mode 100644 index 1d3724b..0000000 --- a/doc/models/pay-pal-wallet-account-verification-status.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Pay Pal Wallet Account Verification Status - -The account status indicates whether the buyer has verified the financial details associated with their PayPal account. - -## Enumeration - -`PayPalWalletAccountVerificationStatus` - -## Fields - -| Name | -| --- | -| `VERIFIED` | -| `UNVERIFIED` | - diff --git a/doc/models/pay-pal-wallet-attributes-response.md b/doc/models/pay-pal-wallet-attributes-response.md deleted file mode 100644 index 22d2826..0000000 --- a/doc/models/pay-pal-wallet-attributes-response.md +++ /dev/null @@ -1,75 +0,0 @@ - -# Pay Pal Wallet Attributes Response - -Additional attributes associated with the use of a PayPal Wallet. - -## Structure - -`PayPalWalletAttributesResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault` | [`PayPalWalletVaultResponse`](../../doc/models/pay-pal-wallet-vault-response.md) | Optional | The details about a saved PayPal Wallet payment source. | -| `cobranded_cards` | [`Array`](../../doc/models/cobranded-card.md) | Optional | An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s).
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `25` | - -## Example (as JSON) - -```json -{ - "vault": { - "id": "id6", - "status": "APPROVED", - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "customer": { - "id": "id0", - "email_address": "email_address2", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "merchant_customer_id": "merchant_customer_id2" - } - }, - "cobranded_cards": [ - { - "labels": [ - "labels4", - "labels3" - ], - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - }, - { - "labels": [ - "labels4", - "labels3" - ], - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - } - ] -} -``` - diff --git a/doc/models/pay-pal-wallet-attributes.md b/doc/models/pay-pal-wallet-attributes.md deleted file mode 100644 index 27d6caf..0000000 --- a/doc/models/pay-pal-wallet-attributes.md +++ /dev/null @@ -1,42 +0,0 @@ - -# Pay Pal Wallet Attributes - -Additional attributes associated with the use of this PayPal Wallet. - -## Structure - -`PayPalWalletAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`PayPalWalletCustomerRequest`](../../doc/models/pay-pal-wallet-customer-request.md) | Optional | - | -| `vault` | [`PayPalWalletVaultInstruction`](../../doc/models/pay-pal-wallet-vault-instruction.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "email_address": "email_address2", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "merchant_customer_id": "merchant_customer_id2" - }, - "vault": { - "store_in_vault": "ON_SUCCESS", - "description": "description6", - "usage_pattern": "THRESHOLD_PREPAID", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "permit_multiple_payment_tokens": false - } -} -``` - diff --git a/doc/models/pay-pal-wallet-customer-request.md b/doc/models/pay-pal-wallet-customer-request.md deleted file mode 100644 index 7e99cd0..0000000 --- a/doc/models/pay-pal-wallet-customer-request.md +++ /dev/null @@ -1,32 +0,0 @@ - -# Pay Pal Wallet Customer Request - -## Structure - -`PayPalWalletCustomerRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | - -## Example (as JSON) - -```json -{ - "id": "id2", - "email_address": "email_address0", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "merchant_customer_id": "merchant_customer_id4" -} -``` - diff --git a/doc/models/pay-pal-wallet-customer.md b/doc/models/pay-pal-wallet-customer.md deleted file mode 100644 index a68b767..0000000 --- a/doc/models/pay-pal-wallet-customer.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Pay Pal Wallet Customer - -The details about a customer in PayPal's system of record. - -## Structure - -`PayPalWalletCustomer` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `merchant_customer_id` | `String` | Optional | Merchants and partners may already have a data-store where their customer information is persisted. Use merchant_customer_id to associate the PayPal-generated customer.id to your representation of a customer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `64`, *Pattern*: `^[0-9a-zA-Z-_.^*$@#]+$` | - -## Example (as JSON) - -```json -{ - "id": "id8", - "email_address": "email_address4", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "merchant_customer_id": "merchant_customer_id0" -} -``` - diff --git a/doc/models/pay-pal-wallet-experience-context.md b/doc/models/pay-pal-wallet-experience-context.md deleted file mode 100644 index 8b5c348..0000000 --- a/doc/models/pay-pal-wallet-experience-context.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Pay Pal Wallet Experience Context - -Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
- -## Structure - -`PayPalWalletExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | -| `return_url` | `String` | Optional | Describes the URL. | -| `cancel_url` | `String` | Optional | Describes the URL. | -| `landing_page` | [`PayPalExperienceLandingPage`](../../doc/models/pay-pal-experience-landing-page.md) | Optional | The type of landing page to show on the PayPal site for customer checkout.
**Default**: `PayPalExperienceLandingPage::NO_PREFERENCE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `13`, *Pattern*: `^[0-9A-Z_]+$` | -| `user_action` | [`PayPalExperienceUserAction`](../../doc/models/pay-pal-experience-user-action.md) | Optional | Configures a Continue or Pay Now checkout flow.
**Default**: `PayPalExperienceUserAction::CONTINUE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `8`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_method_preference` | [`PayeePaymentMethodPreference`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "landing_page": "NO_PREFERENCE", - "user_action": "CONTINUE", - "payment_method_preference": "UNRESTRICTED", - "brand_name": "brand_name6", - "locale": "locale0", - "return_url": "return_url8", - "cancel_url": "cancel_url0" -} -``` - diff --git a/doc/models/pay-pal-wallet-response.md b/doc/models/pay-pal-wallet-response.md deleted file mode 100644 index f97b0bd..0000000 --- a/doc/models/pay-pal-wallet-response.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Pay Pal Wallet Response - -The PayPal Wallet response. - -## Structure - -`PayPalWalletResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `account_id` | `String` | Optional | The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `account_status` | [`PayPalWalletAccountVerificationStatus`](../../doc/models/pay-pal-wallet-account-verification-status.md) | Optional | The account status indicates whether the buyer has verified the financial details associated with their PayPal account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone_type` | [`PhoneType`](../../doc/models/phone-type.md) | Optional | The phone type. | -| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | -| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `attributes` | [`PayPalWalletAttributesResponse`](../../doc/models/pay-pal-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a PayPal Wallet. | - -## Example (as JSON) - -```json -{ - "email_address": "email_address8", - "account_id": "account_id2", - "account_status": "VERIFIED", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_type": "OTHER" -} -``` - diff --git a/doc/models/pay-pal-wallet-vault-instruction.md b/doc/models/pay-pal-wallet-vault-instruction.md deleted file mode 100644 index 4c91ad8..0000000 --- a/doc/models/pay-pal-wallet-vault-instruction.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Pay Pal Wallet Vault Instruction - -## Structure - -`PayPalWalletVaultInstruction` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Optional | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `description` | `String` | Optional | The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` | -| `usage_pattern` | [`PayPalPaymentTokenUsagePattern`](../../doc/models/pay-pal-payment-token-usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30` | -| `usage_type` | [`PayPalPaymentTokenUsageType`](../../doc/models/pay-pal-payment-token-usage-type.md) | Required | The usage type associated with the PayPal payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | [`PayPalPaymentTokenCustomerType`](../../doc/models/pay-pal-payment-token-customer-type.md) | Optional | The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Default**: `PayPalPaymentTokenCustomerType::CONSUMER`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "permit_multiple_payment_tokens": false, - "store_in_vault": "ON_SUCCESS", - "description": "description4", - "usage_pattern": "RECURRING_PREPAID" -} -``` - diff --git a/doc/models/pay-pal-wallet-vault-response.md b/doc/models/pay-pal-wallet-vault-response.md deleted file mode 100644 index 932c1fc..0000000 --- a/doc/models/pay-pal-wallet-vault-response.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Pay Pal Wallet Vault Response - -The details about a saved PayPal Wallet payment source. - -## Structure - -`PayPalWalletVaultResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `status` | [`PayPalWalletVaultStatus`](../../doc/models/pay-pal-wallet-vault-status.md) | Optional | The vault status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | -| `customer` | [`PayPalWalletCustomer`](../../doc/models/pay-pal-wallet-customer.md) | Optional | The details about a customer in PayPal's system of record. | - -## Example (as JSON) - -```json -{ - "id": "id0", - "status": "CREATED", - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "customer": { - "id": "id0", - "email_address": "email_address2", - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "merchant_customer_id": "merchant_customer_id2" - } -} -``` - diff --git a/doc/models/pay-pal-wallet-vault-status.md b/doc/models/pay-pal-wallet-vault-status.md deleted file mode 100644 index 7e9a6b9..0000000 --- a/doc/models/pay-pal-wallet-vault-status.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Pay Pal Wallet Vault Status - -The vault status. - -## Enumeration - -`PayPalWalletVaultStatus` - -## Fields - -| Name | -| --- | -| `VAULTED` | -| `CREATED` | -| `APPROVED` | - diff --git a/doc/models/pay-pal-wallet.md b/doc/models/pay-pal-wallet.md deleted file mode 100644 index aadef7f..0000000 --- a/doc/models/pay-pal-wallet.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Pay Pal Wallet - -A resource that identifies a PayPal Wallet is used for payment. - -## Structure - -`PayPalWallet` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | -| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `attributes` | [`PayPalWalletAttributes`](../../doc/models/pay-pal-wallet-attributes.md) | Optional | Additional attributes associated with the use of this PayPal Wallet. | -| `experience_context` | [`PayPalWalletExperienceContext`](../../doc/models/pay-pal-wallet-experience-context.md) | Optional | Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
| -| `billing_agreement_id` | `String` | Optional | The PayPal billing agreement ID. References an approved recurring payment for goods or services.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `128`, *Pattern*: `^[a-zA-Z0-9-]+$` | - -## Example (as JSON) - -```json -{ - "vault_id": "vault_id8", - "email_address": "email_address8", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date4" -} -``` - diff --git a/doc/models/payee-base.md b/doc/models/payee-base.md deleted file mode 100644 index 62e8b45..0000000 --- a/doc/models/payee-base.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Payee Base - -The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. - -## Structure - -`PayeeBase` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `merchant_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | - -## Example (as JSON) - -```json -{ - "email_address": "email_address0", - "merchant_id": "merchant_id2" -} -``` - diff --git a/doc/models/payee-payment-method-preference.md b/doc/models/payee-payment-method-preference.md deleted file mode 100644 index b7df62b..0000000 --- a/doc/models/payee-payment-method-preference.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Payee Payment Method Preference - -The merchant-preferred payment methods. - -## Enumeration - -`PayeePaymentMethodPreference` - -## Fields - -| Name | -| --- | -| `UNRESTRICTED` | -| `IMMEDIATE_PAYMENT_REQUIRED` | - diff --git a/doc/models/payee.md b/doc/models/payee.md deleted file mode 100644 index 91275e3..0000000 --- a/doc/models/payee.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Payee - -The merchant who receives the funds and fulfills the order. The merchant is also known as the payee., The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. - -## Structure - -`Payee` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `merchant_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | - -## Example (as JSON) - -```json -{ - "email_address": "email_address6", - "merchant_id": "merchant_id6" -} -``` - diff --git a/doc/models/payer-base.md b/doc/models/payer-base.md deleted file mode 100644 index f92dfdc..0000000 --- a/doc/models/payer-base.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Payer Base - -The customer who approves and pays for the order. The customer is also known as the payer. - -## Structure - -`PayerBase` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | - -## Example (as JSON) - -```json -{ - "email_address": "email_address2", - "payer_id": "payer_id2" -} -``` - diff --git a/doc/models/payer.md b/doc/models/payer.md deleted file mode 100644 index 9cb8976..0000000 --- a/doc/models/payer.md +++ /dev/null @@ -1,39 +0,0 @@ - -# Payer - -## Structure - -`Payer` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `birth_date` | `String` | Optional | The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years.
**Constraints**: *Minimum Length*: `10`, *Maximum Length*: `10`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])$` | -| `tax_info` | [`TaxInfo`](../../doc/models/tax-info.md) | Optional | The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "email_address": "email_address8", - "payer_id": "payer_id8", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date6" -} -``` - diff --git a/doc/models/payment-advice-code.md b/doc/models/payment-advice-code.md deleted file mode 100644 index df4c7e3..0000000 --- a/doc/models/payment-advice-code.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Payment Advice Code - -The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes. - -## Enumeration - -`PaymentAdviceCode` - -## Fields - -| Name | -| --- | -| `ENUM_01` | -| `ENUM_02` | -| `ENUM_03` | -| `ENUM_21` | - diff --git a/doc/models/payment-authorization.md b/doc/models/payment-authorization.md deleted file mode 100644 index 02c5bf9..0000000 --- a/doc/models/payment-authorization.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Payment Authorization - -The authorized payment transaction. - -## Structure - -`PaymentAuthorization` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`AuthorizationStatus`](../../doc/models/authorization-status.md) | Optional | The status for the authorized payment. | -| `status_details` | [`AuthorizationStatusDetails`](../../doc/models/authorization-status-details.md) | Optional | The details of the authorized payment status. | -| `id` | `String` | Optional | The PayPal-generated ID for the authorized payment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Maximum Length*: `127` | -| `network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | -| `seller_protection` | [`SellerProtection`](../../doc/models/seller-protection.md) | Optional | The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `expiration_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `supplementary_data` | [`PaymentSupplementaryData`](../../doc/models/payment-supplementary-data.md) | Optional | The supplementary data. | -| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | - -## Example (as JSON) - -```json -{ - "status": "VOIDED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id0", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id0" -} -``` - diff --git a/doc/models/payment-collection.md b/doc/models/payment-collection.md deleted file mode 100644 index bf878d1..0000000 --- a/doc/models/payment-collection.md +++ /dev/null @@ -1,114 +0,0 @@ - -# Payment Collection - -The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds. - -## Structure - -`PaymentCollection` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `authorizations` | [`Array`](../../doc/models/authorization-with-additional-data.md) | Optional | An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments. | -| `captures` | [`Array`](../../doc/models/capture.md) | Optional | An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments. | -| `refunds` | [`Array`](../../doc/models/refund.md) | Optional | An array of refunds for a purchase unit. A purchase unit can have zero or more refunds. | - -## Example (as JSON) - -```json -{ - "authorizations": [ - { - "status": "DENIED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id2", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id2" - }, - { - "status": "DENIED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id2", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id2" - }, - { - "status": "DENIED", - "status_details": { - "reason": "PENDING_REVIEW" - }, - "id": "id2", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id2" - } - ], - "captures": [ - { - "status": "REFUNDED", - "status_details": { - "reason": "VERIFICATION_REQUIRED" - }, - "id": "id4", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id4" - }, - { - "status": "REFUNDED", - "status_details": { - "reason": "VERIFICATION_REQUIRED" - }, - "id": "id4", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id4" - } - ], - "refunds": [ - { - "status": "CANCELLED", - "status_details": { - "reason": "ECHECK" - }, - "id": "id8", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id8" - }, - { - "status": "CANCELLED", - "status_details": { - "reason": "ECHECK" - }, - "id": "id8", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id8" - } - ] -} -``` - diff --git a/doc/models/payment-initiator.md b/doc/models/payment-initiator.md deleted file mode 100644 index 79aed2b..0000000 --- a/doc/models/payment-initiator.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Payment Initiator - -The person or party who initiated or triggered the payment. - -## Enumeration - -`PaymentInitiator` - -## Fields - -| Name | -| --- | -| `CUSTOMER` | -| `MERCHANT` | - diff --git a/doc/models/payment-instruction.md b/doc/models/payment-instruction.md deleted file mode 100644 index d95eeb2..0000000 --- a/doc/models/payment-instruction.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Payment Instruction - -Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. - -## Structure - -`PaymentInstruction` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Complete Payments Platform for Marketplaces and Platforms capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | -| `disbursement_mode` | [`DisbursementMode`](../../doc/models/disbursement-mode.md) | Optional | The funds that are held on behalf of the merchant.
**Default**: `DisbursementMode::INSTANT`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `16`, *Pattern*: `^[A-Z_]+$` | -| `payee_pricing_tier_id` | `String` | Optional | This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^.*$` | -| `payee_receivable_fx_rate_id` | `String` | Optional | FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000`, *Pattern*: `^.*$` | - -## Example (as JSON) - -```json -{ - "disbursement_mode": "INSTANT", - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "payee_pricing_tier_id": "payee_pricing_tier_id6", - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id4" -} -``` - diff --git a/doc/models/payment-method-preference.md b/doc/models/payment-method-preference.md deleted file mode 100644 index 1333deb..0000000 --- a/doc/models/payment-method-preference.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Payment Method Preference - -The customer and merchant payment preferences. - -## Structure - -`PaymentMethodPreference` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payee_preferred` | [`PayeePaymentMethodPreference`](../../doc/models/payee-payment-method-preference.md) | Optional | The merchant-preferred payment methods.
**Default**: `PayeePaymentMethodPreference::UNRESTRICTED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `standard_entry_class_code` | [`StandardEntryClassCode`](../../doc/models/standard-entry-class-code.md) | Optional | NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes.
**Default**: `StandardEntryClassCode::WEB`
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `255` | - -## Example (as JSON) - -```json -{ - "payee_preferred": "UNRESTRICTED", - "standard_entry_class_code": "WEB" -} -``` - diff --git a/doc/models/payment-source-response.md b/doc/models/payment-source-response.md deleted file mode 100644 index 2716433..0000000 --- a/doc/models/payment-source-response.md +++ /dev/null @@ -1,74 +0,0 @@ - -# Payment Source Response - -The payment source used to fund the payment. - -## Structure - -`PaymentSourceResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardResponse`](../../doc/models/card-response.md) | Optional | The payment card to use to fund a payment. Card can be a credit or debit card. | -| `paypal` | [`PayPalWalletResponse`](../../doc/models/pay-pal-wallet-response.md) | Optional | The PayPal Wallet response. | -| `bancontact` | [`BancontactPaymentObject`](../../doc/models/bancontact-payment-object.md) | Optional | Information used to pay Bancontact. | -| `blik` | [`BLIKPaymentObject`](../../doc/models/blik-payment-object.md) | Optional | Information used to pay using BLIK. | -| `eps` | [`EPSPaymentObject`](../../doc/models/eps-payment-object.md) | Optional | Information used to pay using eps. | -| `giropay` | [`GiropayPaymentObject`](../../doc/models/giropay-payment-object.md) | Optional | Information needed to pay using giropay. | -| `ideal` | [`IDEALPaymentObject`](../../doc/models/ideal-payment-object.md) | Optional | Information used to pay using iDEAL. | -| `mybank` | [`MyBankPaymentObject`](../../doc/models/my-bank-payment-object.md) | Optional | Information used to pay using MyBank. | -| `p_24` | [`P24PaymentObject`](../../doc/models/p24-payment-object.md) | Optional | Information used to pay using P24(Przelewy24). | -| `sofort` | [`SofortPaymentObject`](../../doc/models/sofort-payment-object.md) | Optional | Information used to pay using Sofort. | -| `trustly` | [`TrustlyPaymentObject`](../../doc/models/trustly-payment-object.md) | Optional | Information needed to pay using Trustly. | -| `apple_pay` | [`ApplePayPaymentObject`](../../doc/models/apple-pay-payment-object.md) | Optional | Information needed to pay using ApplePay. | -| `google_pay` | [`GooglePayWalletResponse`](../../doc/models/google-pay-wallet-response.md) | Optional | Google Pay Wallet payment data. | -| `venmo` | [`VenmoWalletResponse`](../../doc/models/venmo-wallet-response.md) | Optional | Venmo wallet response. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "available_networks": [ - "DELTA" - ], - "type": "UNKNOWN" - }, - "paypal": { - "email_address": "email_address0", - "account_id": "account_id4", - "account_status": "VERIFIED", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_type": "FAX" - }, - "bancontact": { - "name": "name0", - "country_code": "country_code0", - "bic": "bic2", - "iban_last_chars": "iban_last_chars8", - "card_last_digits": "card_last_digits4" - }, - "blik": { - "name": "name2", - "country_code": "country_code2", - "email": "email4", - "one_click": { - "consumer_reference": "consumer_reference2" - } - }, - "eps": { - "name": "name6", - "country_code": "country_code6", - "bic": "bic8" - } -} -``` - diff --git a/doc/models/payment-source.md b/doc/models/payment-source.md deleted file mode 100644 index b49e2ed..0000000 --- a/doc/models/payment-source.md +++ /dev/null @@ -1,101 +0,0 @@ - -# Payment Source - -The payment source definition. - -## Structure - -`PaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardRequest`](../../doc/models/card-request.md) | Optional | The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
| -| `token` | [`Token`](../../doc/models/token.md) | Optional | The tokenized payment source to fund a payment. | -| `paypal` | [`PayPalWallet`](../../doc/models/pay-pal-wallet.md) | Optional | A resource that identifies a PayPal Wallet is used for payment. | -| `bancontact` | [`BancontactPaymentRequest`](../../doc/models/bancontact-payment-request.md) | Optional | Information needed to pay using Bancontact. | -| `blik` | [`BLIKPaymentRequest`](../../doc/models/blik-payment-request.md) | Optional | Information needed to pay using BLIK. | -| `eps` | [`EPSPaymentRequest`](../../doc/models/eps-payment-request.md) | Optional | Information needed to pay using eps. | -| `giropay` | [`GiropayPaymentRequest`](../../doc/models/giropay-payment-request.md) | Optional | Information needed to pay using giropay. | -| `ideal` | [`IDEALPaymentRequest`](../../doc/models/ideal-payment-request.md) | Optional | Information needed to pay using iDEAL. | -| `mybank` | [`MyBankPaymentRequest`](../../doc/models/my-bank-payment-request.md) | Optional | Information needed to pay using MyBank. | -| `p_24` | [`P24PaymentRequest`](../../doc/models/p24-payment-request.md) | Optional | Information needed to pay using P24 (Przelewy24). | -| `sofort` | [`SofortPaymentRequest`](../../doc/models/sofort-payment-request.md) | Optional | Information needed to pay using Sofort. | -| `trustly` | [`TrustlyPaymentRequest`](../../doc/models/trustly-payment-request.md) | Optional | Information needed to pay using Trustly. | -| `apple_pay` | [`ApplePayRequest`](../../doc/models/apple-pay-request.md) | Optional | Information needed to pay using ApplePay. | -| `google_pay` | [`GooglePayRequest`](../../doc/models/google-pay-request.md) | Optional | Information needed to pay using Google Pay. | -| `venmo` | [`VenmoWalletRequest`](../../doc/models/venmo-wallet-request.md) | Optional | Information needed to pay using Venmo. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - }, - "paypal": { - "vault_id": "vault_id0", - "email_address": "email_address0", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone": { - "phone_type": "OTHER", - "phone_number": { - "national_number": "national_number6" - } - }, - "birth_date": "birth_date8" - }, - "bancontact": { - "name": "name0", - "country_code": "country_code0", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } - }, - "blik": { - "name": "name2", - "country_code": "country_code2", - "email": "email4", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - }, - "level_0": { - "auth_code": "auth_code8" - }, - "one_click": { - "auth_code": "auth_code0", - "consumer_reference": "consumer_reference2", - "alias_label": "alias_label6", - "alias_key": "alias_key4" - } - } -} -``` - diff --git a/doc/models/payment-supplementary-data.md b/doc/models/payment-supplementary-data.md deleted file mode 100644 index 7889100..0000000 --- a/doc/models/payment-supplementary-data.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Payment Supplementary Data - -The supplementary data. - -## Structure - -`PaymentSupplementaryData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `related_ids` | [`RelatedIdentifiers`](../../doc/models/related-identifiers.md) | Optional | Identifiers related to a specific resource. | - -## Example (as JSON) - -```json -{ - "related_ids": { - "order_id": "order_id2", - "authorization_id": "authorization_id0", - "capture_id": "capture_id0" - } -} -``` - diff --git a/doc/models/payment-token-request-card.md b/doc/models/payment-token-request-card.md deleted file mode 100644 index 9cfd67f..0000000 --- a/doc/models/payment-token-request-card.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Payment Token Request Card - -A Resource representing a request to vault a Card. - -## Structure - -`PaymentTokenRequestCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `network_transaction_reference` | `Object` | Optional | - | - -## Example (as JSON) - -```json -{ - "name": "name4", - "number": "number8", - "expiry": "expiry2", - "security_code": "security_code6", - "type": "DEBIT" -} -``` - diff --git a/doc/models/payment-token-request-payment-source.md b/doc/models/payment-token-request-payment-source.md deleted file mode 100644 index 8c2bc64..0000000 --- a/doc/models/payment-token-request-payment-source.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Payment Token Request Payment Source - -The payment method to vault with the instrument details. - -## Structure - -`PaymentTokenRequestPaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`PaymentTokenRequestCard`](../../doc/models/payment-token-request-card.md) | Optional | A Resource representing a request to vault a Card. | -| `token` | [`VaultTokenRequest`](../../doc/models/vault-token-request.md) | Optional | The Tokenized Payment Source representing a Request to Vault a Token. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "type": "UNKNOWN" - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - } -} -``` - diff --git a/doc/models/payment-token-request.md b/doc/models/payment-token-request.md deleted file mode 100644 index 1f27757..0000000 --- a/doc/models/payment-token-request.md +++ /dev/null @@ -1,40 +0,0 @@ - -# Payment Token Request - -Payment Token Request where the `source` defines the type of instrument to be stored. - -## Structure - -`PaymentTokenRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | -| `payment_source` | [`PaymentTokenRequestPaymentSource`](../../doc/models/payment-token-request-payment-source.md) | Required | The payment method to vault with the instrument details. | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "type": "UNKNOWN" - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - } - } -} -``` - diff --git a/doc/models/payment-token-response-payment-source.md b/doc/models/payment-token-response-payment-source.md deleted file mode 100644 index 5f239ad..0000000 --- a/doc/models/payment-token-response-payment-source.md +++ /dev/null @@ -1,119 +0,0 @@ - -# Payment Token Response Payment Source - -The vaulted payment method details. - -## Structure - -`PaymentTokenResponsePaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardPaymentToken`](../../doc/models/card-payment-token.md) | Optional | Full representation of a Card Payment Token including network token. | -| `paypal` | [`PayPalPaymentToken`](../../doc/models/pay-pal-payment-token.md) | Optional | - | -| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | -| `apple_pay` | [`ApplePayPaymentToken`](../../doc/models/apple-pay-payment-token.md) | Optional | A resource representing a response for Apple Pay. | -| `bank` | [`BankPaymentToken`](../../doc/models/bank-payment-token.md) | Optional | Full representation of a Bank Payment Token. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "apple_pay": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "bank": { - "ach_debit": { - "verification_status": "verification_status6" - }, - "sepa_debit": { - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } - } - } -} -``` - diff --git a/doc/models/payment-token-response.md b/doc/models/payment-token-response.md deleted file mode 100644 index 805fdae..0000000 --- a/doc/models/payment-token-response.md +++ /dev/null @@ -1,137 +0,0 @@ - -# Payment Token Response - -Full representation of a saved payment token. - -## Structure - -`PaymentTokenResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | -| `payment_source` | [`PaymentTokenResponsePaymentSource`](../../doc/models/payment-token-response-payment-source.md) | Optional | The vaulted payment method details. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | - -## Example (as JSON) - -```json -{ - "id": "id0", - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "apple_pay": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "type": "UNKNOWN", - "brand": "SYNCHRONY", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - } - }, - "bank": { - "ach_debit": { - "verification_status": "verification_status6" - }, - "sepa_debit": { - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } - } - } - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] -} -``` - diff --git a/doc/models/phone-number-with-country-code.md b/doc/models/phone-number-with-country-code.md deleted file mode 100644 index 2feab0b..0000000 --- a/doc/models/phone-number-with-country-code.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Phone Number With Country Code - -The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). - -## Structure - -`PhoneNumberWithCountryCode` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `country_code` | `String` | Required | The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3`, *Pattern*: `^[0-9]{1,3}?$` | -| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | - -## Example (as JSON) - -```json -{ - "country_code": "country_code4", - "national_number": "national_number8" -} -``` - diff --git a/doc/models/phone-number.md b/doc/models/phone-number.md deleted file mode 100644 index be51794..0000000 --- a/doc/models/phone-number.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Phone Number - -The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). - -## Structure - -`PhoneNumber` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | - -## Example (as JSON) - -```json -{ - "national_number": "national_number8" -} -``` - diff --git a/doc/models/phone-type.md b/doc/models/phone-type.md deleted file mode 100644 index 99bb423..0000000 --- a/doc/models/phone-type.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Phone Type - -The phone type. - -## Enumeration - -`PhoneType` - -## Fields - -| Name | -| --- | -| `FAX` | -| `HOME` | -| `MOBILE` | -| `OTHER` | -| `PAGER` | - diff --git a/doc/models/phone-with-type.md b/doc/models/phone-with-type.md deleted file mode 100644 index 0eee1c2..0000000 --- a/doc/models/phone-with-type.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Phone With Type - -The phone information. - -## Structure - -`PhoneWithType` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `phone_type` | [`PhoneType`](../../doc/models/phone-type.md) | Optional | The phone type. | -| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Required | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | - -## Example (as JSON) - -```json -{ - "phone_type": "PAGER", - "phone_number": { - "national_number": "national_number6" - } -} -``` - diff --git a/doc/models/phone.md b/doc/models/phone.md deleted file mode 100644 index 2b61175..0000000 --- a/doc/models/phone.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Phone - -The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). - -## Structure - -`Phone` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `country_code` | `String` | Required | The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `3`, *Pattern*: `^[0-9]{1,3}?$` | -| `national_number` | `String` | Required | The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN).
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[0-9]{1,14}?$` | -| `extension_number` | `String` | Optional | The extension number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `15`, *Pattern*: `^[0-9]{1,15}?$` | - -## Example (as JSON) - -```json -{ - "country_code": "country_code8", - "national_number": "national_number2", - "extension_number": "extension_number2" -} -``` - diff --git a/doc/models/platform-fee.md b/doc/models/platform-fee.md deleted file mode 100644 index 7c684f5..0000000 --- a/doc/models/platform-fee.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Platform Fee - -The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit. - -## Structure - -`PlatformFee` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | -| `payee` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | - -## Example (as JSON) - -```json -{ - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } -} -``` - diff --git a/doc/models/processing-instruction.md b/doc/models/processing-instruction.md deleted file mode 100644 index 1d19956..0000000 --- a/doc/models/processing-instruction.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Processing Instruction - -The instruction to process an order. - -## Enumeration - -`ProcessingInstruction` - -## Fields - -| Name | -| --- | -| `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` | -| `NO_INSTRUCTION` | - diff --git a/doc/models/processor-response-code.md b/doc/models/processor-response-code.md deleted file mode 100644 index 68b8bbb..0000000 --- a/doc/models/processor-response-code.md +++ /dev/null @@ -1,168 +0,0 @@ - -# Processor Response Code - -Processor response code for the non-PayPal payment processor errors. - -## Enumeration - -`ProcessorResponseCode` - -## Fields - -| Name | -| --- | -| `ENUM_0000` | -| `ENUM_00N7` | -| `ENUM_0100` | -| `ENUM_0390` | -| `ENUM_0500` | -| `ENUM_0580` | -| `ENUM_0800` | -| `ENUM_0880` | -| `ENUM_0890` | -| `ENUM_0960` | -| `ENUM_0R00` | -| `ENUM_1000` | -| `ENUM_10BR` | -| `ENUM_1300` | -| `ENUM_1310` | -| `ENUM_1312` | -| `ENUM_1317` | -| `ENUM_1320` | -| `ENUM_1330` | -| `ENUM_1335` | -| `ENUM_1340` | -| `ENUM_1350` | -| `ENUM_1352` | -| `ENUM_1360` | -| `ENUM_1370` | -| `ENUM_1380` | -| `ENUM_1382` | -| `ENUM_1384` | -| `ENUM_1390` | -| `ENUM_1393` | -| `ENUM_5100` | -| `ENUM_5110` | -| `ENUM_5120` | -| `ENUM_5130` | -| `ENUM_5135` | -| `ENUM_5140` | -| `ENUM_5150` | -| `ENUM_5160` | -| `ENUM_5170` | -| `ENUM_5180` | -| `ENUM_5190` | -| `ENUM_5200` | -| `ENUM_5210` | -| `ENUM_5400` | -| `ENUM_5500` | -| `ENUM_5650` | -| `ENUM_5700` | -| `ENUM_5710` | -| `ENUM_5800` | -| `ENUM_5900` | -| `ENUM_5910` | -| `ENUM_5920` | -| `ENUM_5930` | -| `ENUM_5950` | -| `ENUM_6300` | -| `ENUM_7600` | -| `ENUM_7700` | -| `ENUM_7710` | -| `ENUM_7800` | -| `ENUM_7900` | -| `ENUM_8000` | -| `ENUM_8010` | -| `ENUM_8020` | -| `ENUM_8030` | -| `ENUM_8100` | -| `ENUM_8110` | -| `ENUM_8220` | -| `ENUM_9100` | -| `ENUM_9500` | -| `ENUM_9510` | -| `ENUM_9520` | -| `ENUM_9530` | -| `ENUM_9540` | -| `ENUM_9600` | -| `PCNR` | -| `PCVV` | -| `PP06` | -| `PPRN` | -| `PPAD` | -| `PPAB` | -| `PPAE` | -| `PPAG` | -| `PPAI` | -| `PPAR` | -| `PPAU` | -| `PPAV` | -| `PPAX` | -| `PPBG` | -| `PPC2` | -| `PPCE` | -| `PPCO` | -| `PPCR` | -| `PPCT` | -| `PPCU` | -| `PPD3` | -| `PPDC` | -| `PPDI` | -| `PPDV` | -| `PPDT` | -| `PPEF` | -| `PPEL` | -| `PPER` | -| `PPEX` | -| `PPFE` | -| `PPFI` | -| `PPFR` | -| `PPFV` | -| `PPGR` | -| `PPH1` | -| `PPIF` | -| `PPII` | -| `PPIM` | -| `PPIT` | -| `PPLR` | -| `PPLS` | -| `PPMB` | -| `PPMC` | -| `PPMD` | -| `PPNC` | -| `PPNL` | -| `PPNM` | -| `PPNT` | -| `PPPH` | -| `PPPI` | -| `PPPM` | -| `PPQC` | -| `PPRE` | -| `PPRF` | -| `PPRR` | -| `PPS0` | -| `PPS1` | -| `PPS2` | -| `PPS3` | -| `PPS4` | -| `PPS5` | -| `PPS6` | -| `PPSC` | -| `PPSD` | -| `PPSE` | -| `PPTE` | -| `PPTF` | -| `PPTI` | -| `PPTR` | -| `PPTT` | -| `PPTV` | -| `PPUA` | -| `PPUC` | -| `PPUE` | -| `PPUI` | -| `PPUP` | -| `PPUR` | -| `PPVC` | -| `PPVE` | -| `PPVT` | - diff --git a/doc/models/processor-response.md b/doc/models/processor-response.md deleted file mode 100644 index fdd4369..0000000 --- a/doc/models/processor-response.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Processor Response - -The processor response information for payment requests, such as direct credit card transactions. - -## Structure - -`ProcessorResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `avs_code` | [`AVSCode`](../../doc/models/avs-code.md) | Optional | The address verification code for Visa, Discover, Mastercard, or American Express transactions. | -| `cvv_code` | [`CVVCode`](../../doc/models/cvv-code.md) | Optional | The card verification value code for for Visa, Discover, Mastercard, or American Express. | -| `response_code` | [`ProcessorResponseCode`](../../doc/models/processor-response-code.md) | Optional | Processor response code for the non-PayPal payment processor errors. | -| `payment_advice_code` | [`PaymentAdviceCode`](../../doc/models/payment-advice-code.md) | Optional | The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes. | - -## Example (as JSON) - -```json -{ - "avs_code": "M", - "cvv_code": "U", - "response_code": "PPII", - "payment_advice_code": "01" -} -``` - diff --git a/doc/models/purchase-unit-request.md b/doc/models/purchase-unit-request.md deleted file mode 100644 index 3c2a017..0000000 --- a/doc/models/purchase-unit-request.md +++ /dev/null @@ -1,102 +0,0 @@ - -# Purchase Unit Request - -The purchase unit request. Includes required information for the payment contract. - -## Structure - -`PurchaseUnitRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `reference_id` | `String` | Optional | The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256` | -| `amount` | [`AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Required | The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. | -| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | -| `payment_instruction` | [`PaymentInstruction`](../../doc/models/payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | -| `description` | `String` | Optional | The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `soft_descriptor` | `String` | Optional | The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.

If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor
Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit
The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement.
For example, if:
  • The PayPal prefix toggle is PAYPAL *.
  • The merchant descriptor in the profile is Janes Gift.
  • The soft descriptor is 800-123-1234.
Then, the statement descriptor on the card is PAYPAL * Janes Gift 80.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` | -| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | -| `shipping` | [`ShippingDetails`](../../doc/models/shipping-details.md) | Optional | The shipping details. | -| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. | - -## Example (as JSON) - -```json -{ - "reference_id": "reference_id6", - "amount": { - "currency_code": "currency_code6", - "value": "value0", - "breakdown": { - "item_total": { - "currency_code": "currency_code0", - "value": "value6" - }, - "shipping": { - "currency_code": "currency_code0", - "value": "value6" - }, - "handling": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - }, - "insurance": { - "currency_code": "currency_code2", - "value": "value8" - } - } - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "disbursement_mode": "INSTANT", - "payee_pricing_tier_id": "payee_pricing_tier_id2", - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" - }, - "description": "description6", - "custom_id": "custom_id4" -} -``` - diff --git a/doc/models/purchase-unit.md b/doc/models/purchase-unit.md deleted file mode 100644 index c2f0eca..0000000 --- a/doc/models/purchase-unit.md +++ /dev/null @@ -1,103 +0,0 @@ - -# Purchase Unit - -The purchase unit details. Used to capture required information for the payment contract. - -## Structure - -`PurchaseUnit` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `reference_id` | `String` | Optional | The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
Note: If there are multiple purchase units, reference_id is required for each purchase unit.

**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `256` | -| `amount` | [`AmountWithBreakdown`](../../doc/models/amount-with-breakdown.md) | Optional | The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. | -| `payee` | [`Payee`](../../doc/models/payee.md) | Optional | The merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | -| `payment_instruction` | [`PaymentInstruction`](../../doc/models/payment-instruction.md) | Optional | Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order. | -| `description` | `String` | Optional | The purchase description.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice ID for this order.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127` | -| `id` | `String` | Optional | The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `19` | -| `soft_descriptor` | `String` | Optional | The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.

The soft descriptor supports the following ASCII characters:
  • Alphanumeric characters
  • Dashes
  • Asterisks
  • Periods (.)
  • Spaces
For Wallet payments marketplace integrations:
  • The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.
  • You can't use the remaining space to show the customer service number.
  • The remaining spaces can be a combination of seller name and country.

For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22` | -| `items` | [`Array`](../../doc/models/item.md) | Optional | An array of items that the customer purchases from the merchant. | -| `shipping` | [`ShippingWithTrackingDetails`](../../doc/models/shipping-with-tracking-details.md) | Optional | The order shipping details. | -| `supplementary_data` | [`SupplementaryData`](../../doc/models/supplementary-data.md) | Optional | Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. | -| `payments` | [`PaymentCollection`](../../doc/models/payment-collection.md) | Optional | The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds. | - -## Example (as JSON) - -```json -{ - "reference_id": "reference_id8", - "amount": { - "currency_code": "currency_code6", - "value": "value0", - "breakdown": { - "item_total": { - "currency_code": "currency_code0", - "value": "value6" - }, - "shipping": { - "currency_code": "currency_code0", - "value": "value6" - }, - "handling": { - "currency_code": "currency_code2", - "value": "value8" - }, - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - }, - "insurance": { - "currency_code": "currency_code2", - "value": "value8" - } - } - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - }, - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "payee": { - "email_address": "email_address4", - "merchant_id": "merchant_id6" - } - } - ], - "disbursement_mode": "INSTANT", - "payee_pricing_tier_id": "payee_pricing_tier_id2", - "payee_receivable_fx_rate_id": "payee_receivable_fx_rate_id0" - }, - "description": "description0" -} -``` - diff --git a/doc/models/reauthorize-request.md b/doc/models/reauthorize-request.md deleted file mode 100644 index c708504..0000000 --- a/doc/models/reauthorize-request.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Reauthorize Request - -Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. You can reauthorize a payment only once from days four to 29.

If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.

A reauthorized payment itself has a new honor period of three days.

You can reauthorize an authorized payment once. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.

Supports only the `amount` request parameter.
Note: This request is currently not supported for Partner use cases.
- -## Structure - -`ReauthorizeRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } -} -``` - diff --git a/doc/models/refund-incomplete-reason.md b/doc/models/refund-incomplete-reason.md deleted file mode 100644 index f1fb1a8..0000000 --- a/doc/models/refund-incomplete-reason.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Refund Incomplete Reason - -The reason why the refund has the `PENDING` or `FAILED` status. - -## Enumeration - -`RefundIncompleteReason` - -## Fields - -| Name | -| --- | -| `ECHECK` | - diff --git a/doc/models/refund-payment-instruction.md b/doc/models/refund-payment-instruction.md deleted file mode 100644 index cfb772b..0000000 --- a/doc/models/refund-payment-instruction.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Refund Payment Instruction - -Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability. - -## Structure - -`RefundPaymentInstruction` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `platform_fees` | [`Array`](../../doc/models/refund-platform-fee.md) | Optional | Specifies the amount that the API caller will contribute to the refund being processed. The amount needs to be lower than platform_fees amount originally captured or the amount that is remaining if multiple refunds have been processed. This field is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | - -## Example (as JSON) - -```json -{ - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - } - ] -} -``` - diff --git a/doc/models/refund-platform-fee.md b/doc/models/refund-platform-fee.md deleted file mode 100644 index 9922f31..0000000 --- a/doc/models/refund-platform-fee.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Refund Platform Fee - -The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit. - -## Structure - -`RefundPlatformFee` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } -} -``` - diff --git a/doc/models/refund-request.md b/doc/models/refund-request.md deleted file mode 100644 index 08993a5..0000000 --- a/doc/models/refund-request.md +++ /dev/null @@ -1,55 +0,0 @@ - -# Refund Request - -Refunds a captured payment, by ID. For a full refund, include an empty request body. For a partial refund, include an amount object in the request body. - -## Structure - -`RefundRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice ID for this order. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `note_to_payer` | `String` | Optional | The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.*$` | -| `payment_instruction` | [`RefundPaymentInstruction`](../../doc/models/refund-payment-instruction.md) | Optional | Any additional payments instructions during refund payment processing. This object is only applicable to merchants that have been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability. Please speak to your account manager if you want to use this capability. | - -## Example (as JSON) - -```json -{ - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "custom_id": "custom_id6", - "invoice_id": "invoice_id8", - "note_to_payer": "note_to_payer0", - "payment_instruction": { - "platform_fees": [ - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - }, - { - "amount": { - "currency_code": "currency_code6", - "value": "value0" - } - } - ] - } -} -``` - diff --git a/doc/models/refund-status-details.md b/doc/models/refund-status-details.md deleted file mode 100644 index 0b639f8..0000000 --- a/doc/models/refund-status-details.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Refund Status Details - -The details of the refund status. - -## Structure - -`RefundStatusDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `reason` | [`RefundIncompleteReason`](../../doc/models/refund-incomplete-reason.md) | Optional | The reason why the refund has the `PENDING` or `FAILED` status. | - -## Example (as JSON) - -```json -{ - "reason": "ECHECK" -} -``` - diff --git a/doc/models/refund-status-with-details.md b/doc/models/refund-status-with-details.md deleted file mode 100644 index 178e473..0000000 --- a/doc/models/refund-status-with-details.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Refund Status With Details - -The refund status with details. - -## Structure - -`RefundStatusWithDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`RefundStatus`](../../doc/models/refund-status.md) | Optional | The status of the refund. | -| `status_details` | [`RefundStatusDetails`](../../doc/models/refund-status-details.md) | Optional | The details of the refund status. | - -## Example (as JSON) - -```json -{ - "status": "PENDING", - "status_details": { - "reason": "ECHECK" - } -} -``` - diff --git a/doc/models/refund-status.md b/doc/models/refund-status.md deleted file mode 100644 index 3a9da87..0000000 --- a/doc/models/refund-status.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Refund Status - -The status of the refund. - -## Enumeration - -`RefundStatus` - -## Fields - -| Name | -| --- | -| `CANCELLED` | -| `FAILED` | -| `PENDING` | -| `COMPLETED` | - diff --git a/doc/models/refund.md b/doc/models/refund.md deleted file mode 100644 index f399f03..0000000 --- a/doc/models/refund.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Refund - -The refund information. - -## Structure - -`Refund` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`RefundStatus`](../../doc/models/refund-status.md) | Optional | The status of the refund. | -| `status_details` | [`RefundStatusDetails`](../../doc/models/refund-status-details.md) | Optional | The details of the refund status. | -| `id` | `String` | Optional | The PayPal-generated ID for the refund. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. | -| `custom_id` | `String` | Optional | The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^[A-Za-z0-9-_.,]*$` | -| `acquirer_reference_number` | `String` | Optional | Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[a-zA-Z0-9]+$` | -| `note_to_payer` | `String` | Optional | The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. | -| `seller_payable_breakdown` | [`SellerPayableBreakdown`](../../doc/models/seller-payable-breakdown.md) | Optional | The breakdown of the refund. | -| `payer` | [`PayeeBase`](../../doc/models/payee-base.md) | Optional | The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). | -| `create_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | -| `update_time` | `String` | Optional | The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.

**Constraints**: *Minimum Length*: `20`, *Maximum Length*: `64`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[1-2][0-9]\|3[0-1])[T,t]([0-1][0-9]\|2[0-3]):[0-5][0-9]:([0-5][0-9]\|60)([.][0-9]+)?([Zz]\|[+-][0-9]{2}:[0-9]{2})$` | - -## Example (as JSON) - -```json -{ - "status": "CANCELLED", - "status_details": { - "reason": "ECHECK" - }, - "id": "id6", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "invoice_id": "invoice_id6" -} -``` - diff --git a/doc/models/related-identifiers.md b/doc/models/related-identifiers.md deleted file mode 100644 index b48fcaf..0000000 --- a/doc/models/related-identifiers.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Related Identifiers - -Identifiers related to a specific resource. - -## Structure - -`RelatedIdentifiers` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `order_id` | `String` | Optional | Order ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | -| `authorization_id` | `String` | Optional | Authorization ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | -| `capture_id` | `String` | Optional | Capture ID related to the resource.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `20`, *Pattern*: `^[A-Z0-9]+$` | - -## Example (as JSON) - -```json -{ - "order_id": "order_id0", - "authorization_id": "authorization_id8", - "capture_id": "capture_id8" -} -``` - diff --git a/doc/models/seller-payable-breakdown.md b/doc/models/seller-payable-breakdown.md deleted file mode 100644 index 1570a12..0000000 --- a/doc/models/seller-payable-breakdown.md +++ /dev/null @@ -1,49 +0,0 @@ - -# Seller Payable Breakdown - -The breakdown of the refund. - -## Structure - -`SellerPayableBreakdown` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `gross_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `paypal_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `paypal_fee_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `net_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `net_amount_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees for the refund.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | -| `net_amount_breakdown` | [`Array`](../../doc/models/net-amount-breakdown-item.md) | Optional | An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds. | -| `total_refunded_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | - -## Example (as JSON) - -```json -{ - "gross_amount": { - "currency_code": "currency_code4", - "value": "value0" - }, - "paypal_fee": { - "currency_code": "currency_code4", - "value": "value2" - }, - "paypal_fee_in_receivable_currency": { - "currency_code": "currency_code2", - "value": "value8" - }, - "net_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "net_amount_in_receivable_currency": { - "currency_code": "currency_code8", - "value": "value4" - } -} -``` - diff --git a/doc/models/seller-protection-status.md b/doc/models/seller-protection-status.md deleted file mode 100644 index b178b73..0000000 --- a/doc/models/seller-protection-status.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Seller Protection Status - -Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). - -## Enumeration - -`SellerProtectionStatus` - -## Fields - -| Name | -| --- | -| `ELIGIBLE` | -| `PARTIALLY_ELIGIBLE` | -| `NOT_ELIGIBLE` | - diff --git a/doc/models/seller-protection.md b/doc/models/seller-protection.md deleted file mode 100644 index ca5b821..0000000 --- a/doc/models/seller-protection.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Seller Protection - -The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). - -## Structure - -`SellerProtection` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`SellerProtectionStatus`](../../doc/models/seller-protection-status.md) | Optional | Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection). | -| `dispute_categories` | [`Array`](../../doc/models/dispute-category.md) | Optional | An array of conditions that are covered for the transaction. | - -## Example (as JSON) - -```json -{ - "status": "NOT_ELIGIBLE", - "dispute_categories": [ - "ITEM_NOT_RECEIVED" - ] -} -``` - diff --git a/doc/models/seller-receivable-breakdown.md b/doc/models/seller-receivable-breakdown.md deleted file mode 100644 index 3160d1e..0000000 --- a/doc/models/seller-receivable-breakdown.md +++ /dev/null @@ -1,53 +0,0 @@ - -# Seller Receivable Breakdown - -The detailed breakdown of the capture activity. This is not available for transactions that are in pending state. - -## Structure - -`SellerReceivableBreakdown` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `gross_amount` | [`Money`](../../doc/models/money.md) | Required | The currency and amount for a financial transaction, such as a balance or payment due. | -| `paypal_fee` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `paypal_fee_in_receivable_currency` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `net_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `receivable_amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `exchange_rate` | [`ExchangeRate`](../../doc/models/exchange-rate.md) | Optional | The exchange rate that determines the amount to convert from one currency to another currency. | -| `platform_fees` | [`Array`](../../doc/models/platform-fee.md) | Optional | An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `1` | - -## Example (as JSON) - -```json -{ - "gross_amount": { - "currency_code": "currency_code4", - "value": "value0" - }, - "paypal_fee": { - "currency_code": "currency_code4", - "value": "value2" - }, - "paypal_fee_in_receivable_currency": { - "currency_code": "currency_code2", - "value": "value8" - }, - "net_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "receivable_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "exchange_rate": { - "source_currency": "source_currency4", - "target_currency": "target_currency6", - "value": "value6" - } -} -``` - diff --git a/doc/models/sepa-debit-authorization-details.md b/doc/models/sepa-debit-authorization-details.md deleted file mode 100644 index 8d9d981..0000000 --- a/doc/models/sepa-debit-authorization-details.md +++ /dev/null @@ -1,23 +0,0 @@ - -# SEPA Debit Authorization Details - -Authorization details. - -## Structure - -`SEPADebitAuthorizationDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `status` | [`InstrumentAuthorizationStatus`](../../doc/models/instrument-authorization-status.md) | Optional | The authorization status of the wallet instrument.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `100`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "status": "NOT_SUPPORTED" -} -``` - diff --git a/doc/models/sepa-debit-response.md b/doc/models/sepa-debit-response.md deleted file mode 100644 index f279240..0000000 --- a/doc/models/sepa-debit-response.md +++ /dev/null @@ -1,39 +0,0 @@ - -# SEPA Debit Response - -## Structure - -`SEPADebitResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | -| `account_holder_name` | `Object` | Optional | - | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `authorization_details` | [`SEPADebitAuthorizationDetails`](../../doc/models/sepa-debit-authorization-details.md) | Optional | Authorization details. | - -## Example (as JSON) - -```json -{ - "iban_last_chars": "iban_last_chars4", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - }, - "authorization_details": { - "status": "NOT_SUPPORTED" - } -} -``` - diff --git a/doc/models/setup-token-card-experience-context.md b/doc/models/setup-token-card-experience-context.md deleted file mode 100644 index 74cf862..0000000 --- a/doc/models/setup-token-card-experience-context.md +++ /dev/null @@ -1,31 +0,0 @@ - -# Setup Token Card Experience Context - -Customizes the Vault creation flow experience for your customers. - -## Structure - -`SetupTokenCardExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `return_url` | `String` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | -| `cancel_url` | `String` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | -| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", - "brand_name": "brand_name2", - "locale": "locale6", - "return_url": "return_url4", - "cancel_url": "cancel_url6" -} -``` - diff --git a/doc/models/setup-token-request-card.md b/doc/models/setup-token-request-card.md deleted file mode 100644 index 590b7e9..0000000 --- a/doc/models/setup-token-request-card.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Setup Token Request Card - -A Resource representing a request to vault a Card. - -## Structure - -`SetupTokenRequestCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.{1,300}$` | -| `number` | `String` | Optional | The primary account number (PAN) for the payment card.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `19`, *Pattern*: `^[0-9]{13,19}$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `security_code` | `String` | Optional | The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `4`, *Pattern*: `^[0-9]{3,4}$` | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `verification_method` | `String` | Optional | The verification method of the card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `experience_context` | [`SetupTokenCardExperienceContext`](../../doc/models/setup-token-card-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | -| `network_transaction_reference` | `Object` | Optional | - | - -## Example (as JSON) - -```json -{ - "name": "name2", - "number": "number0", - "expiry": "expiry0", - "security_code": "security_code4", - "type": "STORE" -} -``` - diff --git a/doc/models/setup-token-request-payment-source.md b/doc/models/setup-token-request-payment-source.md deleted file mode 100644 index 8819991..0000000 --- a/doc/models/setup-token-request-payment-source.md +++ /dev/null @@ -1,76 +0,0 @@ - -# Setup Token Request Payment Source - -The payment method to vault with the instrument details. - -## Structure - -`SetupTokenRequestPaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`SetupTokenRequestCard`](../../doc/models/setup-token-request-card.md) | Optional | A Resource representing a request to vault a Card. | -| `paypal` | [`VaultPayPalWalletRequest`](../../doc/models/vault-pay-pal-wallet-request.md) | Optional | A resource representing a request to vault PayPal Wallet. | -| `venmo` | [`VaultVenmoRequest`](../../doc/models/vault-venmo-request.md) | Optional | - | -| `token` | [`VaultTokenRequest`](../../doc/models/vault-token-request.md) | Optional | The Tokenized Payment Source representing a Request to Vault a Token. | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "type": "UNKNOWN" - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - } -} -``` - diff --git a/doc/models/setup-token-request.md b/doc/models/setup-token-request.md deleted file mode 100644 index 80fcead..0000000 --- a/doc/models/setup-token-request.md +++ /dev/null @@ -1,80 +0,0 @@ - -# Setup Token Request - -Setup Token Request where the `source` defines the type of instrument to be stored. - -## Structure - -`SetupTokenRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | -| `payment_source` | [`SetupTokenRequestPaymentSource`](../../doc/models/setup-token-request-payment-source.md) | Required | The payment method to vault with the instrument details. | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "number": "number6", - "expiry": "expiry4", - "security_code": "security_code8", - "type": "UNKNOWN" - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - }, - "token": { - "id": "id6", - "type": "BILLING_AGREEMENT" - } - } -} -``` - diff --git a/doc/models/setup-token-response-card.md b/doc/models/setup-token-response-card.md deleted file mode 100644 index a5f6e19..0000000 --- a/doc/models/setup-token-response-card.md +++ /dev/null @@ -1,42 +0,0 @@ - -# Setup Token Response Card - -## Structure - -`SetupTokenResponseCard` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The card holder's name as it appears on the card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `300`, *Pattern*: `^[A-Za-z ]+$` | -| `last_digits` | `String` | Optional | The last digits of the payment card.
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `4`, *Pattern*: `[0-9]{2,}` | -| `brand` | [`CardBrand`](../../doc/models/card-brand.md) | Optional | The card network or brand. Applies to credit, debit, gift, and payment cards.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | -| `expiry` | `String` | Optional | The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6).
**Constraints**: *Minimum Length*: `7`, *Maximum Length*: `7`, *Pattern*: `^[0-9]{4}-(0[1-9]\|1[0-2])$` | -| `billing_address` | [`AddressDetails`](../../doc/models/address-details.md) | Optional | Address request details. | -| `verification_status` | `String` | Optional | Verification status of Card.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `verification` | [`CardVerificationDetails`](../../doc/models/card-verification-details.md) | Optional | Card Verification details including the authorization details and 3D SECURE details. | -| `network_transaction_reference` | [`NetworkTransactionReferenceEntity`](../../doc/models/network-transaction-reference-entity.md) | Optional | Previous network transaction reference including id in response. | -| `authentication_result` | [`AuthenticationResponse`](../../doc/models/authentication-response.md) | Optional | Results of Authentication such as 3D Secure. | -| `bin_details` | [`BinDetails`](../../doc/models/bin-details.md) | Optional | Bank Identification Number (BIN) details used to fund a payment. | -| `type` | [`CardType`](../../doc/models/card-type.md) | Optional | Type of card. i.e Credit, Debit and so on.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "name": "name8", - "last_digits": "last_digits2", - "brand": "RUPAY", - "expiry": "expiry6", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/setup-token-response-payment-source.md b/doc/models/setup-token-response-payment-source.md deleted file mode 100644 index 56283cc..0000000 --- a/doc/models/setup-token-response-payment-source.md +++ /dev/null @@ -1,78 +0,0 @@ - -# Setup Token Response Payment Source - -The setup payment method details. - -## Structure - -`SetupTokenResponsePaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`SetupTokenResponseCard`](../../doc/models/setup-token-response-card.md) | Optional | - | -| `paypal` | [`PayPalPaymentToken`](../../doc/models/pay-pal-payment-token.md) | Optional | - | -| `venmo` | [`VenmoPaymentToken`](../../doc/models/venmo-payment-token.md) | Optional | - | - -## Example (as JSON) - -```json -{ - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - } -} -``` - diff --git a/doc/models/setup-token-response.md b/doc/models/setup-token-response.md deleted file mode 100644 index 846cd41..0000000 --- a/doc/models/setup-token-response.md +++ /dev/null @@ -1,90 +0,0 @@ - -# Setup Token Response - -Minimal representation of a cached setup token. - -## Structure - -`SetupTokenResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The PayPal-generated ID for the vault token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `ordinal` | `Integer` | Optional | Ordinal number for sorting.
**Constraints**: `>= 1`, `<= 99` | -| `customer` | [`CustomerRequest`](../../doc/models/customer-request.md) | Optional | Customer in merchant's or partner's system of records. | -| `status` | `String` | Optional | The status of the payment token.
**Default**: `'CREATED'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_source` | [`SetupTokenResponsePaymentSource`](../../doc/models/setup-token-response-payment-source.md) | Optional | The setup payment method details. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of related [HATEOAS links](/api/rest/responses/#hateoas).
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `32` | - -## Example (as JSON) - -```json -{ - "status": "CREATED", - "id": "id6", - "ordinal": 0, - "customer": { - "id": "id0", - "merchant_customer_id": "merchant_customer_id2" - }, - "payment_source": { - "card": { - "name": "name6", - "last_digits": "last_digits0", - "brand": "SYNCHRONY", - "expiry": "expiry4", - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } - }, - "paypal": { - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type2", - "customer_type": "customer_type6" - }, - "venmo": { - "description": "description6", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "permit_multiple_payment_tokens": false, - "usage_type": "usage_type6", - "customer_type": "customer_type0" - } - } -} -``` - diff --git a/doc/models/shipment-carrier.md b/doc/models/shipment-carrier.md deleted file mode 100644 index 0e578dc..0000000 --- a/doc/models/shipment-carrier.md +++ /dev/null @@ -1,1290 +0,0 @@ - -# Shipment Carrier - -The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers. - -## Enumeration - -`ShipmentCarrier` - -## Fields - -| Name | -| --- | -| `DPD_RU` | -| `BG_BULGARIAN_POST` | -| `KR_KOREA_POST` | -| `ZA_COURIERIT` | -| `FR_EXAPAQ` | -| `ARE_EMIRATES_POST` | -| `GAC` | -| `GEIS` | -| `SF_EX` | -| `PAGO` | -| `MYHERMES` | -| `DIAMOND_EUROGISTICS` | -| `CORPORATECOURIERS_WEBHOOK` | -| `BOND` | -| `OMNIPARCEL` | -| `SK_POSTA` | -| `PUROLATOR` | -| `FETCHR_WEBHOOK` | -| `THEDELIVERYGROUP` | -| `CELLO_SQUARE` | -| `TARRIVE` | -| `COLLIVERY` | -| `MAINFREIGHT` | -| `IND_FIRSTFLIGHT` | -| `ACSWORLDWIDE` | -| `AMSTAN` | -| `OKAYPARCEL` | -| `ENVIALIA_REFERENCE` | -| `SEUR_ES` | -| `CONTINENTAL` | -| `FDSEXPRESS` | -| `AMAZON_FBA_SWISHIP` | -| `WYNGS` | -| `DHL_ACTIVE_TRACING` | -| `ZYLLEM` | -| `RUSTON` | -| `XPOST` | -| `CORREOS_ES` | -| `DHL_FR` | -| `PAN_ASIA` | -| `BRT_IT` | -| `SRE_KOREA` | -| `SPEEDEE` | -| `TNT_UK` | -| `VENIPAK` | -| `SHREENANDANCOURIER` | -| `CROSHOT` | -| `NIPOST_NG` | -| `EPST_GLBL` | -| `NEWGISTICS` | -| `POST_SLOVENIA` | -| `JERSEY_POST` | -| `BOMBINOEXP` | -| `WMG` | -| `XQ_EXPRESS` | -| `FURDECO` | -| `LHT_EXPRESS` | -| `SOUTH_AFRICAN_POST_OFFICE` | -| `SPOTON` | -| `DIMERCO` | -| `CYPRUS_POST_CYP` | -| `ABCUSTOM` | -| `IND_DELIVREE` | -| `CN_BESTEXPRESS` | -| `DX_SFTP` | -| `PICKUPP_MYS` | -| `FMX` | -| `HELLMANN` | -| `SHIP_IT_ASIA` | -| `KERRY_ECOMMERCE` | -| `FRETERAPIDO` | -| `PITNEY_BOWES` | -| `XPRESSEN_DK` | -| `SEUR_SP_API` | -| `DELIVERYONTIME` | -| `JINSUNG` | -| `TRANS_KARGO` | -| `SWISHIP_DE` | -| `IVOY_WEBHOOK` | -| `AIRMEE_WEBHOOK` | -| `DHL_BENELUX` | -| `FIRSTMILE` | -| `FASTWAY_IR` | -| `HH_EXP` | -| `MYS_MYPOST_ONLINE` | -| `TNT_NL` | -| `TIPSA` | -| `TAQBIN_MY` | -| `KGMHUB` | -| `INTEXPRESS` | -| `OVERSE_EXP` | -| `ONECLICK` | -| `ROADRUNNER_FREIGHT` | -| `GLS_CROTIA` | -| `MRW_FTP` | -| `BLUEX` | -| `DYLT` | -| `DPD_IR` | -| `SIN_GLBL` | -| `TUFFNELLS_REFERENCE` | -| `CJPACKET` | -| `MILKMAN` | -| `ASIGNA` | -| `ONEWORLDEXPRESS` | -| `ROYAL_MAIL` | -| `VIA_EXPRESS` | -| `TIGFREIGHT` | -| `ZTO_EXPRESS` | -| `TWO_GO` | -| `IML` | -| `INTEL_VALLEY` | -| `EFS` | -| `UK_UK_MAIL` | -| `RAM` | -| `ALLIEDEXPRESS` | -| `APC_OVERNIGHT` | -| `SHIPPIT` | -| `TFM` | -| `M_XPRESS` | -| `HDB_BOX` | -| `CLEVY_LINKS` | -| `IBEONE` | -| `FIEGE_NL` | -| `KWE_GLOBAL` | -| `CTC_EXPRESS` | -| `LAO_POST` | -| `AMAZON` | -| `MORE_LINK` | -| `JX` | -| `EASY_MAIL` | -| `ADUIEPYLE` | -| `GB_PANTHER` | -| `EXPRESSSALE` | -| `SG_DETRACK` | -| `TRUNKRS_WEBHOOK` | -| `MATDESPATCH` | -| `DICOM` | -| `MBW` | -| `KHM_CAMBODIA_POST` | -| `SINOTRANS` | -| `BRT_IT_PARCELID` | -| `DHL_SUPPLY_CHAIN` | -| `DHL_PL` | -| `TOPYOU` | -| `PALEXPRESS` | -| `DHL_SG` | -| `CN_WEDO` | -| `FULFILLME` | -| `DPD_DELISTRACK` | -| `UPS_REFERENCE` | -| `CARIBOU` | -| `LOCUS_WEBHOOK` | -| `DSV` | -| `CN_GOFLY` | -| `P2P_TRC` | -| `DIRECTPARCELS` | -| `NOVA_POSHTA_INT` | -| `FEDEX_POLAND` | -| `CN_JCEX` | -| `FAR_INTERNATIONAL` | -| `IDEXPRESS` | -| `GANGBAO` | -| `NEWAY` | -| `POSTNL_INT_3_S` | -| `RPX_ID` | -| `DESIGNERTRANSPORT_WEBHOOK` | -| `GLS_SLOVEN` | -| `PARCELLED_IN` | -| `GSI_EXPRESS` | -| `CON_WAY` | -| `BROUWER_TRANSPORT` | -| `CPEX` | -| `ISRAEL_POST` | -| `DTDC_IN` | -| `PTT_POST` | -| `XDE_WEBHOOK` | -| `TOLOS` | -| `GIAO_HANG` | -| `GEODIS_ESPACE` | -| `MAGYAR_HU` | -| `DOORDASH_WEBHOOK` | -| `TIKI_ID` | -| `CJ_HK_INTERNATIONAL` | -| `STAR_TRACK_EXPRESS` | -| `HELTHJEM` | -| `SFB2C` | -| `FREIGHTQUOTE` | -| `LANDMARK_GLOBAL_REFERENCE` | -| `PARCEL2GO` | -| `DELNEXT` | -| `RCL` | -| `CGS_EXPRESS` | -| `HK_POST` | -| `SAP_EXPRESS` | -| `PARCELPOST_SG` | -| `HERMES` | -| `IND_SAFEEXPRESS` | -| `TOPHATTEREXPRESS` | -| `MGLOBAL` | -| `AVERITT` | -| `LEADER` | -| `_2EBOX` | -| `SG_SPEEDPOST` | -| `DBSCHENKER_SE` | -| `ISR_POST_DOMESTIC` | -| `BESTWAYPARCEL` | -| `ASENDIA_DE` | -| `NIGHTLINE_UK` | -| `TAQBIN_SG` | -| `TCK_EXPRESS` | -| `ENDEAVOUR_DELIVERY` | -| `NANJINGWOYUAN` | -| `HEPPNER_FR` | -| `EMPS_CN` | -| `FONSEN` | -| `PICKRR` | -| `APC_OVERNIGHT_CONNUM` | -| `STAR_TRACK_NEXT_FLIGHT` | -| `DAJIN` | -| `UPS_FREIGHT` | -| `POSTA_PLUS` | -| `CEVA` | -| `ANSERX` | -| `JS_EXPRESS` | -| `PADTF` | -| `UPS_MAIL_INNOVATIONS` | -| `EZSHIP` | -| `SYPOST` | -| `AMAZON_SHIP_MCF` | -| `YUSEN` | -| `BRING` | -| `SDA_IT` | -| `GBA` | -| `NEWEGGEXPRESS` | -| `SPEEDCOURIERS_GR` | -| `FORRUN` | -| `PICKUP` | -| `ECMS` | -| `INTELIPOST` | -| `FLASHEXPRESS` | -| `CN_STO` | -| `SEKO_SFTP` | -| `HOME_DELIVERY_SOLUTIONS` | -| `DPD_HGRY` | -| `KERRYTTC_VN` | -| `JOYING_BOX` | -| `TOTAL_EXPRESS` | -| `ZJS_EXPRESS` | -| `STARKEN` | -| `DEMANDSHIP` | -| `CN_DPEX` | -| `AUPOST_CN` | -| `LOGISTERS` | -| `GOGLOBALPOST` | -| `GLS_CZ` | -| `PAACK_WEBHOOK` | -| `GRAB_WEBHOOK` | -| `PARCELPOINT` | -| `ICUMULUS` | -| `DAIGLOBALTRACK` | -| `GLOBAL_IPARCEL` | -| `YURTICI_KARGO` | -| `CN_PAYPAL_PACKAGE` | -| `PARCEL_2_POST` | -| `GLS_IT` | -| `PIL_LOGISTICS` | -| `HEPPNER` | -| `GENERAL_OVERNIGHT` | -| `HAPPY2POINT` | -| `CHITCHATS` | -| `SMOOTH` | -| `CLE_LOGISTICS` | -| `FIEGE` | -| `MX_CARGO` | -| `ZIINGFINALMILE` | -| `DAYTON_FREIGHT` | -| `TCS` | -| `AEX` | -| `HERMES_DE` | -| `ROUTIFIC_WEBHOOK` | -| `GLOBAVEND` | -| `CJ_LOGISTICS` | -| `PALLET_NETWORK` | -| `RAF_PH` | -| `UK_XDP` | -| `PAPER_EXPRESS` | -| `LA_POSTE_SUIVI` | -| `PAQUETEXPRESS` | -| `LIEFERY` | -| `STRECK_TRANSPORT` | -| `PONY_EXPRESS` | -| `ALWAYS_EXPRESS` | -| `GBS_BROKER` | -| `CITYLINK_MY` | -| `ALLJOY` | -| `YODEL` | -| `YODEL_DIR` | -| `STONE3PL` | -| `PARCELPAL_WEBHOOK` | -| `DHL_ECOMERCE_ASA` | -| `SIMPLYPOST` | -| `KY_EXPRESS` | -| `SHENZHEN` | -| `US_LASERSHIP` | -| `UC_EXPRE` | -| `DIDADI` | -| `CJ_KR` | -| `DBSCHENKER_B2B` | -| `MXE` | -| `CAE_DELIVERS` | -| `PFCEXPRESS` | -| `WHISTL` | -| `WEPOST` | -| `DHL_PARCEL_ES` | -| `DDEXPRESS` | -| `ARAMEX_AU` | -| `BNEED` | -| `HK_TGX` | -| `LATVIJAS_PASTS` | -| `VIAEUROPE` | -| `CORREO_UY` | -| `CHRONOPOST_FR` | -| `J_NET` | -| `_6LS` | -| `BLR_BELPOST` | -| `BIRDSYSTEM` | -| `DOBROPOST` | -| `WAHANA_ID` | -| `WEASHIP` | -| `SONICTL` | -| `KWT` | -| `AFLLOG_FTP` | -| `SKYNET_WORLDWIDE` | -| `NOVA_POSHTA` | -| `SEINO` | -| `SZENDEX` | -| `BPOST_INT` | -| `DBSCHENKER_SV` | -| `AO_DEUTSCHLAND` | -| `EU_FLEET_SOLUTIONS` | -| `PCFCORP` | -| `LINKBRIDGE` | -| `PRIMAMULTICIPTA` | -| `COUREX` | -| `ZAJIL_EXPRESS` | -| `COLLECTCO` | -| `JTEXPRESS` | -| `FEDEX_UK` | -| `USHIP` | -| `PIXSELL` | -| `SHIPTOR` | -| `CDEK` | -| `VNM_VIETTELPOST` | -| `CJ_CENTURY` | -| `GSO` | -| `VIWO` | -| `SKYBOX` | -| `KERRYTJ` | -| `NTLOGISTICS_VN` | -| `SDH_SCM` | -| `ZINC` | -| `DPE_SOUTH_AFRC` | -| `CESKA_CZ` | -| `ACS_GR` | -| `DEALERSEND` | -| `JOCOM` | -| `CSE` | -| `TFORCE_FINALMILE` | -| `SHIP_GATE` | -| `SHIPTER` | -| `NATIONAL_SAMEDAY` | -| `YUNEXPRESS` | -| `CAINIAO` | -| `DMS_MATRIX` | -| `DIRECTLOG` | -| `ASENDIA_US` | -| `_3JMSLOGISTICS` | -| `LICCARDI_EXPRESS` | -| `SKY_POSTAL` | -| `CNWANGTONG` | -| `POSTNORD_LOGISTICS_DK` | -| `LOGISTIKA` | -| `CELERITAS` | -| `PRESSIODE` | -| `SHREE_MARUTI` | -| `LOGISTICSWORLDWIDE_HK` | -| `EFEX` | -| `LOTTE` | -| `LONESTAR` | -| `APRISAEXPRESS` | -| `BEL_RS` | -| `OSM_WORLDWIDE` | -| `WESTGATE_GL` | -| `FASTRACK` | -| `DTD_EXPR` | -| `ALFATREX` | -| `PROMEDDELIVERY` | -| `THABIT_LOGISTICS` | -| `HCT_LOGISTICS` | -| `CARRY_FLAP` | -| `US_OLD_DOMINION` | -| `ANICAM_BOX` | -| `WANBEXPRESS` | -| `AN_POST` | -| `DPD_LOCAL` | -| `STALLIONEXPRESS` | -| `RAIDEREX` | -| `SHOPFANS` | -| `KYUNGDONG_PARCEL` | -| `CHAMPION_LOGISTICS` | -| `PICKUPP_SGP` | -| `MORNING_EXPRESS` | -| `NACEX` | -| `THENILE_WEBHOOK` | -| `HOLISOL` | -| `LBCEXPRESS_FTP` | -| `KURASI` | -| `USF_REDDAWAY` | -| `APG` | -| `CN_BOXC` | -| `ECOSCOOTING` | -| `MAINWAY` | -| `PAPERFLY` | -| `HOUNDEXPRESS` | -| `BOX_BERRY` | -| `EP_BOX` | -| `PLUS_LOG_UK` | -| `FULFILLA` | -| `ASE` | -| `MAIL_PLUS` | -| `XPO_LOGISTICS` | -| `WNDIRECT` | -| `CLOUDWISH_ASIA` | -| `ZELERIS` | -| `GIO_EXPRESS` | -| `OCS_WORLDWIDE` | -| `ARK_LOGISTICS` | -| `AQUILINE` | -| `PILOT_FREIGHT` | -| `QWINTRY` | -| `DANSKE_FRAGT` | -| `CARRIERS` | -| `AIR_CANADA_GLOBAL` | -| `PRESIDENT_TRANS` | -| `STEPFORWARDFS` | -| `SKYNET_UK` | -| `PITTOHIO` | -| `CORREOS_EXPRESS` | -| `RL_US` | -| `MARA_XPRESS` | -| `DESTINY` | -| `UK_YODEL` | -| `COMET_TECH` | -| `DHL_PARCEL_RU` | -| `TNT_REFR` | -| `SHREE_ANJANI_COURIER` | -| `MIKROPAKKET_BE` | -| `ETS_EXPRESS` | -| `COLIS_PRIVE` | -| `CN_YUNDA` | -| `AAA_COOPER` | -| `ROCKET_PARCEL` | -| `_360LION` | -| `PANDU` | -| `PROFESSIONAL_COURIERS` | -| `FLYTEXPRESS` | -| `LOGISTICSWORLDWIDE_MY` | -| `CORREOS_DE_ESPANA` | -| `IMX` | -| `FOUR_PX_EXPRESS` | -| `XPRESSBEES` | -| `PICKUPP_VNM` | -| `STARTRACK_EXPRESS1` | -| `FR_COLISSIMO` | -| `NACEX_SPAIN_REFERENCE` | -| `DHL_SUPPLY_CHAIN_AU` | -| `ESHIPPING` | -| `SHREETIRUPATI` | -| `HX_EXPRESS` | -| `INDOPAKET` | -| `CN_17POST` | -| `K1_EXPRESS` | -| `CJ_GLS` | -| `MYS_GDEX` | -| `NATIONEX` | -| `ANJUN` | -| `FARGOOD` | -| `SMG_EXPRESS` | -| `RZYEXPRESS` | -| `SEFL` | -| `TNT_CLICK_IT` | -| `HDB` | -| `HIPSHIPPER` | -| `RPXLOGISTICS` | -| `KUEHNE` | -| `IT_NEXIVE` | -| `PTS` | -| `SWISS_POST_FTP` | -| `FASTRK_SERV` | -| `_4_72` | -| `US_YRC` | -| `POSTNL_INTL_3S` | -| `ELIAN_POST` | -| `CUBYN` | -| `SAU_SAUDI_POST` | -| `ABXEXPRESS_MY` | -| `HUAHAN_EXPRESS` | -| `IND_JAYONEXPRESS` | -| `ZES_EXPRESS` | -| `ZEPTO_EXPRESS` | -| `SKYNET_ZA` | -| `ZEEK_2_DOOR` | -| `BLINKLASTMILE` | -| `POSTA_UKR` | -| `CHROBINSON` | -| `CN_POST56` | -| `COURANT_PLUS` | -| `SCUDEX_EXPRESS` | -| `SHIPENTEGRA` | -| `B_TWO_C_EUROPE` | -| `COPE` | -| `IND_GATI` | -| `CN_WISHPOST` | -| `NACEX_ES` | -| `TAQBIN_HK` | -| `GLOBALTRANZ` | -| `HKD` | -| `BJSHOMEDELIVERY` | -| `OMNIVA` | -| `SUTTON` | -| `PANTHER_REFERENCE` | -| `SFCSERVICE` | -| `LTL` | -| `PARKNPARCEL` | -| `SPRING_GDS` | -| `ECEXPRESS` | -| `INTERPARCEL_AU` | -| `AGILITY` | -| `XL_EXPRESS` | -| `ADERONLINE` | -| `DIRECTCOURIERS` | -| `PLANZER` | -| `SENDING` | -| `NINJAVAN_WB` | -| `NATIONWIDE_MY` | -| `SENDIT` | -| `GB_ARROW` | -| `IND_GOJAVAS` | -| `KPOST` | -| `DHL_FREIGHT` | -| `BLUECARE` | -| `JINDOUYUN` | -| `TRACKON` | -| `GB_TUFFNELLS` | -| `TRUMPCARD` | -| `ETOTAL` | -| `SFPLUS_WEBHOOK` | -| `SEKOLOGISTICS` | -| `HERMES_2MANN_HANDLING` | -| `DPD_LOCAL_REF` | -| `UDS` | -| `ZA_SPECIALISED_FREIGHT` | -| `THA_KERRY` | -| `PRT_INT_SEUR` | -| `BRA_CORREIOS` | -| `NZ_NZ_POST` | -| `CN_EQUICK` | -| `MYS_EMS` | -| `GB_NORSK` | -| `ESP_MRW` | -| `ESP_PACKLINK` | -| `KANGAROO_MY` | -| `RPX` | -| `XDP_UK_REFERENCE` | -| `NINJAVAN_MY` | -| `ADICIONAL` | -| `NINJAVAN_ID` | -| `ROADBULL` | -| `YAKIT` | -| `MAILAMERICAS` | -| `MIKROPAKKET` | -| `DYNALOGIC` | -| `DHL_ES` | -| `DHL_PARCEL_NL` | -| `DHL_GLOBAL_MAIL_ASIA` | -| `DAWN_WING` | -| `GENIKI_GR` | -| `HERMESWORLD_UK` | -| `ALPHAFAST` | -| `BUYLOGIC` | -| `EKART` | -| `MEX_SENDA` | -| `SFC_LOGISTICS` | -| `POST_SERBIA` | -| `IND_DELHIVERY` | -| `DE_DPD_DELISTRACK` | -| `RPD2MAN` | -| `CN_SF_EXPRESS` | -| `YANWEN` | -| `MYS_SKYNET` | -| `CORREOS_DE_MEXICO` | -| `CBL_LOGISTICA` | -| `MEX_ESTAFETA` | -| `AU_AUSTRIAN_POST` | -| `RINCOS` | -| `NLD_DHL` | -| `RUSSIAN_POST` | -| `COURIERS_PLEASE` | -| `POSTNORD_LOGISTICS` | -| `FEDEX` | -| `DPE_EXPRESS` | -| `DPD` | -| `ADSONE` | -| `IDN_JNE` | -| `THECOURIERGUY` | -| `CNEXPS` | -| `PRT_CHRONOPOST` | -| `LANDMARK_GLOBAL` | -| `IT_DHL_ECOMMERCE` | -| `ESP_NACEX` | -| `PRT_CTT` | -| `BE_KIALA` | -| `ASENDIA_UK` | -| `GLOBAL_TNT` | -| `POSTUR_IS` | -| `EPARCEL_KR` | -| `INPOST_PACZKOMATY` | -| `IT_POSTE_ITALIA` | -| `BE_BPOST` | -| `PL_POCZTA_POLSKA` | -| `MYS_MYS_POST` | -| `SG_SG_POST` | -| `THA_THAILAND_POST` | -| `LEXSHIP` | -| `FASTWAY_NZ` | -| `DHL_AU` | -| `COSTMETICSNOW` | -| `PFLOGISTICS` | -| `LOOMIS_EXPRESS` | -| `GLS_ITALY` | -| `LINE` | -| `GEL_EXPRESS` | -| `HUODULL` | -| `NINJAVAN_SG` | -| `JANIO` | -| `AO_COURIER` | -| `BRT_IT_SENDER_REF` | -| `SAILPOST` | -| `LALAMOVE` | -| `NEWZEALAND_COURIERS` | -| `ETOMARS` | -| `VIRTRANSPORT` | -| `WIZMO` | -| `PALLETWAYS` | -| `I_DIKA` | -| `CFL_LOGISTICS` | -| `GEMWORLDWIDE` | -| `GLOBAL_EXPRESS` | -| `LOGISTYX_TRANSGROUP` | -| `WESTBANK_COURIER` | -| `ARCO_SPEDIZIONI` | -| `YDH_EXPRESS` | -| `PARCELINKLOGISTICS` | -| `CNDEXPRESS` | -| `NOX_NIGHT_TIME_EXPRESS` | -| `AERONET` | -| `LTIANEXP` | -| `INTEGRA2_FTP` | -| `PARCELONE` | -| `NOX_NACHTEXPRESS` | -| `CN_CHINA_POST_EMS` | -| `CHUKOU1` | -| `GLS_SLOV` | -| `ORANGE_DS` | -| `JOOM_LOGIS` | -| `AUS_STARTRACK` | -| `DHL` | -| `GB_APC` | -| `BONDSCOURIERS` | -| `JPN_JAPAN_POST` | -| `USPS` | -| `WINIT` | -| `ARG_OCA` | -| `TW_TAIWAN_POST` | -| `DMM_NETWORK` | -| `TNT` | -| `BH_POSTA` | -| `SWE_POSTNORD` | -| `CA_CANADA_POST` | -| `WISELOADS` | -| `ASENDIA_HK` | -| `NLD_GLS` | -| `MEX_REDPACK` | -| `JET_SHIP` | -| `DE_DHL_EXPRESS` | -| `NINJAVAN_THAI` | -| `RABEN_GROUP` | -| `ESP_ASM` | -| `HRV_HRVATSKA` | -| `GLOBAL_ESTES` | -| `LTU_LIETUVOS` | -| `BEL_DHL` | -| `AU_AU_POST` | -| `SPEEDEXCOURIER` | -| `FR_COLIS` | -| `ARAMEX` | -| `DPEX` | -| `MYS_AIRPAK` | -| `CUCKOOEXPRESS` | -| `DPD_POLAND` | -| `NLD_POSTNL` | -| `NIM_EXPRESS` | -| `QUANTIUM` | -| `SENDLE` | -| `ESP_REDUR` | -| `MATKAHUOLTO` | -| `CPACKET` | -| `POSTI` | -| `HUNTER_EXPRESS` | -| `CHOIR_EXP` | -| `LEGION_EXPRESS` | -| `AUSTRIAN_POST_EXPRESS` | -| `GRUPO` | -| `POSTA_RO` | -| `INTERPARCEL_UK` | -| `GLOBAL_ABF` | -| `POSTEN_NORGE` | -| `XPERT_DELIVERY` | -| `DHL_REFR` | -| `DHL_HK` | -| `SKYNET_UAE` | -| `GOJEK` | -| `YODEL_INTNL` | -| `JANCO` | -| `YTO` | -| `WISE_EXPRESS` | -| `JTEXPRESS_VN` | -| `FEDEX_INTL_MLSERV` | -| `VAMOX` | -| `AMS_GRP` | -| `DHL_JP` | -| `HRPARCEL` | -| `GESWL` | -| `BLUESTAR` | -| `CDEK_TR` | -| `DESCARTES` | -| `DELTEC_UK` | -| `DTDC_EXPRESS` | -| `TOURLINE` | -| `BH_WORLDWIDE` | -| `OCS` | -| `YINGNUO_LOGISTICS` | -| `UPS` | -| `TOLL` | -| `PRT_SEUR` | -| `DTDC_AU` | -| `THA_DYNAMIC_LOGISTICS` | -| `UBI_LOGISTICS` | -| `FEDEX_CROSSBORDER` | -| `A1POST` | -| `TAZMANIAN_FREIGHT` | -| `CJ_INT_MY` | -| `SAIA_FREIGHT` | -| `SG_QXPRESS` | -| `NHANS_SOLUTIONS` | -| `DPD_FR` | -| `COORDINADORA` | -| `ANDREANI` | -| `DOORA` | -| `INTERPARCEL_NZ` | -| `PHL_JAMEXPRESS` | -| `BEL_BELGIUM_POST` | -| `US_APC` | -| `IDN_POS` | -| `FR_MONDIAL` | -| `DE_DHL` | -| `HK_RPX` | -| `DHL_PIECEID` | -| `VNPOST_EMS` | -| `RRDONNELLEY` | -| `DPD_DE` | -| `DELCART_IN` | -| `IMEXGLOBALSOLUTIONS` | -| `ACOMMERCE` | -| `EURODIS` | -| `CANPAR` | -| `GLS` | -| `IND_ECOM` | -| `ESP_ENVIALIA` | -| `DHL_UK` | -| `SMSA_EXPRESS` | -| `TNT_FR` | -| `DEX_I` | -| `BUDBEE_WEBHOOK` | -| `COPA_COURIER` | -| `VNM_VIETNAM_POST` | -| `DPD_HK` | -| `TOLL_NZ` | -| `ECHO` | -| `FEDEX_FR` | -| `BORDEREXPRESS` | -| `MAILPLUS_JPN` | -| `TNT_UK_REFR` | -| `KEC` | -| `DPD_RO` | -| `TNT_JP` | -| `TH_CJ` | -| `EC_CN` | -| `FASTWAY_UK` | -| `FASTWAY_US` | -| `GLS_DE` | -| `GLS_ES` | -| `GLS_FR` | -| `MONDIAL_BE` | -| `SGT_IT` | -| `TNT_CN` | -| `TNT_DE` | -| `TNT_ES` | -| `TNT_PL` | -| `PARCELFORCE` | -| `SWISS_POST` | -| `TOLL_IPEC` | -| `AIR_21` | -| `AIRSPEED` | -| `BERT` | -| `BLUEDART` | -| `COLLECTPLUS` | -| `COURIERPLUS` | -| `COURIER_POST` | -| `DHL_GLOBAL_MAIL` | -| `DPD_UK` | -| `DELTEC_DE` | -| `DEUTSCHE_DE` | -| `DOTZOT` | -| `ELTA_GR` | -| `EMS_CN` | -| `ECARGO` | -| `ENSENDA` | -| `FERCAM_IT` | -| `FASTWAY_ZA` | -| `FASTWAY_AU` | -| `FIRST_LOGISITCS` | -| `GEODIS` | -| `GLOBEGISTICS` | -| `GREYHOUND` | -| `JETSHIP_MY` | -| `LION_PARCEL` | -| `AEROFLASH` | -| `ONTRAC` | -| `SAGAWA` | -| `SIODEMKA` | -| `STARTRACK` | -| `TNT_AU` | -| `TNT_IT` | -| `TRANSMISSION` | -| `YAMATO` | -| `DHL_IT` | -| `DHL_AT` | -| `LOGISTICSWORLDWIDE_KR` | -| `GLS_SPAIN` | -| `AMAZON_UK_API` | -| `DPD_FR_REFERENCE` | -| `DHLPARCEL_UK` | -| `MEGASAVE` | -| `QUALITYPOST` | -| `IDS_LOGISTICS` | -| `JOYINGBOX1` | -| `PANTHER_ORDER_NUMBER` | -| `WATKINS_SHEPARD` | -| `FASTTRACK` | -| `UP_EXPRESS` | -| `ELOGISTICA` | -| `ECOURIER` | -| `CJ_PHILIPPINES` | -| `SPEEDEX` | -| `ORANGECONNEX` | -| `TECOR` | -| `SAEE` | -| `GLS_ITALY_FTP` | -| `DELIVERE` | -| `YYCOM` | -| `ADICIONAL_PT` | -| `DKSH` | -| `NIPPON_EXPRESS_FTP` | -| `GOLS` | -| `FUJEXP` | -| `QTRACK` | -| `OMLOGISTICS_API` | -| `GDPHARM` | -| `MISUMI_CN` | -| `AIR_CANADA` | -| `CITY56_WEBHOOK` | -| `SAGAWA_API` | -| `KEDAEX` | -| `PGEON_API` | -| `WEWORLDEXPRESS` | -| `JT_LOGISTICS` | -| `TRUSK` | -| `VIAXPRESS` | -| `DHL_SUPPLYCHAIN_ID` | -| `ZUELLIGPHARMA_SFTP` | -| `MEEST` | -| `TOLL_PRIORITY` | -| `MOTHERSHIP_API` | -| `CAPITAL` | -| `EUROPAKET_API` | -| `HFD` | -| `TOURLINE_REFERENCE` | -| `GIO_ECOURIER` | -| `CN_LOGISTICS` | -| `PANDION` | -| `BPOST_API` | -| `PASSPORTSHIPPING` | -| `PAKAJO` | -| `DACHSER` | -| `YUSEN_SFTP` | -| `SHYPLITE` | -| `XYY` | -| `MWD` | -| `FAXECARGO` | -| `MAZET` | -| `FIRST_LOGISTICS_API` | -| `SPRINT_PACK` | -| `HERMES_DE_FTP` | -| `CONCISE` | -| `KERRY_EXPRESS_TW_API` | -| `EWE` | -| `FASTDESPATCH` | -| `ABCUSTOM_SFTP` | -| `CHAZKI` | -| `SHIPPIE` | -| `GEODIS_API` | -| `NAQEL_EXPRESS` | -| `PAPA_WEBHOOK` | -| `FORWARDAIR` | -| `DIALOGO_LOGISTICA_API` | -| `LALAMOVE_API` | -| `TOMYDOOR` | -| `KRONOS_WEBHOOK` | -| `JTCARGO` | -| `T_CAT` | -| `CONCISE_WEBHOOK` | -| `TELEPORT_WEBHOOK` | -| `CUSTOMCO_API` | -| `SPX_TH` | -| `BOLLORE_LOGISTICS` | -| `CLICKLINK_SFTP` | -| `M3LOGISTICS` | -| `VNPOST_API` | -| `AXLEHIRE_FTP` | -| `SHADOWFAX` | -| `MYHERMES_UK_API` | -| `DAIICHI` | -| `MENSAJEROSURBANOS_API` | -| `POLARSPEED` | -| `IDEXPRESS_ID` | -| `PAYO` | -| `WHISTL_SFTP` | -| `INTEX_DE` | -| `TRANS2U` | -| `PRODUCTCAREGROUP_SFTP` | -| `BIGSMART` | -| `EXPEDITORS_API_REF` | -| `AITWORLDWIDE_API` | -| `WORLDCOURIER` | -| `QUIQUP` | -| `AGEDISS_SFTP` | -| `ANDREANI_API` | -| `CRLEXPRESS` | -| `SMARTCAT` | -| `CROSSFLIGHT` | -| `PROCARRIER` | -| `DHL_REFERENCE_API` | -| `SEINO_API` | -| `WSPEXPRESS` | -| `KRONOS` | -| `TOTAL_EXPRESS_API` | -| `PARCLL` | -| `XPEDIGO` | -| `STAR_TRACK_WEBHOOK` | -| `GPOST` | -| `UCS` | -| `DMFGROUP` | -| `COORDINADORA_API` | -| `MARKEN` | -| `NTL` | -| `REDJEPAKKETJE` | -| `ALLIED_EXPRESS_FTP` | -| `MONDIALRELAY_ES` | -| `NAEKO_FTP` | -| `MHI` | -| `SHIPPIFY` | -| `MALCA_AMIT_API` | -| `JTEXPRESS_SG_API` | -| `DACHSER_WEB` | -| `FLIGHTLG` | -| `CAGO` | -| `COM1EXPRESS` | -| `TONAMI_FTP` | -| `PACKFLEET` | -| `PUROLATOR_INTERNATIONAL` | -| `WINESHIPPING_WEBHOOK` | -| `DHL_ES_SFTP` | -| `PCHOME_API` | -| `CESKAPOSTA_API` | -| `GORUSH` | -| `HOMERUNNER` | -| `AMAZON_ORDER` | -| `EFWNOW_API` | -| `CBL_LOGISTICA_API` | -| `NIMBUSPOST` | -| `LOGWIN_LOGISTICS` | -| `NOWLOG_API` | -| `DPD_NL` | -| `GODEPENDABLE` | -| `ESDEX` | -| `LOGISYSTEMS_SFTP` | -| `EXPEDITORS` | -| `SNTGLOBAL_API` | -| `SHIPX` | -| `QINTL_API` | -| `PACKS` | -| `POSTNL_INTERNATIONAL` | -| `AMAZON_EMAIL_PUSH` | -| `DHL_API` | -| `SPX` | -| `AXLEHIRE` | -| `ICSCOURIER` | -| `DIALOGO_LOGISTICA` | -| `SHUNBANG_EXPRESS` | -| `TCS_API` | -| `SF_EXPRESS_CN` | -| `PACKETA` | -| `SIC_TELIWAY` | -| `MONDIALRELAY_FR` | -| `INTIME_FTP` | -| `JD_EXPRESS` | -| `FASTBOX` | -| `PATHEON` | -| `INDIA_POST` | -| `TIPSA_REF` | -| `ECOFREIGHT` | -| `VOX` | -| `DIRECTFREIGHT_AU_REF` | -| `BESTTRANSPORT_SFTP` | -| `AUSTRALIA_POST_API` | -| `FRAGILEPAK_SFTP` | -| `FLIPXP` | -| `VALUE_WEBHOOK` | -| `DAESHIN` | -| `SHERPA` | -| `MWD_API` | -| `SMARTKARGO` | -| `DNJ_EXPRESS` | -| `GOPEOPLE` | -| `MYSENDLE_API` | -| `ARAMEX_API` | -| `PIDGE` | -| `THAIPARCELS` | -| `PANTHER_REFERENCE_API` | -| `POSTAPLUS1` | -| `BUFFALO` | -| `U_ENVIOS` | -| `ELITE_CO` | -| `BARQEXP` | -| `ROCHE_INTERNAL_SFTP` | -| `DBSCHENKER_ICELAND` | -| `TNT_FR_REFERENCE` | -| `NEWGISTICSAPI` | -| `GLOVO` | -| `GWLOGIS_API` | -| `SPREETAIL_API` | -| `MOOVA` | -| `PLYCONGROUP` | -| `USPS_WEBHOOK` | -| `REIMAGINEDELIVERY` | -| `EDF_FTP` | -| `DAO365` | -| `BIOCAIR_FTP` | -| `RANSA_WEBHOOK` | -| `SHIPXPRES` | -| `COURANT_PLUS_API` | -| `SHIPA` | -| `HOMELOGISTICS` | -| `DX` | -| `POSTE_ITALIANE_PACCOCELERE` | -| `TOLL_WEBHOOK` | -| `LCTBR_API` | -| `DX_FREIGHT` | -| `DHL_SFTP` | -| `SHIPROCKET` | -| `UBER_WEBHOOK` | -| `STATOVERNIGHT` | -| `BURD` | -| `FASTSHIP` | -| `IBVENTURE_WEBHOOK` | -| `GATI_KWE_API` | -| `CRYOPDP_FTP` | -| `HUBBED` | -| `TIPSA_API` | -| `ARASKARGO` | -| `THIJS_NL` | -| `ATSHEALTHCARE_REFERENCE` | -| `ENUM_99MINUTOS` | -| `HELLENIC_POST` | -| `HSM_GLOBAL` | -| `MNX` | -| `NMTRANSFER` | -| `LOGYSTO` | -| `INDIA_POST_INT` | -| `AMAZON_FBA_SWISHIP_IN` | -| `SRT_TRANSPORT` | -| `BOMI` | -| `DELIVERR_SFTP` | -| `HSDEXPRESS` | -| `SIMPLETIRE_WEBHOOK` | -| `HUNTER_EXPRESS_SFTP` | -| `UPS_API` | -| `WOOYOUNG_LOGISTICS_SFTP` | -| `PHSE_API` | -| `WISH_EMAIL_PUSH` | -| `NORTHLINE` | -| `MEDAFRICA` | -| `DPD_AT_SFTP` | -| `ANTERAJA` | -| `DHL_GLOBAL_FORWARDING_API` | -| `LBCEXPRESS_API` | -| `SIMSGLOBAL` | -| `CDLDELIVERS` | -| `TYP` | -| `TESTING_COURIER_WEBHOOK` | -| `PANDAGO_API` | -| `ROYAL_MAIL_FTP` | -| `THUNDEREXPRESS` | -| `SECRETLAB_WEBHOOK` | -| `SETEL` | -| `JD_WORLDWIDE` | -| `DPD_RU_API` | -| `ARGENTS_WEBHOOK` | -| `POSTONE` | -| `TUSKLOGISTICS` | -| `RHENUS_UK_API` | -| `TAQBIN_SG_API` | -| `INNTRALOG_SFTP` | -| `DAYROSS` | -| `CORREOSEXPRESS_API` | -| `INTERNATIONAL_SEUR_API` | -| `YODEL_API` | -| `HEROEXPRESS` | -| `DHL_SUPPLYCHAIN_IN` | -| `URGENT_CARGUS` | -| `FRONTDOORCORP` | -| `JTEXPRESS_PH` | -| `PARCELSTARS_WEBHOOK` | -| `DPD_SK_SFTP` | -| `MOVIANTO` | -| `OZEPARTS_SHIPPING` | -| `KARGOMKOLAY` | -| `TRUNKRS` | -| `OMNIRPS_WEBHOOK` | -| `CHILEXPRESS` | -| `TESTING_COURIER` | -| `JNE_API` | -| `BJSHOMEDELIVERY_FTP` | -| `DEXPRESS_WEBHOOK` | -| `USPS_API` | -| `TRANSVIRTUAL` | -| `SOLISTICA_API` | -| `CHIENVENTURE_WEBHOOK` | -| `DPD_UK_SFTP` | -| `INPOST_UK` | -| `JAVIT` | -| `ZTO_DOMESTIC` | -| `DHL_GT_API` | -| `CEVA_TRACKING` | -| `KOMON_EXPRESS` | -| `EASTWESTCOURIER_FTP` | -| `DANNIAO` | -| `SPECTRAN` | -| `DELIVER_IT` | -| `RELAISCOLIS` | -| `GLS_SPAIN_API` | -| `POSTPLUS` | -| `AIRTERRA` | -| `GIO_ECOURIER_API` | -| `DPD_CH_SFTP` | -| `FEDEX_API` | -| `INTERSMARTTRANS` | -| `HERMES_UK_SFTP` | -| `EXELOT_FTP` | -| `DHL_PA_API` | -| `VIRTRANSPORT_SFTP` | -| `WORLDNET` | -| `INSTABOX_WEBHOOK` | -| `KNG` | -| `FLASHEXPRESS_WEBHOOK` | -| `MAGYAR_POSTA_API` | -| `WESHIP_API` | -| `OHI_WEBHOOK` | -| `MUDITA` | -| `BLUEDART_API` | -| `T_CAT_API` | -| `ADS` | -| `HERMES_IT` | -| `FITZMARK_API` | -| `POSTI_API` | -| `SMSA_EXPRESS_WEBHOOK` | -| `TAMERGROUP_WEBHOOK` | -| `LIVRAPIDE` | -| `NIPPON_EXPRESS` | -| `BETTERTRUCKS` | -| `FAN` | -| `PB_USPSFLATS_FTP` | -| `PARCELRIGHT` | -| `ITHINKLOGISTICS` | -| `KERRY_EXPRESS_TH_WEBHOOK` | -| `ECOUTIER` | -| `SHOWL` | -| `BRT_IT_API` | -| `RIXONHK_API` | -| `DBSCHENKER_API` | -| `ILYANGLOGIS` | -| `MAIL_BOX_ETC` | -| `WESHIP` | -| `DHL_GLOBAL_MAIL_API` | -| `ACTIVOS24_API` | -| `ATSHEALTHCARE` | -| `LUWJISTIK` | -| `GW_WORLD` | -| `FAIRSENDEN_API` | -| `SERVIP_WEBHOOK` | -| `SWISHIP` | -| `TANET` | -| `HOTSIN_CARGO` | -| `DIREX` | -| `HUANTONG` | -| `IMILE_API` | -| `BDMNET` | -| `AUEXPRESS` | -| `NYTLOGISTICS` | -| `DSV_REFERENCE` | -| `NOVOFARMA_WEBHOOK` | -| `AITWORLDWIDE_SFTP` | -| `SHOPOLIVE` | -| `FNF_ZA` | -| `DHL_ECOMMERCE_GC` | -| `FETCHR` | -| `STARLINKS_API` | -| `YYEXPRESS` | -| `SERVIENTREGA` | -| `HANJIN` | -| `SPANISH_SEUR_FTP` | -| `DX_B2B_CONNUM` | -| `HELTHJEM_API` | -| `INEXPOST` | -| `A2B_BA` | -| `RHENUS_GROUP` | -| `SBERLOGISTICS_RU` | -| `MALCA_AMIT` | -| `PPL` | -| `OSM_WORLDWIDE_SFTP` | -| `ACILOGISTIX` | -| `OPTIMACOURIER` | -| `NOVA_POSHTA_API` | -| `LOGGI` | -| `YIFAN` | -| `MYDYNALOGIC` | -| `MORNINGLOBAL` | -| `CONCISE_API` | -| `FXTRAN` | -| `DELIVERYOURPARCEL_ZA` | -| `UPARCEL` | -| `MOBI_BR` | -| `LOGINEXT_WEBHOOK` | -| `EMS` | -| `SPEEDY` | - diff --git a/doc/models/shipping-details.md b/doc/models/shipping-details.md deleted file mode 100644 index 1464b4e..0000000 --- a/doc/models/shipping-details.md +++ /dev/null @@ -1,69 +0,0 @@ - -# Shipping Details - -The shipping details. - -## Structure - -`ShippingDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | -| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `options` | [`Array`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `10` | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "name": { - "full_name": "full_name6" - }, - "type": "PICKUP_IN_STORE", - "options": [ - { - "id": "id2", - "label": "label2", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false - }, - { - "id": "id2", - "label": "label2", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false - }, - { - "id": "id2", - "label": "label2", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false - } - ], - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } -} -``` - diff --git a/doc/models/shipping-name.md b/doc/models/shipping-name.md deleted file mode 100644 index a5eb348..0000000 --- a/doc/models/shipping-name.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Shipping Name - -The name of the party. - -## Structure - -`ShippingName` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `full_name` | `String` | Optional | When the party is a person, the party's full name.
**Constraints**: *Maximum Length*: `300` | - -## Example (as JSON) - -```json -{ - "full_name": "full_name6" -} -``` - diff --git a/doc/models/shipping-option.md b/doc/models/shipping-option.md deleted file mode 100644 index cddf1de..0000000 --- a/doc/models/shipping-option.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Shipping Option - -The options that the payee or merchant offers to the payer to ship or pick up their items. - -## Structure - -`ShippingOption` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Required | A unique ID that identifies a payer-selected shipping option.
**Constraints**: *Maximum Length*: `127` | -| `label` | `String` | Required | A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale.
**Constraints**: *Maximum Length*: `127` | -| `type` | [`ShippingType`](../../doc/models/shipping-type.md) | Optional | A classification for the method of purchase fulfillment. | -| `amount` | [`Money`](../../doc/models/money.md) | Optional | The currency and amount for a financial transaction, such as a balance or payment due. | -| `selected` | `TrueClass \| FalseClass` | Required | If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true`. | - -## Example (as JSON) - -```json -{ - "id": "id4", - "label": "label4", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false -} -``` - diff --git a/doc/models/shipping-preference.md b/doc/models/shipping-preference.md deleted file mode 100644 index 8aedb56..0000000 --- a/doc/models/shipping-preference.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Shipping Preference - -The location from which the shipping address is derived. - -## Enumeration - -`ShippingPreference` - -## Fields - -| Name | -| --- | -| `GET_FROM_FILE` | -| `NO_SHIPPING` | -| `SET_PROVIDED_ADDRESS` | - diff --git a/doc/models/shipping-type.md b/doc/models/shipping-type.md deleted file mode 100644 index de49788..0000000 --- a/doc/models/shipping-type.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Shipping Type - -A classification for the method of purchase fulfillment. - -## Enumeration - -`ShippingType` - -## Fields - -| Name | -| --- | -| `SHIPPING` | -| `PICKUP` | -| `PICKUP_IN_STORE` | -| `PICKUP_FROM_PERSON` | - diff --git a/doc/models/shipping-with-tracking-details.md b/doc/models/shipping-with-tracking-details.md deleted file mode 100644 index d2ea3ca..0000000 --- a/doc/models/shipping-with-tracking-details.md +++ /dev/null @@ -1,114 +0,0 @@ - -# Shipping With Tracking Details - -The order shipping details. - -## Structure - -`ShippingWithTrackingDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | -| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `options` | [`Array`](../../doc/models/shipping-option.md) | Optional | An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items.
**Constraints**: *Minimum Items*: `0`, *Maximum Items*: `10` | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `trackers` | [`Array`](../../doc/models/order-tracker-response.md) | Optional | An array of trackers for a transaction. | - -## Example (as JSON) - -```json -{ - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "options": [ - { - "id": "id2", - "label": "label2", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false - }, - { - "id": "id2", - "label": "label2", - "type": "SHIPPING", - "amount": { - "currency_code": "currency_code6", - "value": "value0" - }, - "selected": false - } - ], - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - }, - "trackers": [ - { - "id": "id2", - "status": "CANCELLED", - "items": [ - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - } - ], - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "create_time": "create_time8" - }, - { - "id": "id2", - "status": "CANCELLED", - "items": [ - { - "name": "name8", - "quantity": "quantity4", - "sku": "sku6", - "url": "url2", - "image_url": "image_url4" - } - ], - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - }, - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ], - "create_time": "create_time8" - } - ] -} -``` - diff --git a/doc/models/sofort-payment-object.md b/doc/models/sofort-payment-object.md deleted file mode 100644 index e113f52..0000000 --- a/doc/models/sofort-payment-object.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Sofort Payment Object - -Information used to pay using Sofort. - -## Structure - -`SofortPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code6", - "bic": "bic8", - "iban_last_chars": "iban_last_chars4" -} -``` - diff --git a/doc/models/sofort-payment-request.md b/doc/models/sofort-payment-request.md deleted file mode 100644 index 7b0e113..0000000 --- a/doc/models/sofort-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Sofort Payment Request - -Information needed to pay using Sofort. - -## Structure - -`SofortPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name4", - "country_code": "country_code4", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/standard-entry-class-code.md b/doc/models/standard-entry-class-code.md deleted file mode 100644 index f60023f..0000000 --- a/doc/models/standard-entry-class-code.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Standard Entry Class Code - -NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes. - -## Enumeration - -`StandardEntryClassCode` - -## Fields - -| Name | -| --- | -| `TEL` | -| `WEB` | -| `CCD` | -| `PPD` | - diff --git a/doc/models/store-in-vault-instruction.md b/doc/models/store-in-vault-instruction.md deleted file mode 100644 index ece80a5..0000000 --- a/doc/models/store-in-vault-instruction.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Store in Vault Instruction - -Defines how and when the payment source gets vaulted. - -## Enumeration - -`StoreInVaultInstruction` - -## Fields - -| Name | -| --- | -| `ON_SUCCESS` | - diff --git a/doc/models/stored-payment-source-payment-type.md b/doc/models/stored-payment-source-payment-type.md deleted file mode 100644 index 28d25b3..0000000 --- a/doc/models/stored-payment-source-payment-type.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Stored Payment Source Payment Type - -Indicates the type of the stored payment_source payment. - -## Enumeration - -`StoredPaymentSourcePaymentType` - -## Fields - -| Name | -| --- | -| `ONE_TIME` | -| `RECURRING` | -| `UNSCHEDULED` | - diff --git a/doc/models/stored-payment-source-usage-type.md b/doc/models/stored-payment-source-usage-type.md deleted file mode 100644 index 30a870d..0000000 --- a/doc/models/stored-payment-source-usage-type.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Stored Payment Source Usage Type - -Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file). - -## Enumeration - -`StoredPaymentSourceUsageType` - -## Fields - -| Name | -| --- | -| `FIRST` | -| `SUBSEQUENT` | -| `DERIVED` | - diff --git a/doc/models/stored-payment-source.md b/doc/models/stored-payment-source.md deleted file mode 100644 index bdccb7b..0000000 --- a/doc/models/stored-payment-source.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Stored Payment Source - -Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
- -## Structure - -`StoredPaymentSource` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `payment_initiator` | [`PaymentInitiator`](../../doc/models/payment-initiator.md) | Required | The person or party who initiated or triggered the payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `payment_type` | [`StoredPaymentSourcePaymentType`](../../doc/models/stored-payment-source-payment-type.md) | Required | Indicates the type of the stored payment_source payment.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `usage` | [`StoredPaymentSourceUsageType`](../../doc/models/stored-payment-source-usage-type.md) | Optional | Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file).
**Default**: `StoredPaymentSourceUsageType::DERIVED`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `previous_network_transaction_reference` | [`NetworkTransactionReference`](../../doc/models/network-transaction-reference.md) | Optional | Reference values used by the card network to identify a transaction. | - -## Example (as JSON) - -```json -{ - "payment_initiator": "CUSTOMER", - "payment_type": "RECURRING", - "usage": "DERIVED", - "previous_network_transaction_reference": { - "id": "id6", - "date": "date2", - "network": "VISA", - "acquirer_reference_number": "acquirer_reference_number8" - } -} -``` - diff --git a/doc/models/supplementary-data.md b/doc/models/supplementary-data.md deleted file mode 100644 index 40b096f..0000000 --- a/doc/models/supplementary-data.md +++ /dev/null @@ -1,54 +0,0 @@ - -# Supplementary Data - -Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data. - -## Structure - -`SupplementaryData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `card` | [`CardSupplementaryData`](../../doc/models/card-supplementary-data.md) | Optional | Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout. | - -## Example (as JSON) - -```json -{ - "card": { - "level_2": { - "invoice_id": "invoice_id4", - "tax_total": { - "currency_code": "currency_code4", - "value": "value0" - } - }, - "level_3": { - "shipping_amount": { - "currency_code": "currency_code0", - "value": "value6" - }, - "duty_amount": { - "currency_code": "currency_code6", - "value": "value2" - }, - "discount_amount": { - "currency_code": "currency_code2", - "value": "value8" - }, - "shipping_address": { - "address_line_1": "address_line_10", - "address_line_2": "address_line_20", - "admin_area_2": "admin_area_24", - "admin_area_1": "admin_area_16", - "postal_code": "postal_code2", - "country_code": "country_code0" - }, - "ships_from_postal_code": "ships_from_postal_code4" - } - } -} -``` - diff --git a/doc/models/supplementary-purchase-data.md b/doc/models/supplementary-purchase-data.md deleted file mode 100644 index 7383078..0000000 --- a/doc/models/supplementary-purchase-data.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Supplementary Purchase Data - -The capture identification-related fields. Includes the invoice ID, custom ID, note to payer, and soft descriptor. - -## Structure - -`SupplementaryPurchaseData` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `invoice_id` | `String` | Optional | The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.{1,127}$` | -| `note_to_payer` | `String` | Optional | An informational note about this settlement. Appears in both the payer's transaction history and the emails that the payer receives.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^.{1,255}$` | - -## Example (as JSON) - -```json -{ - "invoice_id": "invoice_id8", - "note_to_payer": "note_to_payer0" -} -``` - diff --git a/doc/models/tax-id-type.md b/doc/models/tax-id-type.md deleted file mode 100644 index 9a846e4..0000000 --- a/doc/models/tax-id-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Tax Id Type - -The customer's tax ID type. - -## Enumeration - -`TaxIdType` - -## Fields - -| Name | -| --- | -| `BR_CPF` | -| `BR_CNPJ` | - diff --git a/doc/models/tax-info.md b/doc/models/tax-info.md deleted file mode 100644 index 85e4c7b..0000000 --- a/doc/models/tax-info.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Tax Info - -The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required. - -## Structure - -`TaxInfo` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `tax_id` | `String` | Required | The customer's tax ID value.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `([a-zA-Z0-9])` | -| `tax_id_type` | [`TaxIdType`](../../doc/models/tax-id-type.md) | Required | The customer's tax ID type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `14`, *Pattern*: `^[A-Z0-9_]+$` | - -## Example (as JSON) - -```json -{ - "tax_id": "tax_id0", - "tax_id_type": "BR_CPF" -} -``` - diff --git a/doc/models/three-d-secure-authentication-response.md b/doc/models/three-d-secure-authentication-response.md deleted file mode 100644 index 9370a0f..0000000 --- a/doc/models/three-d-secure-authentication-response.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Three D Secure Authentication Response - -Results of 3D Secure Authentication. - -## Structure - -`ThreeDSecureAuthenticationResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `authentication_status` | [`PAResStatus`](../../doc/models/pa-res-status.md) | Optional | Transactions status result identifier. The outcome of the issuer's authentication.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `enrollment_status` | [`EnrollmentStatus`](../../doc/models/enrollment-status.md) | Optional | Status of Authentication eligibility.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "authentication_status": "C", - "enrollment_status": "Y" -} -``` - diff --git a/doc/models/token-type.md b/doc/models/token-type.md deleted file mode 100644 index 0001c8b..0000000 --- a/doc/models/token-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Token Type - -The tokenization method that generated the ID. - -## Enumeration - -`TokenType` - -## Fields - -| Name | -| --- | -| `BILLING_AGREEMENT` | -| `SETUP_TOKEN` | - diff --git a/doc/models/token.md b/doc/models/token.md deleted file mode 100644 index 4ee4ddf..0000000 --- a/doc/models/token.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Token - -The tokenized payment source to fund a payment. - -## Structure - -`Token` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Required | The PayPal-generated ID for the token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `type` | [`TokenType`](../../doc/models/token-type.md) | Required | The tokenization method that generated the ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_-]+$` | - -## Example (as JSON) - -```json -{ - "id": "id6", - "type": "BILLING_AGREEMENT" -} -``` - diff --git a/doc/models/trustly-payment-object.md b/doc/models/trustly-payment-object.md deleted file mode 100644 index 308a541..0000000 --- a/doc/models/trustly-payment-object.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Trustly Payment Object - -Information needed to pay using Trustly. - -## Structure - -`TrustlyPaymentObject` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Optional | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Optional | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `bic` | `String` | Optional | The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank.
**Constraints**: *Minimum Length*: `8`, *Maximum Length*: `11`, *Pattern*: `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$` | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | - -## Example (as JSON) - -```json -{ - "name": "name6", - "country_code": "country_code6", - "bic": "bic8", - "iban_last_chars": "iban_last_chars4" -} -``` - diff --git a/doc/models/trustly-payment-request.md b/doc/models/trustly-payment-request.md deleted file mode 100644 index 19e7f6f..0000000 --- a/doc/models/trustly-payment-request.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Trustly Payment Request - -Information needed to pay using Trustly. - -## Structure - -`TrustlyPaymentRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | `String` | Required | The full name representation like Mr J Smith.
**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `300` | -| `country_code` | `String` | Required | The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.

**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2`, *Pattern*: `^([A-Z]{2}\|C2)$` | -| `experience_context` | [`ExperienceContext`](../../doc/models/experience-context.md) | Optional | Customizes the payer experience during the approval process for the payment. | - -## Example (as JSON) - -```json -{ - "name": "name2", - "country_code": "country_code2", - "experience_context": { - "brand_name": "brand_name2", - "locale": "locale6", - "shipping_preference": "NO_SHIPPING", - "return_url": "return_url4", - "cancel_url": "cancel_url6" - } -} -``` - diff --git a/doc/models/universal-product-code.md b/doc/models/universal-product-code.md deleted file mode 100644 index e6063ab..0000000 --- a/doc/models/universal-product-code.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Universal Product Code - -The Universal Product Code of the item. - -## Structure - -`UniversalProductCode` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `type` | [`UPCType`](../../doc/models/upc-type.md) | Required | The Universal Product Code type.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `5`, *Pattern*: `^[0-9A-Z_-]+$` | -| `code` | `String` | Required | The UPC product code of the item.
**Constraints**: *Minimum Length*: `6`, *Maximum Length*: `17`, *Pattern*: `^[0-9]{0,17}$` | - -## Example (as JSON) - -```json -{ - "type": "UPC-E", - "code": "code2" -} -``` - diff --git a/doc/models/upc-type.md b/doc/models/upc-type.md deleted file mode 100644 index 720374a..0000000 --- a/doc/models/upc-type.md +++ /dev/null @@ -1,21 +0,0 @@ - -# UPC Type - -The Universal Product Code type. - -## Enumeration - -`UPCType` - -## Fields - -| Name | -| --- | -| `UPCA` | -| `UPCB` | -| `UPCC` | -| `UPCD` | -| `UPCE` | -| `UPC2` | -| `UPC5` | - diff --git a/doc/models/vault-customer.md b/doc/models/vault-customer.md deleted file mode 100644 index 8ceb5de..0000000 --- a/doc/models/vault-customer.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Vault Customer - -The details about a customer in PayPal's system of record. - -## Structure - -`VaultCustomer` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | - -## Example (as JSON) - -```json -{ - "id": "id2" -} -``` - diff --git a/doc/models/vault-experience-context.md b/doc/models/vault-experience-context.md deleted file mode 100644 index 470c2dd..0000000 --- a/doc/models/vault-experience-context.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Vault Experience Context - -Customizes the Vault creation flow experience for your customers. - -## Structure - -`VaultExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | -| `locale` | `String` | Optional | The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/).
**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `10`, *Pattern*: `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}\|[0-9]{3}))?$` | -| `return_url` | `String` | Optional | The URL where the customer is redirected after customer approves leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | -| `cancel_url` | `String` | Optional | The URL where the customer is redirected after customer cancels or leaves the flow. It is a required field for contingency flows like PayPal wallet, 3DS.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `4000` | -| `shipping_preference` | `String` | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `'GET_FROM_FILE'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", - "brand_name": "brand_name0", - "locale": "locale4", - "return_url": "return_url2", - "cancel_url": "cancel_url4" -} -``` - diff --git a/doc/models/vault-instruction-base.md b/doc/models/vault-instruction-base.md deleted file mode 100644 index 6e88578..0000000 --- a/doc/models/vault-instruction-base.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Vault Instruction Base - -Basic vault instruction specification that can be extended by specific payment sources that supports vaulting. - -## Structure - -`VaultInstructionBase` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Optional | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "store_in_vault": "ON_SUCCESS" -} -``` - diff --git a/doc/models/vault-instruction.md b/doc/models/vault-instruction.md deleted file mode 100644 index e81335a..0000000 --- a/doc/models/vault-instruction.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Vault Instruction - -Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting. - -## Structure - -`VaultInstruction` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Required | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "store_in_vault": "ON_SUCCESS" -} -``` - diff --git a/doc/models/vault-pay-pal-wallet-request.md b/doc/models/vault-pay-pal-wallet-request.md deleted file mode 100644 index db6d38f..0000000 --- a/doc/models/vault-pay-pal-wallet-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Vault Pay Pal Wallet Request - -A resource representing a request to vault PayPal Wallet. - -## Structure - -`VaultPayPalWalletRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | -| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | -| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `experience_context` | [`VaultExperienceContext`](../../doc/models/vault-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | - -## Example (as JSON) - -```json -{ - "permit_multiple_payment_tokens": false, - "description": "description0", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "usage_type": "usage_type0", - "customer_type": "customer_type6" -} -``` - diff --git a/doc/models/vault-response.md b/doc/models/vault-response.md deleted file mode 100644 index 6112f16..0000000 --- a/doc/models/vault-response.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Vault Response - -The details about a saved payment source. - -## Structure - -`VaultResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The PayPal-generated ID for the saved payment source.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255` | -| `status` | [`VaultStatus`](../../doc/models/vault-status.md) | Optional | The vault status.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer` | [`VaultCustomer`](../../doc/models/vault-customer.md) | Optional | The details about a customer in PayPal's system of record. | -| `links` | [`Array`](../../doc/models/link-description.md) | Optional | An array of request-related HATEOAS links.
**Constraints**: *Minimum Items*: `1`, *Maximum Items*: `10` | - -## Example (as JSON) - -```json -{ - "id": "id2", - "status": "CREATED", - "customer": { - "id": "id0" - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] -} -``` - diff --git a/doc/models/vault-sepa-debit-response.md b/doc/models/vault-sepa-debit-response.md deleted file mode 100644 index c69da85..0000000 --- a/doc/models/vault-sepa-debit-response.md +++ /dev/null @@ -1,37 +0,0 @@ - -# Vault SEPA Debit Response - -An API resource used in the response of securely storing a SEPA Debit. - -## Structure - -`VaultSEPADebitResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `iban_last_chars` | `String` | Optional | The last characters of the IBAN used to pay.
**Constraints**: *Minimum Length*: `4`, *Maximum Length*: `34`, *Pattern*: `[a-zA-Z0-9]{4}` | -| `account_holder_name` | `Object` | Optional | - | -| `billing_address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "iban_last_chars": "iban_last_chars8", - "account_holder_name": { - "key1": "val1", - "key2": "val2" - }, - "billing_address": { - "address_line_1": "address_line_12", - "address_line_2": "address_line_28", - "admin_area_2": "admin_area_28", - "admin_area_1": "admin_area_14", - "postal_code": "postal_code0", - "country_code": "country_code8" - } -} -``` - diff --git a/doc/models/vault-status.md b/doc/models/vault-status.md deleted file mode 100644 index 042bb3c..0000000 --- a/doc/models/vault-status.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Vault Status - -The vault status. - -## Enumeration - -`VaultStatus` - -## Fields - -| Name | -| --- | -| `VAULTED` | -| `CREATED` | -| `APPROVED` | - diff --git a/doc/models/vault-token-request.md b/doc/models/vault-token-request.md deleted file mode 100644 index f152ad4..0000000 --- a/doc/models/vault-token-request.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Vault Token Request - -The Tokenized Payment Source representing a Request to Vault a Token. - -## Structure - -`VaultTokenRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Required | The PayPal-generated ID for the token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Za-z_-]+$` | -| `type` | [`TokenType`](../../doc/models/token-type.md) | Required | The tokenization method that generated the ID.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_-]+$` | - -## Example (as JSON) - -```json -{ - "id": "id8", - "type": "BILLING_AGREEMENT" -} -``` - diff --git a/doc/models/vault-venmo-experience-context.md b/doc/models/vault-venmo-experience-context.md deleted file mode 100644 index 6e5bd37..0000000 --- a/doc/models/vault-venmo-experience-context.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Vault Venmo Experience Context - -Customizes the Vault creation flow experience for your customers. - -## Structure - -`VaultVenmoExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `300`, *Pattern*: `^.*$` | -| `shipping_preference` | `String` | Optional | The shipping preference. This only applies to PayPal payment source.
**Default**: `'GET_FROM_FILE'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `vault_instruction` | `String` | Optional | Vault Instruction on action to be performed after a successful payer approval.
**Default**: `'ON_CREATE_PAYMENT_TOKENS'`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "vault_instruction": "ON_CREATE_PAYMENT_TOKENS", - "brand_name": "brand_name0" -} -``` - diff --git a/doc/models/vault-venmo-request.md b/doc/models/vault-venmo-request.md deleted file mode 100644 index 3d5666a..0000000 --- a/doc/models/vault-venmo-request.md +++ /dev/null @@ -1,43 +0,0 @@ - -# Vault Venmo Request - -## Structure - -`VaultVenmoRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | -| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | -| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `experience_context` | [`VaultVenmoExperienceContext`](../../doc/models/vault-venmo-experience-context.md) | Optional | Customizes the Vault creation flow experience for your customers. | - -## Example (as JSON) - -```json -{ - "permit_multiple_payment_tokens": false, - "description": "description0", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "usage_type": "usage_type0", - "customer_type": "customer_type4" -} -``` - diff --git a/doc/models/vaulted-digital-wallet-shipping-details.md b/doc/models/vaulted-digital-wallet-shipping-details.md deleted file mode 100644 index d36f226..0000000 --- a/doc/models/vaulted-digital-wallet-shipping-details.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Vaulted Digital Wallet Shipping Details - -The shipping details. - -## Structure - -`VaultedDigitalWalletShippingDetails` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `name` | [`ShippingName`](../../doc/models/shipping-name.md) | Optional | The name of the party. | -| `type` | [`FullfillmentType`](../../doc/models/fullfillment-type.md) | Optional | A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | - -## Example (as JSON) - -```json -{ - "name": { - "full_name": "full_name6" - }, - "type": "PICKUP_IN_STORE", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } -} -``` - diff --git a/doc/models/vaulted-digital-wallet.md b/doc/models/vaulted-digital-wallet.md deleted file mode 100644 index 591bbe6..0000000 --- a/doc/models/vaulted-digital-wallet.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Vaulted Digital Wallet - -Resource consolidating common request and response attributes for vaulting a Digital Wallet. - -## Structure - -`VaultedDigitalWallet` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | -| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | -| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "permit_multiple_payment_tokens": false, - "description": "description2", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "usage_type": "usage_type2", - "customer_type": "customer_type6" -} -``` - diff --git a/doc/models/venmo-payment-token-customer-type.md b/doc/models/venmo-payment-token-customer-type.md deleted file mode 100644 index 229a38c..0000000 --- a/doc/models/venmo-payment-token-customer-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Venmo Payment Token Customer Type - -The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. - -## Enumeration - -`VenmoPaymentTokenCustomerType` - -## Fields - -| Name | -| --- | -| `CONSUMER` | -| `BUSINESS` | - diff --git a/doc/models/venmo-payment-token-usage-pattern.md b/doc/models/venmo-payment-token-usage-pattern.md deleted file mode 100644 index a6ab607..0000000 --- a/doc/models/venmo-payment-token-usage-pattern.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Venmo Payment Token Usage Pattern - -Expected business/pricing model for the billing agreement. - -## Enumeration - -`VenmoPaymentTokenUsagePattern` - -## Fields - -| Name | -| --- | -| `IMMEDIATE` | -| `DEFERRED` | -| `RECURRING_PREPAID` | -| `RECURRING_POSTPAID` | -| `THRESHOLD_PREPAID` | -| `THRESHOLD_POSTPAID` | - diff --git a/doc/models/venmo-payment-token-usage-type.md b/doc/models/venmo-payment-token-usage-type.md deleted file mode 100644 index 6a67f04..0000000 --- a/doc/models/venmo-payment-token-usage-type.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Venmo Payment Token Usage Type - -The usage type associated with the Venmo payment token. - -## Enumeration - -`VenmoPaymentTokenUsageType` - -## Fields - -| Name | -| --- | -| `MERCHANT` | -| `PLATFORM` | - diff --git a/doc/models/venmo-payment-token.md b/doc/models/venmo-payment-token.md deleted file mode 100644 index 9e50b1a..0000000 --- a/doc/models/venmo-payment-token.md +++ /dev/null @@ -1,48 +0,0 @@ - -# Venmo Payment Token - -## Structure - -`VenmoPaymentToken` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `description` | `String` | Optional | The description displayed to the consumer on the approval flow for a digital wallet, as well as on the merchant view of the payment token management experience. exp: PayPal.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^.*$` | -| `shipping` | [`VaultedDigitalWalletShippingDetails`](../../doc/models/vaulted-digital-wallet-shipping-details.md) | Optional | The shipping details. | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.
**Default**: `false` | -| `usage_type` | `String` | Optional | The usage type associated with a digital wallet payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | `String` | Optional | The customer type associated with a digital wallet payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `payer_id` | `String` | Optional | The account identifier for a PayPal account.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone` | [`PhoneWithType`](../../doc/models/phone-with-type.md) | Optional | The phone information. | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `user_name` | `String` | Optional | The Venmo username, as chosen by the user.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[-a-zA-Z0-9_]*$` | - -## Example (as JSON) - -```json -{ - "permit_multiple_payment_tokens": false, - "description": "description4", - "shipping": { - "name": { - "full_name": "full_name6" - }, - "type": "SHIPPING", - "address": { - "address_line_1": "address_line_16", - "address_line_2": "address_line_26", - "admin_area_2": "admin_area_20", - "admin_area_1": "admin_area_12", - "postal_code": "postal_code8", - "country_code": "country_code6" - } - }, - "usage_type": "usage_type4", - "customer_type": "customer_type8" -} -``` - diff --git a/doc/models/venmo-wallet-additional-attributes.md b/doc/models/venmo-wallet-additional-attributes.md deleted file mode 100644 index d586e47..0000000 --- a/doc/models/venmo-wallet-additional-attributes.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Venmo Wallet Additional Attributes - -Additional attributes associated with the use of this Venmo Wallet. - -## Structure - -`VenmoWalletAdditionalAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `customer` | [`VenmoWalletCustomerInformation`](../../doc/models/venmo-wallet-customer-information.md) | Optional | The details about a customer in PayPal's system of record. | -| `vault` | [`VenmoWalletVaultAttributes`](../../doc/models/venmo-wallet-vault-attributes.md) | Optional | Resource consolidating common request and response attirbutes for vaulting Venmo Wallet. | - -## Example (as JSON) - -```json -{ - "customer": { - "id": "id0", - "email_address": "email_address2" - }, - "vault": { - "store_in_vault": "ON_SUCCESS", - "description": "description6", - "usage_pattern": "THRESHOLD_PREPAID", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "permit_multiple_payment_tokens": false - } -} -``` - diff --git a/doc/models/venmo-wallet-attributes-response.md b/doc/models/venmo-wallet-attributes-response.md deleted file mode 100644 index cdcd9e3..0000000 --- a/doc/models/venmo-wallet-attributes-response.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Venmo Wallet Attributes Response - -Additional attributes associated with the use of a Venmo Wallet. - -## Structure - -`VenmoWalletAttributesResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault` | [`VaultResponse`](../../doc/models/vault-response.md) | Optional | The details about a saved payment source. | - -## Example (as JSON) - -```json -{ - "vault": { - "id": "id6", - "status": "APPROVED", - "customer": { - "id": "id0" - }, - "links": [ - { - "href": "href6", - "rel": "rel0", - "method": "HEAD" - } - ] - } -} -``` - diff --git a/doc/models/venmo-wallet-customer-information.md b/doc/models/venmo-wallet-customer-information.md deleted file mode 100644 index a643fee..0000000 --- a/doc/models/venmo-wallet-customer-information.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Venmo Wallet Customer Information - -The details about a customer in PayPal's system of record. - -## Structure - -`VenmoWalletCustomerInformation` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `id` | `String` | Optional | The unique ID for a customer generated by PayPal.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `22`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | - -## Example (as JSON) - -```json -{ - "id": "id4", - "email_address": "email_address2" -} -``` - diff --git a/doc/models/venmo-wallet-experience-context.md b/doc/models/venmo-wallet-experience-context.md deleted file mode 100644 index 3e3c55c..0000000 --- a/doc/models/venmo-wallet-experience-context.md +++ /dev/null @@ -1,25 +0,0 @@ - -# Venmo Wallet Experience Context - -Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
- -## Structure - -`VenmoWalletExperienceContext` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `brand_name` | `String` | Optional | The business name of the merchant. The pattern is defined by an external party and supports Unicode.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `127`, *Pattern*: `^.*$` | -| `shipping_preference` | [`ShippingPreference`](../../doc/models/shipping-preference.md) | Optional | The location from which the shipping address is derived.
**Default**: `ShippingPreference::GET_FROM_FILE`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `24`, *Pattern*: `^[A-Z_]+$` | - -## Example (as JSON) - -```json -{ - "shipping_preference": "GET_FROM_FILE", - "brand_name": "brand_name6" -} -``` - diff --git a/doc/models/venmo-wallet-request.md b/doc/models/venmo-wallet-request.md deleted file mode 100644 index dbe50d3..0000000 --- a/doc/models/venmo-wallet-request.md +++ /dev/null @@ -1,45 +0,0 @@ - -# Venmo Wallet Request - -Information needed to pay using Venmo. - -## Structure - -`VenmoWalletRequest` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `vault_id` | `String` | Optional | The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9a-zA-Z_-]+$` | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `experience_context` | [`VenmoWalletExperienceContext`](../../doc/models/venmo-wallet-experience-context.md) | Optional | Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
| -| `attributes` | [`VenmoWalletAdditionalAttributes`](../../doc/models/venmo-wallet-additional-attributes.md) | Optional | Additional attributes associated with the use of this Venmo Wallet. | - -## Example (as JSON) - -```json -{ - "vault_id": "vault_id2", - "email_address": "email_address2", - "experience_context": { - "brand_name": "brand_name2", - "shipping_preference": "NO_SHIPPING" - }, - "attributes": { - "customer": { - "id": "id0", - "email_address": "email_address2" - }, - "vault": { - "store_in_vault": "ON_SUCCESS", - "description": "description6", - "usage_pattern": "THRESHOLD_PREPAID", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "permit_multiple_payment_tokens": false - } - } -} -``` - diff --git a/doc/models/venmo-wallet-response.md b/doc/models/venmo-wallet-response.md deleted file mode 100644 index 2ae7e13..0000000 --- a/doc/models/venmo-wallet-response.md +++ /dev/null @@ -1,38 +0,0 @@ - -# Venmo Wallet Response - -Venmo wallet response. - -## Structure - -`VenmoWalletResponse` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `email_address` | `String` | Optional | The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.

**Constraints**: *Minimum Length*: `3`, *Maximum Length*: `254`, *Pattern*: `(?:[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{\|}~-]+)*\|(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\|\[(?:(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]\|[0-4][0-9])\|1[0-9][0-9]\|[1-9]?[0-9])\|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]\|\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])` | -| `account_id` | `String` | Optional | The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result.
**Constraints**: *Minimum Length*: `13`, *Maximum Length*: `13`, *Pattern*: `^[2-9A-HJ-NP-Z]{13}$` | -| `user_name` | `String` | Optional | The Venmo user name chosen by the user, also know as a Venmo handle.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `50`, *Pattern*: `^[-a-zA-Z0-9_]*$` | -| `name` | [`Name`](../../doc/models/name.md) | Optional | The name of the party. | -| `phone_number` | [`PhoneNumber`](../../doc/models/phone-number.md) | Optional | The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). | -| `address` | [`Address`](../../doc/models/address.md) | Optional | The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute). | -| `attributes` | [`VenmoWalletAttributesResponse`](../../doc/models/venmo-wallet-attributes-response.md) | Optional | Additional attributes associated with the use of a Venmo Wallet. | - -## Example (as JSON) - -```json -{ - "email_address": "email_address6", - "account_id": "account_id8", - "user_name": "user_name2", - "name": { - "given_name": "given_name2", - "surname": "surname8" - }, - "phone_number": { - "national_number": "national_number6" - } -} -``` - diff --git a/doc/models/venmo-wallet-vault-attributes.md b/doc/models/venmo-wallet-vault-attributes.md deleted file mode 100644 index 596467d..0000000 --- a/doc/models/venmo-wallet-vault-attributes.md +++ /dev/null @@ -1,33 +0,0 @@ - -# Venmo Wallet Vault Attributes - -Resource consolidating common request and response attirbutes for vaulting Venmo Wallet. - -## Structure - -`VenmoWalletVaultAttributes` - -## Fields - -| Name | Type | Tags | Description | -| --- | --- | --- | --- | -| `store_in_vault` | [`StoreInVaultInstruction`](../../doc/models/store-in-vault-instruction.md) | Required | Defines how and when the payment source gets vaulted.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `description` | `String` | Optional | The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128`, *Pattern*: `^[a-zA-Z0-9_'\-., :;\!?"]*$` | -| `usage_pattern` | [`VenmoPaymentTokenUsagePattern`](../../doc/models/venmo-payment-token-usage-pattern.md) | Optional | Expected business/pricing model for the billing agreement.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `30`, *Pattern*: `^[0-9A-Z_]+$` | -| `usage_type` | [`VenmoPaymentTokenUsageType`](../../doc/models/venmo-payment-token-usage-type.md) | Required | The usage type associated with the Venmo payment token.
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `customer_type` | [`VenmoPaymentTokenCustomerType`](../../doc/models/venmo-payment-token-customer-type.md) | Optional | The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.
**Default**: `VenmoPaymentTokenCustomerType::CONSUMER`
**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `255`, *Pattern*: `^[0-9A-Z_]+$` | -| `permit_multiple_payment_tokens` | `TrueClass \| FalseClass` | Optional | Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account.
**Default**: `false` | - -## Example (as JSON) - -```json -{ - "store_in_vault": "ON_SUCCESS", - "usage_type": "MERCHANT", - "customer_type": "CONSUMER", - "permit_multiple_payment_tokens": false, - "description": "description6", - "usage_pattern": "RECURRING_PREPAID" -} -``` - diff --git a/doc/request-logging-configuration.md b/doc/request-logging-configuration.md deleted file mode 100644 index c8f1ae5..0000000 --- a/doc/request-logging-configuration.md +++ /dev/null @@ -1,16 +0,0 @@ - -# RequestLoggingConfiguration - -Represents the logging configuration for API request. - -## Parameters - -| Name | Type | Tag | Description | -| --- | --- | --- | --- | -| log_body | Boolean | optional | Toggles the logging of the request body. **Default : `false`** | -| log_headers | Boolean | optional | Toggles the logging of the request headers. **Default : `false`** | -| headers_to_include | Array | optional | Includes only specified request headers in the log output. **Default : `[]`** | -| headers_to_exclude | Array | optional | Excludes specified request headers from the log output. **Default : `[]`** | -| headers_to_unmask | Array | optional | Logs specified request headers without masking, revealing their actual values. **Default : `[]`** | -| include_query_in_path | Boolean | optional | Toggles the inclusion of query parameters in the logged request path. **Default : `false`** | - diff --git a/doc/response-logging-configuration.md b/doc/response-logging-configuration.md deleted file mode 100644 index 1ae9ff0..0000000 --- a/doc/response-logging-configuration.md +++ /dev/null @@ -1,15 +0,0 @@ - -# ResponseLoggingConfiguration - -Represents the logging configuration for API response. - -## Parameters - -| Name | Type | Tag | Description | -| --- | --- | --- | --- | -| log_body | Boolean | optional | Toggles the logging of the response body. **Default : `false`** | -| log_headers | Boolean | optional | Toggles the logging of the response headers. **Default : `false`** | -| headers_to_include | Array | optional | Includes only specified response headers in the log output. **Default : `[]`** | -| headers_to_exclude | Array | optional | Excludes specified request headers from the log output. **Default : `[]`** | -| headers_to_unmask | Array | optional | Logs specified request headers without masking, revealing their actual values. **Default : `[]`** | - diff --git a/doc/utility-classes.md b/doc/utility-classes.md deleted file mode 100644 index 747b2d9..0000000 --- a/doc/utility-classes.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Utility Classes Documentation - -## ApiHelper Class - -API utility class. - -## Methods - -| Name | Return Type | Description | -| --- | --- | --- | -| json_deserialize | Hash | Deserializes a JSON string to a Ruby Hash. | -| rfc3339 | DateTime | Safely converts a string into an RFC3339 DateTime object. | - -## DateTimeHelper Class - -DateTime utility class. - -## Methods - -| Name | Return Type | Description | -| --- | --- | --- | -| from_rfc3339 | DateTime | Safely converts a string into an RFC3339 DateTime object. | -| from_rfc1123 | DateTime | Safely converts a string into an RFC1123 DateTime object. | -| from_unix | DateTime | Safely converts a string into an Unix DateTime object. | -| to_rfc3339 | DateTime_String | Safely converts a RFC3339 DateTime object into a DateTime string. | -| to_rfc1123 | DateTime_String | Safely converts a RFC1123 DateTime object into a DateTime string. | -| to_unix | DateTime_String | Safely converts a Unix DateTime object into a DateTime string. | -| to_rfc3339_map | Map_Of_DateTime_String | Safely converts a map of RFC3339 DateTime object into a map of RFC3339 formatted DateTime string. | -| to_rfc3339_array | Array_Of_DateTime_String | Safely converts an array of RFC3339 DateTime object into an array of RFC3339 formatted DateTime string. | -| to_rfc1123_map | Map_Of_DateTime_String | Safely converts a map of RFC1123 DateTime object into map of RFC1123 formatted DateTime string. | -| to_rfc1123_array | Array_Of_DateTime_String | Safely converts an array of RFC1123 DateTime object into an array of RFC1123 formatted DateTime string. | -| to_unix_map | Map_Of_DateTime_String | Safely converts a map of Unix DateTime object into a map of Unix formatted DateTime string. | -| to_unix_array | Array_Of_DateTime_String | Safely converts an array of Unix DateTime object into an array of Unix formatted DateTime string. | - diff --git a/lib/pay_pal_restap_is.rb b/lib/pay_pal_restap_is.rb deleted file mode 100644 index f744eee..0000000 --- a/lib/pay_pal_restap_is.rb +++ /dev/null @@ -1,306 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -require 'date' -require 'json' - -require 'apimatic_core_interfaces' -require 'apimatic_core' -require 'apimatic_faraday_client_adapter' - -require_relative 'pay_pal_restap_is/api_helper' -require_relative 'pay_pal_restap_is/client' - -# Utilities -require_relative 'pay_pal_restap_is/utilities/file_wrapper' -require_relative 'pay_pal_restap_is/utilities/date_time_helper' - -# Http -require_relative 'pay_pal_restap_is/http/api_response' -require_relative 'pay_pal_restap_is/http/http_call_back' -require_relative 'pay_pal_restap_is/http/http_method_enum' -require_relative 'pay_pal_restap_is/http/http_request' -require_relative 'pay_pal_restap_is/http/http_response' - -# Logger -require_relative 'pay_pal_restap_is/logging/configuration/' \ - 'api_logging_configuration' -require_relative 'pay_pal_restap_is/logging/sdk_logger' -require_relative 'pay_pal_restap_is/http/auth/o_auth2' - -# Models -require_relative 'pay_pal_restap_is/models/base_model' -require_relative 'pay_pal_restap_is/models/activity_timestamps' -require_relative 'pay_pal_restap_is/models/amount_breakdown' -require_relative 'pay_pal_restap_is/models/amount_with_breakdown' -require_relative 'pay_pal_restap_is/models/apple_pay_payment_object' -require_relative 'pay_pal_restap_is/models/apple_pay_attributes' -require_relative 'pay_pal_restap_is/models/apple_pay_attributes_response' -require_relative 'pay_pal_restap_is/models/apple_pay_card_response' -require_relative 'pay_pal_restap_is/models/apple_pay_decrypted_token_data' -require_relative 'pay_pal_restap_is/models/apple_pay_payment_data' -require_relative 'pay_pal_restap_is/models/apple_pay_request' -require_relative 'pay_pal_restap_is/models/authentication_response' -require_relative 'pay_pal_restap_is/models/authorization' -require_relative 'pay_pal_restap_is/models/link_description' -require_relative 'pay_pal_restap_is/models/authorization_status_with_details' -require_relative 'pay_pal_restap_is/models/authorization_status_details' -require_relative 'pay_pal_restap_is/models/authorization_with_additional_data' -require_relative 'pay_pal_restap_is/models/bancontact_payment_object' -require_relative 'pay_pal_restap_is/models/bancontact_payment_request' -require_relative 'pay_pal_restap_is/models/bin_details' -require_relative 'pay_pal_restap_is/models/blik_payment_object' -require_relative 'pay_pal_restap_is/models/blik_experience_context' -require_relative 'pay_pal_restap_is/models/blik_one_click_payment_request' -require_relative 'pay_pal_restap_is/models/blik_one_click_payment_object' -require_relative 'pay_pal_restap_is/models/blik_payment_request' -require_relative 'pay_pal_restap_is/models/blik_level0_payment_object' -require_relative 'pay_pal_restap_is/models/capture' -require_relative 'pay_pal_restap_is/models/capture_status_with_details' -require_relative 'pay_pal_restap_is/models/capture_status_details' -require_relative 'pay_pal_restap_is/models/card_attributes' -require_relative 'pay_pal_restap_is/models/card_attributes_response' -require_relative 'pay_pal_restap_is/models/card_experience_context' -require_relative 'pay_pal_restap_is/models/card_from_request' -require_relative 'pay_pal_restap_is/models/card_request' -require_relative 'pay_pal_restap_is/models/card_response' -require_relative 'pay_pal_restap_is/models/card_stored_credential' -require_relative 'pay_pal_restap_is/models/card_supplementary_data' -require_relative 'pay_pal_restap_is/models/card_verification' -require_relative 'pay_pal_restap_is/models/cobranded_card' -require_relative 'pay_pal_restap_is/models/confirm_order_request' -require_relative 'pay_pal_restap_is/models/customer_information' -require_relative 'pay_pal_restap_is/models/platform_fee' -require_relative 'pay_pal_restap_is/models/eps_payment_object' -require_relative 'pay_pal_restap_is/models/eps_payment_request' -require_relative 'pay_pal_restap_is/models/error_details' -require_relative 'pay_pal_restap_is/models/exchange_rate' -require_relative 'pay_pal_restap_is/models/experience_context' -require_relative 'pay_pal_restap_is/models/giropay_payment_object' -require_relative 'pay_pal_restap_is/models/giropay_payment_request' -require_relative 'pay_pal_restap_is/models/google_pay_wallet_response' -require_relative 'pay_pal_restap_is/models/google_pay_card_response' -require_relative 'pay_pal_restap_is/models/google_pay_decrypted_token_data' -require_relative 'pay_pal_restap_is/models/google_pay_request' -require_relative 'pay_pal_restap_is/models/ideal_payment_object' -require_relative 'pay_pal_restap_is/models/ideal_payment_request' -require_relative 'pay_pal_restap_is/models/item' -require_relative 'pay_pal_restap_is/models/level2_card_processing_data' -require_relative 'pay_pal_restap_is/models/level3_card_processing_data' -require_relative 'pay_pal_restap_is/models/line_item' -require_relative 'pay_pal_restap_is/models/money' -require_relative 'pay_pal_restap_is/models/my_bank_payment_object' -require_relative 'pay_pal_restap_is/models/my_bank_payment_request' -require_relative 'pay_pal_restap_is/models/net_amount_breakdown_item' -require_relative 'pay_pal_restap_is/models/network_token' -require_relative 'pay_pal_restap_is/models/network_transaction_reference' -require_relative 'pay_pal_restap_is/models/order' -require_relative 'pay_pal_restap_is/models/order_application_context' -require_relative 'pay_pal_restap_is/models/order_authorize_request' -require_relative 'pay_pal_restap_is/models/order_authorize_response' -require_relative 'pay_pal_restap_is/models/order_capture_request' -require_relative 'pay_pal_restap_is/models/order_confirm_application_context' -require_relative 'pay_pal_restap_is/models/order_request' -require_relative 'pay_pal_restap_is/models/order_tracker_request' -require_relative 'pay_pal_restap_is/models/p24_payment_object' -require_relative 'pay_pal_restap_is/models/p24_payment_request' -require_relative 'pay_pal_restap_is/models/patch' -require_relative 'pay_pal_restap_is/models/payee' -require_relative 'pay_pal_restap_is/models/payee_base' -require_relative 'pay_pal_restap_is/models/payer' -require_relative 'pay_pal_restap_is/models/payer_base' -require_relative 'pay_pal_restap_is/models/payment_collection' -require_relative 'pay_pal_restap_is/models/payment_instruction' -require_relative 'pay_pal_restap_is/models/payment_method_preference' -require_relative 'pay_pal_restap_is/models/payment_source' -require_relative 'pay_pal_restap_is/models/payment_source_response' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_attributes' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_attributes_response' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_customer' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_experience_context' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_response' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_response' -require_relative 'pay_pal_restap_is/models/phone_number' -require_relative 'pay_pal_restap_is/models/phone_with_type' -require_relative 'pay_pal_restap_is/models/processor_response' -require_relative 'pay_pal_restap_is/models/purchase_unit' -require_relative 'pay_pal_restap_is/models/purchase_unit_request' -require_relative 'pay_pal_restap_is/models/refund' -require_relative 'pay_pal_restap_is/models/refund_status_with_details' -require_relative 'pay_pal_restap_is/models/refund_status_details' -require_relative 'pay_pal_restap_is/models/seller_payable_breakdown' -require_relative 'pay_pal_restap_is/models/seller_protection' -require_relative 'pay_pal_restap_is/models/seller_receivable_breakdown' -require_relative 'pay_pal_restap_is/models/shipping_details' -require_relative 'pay_pal_restap_is/models/shipping_option' -require_relative 'pay_pal_restap_is/models/shipping_with_tracking_details' -require_relative 'pay_pal_restap_is/models/sofort_payment_object' -require_relative 'pay_pal_restap_is/models/sofort_payment_request' -require_relative 'pay_pal_restap_is/models/stored_payment_source' -require_relative 'pay_pal_restap_is/models/supplementary_data' -require_relative 'pay_pal_restap_is/models/tax_info' -require_relative 'pay_pal_restap_is/models/' \ - 'three_d_secure_authentication_response' -require_relative 'pay_pal_restap_is/models/token' -require_relative 'pay_pal_restap_is/models/order_tracker_response' -require_relative 'pay_pal_restap_is/models/order_tracker_item' -require_relative 'pay_pal_restap_is/models/trustly_payment_object' -require_relative 'pay_pal_restap_is/models/trustly_payment_request' -require_relative 'pay_pal_restap_is/models/universal_product_code' -require_relative 'pay_pal_restap_is/models/vault_instruction' -require_relative 'pay_pal_restap_is/models/vault_instruction_base' -require_relative 'pay_pal_restap_is/models/vault_response' -require_relative 'pay_pal_restap_is/models/venmo_wallet_vault_attributes' -require_relative 'pay_pal_restap_is/models/venmo_wallet_additional_attributes' -require_relative 'pay_pal_restap_is/models/venmo_wallet_attributes_response' -require_relative 'pay_pal_restap_is/models/venmo_wallet_experience_context' -require_relative 'pay_pal_restap_is/models/venmo_wallet_request' -require_relative 'pay_pal_restap_is/models/venmo_wallet_response' -require_relative 'pay_pal_restap_is/models/address' -require_relative 'pay_pal_restap_is/models/apple_pay_tokenized_card' -require_relative 'pay_pal_restap_is/models/google_pay_card_attributes' -require_relative 'pay_pal_restap_is/models/name' -require_relative 'pay_pal_restap_is/models/' \ - 'order_authorize_request_payment_source' -require_relative 'pay_pal_restap_is/models/' \ - 'order_authorize_response_payment_source' -require_relative 'pay_pal_restap_is/models/order_capture_request_payment_source' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_customer_request' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_instruction' -require_relative 'pay_pal_restap_is/models/phone_number_with_country_code' -require_relative 'pay_pal_restap_is/models/shipping_name' -require_relative 'pay_pal_restap_is/models/vault_customer' -require_relative 'pay_pal_restap_is/models/venmo_wallet_customer_information' -require_relative 'pay_pal_restap_is/models/payment_authorization' -require_relative 'pay_pal_restap_is/models/captured_payment' -require_relative 'pay_pal_restap_is/models/capture_request' -require_relative 'pay_pal_restap_is/models/refund_platform_fee' -require_relative 'pay_pal_restap_is/models/refund_payment_instruction' -require_relative 'pay_pal_restap_is/models/reauthorize_request' -require_relative 'pay_pal_restap_is/models/refund_request' -require_relative 'pay_pal_restap_is/models/related_identifiers' -require_relative 'pay_pal_restap_is/models/payment_supplementary_data' -require_relative 'pay_pal_restap_is/models/supplementary_purchase_data' -require_relative 'pay_pal_restap_is/models/capture_payment_instruction' -require_relative 'pay_pal_restap_is/models/ach_debit_response' -require_relative 'pay_pal_restap_is/models/address_details' -require_relative 'pay_pal_restap_is/models/apple_pay_payment_token' -require_relative 'pay_pal_restap_is/models/bank_payment_token' -require_relative 'pay_pal_restap_is/models/card_payment_token' -require_relative 'pay_pal_restap_is/models/card_response_entity' -require_relative 'pay_pal_restap_is/models/card_verification_details' -require_relative 'pay_pal_restap_is/models/customer_request' -require_relative 'pay_pal_restap_is/models/' \ - 'customer_vault_payment_tokens_response' -require_relative 'pay_pal_restap_is/models/payment_token_request_payment_source' -require_relative 'pay_pal_restap_is/models/vault_experience_context' -require_relative 'pay_pal_restap_is/models/network_transaction_reference_entity' -require_relative 'pay_pal_restap_is/models/' \ - 'payment_token_response_payment_source' -require_relative 'pay_pal_restap_is/models/payment_token_request' -require_relative 'pay_pal_restap_is/models/payment_token_response' -require_relative 'pay_pal_restap_is/models/vault_pay_pal_wallet_request' -require_relative 'pay_pal_restap_is/models/pay_pal_payment_token' -require_relative 'pay_pal_restap_is/models/phone' -require_relative 'pay_pal_restap_is/models/sepa_debit_response' -require_relative 'pay_pal_restap_is/models/setup_token_request' -require_relative 'pay_pal_restap_is/models/setup_token_response' -require_relative 'pay_pal_restap_is/models/vault_token_request' -require_relative 'pay_pal_restap_is/models/vault_sepa_debit_response' -require_relative 'pay_pal_restap_is/models/vault_venmo_request' -require_relative 'pay_pal_restap_is/models/venmo_payment_token' -require_relative 'pay_pal_restap_is/models/vaulted_digital_wallet' -require_relative 'pay_pal_restap_is/models/apple_pay_card' -require_relative 'pay_pal_restap_is/models/card_verification_processor_response' -require_relative 'pay_pal_restap_is/models/payment_token_request_card' -require_relative 'pay_pal_restap_is/models/sepa_debit_authorization_details' -require_relative 'pay_pal_restap_is/models/setup_token_card_experience_context' -require_relative 'pay_pal_restap_is/models/setup_token_request_card' -require_relative 'pay_pal_restap_is/models/setup_token_request_payment_source' -require_relative 'pay_pal_restap_is/models/setup_token_response_card' -require_relative 'pay_pal_restap_is/models/setup_token_response_payment_source' -require_relative 'pay_pal_restap_is/models/vault_venmo_experience_context' -require_relative 'pay_pal_restap_is/models/' \ - 'vaulted_digital_wallet_shipping_details' -require_relative 'pay_pal_restap_is/models/o_auth_token' -require_relative 'pay_pal_restap_is/models/card_brand' -require_relative 'pay_pal_restap_is/models/card_type' -require_relative 'pay_pal_restap_is/models/checkout_payment_intent' -require_relative 'pay_pal_restap_is/models/disbursement_mode' -require_relative 'pay_pal_restap_is/models/dispute_category' -require_relative 'pay_pal_restap_is/models/eci_flag' -require_relative 'pay_pal_restap_is/models/enrollment_status' -require_relative 'pay_pal_restap_is/models/liability_shift_indicator' -require_relative 'pay_pal_restap_is/models/order_status' -require_relative 'pay_pal_restap_is/models/pa_res_status' -require_relative 'pay_pal_restap_is/models/payee_payment_method_preference' -require_relative 'pay_pal_restap_is/models/payment_initiator' -require_relative 'pay_pal_restap_is/models/phone_type' -require_relative 'pay_pal_restap_is/models/processing_instruction' -require_relative 'pay_pal_restap_is/models/shipment_carrier' -require_relative 'pay_pal_restap_is/models/shipping_type' -require_relative 'pay_pal_restap_is/models/store_in_vault_instruction' -require_relative 'pay_pal_restap_is/models/stored_payment_source_payment_type' -require_relative 'pay_pal_restap_is/models/stored_payment_source_usage_type' -require_relative 'pay_pal_restap_is/models/order_tracker_status' -require_relative 'pay_pal_restap_is/models/apple_pay_payment_data_type' -require_relative 'pay_pal_restap_is/models/authorization_incomplete_reason' -require_relative 'pay_pal_restap_is/models/authorization_status' -require_relative 'pay_pal_restap_is/models/avs_code' -require_relative 'pay_pal_restap_is/models/capture_incomplete_reason' -require_relative 'pay_pal_restap_is/models/capture_status' -require_relative 'pay_pal_restap_is/models/card_verification_method' -require_relative 'pay_pal_restap_is/models/cvv_code' -require_relative 'pay_pal_restap_is/models/fullfillment_type' -require_relative 'pay_pal_restap_is/models/google_pay_authentication_method' -require_relative 'pay_pal_restap_is/models/google_pay_payment_method' -require_relative 'pay_pal_restap_is/models/item_category' -require_relative 'pay_pal_restap_is/models/link_http_method' -require_relative 'pay_pal_restap_is/models/' \ - 'order_application_context_landing_page' -require_relative 'pay_pal_restap_is/models/' \ - 'order_application_context_shipping_preference' -require_relative 'pay_pal_restap_is/models/' \ - 'order_application_context_user_action' -require_relative 'pay_pal_restap_is/models/patch_op' -require_relative 'pay_pal_restap_is/models/payment_advice_code' -require_relative 'pay_pal_restap_is/models/pay_pal_experience_landing_page' -require_relative 'pay_pal_restap_is/models/pay_pal_experience_user_action' -require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_customer_type' -require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern' -require_relative 'pay_pal_restap_is/models/pay_pal_payment_token_usage_type' -require_relative 'pay_pal_restap_is/models/' \ - 'pay_pal_wallet_account_verification_status' -require_relative 'pay_pal_restap_is/models/pay_pal_wallet_vault_status' -require_relative 'pay_pal_restap_is/models/processor_response_code' -require_relative 'pay_pal_restap_is/models/refund_incomplete_reason' -require_relative 'pay_pal_restap_is/models/refund_status' -require_relative 'pay_pal_restap_is/models/seller_protection_status' -require_relative 'pay_pal_restap_is/models/shipping_preference' -require_relative 'pay_pal_restap_is/models/standard_entry_class_code' -require_relative 'pay_pal_restap_is/models/tax_id_type' -require_relative 'pay_pal_restap_is/models/token_type' -require_relative 'pay_pal_restap_is/models/upc_type' -require_relative 'pay_pal_restap_is/models/vault_status' -require_relative 'pay_pal_restap_is/models/venmo_payment_token_customer_type' -require_relative 'pay_pal_restap_is/models/venmo_payment_token_usage_pattern' -require_relative 'pay_pal_restap_is/models/venmo_payment_token_usage_type' -require_relative 'pay_pal_restap_is/models/instrument_authorization_status' -require_relative 'pay_pal_restap_is/models/o_auth_provider_error' - -# Exceptions -require_relative 'pay_pal_restap_is/exceptions/api_exception' -require_relative 'pay_pal_restap_is/exceptions/error_exception' -require_relative 'pay_pal_restap_is/exceptions/o_auth_provider_exception' - -require_relative 'pay_pal_restap_is/configuration' - -# Controllers -require_relative 'pay_pal_restap_is/controllers/base_controller' -require_relative 'pay_pal_restap_is/controllers/orders_controller' -require_relative 'pay_pal_restap_is/controllers/payments_controller' -require_relative 'pay_pal_restap_is/controllers/vault_controller' -require_relative 'pay_pal_restap_is/controllers/o_auth_authorization_controller' diff --git a/lib/pay_pal_restap_is/api_helper.rb b/lib/pay_pal_restap_is/api_helper.rb deleted file mode 100644 index bc3ab46..0000000 --- a/lib/pay_pal_restap_is/api_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # API utility class - class APIHelper < CoreLibrary::ApiHelper - end -end diff --git a/lib/pay_pal_restap_is/client.rb b/lib/pay_pal_restap_is/client.rb deleted file mode 100644 index 944f5b6..0000000 --- a/lib/pay_pal_restap_is/client.rb +++ /dev/null @@ -1,89 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # pay_pal_restap_is client class. - class Client - include CoreLibrary - attr_reader :config, :auth_managers - - # Returns the configured authentication Oauth2 instance. - def oauth2 - @auth_managers['Oauth2'] - end - - # Access to orders controller. - # @return [OrdersController] Returns the controller instance. - def orders - @orders ||= OrdersController.new @global_configuration - end - - # Access to payments controller. - # @return [PaymentsController] Returns the controller instance. - def payments - @payments ||= PaymentsController.new @global_configuration - end - - # Access to vault controller. - # @return [VaultController] Returns the controller instance. - def vault - @vault ||= VaultController.new @global_configuration - end - - # Access to o_auth_authorization controller. - # @return [OAuthAuthorizationController] Returns the controller instance. - def o_auth_authorization - @o_auth_authorization ||= OAuthAuthorizationController.new @global_configuration - end - - def initialize( - connection: nil, adapter: :net_http_persistent, timeout: 60, - max_retries: 0, retry_interval: 1, backoff_factor: 2, - retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - retry_methods: %i[get put], http_callback: nil, - logging_configuration: nil, environment: Environment::SANDBOX, - o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, - client_credentials_auth_credentials: nil, config: nil - ) - @config = if config.nil? - Configuration.new( - connection: connection, adapter: adapter, timeout: timeout, - max_retries: max_retries, retry_interval: retry_interval, - backoff_factor: backoff_factor, - retry_statuses: retry_statuses, - retry_methods: retry_methods, http_callback: http_callback, - logging_configuration: logging_configuration, - environment: environment, - o_auth_client_id: o_auth_client_id, - o_auth_client_secret: o_auth_client_secret, - o_auth_token: o_auth_token, - client_credentials_auth_credentials: client_credentials_auth_credentials - ) - else - config - end - user_agent_params = BaseController.user_agent_parameters - - @global_configuration = GlobalConfiguration.new(client_configuration: @config) - .base_uri_executor(@config.method(:get_base_uri)) - .global_errors(BaseController::GLOBAL_ERRORS) - .user_agent(BaseController.user_agent, - agent_parameters: user_agent_params) - - initialize_auth_managers(@global_configuration) - @global_configuration = @global_configuration.auth_managers(@auth_managers) - end - - # Initializes the auth managers hash used for authenticating API calls. - # @param [GlobalConfiguration] global_config The global configuration of the SDK) - def initialize_auth_managers(global_config) - @auth_managers = {} - http_client_config = global_config.client_configuration - %w[Oauth2].each { |auth| @auth_managers[auth] = nil } - @auth_managers['Oauth2'] = OAuth2.new(http_client_config.client_credentials_auth_credentials, - global_config) - end - end -end diff --git a/lib/pay_pal_restap_is/configuration.rb b/lib/pay_pal_restap_is/configuration.rb deleted file mode 100644 index bffee3d..0000000 --- a/lib/pay_pal_restap_is/configuration.rb +++ /dev/null @@ -1,163 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # An enum for SDK environments. - class Environment - # PRODUCTION: PayPal Live Environment - # SANDBOX: PayPal Sandbox Environment - ENVIRONMENT = [ - PRODUCTION = 'Production'.freeze, - SANDBOX = 'Sandbox'.freeze - ].freeze - end - - # An enum for API servers. - class Server - SERVER = [ - DEFAULT = 'default'.freeze - ].freeze - end - - # All configuration including auth info and base URI for the API access - # are configured in this class. - class Configuration < CoreLibrary::HttpClientConfiguration - def o_auth_client_id - @client_credentials_auth_credentials.o_auth_client_id - end - - def o_auth_client_secret - @client_credentials_auth_credentials.o_auth_client_secret - end - - def o_auth_token - @client_credentials_auth_credentials.o_auth_token - end - - # The attribute readers for properties. - attr_reader :environment, :client_credentials_auth_credentials - - class << self - attr_reader :environments - end - - def initialize( - connection: nil, adapter: :net_http_persistent, timeout: 60, - max_retries: 0, retry_interval: 1, backoff_factor: 2, - retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524], - retry_methods: %i[get put], http_callback: nil, - logging_configuration: nil, environment: Environment::SANDBOX, - o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, - client_credentials_auth_credentials: nil - ) - - super connection: connection, adapter: adapter, timeout: timeout, - max_retries: max_retries, retry_interval: retry_interval, - backoff_factor: backoff_factor, retry_statuses: retry_statuses, - retry_methods: retry_methods, http_callback: http_callback, - logging_configuration: logging_configuration - - # Current API environment - @environment = String(environment) - - # OAuth 2 Client ID - @o_auth_client_id = o_auth_client_id - - # OAuth 2 Client Secret - @o_auth_client_secret = o_auth_client_secret - - # Object for storing information about the OAuth token - @o_auth_token = if o_auth_token.is_a? OAuthToken - OAuthToken.from_hash o_auth_token.to_hash - else - o_auth_token - end - - # Initializing OAuth 2 Client Credentials Grant credentials with the provided auth parameters - @client_credentials_auth_credentials = create_auth_credentials_object( - o_auth_client_id, o_auth_client_secret, o_auth_token, - client_credentials_auth_credentials - ) - - # The Http Client to use for making requests. - set_http_client CoreLibrary::FaradayClient.new(self) - end - - def clone_with(connection: nil, adapter: nil, timeout: nil, - max_retries: nil, retry_interval: nil, backoff_factor: nil, - retry_statuses: nil, retry_methods: nil, http_callback: nil, - logging_configuration: nil, environment: nil, - o_auth_client_id: nil, o_auth_client_secret: nil, - o_auth_token: nil, client_credentials_auth_credentials: nil) - connection ||= self.connection - adapter ||= self.adapter - timeout ||= self.timeout - max_retries ||= self.max_retries - retry_interval ||= self.retry_interval - backoff_factor ||= self.backoff_factor - retry_statuses ||= self.retry_statuses - retry_methods ||= self.retry_methods - http_callback ||= self.http_callback - logging_configuration ||= self.logging_configuration - environment ||= self.environment - client_credentials_auth_credentials = create_auth_credentials_object( - o_auth_client_id, o_auth_client_secret, o_auth_token, - client_credentials_auth_credentials || self.client_credentials_auth_credentials - ) - - Configuration.new( - connection: connection, adapter: adapter, timeout: timeout, - max_retries: max_retries, retry_interval: retry_interval, - backoff_factor: backoff_factor, retry_statuses: retry_statuses, - retry_methods: retry_methods, http_callback: http_callback, - logging_configuration: logging_configuration, environment: environment, - client_credentials_auth_credentials: client_credentials_auth_credentials - ) - end - - def create_auth_credentials_object(o_auth_client_id, o_auth_client_secret, - o_auth_token, - client_credentials_auth_credentials) - return client_credentials_auth_credentials if o_auth_client_id.nil? && - o_auth_client_secret.nil? && - o_auth_token.nil? - - warn('The \'o_auth_client_id\', \'o_auth_client_secret\', \'o_auth_token'\ - '\' params are deprecated. Use \'client_credentials_auth_credential'\ - 's\' param instead.') - - unless client_credentials_auth_credentials.nil? - return client_credentials_auth_credentials.clone_with( - o_auth_client_id: o_auth_client_id, - o_auth_client_secret: o_auth_client_secret, - o_auth_token: o_auth_token - ) - end - - ClientCredentialsAuthCredentials.new( - o_auth_client_id: o_auth_client_id, - o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token - ) - end - - # All the environments the SDK can run in. - ENVIRONMENTS = { - Environment::PRODUCTION => { - Server::DEFAULT => 'https://api-m.paypal.com' - }, - Environment::SANDBOX => { - Server::DEFAULT => 'https://api-m.sandbox.paypal.com' - } - }.freeze - - # Generates the appropriate base URI for the environment and the server. - # @param [Configuration::Server] server The server enum for which the base URI is - # required. - # @return [String] The base URI. - def get_base_uri(server = Server::DEFAULT) - ENVIRONMENTS[environment][server].clone - end - end -end diff --git a/lib/pay_pal_restap_is/controllers/base_controller.rb b/lib/pay_pal_restap_is/controllers/base_controller.rb deleted file mode 100644 index 66a4b91..0000000 --- a/lib/pay_pal_restap_is/controllers/base_controller.rb +++ /dev/null @@ -1,71 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # BaseController. - class BaseController - include CoreLibrary - attr_accessor :config, :http_call_back - - def self.user_agent - 'PayPal REST API Ruby SDK, Version: 2.16.0, on OS {os-info}' - end - - def self.user_agent_parameters - { - '{os-info}' => { 'value' => RUBY_PLATFORM, 'encode' => false } - } - end - - GLOBAL_ERRORS = { - 'default' => ErrorCase.new - .error_message('HTTP response not OK.') - .exception_type(APIException) - }.freeze - - # Initialization constructor. - # @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration. - def initialize(global_configuration) - @global_configuration = global_configuration - @config = @global_configuration.client_configuration - @http_call_back = @config.http_callback - @api_call = ApiCall.new(@global_configuration) - end - - # Creates a new builder for the Api Call instance. - # @return [ApiCall] The instance of ApiCall. - def new_api_call_builder - @api_call.new_builder - end - - # Creates a new instance of the request builder. - # @param [String] http_method The HTTP method to use in the request. - # @param [String] path The endpoint path to use in the request. - # @param [String] server The server to extract the base uri for the request. - # @return [RequestBuilder] The instance of RequestBuilder. - def new_request_builder(http_method, path, server) - RequestBuilder.new - .http_method(http_method) - .path(path) - .server(server) - end - - # Creates a new instance of the response handler. - # @return [ResponseHandler] The instance of ResponseHandler. - def new_response_handler - ResponseHandler.new - end - - # Creates a new instance of the parameter. - # @param [String|optional] key The key of the parameter. - # @param [Object] value The value of the parameter. - # @return [Parameter] The instance of Parameter. - def new_parameter(value, key: nil) - Parameter.new - .key(key) - .value(value) - end - end -end diff --git a/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb b/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb deleted file mode 100644 index 8eca236..0000000 --- a/lib/pay_pal_restap_is/controllers/o_auth_authorization_controller.rb +++ /dev/null @@ -1,42 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OAuthAuthorizationController - class OAuthAuthorizationController < BaseController - # Create a new OAuth 2 token. - # @param [String] authorization Required parameter: Authorization header in - # Basic auth format - # @param [String] scope Optional parameter: Requested scopes as a - # space-delimited list. - # @param [Hash] _field_parameters Additional optional form parameters are - # supported by this endpoint. - # @return [ApiResponse] the complete http response with raw body and status code. - def request_token(options = {}, - _field_parameters: nil) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v1/oauth2/token', - Server::DEFAULT) - .form_param(new_parameter('client_credentials', key: 'grant_type')) - .header_param(new_parameter(options['authorization'], key: 'Authorization')) - .form_param(new_parameter(options['scope'], key: 'scope')) - .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) - .header_param(new_parameter('application/json', key: 'accept')) - .additional_form_params(_field_parameters)) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(OAuthToken.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'OAuth 2 provider returned an error.', - OAuthProviderException) - .local_error('401', - 'OAuth 2 provider says client authentication failed.', - OAuthProviderException)) - .execute - end - end -end diff --git a/lib/pay_pal_restap_is/controllers/orders_controller.rb b/lib/pay_pal_restap_is/controllers/orders_controller.rb deleted file mode 100644 index 32fc497..0000000 --- a/lib/pay_pal_restap_is/controllers/orders_controller.rb +++ /dev/null @@ -1,517 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OrdersController - class OrdersController < BaseController - # Creates an order. Merchants and partners can add Level 2 and 3 data to - # payments to reduce risk and payment processing costs. For more information - # about processing payments, see che - # ckout or multiparty checkout.
Note: For - # error handling and troubleshooting, see Orders v2 - # errors.
- # @param [OrderRequest] body Required parameter: Example: - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 6 hours. The API callers can request the times to up to 72 hours - # by speaking to their Account Manager. - # @param [String] pay_pal_partner_attribution_id Optional parameter: - # Example: - # @param [String] pay_pal_client_metadata_id Optional parameter: Example: - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @return [ApiResponse] the complete http response with raw body and status code. - def orders_create(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/checkout/orders', - Server::DEFAULT) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['pay_pal_partner_attribution_id'], key: 'PayPal-Partner-Attribution-Id')) - .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Order.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Shows details for an order, by ID.
Note: For - # error handling and troubleshooting, see Orders v2 - # errors.
- # @param [String] id Required parameter: The ID of the order for which to - # show details. - # @param [String] fields Optional parameter: A comma-separated list of - # fields that should be returned for the order. Valid filter field is - # `payment_source`. - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_get(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v2/checkout/orders/{id}', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .query_param(new_parameter(options['fields'], key: 'fields')) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Order.method(:from_hash)) - .is_api_response(true) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Updates an order with a `CREATED` or `APPROVED` status. You cannot update - # an order with the `COMPLETED` status.

To make an update, you must - # provide a `reference_id`. If you omit this value with an order that - # contains only one purchase unit, PayPal sets the value to `default` which - # enables you to use the path: - # \"/purchase_units/@reference_id=='default'/{attribute-or-object}\". Merchants and partners can add Level 2 and 3 data to payments to - # reduce risk and payment processing costs. For more information about - # processing payments, see che - # ckout or multiparty checkout.
Note: For - # error handling and troubleshooting, see Orders v2 - # errors.
Patchable attributes or - # objects:

< - # /tr> - # - #
AttributeOpNotes
intentreplace
payerreplace, addUsing replace - # op for payer will replace the whole payer object - # with the value sent in - # request.
purchase_unitsreplace, - # add
purchase_units[].custom_idreplace, add, - # remove
purchase_units[].description - # replace, add, - # remove
purchase_units[].payee.email - # replace
purchase_units[].shipping - # .namereplace, - # add
purchase_units[].shipping.email_addres - # sreplace, - # add
purchase_units[].shipping.phone_number - # replace, - # add
purchase_units[].shipping.optionsreplace, - # add
purchase_units[].shipping.addressreplace, - # add
purchase_units[].shipping.type< - # /td>replace, - # add
purchase_units[].soft_descriptorreplace, - # remove
purchase_units[].amountreplace
purchase_units[].items< - # /td>replace, add, - # remove
purchase_units[].invoice_id< - # /td>replace, add, - # remove
purchase_units[].payment_instructio - # nreplace
purchase_units[]. - # payment_instruction.disbursement_modereplaceBy - # default, disbursement_mode is - # INSTANT.
purchase_units[].payment_inst - # ruction.payee_receivable_fx_rate_idreplace, add, - # remove
purchase_units[].payment_instructio - # n.platform_feesreplace, add, - # remove
purchase_units[].supplementary_data - # .airlinereplace, add, - # remove
purchase_units[].supplementary_data - # .cardreplace, add, - # remove
application_context.client_configur - # ationreplace, add
- # @param [String] id Required parameter: The ID of the order to update. - # @param [Array[Patch]] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_patch(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::PATCH, - '/v2/checkout/orders/{id}', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .is_response_void(true) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Payer confirms their intent to pay for the the Order with the given - # payment source. - # @param [String] id Required parameter: The ID of the order for which the - # payer confirms their intent to pay. - # @param [String] pay_pal_client_metadata_id Optional parameter: Example: - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [ConfirmOrderRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_confirm(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/checkout/orders/{id}/confirm-payment-source', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Order.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Authorizes payment for an order. To successfully authorize payment for an - # order, the buyer must first approve the order or a valid payment_source - # must be provided in the request. A buyer can approve the order upon being - # redirected to the rel:approve URL that was returned in the HATEOAS links - # in the create order response.
Note: For error - # handling and troubleshooting, see Orders v2 - # errors.
- # @param [String] id Required parameter: The ID of the order for which to - # authorize. - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 6 hours. The API callers can request the times to up to 72 hours - # by speaking to their Account Manager. - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [String] pay_pal_client_metadata_id Optional parameter: Example: - # @param [String] pay_pal_auth_assertion Optional parameter: An - # API-caller-provided JSON Web Token (JWT) assertion that identifies the - # merchant. For details, see PayPal-Auth-Assertion - # . - # @param [OrderAuthorizeRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_authorize(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/checkout/orders/{id}/authorize', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) - .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(OrderAuthorizeResponse.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The authorized payment failed due to insufficient permissions'\ - '.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Captures payment for an order. To successfully capture payment for an - # order, the buyer must first approve the order or a valid payment_source - # must be provided in the request. A buyer can approve the order upon being - # redirected to the rel:approve URL that was returned in the HATEOAS links - # in the create order response.
Note: For error - # handling and troubleshooting, see Orders v2 - # errors.
- # @param [String] id Required parameter: The ID of the order for which to - # capture a payment. - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 6 hours. The API callers can request the times to up to 72 hours - # by speaking to their Account Manager. - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [String] pay_pal_client_metadata_id Optional parameter: Example: - # @param [String] pay_pal_auth_assertion Optional parameter: An - # API-caller-provided JSON Web Token (JWT) assertion that identifies the - # merchant. For details, see PayPal-Auth-Assertion - # . - # @param [OrderCaptureRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_capture(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/checkout/orders/{id}/capture', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .header_param(new_parameter(options['pay_pal_client_metadata_id'], key: 'PayPal-Client-Metadata-Id')) - .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Order.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The authorized payment failed due to insufficient permissions'\ - '.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Adds tracking information for an Order. - # @param [String] id Required parameter: The ID of the order that the - # tracking information is associated with. - # @param [OrderTrackerRequest] body Required parameter: Example: - # @param [String] pay_pal_auth_assertion Optional parameter: An - # API-caller-provided JSON Web Token (JWT) assertion that identifies the - # merchant. For details, see PayPal-Auth-Assertion - # . - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_track_create(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/checkout/orders/{id}/track', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Order.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Updates or cancels the tracking information for a PayPal order, by ID. - # Updatable attributes or - # objects:

AttributeOpNotes
itemsreplaceUs - # ing replace op for items will replace the entire - # items object with the value sent in - # request.
notify_payerreplace, - # add
statusreplace - # Only patching status to CANCELLED is currently - # supported.
- # @param [String] id Required parameter: The ID of the order that the - # tracking information is associated with. - # @param [String] tracker_id Required parameter: The order tracking ID. - # @param [Array[Patch]] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def orders_trackers_patch(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::PATCH, - '/v2/checkout/orders/{id}/trackers/{tracker_id}', - Server::DEFAULT) - .template_param(new_parameter(options['id'], key: 'id') - .should_encode(true)) - .template_param(new_parameter(options['tracker_id'], key: 'tracker_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .is_response_void(true) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - end -end diff --git a/lib/pay_pal_restap_is/controllers/payments_controller.rb b/lib/pay_pal_restap_is/controllers/payments_controller.rb deleted file mode 100644 index 3b91d3c..0000000 --- a/lib/pay_pal_restap_is/controllers/payments_controller.rb +++ /dev/null @@ -1,400 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # PaymentsController - class PaymentsController < BaseController - # Shows details for an authorized payment, by ID. - # @param [String] authorization_id Required parameter: The ID of the - # authorized payment for which to show details. - # @return [ApiResponse] the complete http response with raw body and status code. - def authorizations_get(authorization_id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v2/payments/authorizations/{authorization_id}', - Server::DEFAULT) - .template_param(new_parameter(authorization_id, key: 'authorization_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(PaymentAuthorization.method(:from_hash)) - .is_api_response(true) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Captures an authorized payment, by ID. - # @param [String] authorization_id Required parameter: The PayPal-generated - # ID for the authorized payment to capture. - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 45 days. - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [CaptureRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def authorizations_capture(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/payments/authorizations/{authorization_id}/capture', - Server::DEFAULT) - .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(CapturedPayment.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'The request failed because it is not well-formed or is'\ - ' syntactically incorrect or violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('422', - 'The request failed because it is semantically incorrect or'\ - ' failed business validation.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Reauthorizes an authorized PayPal account payment, by ID. To ensure that - # funds are still available, reauthorize a payment after its initial - # three-day honor period expires. Within the 29-day authorization period, - # you can issue multiple re-authorizations after the honor period - # expires.

If 30 days have transpired since the date of the - # original authorization, you must create an authorized payment instead of - # reauthorizing the original authorized payment.

A reauthorized - # payment itself has a new honor period of three days.

You can - # reauthorize an authorized payment from 4 to 29 days after the 3-day honor - # period. The allowed amount depends on context and geography, for example - # in US it is up to 115% of the original authorized amount, not to exceed an - # increase of $75 USD.

Supports only the `amount` request - # parameter.
Note: This request is currently not - # supported for Partner use cases.
- # @param [String] authorization_id Required parameter: The PayPal-generated - # ID for the authorized payment to reauthorize. - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 45 days. - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [ReauthorizeRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def authorizations_reauthorize(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/payments/authorizations/{authorization_id}/reauthorize', - Server::DEFAULT) - .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(PaymentAuthorization.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'The request failed because it is not well-formed or is'\ - ' syntactically incorrect or violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('422', - 'The request failed because it either is semantically incorrect'\ - ' or failed business validation.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Voids, or cancels, an authorized payment, by ID. You cannot void an - # authorized payment that has been fully captured. - # @param [String] authorization_id Required parameter: The PayPal-generated - # ID for the authorized payment to void. - # @param [String] pay_pal_auth_assertion Optional parameter: An - # API-caller-provided JSON Web Token (JWT) assertion that identifies the - # merchant. For details, see - # [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse - # rtion).
Note:For three party transactions in - # which a partner is managing the API calls on behalf of a merchant, the - # partner must identify the merchant using either a PayPal-Auth-Assertion - # header or an access token with target_subject.
- # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @return [ApiResponse] the complete http response with raw body and status code. - def authorizations_void(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/payments/authorizations/{authorization_id}/void', - Server::DEFAULT) - .template_param(new_parameter(options['authorization_id'], key: 'authorization_id') - .should_encode(true)) - .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .is_nullable_response(true) - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(PaymentAuthorization.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'The request failed because it is not well-formed or is'\ - ' syntactically incorrect or violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('409', - 'The request failed because a previous call for the given'\ - ' resource is in progress.', - ErrorException) - .local_error('422', - 'The request failed because it either is semantically incorrect'\ - ' or failed business validation.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Shows details for a captured payment, by ID. - # @param [String] capture_id Required parameter: The PayPal-generated ID for - # the captured payment for which to show details. - # @return [ApiResponse] the complete http response with raw body and status code. - def captures_get(capture_id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v2/payments/captures/{capture_id}', - Server::DEFAULT) - .template_param(new_parameter(capture_id, key: 'capture_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(CapturedPayment.method(:from_hash)) - .is_api_response(true) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Refunds a captured payment, by ID. For a full refund, include an empty - # payload in the JSON request body. For a partial refund, include an - # amount object in the JSON request body. - # @param [String] capture_id Required parameter: The PayPal-generated ID for - # the captured payment to refund. - # @param [String] pay_pal_request_id Optional parameter: The server stores - # keys for 45 days. - # @param [String] prefer Optional parameter: The preferred server response - # upon successful completion of the request. Value - # is:
  • return=minimal. The server returns a minimal - # response to optimize communication between the API caller and the server. - # A minimal response includes the id, status and - # HATEOAS links.
  • return=representation. The server - # returns a complete resource representation, including the current state of - # the resource.
- # @param [String] pay_pal_auth_assertion Optional parameter: An - # API-caller-provided JSON Web Token (JWT) assertion that identifies the - # merchant. For details, see - # [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-asse - # rtion).
Note:For three party transactions in - # which a partner is managing the API calls on behalf of a merchant, the - # partner must identify the merchant using either a PayPal-Auth-Assertion - # header or an access token with target_subject.
- # @param [RefundRequest] body Optional parameter: Example: - # @return [ApiResponse] the complete http response with raw body and status code. - def captures_refund(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v2/payments/captures/{capture_id}/refund', - Server::DEFAULT) - .template_param(new_parameter(options['capture_id'], key: 'capture_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter(options['prefer'], key: 'Prefer')) - .header_param(new_parameter(options['pay_pal_auth_assertion'], key: 'PayPal-Auth-Assertion')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Refund.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'The request failed because it is not well-formed or is'\ - ' syntactically incorrect or violates schema.', - ErrorException) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('409', - 'The request failed because a previous call for the given'\ - ' resource is in progress.', - ErrorException) - .local_error('422', - 'The request failed because it either is semantically incorrect'\ - ' or failed business validation.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - - # Shows details for a refund, by ID. - # @param [String] refund_id Required parameter: The PayPal-generated ID for - # the refund for which to show details. - # @return [ApiResponse] the complete http response with raw body and status code. - def refunds_get(refund_id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v2/payments/refunds/{refund_id}', - Server::DEFAULT) - .template_param(new_parameter(refund_id, key: 'refund_id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(Refund.method(:from_hash)) - .is_api_response(true) - .local_error('401', - 'Authentication failed due to missing authorization header, or'\ - ' invalid authentication credentials.', - ErrorException) - .local_error('403', - 'The request failed because the caller has insufficient'\ - ' permissions.', - ErrorException) - .local_error('404', - 'The request failed because the resource does not exist.', - ErrorException) - .local_error('500', - 'The request failed because an internal server error occurred.', - APIException) - .local_error('default', - 'The error response.', - ErrorException)) - .execute - end - end -end diff --git a/lib/pay_pal_restap_is/controllers/vault_controller.rb b/lib/pay_pal_restap_is/controllers/vault_controller.rb deleted file mode 100644 index a2b43c9..0000000 --- a/lib/pay_pal_restap_is/controllers/vault_controller.rb +++ /dev/null @@ -1,224 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # VaultController - class VaultController < BaseController - # Creates a Payment Token from the given payment source and adds it to the - # Vault of the associated customer. - # @param [String] pay_pal_request_id Required parameter: The server stores - # keys for 3 hours. - # @param [PaymentTokenRequest] body Required parameter: Payment Token - # creation with a financial instrument and an optional customer_id. - # @return [ApiResponse] the complete http response with raw body and status code. - def payment_tokens_create(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v3/vault/payment-tokens', - Server::DEFAULT) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(PaymentTokenResponse.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('404', - 'Request contains reference to resources that do not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - - # Returns all payment tokens for a customer. - # @param [String] customer_id Required parameter: A unique identifier - # representing a specific customer in merchant's/partner's system or - # records. - # @param [Integer] page_size Optional parameter: A non-negative, non-zero - # integer indicating the maximum number of results to return at one time. - # @param [Integer] page Optional parameter: A non-negative, non-zero integer - # representing the page of the results. - # @param [TrueClass | FalseClass] total_required Optional parameter: A - # boolean indicating total number of items (total_items) and pages - # (total_pages) are expected to be returned in the response. - # @return [ApiResponse] the complete http response with raw body and status code. - def customer_payment_tokens_get(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v3/vault/payment-tokens', - Server::DEFAULT) - .query_param(new_parameter(options['customer_id'], key: 'customer_id')) - .query_param(new_parameter(options['page_size'], key: 'page_size')) - .query_param(new_parameter(options['page'], key: 'page')) - .query_param(new_parameter(options['total_required'], key: 'total_required')) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(CustomerVaultPaymentTokensResponse.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - - # Returns a readable representation of vaulted payment source associated - # with the payment token id. - # @param [String] id Required parameter: ID of the payment token. - # @return [ApiResponse] the complete http response with raw body and status code. - def payment_tokens_get(id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v3/vault/payment-tokens/{id}', - Server::DEFAULT) - .template_param(new_parameter(id, key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(PaymentTokenResponse.method(:from_hash)) - .is_api_response(true) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - - # Delete the payment token associated with the payment token id. - # @param [String] id Required parameter: ID of the payment token. - # @return [ApiResponse] the complete http response with raw body and status code. - def payment_tokens_delete(id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::DELETE, - '/v3/vault/payment-tokens/{id}', - Server::DEFAULT) - .template_param(new_parameter(id, key: 'id') - .should_encode(true)) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .is_response_void(true) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - - # Creates a Setup Token from the given payment source and adds it to the - # Vault of the associated customer. - # @param [String] pay_pal_request_id Required parameter: The server stores - # keys for 3 hours. - # @param [SetupTokenRequest] body Required parameter: Setup Token creation - # with a instrument type optional financial instrument details and - # customer_id. - # @return [ApiResponse] the complete http response with raw body and status code. - def setup_tokens_create(options = {}) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::POST, - '/v3/vault/setup-tokens', - Server::DEFAULT) - .header_param(new_parameter(options['pay_pal_request_id'], key: 'PayPal-Request-Id')) - .header_param(new_parameter('application/json', key: 'Content-Type')) - .body_param(new_parameter(options['body'])) - .header_param(new_parameter('application/json', key: 'accept')) - .body_serializer(proc do |param| param.to_json unless param.nil? end) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(SetupTokenResponse.method(:from_hash)) - .is_api_response(true) - .local_error('400', - 'Request is not well-formed, syntactically incorrect, or'\ - ' violates schema.', - ErrorException) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - - # Returns a readable representation of temporarily vaulted payment source - # associated with the setup token id. - # @param [String] id Required parameter: ID of the setup token. - # @return [ApiResponse] the complete http response with raw body and status code. - def setup_tokens_get(id) - new_api_call_builder - .request(new_request_builder(HttpMethodEnum::GET, - '/v3/vault/setup-tokens/{id}', - Server::DEFAULT) - .template_param(new_parameter(id, key: 'id') - .should_encode(true)) - .header_param(new_parameter('application/json', key: 'accept')) - .auth(Single.new('Oauth2'))) - .response(new_response_handler - .deserializer(APIHelper.method(:custom_type_deserializer)) - .deserialize_into(SetupTokenResponse.method(:from_hash)) - .is_api_response(true) - .local_error('403', - 'Authorization failed due to insufficient permissions.', - ErrorException) - .local_error('404', - 'The specified resource does not exist.', - ErrorException) - .local_error('422', - 'The requested action could not be performed, semantically'\ - ' incorrect, or failed business validation.', - ErrorException) - .local_error('500', - 'An internal server error has occurred.', - ErrorException)) - .execute - end - end -end diff --git a/lib/pay_pal_restap_is/exceptions/api_exception.rb b/lib/pay_pal_restap_is/exceptions/api_exception.rb deleted file mode 100644 index 5efa0e6..0000000 --- a/lib/pay_pal_restap_is/exceptions/api_exception.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Class for exceptions when there is a network error, status code error, etc. - class APIException < CoreLibrary::ApiException - end -end diff --git a/lib/pay_pal_restap_is/exceptions/error_exception.rb b/lib/pay_pal_restap_is/exceptions/error_exception.rb deleted file mode 100644 index fb6d096..0000000 --- a/lib/pay_pal_restap_is/exceptions/error_exception.rb +++ /dev/null @@ -1,71 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The error details. - class ErrorException < APIException - SKIP = Object.new - private_constant :SKIP - - # The human-readable, unique name of the error. - # @return [String] - attr_accessor :name - - # The message that describes the error. - # @return [String] - attr_accessor :message - - # The PayPal internal ID. Used for correlation purposes. - # @return [String] - attr_accessor :debug_id - - # An array of additional details about the error. - # @return [Array[ErrorDetails]] - attr_accessor :details - - # An array of request-related [HATEOAS - # links](/api/rest/responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The constructor. - # @param [String] The reason for raising an exception. - # @param [HttpResponse] The HttpReponse of the API call. - def initialize(reason, response) - super(reason, response) - hash = APIHelper.json_deserialize(@response.raw_body) - unbox(hash) - end - - # Populates this object by extracting properties from a hash. - # @param [Hash] The deserialized response sent by the server in the - # response body. - def unbox(hash) - @name = hash.key?('name') ? hash['name'] : nil - @message = hash.key?('message') ? hash['message'] : nil - @debug_id = hash.key?('debug_id') ? hash['debug_id'] : nil - # Parameter is an array, so we need to iterate through it - @details = nil - unless hash['details'].nil? - @details = [] - hash['details'].each do |structure| - @details << (ErrorDetails.from_hash(structure) if structure) - end - end - - @details = SKIP unless hash.key?('details') - # Parameter is an array, so we need to iterate through it - @links = nil - unless hash['links'].nil? - @links = [] - hash['links'].each do |structure| - @links << (LinkDescription.from_hash(structure) if structure) - end - end - - @links = SKIP unless hash.key?('links') - end - end -end diff --git a/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb b/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb deleted file mode 100644 index 4f166e0..0000000 --- a/lib/pay_pal_restap_is/exceptions/o_auth_provider_exception.rb +++ /dev/null @@ -1,48 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OAuth 2 Authorization endpoint exception. - class OAuthProviderException < APIException - SKIP = Object.new - private_constant :SKIP - - # Gets or sets error code. - # @return [OAuthProviderError] - attr_accessor :error - - # Gets or sets human-readable text providing additional information on - # error. - # Used to assist the client developer in understanding the error that - # occurred. - # @return [String] - attr_accessor :error_description - - # Gets or sets a URI identifying a human-readable web page with information - # about the error, used to provide the client developer with additional - # information about the error. - # @return [String] - attr_accessor :error_uri - - # The constructor. - # @param [String] The reason for raising an exception. - # @param [HttpResponse] The HttpReponse of the API call. - def initialize(reason, response) - super(reason, response) - hash = APIHelper.json_deserialize(@response.raw_body) - unbox(hash) - end - - # Populates this object by extracting properties from a hash. - # @param [Hash] The deserialized response sent by the server in the - # response body. - def unbox(hash) - @error = hash.key?('error') ? hash['error'] : nil - @error_description = - hash.key?('error_description') ? hash['error_description'] : SKIP - @error_uri = hash.key?('error_uri') ? hash['error_uri'] : SKIP - end - end -end diff --git a/lib/pay_pal_restap_is/http/api_response.rb b/lib/pay_pal_restap_is/http/api_response.rb deleted file mode 100644 index 177c7bd..0000000 --- a/lib/pay_pal_restap_is/http/api_response.rb +++ /dev/null @@ -1,21 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Http response received. - class ApiResponse < CoreLibrary::ApiResponse - - - # The constructor - # @param [HttpResponse] http_response The original, raw response from the api. - # @param [Object] data The data field specified for the response. - # @param [Array] errors Any errors returned by the server. - def initialize(http_response, - data: nil, - errors: nil) - super - end - end -end diff --git a/lib/pay_pal_restap_is/http/auth/o_auth2.rb b/lib/pay_pal_restap_is/http/auth/o_auth2.rb deleted file mode 100644 index e32bb60..0000000 --- a/lib/pay_pal_restap_is/http/auth/o_auth2.rb +++ /dev/null @@ -1,136 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Utility class for OAuth 2 authorization and token management. - class OAuth2 < CoreLibrary::HeaderAuth - include CoreLibrary - # Display error message on occurrence of authentication failure. - # @returns [String] The oAuth error message. - def error_message - 'ClientCredentialsAuth: OAuthToken is undefined or expired.' - end - - # Initialization constructor. - def initialize(client_credentials_auth_credentials, config) - @_o_auth_client_id = client_credentials_auth_credentials.o_auth_client_id unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_client_id.nil? - @_o_auth_client_secret = client_credentials_auth_credentials.o_auth_client_secret unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_client_secret.nil? - @_o_auth_token = client_credentials_auth_credentials.o_auth_token unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_token.nil? - @_o_auth_clock_skew = client_credentials_auth_credentials.o_auth_clock_skew unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_clock_skew.nil? - @_o_auth_token_provider = client_credentials_auth_credentials.o_auth_token_provider unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_token_provider.nil? - @_o_auth_on_token_update = client_credentials_auth_credentials.o_auth_on_token_update unless - client_credentials_auth_credentials.nil? || client_credentials_auth_credentials.o_auth_on_token_update.nil? - @_o_auth_api = OAuthAuthorizationController.new(config) - super({}) - end - - # Validates the oAuth token. - # @return [Boolean] true if the token is present and not expired. - def valid - @_o_auth_token = get_token_from_provider - @_o_auth_token.is_a?(OAuthToken) && !token_expired?(@_o_auth_token) - end - - # Builds the basic auth header for endpoints in the OAuth Authorization Controller. - # @return [String] The value of the Authentication header. - def build_basic_auth_header - "Basic #{AuthHelper.get_base64_encoded_value(@_o_auth_client_id, @_o_auth_client_secret)}" - end - - # Fetches the token. - # @param [Hash] additional_params Any additional form parameters. - # @return [OAuthToken] The oAuth token instance. - def fetch_token(additional_params: nil) - token = @_o_auth_api.request_token( - { - 'authorization' => build_basic_auth_header - }, - _field_parameters: additional_params - ).data - if token.respond_to?('expires_in') && !token.expires_in.nil? - token.expiry = AuthHelper.get_token_expiry(token.expires_in, Time.now.utc.to_i) - end - token - end - - # Checks if OAuth token has expired. - # @param [OAuthToken] token The oAuth token instance. - # @return [Boolean] true if the token's expiry exist and also the token is expired, false otherwise. - def token_expired?(token) - token.respond_to?('expiry') && AuthHelper.token_expired?(token.expiry, @_o_auth_clock_skew) - end - - def apply(http_request) - auth_params = { 'Authorization' => "Bearer #{@_o_auth_token.access_token}" } - AuthHelper.apply(auth_params, http_request.method(:add_header)) - end - - private - - # This provides the OAuth Token from either the user configured callbacks or from default provider. - # @return [OAuthToken] The fetched oauth token. - def get_token_from_provider - return @_o_auth_token if @_o_auth_token && !token_expired?(@_o_auth_token) - - if @_o_auth_token_provider - o_auth_token = @_o_auth_token_provider.call(@_o_auth_token, self) - @_o_auth_on_token_update&.call(o_auth_token) - return o_auth_token - end - begin - o_auth_token = fetch_token - @_o_auth_on_token_update&.call(o_auth_token) - o_auth_token - rescue ApiException - @_o_auth_token - end - end - end - - # Data class for ClientCredentialsAuthCredentials. - class ClientCredentialsAuthCredentials - attr_reader :o_auth_client_id, :o_auth_client_secret, :o_auth_token, - :o_auth_token_provider, :o_auth_on_token_update, - :o_auth_clock_skew - - def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, - o_auth_token_provider: nil, o_auth_on_token_update: nil, - o_auth_clock_skew: nil) - raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? - raise ArgumentError, 'o_auth_client_secret cannot be nil' if o_auth_client_secret.nil? - - @o_auth_client_id = o_auth_client_id - @o_auth_client_secret = o_auth_client_secret - @o_auth_token = o_auth_token - @o_auth_token_provider = o_auth_token_provider - @o_auth_on_token_update = o_auth_on_token_update - @o_auth_clock_skew = o_auth_clock_skew - end - - def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, - o_auth_token: nil, o_auth_token_provider: nil, - o_auth_on_token_update: nil, o_auth_clock_skew: nil) - o_auth_client_id ||= self.o_auth_client_id - o_auth_client_secret ||= self.o_auth_client_secret - o_auth_token ||= self.o_auth_token - o_auth_token_provider ||= self.o_auth_token_provider - o_auth_on_token_update ||= self.o_auth_on_token_update - o_auth_clock_skew ||= self.o_auth_clock_skew - - ClientCredentialsAuthCredentials.new( - o_auth_client_id: o_auth_client_id, - o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token, - o_auth_token_provider: o_auth_token_provider, - o_auth_on_token_update: o_auth_on_token_update, - o_auth_clock_skew: o_auth_clock_skew - ) - end - end -end diff --git a/lib/pay_pal_restap_is/http/http_call_back.rb b/lib/pay_pal_restap_is/http/http_call_back.rb deleted file mode 100644 index 7d38753..0000000 --- a/lib/pay_pal_restap_is/http/http_call_back.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # HttpCallBack allows defining callables for pre and post API calls. - class HttpCallBack < CoreLibrary::HttpCallback - end -end diff --git a/lib/pay_pal_restap_is/http/http_method_enum.rb b/lib/pay_pal_restap_is/http/http_method_enum.rb deleted file mode 100644 index 161b9d5..0000000 --- a/lib/pay_pal_restap_is/http/http_method_enum.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # HTTP Methods Enumeration. - class HttpMethodEnum < CoreLibrary::HttpMethod - end -end diff --git a/lib/pay_pal_restap_is/http/http_request.rb b/lib/pay_pal_restap_is/http/http_request.rb deleted file mode 100644 index d158deb..0000000 --- a/lib/pay_pal_restap_is/http/http_request.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Represents a single Http Request. - class HttpRequest < CoreLibrary::HttpRequest - end -end diff --git a/lib/pay_pal_restap_is/http/http_response.rb b/lib/pay_pal_restap_is/http/http_response.rb deleted file mode 100644 index 78f10dd..0000000 --- a/lib/pay_pal_restap_is/http/http_response.rb +++ /dev/null @@ -1,10 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Http response received. - class HttpResponse < CoreLibrary::HttpResponse - end -end diff --git a/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb b/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb deleted file mode 100644 index 29e6f09..0000000 --- a/lib/pay_pal_restap_is/logging/configuration/api_logging_configuration.rb +++ /dev/null @@ -1,114 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Initializes a new instance of RequestLoggingConfiguration. - class RequestLoggingConfiguration < CoreLibrary::ApiRequestLoggingConfiguration - # @param log_body [Boolean] Indicates whether the message body should be logged. Default is false. - # @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false. - # @param headers_to_exclude [Array] Array of headers not displayed in logging. Default is an empty array. - # @param headers_to_include [Array] Array of headers to be displayed in logging. Default is an empty array. - # @param headers_to_unmask [Array] Array of headers which values are non-sensitive to display in logging. - # Default is an empty array. - def initialize(log_body: false, log_headers: false, headers_to_include: nil, - headers_to_exclude: nil, headers_to_unmask: nil, - include_query_in_path: false) - super( - log_body, - log_headers, - headers_to_exclude, - headers_to_include, - headers_to_unmask, - include_query_in_path - ) - end - - def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil, - headers_to_exclude: nil, headers_to_unmask: nil, include_query_in_path: nil) - log_body ||= self.log_body - log_headers ||= self.log_headers - headers_to_include ||= self.headers_to_include - headers_to_exclude ||= self.headers_to_exclude - headers_to_unmask ||= self.headers_to_unmask - include_query_in_path ||= self.include_query_in_path - - RequestLoggingConfiguration.class.new(log_body: log_body, log_headers: log_headers, - headers_to_include: headers_to_include, - headers_to_exclude: headers_to_exclude, - headers_to_unmask: headers_to_unmask, - include_query_in_path: include_query_in_path) - end - end - - # Initializes a new instance of ResponseLoggingConfiguration. - class ResponseLoggingConfiguration < CoreLibrary::ApiResponseLoggingConfiguration - # @param log_body [Boolean] Indicates whether the message body should be logged. Default is false. - # @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false. - # @param headers_to_exclude [Array] Array of headers not displayed in logging. Default is an empty array. - # @param headers_to_include [Array] Array of headers to be displayed in logging. Default is an empty array. - # @param headers_to_unmask [Array] Array of headers which values are non-sensitive to display in logging. - # Default is an empty array. - def initialize(log_body: false, log_headers: false, headers_to_include: nil, - headers_to_exclude: nil, headers_to_unmask: nil) - super( - log_body, - log_headers, - headers_to_exclude, - headers_to_include, - headers_to_unmask - ) - end - - def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil, - headers_to_exclude: nil, headers_to_unmask: nil) - log_body ||= self.log_body - log_headers ||= self.log_headers - headers_to_include ||= self.headers_to_include - headers_to_exclude ||= self.headers_to_exclude - headers_to_unmask ||= self.headers_to_unmask - - ResponseLoggingConfiguration.new(log_body: log_body, log_headers: log_headers, - headers_to_include: headers_to_include, - headers_to_exclude: headers_to_exclude, - headers_to_unmask: headers_to_unmask) - end - end - - # Initializes a new instance of LoggingConfiguration. - class LoggingConfiguration < CoreLibrary::ApiLoggingConfiguration - # @param logger [LoggerInterface] The logger to use for logging messages. - # @param log_level [LogLevel] The log level to determine which messages should be logged. - # @param request_logging_config [RequestLoggingConfiguration] Options for logging HTTP requests. - # @param response_logging_config [ResponseLoggingConfiguration] Options for logging HTTP responses. - # @param mask_sensitive_headers [Boolean] Indicates whether sensitive headers should be masked in logged messages. - def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true, - request_logging_config: nil, - response_logging_config: nil) - request_logging_config ||= RequestLoggingConfiguration.new - response_logging_config ||= ResponseLoggingConfiguration.new - super( - logger, - log_level, - request_logging_config, - response_logging_config, - mask_sensitive_headers - ) - end - - def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil, - request_logging_config: nil, response_logging_config: nil) - logger ||= self.logger - log_level ||= self.log_level - mask_sensitive_headers = self.mask_sensitive_headers ||= mask_sensitive_headers - request_logging_config ||= self.request_logging_config.clone - response_logging_config ||= self.response_logging_config.clone - - LoggingConfiguration.new(logger: logger, log_level: log_level, - mask_sensitive_headers: mask_sensitive_headers, - request_logging_config: request_logging_config, - response_logging_config: response_logging_config) - end - end -end diff --git a/lib/pay_pal_restap_is/logging/sdk_logger.rb b/lib/pay_pal_restap_is/logging/sdk_logger.rb deleted file mode 100644 index 4f4e335..0000000 --- a/lib/pay_pal_restap_is/logging/sdk_logger.rb +++ /dev/null @@ -1,17 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Represents the generic logger facade - class AbstractLogger < Logger - # Logs a message with a specified log level and additional parameters. - # @param level [Symbol] The log level of the message. - # @param message [String] The message to log. - # @param params [Hash] Additional parameters to include in the log message. - def log(level, message, params) - raise NotImplementedError, 'This method needs to be implemented in a child class.' - end - end -end diff --git a/lib/pay_pal_restap_is/models/ach_debit_response.rb b/lib/pay_pal_restap_is/models/ach_debit_response.rb deleted file mode 100644 index 344b7ba..0000000 --- a/lib/pay_pal_restap_is/models/ach_debit_response.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A Resource representing a response of vaulted a ACH Debit Account. - class ACHDebitResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The ach debit verification status. - # @return [String] - attr_accessor :verification_status - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['verification_status'] = 'verification_status' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - verification_status - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(verification_status: 'NOT_VERIFIED') - @verification_status = verification_status unless verification_status == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - verification_status = hash['verification_status'] ||= 'NOT_VERIFIED' - - # Create object from extracted values. - ACHDebitResponse.new(verification_status: verification_status) - end - end -end diff --git a/lib/pay_pal_restap_is/models/activity_timestamps.rb b/lib/pay_pal_restap_is/models/activity_timestamps.rb deleted file mode 100644 index 1bd536a..0000000 --- a/lib/pay_pal_restap_is/models/activity_timestamps.rb +++ /dev/null @@ -1,68 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The date and time stamps that are common to authorized payment, captured - # payment, and refund transactions. - class ActivityTimestamps < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - create_time - update_time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(create_time: SKIP, update_time: SKIP) - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - - # Create object from extracted values. - ActivityTimestamps.new(create_time: create_time, - update_time: update_time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/address.rb b/lib/pay_pal_restap_is/models/address.rb deleted file mode 100644 index b535446..0000000 --- a/lib/pay_pal_restap_is/models/address.rb +++ /dev/null @@ -1,116 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wi - # ki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the - # autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-cont - # rols-the-autocomplete-attribute). - class Address < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The first line of the address, such as number and street, for example, - # `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. - # This field needs to pass the full address. - # @return [String] - attr_accessor :address_line_1 - - # The second line of the address, for example, a suite or apartment number. - # @return [String] - attr_accessor :address_line_2 - - # A city, town, or village. Smaller than `admin_area_level_1`. - # @return [String] - attr_accessor :admin_area_2 - - # The highest-level sub-division in a country, which is usually a province, - # state, or ISO-3166-2 subdivision. This data is formatted for postal - # delivery, for example, `CA` and not `California`. Value, by country, - # is:
  • UK. A county.
  • US. A state.
  • Canada. A - # province.
  • Japan. A prefecture.
  • Switzerland. A - # *kanton*.
- # @return [String] - attr_accessor :admin_area_1 - - # The postal code, which is the ZIP code or equivalent. Typically required - # for countries with a postal code or an equivalent. See [postal - # code](https://en.wikipedia.org/wiki/Postal_code). - # @return [String] - attr_accessor :postal_code - - # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that - # identifies the country or region.
Note: The - # country code for Great Britain is GB and not UK - # as used in the top-level domain names for that country. Use the `C2` - # country code for China worldwide for comparable uncontrolled price (CUP) - # method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['address_line_1'] = 'address_line_1' - @_hash['address_line_2'] = 'address_line_2' - @_hash['admin_area_2'] = 'admin_area_2' - @_hash['admin_area_1'] = 'admin_area_1' - @_hash['postal_code'] = 'postal_code' - @_hash['country_code'] = 'country_code' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - address_line_1 - address_line_2 - admin_area_2 - admin_area_1 - postal_code - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(country_code:, address_line_1: SKIP, address_line_2: SKIP, - admin_area_2: SKIP, admin_area_1: SKIP, postal_code: SKIP) - @address_line_1 = address_line_1 unless address_line_1 == SKIP - @address_line_2 = address_line_2 unless address_line_2 == SKIP - @admin_area_2 = admin_area_2 unless admin_area_2 == SKIP - @admin_area_1 = admin_area_1 unless admin_area_1 == SKIP - @postal_code = postal_code unless postal_code == SKIP - @country_code = country_code - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - country_code = hash.key?('country_code') ? hash['country_code'] : nil - address_line_1 = - hash.key?('address_line_1') ? hash['address_line_1'] : SKIP - address_line_2 = - hash.key?('address_line_2') ? hash['address_line_2'] : SKIP - admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP - admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP - postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP - - # Create object from extracted values. - Address.new(country_code: country_code, - address_line_1: address_line_1, - address_line_2: address_line_2, - admin_area_2: admin_area_2, - admin_area_1: admin_area_1, - postal_code: postal_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/address_details.rb b/lib/pay_pal_restap_is/models/address_details.rb deleted file mode 100644 index 7b58991..0000000 --- a/lib/pay_pal_restap_is/models/address_details.rb +++ /dev/null @@ -1,160 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Address request details. - class AddressDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The first line of the address, such as number and street, for example, - # `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. - # This field needs to pass the full address. - # @return [String] - attr_accessor :address_line_1 - - # The second line of the address, for example, a suite or apartment number. - # @return [String] - attr_accessor :address_line_2 - - # A city, town, or village. Smaller than `admin_area_level_1`. - # @return [String] - attr_accessor :admin_area_2 - - # The highest-level sub-division in a country, which is usually a province, - # state, or ISO-3166-2 subdivision. This data is formatted for postal - # delivery, for example, `CA` and not `California`. Value, by country, - # is:
  • UK. A county.
  • US. A state.
  • Canada. A - # province.
  • Japan. A prefecture.
  • Switzerland. A - # *kanton*.
- # @return [String] - attr_accessor :admin_area_1 - - # The postal code, which is the ZIP code or equivalent. Typically required - # for countries with a postal code or an equivalent. See [postal - # code](https://en.wikipedia.org/wiki/Postal_code). - # @return [String] - attr_accessor :postal_code - - # The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that - # identifies the country or region.
Note: The - # country code for Great Britain is GB and not UK - # as used in the top-level domain names for that country. Use the `C2` - # country code for China worldwide for comparable uncontrolled price (CUP) - # method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The resource ID of the address. - # @return [String] - attr_accessor :id - - # The name of the company or business associated to the address. - # @return [String] - attr_accessor :company - - # The phone number that can go on the mailing label with the address to - # track the shipping. Phone number is in E.164 format. - # @return [String] - attr_accessor :phone - - # The phone number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [Phone] - attr_accessor :phone_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['address_line_1'] = 'address_line_1' - @_hash['address_line_2'] = 'address_line_2' - @_hash['admin_area_2'] = 'admin_area_2' - @_hash['admin_area_1'] = 'admin_area_1' - @_hash['postal_code'] = 'postal_code' - @_hash['country_code'] = 'country_code' - @_hash['name'] = 'name' - @_hash['id'] = 'id' - @_hash['company'] = 'company' - @_hash['phone'] = 'phone' - @_hash['phone_number'] = 'phone_number' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - address_line_1 - address_line_2 - admin_area_2 - admin_area_1 - postal_code - name - id - company - phone - phone_number - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(country_code:, address_line_1: SKIP, address_line_2: SKIP, - admin_area_2: SKIP, admin_area_1: SKIP, postal_code: SKIP, - name: SKIP, id: SKIP, company: SKIP, phone: SKIP, - phone_number: SKIP) - @address_line_1 = address_line_1 unless address_line_1 == SKIP - @address_line_2 = address_line_2 unless address_line_2 == SKIP - @admin_area_2 = admin_area_2 unless admin_area_2 == SKIP - @admin_area_1 = admin_area_1 unless admin_area_1 == SKIP - @postal_code = postal_code unless postal_code == SKIP - @country_code = country_code - @name = name unless name == SKIP - @id = id unless id == SKIP - @company = company unless company == SKIP - @phone = phone unless phone == SKIP - @phone_number = phone_number unless phone_number == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - country_code = hash.key?('country_code') ? hash['country_code'] : nil - address_line_1 = - hash.key?('address_line_1') ? hash['address_line_1'] : SKIP - address_line_2 = - hash.key?('address_line_2') ? hash['address_line_2'] : SKIP - admin_area_2 = hash.key?('admin_area_2') ? hash['admin_area_2'] : SKIP - admin_area_1 = hash.key?('admin_area_1') ? hash['admin_area_1'] : SKIP - postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - id = hash.key?('id') ? hash['id'] : SKIP - company = hash.key?('company') ? hash['company'] : SKIP - phone = hash.key?('phone') ? hash['phone'] : SKIP - phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number'] - - # Create object from extracted values. - AddressDetails.new(country_code: country_code, - address_line_1: address_line_1, - address_line_2: address_line_2, - admin_area_2: admin_area_2, - admin_area_1: admin_area_1, - postal_code: postal_code, - name: name, - id: id, - company: company, - phone: phone, - phone_number: phone_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/amount_breakdown.rb b/lib/pay_pal_restap_is/models/amount_breakdown.rb deleted file mode 100644 index f86a214..0000000 --- a/lib/pay_pal_restap_is/models/amount_breakdown.rb +++ /dev/null @@ -1,115 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The breakdown of the amount. Breakdown provides details such as total item - # amount, total tax amount, shipping, handling, insurance, and discounts, if - # any. - class AmountBreakdown < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :item_total - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :shipping - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :handling - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :tax_total - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :insurance - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :shipping_discount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :discount - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['item_total'] = 'item_total' - @_hash['shipping'] = 'shipping' - @_hash['handling'] = 'handling' - @_hash['tax_total'] = 'tax_total' - @_hash['insurance'] = 'insurance' - @_hash['shipping_discount'] = 'shipping_discount' - @_hash['discount'] = 'discount' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - item_total - shipping - handling - tax_total - insurance - shipping_discount - discount - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(item_total: SKIP, shipping: SKIP, handling: SKIP, - tax_total: SKIP, insurance: SKIP, shipping_discount: SKIP, - discount: SKIP) - @item_total = item_total unless item_total == SKIP - @shipping = shipping unless shipping == SKIP - @handling = handling unless handling == SKIP - @tax_total = tax_total unless tax_total == SKIP - @insurance = insurance unless insurance == SKIP - @shipping_discount = shipping_discount unless shipping_discount == SKIP - @discount = discount unless discount == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - item_total = Money.from_hash(hash['item_total']) if hash['item_total'] - shipping = Money.from_hash(hash['shipping']) if hash['shipping'] - handling = Money.from_hash(hash['handling']) if hash['handling'] - tax_total = Money.from_hash(hash['tax_total']) if hash['tax_total'] - insurance = Money.from_hash(hash['insurance']) if hash['insurance'] - shipping_discount = Money.from_hash(hash['shipping_discount']) if hash['shipping_discount'] - discount = Money.from_hash(hash['discount']) if hash['discount'] - - # Create object from extracted values. - AmountBreakdown.new(item_total: item_total, - shipping: shipping, - handling: handling, - tax_total: tax_total, - insurance: insurance, - shipping_discount: shipping_discount, - discount: discount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/amount_with_breakdown.rb b/lib/pay_pal_restap_is/models/amount_with_breakdown.rb deleted file mode 100644 index 9d9296c..0000000 --- a/lib/pay_pal_restap_is/models/amount_with_breakdown.rb +++ /dev/null @@ -1,80 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The total order amount with an optional breakdown that provides details, - # such as the total item amount, total tax amount, shipping, handling, - # insurance, and discounts, if any.
If you specify `amount.breakdown`, the - # amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` - # plus `insurance` minus `shipping_discount` minus discount.
The amount - # must be a positive number. For listed of supported currencies and decimal - # precision, see the PayPal REST APIs Currency Codes. - class AmountWithBreakdown < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The [three-character ISO-4217 currency - # code](/api/rest/reference/currency-codes/) that identifies the currency. - # @return [String] - attr_accessor :currency_code - - # The value, which might be:
  • An integer for currencies like `JPY` - # that are not typically fractional.
  • A decimal fraction for - # currencies like `TND` that are subdivided into thousandths.
For - # the required number of decimal places for a currency code, see [Currency - # Codes](/api/rest/reference/currency-codes/). - # @return [String] - attr_accessor :value - - # The breakdown of the amount. Breakdown provides details such as total item - # amount, total tax amount, shipping, handling, insurance, and discounts, if - # any. - # @return [AmountBreakdown] - attr_accessor :breakdown - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['currency_code'] = 'currency_code' - @_hash['value'] = 'value' - @_hash['breakdown'] = 'breakdown' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - breakdown - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(currency_code:, value:, breakdown: SKIP) - @currency_code = currency_code - @value = value - @breakdown = breakdown unless breakdown == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - currency_code = hash.key?('currency_code') ? hash['currency_code'] : nil - value = hash.key?('value') ? hash['value'] : nil - breakdown = AmountBreakdown.from_hash(hash['breakdown']) if hash['breakdown'] - - # Create object from extracted values. - AmountWithBreakdown.new(currency_code: currency_code, - value: value, - breakdown: breakdown) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_attributes.rb b/lib/pay_pal_restap_is/models/apple_pay_attributes.rb deleted file mode 100644 index 2a5291b..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_attributes.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with apple pay. - class ApplePayAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a customer in PayPal's system of record. - # @return [CustomerInformation] - attr_accessor :customer - - # Base vaulting specification. The object can be extended for specific use - # cases within each payment_source that supports vaulting. - # @return [VaultInstruction] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(customer: SKIP, vault: SKIP) - @customer = customer unless customer == SKIP - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - customer = CustomerInformation.from_hash(hash['customer']) if hash['customer'] - vault = VaultInstruction.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - ApplePayAttributes.new(customer: customer, - vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb b/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb deleted file mode 100644 index edc00f7..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_attributes_response.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of Apple Pay. - class ApplePayAttributesResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a saved payment source. - # @return [VaultResponse] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault: SKIP) - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - ApplePayAttributesResponse.new(vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_card.rb b/lib/pay_pal_restap_is/models/apple_pay_card.rb deleted file mode 100644 index 7efdf41..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_card.rb +++ /dev/null @@ -1,94 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment card to be used to fund a payment. Can be a credit or debit - # card. - class ApplePayCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['type'] = 'type' - @_hash['brand'] = 'brand' - @_hash['billing_address'] = 'billing_address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - type - brand - billing_address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, type: SKIP, brand: SKIP, - billing_address: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @type = type unless type == SKIP - @brand = brand unless brand == SKIP - @billing_address = billing_address unless billing_address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - - # Create object from extracted values. - ApplePayCard.new(name: name, - last_digits: last_digits, - type: type, - brand: brand, - billing_address: billing_address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_card_response.rb b/lib/pay_pal_restap_is/models/apple_pay_card_response.rb deleted file mode 100644 index 7d1bbc8..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_card_response.rb +++ /dev/null @@ -1,167 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The Card from Apple Pay Wallet used to fund the payment. - class ApplePayCardResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # Array of brands or networks associated with the card. - # @return [Array[CardBrand]] - attr_accessor :available_networks - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # Additional attributes associated with the use of this card. - # @return [CardAttributesResponse] - attr_accessor :attributes - - # Representation of card details as received in the request. - # @return [CardFromRequest] - attr_accessor :from_request - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # Bank Identification Number (BIN) details used to fund a payment. - # @return [BinDetails] - attr_accessor :bin_details - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['brand'] = 'brand' - @_hash['available_networks'] = 'available_networks' - @_hash['type'] = 'type' - @_hash['authentication_result'] = 'authentication_result' - @_hash['attributes'] = 'attributes' - @_hash['from_request'] = 'from_request' - @_hash['expiry'] = 'expiry' - @_hash['bin_details'] = 'bin_details' - @_hash['billing_address'] = 'billing_address' - @_hash['country_code'] = 'country_code' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - brand - available_networks - type - authentication_result - attributes - from_request - expiry - bin_details - billing_address - country_code - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, - available_networks: SKIP, type: SKIP, - authentication_result: SKIP, attributes: SKIP, - from_request: SKIP, expiry: SKIP, bin_details: SKIP, - billing_address: SKIP, country_code: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @brand = brand unless brand == SKIP - @available_networks = available_networks unless available_networks == SKIP - @type = type unless type == SKIP - @authentication_result = authentication_result unless authentication_result == SKIP - @attributes = attributes unless attributes == SKIP - @from_request = from_request unless from_request == SKIP - @expiry = expiry unless expiry == SKIP - @bin_details = bin_details unless bin_details == SKIP - @billing_address = billing_address unless billing_address == SKIP - @country_code = country_code unless country_code == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - available_networks = - hash.key?('available_networks') ? hash['available_networks'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - attributes = CardAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] - from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request'] - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - - # Create object from extracted values. - ApplePayCardResponse.new(name: name, - last_digits: last_digits, - brand: brand, - available_networks: available_networks, - type: type, - authentication_result: authentication_result, - attributes: attributes, - from_request: from_request, - expiry: expiry, - bin_details: bin_details, - billing_address: billing_address, - country_code: country_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb b/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb deleted file mode 100644 index c649fb4..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_decrypted_token_data.rb +++ /dev/null @@ -1,95 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information about the Payment data obtained by decrypting Apple Pay token. - class ApplePayDecryptedTokenData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :transaction_amount - - # The payment card to use to fund a payment. Can be a credit or debit card. - # @return [ApplePayTokenizedCard] - attr_accessor :tokenized_card - - # Apple Pay Hex-encoded device manufacturer identifier. The pattern is - # defined by an external party and supports Unicode. - # @return [String] - attr_accessor :device_manufacturer_id - - # Indicates the type of payment data passed, in case of Non China the - # payment data is 3DSECURE and for China it is EMV. - # @return [ApplePayPaymentDataType] - attr_accessor :payment_data_type - - # Information about the decrypted apple pay payment data for the token like - # cryptogram, eci indicator. - # @return [ApplePayPaymentData] - attr_accessor :payment_data - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['transaction_amount'] = 'transaction_amount' - @_hash['tokenized_card'] = 'tokenized_card' - @_hash['device_manufacturer_id'] = 'device_manufacturer_id' - @_hash['payment_data_type'] = 'payment_data_type' - @_hash['payment_data'] = 'payment_data' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - transaction_amount - device_manufacturer_id - payment_data_type - payment_data - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(tokenized_card:, transaction_amount: SKIP, - device_manufacturer_id: SKIP, payment_data_type: SKIP, - payment_data: SKIP) - @transaction_amount = transaction_amount unless transaction_amount == SKIP - @tokenized_card = tokenized_card - @device_manufacturer_id = device_manufacturer_id unless device_manufacturer_id == SKIP - @payment_data_type = payment_data_type unless payment_data_type == SKIP - @payment_data = payment_data unless payment_data == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - tokenized_card = ApplePayTokenizedCard.from_hash(hash['tokenized_card']) if - hash['tokenized_card'] - transaction_amount = Money.from_hash(hash['transaction_amount']) if - hash['transaction_amount'] - device_manufacturer_id = - hash.key?('device_manufacturer_id') ? hash['device_manufacturer_id'] : SKIP - payment_data_type = - hash.key?('payment_data_type') ? hash['payment_data_type'] : SKIP - payment_data = ApplePayPaymentData.from_hash(hash['payment_data']) if hash['payment_data'] - - # Create object from extracted values. - ApplePayDecryptedTokenData.new(tokenized_card: tokenized_card, - transaction_amount: transaction_amount, - device_manufacturer_id: device_manufacturer_id, - payment_data_type: payment_data_type, - payment_data: payment_data) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb deleted file mode 100644 index 333adde..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_payment_data.rb +++ /dev/null @@ -1,83 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information about the decrypted apple pay payment data for the token like - # cryptogram, eci indicator. - class ApplePayPaymentData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Online payment cryptogram, as defined by 3D Secure. The pattern is defined - # by an external party and supports Unicode. - # @return [String] - attr_accessor :cryptogram - - # ECI indicator, as defined by 3- Secure. The pattern is defined by an - # external party and supports Unicode. - # @return [String] - attr_accessor :eci_indicator - - # Encoded Apple Pay EMV Payment Structure used for payments in China. The - # pattern is defined by an external party and supports Unicode. - # @return [String] - attr_accessor :emv_data - - # Bank Key encrypted Apple Pay PIN. The pattern is defined by an external - # party and supports Unicode. - # @return [String] - attr_accessor :pin - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['cryptogram'] = 'cryptogram' - @_hash['eci_indicator'] = 'eci_indicator' - @_hash['emv_data'] = 'emv_data' - @_hash['pin'] = 'pin' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - cryptogram - eci_indicator - emv_data - pin - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(cryptogram: SKIP, eci_indicator: SKIP, emv_data: SKIP, - pin: SKIP) - @cryptogram = cryptogram unless cryptogram == SKIP - @eci_indicator = eci_indicator unless eci_indicator == SKIP - @emv_data = emv_data unless emv_data == SKIP - @pin = pin unless pin == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP - eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP - emv_data = hash.key?('emv_data') ? hash['emv_data'] : SKIP - pin = hash.key?('pin') ? hash['pin'] : SKIP - - # Create object from extracted values. - ApplePayPaymentData.new(cryptogram: cryptogram, - eci_indicator: eci_indicator, - emv_data: emv_data, - pin: pin) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb deleted file mode 100644 index d8604d0..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_payment_data_type.rb +++ /dev/null @@ -1,24 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Indicates the type of payment data passed, in case of Non China the payment - # data is 3DSECURE and for China it is EMV. - class ApplePayPaymentDataType - APPLE_PAY_PAYMENT_DATA_TYPE = [ - # TODO: Write general description for ENUM_3DSECURE - ENUM_3DSECURE = '3DSECURE'.freeze, - - # TODO: Write general description for EMV - EMV = 'EMV'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb deleted file mode 100644 index f610184..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_payment_object.rb +++ /dev/null @@ -1,114 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using ApplePay. - class ApplePayPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # ApplePay transaction identifier, this will be the unique identifier for - # this transaction provided by Apple. The pattern is defined by an external - # party and supports Unicode. - # @return [String] - attr_accessor :id - - # Encrypted ApplePay token, containing card information. This token would be - # base64encoded. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :token - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumber] - attr_accessor :phone_number - - # The Card from Apple Pay Wallet used to fund the payment. - # @return [ApplePayCardResponse] - attr_accessor :card - - # Additional attributes associated with the use of Apple Pay. - # @return [ApplePayAttributesResponse] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['token'] = 'token' - @_hash['name'] = 'name' - @_hash['email_address'] = 'email_address' - @_hash['phone_number'] = 'phone_number' - @_hash['card'] = 'card' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - token - name - email_address - phone_number - card - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, token: SKIP, name: SKIP, email_address: SKIP, - phone_number: SKIP, card: SKIP, attributes: SKIP) - @id = id unless id == SKIP - @token = token unless token == SKIP - @name = name unless name == SKIP - @email_address = email_address unless email_address == SKIP - @phone_number = phone_number unless phone_number == SKIP - @card = card unless card == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - token = hash.key?('token') ? hash['token'] : SKIP - name = hash.key?('name') ? hash['name'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] - card = ApplePayCardResponse.from_hash(hash['card']) if hash['card'] - attributes = ApplePayAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] - - # Create object from extracted values. - ApplePayPaymentObject.new(id: id, - token: token, - name: name, - email_address: email_address, - phone_number: phone_number, - card: card, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb b/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb deleted file mode 100644 index c33531f..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_payment_token.rb +++ /dev/null @@ -1,51 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A resource representing a response for Apple Pay. - class ApplePayPaymentToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to be used to fund a payment. Can be a credit or debit - # card. - # @return [ApplePayCard] - attr_accessor :card - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP) - @card = card unless card == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = ApplePayCard.from_hash(hash['card']) if hash['card'] - - # Create object from extracted values. - ApplePayPaymentToken.new(card: card) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_request.rb b/lib/pay_pal_restap_is/models/apple_pay_request.rb deleted file mode 100644 index 07b9a0e..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_request.rb +++ /dev/null @@ -1,137 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using ApplePay. - class ApplePayRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # ApplePay transaction identifier, this will be the unique identifier for - # this transaction provided by Apple. The pattern is defined by an external - # party and supports Unicode. - # @return [String] - attr_accessor :id - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumber] - attr_accessor :phone_number - - # Information about the Payment data obtained by decrypting Apple Pay token. - # @return [ApplePayDecryptedTokenData] - attr_accessor :decrypted_token - - # Provides additional details to process a payment using a `card` that has - # been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only - # with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- # @return [CardStoredCredential] - attr_accessor :stored_credential - - # The PayPal-generated ID for the vaulted payment source. This ID should be - # stored on the merchant's server so the saved payment source can be used - # for future transactions. - # @return [String] - attr_accessor :vault_id - - # Additional attributes associated with apple pay. - # @return [ApplePayAttributes] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['name'] = 'name' - @_hash['email_address'] = 'email_address' - @_hash['phone_number'] = 'phone_number' - @_hash['decrypted_token'] = 'decrypted_token' - @_hash['stored_credential'] = 'stored_credential' - @_hash['vault_id'] = 'vault_id' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - name - email_address - phone_number - decrypted_token - stored_credential - vault_id - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, name: SKIP, email_address: SKIP, - phone_number: SKIP, decrypted_token: SKIP, - stored_credential: SKIP, vault_id: SKIP, attributes: SKIP) - @id = id unless id == SKIP - @name = name unless name == SKIP - @email_address = email_address unless email_address == SKIP - @phone_number = phone_number unless phone_number == SKIP - @decrypted_token = decrypted_token unless decrypted_token == SKIP - @stored_credential = stored_credential unless stored_credential == SKIP - @vault_id = vault_id unless vault_id == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - name = hash.key?('name') ? hash['name'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] - decrypted_token = ApplePayDecryptedTokenData.from_hash(hash['decrypted_token']) if - hash['decrypted_token'] - stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if - hash['stored_credential'] - vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP - attributes = ApplePayAttributes.from_hash(hash['attributes']) if hash['attributes'] - - # Create object from extracted values. - ApplePayRequest.new(id: id, - name: name, - email_address: email_address, - phone_number: phone_number, - decrypted_token: decrypted_token, - stored_credential: stored_credential, - vault_id: vault_id, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb b/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb deleted file mode 100644 index 8e1b861..0000000 --- a/lib/pay_pal_restap_is/models/apple_pay_tokenized_card.rb +++ /dev/null @@ -1,113 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment card to use to fund a payment. Can be a credit or debit card. - class ApplePayTokenizedCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The primary account number (PAN) for the payment card. - # @return [String] - attr_accessor :number - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :card_type - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['number'] = 'number' - @_hash['expiry'] = 'expiry' - @_hash['card_type'] = 'card_type' - @_hash['type'] = 'type' - @_hash['brand'] = 'brand' - @_hash['billing_address'] = 'billing_address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - number - expiry - card_type - type - brand - billing_address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, number: SKIP, expiry: SKIP, card_type: SKIP, - type: SKIP, brand: SKIP, billing_address: SKIP) - @name = name unless name == SKIP - @number = number unless number == SKIP - @expiry = expiry unless expiry == SKIP - @card_type = card_type unless card_type == SKIP - @type = type unless type == SKIP - @brand = brand unless brand == SKIP - @billing_address = billing_address unless billing_address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - number = hash.key?('number') ? hash['number'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - card_type = hash.key?('card_type') ? hash['card_type'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - - # Create object from extracted values. - ApplePayTokenizedCard.new(name: name, - number: number, - expiry: expiry, - card_type: card_type, - type: type, - brand: brand, - billing_address: billing_address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/authentication_response.rb b/lib/pay_pal_restap_is/models/authentication_response.rb deleted file mode 100644 index 3a8da83..0000000 --- a/lib/pay_pal_restap_is/models/authentication_response.rb +++ /dev/null @@ -1,61 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Results of Authentication such as 3D Secure. - class AuthenticationResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Liability shift indicator. The outcome of the issuer's authentication. - # @return [LiabilityShiftIndicator] - attr_accessor :liability_shift - - # Results of 3D Secure Authentication. - # @return [ThreeDSecureAuthenticationResponse] - attr_accessor :three_d_secure - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['liability_shift'] = 'liability_shift' - @_hash['three_d_secure'] = 'three_d_secure' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - liability_shift - three_d_secure - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(liability_shift: SKIP, three_d_secure: SKIP) - @liability_shift = liability_shift unless liability_shift == SKIP - @three_d_secure = three_d_secure unless three_d_secure == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - liability_shift = - hash.key?('liability_shift') ? hash['liability_shift'] : SKIP - three_d_secure = ThreeDSecureAuthenticationResponse.from_hash(hash['three_d_secure']) if - hash['three_d_secure'] - - # Create object from extracted values. - AuthenticationResponse.new(liability_shift: liability_shift, - three_d_secure: three_d_secure) - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization.rb b/lib/pay_pal_restap_is/models/authorization.rb deleted file mode 100644 index ac5e18d..0000000 --- a/lib/pay_pal_restap_is/models/authorization.rb +++ /dev/null @@ -1,192 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The authorized payment transaction. - class Authorization < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status for the authorized payment. - # @return [AuthorizationStatus] - attr_accessor :status - - # The details of the authorized payment status. - # @return [AuthorizationStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the authorized payment. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :network_transaction_reference - - # The level of protection offered as defined by [PayPal Seller Protection - # for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtection] - attr_accessor :seller_protection - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :expiration_time - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['seller_protection'] = 'seller_protection' - @_hash['expiration_time'] = 'expiration_time' - @_hash['links'] = 'links' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - network_transaction_reference - seller_protection - expiration_time - links - create_time - update_time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - network_transaction_reference: SKIP, seller_protection: SKIP, - expiration_time: SKIP, links: SKIP, create_time: SKIP, - update_time: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @seller_protection = seller_protection unless seller_protection == SKIP - @expiration_time = expiration_time unless expiration_time == SKIP - @links = links unless links == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) - end - seller_protection = SellerProtection.from_hash(hash['seller_protection']) if - hash['seller_protection'] - expiration_time = - hash.key?('expiration_time') ? hash['expiration_time'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - - # Create object from extracted values. - Authorization.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - network_transaction_reference: network_transaction_reference, - seller_protection: seller_protection, - expiration_time: expiration_time, - links: links, - create_time: create_time, - update_time: update_time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb b/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb deleted file mode 100644 index 27e4f60..0000000 --- a/lib/pay_pal_restap_is/models/authorization_incomplete_reason.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The reason why the authorized status is `PENDING`. - class AuthorizationIncompleteReason - AUTHORIZATION_INCOMPLETE_REASON = [ - # TODO: Write general description for PENDING_REVIEW - PENDING_REVIEW = 'PENDING_REVIEW'.freeze, - - # TODO: Write general description for DECLINED_BY_RISK_FRAUD_FILTERS - DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization_status.rb b/lib/pay_pal_restap_is/models/authorization_status.rb deleted file mode 100644 index 6a0d814..0000000 --- a/lib/pay_pal_restap_is/models/authorization_status.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status for the authorized payment. - class AuthorizationStatus - AUTHORIZATION_STATUS = [ - # TODO: Write general description for CREATED - CREATED = 'CREATED'.freeze, - - # TODO: Write general description for CAPTURED - CAPTURED = 'CAPTURED'.freeze, - - # TODO: Write general description for DENIED - DENIED = 'DENIED'.freeze, - - # TODO: Write general description for PARTIALLY_CAPTURED - PARTIALLY_CAPTURED = 'PARTIALLY_CAPTURED'.freeze, - - # TODO: Write general description for VOIDED - VOIDED = 'VOIDED'.freeze, - - # TODO: Write general description for PENDING - PENDING = 'PENDING'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization_status_details.rb b/lib/pay_pal_restap_is/models/authorization_status_details.rb deleted file mode 100644 index 5b75c41..0000000 --- a/lib/pay_pal_restap_is/models/authorization_status_details.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details of the authorized payment status. - class AuthorizationStatusDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The reason why the authorized status is `PENDING`. - # @return [AuthorizationIncompleteReason] - attr_accessor :reason - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['reason'] = 'reason' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - reason - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(reason: SKIP) - @reason = reason unless reason == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - reason = hash.key?('reason') ? hash['reason'] : SKIP - - # Create object from extracted values. - AuthorizationStatusDetails.new(reason: reason) - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization_status_with_details.rb b/lib/pay_pal_restap_is/models/authorization_status_with_details.rb deleted file mode 100644 index d27ce8e..0000000 --- a/lib/pay_pal_restap_is/models/authorization_status_with_details.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status fields and status details for an authorized payment. - class AuthorizationStatusWithDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status for the authorized payment. - # @return [AuthorizationStatus] - attr_accessor :status - - # The details of the authorized payment status. - # @return [AuthorizationStatusDetails] - attr_accessor :status_details - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - - # Create object from extracted values. - AuthorizationStatusWithDetails.new(status: status, - status_details: status_details) - end - end -end diff --git a/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb b/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb deleted file mode 100644 index 709d347..0000000 --- a/lib/pay_pal_restap_is/models/authorization_with_additional_data.rb +++ /dev/null @@ -1,205 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The authorization with additional payment details, such as risk assessment - # and processor response. These details are populated only for certain payment - # methods. - class AuthorizationWithAdditionalData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status for the authorized payment. - # @return [AuthorizationStatus] - attr_accessor :status - - # The details of the authorized payment status. - # @return [AuthorizationStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the authorized payment. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :network_transaction_reference - - # The level of protection offered as defined by [PayPal Seller Protection - # for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtection] - attr_accessor :seller_protection - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :expiration_time - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # The processor response information for payment requests, such as direct - # credit card transactions. - # @return [ProcessorResponse] - attr_accessor :processor_response - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['seller_protection'] = 'seller_protection' - @_hash['expiration_time'] = 'expiration_time' - @_hash['links'] = 'links' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash['processor_response'] = 'processor_response' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - network_transaction_reference - seller_protection - expiration_time - links - create_time - update_time - processor_response - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - network_transaction_reference: SKIP, seller_protection: SKIP, - expiration_time: SKIP, links: SKIP, create_time: SKIP, - update_time: SKIP, processor_response: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @seller_protection = seller_protection unless seller_protection == SKIP - @expiration_time = expiration_time unless expiration_time == SKIP - @links = links unless links == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - @processor_response = processor_response unless processor_response == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) - end - seller_protection = SellerProtection.from_hash(hash['seller_protection']) if - hash['seller_protection'] - expiration_time = - hash.key?('expiration_time') ? hash['expiration_time'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - processor_response = ProcessorResponse.from_hash(hash['processor_response']) if - hash['processor_response'] - - # Create object from extracted values. - AuthorizationWithAdditionalData.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - network_transaction_reference: network_transaction_reference, - seller_protection: seller_protection, - expiration_time: expiration_time, - links: links, - create_time: create_time, - update_time: update_time, - processor_response: processor_response) - end - end -end diff --git a/lib/pay_pal_restap_is/models/avs_code.rb b/lib/pay_pal_restap_is/models/avs_code.rb deleted file mode 100644 index 290418c..0000000 --- a/lib/pay_pal_restap_is/models/avs_code.rb +++ /dev/null @@ -1,90 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The address verification code for Visa, Discover, Mastercard, or American - # Express transactions. - class AVSCode - AVS_CODE = [ - # TODO: Write general description for A - A = 'A'.freeze, - - # TODO: Write general description for B - B = 'B'.freeze, - - # TODO: Write general description for C - C = 'C'.freeze, - - # TODO: Write general description for D - D = 'D'.freeze, - - # TODO: Write general description for E - E = 'E'.freeze, - - # TODO: Write general description for F - F = 'F'.freeze, - - # TODO: Write general description for G - G = 'G'.freeze, - - # TODO: Write general description for I - I = 'I'.freeze, - - # TODO: Write general description for M - M = 'M'.freeze, - - # TODO: Write general description for N - N = 'N'.freeze, - - # TODO: Write general description for P - P = 'P'.freeze, - - # TODO: Write general description for R - R = 'R'.freeze, - - # TODO: Write general description for S - S = 'S'.freeze, - - # TODO: Write general description for U - U = 'U'.freeze, - - # TODO: Write general description for W - W = 'W'.freeze, - - # TODO: Write general description for X - X = 'X'.freeze, - - # TODO: Write general description for Y - Y = 'Y'.freeze, - - # TODO: Write general description for Z - Z = 'Z'.freeze, - - # TODO: Write general description for NULL - NULL = 'Null'.freeze, - - # TODO: Write general description for ENUM_0 - ENUM_0 = '0'.freeze, - - # TODO: Write general description for ENUM_1 - ENUM_1 = '1'.freeze, - - # TODO: Write general description for ENUM_2 - ENUM_2 = '2'.freeze, - - # TODO: Write general description for ENUM_3 - ENUM_3 = '3'.freeze, - - # TODO: Write general description for ENUM_4 - ENUM_4 = '4'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/bancontact_payment_object.rb b/lib/pay_pal_restap_is/models/bancontact_payment_object.rb deleted file mode 100644 index 2780e11..0000000 --- a/lib/pay_pal_restap_is/models/bancontact_payment_object.rb +++ /dev/null @@ -1,95 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay Bancontact. - class BancontactPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # The last digits of the card used to fund the Bancontact payment. - # @return [String] - attr_accessor :card_last_digits - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash['card_last_digits'] = 'card_last_digits' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - iban_last_chars - card_last_digits - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP, - iban_last_chars: SKIP, card_last_digits: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - @card_last_digits = card_last_digits unless card_last_digits == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - card_last_digits = - hash.key?('card_last_digits') ? hash['card_last_digits'] : SKIP - - # Create object from extracted values. - BancontactPaymentObject.new(name: name, - country_code: country_code, - bic: bic, - iban_last_chars: iban_last_chars, - card_last_digits: card_last_digits) - end - end -end diff --git a/lib/pay_pal_restap_is/models/bancontact_payment_request.rb b/lib/pay_pal_restap_is/models/bancontact_payment_request.rb deleted file mode 100644 index 4e6868a..0000000 --- a/lib/pay_pal_restap_is/models/bancontact_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Bancontact. - class BancontactPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - BancontactPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/bank_payment_token.rb b/lib/pay_pal_restap_is/models/bank_payment_token.rb deleted file mode 100644 index 7e54433..0000000 --- a/lib/pay_pal_restap_is/models/bank_payment_token.rb +++ /dev/null @@ -1,59 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Full representation of a Bank Payment Token. - class BankPaymentToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # A Resource representing a response of vaulted a ACH Debit Account. - # @return [ACHDebitResponse] - attr_accessor :ach_debit - - # A Resource representing a response of vaulted a ACH Debit Account. - # @return [SEPADebitResponse] - attr_accessor :sepa_debit - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['ach_debit'] = 'ach_debit' - @_hash['sepa_debit'] = 'sepa_debit' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - ach_debit - sepa_debit - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(ach_debit: SKIP, sepa_debit: SKIP) - @ach_debit = ach_debit unless ach_debit == SKIP - @sepa_debit = sepa_debit unless sepa_debit == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - ach_debit = ACHDebitResponse.from_hash(hash['ach_debit']) if hash['ach_debit'] - sepa_debit = SEPADebitResponse.from_hash(hash['sepa_debit']) if hash['sepa_debit'] - - # Create object from extracted values. - BankPaymentToken.new(ach_debit: ach_debit, - sepa_debit: sepa_debit) - end - end -end diff --git a/lib/pay_pal_restap_is/models/base_model.rb b/lib/pay_pal_restap_is/models/base_model.rb deleted file mode 100644 index 50f278e..0000000 --- a/lib/pay_pal_restap_is/models/base_model.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Base model. - class BaseModel < CoreLibrary::BaseModel - # Returns a Hash representation of the current object. - def to_hash - # validating the model being serialized - self.class.validate(self) if self.class.respond_to?(:validate) - - hash = {} - instance_variables.each do |name| - value = instance_variable_get(name) - name = name[1..] - key = self.class.names.key?(name) ? self.class.names[name] : name - optional_fields = self.class.optionals - nullable_fields = self.class.nullables - if value.nil? - next unless nullable_fields.include?(name) - - if !optional_fields.include?(name) && !nullable_fields.include?(name) - raise ArgumentError, - "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value." - end - end - - hash[key] = nil - unless value.nil? - if respond_to?("to_custom_#{name}") - if (value.instance_of? Array) || (value.instance_of? Hash) - params = [hash, key] - hash[key] = send("to_custom_#{name}", *params) - else - hash[key] = send("to_custom_#{name}") - end - elsif respond_to?("to_union_type_#{name}") - hash[key] = send("to_union_type_#{name}") - elsif value.instance_of? Array - hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v } - elsif value.instance_of? Hash - hash[key] = {} - value.each do |k, v| - hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v - end - else - hash[key] = value.is_a?(BaseModel) ? value.to_hash : value - end - end - end - hash - end - - # Returns a JSON representation of the curent object. - def to_json(options = {}) - hash = to_hash - hash.to_json(options) - end - end -end diff --git a/lib/pay_pal_restap_is/models/bin_details.rb b/lib/pay_pal_restap_is/models/bin_details.rb deleted file mode 100644 index 50b36b8..0000000 --- a/lib/pay_pal_restap_is/models/bin_details.rb +++ /dev/null @@ -1,88 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Bank Identification Number (BIN) details used to fund a payment. - class BinDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The Bank Identification Number (BIN) signifies the number that is being - # used to identify the granular level details (except the PII information) - # of the card. - # @return [String] - attr_accessor :bin - - # The issuer of the card instrument. - # @return [String] - attr_accessor :issuing_bank - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :bin_country_code - - # The type of card product assigned to the BIN by the issuer. These values - # are defined by the issuer and may change over time. Some examples include: - # PREPAID_GIFT, CONSUMER, CORPORATE. - # @return [Array[String]] - attr_accessor :products - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['bin'] = 'bin' - @_hash['issuing_bank'] = 'issuing_bank' - @_hash['bin_country_code'] = 'bin_country_code' - @_hash['products'] = 'products' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - bin - issuing_bank - bin_country_code - products - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(bin: SKIP, issuing_bank: SKIP, bin_country_code: SKIP, - products: SKIP) - @bin = bin unless bin == SKIP - @issuing_bank = issuing_bank unless issuing_bank == SKIP - @bin_country_code = bin_country_code unless bin_country_code == SKIP - @products = products unless products == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - bin = hash.key?('bin') ? hash['bin'] : SKIP - issuing_bank = hash.key?('issuing_bank') ? hash['issuing_bank'] : SKIP - bin_country_code = - hash.key?('bin_country_code') ? hash['bin_country_code'] : SKIP - products = hash.key?('products') ? hash['products'] : SKIP - - # Create object from extracted values. - BinDetails.new(bin: bin, - issuing_bank: issuing_bank, - bin_country_code: bin_country_code, - products: products) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_experience_context.rb b/lib/pay_pal_restap_is/models/blik_experience_context.rb deleted file mode 100644 index 757fa81..0000000 --- a/lib/pay_pal_restap_is/models/blik_experience_context.rb +++ /dev/null @@ -1,122 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer experience during the approval process for the BLIK - # payment. - class BLIKExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The location from which the shipping address is derived. - # @return [ShippingPreference] - attr_accessor :shipping_preference - - # Describes the URL. - # @return [String] - attr_accessor :return_url - - # Describes the URL. - # @return [String] - attr_accessor :cancel_url - - # An Internet Protocol address (IP address). This address assigns a - # numerical label to each device that is connected to a computer network - # through the Internet Protocol. Supports IPv4 and IPv6 addresses. - # @return [String] - attr_accessor :consumer_ip - - # The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS - # X x.y; rv:42.0). - # @return [String] - attr_accessor :consumer_user_agent - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['consumer_ip'] = 'consumer_ip' - @_hash['consumer_user_agent'] = 'consumer_user_agent' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - shipping_preference - return_url - cancel_url - consumer_ip - consumer_user_agent - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, locale: SKIP, - shipping_preference: ShippingPreference::GET_FROM_FILE, - return_url: SKIP, cancel_url: SKIP, consumer_ip: SKIP, - consumer_user_agent: SKIP) - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @consumer_ip = consumer_ip unless consumer_ip == SKIP - @consumer_user_agent = consumer_user_agent unless consumer_user_agent == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - shipping_preference = - hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - consumer_ip = hash.key?('consumer_ip') ? hash['consumer_ip'] : SKIP - consumer_user_agent = - hash.key?('consumer_user_agent') ? hash['consumer_user_agent'] : SKIP - - # Create object from extracted values. - BLIKExperienceContext.new(brand_name: brand_name, - locale: locale, - shipping_preference: shipping_preference, - return_url: return_url, - cancel_url: cancel_url, - consumer_ip: consumer_ip, - consumer_user_agent: consumer_user_agent) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb b/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb deleted file mode 100644 index 928eb37..0000000 --- a/lib/pay_pal_restap_is/models/blik_level0_payment_object.rb +++ /dev/null @@ -1,48 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using BLIK level_0 flow. - class BLIKLevel0PaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The 6-digit code used to authenticate a consumer within BLIK. - # @return [String] - attr_accessor :auth_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['auth_code'] = 'auth_code' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(auth_code:) - @auth_code = auth_code - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - auth_code = hash.key?('auth_code') ? hash['auth_code'] : nil - - # Create object from extracted values. - BLIKLevel0PaymentObject.new(auth_code: auth_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb b/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb deleted file mode 100644 index c9f5c15..0000000 --- a/lib/pay_pal_restap_is/models/blik_one_click_payment_object.rb +++ /dev/null @@ -1,52 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using BLIK one-click flow. - class BLIKOneClickPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The merchant generated, unique reference serving as a primary identifier - # for accounts connected between Blik and a merchant. - # @return [String] - attr_accessor :consumer_reference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['consumer_reference'] = 'consumer_reference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - consumer_reference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(consumer_reference: SKIP) - @consumer_reference = consumer_reference unless consumer_reference == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - consumer_reference = - hash.key?('consumer_reference') ? hash['consumer_reference'] : SKIP - - # Create object from extracted values. - BLIKOneClickPaymentObject.new(consumer_reference: consumer_reference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb b/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb deleted file mode 100644 index 58b8f2f..0000000 --- a/lib/pay_pal_restap_is/models/blik_one_click_payment_request.rb +++ /dev/null @@ -1,82 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using BLIK one-click flow. - class BLIKOneClickPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The 6-digit code used to authenticate a consumer within BLIK. - # @return [String] - attr_accessor :auth_code - - # The merchant generated, unique reference serving as a primary identifier - # for accounts connected between Blik and a merchant. - # @return [String] - attr_accessor :consumer_reference - - # A bank defined identifier used as a display name to allow the payer to - # differentiate between multiple registered bank accounts. - # @return [String] - attr_accessor :alias_label - - # A Blik-defined identifier for a specific Blik-enabled bank account that is - # associated with a given merchant. Used only in conjunction with a Consumer - # Reference. - # @return [String] - attr_accessor :alias_key - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['auth_code'] = 'auth_code' - @_hash['consumer_reference'] = 'consumer_reference' - @_hash['alias_label'] = 'alias_label' - @_hash['alias_key'] = 'alias_key' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - auth_code - alias_label - alias_key - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(consumer_reference:, auth_code: SKIP, alias_label: SKIP, - alias_key: SKIP) - @auth_code = auth_code unless auth_code == SKIP - @consumer_reference = consumer_reference - @alias_label = alias_label unless alias_label == SKIP - @alias_key = alias_key unless alias_key == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - consumer_reference = - hash.key?('consumer_reference') ? hash['consumer_reference'] : nil - auth_code = hash.key?('auth_code') ? hash['auth_code'] : SKIP - alias_label = hash.key?('alias_label') ? hash['alias_label'] : SKIP - alias_key = hash.key?('alias_key') ? hash['alias_key'] : SKIP - - # Create object from extracted values. - BLIKOneClickPaymentRequest.new(consumer_reference: consumer_reference, - auth_code: auth_code, - alias_label: alias_label, - alias_key: alias_key) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_payment_object.rb b/lib/pay_pal_restap_is/models/blik_payment_object.rb deleted file mode 100644 index 9f85236..0000000 --- a/lib/pay_pal_restap_is/models/blik_payment_object.rb +++ /dev/null @@ -1,86 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using BLIK. - class BLIKPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email - - # Information used to pay using BLIK one-click flow. - # @return [BLIKOneClickPaymentObject] - attr_accessor :one_click - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['email'] = 'email' - @_hash['one_click'] = 'one_click' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - email - one_click - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, email: SKIP, one_click: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @email = email unless email == SKIP - @one_click = one_click unless one_click == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - email = hash.key?('email') ? hash['email'] : SKIP - one_click = BLIKOneClickPaymentObject.from_hash(hash['one_click']) if hash['one_click'] - - # Create object from extracted values. - BLIKPaymentObject.new(name: name, - country_code: country_code, - email: email, - one_click: one_click) - end - end -end diff --git a/lib/pay_pal_restap_is/models/blik_payment_request.rb b/lib/pay_pal_restap_is/models/blik_payment_request.rb deleted file mode 100644 index 4f4d5d5..0000000 --- a/lib/pay_pal_restap_is/models/blik_payment_request.rb +++ /dev/null @@ -1,105 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using BLIK. - class BLIKPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email - - # Customizes the payer experience during the approval process for the BLIK - # payment. - # @return [BLIKExperienceContext] - attr_accessor :experience_context - - # Information used to pay using BLIK level_0 flow. - # @return [BLIKLevel0PaymentObject] - attr_accessor :level_0 - - # Information used to pay using BLIK one-click flow. - # @return [BLIKOneClickPaymentRequest] - attr_accessor :one_click - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['email'] = 'email' - @_hash['experience_context'] = 'experience_context' - @_hash['level_0'] = 'level_0' - @_hash['one_click'] = 'one_click' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email - experience_context - level_0 - one_click - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, email: SKIP, experience_context: SKIP, - level_0: SKIP, one_click: SKIP) - @name = name - @country_code = country_code - @email = email unless email == SKIP - @experience_context = experience_context unless experience_context == SKIP - @level_0 = level_0 unless level_0 == SKIP - @one_click = one_click unless one_click == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - email = hash.key?('email') ? hash['email'] : SKIP - experience_context = BLIKExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - level_0 = BLIKLevel0PaymentObject.from_hash(hash['level_0']) if hash['level_0'] - one_click = BLIKOneClickPaymentRequest.from_hash(hash['one_click']) if hash['one_click'] - - # Create object from extracted values. - BLIKPaymentRequest.new(name: name, - country_code: country_code, - email: email, - experience_context: experience_context, - level_0: level_0, - one_click: one_click) - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture.rb b/lib/pay_pal_restap_is/models/capture.rb deleted file mode 100644 index d954f92..0000000 --- a/lib/pay_pal_restap_is/models/capture.rb +++ /dev/null @@ -1,228 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A captured payment. - class Capture < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status of the captured payment. - # @return [CaptureStatus] - attr_accessor :status - - # The details of the captured payment status. - # @return [CaptureStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the captured payment. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :network_transaction_reference - - # The level of protection offered as defined by [PayPal Seller Protection - # for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtection] - attr_accessor :seller_protection - - # Indicates whether you can make additional captures against the authorized - # payment. Set to `true` if you do not intend to capture additional payments - # against the authorization. Set to `false` if you intend to capture - # additional payments against the authorization. - # @return [TrueClass | FalseClass] - attr_accessor :final_capture - - # The detailed breakdown of the capture activity. This is not available for - # transactions that are in pending state. - # @return [SellerReceivableBreakdown] - attr_accessor :seller_receivable_breakdown - - # The funds that are held on behalf of the merchant. - # @return [DisbursementMode] - attr_accessor :disbursement_mode - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The processor response information for payment requests, such as direct - # credit card transactions. - # @return [ProcessorResponse] - attr_accessor :processor_response - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['seller_protection'] = 'seller_protection' - @_hash['final_capture'] = 'final_capture' - @_hash['seller_receivable_breakdown'] = 'seller_receivable_breakdown' - @_hash['disbursement_mode'] = 'disbursement_mode' - @_hash['links'] = 'links' - @_hash['processor_response'] = 'processor_response' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - network_transaction_reference - seller_protection - final_capture - seller_receivable_breakdown - disbursement_mode - links - processor_response - create_time - update_time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - network_transaction_reference: SKIP, seller_protection: SKIP, - final_capture: false, seller_receivable_breakdown: SKIP, - disbursement_mode: DisbursementMode::INSTANT, links: SKIP, - processor_response: SKIP, create_time: SKIP, - update_time: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @seller_protection = seller_protection unless seller_protection == SKIP - @final_capture = final_capture unless final_capture == SKIP - unless seller_receivable_breakdown == SKIP - @seller_receivable_breakdown = - seller_receivable_breakdown - end - @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP - @links = links unless links == SKIP - @processor_response = processor_response unless processor_response == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = CaptureStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) - end - seller_protection = SellerProtection.from_hash(hash['seller_protection']) if - hash['seller_protection'] - final_capture = hash['final_capture'] ||= false - if hash['seller_receivable_breakdown'] - seller_receivable_breakdown = SellerReceivableBreakdown.from_hash(hash['seller_receivable_breakdown']) - end - disbursement_mode = - hash['disbursement_mode'] ||= DisbursementMode::INSTANT - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - processor_response = ProcessorResponse.from_hash(hash['processor_response']) if - hash['processor_response'] - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - - # Create object from extracted values. - Capture.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - network_transaction_reference: network_transaction_reference, - seller_protection: seller_protection, - final_capture: final_capture, - seller_receivable_breakdown: seller_receivable_breakdown, - disbursement_mode: disbursement_mode, - links: links, - processor_response: processor_response, - create_time: create_time, - update_time: update_time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb b/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb deleted file mode 100644 index 9dabf7d..0000000 --- a/lib/pay_pal_restap_is/models/capture_incomplete_reason.rb +++ /dev/null @@ -1,55 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The reason why the captured payment status is `PENDING` or `DENIED`. - class CaptureIncompleteReason - CAPTURE_INCOMPLETE_REASON = [ - # TODO: Write general description for BUYER_COMPLAINT - BUYER_COMPLAINT = 'BUYER_COMPLAINT'.freeze, - - # TODO: Write general description for CHARGEBACK - CHARGEBACK = 'CHARGEBACK'.freeze, - - # TODO: Write general description for ECHECK - ECHECK = 'ECHECK'.freeze, - - # TODO: Write general description for INTERNATIONAL_WITHDRAWAL - INTERNATIONAL_WITHDRAWAL = 'INTERNATIONAL_WITHDRAWAL'.freeze, - - # TODO: Write general description for OTHER - OTHER = 'OTHER'.freeze, - - # TODO: Write general description for PENDING_REVIEW - PENDING_REVIEW = 'PENDING_REVIEW'.freeze, - - # TODO: Write general description for - # RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION - RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION = 'RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION'.freeze, - - # TODO: Write general description for REFUNDED - REFUNDED = 'REFUNDED'.freeze, - - # TODO: Write general description for - # TRANSACTION_APPROVED_AWAITING_FUNDING - TRANSACTION_APPROVED_AWAITING_FUNDING = 'TRANSACTION_APPROVED_AWAITING_FUNDING'.freeze, - - # TODO: Write general description for UNILATERAL - UNILATERAL = 'UNILATERAL'.freeze, - - # TODO: Write general description for VERIFICATION_REQUIRED - VERIFICATION_REQUIRED = 'VERIFICATION_REQUIRED'.freeze, - - # TODO: Write general description for DECLINED_BY_RISK_FRAUD_FILTERS - DECLINED_BY_RISK_FRAUD_FILTERS = 'DECLINED_BY_RISK_FRAUD_FILTERS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_payment_instruction.rb b/lib/pay_pal_restap_is/models/capture_payment_instruction.rb deleted file mode 100644 index 877dbda..0000000 --- a/lib/pay_pal_restap_is/models/capture_payment_instruction.rb +++ /dev/null @@ -1,89 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Any additional payment instructions to be consider during payment - # processing. This processing instruction is applicable for Capturing an order - # or Authorizing an Order. - class CapturePaymentInstruction < BaseModel - SKIP = Object.new - private_constant :SKIP - - # An array of platform or partner fees, commissions, or brokerage fees that - # associated with the captured payment. - # @return [Array[PlatformFee]] - attr_accessor :platform_fees - - # The funds that are held on behalf of the merchant. - # @return [DisbursementMode] - attr_accessor :disbursement_mode - - # FX identifier generated returned by PayPal to be used for payment - # processing in order to honor FX rate (for eligible integrations) to be - # used when amount is settled/received into the payee account. - # @return [String] - attr_accessor :payee_receivable_fx_rate_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['platform_fees'] = 'platform_fees' - @_hash['disbursement_mode'] = 'disbursement_mode' - @_hash['payee_receivable_fx_rate_id'] = 'payee_receivable_fx_rate_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - platform_fees - disbursement_mode - payee_receivable_fx_rate_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(platform_fees: SKIP, - disbursement_mode: DisbursementMode::INSTANT, - payee_receivable_fx_rate_id: SKIP) - @platform_fees = platform_fees unless platform_fees == SKIP - @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP - unless payee_receivable_fx_rate_id == SKIP - @payee_receivable_fx_rate_id = - payee_receivable_fx_rate_id - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - # Parameter is an array, so we need to iterate through it - platform_fees = nil - unless hash['platform_fees'].nil? - platform_fees = [] - hash['platform_fees'].each do |structure| - platform_fees << (PlatformFee.from_hash(structure) if structure) - end - end - - platform_fees = SKIP unless hash.key?('platform_fees') - disbursement_mode = - hash['disbursement_mode'] ||= DisbursementMode::INSTANT - payee_receivable_fx_rate_id = - hash.key?('payee_receivable_fx_rate_id') ? hash['payee_receivable_fx_rate_id'] : SKIP - - # Create object from extracted values. - CapturePaymentInstruction.new(platform_fees: platform_fees, - disbursement_mode: disbursement_mode, - payee_receivable_fx_rate_id: payee_receivable_fx_rate_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_request.rb b/lib/pay_pal_restap_is/models/capture_request.rb deleted file mode 100644 index 8c88d83..0000000 --- a/lib/pay_pal_restap_is/models/capture_request.rb +++ /dev/null @@ -1,108 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # CaptureRequest Model. - class CaptureRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # An informational note about this settlement. Appears in both the payer's - # transaction history and the emails that the payer receives. - # @return [String] - attr_accessor :note_to_payer - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # Indicates whether you can make additional captures against the authorized - # payment. Set to `true` if you do not intend to capture additional payments - # against the authorization. Set to `false` if you intend to capture - # additional payments against the authorization. - # @return [TrueClass | FalseClass] - attr_accessor :final_capture - - # Any additional payment instructions to be consider during payment - # processing. This processing instruction is applicable for Capturing an - # order or Authorizing an Order. - # @return [CapturePaymentInstruction] - attr_accessor :payment_instruction - - # The payment descriptor on the payer's account statement. - # @return [String] - attr_accessor :soft_descriptor - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['invoice_id'] = 'invoice_id' - @_hash['note_to_payer'] = 'note_to_payer' - @_hash['amount'] = 'amount' - @_hash['final_capture'] = 'final_capture' - @_hash['payment_instruction'] = 'payment_instruction' - @_hash['soft_descriptor'] = 'soft_descriptor' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - invoice_id - note_to_payer - amount - final_capture - payment_instruction - soft_descriptor - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(invoice_id: SKIP, note_to_payer: SKIP, amount: SKIP, - final_capture: false, payment_instruction: SKIP, - soft_descriptor: SKIP) - @invoice_id = invoice_id unless invoice_id == SKIP - @note_to_payer = note_to_payer unless note_to_payer == SKIP - @amount = amount unless amount == SKIP - @final_capture = final_capture unless final_capture == SKIP - @payment_instruction = payment_instruction unless payment_instruction == SKIP - @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - final_capture = hash['final_capture'] ||= false - payment_instruction = CapturePaymentInstruction.from_hash(hash['payment_instruction']) if - hash['payment_instruction'] - soft_descriptor = - hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP - - # Create object from extracted values. - CaptureRequest.new(invoice_id: invoice_id, - note_to_payer: note_to_payer, - amount: amount, - final_capture: final_capture, - payment_instruction: payment_instruction, - soft_descriptor: soft_descriptor) - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_status.rb b/lib/pay_pal_restap_is/models/capture_status.rb deleted file mode 100644 index 2e22343..0000000 --- a/lib/pay_pal_restap_is/models/capture_status.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status of the captured payment. - class CaptureStatus - CAPTURE_STATUS = [ - # TODO: Write general description for COMPLETED - COMPLETED = 'COMPLETED'.freeze, - - # TODO: Write general description for DECLINED - DECLINED = 'DECLINED'.freeze, - - # TODO: Write general description for PARTIALLY_REFUNDED - PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED'.freeze, - - # TODO: Write general description for PENDING - PENDING = 'PENDING'.freeze, - - # TODO: Write general description for REFUNDED - REFUNDED = 'REFUNDED'.freeze, - - # TODO: Write general description for FAILED - FAILED = 'FAILED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_status_details.rb b/lib/pay_pal_restap_is/models/capture_status_details.rb deleted file mode 100644 index 11fda0c..0000000 --- a/lib/pay_pal_restap_is/models/capture_status_details.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details of the captured payment status. - class CaptureStatusDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The reason why the captured payment status is `PENDING` or `DENIED`. - # @return [CaptureIncompleteReason] - attr_accessor :reason - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['reason'] = 'reason' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - reason - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(reason: SKIP) - @reason = reason unless reason == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - reason = hash.key?('reason') ? hash['reason'] : SKIP - - # Create object from extracted values. - CaptureStatusDetails.new(reason: reason) - end - end -end diff --git a/lib/pay_pal_restap_is/models/capture_status_with_details.rb b/lib/pay_pal_restap_is/models/capture_status_with_details.rb deleted file mode 100644 index eb496df..0000000 --- a/lib/pay_pal_restap_is/models/capture_status_with_details.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status and status details of a captured payment. - class CaptureStatusWithDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status of the captured payment. - # @return [CaptureStatus] - attr_accessor :status - - # The details of the captured payment status. - # @return [CaptureStatusDetails] - attr_accessor :status_details - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = CaptureStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - - # Create object from extracted values. - CaptureStatusWithDetails.new(status: status, - status_details: status_details) - end - end -end diff --git a/lib/pay_pal_restap_is/models/captured_payment.rb b/lib/pay_pal_restap_is/models/captured_payment.rb deleted file mode 100644 index a2a61a5..0000000 --- a/lib/pay_pal_restap_is/models/captured_payment.rb +++ /dev/null @@ -1,248 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A captured payment. - class CapturedPayment < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status of the captured payment. - # @return [CaptureStatus] - attr_accessor :status - - # The details of the captured payment status. - # @return [CaptureStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the captured payment. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :network_transaction_reference - - # The level of protection offered as defined by [PayPal Seller Protection - # for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtection] - attr_accessor :seller_protection - - # Indicates whether you can make additional captures against the authorized - # payment. Set to `true` if you do not intend to capture additional payments - # against the authorization. Set to `false` if you intend to capture - # additional payments against the authorization. - # @return [TrueClass | FalseClass] - attr_accessor :final_capture - - # The detailed breakdown of the capture activity. This is not available for - # transactions that are in pending state. - # @return [SellerReceivableBreakdown] - attr_accessor :seller_receivable_breakdown - - # The funds that are held on behalf of the merchant. - # @return [DisbursementMode] - attr_accessor :disbursement_mode - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The processor response information for payment requests, such as direct - # credit card transactions. - # @return [ProcessorResponse] - attr_accessor :processor_response - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # The supplementary data. - # @return [PaymentSupplementaryData] - attr_accessor :supplementary_data - - # The details for the merchant who receives the funds and fulfills the - # order. The merchant is also known as the payee. - # @return [Payee] - attr_accessor :payee - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['seller_protection'] = 'seller_protection' - @_hash['final_capture'] = 'final_capture' - @_hash['seller_receivable_breakdown'] = 'seller_receivable_breakdown' - @_hash['disbursement_mode'] = 'disbursement_mode' - @_hash['links'] = 'links' - @_hash['processor_response'] = 'processor_response' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash['supplementary_data'] = 'supplementary_data' - @_hash['payee'] = 'payee' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - network_transaction_reference - seller_protection - final_capture - seller_receivable_breakdown - disbursement_mode - links - processor_response - create_time - update_time - supplementary_data - payee - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - network_transaction_reference: SKIP, seller_protection: SKIP, - final_capture: false, seller_receivable_breakdown: SKIP, - disbursement_mode: DisbursementMode::INSTANT, links: SKIP, - processor_response: SKIP, create_time: SKIP, - update_time: SKIP, supplementary_data: SKIP, payee: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @seller_protection = seller_protection unless seller_protection == SKIP - @final_capture = final_capture unless final_capture == SKIP - unless seller_receivable_breakdown == SKIP - @seller_receivable_breakdown = - seller_receivable_breakdown - end - @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP - @links = links unless links == SKIP - @processor_response = processor_response unless processor_response == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - @supplementary_data = supplementary_data unless supplementary_data == SKIP - @payee = payee unless payee == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = CaptureStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) - end - seller_protection = SellerProtection.from_hash(hash['seller_protection']) if - hash['seller_protection'] - final_capture = hash['final_capture'] ||= false - if hash['seller_receivable_breakdown'] - seller_receivable_breakdown = SellerReceivableBreakdown.from_hash(hash['seller_receivable_breakdown']) - end - disbursement_mode = - hash['disbursement_mode'] ||= DisbursementMode::INSTANT - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - processor_response = ProcessorResponse.from_hash(hash['processor_response']) if - hash['processor_response'] - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if - hash['supplementary_data'] - payee = Payee.from_hash(hash['payee']) if hash['payee'] - - # Create object from extracted values. - CapturedPayment.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - network_transaction_reference: network_transaction_reference, - seller_protection: seller_protection, - final_capture: final_capture, - seller_receivable_breakdown: seller_receivable_breakdown, - disbursement_mode: disbursement_mode, - links: links, - processor_response: processor_response, - create_time: create_time, - update_time: update_time, - supplementary_data: supplementary_data, - payee: payee) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_attributes.rb b/lib/pay_pal_restap_is/models/card_attributes.rb deleted file mode 100644 index bd0c3e3..0000000 --- a/lib/pay_pal_restap_is/models/card_attributes.rb +++ /dev/null @@ -1,70 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of this card. - class CardAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a customer in PayPal's system of record. - # @return [CustomerInformation] - attr_accessor :customer - - # Basic vault instruction specification that can be extended by specific - # payment sources that supports vaulting. - # @return [VaultInstructionBase] - attr_accessor :vault - - # The API caller can opt in to verify the card through PayPal offered - # verification services (e.g. Smart Dollar Auth, 3DS). - # @return [CardVerification] - attr_accessor :verification - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['vault'] = 'vault' - @_hash['verification'] = 'verification' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - vault - verification - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(customer: SKIP, vault: SKIP, verification: SKIP) - @customer = customer unless customer == SKIP - @vault = vault unless vault == SKIP - @verification = verification unless verification == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - customer = CustomerInformation.from_hash(hash['customer']) if hash['customer'] - vault = VaultInstructionBase.from_hash(hash['vault']) if hash['vault'] - verification = CardVerification.from_hash(hash['verification']) if hash['verification'] - - # Create object from extracted values. - CardAttributes.new(customer: customer, - vault: vault, - verification: verification) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_attributes_response.rb b/lib/pay_pal_restap_is/models/card_attributes_response.rb deleted file mode 100644 index d685ef1..0000000 --- a/lib/pay_pal_restap_is/models/card_attributes_response.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of this card. - class CardAttributesResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a saved payment source. - # @return [VaultResponse] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault: SKIP) - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - CardAttributesResponse.new(vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_brand.rb b/lib/pay_pal_restap_is/models/card_brand.rb deleted file mode 100644 index 0af81c0..0000000 --- a/lib/pay_pal_restap_is/models/card_brand.rb +++ /dev/null @@ -1,90 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - class CardBrand - CARD_BRAND = [ - # TODO: Write general description for VISA - VISA = 'VISA'.freeze, - - # TODO: Write general description for MASTERCARD - MASTERCARD = 'MASTERCARD'.freeze, - - # TODO: Write general description for DISCOVER - DISCOVER = 'DISCOVER'.freeze, - - # TODO: Write general description for AMEX - AMEX = 'AMEX'.freeze, - - # TODO: Write general description for SOLO - SOLO = 'SOLO'.freeze, - - # TODO: Write general description for JCB - JCB = 'JCB'.freeze, - - # TODO: Write general description for STAR - STAR = 'STAR'.freeze, - - # TODO: Write general description for DELTA - DELTA = 'DELTA'.freeze, - - # TODO: Write general description for SWITCH - SWITCH = 'SWITCH'.freeze, - - # TODO: Write general description for MAESTRO - MAESTRO = 'MAESTRO'.freeze, - - # TODO: Write general description for CB_NATIONALE - CB_NATIONALE = 'CB_NATIONALE'.freeze, - - # TODO: Write general description for CONFIGOGA - CONFIGOGA = 'CONFIGOGA'.freeze, - - # TODO: Write general description for CONFIDIS - CONFIDIS = 'CONFIDIS'.freeze, - - # TODO: Write general description for ELECTRON - ELECTRON = 'ELECTRON'.freeze, - - # TODO: Write general description for CETELEM - CETELEM = 'CETELEM'.freeze, - - # TODO: Write general description for CHINA_UNION_PAY - CHINA_UNION_PAY = 'CHINA_UNION_PAY'.freeze, - - # TODO: Write general description for DINERS - DINERS = 'DINERS'.freeze, - - # TODO: Write general description for ELO - ELO = 'ELO'.freeze, - - # TODO: Write general description for HIPER - HIPER = 'HIPER'.freeze, - - # TODO: Write general description for HIPERCARD - HIPERCARD = 'HIPERCARD'.freeze, - - # TODO: Write general description for RUPAY - RUPAY = 'RUPAY'.freeze, - - # TODO: Write general description for GE - GE = 'GE'.freeze, - - # TODO: Write general description for SYNCHRONY - SYNCHRONY = 'SYNCHRONY'.freeze, - - # TODO: Write general description for UNKNOWN - UNKNOWN = 'UNKNOWN'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_experience_context.rb b/lib/pay_pal_restap_is/models/card_experience_context.rb deleted file mode 100644 index 7497220..0000000 --- a/lib/pay_pal_restap_is/models/card_experience_context.rb +++ /dev/null @@ -1,59 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer experience during the 3DS Approval for payment. - class CardExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Describes the URL. - # @return [String] - attr_accessor :return_url - - # Describes the URL. - # @return [String] - attr_accessor :cancel_url - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - return_url - cancel_url - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(return_url: SKIP, cancel_url: SKIP) - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - - # Create object from extracted values. - CardExperienceContext.new(return_url: return_url, - cancel_url: cancel_url) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_from_request.rb b/lib/pay_pal_restap_is/models/card_from_request.rb deleted file mode 100644 index 1e776c0..0000000 --- a/lib/pay_pal_restap_is/models/card_from_request.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Representation of card details as received in the request. - class CardFromRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['expiry'] = 'expiry' - @_hash['last_digits'] = 'last_digits' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - expiry - last_digits - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(expiry: SKIP, last_digits: SKIP) - @expiry = expiry unless expiry == SKIP - @last_digits = last_digits unless last_digits == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - - # Create object from extracted values. - CardFromRequest.new(expiry: expiry, - last_digits: last_digits) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_payment_token.rb b/lib/pay_pal_restap_is/models/card_payment_token.rb deleted file mode 100644 index 0afea31..0000000 --- a/lib/pay_pal_restap_is/models/card_payment_token.rb +++ /dev/null @@ -1,166 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Full representation of a Card Payment Token including network token. - class CardPaymentToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # Address request details. - # @return [AddressDetails] - attr_accessor :billing_address - - # Verification status of Card. - # @return [String] - attr_accessor :verification_status - - # Card Verification details including the authorization details and 3D - # SECURE details. - # @return [CardVerificationDetails] - attr_accessor :verification - - # Previous network transaction reference including id in response. - # @return [NetworkTransactionReferenceEntity] - attr_accessor :network_transaction_reference - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # Bank Identification Number (BIN) details used to fund a payment. - # @return [BinDetails] - attr_accessor :bin_details - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # Type of card. i.e Credit, Debit and so on. - # @return [Object] - attr_accessor :network_token - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['brand'] = 'brand' - @_hash['expiry'] = 'expiry' - @_hash['billing_address'] = 'billing_address' - @_hash['verification_status'] = 'verification_status' - @_hash['verification'] = 'verification' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['authentication_result'] = 'authentication_result' - @_hash['bin_details'] = 'bin_details' - @_hash['type'] = 'type' - @_hash['network_token'] = 'network_token' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - brand - expiry - billing_address - verification_status - verification - network_transaction_reference - authentication_result - bin_details - type - network_token - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, - billing_address: SKIP, verification_status: SKIP, - verification: SKIP, network_transaction_reference: SKIP, - authentication_result: SKIP, bin_details: SKIP, type: SKIP, - network_token: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @brand = brand unless brand == SKIP - @expiry = expiry unless expiry == SKIP - @billing_address = billing_address unless billing_address == SKIP - @verification_status = verification_status unless verification_status == SKIP - @verification = verification unless verification == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @authentication_result = authentication_result unless authentication_result == SKIP - @bin_details = bin_details unless bin_details == SKIP - @type = type unless type == SKIP - @network_token = network_token unless network_token == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - billing_address = AddressDetails.from_hash(hash['billing_address']) if - hash['billing_address'] - verification_status = - hash.key?('verification_status') ? hash['verification_status'] : SKIP - verification = CardVerificationDetails.from_hash(hash['verification']) if - hash['verification'] - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) - end - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] - type = hash.key?('type') ? hash['type'] : SKIP - network_token = hash.key?('network_token') ? hash['network_token'] : SKIP - - # Create object from extracted values. - CardPaymentToken.new(name: name, - last_digits: last_digits, - brand: brand, - expiry: expiry, - billing_address: billing_address, - verification_status: verification_status, - verification: verification, - network_transaction_reference: network_transaction_reference, - authentication_result: authentication_result, - bin_details: bin_details, - type: type, - network_token: network_token) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_request.rb b/lib/pay_pal_restap_is/models/card_request.rb deleted file mode 100644 index eb2c75b..0000000 --- a/lib/pay_pal_restap_is/models/card_request.rb +++ /dev/null @@ -1,165 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment card to use to fund a payment. Can be a credit or debit - # card.
Note: Passing card number, cvv and expiry - # directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which - # you do not have to take on the PCI SAQ D burden by using - # hosted fields - refer to this - # Integration Guide*.
- class CardRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The primary account number (PAN) for the payment card. - # @return [String] - attr_accessor :number - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # The three- or four-digit security code of the card. Also known as the CVV, - # CVC, CVN, CVE, or CID. This parameter cannot be present in the request - # when `payment_initiator=MERCHANT`. - # @return [String] - attr_accessor :security_code - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # Additional attributes associated with the use of this card. - # @return [CardAttributes] - attr_accessor :attributes - - # The PayPal-generated ID for the vaulted payment source. This ID should be - # stored on the merchant's server so the saved payment source can be used - # for future transactions. - # @return [String] - attr_accessor :vault_id - - # Provides additional details to process a payment using a `card` that has - # been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only - # with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- # @return [CardStoredCredential] - attr_accessor :stored_credential - - # The Third Party Network token used to fund a payment. - # @return [NetworkToken] - attr_accessor :network_token - - # Customizes the payer experience during the 3DS Approval for payment. - # @return [CardExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['number'] = 'number' - @_hash['expiry'] = 'expiry' - @_hash['security_code'] = 'security_code' - @_hash['billing_address'] = 'billing_address' - @_hash['attributes'] = 'attributes' - @_hash['vault_id'] = 'vault_id' - @_hash['stored_credential'] = 'stored_credential' - @_hash['network_token'] = 'network_token' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - number - expiry - security_code - billing_address - attributes - vault_id - stored_credential - network_token - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, - billing_address: SKIP, attributes: SKIP, vault_id: SKIP, - stored_credential: SKIP, network_token: SKIP, - experience_context: SKIP) - @name = name unless name == SKIP - @number = number unless number == SKIP - @expiry = expiry unless expiry == SKIP - @security_code = security_code unless security_code == SKIP - @billing_address = billing_address unless billing_address == SKIP - @attributes = attributes unless attributes == SKIP - @vault_id = vault_id unless vault_id == SKIP - @stored_credential = stored_credential unless stored_credential == SKIP - @network_token = network_token unless network_token == SKIP - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - number = hash.key?('number') ? hash['number'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - security_code = hash.key?('security_code') ? hash['security_code'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - attributes = CardAttributes.from_hash(hash['attributes']) if hash['attributes'] - vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP - stored_credential = CardStoredCredential.from_hash(hash['stored_credential']) if - hash['stored_credential'] - network_token = NetworkToken.from_hash(hash['network_token']) if hash['network_token'] - experience_context = CardExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - CardRequest.new(name: name, - number: number, - expiry: expiry, - security_code: security_code, - billing_address: billing_address, - attributes: attributes, - vault_id: vault_id, - stored_credential: stored_credential, - network_token: network_token, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_response.rb b/lib/pay_pal_restap_is/models/card_response.rb deleted file mode 100644 index 79538eb..0000000 --- a/lib/pay_pal_restap_is/models/card_response.rb +++ /dev/null @@ -1,139 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment card to use to fund a payment. Card can be a credit or debit - # card. - class CardResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # Array of brands or networks associated with the card. - # @return [Array[CardBrand]] - attr_accessor :available_networks - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # Additional attributes associated with the use of this card. - # @return [CardAttributesResponse] - attr_accessor :attributes - - # Representation of card details as received in the request. - # @return [CardFromRequest] - attr_accessor :from_request - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # Bank Identification Number (BIN) details used to fund a payment. - # @return [BinDetails] - attr_accessor :bin_details - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['brand'] = 'brand' - @_hash['available_networks'] = 'available_networks' - @_hash['type'] = 'type' - @_hash['authentication_result'] = 'authentication_result' - @_hash['attributes'] = 'attributes' - @_hash['from_request'] = 'from_request' - @_hash['expiry'] = 'expiry' - @_hash['bin_details'] = 'bin_details' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - brand - available_networks - type - authentication_result - attributes - from_request - expiry - bin_details - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, - available_networks: SKIP, type: SKIP, - authentication_result: SKIP, attributes: SKIP, - from_request: SKIP, expiry: SKIP, bin_details: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @brand = brand unless brand == SKIP - @available_networks = available_networks unless available_networks == SKIP - @type = type unless type == SKIP - @authentication_result = authentication_result unless authentication_result == SKIP - @attributes = attributes unless attributes == SKIP - @from_request = from_request unless from_request == SKIP - @expiry = expiry unless expiry == SKIP - @bin_details = bin_details unless bin_details == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - available_networks = - hash.key?('available_networks') ? hash['available_networks'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - attributes = CardAttributesResponse.from_hash(hash['attributes']) if hash['attributes'] - from_request = CardFromRequest.from_hash(hash['from_request']) if hash['from_request'] - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] - - # Create object from extracted values. - CardResponse.new(name: name, - last_digits: last_digits, - brand: brand, - available_networks: available_networks, - type: type, - authentication_result: authentication_result, - attributes: attributes, - from_request: from_request, - expiry: expiry, - bin_details: bin_details) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_response_entity.rb b/lib/pay_pal_restap_is/models/card_response_entity.rb deleted file mode 100644 index b427ca5..0000000 --- a/lib/pay_pal_restap_is/models/card_response_entity.rb +++ /dev/null @@ -1,156 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Full representation of a Card Payment Token. - class CardResponseEntity < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # Address request details. - # @return [AddressDetails] - attr_accessor :billing_address - - # Verification status of Card. - # @return [String] - attr_accessor :verification_status - - # Card Verification details including the authorization details and 3D - # SECURE details. - # @return [CardVerificationDetails] - attr_accessor :verification - - # Previous network transaction reference including id in response. - # @return [NetworkTransactionReferenceEntity] - attr_accessor :network_transaction_reference - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # Bank Identification Number (BIN) details used to fund a payment. - # @return [BinDetails] - attr_accessor :bin_details - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['brand'] = 'brand' - @_hash['expiry'] = 'expiry' - @_hash['billing_address'] = 'billing_address' - @_hash['verification_status'] = 'verification_status' - @_hash['verification'] = 'verification' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['authentication_result'] = 'authentication_result' - @_hash['bin_details'] = 'bin_details' - @_hash['type'] = 'type' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - brand - expiry - billing_address - verification_status - verification - network_transaction_reference - authentication_result - bin_details - type - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, - billing_address: SKIP, verification_status: SKIP, - verification: SKIP, network_transaction_reference: SKIP, - authentication_result: SKIP, bin_details: SKIP, type: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @brand = brand unless brand == SKIP - @expiry = expiry unless expiry == SKIP - @billing_address = billing_address unless billing_address == SKIP - @verification_status = verification_status unless verification_status == SKIP - @verification = verification unless verification == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @authentication_result = authentication_result unless authentication_result == SKIP - @bin_details = bin_details unless bin_details == SKIP - @type = type unless type == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - billing_address = AddressDetails.from_hash(hash['billing_address']) if - hash['billing_address'] - verification_status = - hash.key?('verification_status') ? hash['verification_status'] : SKIP - verification = CardVerificationDetails.from_hash(hash['verification']) if - hash['verification'] - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) - end - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] - type = hash.key?('type') ? hash['type'] : SKIP - - # Create object from extracted values. - CardResponseEntity.new(name: name, - last_digits: last_digits, - brand: brand, - expiry: expiry, - billing_address: billing_address, - verification_status: verification_status, - verification: verification, - network_transaction_reference: network_transaction_reference, - authentication_result: authentication_result, - bin_details: bin_details, - type: type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_stored_credential.rb b/lib/pay_pal_restap_is/models/card_stored_credential.rb deleted file mode 100644 index f7bea3d..0000000 --- a/lib/pay_pal_restap_is/models/card_stored_credential.rb +++ /dev/null @@ -1,95 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Provides additional details to process a payment using a `card` that has - # been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- class CardStoredCredential < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The person or party who initiated or triggered the payment. - # @return [PaymentInitiator] - attr_accessor :payment_initiator - - # Indicates the type of the stored payment_source payment. - # @return [StoredPaymentSourcePaymentType] - attr_accessor :payment_type - - # Indicates if this is a `first` or `subsequent` payment using a stored - # payment source (also referred to as stored credential or card on file). - # @return [StoredPaymentSourceUsageType] - attr_accessor :usage - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :previous_network_transaction_reference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payment_initiator'] = 'payment_initiator' - @_hash['payment_type'] = 'payment_type' - @_hash['usage'] = 'usage' - @_hash['previous_network_transaction_reference'] = - 'previous_network_transaction_reference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - usage - previous_network_transaction_reference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_initiator:, payment_type:, - usage: StoredPaymentSourceUsageType::DERIVED, - previous_network_transaction_reference: SKIP) - @payment_initiator = payment_initiator - @payment_type = payment_type - @usage = usage unless usage == SKIP - unless previous_network_transaction_reference == SKIP - @previous_network_transaction_reference = - previous_network_transaction_reference - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_initiator = - hash.key?('payment_initiator') ? hash['payment_initiator'] : nil - payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil - usage = hash['usage'] ||= StoredPaymentSourceUsageType::DERIVED - if hash['previous_network_transaction_reference'] - previous_network_transaction_reference = NetworkTransactionReference.from_hash(hash['previous_network_transaction_reference']) - end - - # Create object from extracted values. - CardStoredCredential.new(payment_initiator: payment_initiator, - payment_type: payment_type, - usage: usage, - previous_network_transaction_reference: previous_network_transaction_reference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_supplementary_data.rb b/lib/pay_pal_restap_is/models/card_supplementary_data.rb deleted file mode 100644 index 908707c..0000000 --- a/lib/pay_pal_restap_is/models/card_supplementary_data.rb +++ /dev/null @@ -1,71 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Merchants and partners can add Level 2 and 3 data to payments to reduce risk - # and payment processing costs. For more information about processing - # payments, see check - # out or multiparty checkout. - class CardSupplementaryData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The level 2 card processing data collections. If your merchant account has - # been configured for Level 2 processing this field will be passed to the - # processor on your behalf. Please contact your PayPal Technical Account - # Manager to define level 2 data for your business. - # @return [Level2CardProcessingData] - attr_accessor :level_2 - - # The level 3 card processing data collections, If your merchant account has - # been configured for Level 3 processing this field will be passed to the - # processor on your behalf. Please contact your PayPal Technical Account - # Manager to define level 3 data for your business. - # @return [Level3CardProcessingData] - attr_accessor :level_3 - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['level_2'] = 'level_2' - @_hash['level_3'] = 'level_3' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - level_2 - level_3 - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(level_2: SKIP, level_3: SKIP) - @level_2 = level_2 unless level_2 == SKIP - @level_3 = level_3 unless level_3 == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - level_2 = Level2CardProcessingData.from_hash(hash['level_2']) if hash['level_2'] - level_3 = Level3CardProcessingData.from_hash(hash['level_3']) if hash['level_3'] - - # Create object from extracted values. - CardSupplementaryData.new(level_2: level_2, - level_3: level_3) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_type.rb b/lib/pay_pal_restap_is/models/card_type.rb deleted file mode 100644 index 7c698aa..0000000 --- a/lib/pay_pal_restap_is/models/card_type.rb +++ /dev/null @@ -1,32 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Type of card. i.e Credit, Debit and so on. - class CardType - CARD_TYPE = [ - # TODO: Write general description for CREDIT - CREDIT = 'CREDIT'.freeze, - - # TODO: Write general description for DEBIT - DEBIT = 'DEBIT'.freeze, - - # TODO: Write general description for PREPAID - PREPAID = 'PREPAID'.freeze, - - # TODO: Write general description for STORE - STORE = 'STORE'.freeze, - - # TODO: Write general description for UNKNOWN - UNKNOWN = 'UNKNOWN'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_verification.rb b/lib/pay_pal_restap_is/models/card_verification.rb deleted file mode 100644 index 2974b18..0000000 --- a/lib/pay_pal_restap_is/models/card_verification.rb +++ /dev/null @@ -1,51 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The API caller can opt in to verify the card through PayPal offered - # verification services (e.g. Smart Dollar Auth, 3DS). - class CardVerification < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The method used for card verification. - # @return [CardVerificationMethod] - attr_accessor :method - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['method'] = 'method' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - method - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(method: CardVerificationMethod::SCA_WHEN_REQUIRED) - @method = method unless method == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - method = hash['method'] ||= CardVerificationMethod::SCA_WHEN_REQUIRED - - # Create object from extracted values. - CardVerification.new(method: method) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_verification_details.rb b/lib/pay_pal_restap_is/models/card_verification_details.rb deleted file mode 100644 index def8259..0000000 --- a/lib/pay_pal_restap_is/models/card_verification_details.rb +++ /dev/null @@ -1,111 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Card Verification details including the authorization details and 3D SECURE - # details. - class CardVerificationDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Transaction Identifier as given by the network to indicate a previously - # executed CIT authorization. Only present when authorization is successful - # for a verification. - # @return [String] - attr_accessor :network_transaction_id - - # The date that the transaction was authorized by the scheme. This field may - # not be returned for all networks. MasterCard refers to this field as - # "BankNet reference date". - # @return [String] - attr_accessor :date - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :network - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :time - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The processor response information for payment requests, such as direct - # credit card transactions. - # @return [CardVerificationProcessorResponse] - attr_accessor :processor_response - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['network_transaction_id'] = 'network_transaction_id' - @_hash['date'] = 'date' - @_hash['network'] = 'network' - @_hash['time'] = 'time' - @_hash['amount'] = 'amount' - @_hash['processor_response'] = 'processor_response' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - network_transaction_id - date - network - time - amount - processor_response - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(network_transaction_id: SKIP, date: SKIP, network: SKIP, - time: SKIP, amount: SKIP, processor_response: SKIP) - @network_transaction_id = network_transaction_id unless network_transaction_id == SKIP - @date = date unless date == SKIP - @network = network unless network == SKIP - @time = time unless time == SKIP - @amount = amount unless amount == SKIP - @processor_response = processor_response unless processor_response == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - network_transaction_id = - hash.key?('network_transaction_id') ? hash['network_transaction_id'] : SKIP - date = hash.key?('date') ? hash['date'] : SKIP - network = hash.key?('network') ? hash['network'] : SKIP - time = hash.key?('time') ? hash['time'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - if hash['processor_response'] - processor_response = CardVerificationProcessorResponse.from_hash(hash['processor_response']) - end - - # Create object from extracted values. - CardVerificationDetails.new(network_transaction_id: network_transaction_id, - date: date, - network: network, - time: time, - amount: amount, - processor_response: processor_response) - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_verification_method.rb b/lib/pay_pal_restap_is/models/card_verification_method.rb deleted file mode 100644 index ec5fa1d..0000000 --- a/lib/pay_pal_restap_is/models/card_verification_method.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The method used for card verification. - class CardVerificationMethod - CARD_VERIFICATION_METHOD = [ - # TODO: Write general description for SCA_ALWAYS - SCA_ALWAYS = 'SCA_ALWAYS'.freeze, - - # TODO: Write general description for SCA_WHEN_REQUIRED - SCA_WHEN_REQUIRED = 'SCA_WHEN_REQUIRED'.freeze, - - # TODO: Write general description for ENUM_3D_SECURE - ENUM_3D_SECURE = '3D_SECURE'.freeze, - - # TODO: Write general description for AVS_CVV - AVS_CVV = 'AVS_CVV'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/card_verification_processor_response.rb b/lib/pay_pal_restap_is/models/card_verification_processor_response.rb deleted file mode 100644 index da7a4ec..0000000 --- a/lib/pay_pal_restap_is/models/card_verification_processor_response.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The processor response information for payment requests, such as direct - # credit card transactions. - class CardVerificationProcessorResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The address verification code for Visa, Discover, Mastercard, or American - # Express transactions. - # @return [AVSCode] - attr_accessor :avs_code - - # The card verification value code for for Visa, Discover, Mastercard, or - # American Express. - # @return [CVVCode] - attr_accessor :cvv_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['avs_code'] = 'avs_code' - @_hash['cvv_code'] = 'cvv_code' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - avs_code - cvv_code - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(avs_code: SKIP, cvv_code: SKIP) - @avs_code = avs_code unless avs_code == SKIP - @cvv_code = cvv_code unless cvv_code == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP - cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP - - # Create object from extracted values. - CardVerificationProcessorResponse.new(avs_code: avs_code, - cvv_code: cvv_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/checkout_payment_intent.rb b/lib/pay_pal_restap_is/models/checkout_payment_intent.rb deleted file mode 100644 index 38e7269..0000000 --- a/lib/pay_pal_restap_is/models/checkout_payment_intent.rb +++ /dev/null @@ -1,24 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The intent to either capture payment immediately or authorize a payment for - # an order after order creation. - class CheckoutPaymentIntent - CHECKOUT_PAYMENT_INTENT = [ - # TODO: Write general description for CAPTURE - CAPTURE = 'CAPTURE'.freeze, - - # TODO: Write general description for AUTHORIZE - AUTHORIZE = 'AUTHORIZE'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/cobranded_card.rb b/lib/pay_pal_restap_is/models/cobranded_card.rb deleted file mode 100644 index 115786c..0000000 --- a/lib/pay_pal_restap_is/models/cobranded_card.rb +++ /dev/null @@ -1,70 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Details about the merchant cobranded card used for order purchase. - class CobrandedCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Array of labels for the cobranded card. - # @return [Array[String]] - attr_accessor :labels - - # The details for the merchant who receives the funds and fulfills the - # order. The merchant is also known as the payee. - # @return [PayeeBase] - attr_accessor :payee - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['labels'] = 'labels' - @_hash['payee'] = 'payee' - @_hash['amount'] = 'amount' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - labels - payee - amount - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(labels: SKIP, payee: SKIP, amount: SKIP) - @labels = labels unless labels == SKIP - @payee = payee unless payee == SKIP - @amount = amount unless amount == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - labels = hash.key?('labels') ? hash['labels'] : SKIP - payee = PayeeBase.from_hash(hash['payee']) if hash['payee'] - amount = Money.from_hash(hash['amount']) if hash['amount'] - - # Create object from extracted values. - CobrandedCard.new(labels: labels, - payee: payee, - amount: amount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/confirm_order_request.rb b/lib/pay_pal_restap_is/models/confirm_order_request.rb deleted file mode 100644 index 6bd33f3..0000000 --- a/lib/pay_pal_restap_is/models/confirm_order_request.rb +++ /dev/null @@ -1,74 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Payer confirms the intent to pay for the Order using the provided payment - # source. - class ConfirmOrderRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment source definition. - # @return [PaymentSource] - attr_accessor :payment_source - - # The instruction to process an order. - # @return [ProcessingInstruction] - attr_accessor :processing_instruction - - # Customizes the payer confirmation experience. - # @return [OrderConfirmApplicationContext] - attr_accessor :application_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payment_source'] = 'payment_source' - @_hash['processing_instruction'] = 'processing_instruction' - @_hash['application_context'] = 'application_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - processing_instruction - application_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize( - payment_source:, - processing_instruction: ProcessingInstruction::NO_INSTRUCTION, - application_context: SKIP - ) - @payment_source = payment_source - @processing_instruction = processing_instruction unless processing_instruction == SKIP - @application_context = application_context unless application_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source'] - processing_instruction = - hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION - application_context = OrderConfirmApplicationContext.from_hash(hash['application_context']) if - hash['application_context'] - - # Create object from extracted values. - ConfirmOrderRequest.new(payment_source: payment_source, - processing_instruction: processing_instruction, - application_context: application_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/customer_information.rb b/lib/pay_pal_restap_is/models/customer_information.rb deleted file mode 100644 index ef34c67..0000000 --- a/lib/pay_pal_restap_is/models/customer_information.rb +++ /dev/null @@ -1,72 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a customer in PayPal's system of record. - class CustomerInformation < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['email_address'] = 'email_address' - @_hash['phone'] = 'phone' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - email_address - phone - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, email_address: SKIP, phone: SKIP) - @id = id unless id == SKIP - @email_address = email_address unless email_address == SKIP - @phone = phone unless phone == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - - # Create object from extracted values. - CustomerInformation.new(id: id, - email_address: email_address, - phone: phone) - end - end -end diff --git a/lib/pay_pal_restap_is/models/customer_request.rb b/lib/pay_pal_restap_is/models/customer_request.rb deleted file mode 100644 index e4d6e68..0000000 --- a/lib/pay_pal_restap_is/models/customer_request.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customer in merchant's or partner's system of records. - class CustomerRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # Merchants and partners may already have a data-store where their customer - # information is persisted. Use merchant_customer_id to associate the - # PayPal-generated customer.id to your representation of a customer. - # @return [String] - attr_accessor :merchant_customer_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['merchant_customer_id'] = 'merchant_customer_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - merchant_customer_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, merchant_customer_id: SKIP) - @id = id unless id == SKIP - @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - merchant_customer_id = - hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP - - # Create object from extracted values. - CustomerRequest.new(id: id, - merchant_customer_id: merchant_customer_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb b/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb deleted file mode 100644 index 987f642..0000000 --- a/lib/pay_pal_restap_is/models/customer_vault_payment_tokens_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Collection of payment tokens saved for a given customer. - class CustomerVaultPaymentTokensResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Total number of items. - # @return [Integer] - attr_accessor :total_items - - # Total number of pages. - # @return [Integer] - attr_accessor :total_pages - - # Customer in merchant's or partner's system of records. - # @return [CustomerRequest] - attr_accessor :customer - - # Customer in merchant's or partner's system of records. - # @return [Array[PaymentTokenResponse]] - attr_accessor :payment_tokens - - # An array of related [HATEOAS links](/api/rest/responses/#hateoas). - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['total_items'] = 'total_items' - @_hash['total_pages'] = 'total_pages' - @_hash['customer'] = 'customer' - @_hash['payment_tokens'] = 'payment_tokens' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - total_items - total_pages - customer - payment_tokens - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(total_items: SKIP, total_pages: SKIP, customer: SKIP, - payment_tokens: SKIP, links: SKIP) - @total_items = total_items unless total_items == SKIP - @total_pages = total_pages unless total_pages == SKIP - @customer = customer unless customer == SKIP - @payment_tokens = payment_tokens unless payment_tokens == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - total_items = hash.key?('total_items') ? hash['total_items'] : SKIP - total_pages = hash.key?('total_pages') ? hash['total_pages'] : SKIP - customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] - # Parameter is an array, so we need to iterate through it - payment_tokens = nil - unless hash['payment_tokens'].nil? - payment_tokens = [] - hash['payment_tokens'].each do |structure| - payment_tokens << (PaymentTokenResponse.from_hash(structure) if structure) - end - end - - payment_tokens = SKIP unless hash.key?('payment_tokens') - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - CustomerVaultPaymentTokensResponse.new(total_items: total_items, - total_pages: total_pages, - customer: customer, - payment_tokens: payment_tokens, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/cvv_code.rb b/lib/pay_pal_restap_is/models/cvv_code.rb deleted file mode 100644 index 81c4c4e..0000000 --- a/lib/pay_pal_restap_is/models/cvv_code.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The card verification value code for for Visa, Discover, Mastercard, or - # American Express. - class CVVCode - CVV_CODE = [ - # TODO: Write general description for E - E = 'E'.freeze, - - # TODO: Write general description for I - I = 'I'.freeze, - - # TODO: Write general description for M - M = 'M'.freeze, - - # TODO: Write general description for N - N = 'N'.freeze, - - # TODO: Write general description for P - P = 'P'.freeze, - - # TODO: Write general description for S - S = 'S'.freeze, - - # TODO: Write general description for U - U = 'U'.freeze, - - # TODO: Write general description for X - X = 'X'.freeze, - - # TODO: Write general description for ENUM_ALL_OTHERS - ENUM_ALL_OTHERS = 'All others'.freeze, - - # TODO: Write general description for ENUM_0 - ENUM_0 = '0'.freeze, - - # TODO: Write general description for ENUM_1 - ENUM_1 = '1'.freeze, - - # TODO: Write general description for ENUM_2 - ENUM_2 = '2'.freeze, - - # TODO: Write general description for ENUM_3 - ENUM_3 = '3'.freeze, - - # TODO: Write general description for ENUM_4 - ENUM_4 = '4'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/disbursement_mode.rb b/lib/pay_pal_restap_is/models/disbursement_mode.rb deleted file mode 100644 index 1a0db37..0000000 --- a/lib/pay_pal_restap_is/models/disbursement_mode.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The funds that are held on behalf of the merchant. - class DisbursementMode - DISBURSEMENT_MODE = [ - # TODO: Write general description for INSTANT - INSTANT = 'INSTANT'.freeze, - - # TODO: Write general description for DELAYED - DELAYED = 'DELAYED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/dispute_category.rb b/lib/pay_pal_restap_is/models/dispute_category.rb deleted file mode 100644 index b1b4db1..0000000 --- a/lib/pay_pal_restap_is/models/dispute_category.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The condition that is covered for the transaction. - class DisputeCategory - DISPUTE_CATEGORY = [ - # TODO: Write general description for ITEM_NOT_RECEIVED - ITEM_NOT_RECEIVED = 'ITEM_NOT_RECEIVED'.freeze, - - # TODO: Write general description for UNAUTHORIZED_TRANSACTION - UNAUTHORIZED_TRANSACTION = 'UNAUTHORIZED_TRANSACTION'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/eci_flag.rb b/lib/pay_pal_restap_is/models/eci_flag.rb deleted file mode 100644 index 4863adf..0000000 --- a/lib/pay_pal_restap_is/models/eci_flag.rb +++ /dev/null @@ -1,39 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data - # elements that indicate the transaction was processed electronically. This - # should be passed on the authorization transaction to the Gateway/Processor. - class ECIFlag - ECI_FLAG = [ - # TODO: Write general description for MASTERCARD_NON_3D_SECURE_TRANSACTION - MASTERCARD_NON_3D_SECURE_TRANSACTION = 'MASTERCARD_NON_3D_SECURE_TRANSACTION'.freeze, - - # TODO: Write general description for - # MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION - MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION = 'MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION'.freeze, - - # TODO: Write general description for - # MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION - MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION = 'MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION'.freeze, - - # TODO: Write general description for FULLY_AUTHENTICATED_TRANSACTION - FULLY_AUTHENTICATED_TRANSACTION = 'FULLY_AUTHENTICATED_TRANSACTION'.freeze, - - # TODO: Write general description for ATTEMPTED_AUTHENTICATION_TRANSACTION - ATTEMPTED_AUTHENTICATION_TRANSACTION = 'ATTEMPTED_AUTHENTICATION_TRANSACTION'.freeze, - - # TODO: Write general description for NON_3D_SECURE_TRANSACTION - NON_3D_SECURE_TRANSACTION = 'NON_3D_SECURE_TRANSACTION'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/enrollment_status.rb b/lib/pay_pal_restap_is/models/enrollment_status.rb deleted file mode 100644 index 89351ca..0000000 --- a/lib/pay_pal_restap_is/models/enrollment_status.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Status of Authentication eligibility. - class EnrollmentStatus - ENROLLMENT_STATUS = [ - # TODO: Write general description for Y - Y = 'Y'.freeze, - - # TODO: Write general description for N - N = 'N'.freeze, - - # TODO: Write general description for U - U = 'U'.freeze, - - # TODO: Write general description for B - B = 'B'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/eps_payment_object.rb b/lib/pay_pal_restap_is/models/eps_payment_object.rb deleted file mode 100644 index 6fc9b40..0000000 --- a/lib/pay_pal_restap_is/models/eps_payment_object.rb +++ /dev/null @@ -1,74 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using eps. - class EPSPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - - # Create object from extracted values. - EPSPaymentObject.new(name: name, - country_code: country_code, - bic: bic) - end - end -end diff --git a/lib/pay_pal_restap_is/models/eps_payment_request.rb b/lib/pay_pal_restap_is/models/eps_payment_request.rb deleted file mode 100644 index 294678f..0000000 --- a/lib/pay_pal_restap_is/models/eps_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using eps. - class EPSPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - EPSPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/error_details.rb b/lib/pay_pal_restap_is/models/error_details.rb deleted file mode 100644 index c99d8bd..0000000 --- a/lib/pay_pal_restap_is/models/error_details.rb +++ /dev/null @@ -1,110 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The error details. Required for client-side `4XX` errors. - class ErrorDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The field that caused the error. If this field is in the body, set this - # value to the field's JSON pointer value. Required for client-side errors. - # @return [String] - attr_accessor :field - - # The value of the field that caused the error. - # @return [String] - attr_accessor :value - - # The location of the field that caused the error. Value is `body`, `path`, - # or `query`. - # @return [String] - attr_accessor :location - - # The unique, fine-grained application-level error code. - # @return [String] - attr_accessor :issue - - # An array of request-related [HATEOAS - # links](/api/rest/responses/#hateoas-links) that are either relevant to the - # issue by providing additional information or offering potential - # resolutions. - # @return [Array[LinkDescription]] - attr_accessor :links - - # The human-readable description for an issue. The description can change - # over the lifetime of an API, so clients must not depend on this value. - # @return [String] - attr_accessor :description - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['field'] = 'field' - @_hash['value'] = 'value' - @_hash['location'] = 'location' - @_hash['issue'] = 'issue' - @_hash['links'] = 'links' - @_hash['description'] = 'description' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - field - value - location - links - description - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(issue:, field: SKIP, value: SKIP, location: 'body', - links: SKIP, description: SKIP) - @field = field unless field == SKIP - @value = value unless value == SKIP - @location = location unless location == SKIP - @issue = issue - @links = links unless links == SKIP - @description = description unless description == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - issue = hash.key?('issue') ? hash['issue'] : nil - field = hash.key?('field') ? hash['field'] : SKIP - value = hash.key?('value') ? hash['value'] : SKIP - location = hash['location'] ||= 'body' - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - description = hash.key?('description') ? hash['description'] : SKIP - - # Create object from extracted values. - ErrorDetails.new(issue: issue, - field: field, - value: value, - location: location, - links: links, - description: description) - end - end -end diff --git a/lib/pay_pal_restap_is/models/exchange_rate.rb b/lib/pay_pal_restap_is/models/exchange_rate.rb deleted file mode 100644 index 1e8595d..0000000 --- a/lib/pay_pal_restap_is/models/exchange_rate.rb +++ /dev/null @@ -1,75 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The exchange rate that determines the amount to convert from one currency to - # another currency. - class ExchangeRate < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The [three-character ISO-4217 currency - # code](/api/rest/reference/currency-codes/) that identifies the currency. - # @return [String] - attr_accessor :source_currency - - # The [three-character ISO-4217 currency - # code](/api/rest/reference/currency-codes/) that identifies the currency. - # @return [String] - attr_accessor :target_currency - - # The target currency amount. Equivalent to one unit of the source currency. - # Formatted as integer or decimal value with one to 15 digits to the right - # of the decimal point. - # @return [String] - attr_accessor :value - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['source_currency'] = 'source_currency' - @_hash['target_currency'] = 'target_currency' - @_hash['value'] = 'value' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - source_currency - target_currency - value - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(source_currency: SKIP, target_currency: SKIP, value: SKIP) - @source_currency = source_currency unless source_currency == SKIP - @target_currency = target_currency unless target_currency == SKIP - @value = value unless value == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - source_currency = - hash.key?('source_currency') ? hash['source_currency'] : SKIP - target_currency = - hash.key?('target_currency') ? hash['target_currency'] : SKIP - value = hash.key?('value') ? hash['value'] : SKIP - - # Create object from extracted values. - ExchangeRate.new(source_currency: source_currency, - target_currency: target_currency, - value: value) - end - end -end diff --git a/lib/pay_pal_restap_is/models/experience_context.rb b/lib/pay_pal_restap_is/models/experience_context.rb deleted file mode 100644 index 568adbe..0000000 --- a/lib/pay_pal_restap_is/models/experience_context.rb +++ /dev/null @@ -1,98 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer experience during the approval process for the payment. - class ExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The location from which the shipping address is derived. - # @return [ShippingPreference] - attr_accessor :shipping_preference - - # Describes the URL. - # @return [String] - attr_accessor :return_url - - # Describes the URL. - # @return [String] - attr_accessor :cancel_url - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - shipping_preference - return_url - cancel_url - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, locale: SKIP, - shipping_preference: ShippingPreference::GET_FROM_FILE, - return_url: SKIP, cancel_url: SKIP) - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - shipping_preference = - hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - - # Create object from extracted values. - ExperienceContext.new(brand_name: brand_name, - locale: locale, - shipping_preference: shipping_preference, - return_url: return_url, - cancel_url: cancel_url) - end - end -end diff --git a/lib/pay_pal_restap_is/models/fullfillment_type.rb b/lib/pay_pal_restap_is/models/fullfillment_type.rb deleted file mode 100644 index 2a46111..0000000 --- a/lib/pay_pal_restap_is/models/fullfillment_type.rb +++ /dev/null @@ -1,31 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A classification for the method of purchase fulfillment (e.g shipping, - # in-store pickup, etc). Either `type` or `options` may be present, but not - # both. - class FullfillmentType - FULLFILLMENT_TYPE = [ - # TODO: Write general description for SHIPPING - SHIPPING = 'SHIPPING'.freeze, - - # TODO: Write general description for PICKUP_IN_PERSON - PICKUP_IN_PERSON = 'PICKUP_IN_PERSON'.freeze, - - # TODO: Write general description for PICKUP_IN_STORE - PICKUP_IN_STORE = 'PICKUP_IN_STORE'.freeze, - - # TODO: Write general description for PICKUP_FROM_PERSON - PICKUP_FROM_PERSON = 'PICKUP_FROM_PERSON'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/giropay_payment_object.rb b/lib/pay_pal_restap_is/models/giropay_payment_object.rb deleted file mode 100644 index 3f43d9d..0000000 --- a/lib/pay_pal_restap_is/models/giropay_payment_object.rb +++ /dev/null @@ -1,74 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using giropay. - class GiropayPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - - # Create object from extracted values. - GiropayPaymentObject.new(name: name, - country_code: country_code, - bic: bic) - end - end -end diff --git a/lib/pay_pal_restap_is/models/giropay_payment_request.rb b/lib/pay_pal_restap_is/models/giropay_payment_request.rb deleted file mode 100644 index 12d23fc..0000000 --- a/lib/pay_pal_restap_is/models/giropay_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using giropay. - class GiropayPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - GiropayPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb b/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb deleted file mode 100644 index 350c816..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_authentication_method.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Authentication Method which is used for the card transaction. - class GooglePayAuthenticationMethod - GOOGLE_PAY_AUTHENTICATION_METHOD = [ - # TODO: Write general description for PAN_ONLY - PAN_ONLY = 'PAN_ONLY'.freeze, - - # TODO: Write general description for CRYPTOGRAM_3DS - CRYPTOGRAM_3DS = 'CRYPTOGRAM_3DS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb b/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb deleted file mode 100644 index cf1936e..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_card_attributes.rb +++ /dev/null @@ -1,51 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of this card. - class GooglePayCardAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The API caller can opt in to verify the card through PayPal offered - # verification services (e.g. Smart Dollar Auth, 3DS). - # @return [CardVerification] - attr_accessor :verification - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['verification'] = 'verification' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - verification - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(verification: SKIP) - @verification = verification unless verification == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - verification = CardVerification.from_hash(hash['verification']) if hash['verification'] - - # Create object from extracted values. - GooglePayCardAttributes.new(verification: verification) - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_card_response.rb b/lib/pay_pal_restap_is/models/google_pay_card_response.rb deleted file mode 100644 index c9e940a..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_card_response.rb +++ /dev/null @@ -1,104 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment card to use to fund a Google Pay payment response. Can be a - # credit or debit card. - class GooglePayCardResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['type'] = 'type' - @_hash['brand'] = 'brand' - @_hash['billing_address'] = 'billing_address' - @_hash['authentication_result'] = 'authentication_result' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - type - brand - billing_address - authentication_result - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, type: SKIP, brand: SKIP, - billing_address: SKIP, authentication_result: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @type = type unless type == SKIP - @brand = brand unless brand == SKIP - @billing_address = billing_address unless billing_address == SKIP - @authentication_result = authentication_result unless authentication_result == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - - # Create object from extracted values. - GooglePayCardResponse.new(name: name, - last_digits: last_digits, - type: type, - brand: brand, - billing_address: billing_address, - authentication_result: authentication_result) - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb b/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb deleted file mode 100644 index 1deeeed..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_decrypted_token_data.rb +++ /dev/null @@ -1,105 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Details shared by Google for the merchant to be shared with PayPal. This is - # required to process the transaction using the Google Pay payment method. - class GooglePayDecryptedTokenData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # A unique ID that identifies the message in case it needs to be revoked or - # located at a later time. - # @return [String] - attr_accessor :message_id - - # Date and time at which the message expires as UTC milliseconds since - # epoch. Integrators should reject any message that's expired. - # @return [String] - attr_accessor :message_expiration - - # The type of the payment credential. Currently, only CARD is supported. - # @return [GooglePayPaymentMethod] - attr_accessor :payment_method - - # Authentication Method which is used for the card transaction. - # @return [GooglePayAuthenticationMethod] - attr_accessor :authentication_method - - # Base-64 cryptographic identifier used by card schemes to validate the - # token verification result. This is a conditionally required field if - # authentication_method is CRYPTOGRAM_3DS. - # @return [String] - attr_accessor :cryptogram - - # Electronic Commerce Indicator may not always be present. It is only - # returned for tokens on the Visa card network. This value is passed through - # in the payment authorization request. - # @return [String] - attr_accessor :eci_indicator - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['message_id'] = 'message_id' - @_hash['message_expiration'] = 'message_expiration' - @_hash['payment_method'] = 'payment_method' - @_hash['authentication_method'] = 'authentication_method' - @_hash['cryptogram'] = 'cryptogram' - @_hash['eci_indicator'] = 'eci_indicator' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - message_id - message_expiration - cryptogram - eci_indicator - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_method:, authentication_method:, message_id: SKIP, - message_expiration: SKIP, cryptogram: SKIP, - eci_indicator: SKIP) - @message_id = message_id unless message_id == SKIP - @message_expiration = message_expiration unless message_expiration == SKIP - @payment_method = payment_method - @authentication_method = authentication_method - @cryptogram = cryptogram unless cryptogram == SKIP - @eci_indicator = eci_indicator unless eci_indicator == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_method = - hash.key?('payment_method') ? hash['payment_method'] : nil - authentication_method = - hash.key?('authentication_method') ? hash['authentication_method'] : nil - message_id = hash.key?('message_id') ? hash['message_id'] : SKIP - message_expiration = - hash.key?('message_expiration') ? hash['message_expiration'] : SKIP - cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP - eci_indicator = hash.key?('eci_indicator') ? hash['eci_indicator'] : SKIP - - # Create object from extracted values. - GooglePayDecryptedTokenData.new(payment_method: payment_method, - authentication_method: authentication_method, - message_id: message_id, - message_expiration: message_expiration, - cryptogram: cryptogram, - eci_indicator: eci_indicator) - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_payment_method.rb b/lib/pay_pal_restap_is/models/google_pay_payment_method.rb deleted file mode 100644 index 5b5cc64..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_payment_method.rb +++ /dev/null @@ -1,20 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The type of the payment credential. Currently, only CARD is supported. - class GooglePayPaymentMethod - GOOGLE_PAY_PAYMENT_METHOD = [ - # TODO: Write general description for CARD - CARD = 'CARD'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_request.rb b/lib/pay_pal_restap_is/models/google_pay_request.rb deleted file mode 100644 index cf80231..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_request.rb +++ /dev/null @@ -1,118 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Google Pay. - class GooglePayRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumberWithCountryCode] - attr_accessor :phone_number - - # The payment card information. - # @return [Object] - attr_accessor :card - - # Details shared by Google for the merchant to be shared with PayPal. This - # is required to process the transaction using the Google Pay payment - # method. - # @return [GooglePayDecryptedTokenData] - attr_accessor :decrypted_token - - # Details shared by Google for the merchant to be shared with PayPal. This - # is required to process the transaction using the Google Pay payment - # method. - # @return [Object] - attr_accessor :assurance_details - - # Additional attributes associated with the use of this card. - # @return [GooglePayCardAttributes] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['email_address'] = 'email_address' - @_hash['phone_number'] = 'phone_number' - @_hash['card'] = 'card' - @_hash['decrypted_token'] = 'decrypted_token' - @_hash['assurance_details'] = 'assurance_details' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - email_address - phone_number - card - decrypted_token - assurance_details - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, email_address: SKIP, phone_number: SKIP, - card: SKIP, decrypted_token: SKIP, assurance_details: SKIP, - attributes: SKIP) - @name = name unless name == SKIP - @email_address = email_address unless email_address == SKIP - @phone_number = phone_number unless phone_number == SKIP - @card = card unless card == SKIP - @decrypted_token = decrypted_token unless decrypted_token == SKIP - @assurance_details = assurance_details unless assurance_details == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone_number = PhoneNumberWithCountryCode.from_hash(hash['phone_number']) if - hash['phone_number'] - card = hash.key?('card') ? hash['card'] : SKIP - decrypted_token = GooglePayDecryptedTokenData.from_hash(hash['decrypted_token']) if - hash['decrypted_token'] - assurance_details = - hash.key?('assurance_details') ? hash['assurance_details'] : SKIP - attributes = GooglePayCardAttributes.from_hash(hash['attributes']) if hash['attributes'] - - # Create object from extracted values. - GooglePayRequest.new(name: name, - email_address: email_address, - phone_number: phone_number, - card: card, - decrypted_token: decrypted_token, - assurance_details: assurance_details, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb b/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb deleted file mode 100644 index f5e5aa8..0000000 --- a/lib/pay_pal_restap_is/models/google_pay_wallet_response.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Google Pay Wallet payment data. - class GooglePayWalletResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumberWithCountryCode] - attr_accessor :phone_number - - # The payment card to use to fund a Google Pay payment response. Can be a - # credit or debit card. - # @return [GooglePayCardResponse] - attr_accessor :card - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['email_address'] = 'email_address' - @_hash['phone_number'] = 'phone_number' - @_hash['card'] = 'card' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - email_address - phone_number - card - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, email_address: SKIP, phone_number: SKIP, - card: SKIP) - @name = name unless name == SKIP - @email_address = email_address unless email_address == SKIP - @phone_number = phone_number unless phone_number == SKIP - @card = card unless card == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone_number = PhoneNumberWithCountryCode.from_hash(hash['phone_number']) if - hash['phone_number'] - card = GooglePayCardResponse.from_hash(hash['card']) if hash['card'] - - # Create object from extracted values. - GooglePayWalletResponse.new(name: name, - email_address: email_address, - phone_number: phone_number, - card: card) - end - end -end diff --git a/lib/pay_pal_restap_is/models/ideal_payment_object.rb b/lib/pay_pal_restap_is/models/ideal_payment_object.rb deleted file mode 100644 index d4310fc..0000000 --- a/lib/pay_pal_restap_is/models/ideal_payment_object.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using iDEAL. - class IDEALPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - iban_last_chars - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP, - iban_last_chars: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - - # Create object from extracted values. - IDEALPaymentObject.new(name: name, - country_code: country_code, - bic: bic, - iban_last_chars: iban_last_chars) - end - end -end diff --git a/lib/pay_pal_restap_is/models/ideal_payment_request.rb b/lib/pay_pal_restap_is/models/ideal_payment_request.rb deleted file mode 100644 index 560d190..0000000 --- a/lib/pay_pal_restap_is/models/ideal_payment_request.rb +++ /dev/null @@ -1,83 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using iDEAL. - class IDEALPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - bic - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, bic: SKIP, experience_context: SKIP) - @name = name - @country_code = country_code - @bic = bic unless bic == SKIP - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - bic = hash.key?('bic') ? hash['bic'] : SKIP - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - IDEALPaymentRequest.new(name: name, - country_code: country_code, - bic: bic, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/instrument_authorization_status.rb b/lib/pay_pal_restap_is/models/instrument_authorization_status.rb deleted file mode 100644 index dd18ed0..0000000 --- a/lib/pay_pal_restap_is/models/instrument_authorization_status.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The authorization status of the wallet instrument. - class InstrumentAuthorizationStatus - INSTRUMENT_AUTHORIZATION_STATUS = [ - # TODO: Write general description for AUTHORIZED - AUTHORIZED = 'AUTHORIZED'.freeze, - - # TODO: Write general description for BLOCKED - BLOCKED = 'BLOCKED'.freeze, - - # TODO: Write general description for FAILED - FAILED = 'FAILED'.freeze, - - # TODO: Write general description for NOT_APPLICABLE - NOT_APPLICABLE = 'NOT_APPLICABLE'.freeze, - - # TODO: Write general description for NOT_SUPPORTED - NOT_SUPPORTED = 'NOT_SUPPORTED'.freeze, - - # TODO: Write general description for UNAUTHORIZED - UNAUTHORIZED = 'UNAUTHORIZED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/item.rb b/lib/pay_pal_restap_is/models/item.rb deleted file mode 100644 index ce2c880..0000000 --- a/lib/pay_pal_restap_is/models/item.rb +++ /dev/null @@ -1,134 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details for the items to be purchased. - class Item < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The item name or title. - # @return [String] - attr_accessor :name - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :unit_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :tax - - # The item quantity. Must be a whole number. - # @return [String] - attr_accessor :quantity - - # The detailed item description. - # @return [String] - attr_accessor :description - - # The stock keeping unit (SKU) for the item. - # @return [String] - attr_accessor :sku - - # The URL to the item being purchased. Visible to buyer and used in buyer - # experiences. - # @return [String] - attr_accessor :url - - # The item category type. - # @return [ItemCategory] - attr_accessor :category - - # The URL of the item's image. File type and size restrictions apply. An - # image that violates these restrictions will not be honored. - # @return [String] - attr_accessor :image_url - - # The Universal Product Code of the item. - # @return [UniversalProductCode] - attr_accessor :upc - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['unit_amount'] = 'unit_amount' - @_hash['tax'] = 'tax' - @_hash['quantity'] = 'quantity' - @_hash['description'] = 'description' - @_hash['sku'] = 'sku' - @_hash['url'] = 'url' - @_hash['category'] = 'category' - @_hash['image_url'] = 'image_url' - @_hash['upc'] = 'upc' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - tax - description - sku - url - category - image_url - upc - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, unit_amount:, quantity:, tax: SKIP, description: SKIP, - sku: SKIP, url: SKIP, category: SKIP, image_url: SKIP, - upc: SKIP) - @name = name - @unit_amount = unit_amount - @tax = tax unless tax == SKIP - @quantity = quantity - @description = description unless description == SKIP - @sku = sku unless sku == SKIP - @url = url unless url == SKIP - @category = category unless category == SKIP - @image_url = image_url unless image_url == SKIP - @upc = upc unless upc == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - unit_amount = Money.from_hash(hash['unit_amount']) if hash['unit_amount'] - quantity = hash.key?('quantity') ? hash['quantity'] : nil - tax = Money.from_hash(hash['tax']) if hash['tax'] - description = hash.key?('description') ? hash['description'] : SKIP - sku = hash.key?('sku') ? hash['sku'] : SKIP - url = hash.key?('url') ? hash['url'] : SKIP - category = hash.key?('category') ? hash['category'] : SKIP - image_url = hash.key?('image_url') ? hash['image_url'] : SKIP - upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] - - # Create object from extracted values. - Item.new(name: name, - unit_amount: unit_amount, - quantity: quantity, - tax: tax, - description: description, - sku: sku, - url: url, - category: category, - image_url: image_url, - upc: upc) - end - end -end diff --git a/lib/pay_pal_restap_is/models/item_category.rb b/lib/pay_pal_restap_is/models/item_category.rb deleted file mode 100644 index b6b4c0d..0000000 --- a/lib/pay_pal_restap_is/models/item_category.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The item category type. - class ItemCategory - ITEM_CATEGORY = [ - # TODO: Write general description for DIGITAL_GOODS - DIGITAL_GOODS = 'DIGITAL_GOODS'.freeze, - - # TODO: Write general description for PHYSICAL_GOODS - PHYSICAL_GOODS = 'PHYSICAL_GOODS'.freeze, - - # TODO: Write general description for DONATION - DONATION = 'DONATION'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/level2_card_processing_data.rb b/lib/pay_pal_restap_is/models/level2_card_processing_data.rb deleted file mode 100644 index 960b7c6..0000000 --- a/lib/pay_pal_restap_is/models/level2_card_processing_data.rb +++ /dev/null @@ -1,64 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The level 2 card processing data collections. If your merchant account has - # been configured for Level 2 processing this field will be passed to the - # processor on your behalf. Please contact your PayPal Technical Account - # Manager to define level 2 data for your business. - class Level2CardProcessingData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Use this field to pass a purchase identification value of up to 12 ASCII - # characters for AIB and 17 ASCII characters for all other processors. - # @return [String] - attr_accessor :invoice_id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :tax_total - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['invoice_id'] = 'invoice_id' - @_hash['tax_total'] = 'tax_total' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - invoice_id - tax_total - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(invoice_id: SKIP, tax_total: SKIP) - @invoice_id = invoice_id unless invoice_id == SKIP - @tax_total = tax_total unless tax_total == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - tax_total = Money.from_hash(hash['tax_total']) if hash['tax_total'] - - # Create object from extracted values. - Level2CardProcessingData.new(invoice_id: invoice_id, - tax_total: tax_total) - end - end -end diff --git a/lib/pay_pal_restap_is/models/level3_card_processing_data.rb b/lib/pay_pal_restap_is/models/level3_card_processing_data.rb deleted file mode 100644 index 1353c0d..0000000 --- a/lib/pay_pal_restap_is/models/level3_card_processing_data.rb +++ /dev/null @@ -1,120 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The level 3 card processing data collections, If your merchant account has - # been configured for Level 3 processing this field will be passed to the - # processor on your behalf. Please contact your PayPal Technical Account - # Manager to define level 3 data for your business. - class Level3CardProcessingData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :shipping_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :duty_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :discount_amount - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :shipping_address - - # Use this field to specify the postal code of the shipping location. - # @return [String] - attr_accessor :ships_from_postal_code - - # A list of the items that were purchased with this payment. If your - # merchant account has been configured for Level 3 processing this field - # will be passed to the processor on your behalf. - # @return [Array[LineItem]] - attr_accessor :line_items - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['shipping_amount'] = 'shipping_amount' - @_hash['duty_amount'] = 'duty_amount' - @_hash['discount_amount'] = 'discount_amount' - @_hash['shipping_address'] = 'shipping_address' - @_hash['ships_from_postal_code'] = 'ships_from_postal_code' - @_hash['line_items'] = 'line_items' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - shipping_amount - duty_amount - discount_amount - shipping_address - ships_from_postal_code - line_items - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(shipping_amount: SKIP, duty_amount: SKIP, - discount_amount: SKIP, shipping_address: SKIP, - ships_from_postal_code: SKIP, line_items: SKIP) - @shipping_amount = shipping_amount unless shipping_amount == SKIP - @duty_amount = duty_amount unless duty_amount == SKIP - @discount_amount = discount_amount unless discount_amount == SKIP - @shipping_address = shipping_address unless shipping_address == SKIP - @ships_from_postal_code = ships_from_postal_code unless ships_from_postal_code == SKIP - @line_items = line_items unless line_items == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - shipping_amount = Money.from_hash(hash['shipping_amount']) if hash['shipping_amount'] - duty_amount = Money.from_hash(hash['duty_amount']) if hash['duty_amount'] - discount_amount = Money.from_hash(hash['discount_amount']) if hash['discount_amount'] - shipping_address = Address.from_hash(hash['shipping_address']) if hash['shipping_address'] - ships_from_postal_code = - hash.key?('ships_from_postal_code') ? hash['ships_from_postal_code'] : SKIP - # Parameter is an array, so we need to iterate through it - line_items = nil - unless hash['line_items'].nil? - line_items = [] - hash['line_items'].each do |structure| - line_items << (LineItem.from_hash(structure) if structure) - end - end - - line_items = SKIP unless hash.key?('line_items') - - # Create object from extracted values. - Level3CardProcessingData.new(shipping_amount: shipping_amount, - duty_amount: duty_amount, - discount_amount: discount_amount, - shipping_address: shipping_address, - ships_from_postal_code: ships_from_postal_code, - line_items: line_items) - end - end -end diff --git a/lib/pay_pal_restap_is/models/liability_shift_indicator.rb b/lib/pay_pal_restap_is/models/liability_shift_indicator.rb deleted file mode 100644 index 2809c74..0000000 --- a/lib/pay_pal_restap_is/models/liability_shift_indicator.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Liability shift indicator. The outcome of the issuer's authentication. - class LiabilityShiftIndicator - LIABILITY_SHIFT_INDICATOR = [ - # TODO: Write general description for NO - NO = 'NO'.freeze, - - # TODO: Write general description for POSSIBLE - POSSIBLE = 'POSSIBLE'.freeze, - - # TODO: Write general description for UNKNOWN - UNKNOWN = 'UNKNOWN'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/line_item.rb b/lib/pay_pal_restap_is/models/line_item.rb deleted file mode 100644 index 6b56069..0000000 --- a/lib/pay_pal_restap_is/models/line_item.rb +++ /dev/null @@ -1,176 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The line items for this purchase. If your merchant account has been - # configured for Level 3 processing this field will be passed to the processor - # on your behalf. - class LineItem < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The item name or title. - # @return [String] - attr_accessor :name - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :unit_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :tax - - # The item quantity. Must be a whole number. - # @return [String] - attr_accessor :quantity - - # The detailed item description. - # @return [String] - attr_accessor :description - - # The stock keeping unit (SKU) for the item. - # @return [String] - attr_accessor :sku - - # The URL to the item being purchased. Visible to buyer and used in buyer - # experiences. - # @return [String] - attr_accessor :url - - # The URL of the item's image. File type and size restrictions apply. An - # image that violates these restrictions will not be honored. - # @return [String] - attr_accessor :image_url - - # The Universal Product Code of the item. - # @return [UniversalProductCode] - attr_accessor :upc - - # Code used to classify items purchased and track the total amount spent - # across various categories of products and services. Different corporate - # purchasing organizations may use different standards, but the United - # Nations Standard Products and Services Code (UNSPSC) is frequently used. - # @return [String] - attr_accessor :commodity_code - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :discount_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :total_amount - - # Unit of measure is a standard used to express the magnitude of a quantity - # in international trade. Most commonly used (but not limited to) examples - # are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic - # inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), - # Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon - # (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK). - # @return [String] - attr_accessor :unit_of_measure - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['unit_amount'] = 'unit_amount' - @_hash['tax'] = 'tax' - @_hash['quantity'] = 'quantity' - @_hash['description'] = 'description' - @_hash['sku'] = 'sku' - @_hash['url'] = 'url' - @_hash['image_url'] = 'image_url' - @_hash['upc'] = 'upc' - @_hash['commodity_code'] = 'commodity_code' - @_hash['discount_amount'] = 'discount_amount' - @_hash['total_amount'] = 'total_amount' - @_hash['unit_of_measure'] = 'unit_of_measure' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - tax - description - sku - url - image_url - upc - commodity_code - discount_amount - total_amount - unit_of_measure - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, unit_amount:, quantity:, tax: SKIP, description: SKIP, - sku: SKIP, url: SKIP, image_url: SKIP, upc: SKIP, - commodity_code: SKIP, discount_amount: SKIP, - total_amount: SKIP, unit_of_measure: SKIP) - @name = name - @unit_amount = unit_amount - @tax = tax unless tax == SKIP - @quantity = quantity - @description = description unless description == SKIP - @sku = sku unless sku == SKIP - @url = url unless url == SKIP - @image_url = image_url unless image_url == SKIP - @upc = upc unless upc == SKIP - @commodity_code = commodity_code unless commodity_code == SKIP - @discount_amount = discount_amount unless discount_amount == SKIP - @total_amount = total_amount unless total_amount == SKIP - @unit_of_measure = unit_of_measure unless unit_of_measure == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - unit_amount = Money.from_hash(hash['unit_amount']) if hash['unit_amount'] - quantity = hash.key?('quantity') ? hash['quantity'] : nil - tax = Money.from_hash(hash['tax']) if hash['tax'] - description = hash.key?('description') ? hash['description'] : SKIP - sku = hash.key?('sku') ? hash['sku'] : SKIP - url = hash.key?('url') ? hash['url'] : SKIP - image_url = hash.key?('image_url') ? hash['image_url'] : SKIP - upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] - commodity_code = - hash.key?('commodity_code') ? hash['commodity_code'] : SKIP - discount_amount = Money.from_hash(hash['discount_amount']) if hash['discount_amount'] - total_amount = Money.from_hash(hash['total_amount']) if hash['total_amount'] - unit_of_measure = - hash.key?('unit_of_measure') ? hash['unit_of_measure'] : SKIP - - # Create object from extracted values. - LineItem.new(name: name, - unit_amount: unit_amount, - quantity: quantity, - tax: tax, - description: description, - sku: sku, - url: url, - image_url: image_url, - upc: upc, - commodity_code: commodity_code, - discount_amount: discount_amount, - total_amount: total_amount, - unit_of_measure: unit_of_measure) - end - end -end diff --git a/lib/pay_pal_restap_is/models/link_description.rb b/lib/pay_pal_restap_is/models/link_description.rb deleted file mode 100644 index 5605a70..0000000 --- a/lib/pay_pal_restap_is/models/link_description.rb +++ /dev/null @@ -1,75 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) - # information. - class LinkDescription < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The complete target URL. To make the related call, combine the method with - # this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. - # For pre-processing, include the `$`, `(`, and `)` characters. The `href` - # is the key HATEOAS component that links a completed call with a subsequent - # call. - # @return [String] - attr_accessor :href - - # The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), - # which serves as an ID for a link that unambiguously describes the - # semantics of the link. See [Link - # Relations](https://www.iana.org/assignments/link-relations/link-relations. - # xhtml). - # @return [String] - attr_accessor :rel - - # The HTTP method required to make the related call. - # @return [LinkHTTPMethod] - attr_accessor :method - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['href'] = 'href' - @_hash['rel'] = 'rel' - @_hash['method'] = 'method' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - method - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(href:, rel:, method: SKIP) - @href = href - @rel = rel - @method = method unless method == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - href = hash.key?('href') ? hash['href'] : nil - rel = hash.key?('rel') ? hash['rel'] : nil - method = hash.key?('method') ? hash['method'] : SKIP - - # Create object from extracted values. - LinkDescription.new(href: href, - rel: rel, - method: method) - end - end -end diff --git a/lib/pay_pal_restap_is/models/link_http_method.rb b/lib/pay_pal_restap_is/models/link_http_method.rb deleted file mode 100644 index 0f64c77..0000000 --- a/lib/pay_pal_restap_is/models/link_http_method.rb +++ /dev/null @@ -1,41 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The HTTP method required to make the related call. - class LinkHTTPMethod - LINK_HTTP_METHOD = [ - # TODO: Write general description for GET - GET = 'GET'.freeze, - - # TODO: Write general description for POST - POST = 'POST'.freeze, - - # TODO: Write general description for PUT - PUT = 'PUT'.freeze, - - # TODO: Write general description for DELETE - DELETE = 'DELETE'.freeze, - - # TODO: Write general description for HEAD - HEAD = 'HEAD'.freeze, - - # TODO: Write general description for CONNECT - CONNECT = 'CONNECT'.freeze, - - # TODO: Write general description for OPTIONS - OPTIONS = 'OPTIONS'.freeze, - - # TODO: Write general description for PATCH - PATCH = 'PATCH'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/money.rb b/lib/pay_pal_restap_is/models/money.rb deleted file mode 100644 index a1c606e..0000000 --- a/lib/pay_pal_restap_is/models/money.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The currency and amount for a financial transaction, such as a balance or - # payment due. - class Money < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The [three-character ISO-4217 currency - # code](/api/rest/reference/currency-codes/) that identifies the currency. - # @return [String] - attr_accessor :currency_code - - # The value, which might be:
  • An integer for currencies like `JPY` - # that are not typically fractional.
  • A decimal fraction for - # currencies like `TND` that are subdivided into thousandths.
For - # the required number of decimal places for a currency code, see [Currency - # Codes](/api/rest/reference/currency-codes/). - # @return [String] - attr_accessor :value - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['currency_code'] = 'currency_code' - @_hash['value'] = 'value' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(currency_code:, value:) - @currency_code = currency_code - @value = value - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - currency_code = hash.key?('currency_code') ? hash['currency_code'] : nil - value = hash.key?('value') ? hash['value'] : nil - - # Create object from extracted values. - Money.new(currency_code: currency_code, - value: value) - end - end -end diff --git a/lib/pay_pal_restap_is/models/my_bank_payment_object.rb b/lib/pay_pal_restap_is/models/my_bank_payment_object.rb deleted file mode 100644 index 917e443..0000000 --- a/lib/pay_pal_restap_is/models/my_bank_payment_object.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using MyBank. - class MyBankPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - iban_last_chars - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP, - iban_last_chars: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - - # Create object from extracted values. - MyBankPaymentObject.new(name: name, - country_code: country_code, - bic: bic, - iban_last_chars: iban_last_chars) - end - end -end diff --git a/lib/pay_pal_restap_is/models/my_bank_payment_request.rb b/lib/pay_pal_restap_is/models/my_bank_payment_request.rb deleted file mode 100644 index 2d9cde2..0000000 --- a/lib/pay_pal_restap_is/models/my_bank_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using MyBank. - class MyBankPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - MyBankPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/name.rb b/lib/pay_pal_restap_is/models/name.rb deleted file mode 100644 index 8f64eb3..0000000 --- a/lib/pay_pal_restap_is/models/name.rb +++ /dev/null @@ -1,61 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The name of the party. - class Name < BaseModel - SKIP = Object.new - private_constant :SKIP - - # When the party is a person, the party's given, or first, name. - # @return [String] - attr_accessor :given_name - - # When the party is a person, the party's surname or family name. Also known - # as the last name. Required when the party is a person. Use also to store - # multiple surnames including the matronymic, or mother's, surname. - # @return [String] - attr_accessor :surname - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['given_name'] = 'given_name' - @_hash['surname'] = 'surname' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - given_name - surname - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(given_name: SKIP, surname: SKIP) - @given_name = given_name unless given_name == SKIP - @surname = surname unless surname == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - given_name = hash.key?('given_name') ? hash['given_name'] : SKIP - surname = hash.key?('surname') ? hash['surname'] : SKIP - - # Create object from extracted values. - Name.new(given_name: given_name, - surname: surname) - end - end -end diff --git a/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb b/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb deleted file mode 100644 index d944db7..0000000 --- a/lib/pay_pal_restap_is/models/net_amount_breakdown_item.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The net amount. Returned when the currency of the refund is different from - # the currency of the PayPal account where the merchant holds their funds. - class NetAmountBreakdownItem < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :payable_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :converted_amount - - # The exchange rate that determines the amount to convert from one currency - # to another currency. - # @return [ExchangeRate] - attr_accessor :exchange_rate - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payable_amount'] = 'payable_amount' - @_hash['converted_amount'] = 'converted_amount' - @_hash['exchange_rate'] = 'exchange_rate' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payable_amount - converted_amount - exchange_rate - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payable_amount: SKIP, converted_amount: SKIP, - exchange_rate: SKIP) - @payable_amount = payable_amount unless payable_amount == SKIP - @converted_amount = converted_amount unless converted_amount == SKIP - @exchange_rate = exchange_rate unless exchange_rate == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payable_amount = Money.from_hash(hash['payable_amount']) if hash['payable_amount'] - converted_amount = Money.from_hash(hash['converted_amount']) if hash['converted_amount'] - exchange_rate = ExchangeRate.from_hash(hash['exchange_rate']) if hash['exchange_rate'] - - # Create object from extracted values. - NetAmountBreakdownItem.new(payable_amount: payable_amount, - converted_amount: converted_amount, - exchange_rate: exchange_rate) - end - end -end diff --git a/lib/pay_pal_restap_is/models/network_token.rb b/lib/pay_pal_restap_is/models/network_token.rb deleted file mode 100644 index 25972db..0000000 --- a/lib/pay_pal_restap_is/models/network_token.rb +++ /dev/null @@ -1,95 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The Third Party Network token used to fund a payment. - class NetworkToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Third party network token number. - # @return [String] - attr_accessor :number - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # An Encrypted one-time use value that's sent along with Network Token. This - # field is not required to be present for recurring transactions. - # @return [String] - attr_accessor :cryptogram - - # Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data - # elements that indicate the transaction was processed electronically. This - # should be passed on the authorization transaction to the - # Gateway/Processor. - # @return [ECIFlag] - attr_accessor :eci_flag - - # A TRID, or a Token Requestor ID, is an identifier used by merchants to - # request network tokens from card networks. A TRID is a precursor to - # obtaining a network token for a credit card primary account number (PAN), - # and will aid in enabling secure card on file (COF) payments and reducing - # fraud. - # @return [String] - attr_accessor :token_requestor_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['number'] = 'number' - @_hash['expiry'] = 'expiry' - @_hash['cryptogram'] = 'cryptogram' - @_hash['eci_flag'] = 'eci_flag' - @_hash['token_requestor_id'] = 'token_requestor_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - cryptogram - eci_flag - token_requestor_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(number:, expiry:, cryptogram: SKIP, eci_flag: SKIP, - token_requestor_id: SKIP) - @number = number - @expiry = expiry - @cryptogram = cryptogram unless cryptogram == SKIP - @eci_flag = eci_flag unless eci_flag == SKIP - @token_requestor_id = token_requestor_id unless token_requestor_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - number = hash.key?('number') ? hash['number'] : nil - expiry = hash.key?('expiry') ? hash['expiry'] : nil - cryptogram = hash.key?('cryptogram') ? hash['cryptogram'] : SKIP - eci_flag = hash.key?('eci_flag') ? hash['eci_flag'] : SKIP - token_requestor_id = - hash.key?('token_requestor_id') ? hash['token_requestor_id'] : SKIP - - # Create object from extracted values. - NetworkToken.new(number: number, - expiry: expiry, - cryptogram: cryptogram, - eci_flag: eci_flag, - token_requestor_id: token_requestor_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/network_transaction_reference.rb b/lib/pay_pal_restap_is/models/network_transaction_reference.rb deleted file mode 100644 index 757cdc8..0000000 --- a/lib/pay_pal_restap_is/models/network_transaction_reference.rb +++ /dev/null @@ -1,90 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Reference values used by the card network to identify a transaction. - class NetworkTransactionReference < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Transaction reference id returned by the scheme. For Visa and Amex, this - # is the "Tran id" field in response. For MasterCard, this is the "BankNet - # reference id" field in response. For Discover, this is the "NRID" field in - # response. The pattern we expect for this field from Visa/Amex/CB/Discover - # is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric - # with special character -. - # @return [String] - attr_accessor :id - - # The date that the transaction was authorized by the scheme. This field may - # not be returned for all networks. MasterCard refers to this field as - # "BankNet reference date. - # @return [String] - attr_accessor :date - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :network - - # Reference ID issued for the card transaction. This ID can be used to track - # the transaction across processors, card brands and issuing banks. - # @return [String] - attr_accessor :acquirer_reference_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['date'] = 'date' - @_hash['network'] = 'network' - @_hash['acquirer_reference_number'] = 'acquirer_reference_number' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - date - network - acquirer_reference_number - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id:, date: SKIP, network: SKIP, - acquirer_reference_number: SKIP) - @id = id - @date = date unless date == SKIP - @network = network unless network == SKIP - unless acquirer_reference_number == SKIP - @acquirer_reference_number = - acquirer_reference_number - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : nil - date = hash.key?('date') ? hash['date'] : SKIP - network = hash.key?('network') ? hash['network'] : SKIP - acquirer_reference_number = - hash.key?('acquirer_reference_number') ? hash['acquirer_reference_number'] : SKIP - - # Create object from extracted values. - NetworkTransactionReference.new(id: id, - date: date, - network: network, - acquirer_reference_number: acquirer_reference_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb b/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb deleted file mode 100644 index a224583..0000000 --- a/lib/pay_pal_restap_is/models/network_transaction_reference_entity.rb +++ /dev/null @@ -1,88 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Previous network transaction reference including id and network. - class NetworkTransactionReferenceEntity < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Transaction reference id returned by the scheme. For Visa and Amex, this - # is the "Tran id" field in response. For MasterCard, this is the "BankNet - # reference id" field in response. For Discover, this is the "NRID" field in - # response. The pattern we expect for this field from Visa/Amex/CB/Discover - # is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric - # with special character -. - # @return [String] - attr_accessor :id - - # The date that the transaction was authorized by the scheme. This field may - # not be returned for all networks. MasterCard refers to this field as - # "BankNet reference date. - # @return [String] - attr_accessor :date - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :network - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['date'] = 'date' - @_hash['network'] = 'network' - @_hash['time'] = 'time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - date - network - time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id:, date: SKIP, network: SKIP, time: SKIP) - @id = id - @date = date unless date == SKIP - @network = network unless network == SKIP - @time = time unless time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : nil - date = hash.key?('date') ? hash['date'] : SKIP - network = hash.key?('network') ? hash['network'] : SKIP - time = hash.key?('time') ? hash['time'] : SKIP - - # Create object from extracted values. - NetworkTransactionReferenceEntity.new(id: id, - date: date, - network: network, - time: time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/o_auth_provider_error.rb b/lib/pay_pal_restap_is/models/o_auth_provider_error.rb deleted file mode 100644 index a109a64..0000000 --- a/lib/pay_pal_restap_is/models/o_auth_provider_error.rb +++ /dev/null @@ -1,45 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OAuth 2 Authorization error codes - class OAuthProviderError - O_AUTH_PROVIDER_ERROR = [ - # The request is missing a required parameter, includes an unsupported - # parameter value (other than grant type), repeats a parameter, includes - # multiple credentials, utilizes more than one mechanism for - # authenticating the client, or is otherwise malformed. - INVALID_REQUEST = 'invalid_request'.freeze, - - # Client authentication failed (e.g., unknown client, no client - # authentication included, or unsupported authentication method). - INVALID_CLIENT = 'invalid_client'.freeze, - - # The provided authorization grant (e.g., authorization code, resource - # owner credentials) or refresh token is invalid, expired, revoked, does - # not match the redirection URI used in the authorization request, or was - # issued to another client. - INVALID_GRANT = 'invalid_grant'.freeze, - - # The authenticated client is not authorized to use this authorization - # grant type. - UNAUTHORIZED_CLIENT = 'unauthorized_client'.freeze, - - # The authorization grant type is not supported by the authorization - # server. - UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'.freeze, - - # The requested scope is invalid, unknown, malformed, or exceeds the scope - # granted by the resource owner. - INVALID_SCOPE = 'invalid_scope'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - O_AUTH_PROVIDER_ERROR.include?(value) - end - end -end diff --git a/lib/pay_pal_restap_is/models/o_auth_token.rb b/lib/pay_pal_restap_is/models/o_auth_token.rb deleted file mode 100644 index 338ae47..0000000 --- a/lib/pay_pal_restap_is/models/o_auth_token.rb +++ /dev/null @@ -1,106 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OAuth 2 Authorization endpoint response - class OAuthToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Access token - # @return [String] - attr_accessor :access_token - - # Type of access token - # @return [String] - attr_accessor :token_type - - # Time in seconds before the access token expires - # @return [Integer] - attr_accessor :expires_in - - # List of scopes granted - # This is a space-delimited list of strings. - # @return [String] - attr_accessor :scope - - # Time of token expiry as unix timestamp (UTC) - # @return [Integer] - attr_accessor :expiry - - # Refresh token - # Used to get a new access token when it expires. - # @return [String] - attr_accessor :refresh_token - - # An ID token response type is of JSON Web Token (JWT) that contains claims - # about the identity of the authenticated user. - # @return [String] - attr_accessor :id_token - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['access_token'] = 'access_token' - @_hash['token_type'] = 'token_type' - @_hash['expires_in'] = 'expires_in' - @_hash['scope'] = 'scope' - @_hash['expiry'] = 'expiry' - @_hash['refresh_token'] = 'refresh_token' - @_hash['id_token'] = 'id_token' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - expires_in - scope - expiry - refresh_token - id_token - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(access_token:, token_type:, expires_in: SKIP, scope: SKIP, - expiry: SKIP, refresh_token: SKIP, id_token: SKIP) - @access_token = access_token - @token_type = token_type - @expires_in = expires_in unless expires_in == SKIP - @scope = scope unless scope == SKIP - @expiry = expiry unless expiry == SKIP - @refresh_token = refresh_token unless refresh_token == SKIP - @id_token = id_token unless id_token == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - access_token = hash.key?('access_token') ? hash['access_token'] : nil - token_type = hash.key?('token_type') ? hash['token_type'] : nil - expires_in = hash.key?('expires_in') ? hash['expires_in'] : SKIP - scope = hash.key?('scope') ? hash['scope'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - refresh_token = hash.key?('refresh_token') ? hash['refresh_token'] : SKIP - id_token = hash.key?('id_token') ? hash['id_token'] : SKIP - - # Create object from extracted values. - OAuthToken.new(access_token: access_token, - token_type: token_type, - expires_in: expires_in, - scope: scope, - expiry: expiry, - refresh_token: refresh_token, - id_token: id_token) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order.rb b/lib/pay_pal_restap_is/models/order.rb deleted file mode 100644 index f1b71a2..0000000 --- a/lib/pay_pal_restap_is/models/order.rb +++ /dev/null @@ -1,178 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The order details. - class Order < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # The ID of the order. - # @return [String] - attr_accessor :id - - # The payment source used to fund the payment. - # @return [PaymentSourceResponse] - attr_accessor :payment_source - - # The intent to either capture payment immediately or authorize a payment - # for an order after order creation. - # @return [CheckoutPaymentIntent] - attr_accessor :intent - - # The instruction to process an order. - # @return [ProcessingInstruction] - attr_accessor :processing_instruction - - # The instruction to process an order. - # @return [Payer] - attr_accessor :payer - - # An array of purchase units. Each purchase unit establishes a contract - # between a customer and merchant. Each purchase unit represents either a - # full or partial order that the customer intends to purchase from the - # merchant. - # @return [Array[PurchaseUnit]] - attr_accessor :purchase_units - - # The order status. - # @return [OrderStatus] - attr_accessor :status - - # An array of request-related HATEOAS links. To complete payer approval, use - # the `approve` link to redirect the payer. The API caller has 3 hours - # (default setting, this which can be changed by your account manager to - # 24/48/72 hours to accommodate your use case) from the time the order is - # created, to redirect your payer. Once redirected, the API caller has 3 - # hours for the payer to approve the order and either authorize or capture - # the order. If you are not using the PayPal JavaScript SDK to initiate - # PayPal Checkout (in context) ensure that you include - # `application_context.return_url` is specified or you will get "We're - # sorry, Things don't appear to be working at the moment" after the payer - # approves the payment. - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash['id'] = 'id' - @_hash['payment_source'] = 'payment_source' - @_hash['intent'] = 'intent' - @_hash['processing_instruction'] = 'processing_instruction' - @_hash['payer'] = 'payer' - @_hash['purchase_units'] = 'purchase_units' - @_hash['status'] = 'status' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - create_time - update_time - id - payment_source - intent - processing_instruction - payer - purchase_units - status - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize( - create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP, - intent: SKIP, - processing_instruction: ProcessingInstruction::NO_INSTRUCTION, - payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP - ) - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - @id = id unless id == SKIP - @payment_source = payment_source unless payment_source == SKIP - @intent = intent unless intent == SKIP - @processing_instruction = processing_instruction unless processing_instruction == SKIP - @payer = payer unless payer == SKIP - @purchase_units = purchase_units unless purchase_units == SKIP - @status = status unless status == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - id = hash.key?('id') ? hash['id'] : SKIP - payment_source = PaymentSourceResponse.from_hash(hash['payment_source']) if - hash['payment_source'] - intent = hash.key?('intent') ? hash['intent'] : SKIP - processing_instruction = - hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION - payer = Payer.from_hash(hash['payer']) if hash['payer'] - # Parameter is an array, so we need to iterate through it - purchase_units = nil - unless hash['purchase_units'].nil? - purchase_units = [] - hash['purchase_units'].each do |structure| - purchase_units << (PurchaseUnit.from_hash(structure) if structure) - end - end - - purchase_units = SKIP unless hash.key?('purchase_units') - status = hash.key?('status') ? hash['status'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - Order.new(create_time: create_time, - update_time: update_time, - id: id, - payment_source: payment_source, - intent: intent, - processing_instruction: processing_instruction, - payer: payer, - purchase_units: purchase_units, - status: status, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_application_context.rb b/lib/pay_pal_restap_is/models/order_application_context.rb deleted file mode 100644 index 24c1890..0000000 --- a/lib/pay_pal_restap_is/models/order_application_context.rb +++ /dev/null @@ -1,193 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer experience during the approval process for the payment - # with PayPal.
Note: Partners and Marketplaces - # might configure brand_name and shipping_preference - # during partner account setup, which overrides the request - # values.
- class OrderApplicationContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # DEPRECATED. The label that overrides the business name in the PayPal - # account on the PayPal site. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.brand_name`). Please specify - # this field in the `experience_context` object instead of the - # `application_context` object. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal - # site for customer checkout. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.landing_page`). Please specify - # this field in the `experience_context` object instead of the - # `application_context` object. - # @return [OrderApplicationContextLandingPage] - attr_accessor :landing_page - - # DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the - # shipping address to the customer.
  • Enables the customer to choose - # an address on the PayPal site.
  • Restricts the customer from - # changing the address during the payment-approval process.
. The - # fields in `application_context` are now available in the - # `experience_context` object under the `payment_source` which supports them - # (eg. `payment_source.paypal.experience_context.shipping_preference`). - # Please specify this field in the `experience_context` object instead of - # the `application_context` object. - # @return [OrderApplicationContextShippingPreference] - attr_accessor :shipping_preference - - # DEPRECATED. Configures a Continue or Pay - # Now checkout flow. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.user_action`). Please specify - # this field in the `experience_context` object instead of the - # `application_context` object. - # @return [OrderApplicationContextUserAction] - attr_accessor :user_action - - # The customer and merchant payment preferences. - # @return [PaymentMethodPreference] - attr_accessor :payment_method - - # DEPRECATED. The URL where the customer is redirected after the customer - # approves the payment. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.return_url`). Please specify - # this field in the `experience_context` object instead of the - # `application_context` object. - # @return [String] - attr_accessor :return_url - - # DEPRECATED. The URL where the customer is redirected after the customer - # cancels the payment. The fields in `application_context` are now available - # in the `experience_context` object under the `payment_source` which - # supports them (eg. `payment_source.paypal.experience_context.cancel_url`). - # Please specify this field in the `experience_context` object instead of - # the `application_context` object. - # @return [String] - attr_accessor :cancel_url - - # Provides additional details to process a payment using a `payment_source` - # that has been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only - # with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- # @return [StoredPaymentSource] - attr_accessor :stored_payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['landing_page'] = 'landing_page' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['user_action'] = 'user_action' - @_hash['payment_method'] = 'payment_method' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['stored_payment_source'] = 'stored_payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - landing_page - shipping_preference - user_action - payment_method - return_url - cancel_url - stored_payment_source - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize( - brand_name: SKIP, locale: SKIP, - landing_page: OrderApplicationContextLandingPage::NO_PREFERENCE, - shipping_preference: OrderApplicationContextShippingPreference::GET_FROM_FILE, - user_action: OrderApplicationContextUserAction::CONTINUE, - payment_method: SKIP, return_url: SKIP, cancel_url: SKIP, - stored_payment_source: SKIP - ) - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @landing_page = landing_page unless landing_page == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @user_action = user_action unless user_action == SKIP - @payment_method = payment_method unless payment_method == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @stored_payment_source = stored_payment_source unless stored_payment_source == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - landing_page = - hash['landing_page'] ||= OrderApplicationContextLandingPage::NO_PREFERENCE - shipping_preference = - hash['shipping_preference'] ||= OrderApplicationContextShippingPreference::GET_FROM_FILE - user_action = - hash['user_action'] ||= OrderApplicationContextUserAction::CONTINUE - payment_method = PaymentMethodPreference.from_hash(hash['payment_method']) if - hash['payment_method'] - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - stored_payment_source = StoredPaymentSource.from_hash(hash['stored_payment_source']) if - hash['stored_payment_source'] - - # Create object from extracted values. - OrderApplicationContext.new(brand_name: brand_name, - locale: locale, - landing_page: landing_page, - shipping_preference: shipping_preference, - user_action: user_action, - payment_method: payment_method, - return_url: return_url, - cancel_url: cancel_url, - stored_payment_source: stored_payment_source) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb b/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb deleted file mode 100644 index 9f8fc37..0000000 --- a/lib/pay_pal_restap_is/models/order_application_context_landing_page.rb +++ /dev/null @@ -1,32 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site - # for customer checkout. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.landing_page`). Please specify - # this field in the `experience_context` object instead of the - # `application_context` object. - class OrderApplicationContextLandingPage - ORDER_APPLICATION_CONTEXT_LANDING_PAGE = [ - # TODO: Write general description for LOGIN - LOGIN = 'LOGIN'.freeze, - - # TODO: Write general description for BILLING - BILLING = 'BILLING'.freeze, - - # TODO: Write general description for NO_PREFERENCE - NO_PREFERENCE = 'NO_PREFERENCE'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb b/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb deleted file mode 100644 index f059f54..0000000 --- a/lib/pay_pal_restap_is/models/order_application_context_shipping_preference.rb +++ /dev/null @@ -1,34 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the - # shipping address to the customer.
  • Enables the customer to choose an - # address on the PayPal site.
  • Restricts the customer from changing the - # address during the payment-approval process.
. The fields in - # `application_context` are now available in the `experience_context` object - # under the `payment_source` which supports them (eg. - # `payment_source.paypal.experience_context.shipping_preference`). Please - # specify this field in the `experience_context` object instead of the - # `application_context` object. - class OrderApplicationContextShippingPreference - ORDER_APPLICATION_CONTEXT_SHIPPING_PREFERENCE = [ - # TODO: Write general description for GET_FROM_FILE - GET_FROM_FILE = 'GET_FROM_FILE'.freeze, - - # TODO: Write general description for NO_SHIPPING - NO_SHIPPING = 'NO_SHIPPING'.freeze, - - # TODO: Write general description for SET_PROVIDED_ADDRESS - SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_application_context_user_action.rb b/lib/pay_pal_restap_is/models/order_application_context_user_action.rb deleted file mode 100644 index 89637b1..0000000 --- a/lib/pay_pal_restap_is/models/order_application_context_user_action.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # DEPRECATED. Configures a Continue or Pay - # Now checkout flow. The fields in `application_context` are now - # available in the `experience_context` object under the `payment_source` - # which supports them (eg. - # `payment_source.paypal.experience_context.user_action`). Please specify this - # field in the `experience_context` object instead of the - # `application_context` object. - class OrderApplicationContextUserAction - ORDER_APPLICATION_CONTEXT_USER_ACTION = [ - # TODO: Write general description for CONTINUE - CONTINUE = 'CONTINUE'.freeze, - - # TODO: Write general description for PAY_NOW - PAY_NOW = 'PAY_NOW'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_authorize_request.rb b/lib/pay_pal_restap_is/models/order_authorize_request.rb deleted file mode 100644 index 07c53a8..0000000 --- a/lib/pay_pal_restap_is/models/order_authorize_request.rb +++ /dev/null @@ -1,51 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The authorization of an order request. - class OrderAuthorizeRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment source definition. - # @return [OrderAuthorizeRequestPaymentSource] - attr_accessor :payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payment_source'] = 'payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payment_source - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_source: SKIP) - @payment_source = payment_source unless payment_source == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_source = OrderAuthorizeRequestPaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - - # Create object from extracted values. - OrderAuthorizeRequest.new(payment_source: payment_source) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb b/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb deleted file mode 100644 index 7993f84..0000000 --- a/lib/pay_pal_restap_is/models/order_authorize_request_payment_source.rb +++ /dev/null @@ -1,104 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment source definition. - class OrderAuthorizeRequestPaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to use to fund a payment. Can be a credit or debit - # card.
Note: Passing card number, cvv and - # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by - # which you do not have to take on the PCI SAQ D burden by - # using hosted fields - refer to this - # Integration Guide*.
- # @return [CardRequest] - attr_accessor :card - - # The tokenized payment source to fund a payment. - # @return [Token] - attr_accessor :token - - # A resource that identifies a PayPal Wallet is used for payment. - # @return [PayPalWallet] - attr_accessor :paypal - - # Information needed to pay using ApplePay. - # @return [ApplePayRequest] - attr_accessor :apple_pay - - # Information needed to pay using Google Pay. - # @return [GooglePayRequest] - attr_accessor :google_pay - - # Information needed to pay using Venmo. - # @return [VenmoWalletRequest] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['token'] = 'token' - @_hash['paypal'] = 'paypal' - @_hash['apple_pay'] = 'apple_pay' - @_hash['google_pay'] = 'google_pay' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - token - paypal - apple_pay - google_pay - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP, - google_pay: SKIP, venmo: SKIP) - @card = card unless card == SKIP - @token = token unless token == SKIP - @paypal = paypal unless paypal == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @google_pay = google_pay unless google_pay == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardRequest.from_hash(hash['card']) if hash['card'] - token = Token.from_hash(hash['token']) if hash['token'] - paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] - apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] - google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] - venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - OrderAuthorizeRequestPaymentSource.new(card: card, - token: token, - paypal: paypal, - apple_pay: apple_pay, - google_pay: google_pay, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_authorize_response.rb b/lib/pay_pal_restap_is/models/order_authorize_response.rb deleted file mode 100644 index 661dde4..0000000 --- a/lib/pay_pal_restap_is/models/order_authorize_response.rb +++ /dev/null @@ -1,171 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # OrderAuthorizeResponse Model. - class OrderAuthorizeResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # The ID of the order. - # @return [String] - attr_accessor :id - - # The payment source used to fund the payment. - # @return [OrderAuthorizeResponsePaymentSource] - attr_accessor :payment_source - - # The intent to either capture payment immediately or authorize a payment - # for an order after order creation. - # @return [CheckoutPaymentIntent] - attr_accessor :intent - - # The instruction to process an order. - # @return [ProcessingInstruction] - attr_accessor :processing_instruction - - # The instruction to process an order. - # @return [Payer] - attr_accessor :payer - - # An array of purchase units. Each purchase unit establishes a contract - # between a customer and merchant. Each purchase unit represents either a - # full or partial order that the customer intends to purchase from the - # merchant. - # @return [Array[PurchaseUnit]] - attr_accessor :purchase_units - - # The order status. - # @return [OrderStatus] - attr_accessor :status - - # An array of request-related [HATEOAS - # links](/api/rest/responses/#hateoas-links) that are either relevant to the - # issue by providing additional information or offering potential - # resolutions. - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash['id'] = 'id' - @_hash['payment_source'] = 'payment_source' - @_hash['intent'] = 'intent' - @_hash['processing_instruction'] = 'processing_instruction' - @_hash['payer'] = 'payer' - @_hash['purchase_units'] = 'purchase_units' - @_hash['status'] = 'status' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - create_time - update_time - id - payment_source - intent - processing_instruction - payer - purchase_units - status - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize( - create_time: SKIP, update_time: SKIP, id: SKIP, payment_source: SKIP, - intent: SKIP, - processing_instruction: ProcessingInstruction::NO_INSTRUCTION, - payer: SKIP, purchase_units: SKIP, status: SKIP, links: SKIP - ) - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - @id = id unless id == SKIP - @payment_source = payment_source unless payment_source == SKIP - @intent = intent unless intent == SKIP - @processing_instruction = processing_instruction unless processing_instruction == SKIP - @payer = payer unless payer == SKIP - @purchase_units = purchase_units unless purchase_units == SKIP - @status = status unless status == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - id = hash.key?('id') ? hash['id'] : SKIP - payment_source = OrderAuthorizeResponsePaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - intent = hash.key?('intent') ? hash['intent'] : SKIP - processing_instruction = - hash['processing_instruction'] ||= ProcessingInstruction::NO_INSTRUCTION - payer = Payer.from_hash(hash['payer']) if hash['payer'] - # Parameter is an array, so we need to iterate through it - purchase_units = nil - unless hash['purchase_units'].nil? - purchase_units = [] - hash['purchase_units'].each do |structure| - purchase_units << (PurchaseUnit.from_hash(structure) if structure) - end - end - - purchase_units = SKIP unless hash.key?('purchase_units') - status = hash.key?('status') ? hash['status'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - OrderAuthorizeResponse.new(create_time: create_time, - update_time: update_time, - id: id, - payment_source: payment_source, - intent: intent, - processing_instruction: processing_instruction, - payer: payer, - purchase_units: purchase_units, - status: status, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb b/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb deleted file mode 100644 index 0994a35..0000000 --- a/lib/pay_pal_restap_is/models/order_authorize_response_payment_source.rb +++ /dev/null @@ -1,88 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment source used to fund the payment. - class OrderAuthorizeResponsePaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to use to fund a payment. Card can be a credit or debit - # card. - # @return [CardResponse] - attr_accessor :card - - # The PayPal Wallet response. - # @return [PayPalWalletResponse] - attr_accessor :paypal - - # Information needed to pay using ApplePay. - # @return [ApplePayPaymentObject] - attr_accessor :apple_pay - - # Google Pay Wallet payment data. - # @return [GooglePayWalletResponse] - attr_accessor :google_pay - - # Venmo wallet response. - # @return [VenmoWalletResponse] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['paypal'] = 'paypal' - @_hash['apple_pay'] = 'apple_pay' - @_hash['google_pay'] = 'google_pay' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - paypal - apple_pay - google_pay - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, paypal: SKIP, apple_pay: SKIP, google_pay: SKIP, - venmo: SKIP) - @card = card unless card == SKIP - @paypal = paypal unless paypal == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @google_pay = google_pay unless google_pay == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardResponse.from_hash(hash['card']) if hash['card'] - paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal'] - apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay'] - google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay'] - venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - OrderAuthorizeResponsePaymentSource.new(card: card, - paypal: paypal, - apple_pay: apple_pay, - google_pay: google_pay, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_capture_request.rb b/lib/pay_pal_restap_is/models/order_capture_request.rb deleted file mode 100644 index 95a61ef..0000000 --- a/lib/pay_pal_restap_is/models/order_capture_request.rb +++ /dev/null @@ -1,51 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Completes an capture payment for an order. - class OrderCaptureRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment source definition. - # @return [OrderCaptureRequestPaymentSource] - attr_accessor :payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payment_source'] = 'payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payment_source - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_source: SKIP) - @payment_source = payment_source unless payment_source == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_source = OrderCaptureRequestPaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - - # Create object from extracted values. - OrderCaptureRequest.new(payment_source: payment_source) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb b/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb deleted file mode 100644 index f670428..0000000 --- a/lib/pay_pal_restap_is/models/order_capture_request_payment_source.rb +++ /dev/null @@ -1,104 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment source definition. - class OrderCaptureRequestPaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to use to fund a payment. Can be a credit or debit - # card.
Note: Passing card number, cvv and - # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by - # which you do not have to take on the PCI SAQ D burden by - # using hosted fields - refer to this - # Integration Guide*.
- # @return [CardRequest] - attr_accessor :card - - # The tokenized payment source to fund a payment. - # @return [Token] - attr_accessor :token - - # A resource that identifies a PayPal Wallet is used for payment. - # @return [PayPalWallet] - attr_accessor :paypal - - # Information needed to pay using ApplePay. - # @return [ApplePayRequest] - attr_accessor :apple_pay - - # Information needed to pay using Google Pay. - # @return [GooglePayRequest] - attr_accessor :google_pay - - # Information needed to pay using Venmo. - # @return [VenmoWalletRequest] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['token'] = 'token' - @_hash['paypal'] = 'paypal' - @_hash['apple_pay'] = 'apple_pay' - @_hash['google_pay'] = 'google_pay' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - token - paypal - apple_pay - google_pay - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, token: SKIP, paypal: SKIP, apple_pay: SKIP, - google_pay: SKIP, venmo: SKIP) - @card = card unless card == SKIP - @token = token unless token == SKIP - @paypal = paypal unless paypal == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @google_pay = google_pay unless google_pay == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardRequest.from_hash(hash['card']) if hash['card'] - token = Token.from_hash(hash['token']) if hash['token'] - paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] - apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] - google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] - venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - OrderCaptureRequestPaymentSource.new(card: card, - token: token, - paypal: paypal, - apple_pay: apple_pay, - google_pay: google_pay, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_confirm_application_context.rb b/lib/pay_pal_restap_is/models/order_confirm_application_context.rb deleted file mode 100644 index b340acd..0000000 --- a/lib/pay_pal_restap_is/models/order_confirm_application_context.rb +++ /dev/null @@ -1,109 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer confirmation experience. - class OrderConfirmApplicationContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Label to present to your payer as part of the PayPal hosted web - # experience. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The URL where the customer is redirected after the customer approves the - # payment. - # @return [String] - attr_accessor :return_url - - # The URL where the customer is redirected after the customer cancels the - # payment. - # @return [String] - attr_accessor :cancel_url - - # Provides additional details to process a payment using a `payment_source` - # that has been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only - # with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- # @return [StoredPaymentSource] - attr_accessor :stored_payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['stored_payment_source'] = 'stored_payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - return_url - cancel_url - stored_payment_source - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, - cancel_url: SKIP, stored_payment_source: SKIP) - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @stored_payment_source = stored_payment_source unless stored_payment_source == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - stored_payment_source = StoredPaymentSource.from_hash(hash['stored_payment_source']) if - hash['stored_payment_source'] - - # Create object from extracted values. - OrderConfirmApplicationContext.new(brand_name: brand_name, - locale: locale, - return_url: return_url, - cancel_url: cancel_url, - stored_payment_source: stored_payment_source) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_request.rb b/lib/pay_pal_restap_is/models/order_request.rb deleted file mode 100644 index 763a933..0000000 --- a/lib/pay_pal_restap_is/models/order_request.rb +++ /dev/null @@ -1,103 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The order request details. - class OrderRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The intent to either capture payment immediately or authorize a payment - # for an order after order creation. - # @return [CheckoutPaymentIntent] - attr_accessor :intent - - # The intent to either capture payment immediately or authorize a payment - # for an order after order creation. - # @return [Payer] - attr_accessor :payer - - # An array of purchase units. Each purchase unit establishes a contract - # between a payer and the payee. Each purchase unit represents either a full - # or partial order that the payer intends to purchase from the payee. - # @return [Array[PurchaseUnitRequest]] - attr_accessor :purchase_units - - # The payment source definition. - # @return [PaymentSource] - attr_accessor :payment_source - - # Customizes the payer experience during the approval process for the - # payment with PayPal.
Note: Partners and - # Marketplaces might configure brand_name and - # shipping_preference during partner account setup, which - # overrides the request values.
- # @return [OrderApplicationContext] - attr_accessor :application_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['intent'] = 'intent' - @_hash['payer'] = 'payer' - @_hash['purchase_units'] = 'purchase_units' - @_hash['payment_source'] = 'payment_source' - @_hash['application_context'] = 'application_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payer - payment_source - application_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(intent:, purchase_units:, payer: SKIP, payment_source: SKIP, - application_context: SKIP) - @intent = intent - @payer = payer unless payer == SKIP - @purchase_units = purchase_units - @payment_source = payment_source unless payment_source == SKIP - @application_context = application_context unless application_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - intent = hash.key?('intent') ? hash['intent'] : nil - # Parameter is an array, so we need to iterate through it - purchase_units = nil - unless hash['purchase_units'].nil? - purchase_units = [] - hash['purchase_units'].each do |structure| - purchase_units << (PurchaseUnitRequest.from_hash(structure) if structure) - end - end - - purchase_units = nil unless hash.key?('purchase_units') - payer = Payer.from_hash(hash['payer']) if hash['payer'] - payment_source = PaymentSource.from_hash(hash['payment_source']) if hash['payment_source'] - application_context = OrderApplicationContext.from_hash(hash['application_context']) if - hash['application_context'] - - # Create object from extracted values. - OrderRequest.new(intent: intent, - purchase_units: purchase_units, - payer: payer, - payment_source: payment_source, - application_context: application_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_status.rb b/lib/pay_pal_restap_is/models/order_status.rb deleted file mode 100644 index 3c79f3a..0000000 --- a/lib/pay_pal_restap_is/models/order_status.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The order status. - class OrderStatus - ORDER_STATUS = [ - # TODO: Write general description for CREATED - CREATED = 'CREATED'.freeze, - - # TODO: Write general description for SAVED - SAVED = 'SAVED'.freeze, - - # TODO: Write general description for APPROVED - APPROVED = 'APPROVED'.freeze, - - # TODO: Write general description for VOIDED - VOIDED = 'VOIDED'.freeze, - - # TODO: Write general description for COMPLETED - COMPLETED = 'COMPLETED'.freeze, - - # TODO: Write general description for PAYER_ACTION_REQUIRED - PAYER_ACTION_REQUIRED = 'PAYER_ACTION_REQUIRED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_tracker_item.rb b/lib/pay_pal_restap_is/models/order_tracker_item.rb deleted file mode 100644 index 5ee670e..0000000 --- a/lib/pay_pal_restap_is/models/order_tracker_item.rb +++ /dev/null @@ -1,99 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details of the items in the shipment. - class OrderTrackerItem < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The item name or title. - # @return [String] - attr_accessor :name - - # The item quantity. Must be a whole number. - # @return [String] - attr_accessor :quantity - - # The stock keeping unit (SKU) for the item. This can contain unicode - # characters. - # @return [String] - attr_accessor :sku - - # The URL to the item being purchased. Visible to buyer and used in buyer - # experiences. - # @return [String] - attr_accessor :url - - # The URL of the item's image. File type and size restrictions apply. An - # image that violates these restrictions will not be honored. - # @return [String] - attr_accessor :image_url - - # The Universal Product Code of the item. - # @return [UniversalProductCode] - attr_accessor :upc - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['quantity'] = 'quantity' - @_hash['sku'] = 'sku' - @_hash['url'] = 'url' - @_hash['image_url'] = 'image_url' - @_hash['upc'] = 'upc' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - quantity - sku - url - image_url - upc - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, quantity: SKIP, sku: SKIP, url: SKIP, - image_url: SKIP, upc: SKIP) - @name = name unless name == SKIP - @quantity = quantity unless quantity == SKIP - @sku = sku unless sku == SKIP - @url = url unless url == SKIP - @image_url = image_url unless image_url == SKIP - @upc = upc unless upc == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - quantity = hash.key?('quantity') ? hash['quantity'] : SKIP - sku = hash.key?('sku') ? hash['sku'] : SKIP - url = hash.key?('url') ? hash['url'] : SKIP - image_url = hash.key?('image_url') ? hash['image_url'] : SKIP - upc = UniversalProductCode.from_hash(hash['upc']) if hash['upc'] - - # Create object from extracted values. - OrderTrackerItem.new(name: name, - quantity: quantity, - sku: sku, - url: url, - image_url: image_url, - upc: upc) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_tracker_request.rb b/lib/pay_pal_restap_is/models/order_tracker_request.rb deleted file mode 100644 index 6e27474..0000000 --- a/lib/pay_pal_restap_is/models/order_tracker_request.rb +++ /dev/null @@ -1,116 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The tracking details of an order. - class OrderTrackerRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The tracking number for the shipment. This property supports Unicode. - # @return [String] - attr_accessor :tracking_number - - # The carrier for the shipment. Some carriers have a global version as well - # as local subsidiaries. The subsidiaries are repeated over many countries - # and might also have an entry in the global list. Choose the carrier for - # your country. If the carrier is not available for your country, choose the - # global version of the carrier. If your carrier name is not in the list, - # set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For - # allowed values, see Carriers. - # @return [ShipmentCarrier] - attr_accessor :carrier - - # The name of the carrier for the shipment. Provide this value only if the - # carrier parameter is OTHER. This property supports Unicode. - # @return [String] - attr_accessor :carrier_name_other - - # The PayPal capture ID. - # @return [String] - attr_accessor :capture_id - - # If true, sends an email notification to the payer of the PayPal - # transaction. The email contains the tracking information that was uploaded - # through the API. - # @return [TrueClass | FalseClass] - attr_accessor :notify_payer - - # An array of details of items in the shipment. - # @return [Array[OrderTrackerItem]] - attr_accessor :items - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['tracking_number'] = 'tracking_number' - @_hash['carrier'] = 'carrier' - @_hash['carrier_name_other'] = 'carrier_name_other' - @_hash['capture_id'] = 'capture_id' - @_hash['notify_payer'] = 'notify_payer' - @_hash['items'] = 'items' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - tracking_number - carrier - carrier_name_other - notify_payer - items - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(capture_id:, tracking_number: SKIP, carrier: SKIP, - carrier_name_other: SKIP, notify_payer: false, items: SKIP) - @tracking_number = tracking_number unless tracking_number == SKIP - @carrier = carrier unless carrier == SKIP - @carrier_name_other = carrier_name_other unless carrier_name_other == SKIP - @capture_id = capture_id - @notify_payer = notify_payer unless notify_payer == SKIP - @items = items unless items == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - capture_id = hash.key?('capture_id') ? hash['capture_id'] : nil - tracking_number = - hash.key?('tracking_number') ? hash['tracking_number'] : SKIP - carrier = hash.key?('carrier') ? hash['carrier'] : SKIP - carrier_name_other = - hash.key?('carrier_name_other') ? hash['carrier_name_other'] : SKIP - notify_payer = hash['notify_payer'] ||= false - # Parameter is an array, so we need to iterate through it - items = nil - unless hash['items'].nil? - items = [] - hash['items'].each do |structure| - items << (OrderTrackerItem.from_hash(structure) if structure) - end - end - - items = SKIP unless hash.key?('items') - - # Create object from extracted values. - OrderTrackerRequest.new(capture_id: capture_id, - tracking_number: tracking_number, - carrier: carrier, - carrier_name_other: carrier_name_other, - notify_payer: notify_payer, - items: items) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_tracker_response.rb b/lib/pay_pal_restap_is/models/order_tracker_response.rb deleted file mode 100644 index cc123a4..0000000 --- a/lib/pay_pal_restap_is/models/order_tracker_response.rb +++ /dev/null @@ -1,122 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The tracking response on creation of tracker. - class OrderTrackerResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The tracker id. - # @return [String] - attr_accessor :id - - # The status of the item shipment. - # @return [OrderTrackerStatus] - attr_accessor :status - - # An array of details of items in the shipment. - # @return [Array[OrderTrackerItem]] - attr_accessor :items - - # An array of request-related HATEOAS links. - # @return [Array[LinkDescription]] - attr_accessor :links - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['status'] = 'status' - @_hash['items'] = 'items' - @_hash['links'] = 'links' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - status - items - links - create_time - update_time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, status: SKIP, items: SKIP, links: SKIP, - create_time: SKIP, update_time: SKIP) - @id = id unless id == SKIP - @status = status unless status == SKIP - @items = items unless items == SKIP - @links = links unless links == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - status = hash.key?('status') ? hash['status'] : SKIP - # Parameter is an array, so we need to iterate through it - items = nil - unless hash['items'].nil? - items = [] - hash['items'].each do |structure| - items << (OrderTrackerItem.from_hash(structure) if structure) - end - end - - items = SKIP unless hash.key?('items') - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - - # Create object from extracted values. - OrderTrackerResponse.new(id: id, - status: status, - items: items, - links: links, - create_time: create_time, - update_time: update_time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/order_tracker_status.rb b/lib/pay_pal_restap_is/models/order_tracker_status.rb deleted file mode 100644 index 910d0c6..0000000 --- a/lib/pay_pal_restap_is/models/order_tracker_status.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status of the item shipment. - class OrderTrackerStatus - ORDER_TRACKER_STATUS = [ - # TODO: Write general description for CANCELLED - CANCELLED = 'CANCELLED'.freeze, - - # TODO: Write general description for SHIPPED - SHIPPED = 'SHIPPED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/p24_payment_object.rb b/lib/pay_pal_restap_is/models/p24_payment_object.rb deleted file mode 100644 index 400b2bc..0000000 --- a/lib/pay_pal_restap_is/models/p24_payment_object.rb +++ /dev/null @@ -1,108 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using P24(Przelewy24). - class P24PaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # P24 generated payment description. - # @return [String] - attr_accessor :payment_descriptor - - # Numeric identifier of the payment scheme or bank used for the payment. - # @return [String] - attr_accessor :method_id - - # Friendly name of the payment scheme or bank used for the payment. - # @return [String] - attr_accessor :method_description - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['email'] = 'email' - @_hash['country_code'] = 'country_code' - @_hash['payment_descriptor'] = 'payment_descriptor' - @_hash['method_id'] = 'method_id' - @_hash['method_description'] = 'method_description' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - email - country_code - payment_descriptor - method_id - method_description - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, email: SKIP, country_code: SKIP, - payment_descriptor: SKIP, method_id: SKIP, - method_description: SKIP) - @name = name unless name == SKIP - @email = email unless email == SKIP - @country_code = country_code unless country_code == SKIP - @payment_descriptor = payment_descriptor unless payment_descriptor == SKIP - @method_id = method_id unless method_id == SKIP - @method_description = method_description unless method_description == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - email = hash.key?('email') ? hash['email'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - payment_descriptor = - hash.key?('payment_descriptor') ? hash['payment_descriptor'] : SKIP - method_id = hash.key?('method_id') ? hash['method_id'] : SKIP - method_description = - hash.key?('method_description') ? hash['method_description'] : SKIP - - # Create object from extracted values. - P24PaymentObject.new(name: name, - email: email, - country_code: country_code, - payment_descriptor: payment_descriptor, - method_id: method_id, - method_description: method_description) - end - end -end diff --git a/lib/pay_pal_restap_is/models/p24_payment_request.rb b/lib/pay_pal_restap_is/models/p24_payment_request.rb deleted file mode 100644 index b5f0e39..0000000 --- a/lib/pay_pal_restap_is/models/p24_payment_request.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using P24 (Przelewy24). - class P24PaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['email'] = 'email' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, email:, country_code:, experience_context: SKIP) - @name = name - @email = email - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - email = hash.key?('email') ? hash['email'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - P24PaymentRequest.new(name: name, - email: email, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pa_res_status.rb b/lib/pay_pal_restap_is/models/pa_res_status.rb deleted file mode 100644 index a1788c9..0000000 --- a/lib/pay_pal_restap_is/models/pa_res_status.rb +++ /dev/null @@ -1,42 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Transactions status result identifier. The outcome of the issuer's - # authentication. - class PAResStatus - PA_RES_STATUS = [ - # TODO: Write general description for Y - Y = 'Y'.freeze, - - # TODO: Write general description for N - N = 'N'.freeze, - - # TODO: Write general description for U - U = 'U'.freeze, - - # TODO: Write general description for A - A = 'A'.freeze, - - # TODO: Write general description for C - C = 'C'.freeze, - - # TODO: Write general description for R - R = 'R'.freeze, - - # TODO: Write general description for D - D = 'D'.freeze, - - # TODO: Write general description for I - I = 'I'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/patch.rb b/lib/pay_pal_restap_is/models/patch.rb deleted file mode 100644 index c6f28b2..0000000 --- a/lib/pay_pal_restap_is/models/patch.rb +++ /dev/null @@ -1,83 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The JSON patch object to apply partial updates to resources. - class Patch < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The operation. - # @return [PatchOp] - attr_accessor :op - - # The JSON Pointer to the - # target document location at which to complete the operation. - # @return [String] - attr_accessor :path - - # The value to apply. The remove, copy, and - # move operations do not require a value. Since JSON Patch allows any - # type for value, the type property is not - # specified. - # @return [Object] - attr_accessor :value - - # The JSON Pointer to the - # target document location from which to move the value. Required for the - # move operation. - # @return [String] - attr_accessor :from - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['op'] = 'op' - @_hash['path'] = 'path' - @_hash['value'] = 'value' - @_hash['from'] = 'from' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - path - value - from - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(op:, path: SKIP, value: SKIP, from: SKIP) - @op = op - @path = path unless path == SKIP - @value = value unless value == SKIP - @from = from unless from == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - op = hash.key?('op') ? hash['op'] : nil - path = hash.key?('path') ? hash['path'] : SKIP - value = hash.key?('value') ? hash['value'] : SKIP - from = hash.key?('from') ? hash['from'] : SKIP - - # Create object from extracted values. - Patch.new(op: op, - path: path, - value: value, - from: from) - end - end -end diff --git a/lib/pay_pal_restap_is/models/patch_op.rb b/lib/pay_pal_restap_is/models/patch_op.rb deleted file mode 100644 index f8e4f8c..0000000 --- a/lib/pay_pal_restap_is/models/patch_op.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The operation. - class PatchOp - PATCH_OP = [ - # TODO: Write general description for ADD - ADD = 'add'.freeze, - - # TODO: Write general description for REMOVE - REMOVE = 'remove'.freeze, - - # TODO: Write general description for REPLACE - REPLACE = 'replace'.freeze, - - # TODO: Write general description for MOVE - MOVE = 'move'.freeze, - - # TODO: Write general description for COPY - COPY = 'copy'.freeze, - - # TODO: Write general description for TEST - TEST = 'test'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb b/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb deleted file mode 100644 index c732e5e..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_experience_landing_page.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The type of landing page to show on the PayPal site for customer checkout. - class PayPalExperienceLandingPage - PAY_PAL_EXPERIENCE_LANDING_PAGE = [ - # TODO: Write general description for LOGIN - LOGIN = 'LOGIN'.freeze, - - # TODO: Write general description for GUEST_CHECKOUT - GUEST_CHECKOUT = 'GUEST_CHECKOUT'.freeze, - - # TODO: Write general description for NO_PREFERENCE - NO_PREFERENCE = 'NO_PREFERENCE'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb b/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb deleted file mode 100644 index 0e17299..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_experience_user_action.rb +++ /dev/null @@ -1,24 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Configures a Continue or Pay Now checkout - # flow. - class PayPalExperienceUserAction - PAY_PAL_EXPERIENCE_USER_ACTION = [ - # TODO: Write general description for CONTINUE - CONTINUE = 'CONTINUE'.freeze, - - # TODO: Write general description for PAY_NOW - PAY_NOW = 'PAY_NOW'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb deleted file mode 100644 index aba8431..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_payment_token.rb +++ /dev/null @@ -1,180 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # PayPalPaymentToken Model. - class PayPalPaymentToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The description displayed to the consumer on the approval flow for a - # digital wallet, as well as on the merchant view of the payment token - # management experience. exp: PayPal.com. - # @return [String] - attr_accessor :description - - # The shipping details. - # @return [VaultedDigitalWalletShippingDetails] - attr_accessor :shipping - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # The usage type associated with a digital wallet payment token. - # @return [String] - attr_accessor :usage_type - - # The customer type associated with a digital wallet payment token. This is - # to indicate whether the customer acting on the merchant / platform is - # either a business or a consumer. - # @return [String] - attr_accessor :customer_type - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :payer_id - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :account_id - - # The phone number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [Phone] - attr_accessor :phone_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['description'] = 'description' - @_hash['shipping'] = 'shipping' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['email_address'] = 'email_address' - @_hash['payer_id'] = 'payer_id' - @_hash['name'] = 'name' - @_hash['phone'] = 'phone' - @_hash['address'] = 'address' - @_hash['account_id'] = 'account_id' - @_hash['phone_number'] = 'phone_number' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - shipping - permit_multiple_payment_tokens - usage_type - customer_type - email_address - payer_id - name - phone - address - account_id - phone_number - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(description: SKIP, shipping: SKIP, - permit_multiple_payment_tokens: false, usage_type: SKIP, - customer_type: SKIP, email_address: SKIP, payer_id: SKIP, - name: SKIP, phone: SKIP, address: SKIP, account_id: SKIP, - phone_number: SKIP) - @description = description unless description == SKIP - @shipping = shipping unless shipping == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - @usage_type = usage_type unless usage_type == SKIP - @customer_type = customer_type unless customer_type == SKIP - @email_address = email_address unless email_address == SKIP - @payer_id = payer_id unless payer_id == SKIP - @name = name unless name == SKIP - @phone = phone unless phone == SKIP - @address = address unless address == SKIP - @account_id = account_id unless account_id == SKIP - @phone_number = phone_number unless phone_number == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - description = hash.key?('description') ? hash['description'] : SKIP - shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if - hash['shipping'] - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP - customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - address = Address.from_hash(hash['address']) if hash['address'] - account_id = hash.key?('account_id') ? hash['account_id'] : SKIP - phone_number = Phone.from_hash(hash['phone_number']) if hash['phone_number'] - - # Create object from extracted values. - PayPalPaymentToken.new(description: description, - shipping: shipping, - permit_multiple_payment_tokens: permit_multiple_payment_tokens, - usage_type: usage_type, - customer_type: customer_type, - email_address: email_address, - payer_id: payer_id, - name: name, - phone: phone, - address: address, - account_id: account_id, - phone_number: phone_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb deleted file mode 100644 index 45aa40e..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_payment_token_customer_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The customer type associated with the PayPal payment token. This is to - # indicate whether the customer acting on the merchant / platform is either a - # business or a consumer. - class PayPalPaymentTokenCustomerType - PAY_PAL_PAYMENT_TOKEN_CUSTOMER_TYPE = [ - # TODO: Write general description for CONSUMER - CONSUMER = 'CONSUMER'.freeze, - - # TODO: Write general description for BUSINESS - BUSINESS = 'BUSINESS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb deleted file mode 100644 index f9e598c..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_pattern.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Expected business/pricing model for the billing agreement. - class PayPalPaymentTokenUsagePattern - PAY_PAL_PAYMENT_TOKEN_USAGE_PATTERN = [ - # TODO: Write general description for IMMEDIATE - IMMEDIATE = 'IMMEDIATE'.freeze, - - # TODO: Write general description for DEFERRED - DEFERRED = 'DEFERRED'.freeze, - - # TODO: Write general description for RECURRING_PREPAID - RECURRING_PREPAID = 'RECURRING_PREPAID'.freeze, - - # TODO: Write general description for RECURRING_POSTPAID - RECURRING_POSTPAID = 'RECURRING_POSTPAID'.freeze, - - # TODO: Write general description for THRESHOLD_PREPAID - THRESHOLD_PREPAID = 'THRESHOLD_PREPAID'.freeze, - - # TODO: Write general description for THRESHOLD_POSTPAID - THRESHOLD_POSTPAID = 'THRESHOLD_POSTPAID'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb b/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb deleted file mode 100644 index 58055ad..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_payment_token_usage_type.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The usage type associated with the PayPal payment token. - class PayPalPaymentTokenUsageType - PAY_PAL_PAYMENT_TOKEN_USAGE_TYPE = [ - # TODO: Write general description for MERCHANT - MERCHANT = 'MERCHANT'.freeze, - - # TODO: Write general description for PLATFORM - PLATFORM = 'PLATFORM'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet.rb deleted file mode 100644 index 28d7f3d..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet.rb +++ /dev/null @@ -1,158 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A resource that identifies a PayPal Wallet is used for payment. - class PayPalWallet < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the vaulted payment source. This ID should be - # stored on the merchant's server so the saved payment source can be used - # for future transactions. - # @return [String] - attr_accessor :vault_id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # The stand-alone date, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent - # special legal values, such as a date of birth, you should use dates with - # no associated time or time-zone data. Whenever possible, use the standard - # `date_time` type. This regular expression does not validate all dates. For - # example, February 31 is valid and nothing is known about leap years. - # @return [String] - attr_accessor :birth_date - - # The tax ID of the customer. The customer is also known as the payer. Both - # `tax_id` and `tax_id_type` are required. - # @return [TaxInfo] - attr_accessor :tax_info - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # Additional attributes associated with the use of this PayPal Wallet. - # @return [PayPalWalletAttributes] - attr_accessor :attributes - - # Customizes the payer experience during the approval process for payment - # with PayPal.
Note: Partners and Marketplaces - # might configure brand_name and - # shipping_preference during partner account setup, which - # overrides the request values.
- # @return [PayPalWalletExperienceContext] - attr_accessor :experience_context - - # The PayPal billing agreement ID. References an approved recurring payment - # for goods or services. - # @return [String] - attr_accessor :billing_agreement_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault_id'] = 'vault_id' - @_hash['email_address'] = 'email_address' - @_hash['name'] = 'name' - @_hash['phone'] = 'phone' - @_hash['birth_date'] = 'birth_date' - @_hash['tax_info'] = 'tax_info' - @_hash['address'] = 'address' - @_hash['attributes'] = 'attributes' - @_hash['experience_context'] = 'experience_context' - @_hash['billing_agreement_id'] = 'billing_agreement_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault_id - email_address - name - phone - birth_date - tax_info - address - attributes - experience_context - billing_agreement_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault_id: SKIP, email_address: SKIP, name: SKIP, phone: SKIP, - birth_date: SKIP, tax_info: SKIP, address: SKIP, - attributes: SKIP, experience_context: SKIP, - billing_agreement_id: SKIP) - @vault_id = vault_id unless vault_id == SKIP - @email_address = email_address unless email_address == SKIP - @name = name unless name == SKIP - @phone = phone unless phone == SKIP - @birth_date = birth_date unless birth_date == SKIP - @tax_info = tax_info unless tax_info == SKIP - @address = address unless address == SKIP - @attributes = attributes unless attributes == SKIP - @experience_context = experience_context unless experience_context == SKIP - @billing_agreement_id = billing_agreement_id unless billing_agreement_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP - tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] - address = Address.from_hash(hash['address']) if hash['address'] - attributes = PayPalWalletAttributes.from_hash(hash['attributes']) if hash['attributes'] - experience_context = PayPalWalletExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - billing_agreement_id = - hash.key?('billing_agreement_id') ? hash['billing_agreement_id'] : SKIP - - # Create object from extracted values. - PayPalWallet.new(vault_id: vault_id, - email_address: email_address, - name: name, - phone: phone, - birth_date: birth_date, - tax_info: tax_info, - address: address, - attributes: attributes, - experience_context: experience_context, - billing_agreement_id: billing_agreement_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb deleted file mode 100644 index 813b9cb..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_account_verification_status.rb +++ /dev/null @@ -1,24 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The account status indicates whether the buyer has verified the financial - # details associated with their PayPal account. - class PayPalWalletAccountVerificationStatus - PAY_PAL_WALLET_ACCOUNT_VERIFICATION_STATUS = [ - # TODO: Write general description for VERIFIED - VERIFIED = 'VERIFIED'.freeze, - - # TODO: Write general description for UNVERIFIED - UNVERIFIED = 'UNVERIFIED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb deleted file mode 100644 index 9dd0f18..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes.rb +++ /dev/null @@ -1,59 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of this PayPal Wallet. - class PayPalWalletAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # TODO: Write general description for this method - # @return [PayPalWalletCustomerRequest] - attr_accessor :customer - - # TODO: Write general description for this method - # @return [PayPalWalletVaultInstruction] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(customer: SKIP, vault: SKIP) - @customer = customer unless customer == SKIP - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - customer = PayPalWalletCustomerRequest.from_hash(hash['customer']) if hash['customer'] - vault = PayPalWalletVaultInstruction.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - PayPalWalletAttributes.new(customer: customer, - vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb deleted file mode 100644 index d8ada22..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_attributes_response.rb +++ /dev/null @@ -1,70 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of a PayPal Wallet. - class PayPalWalletAttributesResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a saved PayPal Wallet payment source. - # @return [PayPalWalletVaultResponse] - attr_accessor :vault - - # An array of merchant cobranded cards used by buyer to complete an order. - # This array will be present if a merchant has onboarded their cobranded - # card with PayPal and provided corresponding label(s). - # @return [Array[CobrandedCard]] - attr_accessor :cobranded_cards - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault'] = 'vault' - @_hash['cobranded_cards'] = 'cobranded_cards' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault - cobranded_cards - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault: SKIP, cobranded_cards: SKIP) - @vault = vault unless vault == SKIP - @cobranded_cards = cobranded_cards unless cobranded_cards == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault = PayPalWalletVaultResponse.from_hash(hash['vault']) if hash['vault'] - # Parameter is an array, so we need to iterate through it - cobranded_cards = nil - unless hash['cobranded_cards'].nil? - cobranded_cards = [] - hash['cobranded_cards'].each do |structure| - cobranded_cards << (CobrandedCard.from_hash(structure) if structure) - end - end - - cobranded_cards = SKIP unless hash.key?('cobranded_cards') - - # Create object from extracted values. - PayPalWalletAttributesResponse.new(vault: vault, - cobranded_cards: cobranded_cards) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb deleted file mode 100644 index 1765088..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a customer in PayPal's system of record. - class PayPalWalletCustomer < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # Merchants and partners may already have a data-store where their customer - # information is persisted. Use merchant_customer_id to associate the - # PayPal-generated customer.id to your representation of a customer. - # @return [String] - attr_accessor :merchant_customer_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['email_address'] = 'email_address' - @_hash['phone'] = 'phone' - @_hash['merchant_customer_id'] = 'merchant_customer_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - email_address - phone - merchant_customer_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, email_address: SKIP, phone: SKIP, - merchant_customer_id: SKIP) - @id = id unless id == SKIP - @email_address = email_address unless email_address == SKIP - @phone = phone unless phone == SKIP - @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - merchant_customer_id = - hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP - - # Create object from extracted values. - PayPalWalletCustomer.new(id: id, - email_address: email_address, - phone: phone, - merchant_customer_id: merchant_customer_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb deleted file mode 100644 index d151db1..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_customer_request.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # PayPalWalletCustomerRequest Model. - class PayPalWalletCustomerRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # Merchants and partners may already have a data-store where their customer - # information is persisted. Use merchant_customer_id to associate the - # PayPal-generated customer.id to your representation of a customer. - # @return [String] - attr_accessor :merchant_customer_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['email_address'] = 'email_address' - @_hash['phone'] = 'phone' - @_hash['merchant_customer_id'] = 'merchant_customer_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - email_address - phone - merchant_customer_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, email_address: SKIP, phone: SKIP, - merchant_customer_id: SKIP) - @id = id unless id == SKIP - @email_address = email_address unless email_address == SKIP - @phone = phone unless phone == SKIP - @merchant_customer_id = merchant_customer_id unless merchant_customer_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - merchant_customer_id = - hash.key?('merchant_customer_id') ? hash['merchant_customer_id'] : SKIP - - # Create object from extracted values. - PayPalWalletCustomerRequest.new(id: id, - email_address: email_address, - phone: phone, - merchant_customer_id: merchant_customer_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb deleted file mode 100644 index fdf0c61..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_experience_context.rb +++ /dev/null @@ -1,140 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the payer experience during the approval process for payment with - # PayPal.
Note: Partners and Marketplaces might - # configure brand_name and shipping_preference - # during partner account setup, which overrides the request - # values.
- class PayPalWalletExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The location from which the shipping address is derived. - # @return [ShippingPreference] - attr_accessor :shipping_preference - - # Describes the URL. - # @return [String] - attr_accessor :return_url - - # Describes the URL. - # @return [String] - attr_accessor :cancel_url - - # The type of landing page to show on the PayPal site for customer checkout. - # @return [PayPalExperienceLandingPage] - attr_accessor :landing_page - - # Configures a Continue or Pay Now - # checkout flow. - # @return [PayPalExperienceUserAction] - attr_accessor :user_action - - # The merchant-preferred payment methods. - # @return [PayeePaymentMethodPreference] - attr_accessor :payment_method_preference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['landing_page'] = 'landing_page' - @_hash['user_action'] = 'user_action' - @_hash['payment_method_preference'] = 'payment_method_preference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - shipping_preference - return_url - cancel_url - landing_page - user_action - payment_method_preference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize( - brand_name: SKIP, locale: SKIP, - shipping_preference: ShippingPreference::GET_FROM_FILE, return_url: SKIP, - cancel_url: SKIP, - landing_page: PayPalExperienceLandingPage::NO_PREFERENCE, - user_action: PayPalExperienceUserAction::CONTINUE, - payment_method_preference: PayeePaymentMethodPreference::UNRESTRICTED - ) - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @landing_page = landing_page unless landing_page == SKIP - @user_action = user_action unless user_action == SKIP - unless payment_method_preference == SKIP - @payment_method_preference = - payment_method_preference - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - shipping_preference = - hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - landing_page = - hash['landing_page'] ||= PayPalExperienceLandingPage::NO_PREFERENCE - user_action = hash['user_action'] ||= PayPalExperienceUserAction::CONTINUE - payment_method_preference = - hash['payment_method_preference'] ||= PayeePaymentMethodPreference::UNRESTRICTED - - # Create object from extracted values. - PayPalWalletExperienceContext.new(brand_name: brand_name, - locale: locale, - shipping_preference: shipping_preference, - return_url: return_url, - cancel_url: cancel_url, - landing_page: landing_page, - user_action: user_action, - payment_method_preference: payment_method_preference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb deleted file mode 100644 index 75abd22..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_response.rb +++ /dev/null @@ -1,156 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The PayPal Wallet response. - class PayPalWalletResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The PayPal payer ID, which is a masked version of the PayPal account - # number intended for use with third parties. The account number is - # reversibly encrypted and a proprietary variant of Base32 is used to encode - # the result. - # @return [String] - attr_accessor :account_id - - # The account status indicates whether the buyer has verified the financial - # details associated with their PayPal account. - # @return [PayPalWalletAccountVerificationStatus] - attr_accessor :account_status - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone type. - # @return [PhoneType] - attr_accessor :phone_type - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumber] - attr_accessor :phone_number - - # The stand-alone date, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent - # special legal values, such as a date of birth, you should use dates with - # no associated time or time-zone data. Whenever possible, use the standard - # `date_time` type. This regular expression does not validate all dates. For - # example, February 31 is valid and nothing is known about leap years. - # @return [String] - attr_accessor :birth_date - - # The tax ID of the customer. The customer is also known as the payer. Both - # `tax_id` and `tax_id_type` are required. - # @return [TaxInfo] - attr_accessor :tax_info - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # Additional attributes associated with the use of a PayPal Wallet. - # @return [PayPalWalletAttributesResponse] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['account_id'] = 'account_id' - @_hash['account_status'] = 'account_status' - @_hash['name'] = 'name' - @_hash['phone_type'] = 'phone_type' - @_hash['phone_number'] = 'phone_number' - @_hash['birth_date'] = 'birth_date' - @_hash['tax_info'] = 'tax_info' - @_hash['address'] = 'address' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - account_id - account_status - name - phone_type - phone_number - birth_date - tax_info - address - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, account_id: SKIP, account_status: SKIP, - name: SKIP, phone_type: SKIP, phone_number: SKIP, - birth_date: SKIP, tax_info: SKIP, address: SKIP, - attributes: SKIP) - @email_address = email_address unless email_address == SKIP - @account_id = account_id unless account_id == SKIP - @account_status = account_status unless account_status == SKIP - @name = name unless name == SKIP - @phone_type = phone_type unless phone_type == SKIP - @phone_number = phone_number unless phone_number == SKIP - @birth_date = birth_date unless birth_date == SKIP - @tax_info = tax_info unless tax_info == SKIP - @address = address unless address == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - account_id = hash.key?('account_id') ? hash['account_id'] : SKIP - account_status = - hash.key?('account_status') ? hash['account_status'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone_type = hash.key?('phone_type') ? hash['phone_type'] : SKIP - phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] - birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP - tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] - address = Address.from_hash(hash['address']) if hash['address'] - attributes = PayPalWalletAttributesResponse.from_hash(hash['attributes']) if - hash['attributes'] - - # Create object from extracted values. - PayPalWalletResponse.new(email_address: email_address, - account_id: account_id, - account_status: account_status, - name: name, - phone_type: phone_type, - phone_number: phone_number, - birth_date: birth_date, - tax_info: tax_info, - address: address, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb deleted file mode 100644 index d1acb55..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_instruction.rb +++ /dev/null @@ -1,115 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # PayPalWalletVaultInstruction Model. - class PayPalWalletVaultInstruction < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Defines how and when the payment source gets vaulted. - # @return [StoreInVaultInstruction] - attr_accessor :store_in_vault - - # The description displayed to PayPal consumer on the approval flow for - # PayPal, as well as on the PayPal payment token management experience on - # PayPal.com. - # @return [String] - attr_accessor :description - - # Expected business/pricing model for the billing agreement. - # @return [PayPalPaymentTokenUsagePattern] - attr_accessor :usage_pattern - - # The usage type associated with the PayPal payment token. - # @return [PayPalPaymentTokenUsageType] - attr_accessor :usage_type - - # The customer type associated with the PayPal payment token. This is to - # indicate whether the customer acting on the merchant / platform is either - # a business or a consumer. - # @return [PayPalPaymentTokenCustomerType] - attr_accessor :customer_type - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['store_in_vault'] = 'store_in_vault' - @_hash['description'] = 'description' - @_hash['usage_pattern'] = 'usage_pattern' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - store_in_vault - description - usage_pattern - customer_type - permit_multiple_payment_tokens - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(usage_type:, store_in_vault: SKIP, description: SKIP, - usage_pattern: SKIP, - customer_type: PayPalPaymentTokenCustomerType::CONSUMER, - permit_multiple_payment_tokens: false) - @store_in_vault = store_in_vault unless store_in_vault == SKIP - @description = description unless description == SKIP - @usage_pattern = usage_pattern unless usage_pattern == SKIP - @usage_type = usage_type - @customer_type = customer_type unless customer_type == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - usage_type = hash.key?('usage_type') ? hash['usage_type'] : nil - store_in_vault = - hash.key?('store_in_vault') ? hash['store_in_vault'] : SKIP - description = hash.key?('description') ? hash['description'] : SKIP - usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP - customer_type = - hash['customer_type'] ||= PayPalPaymentTokenCustomerType::CONSUMER - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - - # Create object from extracted values. - PayPalWalletVaultInstruction.new(usage_type: usage_type, - store_in_vault: store_in_vault, - description: description, - usage_pattern: usage_pattern, - customer_type: customer_type, - permit_multiple_payment_tokens: permit_multiple_payment_tokens) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb deleted file mode 100644 index 0f7f429..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_response.rb +++ /dev/null @@ -1,86 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a saved PayPal Wallet payment source. - class PayPalWalletVaultResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the saved payment source. - # @return [String] - attr_accessor :id - - # The vault status. - # @return [PayPalWalletVaultStatus] - attr_accessor :status - - # An array of request-related HATEOAS links. - # @return [Array[LinkDescription]] - attr_accessor :links - - # The details about a customer in PayPal's system of record. - # @return [PayPalWalletCustomer] - attr_accessor :customer - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['status'] = 'status' - @_hash['links'] = 'links' - @_hash['customer'] = 'customer' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - status - links - customer - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, status: SKIP, links: SKIP, customer: SKIP) - @id = id unless id == SKIP - @status = status unless status == SKIP - @links = links unless links == SKIP - @customer = customer unless customer == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - status = hash.key?('status') ? hash['status'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - customer = PayPalWalletCustomer.from_hash(hash['customer']) if hash['customer'] - - # Create object from extracted values. - PayPalWalletVaultResponse.new(id: id, - status: status, - links: links, - customer: customer) - end - end -end diff --git a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb b/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb deleted file mode 100644 index e98437a..0000000 --- a/lib/pay_pal_restap_is/models/pay_pal_wallet_vault_status.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The vault status. - class PayPalWalletVaultStatus - PAY_PAL_WALLET_VAULT_STATUS = [ - # TODO: Write general description for VAULTED - VAULTED = 'VAULTED'.freeze, - - # TODO: Write general description for CREATED - CREATED = 'CREATED'.freeze, - - # TODO: Write general description for APPROVED - APPROVED = 'APPROVED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/payee.rb b/lib/pay_pal_restap_is/models/payee.rb deleted file mode 100644 index 581be30..0000000 --- a/lib/pay_pal_restap_is/models/payee.rb +++ /dev/null @@ -1,65 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The merchant who receives the funds and fulfills the order. The merchant is - # also known as the payee., The details for the merchant who receives the - # funds and fulfills the order. The merchant is also known as the payee. - class Payee < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :merchant_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['merchant_id'] = 'merchant_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - merchant_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, merchant_id: SKIP) - @email_address = email_address unless email_address == SKIP - @merchant_id = merchant_id unless merchant_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP - - # Create object from extracted values. - Payee.new(email_address: email_address, - merchant_id: merchant_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payee_base.rb b/lib/pay_pal_restap_is/models/payee_base.rb deleted file mode 100644 index c1b442f..0000000 --- a/lib/pay_pal_restap_is/models/payee_base.rb +++ /dev/null @@ -1,64 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details for the merchant who receives the funds and fulfills the order. - # The merchant is also known as the payee. - class PayeeBase < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :merchant_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['merchant_id'] = 'merchant_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - merchant_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, merchant_id: SKIP) - @email_address = email_address unless email_address == SKIP - @merchant_id = merchant_id unless merchant_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - merchant_id = hash.key?('merchant_id') ? hash['merchant_id'] : SKIP - - # Create object from extracted values. - PayeeBase.new(email_address: email_address, - merchant_id: merchant_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb b/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb deleted file mode 100644 index e71dbcb..0000000 --- a/lib/pay_pal_restap_is/models/payee_payment_method_preference.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The merchant-preferred payment methods. - class PayeePaymentMethodPreference - PAYEE_PAYMENT_METHOD_PREFERENCE = [ - # TODO: Write general description for UNRESTRICTED - UNRESTRICTED = 'UNRESTRICTED'.freeze, - - # TODO: Write general description for IMMEDIATE_PAYMENT_REQUIRED - IMMEDIATE_PAYMENT_REQUIRED = 'IMMEDIATE_PAYMENT_REQUIRED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/payer.rb b/lib/pay_pal_restap_is/models/payer.rb deleted file mode 100644 index 503795b..0000000 --- a/lib/pay_pal_restap_is/models/payer.rb +++ /dev/null @@ -1,120 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Payer Model. - class Payer < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :payer_id - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # The stand-alone date, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent - # special legal values, such as a date of birth, you should use dates with - # no associated time or time-zone data. Whenever possible, use the standard - # `date_time` type. This regular expression does not validate all dates. For - # example, February 31 is valid and nothing is known about leap years. - # @return [String] - attr_accessor :birth_date - - # The tax ID of the customer. The customer is also known as the payer. Both - # `tax_id` and `tax_id_type` are required. - # @return [TaxInfo] - attr_accessor :tax_info - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['payer_id'] = 'payer_id' - @_hash['name'] = 'name' - @_hash['phone'] = 'phone' - @_hash['birth_date'] = 'birth_date' - @_hash['tax_info'] = 'tax_info' - @_hash['address'] = 'address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - payer_id - name - phone - birth_date - tax_info - address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, payer_id: SKIP, name: SKIP, phone: SKIP, - birth_date: SKIP, tax_info: SKIP, address: SKIP) - @email_address = email_address unless email_address == SKIP - @payer_id = payer_id unless payer_id == SKIP - @name = name unless name == SKIP - @phone = phone unless phone == SKIP - @birth_date = birth_date unless birth_date == SKIP - @tax_info = tax_info unless tax_info == SKIP - @address = address unless address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - birth_date = hash.key?('birth_date') ? hash['birth_date'] : SKIP - tax_info = TaxInfo.from_hash(hash['tax_info']) if hash['tax_info'] - address = Address.from_hash(hash['address']) if hash['address'] - - # Create object from extracted values. - Payer.new(email_address: email_address, - payer_id: payer_id, - name: name, - phone: phone, - birth_date: birth_date, - tax_info: tax_info, - address: address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payer_base.rb b/lib/pay_pal_restap_is/models/payer_base.rb deleted file mode 100644 index bc4d30a..0000000 --- a/lib/pay_pal_restap_is/models/payer_base.rb +++ /dev/null @@ -1,64 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The customer who approves and pays for the order. The customer is also known - # as the payer. - class PayerBase < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :payer_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['payer_id'] = 'payer_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - payer_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, payer_id: SKIP) - @email_address = email_address unless email_address == SKIP - @payer_id = payer_id unless payer_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP - - # Create object from extracted values. - PayerBase.new(email_address: email_address, - payer_id: payer_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_advice_code.rb b/lib/pay_pal_restap_is/models/payment_advice_code.rb deleted file mode 100644 index 71bfdc4..0000000 --- a/lib/pay_pal_restap_is/models/payment_advice_code.rb +++ /dev/null @@ -1,30 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The declined payment transactions might have payment advice codes. The card - # networks, like Visa and Mastercard, return payment advice codes. - class PaymentAdviceCode - PAYMENT_ADVICE_CODE = [ - # TODO: Write general description for ENUM_01 - ENUM_01 = '01'.freeze, - - # TODO: Write general description for ENUM_02 - ENUM_02 = '02'.freeze, - - # TODO: Write general description for ENUM_03 - ENUM_03 = '03'.freeze, - - # TODO: Write general description for ENUM_21 - ENUM_21 = '21'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_authorization.rb b/lib/pay_pal_restap_is/models/payment_authorization.rb deleted file mode 100644 index bf66ded..0000000 --- a/lib/pay_pal_restap_is/models/payment_authorization.rb +++ /dev/null @@ -1,212 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The authorized payment transaction. - class PaymentAuthorization < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status for the authorized payment. - # @return [AuthorizationStatus] - attr_accessor :status - - # The details of the authorized payment status. - # @return [AuthorizationStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the authorized payment. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :network_transaction_reference - - # The level of protection offered as defined by [PayPal Seller Protection - # for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtection] - attr_accessor :seller_protection - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :expiration_time - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # The supplementary data. - # @return [PaymentSupplementaryData] - attr_accessor :supplementary_data - - # The details for the merchant who receives the funds and fulfills the - # order. The merchant is also known as the payee. - # @return [Payee] - attr_accessor :payee - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['seller_protection'] = 'seller_protection' - @_hash['expiration_time'] = 'expiration_time' - @_hash['links'] = 'links' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash['supplementary_data'] = 'supplementary_data' - @_hash['payee'] = 'payee' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - network_transaction_reference - seller_protection - expiration_time - links - create_time - update_time - supplementary_data - payee - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - network_transaction_reference: SKIP, seller_protection: SKIP, - expiration_time: SKIP, links: SKIP, create_time: SKIP, - update_time: SKIP, supplementary_data: SKIP, payee: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @seller_protection = seller_protection unless seller_protection == SKIP - @expiration_time = expiration_time unless expiration_time == SKIP - @links = links unless links == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - @supplementary_data = supplementary_data unless supplementary_data == SKIP - @payee = payee unless payee == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = AuthorizationStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReference.from_hash(hash['network_transaction_reference']) - end - seller_protection = SellerProtection.from_hash(hash['seller_protection']) if - hash['seller_protection'] - expiration_time = - hash.key?('expiration_time') ? hash['expiration_time'] : SKIP - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - supplementary_data = PaymentSupplementaryData.from_hash(hash['supplementary_data']) if - hash['supplementary_data'] - payee = Payee.from_hash(hash['payee']) if hash['payee'] - - # Create object from extracted values. - PaymentAuthorization.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - network_transaction_reference: network_transaction_reference, - seller_protection: seller_protection, - expiration_time: expiration_time, - links: links, - create_time: create_time, - update_time: update_time, - supplementary_data: supplementary_data, - payee: payee) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_collection.rb b/lib/pay_pal_restap_is/models/payment_collection.rb deleted file mode 100644 index f5ec4f8..0000000 --- a/lib/pay_pal_restap_is/models/payment_collection.rb +++ /dev/null @@ -1,99 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The collection of payments, or transactions, for a purchase unit in an - # order. For example, authorized payments, captured payments, and refunds. - class PaymentCollection < BaseModel - SKIP = Object.new - private_constant :SKIP - - # An array of authorized payments for a purchase unit. A purchase unit can - # have zero or more authorized payments. - # @return [Array[AuthorizationWithAdditionalData]] - attr_accessor :authorizations - - # An array of captured payments for a purchase unit. A purchase unit can - # have zero or more captured payments. - # @return [Array[Capture]] - attr_accessor :captures - - # An array of refunds for a purchase unit. A purchase unit can have zero or - # more refunds. - # @return [Array[Refund]] - attr_accessor :refunds - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['authorizations'] = 'authorizations' - @_hash['captures'] = 'captures' - @_hash['refunds'] = 'refunds' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - authorizations - captures - refunds - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(authorizations: SKIP, captures: SKIP, refunds: SKIP) - @authorizations = authorizations unless authorizations == SKIP - @captures = captures unless captures == SKIP - @refunds = refunds unless refunds == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - # Parameter is an array, so we need to iterate through it - authorizations = nil - unless hash['authorizations'].nil? - authorizations = [] - hash['authorizations'].each do |structure| - authorizations << (AuthorizationWithAdditionalData.from_hash(structure) if structure) - end - end - - authorizations = SKIP unless hash.key?('authorizations') - # Parameter is an array, so we need to iterate through it - captures = nil - unless hash['captures'].nil? - captures = [] - hash['captures'].each do |structure| - captures << (Capture.from_hash(structure) if structure) - end - end - - captures = SKIP unless hash.key?('captures') - # Parameter is an array, so we need to iterate through it - refunds = nil - unless hash['refunds'].nil? - refunds = [] - hash['refunds'].each do |structure| - refunds << (Refund.from_hash(structure) if structure) - end - end - - refunds = SKIP unless hash.key?('refunds') - - # Create object from extracted values. - PaymentCollection.new(authorizations: authorizations, - captures: captures, - refunds: refunds) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_initiator.rb b/lib/pay_pal_restap_is/models/payment_initiator.rb deleted file mode 100644 index c7af62b..0000000 --- a/lib/pay_pal_restap_is/models/payment_initiator.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The person or party who initiated or triggered the payment. - class PaymentInitiator - PAYMENT_INITIATOR = [ - # TODO: Write general description for CUSTOMER - CUSTOMER = 'CUSTOMER'.freeze, - - # TODO: Write general description for MERCHANT - MERCHANT = 'MERCHANT'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_instruction.rb b/lib/pay_pal_restap_is/models/payment_instruction.rb deleted file mode 100644 index 0696350..0000000 --- a/lib/pay_pal_restap_is/models/payment_instruction.rb +++ /dev/null @@ -1,105 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Any additional payment instructions to be consider during payment - # processing. This processing instruction is applicable for Capturing an order - # or Authorizing an Order. - class PaymentInstruction < BaseModel - SKIP = Object.new - private_constant :SKIP - - # An array of various fees, commissions, tips, or donations. This field is - # only applicable to merchants that been enabled for PayPal Complete - # Payments Platform for Marketplaces and Platforms capability. - # @return [Array[PlatformFee]] - attr_accessor :platform_fees - - # The funds that are held on behalf of the merchant. - # @return [DisbursementMode] - attr_accessor :disbursement_mode - - # This field is only enabled for selected merchants/partners to use and - # provides the ability to trigger a specific pricing rate/plan for a payment - # transaction. The list of eligible 'payee_pricing_tier_id' would be - # provided to you by your Account Manager. Specifying values other than the - # one provided to you by your account manager would result in an error. - # @return [String] - attr_accessor :payee_pricing_tier_id - - # FX identifier generated returned by PayPal to be used for payment - # processing in order to honor FX rate (for eligible integrations) to be - # used when amount is settled/received into the payee account. - # @return [String] - attr_accessor :payee_receivable_fx_rate_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['platform_fees'] = 'platform_fees' - @_hash['disbursement_mode'] = 'disbursement_mode' - @_hash['payee_pricing_tier_id'] = 'payee_pricing_tier_id' - @_hash['payee_receivable_fx_rate_id'] = 'payee_receivable_fx_rate_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - platform_fees - disbursement_mode - payee_pricing_tier_id - payee_receivable_fx_rate_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(platform_fees: SKIP, - disbursement_mode: DisbursementMode::INSTANT, - payee_pricing_tier_id: SKIP, - payee_receivable_fx_rate_id: SKIP) - @platform_fees = platform_fees unless platform_fees == SKIP - @disbursement_mode = disbursement_mode unless disbursement_mode == SKIP - @payee_pricing_tier_id = payee_pricing_tier_id unless payee_pricing_tier_id == SKIP - unless payee_receivable_fx_rate_id == SKIP - @payee_receivable_fx_rate_id = - payee_receivable_fx_rate_id - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - # Parameter is an array, so we need to iterate through it - platform_fees = nil - unless hash['platform_fees'].nil? - platform_fees = [] - hash['platform_fees'].each do |structure| - platform_fees << (PlatformFee.from_hash(structure) if structure) - end - end - - platform_fees = SKIP unless hash.key?('platform_fees') - disbursement_mode = - hash['disbursement_mode'] ||= DisbursementMode::INSTANT - payee_pricing_tier_id = - hash.key?('payee_pricing_tier_id') ? hash['payee_pricing_tier_id'] : SKIP - payee_receivable_fx_rate_id = - hash.key?('payee_receivable_fx_rate_id') ? hash['payee_receivable_fx_rate_id'] : SKIP - - # Create object from extracted values. - PaymentInstruction.new(platform_fees: platform_fees, - disbursement_mode: disbursement_mode, - payee_pricing_tier_id: payee_pricing_tier_id, - payee_receivable_fx_rate_id: payee_receivable_fx_rate_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_method_preference.rb b/lib/pay_pal_restap_is/models/payment_method_preference.rb deleted file mode 100644 index 970f817..0000000 --- a/lib/pay_pal_restap_is/models/payment_method_preference.rb +++ /dev/null @@ -1,72 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The customer and merchant payment preferences. - class PaymentMethodPreference < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The merchant-preferred payment methods. - # @return [PayeePaymentMethodPreference] - attr_accessor :payee_preferred - - # NACHA (the regulatory body governing the ACH network) requires that API - # callers (merchants, partners) obtain the consumer’s explicit authorization - # before initiating a transaction. To stay compliant, you’ll need to make - # sure that you retain a compliant authorization for each transaction that - # you originate to the ACH Network using this API. ACH transactions are - # categorized (using SEC codes) by how you capture authorization from the - # Receiver (the person whose bank account is being debited or credited). - # PayPal supports the following SEC codes. - # @return [StandardEntryClassCode] - attr_accessor :standard_entry_class_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payee_preferred'] = 'payee_preferred' - @_hash['standard_entry_class_code'] = 'standard_entry_class_code' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payee_preferred - standard_entry_class_code - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payee_preferred: PayeePaymentMethodPreference::UNRESTRICTED, - standard_entry_class_code: StandardEntryClassCode::WEB) - @payee_preferred = payee_preferred unless payee_preferred == SKIP - unless standard_entry_class_code == SKIP - @standard_entry_class_code = - standard_entry_class_code - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payee_preferred = - hash['payee_preferred'] ||= PayeePaymentMethodPreference::UNRESTRICTED - standard_entry_class_code = - hash['standard_entry_class_code'] ||= StandardEntryClassCode::WEB - - # Create object from extracted values. - PaymentMethodPreference.new(payee_preferred: payee_preferred, - standard_entry_class_code: standard_entry_class_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_source.rb b/lib/pay_pal_restap_is/models/payment_source.rb deleted file mode 100644 index 730a62f..0000000 --- a/lib/pay_pal_restap_is/models/payment_source.rb +++ /dev/null @@ -1,187 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment source definition. - class PaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to use to fund a payment. Can be a credit or debit - # card.
Note: Passing card number, cvv and - # expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by - # which you do not have to take on the PCI SAQ D burden by - # using hosted fields - refer to this - # Integration Guide*.
- # @return [CardRequest] - attr_accessor :card - - # The tokenized payment source to fund a payment. - # @return [Token] - attr_accessor :token - - # A resource that identifies a PayPal Wallet is used for payment. - # @return [PayPalWallet] - attr_accessor :paypal - - # Information needed to pay using Bancontact. - # @return [BancontactPaymentRequest] - attr_accessor :bancontact - - # Information needed to pay using BLIK. - # @return [BLIKPaymentRequest] - attr_accessor :blik - - # Information needed to pay using eps. - # @return [EPSPaymentRequest] - attr_accessor :eps - - # Information needed to pay using giropay. - # @return [GiropayPaymentRequest] - attr_accessor :giropay - - # Information needed to pay using iDEAL. - # @return [IDEALPaymentRequest] - attr_accessor :ideal - - # Information needed to pay using MyBank. - # @return [MyBankPaymentRequest] - attr_accessor :mybank - - # Information needed to pay using P24 (Przelewy24). - # @return [P24PaymentRequest] - attr_accessor :p24 - - # Information needed to pay using Sofort. - # @return [SofortPaymentRequest] - attr_accessor :sofort - - # Information needed to pay using Trustly. - # @return [TrustlyPaymentRequest] - attr_accessor :trustly - - # Information needed to pay using ApplePay. - # @return [ApplePayRequest] - attr_accessor :apple_pay - - # Information needed to pay using Google Pay. - # @return [GooglePayRequest] - attr_accessor :google_pay - - # Information needed to pay using Venmo. - # @return [VenmoWalletRequest] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['token'] = 'token' - @_hash['paypal'] = 'paypal' - @_hash['bancontact'] = 'bancontact' - @_hash['blik'] = 'blik' - @_hash['eps'] = 'eps' - @_hash['giropay'] = 'giropay' - @_hash['ideal'] = 'ideal' - @_hash['mybank'] = 'mybank' - @_hash['p24'] = 'p24' - @_hash['sofort'] = 'sofort' - @_hash['trustly'] = 'trustly' - @_hash['apple_pay'] = 'apple_pay' - @_hash['google_pay'] = 'google_pay' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - token - paypal - bancontact - blik - eps - giropay - ideal - mybank - p24 - sofort - trustly - apple_pay - google_pay - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, token: SKIP, paypal: SKIP, bancontact: SKIP, - blik: SKIP, eps: SKIP, giropay: SKIP, ideal: SKIP, - mybank: SKIP, p24: SKIP, sofort: SKIP, trustly: SKIP, - apple_pay: SKIP, google_pay: SKIP, venmo: SKIP) - @card = card unless card == SKIP - @token = token unless token == SKIP - @paypal = paypal unless paypal == SKIP - @bancontact = bancontact unless bancontact == SKIP - @blik = blik unless blik == SKIP - @eps = eps unless eps == SKIP - @giropay = giropay unless giropay == SKIP - @ideal = ideal unless ideal == SKIP - @mybank = mybank unless mybank == SKIP - @p24 = p24 unless p24 == SKIP - @sofort = sofort unless sofort == SKIP - @trustly = trustly unless trustly == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @google_pay = google_pay unless google_pay == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardRequest.from_hash(hash['card']) if hash['card'] - token = Token.from_hash(hash['token']) if hash['token'] - paypal = PayPalWallet.from_hash(hash['paypal']) if hash['paypal'] - bancontact = BancontactPaymentRequest.from_hash(hash['bancontact']) if hash['bancontact'] - blik = BLIKPaymentRequest.from_hash(hash['blik']) if hash['blik'] - eps = EPSPaymentRequest.from_hash(hash['eps']) if hash['eps'] - giropay = GiropayPaymentRequest.from_hash(hash['giropay']) if hash['giropay'] - ideal = IDEALPaymentRequest.from_hash(hash['ideal']) if hash['ideal'] - mybank = MyBankPaymentRequest.from_hash(hash['mybank']) if hash['mybank'] - p24 = P24PaymentRequest.from_hash(hash['p24']) if hash['p24'] - sofort = SofortPaymentRequest.from_hash(hash['sofort']) if hash['sofort'] - trustly = TrustlyPaymentRequest.from_hash(hash['trustly']) if hash['trustly'] - apple_pay = ApplePayRequest.from_hash(hash['apple_pay']) if hash['apple_pay'] - google_pay = GooglePayRequest.from_hash(hash['google_pay']) if hash['google_pay'] - venmo = VenmoWalletRequest.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - PaymentSource.new(card: card, - token: token, - paypal: paypal, - bancontact: bancontact, - blik: blik, - eps: eps, - giropay: giropay, - ideal: ideal, - mybank: mybank, - p24: p24, - sofort: sofort, - trustly: trustly, - apple_pay: apple_pay, - google_pay: google_pay, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_source_response.rb b/lib/pay_pal_restap_is/models/payment_source_response.rb deleted file mode 100644 index 1f37676..0000000 --- a/lib/pay_pal_restap_is/models/payment_source_response.rb +++ /dev/null @@ -1,171 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment source used to fund the payment. - class PaymentSourceResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The payment card to use to fund a payment. Card can be a credit or debit - # card. - # @return [CardResponse] - attr_accessor :card - - # The PayPal Wallet response. - # @return [PayPalWalletResponse] - attr_accessor :paypal - - # Information used to pay Bancontact. - # @return [BancontactPaymentObject] - attr_accessor :bancontact - - # Information used to pay using BLIK. - # @return [BLIKPaymentObject] - attr_accessor :blik - - # Information used to pay using eps. - # @return [EPSPaymentObject] - attr_accessor :eps - - # Information needed to pay using giropay. - # @return [GiropayPaymentObject] - attr_accessor :giropay - - # Information used to pay using iDEAL. - # @return [IDEALPaymentObject] - attr_accessor :ideal - - # Information used to pay using MyBank. - # @return [MyBankPaymentObject] - attr_accessor :mybank - - # Information used to pay using P24(Przelewy24). - # @return [P24PaymentObject] - attr_accessor :p24 - - # Information used to pay using Sofort. - # @return [SofortPaymentObject] - attr_accessor :sofort - - # Information needed to pay using Trustly. - # @return [TrustlyPaymentObject] - attr_accessor :trustly - - # Information needed to pay using ApplePay. - # @return [ApplePayPaymentObject] - attr_accessor :apple_pay - - # Google Pay Wallet payment data. - # @return [GooglePayWalletResponse] - attr_accessor :google_pay - - # Venmo wallet response. - # @return [VenmoWalletResponse] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['paypal'] = 'paypal' - @_hash['bancontact'] = 'bancontact' - @_hash['blik'] = 'blik' - @_hash['eps'] = 'eps' - @_hash['giropay'] = 'giropay' - @_hash['ideal'] = 'ideal' - @_hash['mybank'] = 'mybank' - @_hash['p24'] = 'p24' - @_hash['sofort'] = 'sofort' - @_hash['trustly'] = 'trustly' - @_hash['apple_pay'] = 'apple_pay' - @_hash['google_pay'] = 'google_pay' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - paypal - bancontact - blik - eps - giropay - ideal - mybank - p24 - sofort - trustly - apple_pay - google_pay - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, paypal: SKIP, bancontact: SKIP, blik: SKIP, - eps: SKIP, giropay: SKIP, ideal: SKIP, mybank: SKIP, - p24: SKIP, sofort: SKIP, trustly: SKIP, apple_pay: SKIP, - google_pay: SKIP, venmo: SKIP) - @card = card unless card == SKIP - @paypal = paypal unless paypal == SKIP - @bancontact = bancontact unless bancontact == SKIP - @blik = blik unless blik == SKIP - @eps = eps unless eps == SKIP - @giropay = giropay unless giropay == SKIP - @ideal = ideal unless ideal == SKIP - @mybank = mybank unless mybank == SKIP - @p24 = p24 unless p24 == SKIP - @sofort = sofort unless sofort == SKIP - @trustly = trustly unless trustly == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @google_pay = google_pay unless google_pay == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardResponse.from_hash(hash['card']) if hash['card'] - paypal = PayPalWalletResponse.from_hash(hash['paypal']) if hash['paypal'] - bancontact = BancontactPaymentObject.from_hash(hash['bancontact']) if hash['bancontact'] - blik = BLIKPaymentObject.from_hash(hash['blik']) if hash['blik'] - eps = EPSPaymentObject.from_hash(hash['eps']) if hash['eps'] - giropay = GiropayPaymentObject.from_hash(hash['giropay']) if hash['giropay'] - ideal = IDEALPaymentObject.from_hash(hash['ideal']) if hash['ideal'] - mybank = MyBankPaymentObject.from_hash(hash['mybank']) if hash['mybank'] - p24 = P24PaymentObject.from_hash(hash['p24']) if hash['p24'] - sofort = SofortPaymentObject.from_hash(hash['sofort']) if hash['sofort'] - trustly = TrustlyPaymentObject.from_hash(hash['trustly']) if hash['trustly'] - apple_pay = ApplePayPaymentObject.from_hash(hash['apple_pay']) if hash['apple_pay'] - google_pay = GooglePayWalletResponse.from_hash(hash['google_pay']) if hash['google_pay'] - venmo = VenmoWalletResponse.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - PaymentSourceResponse.new(card: card, - paypal: paypal, - bancontact: bancontact, - blik: blik, - eps: eps, - giropay: giropay, - ideal: ideal, - mybank: mybank, - p24: p24, - sofort: sofort, - trustly: trustly, - apple_pay: apple_pay, - google_pay: google_pay, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_supplementary_data.rb b/lib/pay_pal_restap_is/models/payment_supplementary_data.rb deleted file mode 100644 index d661eee..0000000 --- a/lib/pay_pal_restap_is/models/payment_supplementary_data.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The supplementary data. - class PaymentSupplementaryData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Identifiers related to a specific resource. - # @return [RelatedIdentifiers] - attr_accessor :related_ids - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['related_ids'] = 'related_ids' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - related_ids - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(related_ids: SKIP) - @related_ids = related_ids unless related_ids == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - related_ids = RelatedIdentifiers.from_hash(hash['related_ids']) if hash['related_ids'] - - # Create object from extracted values. - PaymentSupplementaryData.new(related_ids: related_ids) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_token_request.rb b/lib/pay_pal_restap_is/models/payment_token_request.rb deleted file mode 100644 index 491b6bb..0000000 --- a/lib/pay_pal_restap_is/models/payment_token_request.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Payment Token Request where the `source` defines the type of instrument to - # be stored. - class PaymentTokenRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Customer in merchant's or partner's system of records. - # @return [CustomerRequest] - attr_accessor :customer - - # The payment method to vault with the instrument details. - # @return [PaymentTokenRequestPaymentSource] - attr_accessor :payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['payment_source'] = 'payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_source:, customer: SKIP) - @customer = customer unless customer == SKIP - @payment_source = payment_source - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_source = PaymentTokenRequestPaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] - - # Create object from extracted values. - PaymentTokenRequest.new(payment_source: payment_source, - customer: customer) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_token_request_card.rb b/lib/pay_pal_restap_is/models/payment_token_request_card.rb deleted file mode 100644 index 5ca9019..0000000 --- a/lib/pay_pal_restap_is/models/payment_token_request_card.rb +++ /dev/null @@ -1,134 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A Resource representing a request to vault a Card. - class PaymentTokenRequestCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The primary account number (PAN) for the payment card. - # @return [String] - attr_accessor :number - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # The three- or four-digit security code of the card. Also known as the CVV, - # CVC, CVN, CVE, or CID. This parameter cannot be present in the request - # when `payment_initiator=MERCHANT`. - # @return [String] - attr_accessor :security_code - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Object] - attr_accessor :network_transaction_reference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['number'] = 'number' - @_hash['expiry'] = 'expiry' - @_hash['security_code'] = 'security_code' - @_hash['type'] = 'type' - @_hash['brand'] = 'brand' - @_hash['billing_address'] = 'billing_address' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - number - expiry - security_code - type - brand - billing_address - network_transaction_reference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, - type: SKIP, brand: SKIP, billing_address: SKIP, - network_transaction_reference: SKIP) - @name = name unless name == SKIP - @number = number unless number == SKIP - @expiry = expiry unless expiry == SKIP - @security_code = security_code unless security_code == SKIP - @type = type unless type == SKIP - @brand = brand unless brand == SKIP - @billing_address = billing_address unless billing_address == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - number = hash.key?('number') ? hash['number'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - security_code = hash.key?('security_code') ? hash['security_code'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - network_transaction_reference = - hash.key?('network_transaction_reference') ? hash['network_transaction_reference'] : SKIP - - # Create object from extracted values. - PaymentTokenRequestCard.new(name: name, - number: number, - expiry: expiry, - security_code: security_code, - type: type, - brand: brand, - billing_address: billing_address, - network_transaction_reference: network_transaction_reference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb b/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb deleted file mode 100644 index 2100e0c..0000000 --- a/lib/pay_pal_restap_is/models/payment_token_request_payment_source.rb +++ /dev/null @@ -1,59 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment method to vault with the instrument details. - class PaymentTokenRequestPaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # A Resource representing a request to vault a Card. - # @return [PaymentTokenRequestCard] - attr_accessor :card - - # The Tokenized Payment Source representing a Request to Vault a Token. - # @return [VaultTokenRequest] - attr_accessor :token - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['token'] = 'token' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - token - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, token: SKIP) - @card = card unless card == SKIP - @token = token unless token == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = PaymentTokenRequestCard.from_hash(hash['card']) if hash['card'] - token = VaultTokenRequest.from_hash(hash['token']) if hash['token'] - - # Create object from extracted values. - PaymentTokenRequestPaymentSource.new(card: card, - token: token) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_token_response.rb b/lib/pay_pal_restap_is/models/payment_token_response.rb deleted file mode 100644 index ce079fe..0000000 --- a/lib/pay_pal_restap_is/models/payment_token_response.rb +++ /dev/null @@ -1,87 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Full representation of a saved payment token. - class PaymentTokenResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the vault token. - # @return [String] - attr_accessor :id - - # Customer in merchant's or partner's system of records. - # @return [CustomerRequest] - attr_accessor :customer - - # The vaulted payment method details. - # @return [PaymentTokenResponsePaymentSource] - attr_accessor :payment_source - - # An array of related [HATEOAS links](/api/rest/responses/#hateoas). - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['customer'] = 'customer' - @_hash['payment_source'] = 'payment_source' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - customer - payment_source - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, customer: SKIP, payment_source: SKIP, links: SKIP) - @id = id unless id == SKIP - @customer = customer unless customer == SKIP - @payment_source = payment_source unless payment_source == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] - payment_source = PaymentTokenResponsePaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - PaymentTokenResponse.new(id: id, - customer: customer, - payment_source: payment_source, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb b/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb deleted file mode 100644 index eb2c50d..0000000 --- a/lib/pay_pal_restap_is/models/payment_token_response_payment_source.rb +++ /dev/null @@ -1,87 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The vaulted payment method details. - class PaymentTokenResponsePaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Full representation of a Card Payment Token including network token. - # @return [CardPaymentToken] - attr_accessor :card - - # Full representation of a Card Payment Token including network token. - # @return [PayPalPaymentToken] - attr_accessor :paypal - - # Full representation of a Card Payment Token including network token. - # @return [VenmoPaymentToken] - attr_accessor :venmo - - # A resource representing a response for Apple Pay. - # @return [ApplePayPaymentToken] - attr_accessor :apple_pay - - # Full representation of a Bank Payment Token. - # @return [BankPaymentToken] - attr_accessor :bank - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['paypal'] = 'paypal' - @_hash['venmo'] = 'venmo' - @_hash['apple_pay'] = 'apple_pay' - @_hash['bank'] = 'bank' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - paypal - venmo - apple_pay - bank - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, paypal: SKIP, venmo: SKIP, apple_pay: SKIP, - bank: SKIP) - @card = card unless card == SKIP - @paypal = paypal unless paypal == SKIP - @venmo = venmo unless venmo == SKIP - @apple_pay = apple_pay unless apple_pay == SKIP - @bank = bank unless bank == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardPaymentToken.from_hash(hash['card']) if hash['card'] - paypal = PayPalPaymentToken.from_hash(hash['paypal']) if hash['paypal'] - venmo = VenmoPaymentToken.from_hash(hash['venmo']) if hash['venmo'] - apple_pay = ApplePayPaymentToken.from_hash(hash['apple_pay']) if hash['apple_pay'] - bank = BankPaymentToken.from_hash(hash['bank']) if hash['bank'] - - # Create object from extracted values. - PaymentTokenResponsePaymentSource.new(card: card, - paypal: paypal, - venmo: venmo, - apple_pay: apple_pay, - bank: bank) - end - end -end diff --git a/lib/pay_pal_restap_is/models/phone.rb b/lib/pay_pal_restap_is/models/phone.rb deleted file mode 100644 index f8cce01..0000000 --- a/lib/pay_pal_restap_is/models/phone.rb +++ /dev/null @@ -1,77 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The phone number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - class Phone < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The country calling code (CC), in its canonical international [E.164 - # numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The - # combined length of the CC and the national number must not be greater than - # 15 digits. The national number consists of a national destination code - # (NDC) and subscriber number (SN). - # @return [String] - attr_accessor :country_code - - # The national number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of - # the country calling code (CC) and the national number must not be greater - # than 15 digits. The national number consists of a national destination - # code (NDC) and subscriber number (SN). - # @return [String] - attr_accessor :national_number - - # The extension number. - # @return [String] - attr_accessor :extension_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['country_code'] = 'country_code' - @_hash['national_number'] = 'national_number' - @_hash['extension_number'] = 'extension_number' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - extension_number - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(country_code:, national_number:, extension_number: SKIP) - @country_code = country_code - @national_number = national_number - @extension_number = extension_number unless extension_number == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - country_code = hash.key?('country_code') ? hash['country_code'] : nil - national_number = - hash.key?('national_number') ? hash['national_number'] : nil - extension_number = - hash.key?('extension_number') ? hash['extension_number'] : SKIP - - # Create object from extracted values. - Phone.new(country_code: country_code, - national_number: national_number, - extension_number: extension_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/phone_number.rb b/lib/pay_pal_restap_is/models/phone_number.rb deleted file mode 100644 index 2336277..0000000 --- a/lib/pay_pal_restap_is/models/phone_number.rb +++ /dev/null @@ -1,54 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - class PhoneNumber < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The national number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of - # the country calling code (CC) and the national number must not be greater - # than 15 digits. The national number consists of a national destination - # code (NDC) and subscriber number (SN). - # @return [String] - attr_accessor :national_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['national_number'] = 'national_number' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(national_number:) - @national_number = national_number - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - national_number = - hash.key?('national_number') ? hash['national_number'] : nil - - # Create object from extracted values. - PhoneNumber.new(national_number: national_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb b/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb deleted file mode 100644 index 9a832b1..0000000 --- a/lib/pay_pal_restap_is/models/phone_number_with_country_code.rb +++ /dev/null @@ -1,66 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - class PhoneNumberWithCountryCode < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The country calling code (CC), in its canonical international [E.164 - # numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The - # combined length of the CC and the national number must not be greater than - # 15 digits. The national number consists of a national destination code - # (NDC) and subscriber number (SN). - # @return [String] - attr_accessor :country_code - - # The national number, in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of - # the country calling code (CC) and the national number must not be greater - # than 15 digits. The national number consists of a national destination - # code (NDC) and subscriber number (SN). - # @return [String] - attr_accessor :national_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['country_code'] = 'country_code' - @_hash['national_number'] = 'national_number' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(country_code:, national_number:) - @country_code = country_code - @national_number = national_number - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - country_code = hash.key?('country_code') ? hash['country_code'] : nil - national_number = - hash.key?('national_number') ? hash['national_number'] : nil - - # Create object from extracted values. - PhoneNumberWithCountryCode.new(country_code: country_code, - national_number: national_number) - end - end -end diff --git a/lib/pay_pal_restap_is/models/phone_type.rb b/lib/pay_pal_restap_is/models/phone_type.rb deleted file mode 100644 index d19f048..0000000 --- a/lib/pay_pal_restap_is/models/phone_type.rb +++ /dev/null @@ -1,32 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The phone type. - class PhoneType - PHONE_TYPE = [ - # TODO: Write general description for FAX - FAX = 'FAX'.freeze, - - # TODO: Write general description for HOME - HOME = 'HOME'.freeze, - - # TODO: Write general description for MOBILE - MOBILE = 'MOBILE'.freeze, - - # TODO: Write general description for OTHER - OTHER = 'OTHER'.freeze, - - # TODO: Write general description for PAGER - PAGER = 'PAGER'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/phone_with_type.rb b/lib/pay_pal_restap_is/models/phone_with_type.rb deleted file mode 100644 index 065affc..0000000 --- a/lib/pay_pal_restap_is/models/phone_with_type.rb +++ /dev/null @@ -1,59 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The phone information. - class PhoneWithType < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The phone type. - # @return [PhoneType] - attr_accessor :phone_type - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumber] - attr_accessor :phone_number - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['phone_type'] = 'phone_type' - @_hash['phone_number'] = 'phone_number' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - phone_type - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(phone_number:, phone_type: SKIP) - @phone_type = phone_type unless phone_type == SKIP - @phone_number = phone_number - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] - phone_type = hash.key?('phone_type') ? hash['phone_type'] : SKIP - - # Create object from extracted values. - PhoneWithType.new(phone_number: phone_number, - phone_type: phone_type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/platform_fee.rb b/lib/pay_pal_restap_is/models/platform_fee.rb deleted file mode 100644 index a6b617b..0000000 --- a/lib/pay_pal_restap_is/models/platform_fee.rb +++ /dev/null @@ -1,63 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The platform or partner fee, commission, or brokerage fee that is associated - # with the transaction. Not a separate or isolated transaction leg from the - # external perspective. The platform fee is limited in scope and is always - # associated with the original payment for the purchase unit. - class PlatformFee < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The details for the merchant who receives the funds and fulfills the - # order. The merchant is also known as the payee. - # @return [PayeeBase] - attr_accessor :payee - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['amount'] = 'amount' - @_hash['payee'] = 'payee' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - payee - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(amount:, payee: SKIP) - @amount = amount - @payee = payee unless payee == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - amount = Money.from_hash(hash['amount']) if hash['amount'] - payee = PayeeBase.from_hash(hash['payee']) if hash['payee'] - - # Create object from extracted values. - PlatformFee.new(amount: amount, - payee: payee) - end - end -end diff --git a/lib/pay_pal_restap_is/models/processing_instruction.rb b/lib/pay_pal_restap_is/models/processing_instruction.rb deleted file mode 100644 index 64100d7..0000000 --- a/lib/pay_pal_restap_is/models/processing_instruction.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The instruction to process an order. - class ProcessingInstruction - PROCESSING_INSTRUCTION = [ - # TODO: Write general description for ORDER_COMPLETE_ON_PAYMENT_APPROVAL - ORDER_COMPLETE_ON_PAYMENT_APPROVAL = 'ORDER_COMPLETE_ON_PAYMENT_APPROVAL'.freeze, - - # TODO: Write general description for NO_INSTRUCTION - NO_INSTRUCTION = 'NO_INSTRUCTION'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/processor_response.rb b/lib/pay_pal_restap_is/models/processor_response.rb deleted file mode 100644 index 124d44b..0000000 --- a/lib/pay_pal_restap_is/models/processor_response.rb +++ /dev/null @@ -1,83 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The processor response information for payment requests, such as direct - # credit card transactions. - class ProcessorResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The address verification code for Visa, Discover, Mastercard, or American - # Express transactions. - # @return [AVSCode] - attr_accessor :avs_code - - # The card verification value code for for Visa, Discover, Mastercard, or - # American Express. - # @return [CVVCode] - attr_accessor :cvv_code - - # Processor response code for the non-PayPal payment processor errors. - # @return [ProcessorResponseCode] - attr_accessor :response_code - - # The declined payment transactions might have payment advice codes. The - # card networks, like Visa and Mastercard, return payment advice codes. - # @return [PaymentAdviceCode] - attr_accessor :payment_advice_code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['avs_code'] = 'avs_code' - @_hash['cvv_code'] = 'cvv_code' - @_hash['response_code'] = 'response_code' - @_hash['payment_advice_code'] = 'payment_advice_code' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - avs_code - cvv_code - response_code - payment_advice_code - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(avs_code: SKIP, cvv_code: SKIP, response_code: SKIP, - payment_advice_code: SKIP) - @avs_code = avs_code unless avs_code == SKIP - @cvv_code = cvv_code unless cvv_code == SKIP - @response_code = response_code unless response_code == SKIP - @payment_advice_code = payment_advice_code unless payment_advice_code == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP - cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP - response_code = hash.key?('response_code') ? hash['response_code'] : SKIP - payment_advice_code = - hash.key?('payment_advice_code') ? hash['payment_advice_code'] : SKIP - - # Create object from extracted values. - ProcessorResponse.new(avs_code: avs_code, - cvv_code: cvv_code, - response_code: response_code, - payment_advice_code: payment_advice_code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/processor_response_code.rb b/lib/pay_pal_restap_is/models/processor_response_code.rb deleted file mode 100644 index 520d3fe..0000000 --- a/lib/pay_pal_restap_is/models/processor_response_code.rb +++ /dev/null @@ -1,479 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Processor response code for the non-PayPal payment processor errors. - class ProcessorResponseCode - PROCESSOR_RESPONSE_CODE = [ - # TODO: Write general description for ENUM_0000 - ENUM_0000 = '0000'.freeze, - - # TODO: Write general description for ENUM_00N7 - ENUM_00N7 = '00N7'.freeze, - - # TODO: Write general description for ENUM_0100 - ENUM_0100 = '0100'.freeze, - - # TODO: Write general description for ENUM_0390 - ENUM_0390 = '0390'.freeze, - - # TODO: Write general description for ENUM_0500 - ENUM_0500 = '0500'.freeze, - - # TODO: Write general description for ENUM_0580 - ENUM_0580 = '0580'.freeze, - - # TODO: Write general description for ENUM_0800 - ENUM_0800 = '0800'.freeze, - - # TODO: Write general description for ENUM_0880 - ENUM_0880 = '0880'.freeze, - - # TODO: Write general description for ENUM_0890 - ENUM_0890 = '0890'.freeze, - - # TODO: Write general description for ENUM_0960 - ENUM_0960 = '0960'.freeze, - - # TODO: Write general description for ENUM_0R00 - ENUM_0R00 = '0R00'.freeze, - - # TODO: Write general description for ENUM_1000 - ENUM_1000 = '1000'.freeze, - - # TODO: Write general description for ENUM_10BR - ENUM_10BR = '10BR'.freeze, - - # TODO: Write general description for ENUM_1300 - ENUM_1300 = '1300'.freeze, - - # TODO: Write general description for ENUM_1310 - ENUM_1310 = '1310'.freeze, - - # TODO: Write general description for ENUM_1312 - ENUM_1312 = '1312'.freeze, - - # TODO: Write general description for ENUM_1317 - ENUM_1317 = '1317'.freeze, - - # TODO: Write general description for ENUM_1320 - ENUM_1320 = '1320'.freeze, - - # TODO: Write general description for ENUM_1330 - ENUM_1330 = '1330'.freeze, - - # TODO: Write general description for ENUM_1335 - ENUM_1335 = '1335'.freeze, - - # TODO: Write general description for ENUM_1340 - ENUM_1340 = '1340'.freeze, - - # TODO: Write general description for ENUM_1350 - ENUM_1350 = '1350'.freeze, - - # TODO: Write general description for ENUM_1352 - ENUM_1352 = '1352'.freeze, - - # TODO: Write general description for ENUM_1360 - ENUM_1360 = '1360'.freeze, - - # TODO: Write general description for ENUM_1370 - ENUM_1370 = '1370'.freeze, - - # TODO: Write general description for ENUM_1380 - ENUM_1380 = '1380'.freeze, - - # TODO: Write general description for ENUM_1382 - ENUM_1382 = '1382'.freeze, - - # TODO: Write general description for ENUM_1384 - ENUM_1384 = '1384'.freeze, - - # TODO: Write general description for ENUM_1390 - ENUM_1390 = '1390'.freeze, - - # TODO: Write general description for ENUM_1393 - ENUM_1393 = '1393'.freeze, - - # TODO: Write general description for ENUM_5100 - ENUM_5100 = '5100'.freeze, - - # TODO: Write general description for ENUM_5110 - ENUM_5110 = '5110'.freeze, - - # TODO: Write general description for ENUM_5120 - ENUM_5120 = '5120'.freeze, - - # TODO: Write general description for ENUM_5130 - ENUM_5130 = '5130'.freeze, - - # TODO: Write general description for ENUM_5135 - ENUM_5135 = '5135'.freeze, - - # TODO: Write general description for ENUM_5140 - ENUM_5140 = '5140'.freeze, - - # TODO: Write general description for ENUM_5150 - ENUM_5150 = '5150'.freeze, - - # TODO: Write general description for ENUM_5160 - ENUM_5160 = '5160'.freeze, - - # TODO: Write general description for ENUM_5170 - ENUM_5170 = '5170'.freeze, - - # TODO: Write general description for ENUM_5180 - ENUM_5180 = '5180'.freeze, - - # TODO: Write general description for ENUM_5190 - ENUM_5190 = '5190'.freeze, - - # TODO: Write general description for ENUM_5200 - ENUM_5200 = '5200'.freeze, - - # TODO: Write general description for ENUM_5210 - ENUM_5210 = '5210'.freeze, - - # TODO: Write general description for ENUM_5400 - ENUM_5400 = '5400'.freeze, - - # TODO: Write general description for ENUM_5500 - ENUM_5500 = '5500'.freeze, - - # TODO: Write general description for ENUM_5650 - ENUM_5650 = '5650'.freeze, - - # TODO: Write general description for ENUM_5700 - ENUM_5700 = '5700'.freeze, - - # TODO: Write general description for ENUM_5710 - ENUM_5710 = '5710'.freeze, - - # TODO: Write general description for ENUM_5800 - ENUM_5800 = '5800'.freeze, - - # TODO: Write general description for ENUM_5900 - ENUM_5900 = '5900'.freeze, - - # TODO: Write general description for ENUM_5910 - ENUM_5910 = '5910'.freeze, - - # TODO: Write general description for ENUM_5920 - ENUM_5920 = '5920'.freeze, - - # TODO: Write general description for ENUM_5930 - ENUM_5930 = '5930'.freeze, - - # TODO: Write general description for ENUM_5950 - ENUM_5950 = '5950'.freeze, - - # TODO: Write general description for ENUM_6300 - ENUM_6300 = '6300'.freeze, - - # TODO: Write general description for ENUM_7600 - ENUM_7600 = '7600'.freeze, - - # TODO: Write general description for ENUM_7700 - ENUM_7700 = '7700'.freeze, - - # TODO: Write general description for ENUM_7710 - ENUM_7710 = '7710'.freeze, - - # TODO: Write general description for ENUM_7800 - ENUM_7800 = '7800'.freeze, - - # TODO: Write general description for ENUM_7900 - ENUM_7900 = '7900'.freeze, - - # TODO: Write general description for ENUM_8000 - ENUM_8000 = '8000'.freeze, - - # TODO: Write general description for ENUM_8010 - ENUM_8010 = '8010'.freeze, - - # TODO: Write general description for ENUM_8020 - ENUM_8020 = '8020'.freeze, - - # TODO: Write general description for ENUM_8030 - ENUM_8030 = '8030'.freeze, - - # TODO: Write general description for ENUM_8100 - ENUM_8100 = '8100'.freeze, - - # TODO: Write general description for ENUM_8110 - ENUM_8110 = '8110'.freeze, - - # TODO: Write general description for ENUM_8220 - ENUM_8220 = '8220'.freeze, - - # TODO: Write general description for ENUM_9100 - ENUM_9100 = '9100'.freeze, - - # TODO: Write general description for ENUM_9500 - ENUM_9500 = '9500'.freeze, - - # TODO: Write general description for ENUM_9510 - ENUM_9510 = '9510'.freeze, - - # TODO: Write general description for ENUM_9520 - ENUM_9520 = '9520'.freeze, - - # TODO: Write general description for ENUM_9530 - ENUM_9530 = '9530'.freeze, - - # TODO: Write general description for ENUM_9540 - ENUM_9540 = '9540'.freeze, - - # TODO: Write general description for ENUM_9600 - ENUM_9600 = '9600'.freeze, - - # TODO: Write general description for PCNR - PCNR = 'PCNR'.freeze, - - # TODO: Write general description for PCVV - PCVV = 'PCVV'.freeze, - - # TODO: Write general description for PP06 - PP06 = 'PP06'.freeze, - - # TODO: Write general description for PPRN - PPRN = 'PPRN'.freeze, - - # TODO: Write general description for PPAD - PPAD = 'PPAD'.freeze, - - # TODO: Write general description for PPAB - PPAB = 'PPAB'.freeze, - - # TODO: Write general description for PPAE - PPAE = 'PPAE'.freeze, - - # TODO: Write general description for PPAG - PPAG = 'PPAG'.freeze, - - # TODO: Write general description for PPAI - PPAI = 'PPAI'.freeze, - - # TODO: Write general description for PPAR - PPAR = 'PPAR'.freeze, - - # TODO: Write general description for PPAU - PPAU = 'PPAU'.freeze, - - # TODO: Write general description for PPAV - PPAV = 'PPAV'.freeze, - - # TODO: Write general description for PPAX - PPAX = 'PPAX'.freeze, - - # TODO: Write general description for PPBG - PPBG = 'PPBG'.freeze, - - # TODO: Write general description for PPC2 - PPC2 = 'PPC2'.freeze, - - # TODO: Write general description for PPCE - PPCE = 'PPCE'.freeze, - - # TODO: Write general description for PPCO - PPCO = 'PPCO'.freeze, - - # TODO: Write general description for PPCR - PPCR = 'PPCR'.freeze, - - # TODO: Write general description for PPCT - PPCT = 'PPCT'.freeze, - - # TODO: Write general description for PPCU - PPCU = 'PPCU'.freeze, - - # TODO: Write general description for PPD3 - PPD3 = 'PPD3'.freeze, - - # TODO: Write general description for PPDC - PPDC = 'PPDC'.freeze, - - # TODO: Write general description for PPDI - PPDI = 'PPDI'.freeze, - - # TODO: Write general description for PPDV - PPDV = 'PPDV'.freeze, - - # TODO: Write general description for PPDT - PPDT = 'PPDT'.freeze, - - # TODO: Write general description for PPEF - PPEF = 'PPEF'.freeze, - - # TODO: Write general description for PPEL - PPEL = 'PPEL'.freeze, - - # TODO: Write general description for PPER - PPER = 'PPER'.freeze, - - # TODO: Write general description for PPEX - PPEX = 'PPEX'.freeze, - - # TODO: Write general description for PPFE - PPFE = 'PPFE'.freeze, - - # TODO: Write general description for PPFI - PPFI = 'PPFI'.freeze, - - # TODO: Write general description for PPFR - PPFR = 'PPFR'.freeze, - - # TODO: Write general description for PPFV - PPFV = 'PPFV'.freeze, - - # TODO: Write general description for PPGR - PPGR = 'PPGR'.freeze, - - # TODO: Write general description for PPH1 - PPH1 = 'PPH1'.freeze, - - # TODO: Write general description for PPIF - PPIF = 'PPIF'.freeze, - - # TODO: Write general description for PPII - PPII = 'PPII'.freeze, - - # TODO: Write general description for PPIM - PPIM = 'PPIM'.freeze, - - # TODO: Write general description for PPIT - PPIT = 'PPIT'.freeze, - - # TODO: Write general description for PPLR - PPLR = 'PPLR'.freeze, - - # TODO: Write general description for PPLS - PPLS = 'PPLS'.freeze, - - # TODO: Write general description for PPMB - PPMB = 'PPMB'.freeze, - - # TODO: Write general description for PPMC - PPMC = 'PPMC'.freeze, - - # TODO: Write general description for PPMD - PPMD = 'PPMD'.freeze, - - # TODO: Write general description for PPNC - PPNC = 'PPNC'.freeze, - - # TODO: Write general description for PPNL - PPNL = 'PPNL'.freeze, - - # TODO: Write general description for PPNM - PPNM = 'PPNM'.freeze, - - # TODO: Write general description for PPNT - PPNT = 'PPNT'.freeze, - - # TODO: Write general description for PPPH - PPPH = 'PPPH'.freeze, - - # TODO: Write general description for PPPI - PPPI = 'PPPI'.freeze, - - # TODO: Write general description for PPPM - PPPM = 'PPPM'.freeze, - - # TODO: Write general description for PPQC - PPQC = 'PPQC'.freeze, - - # TODO: Write general description for PPRE - PPRE = 'PPRE'.freeze, - - # TODO: Write general description for PPRF - PPRF = 'PPRF'.freeze, - - # TODO: Write general description for PPRR - PPRR = 'PPRR'.freeze, - - # TODO: Write general description for PPS0 - PPS0 = 'PPS0'.freeze, - - # TODO: Write general description for PPS1 - PPS1 = 'PPS1'.freeze, - - # TODO: Write general description for PPS2 - PPS2 = 'PPS2'.freeze, - - # TODO: Write general description for PPS3 - PPS3 = 'PPS3'.freeze, - - # TODO: Write general description for PPS4 - PPS4 = 'PPS4'.freeze, - - # TODO: Write general description for PPS5 - PPS5 = 'PPS5'.freeze, - - # TODO: Write general description for PPS6 - PPS6 = 'PPS6'.freeze, - - # TODO: Write general description for PPSC - PPSC = 'PPSC'.freeze, - - # TODO: Write general description for PPSD - PPSD = 'PPSD'.freeze, - - # TODO: Write general description for PPSE - PPSE = 'PPSE'.freeze, - - # TODO: Write general description for PPTE - PPTE = 'PPTE'.freeze, - - # TODO: Write general description for PPTF - PPTF = 'PPTF'.freeze, - - # TODO: Write general description for PPTI - PPTI = 'PPTI'.freeze, - - # TODO: Write general description for PPTR - PPTR = 'PPTR'.freeze, - - # TODO: Write general description for PPTT - PPTT = 'PPTT'.freeze, - - # TODO: Write general description for PPTV - PPTV = 'PPTV'.freeze, - - # TODO: Write general description for PPUA - PPUA = 'PPUA'.freeze, - - # TODO: Write general description for PPUC - PPUC = 'PPUC'.freeze, - - # TODO: Write general description for PPUE - PPUE = 'PPUE'.freeze, - - # TODO: Write general description for PPUI - PPUI = 'PPUI'.freeze, - - # TODO: Write general description for PPUP - PPUP = 'PPUP'.freeze, - - # TODO: Write general description for PPUR - PPUR = 'PPUR'.freeze, - - # TODO: Write general description for PPVC - PPVC = 'PPVC'.freeze, - - # TODO: Write general description for PPVE - PPVE = 'PPVE'.freeze, - - # TODO: Write general description for PPVT - PPVT = 'PPVT'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/purchase_unit.rb b/lib/pay_pal_restap_is/models/purchase_unit.rb deleted file mode 100644 index deb9819..0000000 --- a/lib/pay_pal_restap_is/models/purchase_unit.rb +++ /dev/null @@ -1,215 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The purchase unit details. Used to capture required information for the - # payment contract. - class PurchaseUnit < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The API caller-provided external ID for the purchase unit. Required for - # multiple purchase units when you must update the order through `PATCH`. If - # you omit this value and the order contains only one purchase unit, PayPal - # sets this value to `default`.
Note: If there - # are multiple purchase units, reference_id is required for - # each purchase unit.
- # @return [String] - attr_accessor :reference_id - - # The total order amount with an optional breakdown that provides details, - # such as the total item amount, total tax amount, shipping, handling, - # insurance, and discounts, if any.
If you specify `amount.breakdown`, - # the amount equals `item_total` plus `tax_total` plus `shipping` plus - # `handling` plus `insurance` minus `shipping_discount` minus - # discount.
The amount must be a positive number. For listed of - # supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. - # @return [AmountWithBreakdown] - attr_accessor :amount - - # The merchant who receives the funds and fulfills the order. The merchant - # is also known as the payee. - # @return [Payee] - attr_accessor :payee - - # Any additional payment instructions to be consider during payment - # processing. This processing instruction is applicable for Capturing an - # order or Authorizing an Order. - # @return [PaymentInstruction] - attr_accessor :payment_instruction - - # The purchase description. - # @return [String] - attr_accessor :description - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # The API caller-provided external invoice ID for this order. - # @return [String] - attr_accessor :invoice_id - - # The PayPal-generated ID for the purchase unit. This ID appears in both the - # payer's transaction history and the emails that the payer receives. In - # addition, this ID is available in transaction and settlement reports that - # merchants and API callers can use to reconcile transactions. This ID is - # only available when an order is saved by calling - # v2/checkout/orders/id/save. - # @return [String] - attr_accessor :id - - # The payment descriptor on account transactions on the customer's credit - # card statement, that PayPal sends to processors. The maximum length of the - # soft descriptor information that you can pass in the API field is 22 - # characters, in the following format:22 - len(PAYPAL * (8)) - - # len(Descriptor in Payment Receiving Preferences of Merchant - # account + 1)The PAYPAL prefix uses 8 characters.

The - # soft descriptor supports the following ASCII - # characters:
  • Alphanumeric - # characters
  • Dashes
  • Asterisks
  • Periods - # (.)
  • Spaces
For Wallet payments marketplace - # integrations:
  • The merchant descriptor in the Payment Receiving - # Preferences must be the marketplace name.
  • You can't use the - # remaining space to show the customer service number.
  • The remaining - # spaces can be a combination of seller name and country.

For - # unbranded payments (Direct Card) marketplace integrations, use a - # combination of the seller name and phone number. - # @return [String] - attr_accessor :soft_descriptor - - # An array of items that the customer purchases from the merchant. - # @return [Array[Item]] - attr_accessor :items - - # The order shipping details. - # @return [ShippingWithTrackingDetails] - attr_accessor :shipping - - # Supplementary data about a payment. This object passes information that - # can be used to improve risk assessments and processing costs, for example, - # by providing Level 2 and Level 3 payment data. - # @return [SupplementaryData] - attr_accessor :supplementary_data - - # The collection of payments, or transactions, for a purchase unit in an - # order. For example, authorized payments, captured payments, and refunds. - # @return [PaymentCollection] - attr_accessor :payments - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['reference_id'] = 'reference_id' - @_hash['amount'] = 'amount' - @_hash['payee'] = 'payee' - @_hash['payment_instruction'] = 'payment_instruction' - @_hash['description'] = 'description' - @_hash['custom_id'] = 'custom_id' - @_hash['invoice_id'] = 'invoice_id' - @_hash['id'] = 'id' - @_hash['soft_descriptor'] = 'soft_descriptor' - @_hash['items'] = 'items' - @_hash['shipping'] = 'shipping' - @_hash['supplementary_data'] = 'supplementary_data' - @_hash['payments'] = 'payments' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - reference_id - amount - payee - payment_instruction - description - custom_id - invoice_id - id - soft_descriptor - items - shipping - supplementary_data - payments - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(reference_id: SKIP, amount: SKIP, payee: SKIP, - payment_instruction: SKIP, description: SKIP, - custom_id: SKIP, invoice_id: SKIP, id: SKIP, - soft_descriptor: SKIP, items: SKIP, shipping: SKIP, - supplementary_data: SKIP, payments: SKIP) - @reference_id = reference_id unless reference_id == SKIP - @amount = amount unless amount == SKIP - @payee = payee unless payee == SKIP - @payment_instruction = payment_instruction unless payment_instruction == SKIP - @description = description unless description == SKIP - @custom_id = custom_id unless custom_id == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @id = id unless id == SKIP - @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP - @items = items unless items == SKIP - @shipping = shipping unless shipping == SKIP - @supplementary_data = supplementary_data unless supplementary_data == SKIP - @payments = payments unless payments == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - reference_id = hash.key?('reference_id') ? hash['reference_id'] : SKIP - amount = AmountWithBreakdown.from_hash(hash['amount']) if hash['amount'] - payee = Payee.from_hash(hash['payee']) if hash['payee'] - payment_instruction = PaymentInstruction.from_hash(hash['payment_instruction']) if - hash['payment_instruction'] - description = hash.key?('description') ? hash['description'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - id = hash.key?('id') ? hash['id'] : SKIP - soft_descriptor = - hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP - # Parameter is an array, so we need to iterate through it - items = nil - unless hash['items'].nil? - items = [] - hash['items'].each do |structure| - items << (Item.from_hash(structure) if structure) - end - end - - items = SKIP unless hash.key?('items') - shipping = ShippingWithTrackingDetails.from_hash(hash['shipping']) if hash['shipping'] - supplementary_data = SupplementaryData.from_hash(hash['supplementary_data']) if - hash['supplementary_data'] - payments = PaymentCollection.from_hash(hash['payments']) if hash['payments'] - - # Create object from extracted values. - PurchaseUnit.new(reference_id: reference_id, - amount: amount, - payee: payee, - payment_instruction: payment_instruction, - description: description, - custom_id: custom_id, - invoice_id: invoice_id, - id: id, - soft_descriptor: soft_descriptor, - items: items, - shipping: shipping, - supplementary_data: supplementary_data, - payments: payments) - end - end -end diff --git a/lib/pay_pal_restap_is/models/purchase_unit_request.rb b/lib/pay_pal_restap_is/models/purchase_unit_request.rb deleted file mode 100644 index 916e0cd..0000000 --- a/lib/pay_pal_restap_is/models/purchase_unit_request.rb +++ /dev/null @@ -1,193 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The purchase unit request. Includes required information for the payment - # contract. - class PurchaseUnitRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The API caller-provided external ID for the purchase unit. Required for - # multiple purchase units when you must update the order through `PATCH`. If - # you omit this value and the order contains only one purchase unit, PayPal - # sets this value to `default`. - # @return [String] - attr_accessor :reference_id - - # The total order amount with an optional breakdown that provides details, - # such as the total item amount, total tax amount, shipping, handling, - # insurance, and discounts, if any.
If you specify `amount.breakdown`, - # the amount equals `item_total` plus `tax_total` plus `shipping` plus - # `handling` plus `insurance` minus `shipping_discount` minus - # discount.
The amount must be a positive number. For listed of - # supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. - # @return [AmountWithBreakdown] - attr_accessor :amount - - # The merchant who receives the funds and fulfills the order. The merchant - # is also known as the payee. - # @return [Payee] - attr_accessor :payee - - # Any additional payment instructions to be consider during payment - # processing. This processing instruction is applicable for Capturing an - # order or Authorizing an Order. - # @return [PaymentInstruction] - attr_accessor :payment_instruction - - # The purchase description. The maximum length of the character is dependent - # on the type of characters used. The character length is specified assuming - # a US ASCII character. Depending on type of character; (e.g. accented - # character, Japanese characters) the number of characters that that can be - # specified as input might not equal the permissible max length. - # @return [String] - attr_accessor :description - - # The API caller-provided external ID. Used to reconcile client transactions - # with PayPal transactions. Appears in transaction and settlement reports - # but is not visible to the payer. - # @return [String] - attr_accessor :custom_id - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The soft descriptor is the dynamic text used to construct the statement - # descriptor that appears on a payer's card statement.

If an Order is - # paid using the "PayPal Wallet", the statement descriptor will appear in - # following format on the payer's card statement: - # PAYPAL_prefix+(space)+merchant_descriptor+(spa - # ce)+ soft_descriptor
Note: - # The merchant descriptor is the descriptor of the merchant’s payment - # receiving preferences which can be seen by logging into the merchant - # account - # https://www.sandbox.paypal.com/businessprofile/settings/info/editThe PAYPAL prefix uses 8 characters. Only the first 22 - # characters will be displayed in the statement.
For example, - # if:
  • The PayPal prefix toggle is PAYPAL *.
  • The - # merchant descriptor in the profile is Janes Gift.
  • The - # soft descriptor is 800-123-1234.
Then, the statement - # descriptor on the card is PAYPAL * Janes Gift 80. - # @return [String] - attr_accessor :soft_descriptor - - # An array of items that the customer purchases from the merchant. - # @return [Array[Item]] - attr_accessor :items - - # The shipping details. - # @return [ShippingDetails] - attr_accessor :shipping - - # Supplementary data about a payment. This object passes information that - # can be used to improve risk assessments and processing costs, for example, - # by providing Level 2 and Level 3 payment data. - # @return [SupplementaryData] - attr_accessor :supplementary_data - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['reference_id'] = 'reference_id' - @_hash['amount'] = 'amount' - @_hash['payee'] = 'payee' - @_hash['payment_instruction'] = 'payment_instruction' - @_hash['description'] = 'description' - @_hash['custom_id'] = 'custom_id' - @_hash['invoice_id'] = 'invoice_id' - @_hash['soft_descriptor'] = 'soft_descriptor' - @_hash['items'] = 'items' - @_hash['shipping'] = 'shipping' - @_hash['supplementary_data'] = 'supplementary_data' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - reference_id - payee - payment_instruction - description - custom_id - invoice_id - soft_descriptor - items - shipping - supplementary_data - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(amount:, reference_id: SKIP, payee: SKIP, - payment_instruction: SKIP, description: SKIP, - custom_id: SKIP, invoice_id: SKIP, soft_descriptor: SKIP, - items: SKIP, shipping: SKIP, supplementary_data: SKIP) - @reference_id = reference_id unless reference_id == SKIP - @amount = amount - @payee = payee unless payee == SKIP - @payment_instruction = payment_instruction unless payment_instruction == SKIP - @description = description unless description == SKIP - @custom_id = custom_id unless custom_id == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @soft_descriptor = soft_descriptor unless soft_descriptor == SKIP - @items = items unless items == SKIP - @shipping = shipping unless shipping == SKIP - @supplementary_data = supplementary_data unless supplementary_data == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - amount = AmountWithBreakdown.from_hash(hash['amount']) if hash['amount'] - reference_id = hash.key?('reference_id') ? hash['reference_id'] : SKIP - payee = Payee.from_hash(hash['payee']) if hash['payee'] - payment_instruction = PaymentInstruction.from_hash(hash['payment_instruction']) if - hash['payment_instruction'] - description = hash.key?('description') ? hash['description'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - soft_descriptor = - hash.key?('soft_descriptor') ? hash['soft_descriptor'] : SKIP - # Parameter is an array, so we need to iterate through it - items = nil - unless hash['items'].nil? - items = [] - hash['items'].each do |structure| - items << (Item.from_hash(structure) if structure) - end - end - - items = SKIP unless hash.key?('items') - shipping = ShippingDetails.from_hash(hash['shipping']) if hash['shipping'] - supplementary_data = SupplementaryData.from_hash(hash['supplementary_data']) if - hash['supplementary_data'] - - # Create object from extracted values. - PurchaseUnitRequest.new(amount: amount, - reference_id: reference_id, - payee: payee, - payment_instruction: payment_instruction, - description: description, - custom_id: custom_id, - invoice_id: invoice_id, - soft_descriptor: soft_descriptor, - items: items, - shipping: shipping, - supplementary_data: supplementary_data) - end - end -end diff --git a/lib/pay_pal_restap_is/models/reauthorize_request.rb b/lib/pay_pal_restap_is/models/reauthorize_request.rb deleted file mode 100644 index d5f0b75..0000000 --- a/lib/pay_pal_restap_is/models/reauthorize_request.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Reauthorizes an authorized PayPal account payment, by ID. To ensure that - # funds are still available, reauthorize a payment after its initial three-day - # honor period expires. You can reauthorize a payment only once from days four - # to 29.

If 30 days have transpired since the date of the original - # authorization, you must create an authorized payment instead of - # reauthorizing the original authorized payment.

A reauthorized - # payment itself has a new honor period of three days.

You can - # reauthorize an authorized payment once. The allowed amount depends on - # context and geography, for example in US it is up to 115% of the original - # authorized amount, not to exceed an increase of $75 USD.

Supports - # only the `amount` request parameter.
Note: This - # request is currently not supported for Partner use cases.
- class ReauthorizeRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['amount'] = 'amount' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - amount - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(amount: SKIP) - @amount = amount unless amount == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - amount = Money.from_hash(hash['amount']) if hash['amount'] - - # Create object from extracted values. - ReauthorizeRequest.new(amount: amount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund.rb b/lib/pay_pal_restap_is/models/refund.rb deleted file mode 100644 index 8837744..0000000 --- a/lib/pay_pal_restap_is/models/refund.rb +++ /dev/null @@ -1,195 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The refund information. - class Refund < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status of the refund. - # @return [RefundStatus] - attr_accessor :status - - # The details of the refund status. - # @return [RefundStatusDetails] - attr_accessor :status_details - - # The PayPal-generated ID for the refund. - # @return [String] - attr_accessor :id - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. - # @return [String] - attr_accessor :custom_id - - # Reference ID issued for the card transaction. This ID can be used to track - # the transaction across processors, card brands and issuing banks. - # @return [String] - attr_accessor :acquirer_reference_number - - # The reason for the refund. Appears in both the payer's transaction history - # and the emails that the payer receives. - # @return [String] - attr_accessor :note_to_payer - - # The breakdown of the refund. - # @return [SellerPayableBreakdown] - attr_accessor :seller_payable_breakdown - - # The details for the merchant who receives the funds and fulfills the - # order. The merchant is also known as the payee. - # @return [PayeeBase] - attr_accessor :payer - - # An array of related [HATEOAS - # links](/docs/api/reference/api-responses/#hateoas-links). - # @return [Array[LinkDescription]] - attr_accessor :links - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :create_time - - # The date and time, in [Internet date and time - # format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are - # required while fractional seconds are - # optional.
Note: The regular expression - # provides guidance but does not reject all invalid dates.
- # @return [String] - attr_accessor :update_time - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash['id'] = 'id' - @_hash['amount'] = 'amount' - @_hash['invoice_id'] = 'invoice_id' - @_hash['custom_id'] = 'custom_id' - @_hash['acquirer_reference_number'] = 'acquirer_reference_number' - @_hash['note_to_payer'] = 'note_to_payer' - @_hash['seller_payable_breakdown'] = 'seller_payable_breakdown' - @_hash['payer'] = 'payer' - @_hash['links'] = 'links' - @_hash['create_time'] = 'create_time' - @_hash['update_time'] = 'update_time' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - id - amount - invoice_id - custom_id - acquirer_reference_number - note_to_payer - seller_payable_breakdown - payer - links - create_time - update_time - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP, id: SKIP, amount: SKIP, - invoice_id: SKIP, custom_id: SKIP, - acquirer_reference_number: SKIP, note_to_payer: SKIP, - seller_payable_breakdown: SKIP, payer: SKIP, links: SKIP, - create_time: SKIP, update_time: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - @id = id unless id == SKIP - @amount = amount unless amount == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @custom_id = custom_id unless custom_id == SKIP - unless acquirer_reference_number == SKIP - @acquirer_reference_number = - acquirer_reference_number - end - @note_to_payer = note_to_payer unless note_to_payer == SKIP - @seller_payable_breakdown = seller_payable_breakdown unless seller_payable_breakdown == SKIP - @payer = payer unless payer == SKIP - @links = links unless links == SKIP - @create_time = create_time unless create_time == SKIP - @update_time = update_time unless update_time == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = RefundStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - id = hash.key?('id') ? hash['id'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - acquirer_reference_number = - hash.key?('acquirer_reference_number') ? hash['acquirer_reference_number'] : SKIP - note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP - if hash['seller_payable_breakdown'] - seller_payable_breakdown = SellerPayableBreakdown.from_hash(hash['seller_payable_breakdown']) - end - payer = PayeeBase.from_hash(hash['payer']) if hash['payer'] - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - create_time = hash.key?('create_time') ? hash['create_time'] : SKIP - update_time = hash.key?('update_time') ? hash['update_time'] : SKIP - - # Create object from extracted values. - Refund.new(status: status, - status_details: status_details, - id: id, - amount: amount, - invoice_id: invoice_id, - custom_id: custom_id, - acquirer_reference_number: acquirer_reference_number, - note_to_payer: note_to_payer, - seller_payable_breakdown: seller_payable_breakdown, - payer: payer, - links: links, - create_time: create_time, - update_time: update_time) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb b/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb deleted file mode 100644 index a75d34b..0000000 --- a/lib/pay_pal_restap_is/models/refund_incomplete_reason.rb +++ /dev/null @@ -1,20 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The reason why the refund has the `PENDING` or `FAILED` status. - class RefundIncompleteReason - REFUND_INCOMPLETE_REASON = [ - # TODO: Write general description for ECHECK - ECHECK = 'ECHECK'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_payment_instruction.rb b/lib/pay_pal_restap_is/models/refund_payment_instruction.rb deleted file mode 100644 index 86f12fd..0000000 --- a/lib/pay_pal_restap_is/models/refund_payment_instruction.rb +++ /dev/null @@ -1,68 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Any additional payments instructions during refund payment processing. This - # object is only applicable to merchants that have been enabled for PayPal - # Commerce Platform for Marketplaces and Platforms capability. Please speak to - # your account manager if you want to use this capability. - class RefundPaymentInstruction < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Specifies the amount that the API caller will contribute to the refund - # being processed. The amount needs to be lower than platform_fees amount - # originally captured or the amount that is remaining if multiple refunds - # have been processed. This field is only applicable to merchants that have - # been enabled for PayPal Commerce Platform for Marketplaces and Platforms - # capability. Please speak to your account manager if you want to use this - # capability. - # @return [Array[RefundPlatformFee]] - attr_accessor :platform_fees - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['platform_fees'] = 'platform_fees' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - platform_fees - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(platform_fees: SKIP) - @platform_fees = platform_fees unless platform_fees == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - # Parameter is an array, so we need to iterate through it - platform_fees = nil - unless hash['platform_fees'].nil? - platform_fees = [] - hash['platform_fees'].each do |structure| - platform_fees << (RefundPlatformFee.from_hash(structure) if structure) - end - end - - platform_fees = SKIP unless hash.key?('platform_fees') - - # Create object from extracted values. - RefundPaymentInstruction.new(platform_fees: platform_fees) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_platform_fee.rb b/lib/pay_pal_restap_is/models/refund_platform_fee.rb deleted file mode 100644 index f2266dd..0000000 --- a/lib/pay_pal_restap_is/models/refund_platform_fee.rb +++ /dev/null @@ -1,52 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The platform or partner fee, commission, or brokerage fee that is associated - # with the transaction. Not a separate or isolated transaction leg from the - # external perspective. The platform fee is limited in scope and is always - # associated with the original payment for the purchase unit. - class RefundPlatformFee < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['amount'] = 'amount' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(amount:) - @amount = amount - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - amount = Money.from_hash(hash['amount']) if hash['amount'] - - # Create object from extracted values. - RefundPlatformFee.new(amount: amount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_request.rb b/lib/pay_pal_restap_is/models/refund_request.rb deleted file mode 100644 index 99e4939..0000000 --- a/lib/pay_pal_restap_is/models/refund_request.rb +++ /dev/null @@ -1,100 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Refunds a captured payment, by ID. For a full refund, include an empty - # request body. For a partial refund, include an amount object in - # the request body. - class RefundRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # The API caller-provided external ID. Used to reconcile API - # caller-initiated transactions with PayPal transactions. Appears in - # transaction and settlement reports. The pattern is defined by an external - # party and supports Unicode. - # @return [String] - attr_accessor :custom_id - - # The API caller-provided external invoice ID for this order. The pattern is - # defined by an external party and supports Unicode. - # @return [String] - attr_accessor :invoice_id - - # The reason for the refund. Appears in both the payer's transaction history - # and the emails that the payer receives. The pattern is defined by an - # external party and supports Unicode. - # @return [String] - attr_accessor :note_to_payer - - # Any additional payments instructions during refund payment processing. - # This object is only applicable to merchants that have been enabled for - # PayPal Commerce Platform for Marketplaces and Platforms capability. Please - # speak to your account manager if you want to use this capability. - # @return [RefundPaymentInstruction] - attr_accessor :payment_instruction - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['amount'] = 'amount' - @_hash['custom_id'] = 'custom_id' - @_hash['invoice_id'] = 'invoice_id' - @_hash['note_to_payer'] = 'note_to_payer' - @_hash['payment_instruction'] = 'payment_instruction' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - amount - custom_id - invoice_id - note_to_payer - payment_instruction - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(amount: SKIP, custom_id: SKIP, invoice_id: SKIP, - note_to_payer: SKIP, payment_instruction: SKIP) - @amount = amount unless amount == SKIP - @custom_id = custom_id unless custom_id == SKIP - @invoice_id = invoice_id unless invoice_id == SKIP - @note_to_payer = note_to_payer unless note_to_payer == SKIP - @payment_instruction = payment_instruction unless payment_instruction == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - amount = Money.from_hash(hash['amount']) if hash['amount'] - custom_id = hash.key?('custom_id') ? hash['custom_id'] : SKIP - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP - payment_instruction = RefundPaymentInstruction.from_hash(hash['payment_instruction']) if - hash['payment_instruction'] - - # Create object from extracted values. - RefundRequest.new(amount: amount, - custom_id: custom_id, - invoice_id: invoice_id, - note_to_payer: note_to_payer, - payment_instruction: payment_instruction) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_status.rb b/lib/pay_pal_restap_is/models/refund_status.rb deleted file mode 100644 index 53864cd..0000000 --- a/lib/pay_pal_restap_is/models/refund_status.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The status of the refund. - class RefundStatus - REFUND_STATUS = [ - # TODO: Write general description for CANCELLED - CANCELLED = 'CANCELLED'.freeze, - - # TODO: Write general description for FAILED - FAILED = 'FAILED'.freeze, - - # TODO: Write general description for PENDING - PENDING = 'PENDING'.freeze, - - # TODO: Write general description for COMPLETED - COMPLETED = 'COMPLETED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_status_details.rb b/lib/pay_pal_restap_is/models/refund_status_details.rb deleted file mode 100644 index ebb0801..0000000 --- a/lib/pay_pal_restap_is/models/refund_status_details.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details of the refund status. - class RefundStatusDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The reason why the refund has the `PENDING` or `FAILED` status. - # @return [RefundIncompleteReason] - attr_accessor :reason - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['reason'] = 'reason' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - reason - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(reason: SKIP) - @reason = reason unless reason == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - reason = hash.key?('reason') ? hash['reason'] : SKIP - - # Create object from extracted values. - RefundStatusDetails.new(reason: reason) - end - end -end diff --git a/lib/pay_pal_restap_is/models/refund_status_with_details.rb b/lib/pay_pal_restap_is/models/refund_status_with_details.rb deleted file mode 100644 index 1529141..0000000 --- a/lib/pay_pal_restap_is/models/refund_status_with_details.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The refund status with details. - class RefundStatusWithDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The status of the refund. - # @return [RefundStatus] - attr_accessor :status - - # The details of the refund status. - # @return [RefundStatusDetails] - attr_accessor :status_details - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['status_details'] = 'status_details' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - status_details - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, status_details: SKIP) - @status = status unless status == SKIP - @status_details = status_details unless status_details == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - status_details = RefundStatusDetails.from_hash(hash['status_details']) if - hash['status_details'] - - # Create object from extracted values. - RefundStatusWithDetails.new(status: status, - status_details: status_details) - end - end -end diff --git a/lib/pay_pal_restap_is/models/related_identifiers.rb b/lib/pay_pal_restap_is/models/related_identifiers.rb deleted file mode 100644 index b1e4104..0000000 --- a/lib/pay_pal_restap_is/models/related_identifiers.rb +++ /dev/null @@ -1,69 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Identifiers related to a specific resource. - class RelatedIdentifiers < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Order ID related to the resource. - # @return [String] - attr_accessor :order_id - - # Authorization ID related to the resource. - # @return [String] - attr_accessor :authorization_id - - # Capture ID related to the resource. - # @return [String] - attr_accessor :capture_id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['order_id'] = 'order_id' - @_hash['authorization_id'] = 'authorization_id' - @_hash['capture_id'] = 'capture_id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - order_id - authorization_id - capture_id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(order_id: SKIP, authorization_id: SKIP, capture_id: SKIP) - @order_id = order_id unless order_id == SKIP - @authorization_id = authorization_id unless authorization_id == SKIP - @capture_id = capture_id unless capture_id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - order_id = hash.key?('order_id') ? hash['order_id'] : SKIP - authorization_id = - hash.key?('authorization_id') ? hash['authorization_id'] : SKIP - capture_id = hash.key?('capture_id') ? hash['capture_id'] : SKIP - - # Create object from extracted values. - RelatedIdentifiers.new(order_id: order_id, - authorization_id: authorization_id, - capture_id: capture_id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb b/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb deleted file mode 100644 index 6e47412..0000000 --- a/lib/pay_pal_restap_is/models/seller_payable_breakdown.rb +++ /dev/null @@ -1,156 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The breakdown of the refund. - class SellerPayableBreakdown < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :gross_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :paypal_fee - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :paypal_fee_in_receivable_currency - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :net_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :net_amount_in_receivable_currency - - # An array of platform or partner fees, commissions, or brokerage fees for - # the refund. - # @return [Array[PlatformFee]] - attr_accessor :platform_fees - - # An array of breakdown values for the net amount. Returned when the - # currency of the refund is different from the currency of the PayPal - # account where the payee holds their funds. - # @return [Array[NetAmountBreakdownItem]] - attr_accessor :net_amount_breakdown - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :total_refunded_amount - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['gross_amount'] = 'gross_amount' - @_hash['paypal_fee'] = 'paypal_fee' - @_hash['paypal_fee_in_receivable_currency'] = - 'paypal_fee_in_receivable_currency' - @_hash['net_amount'] = 'net_amount' - @_hash['net_amount_in_receivable_currency'] = - 'net_amount_in_receivable_currency' - @_hash['platform_fees'] = 'platform_fees' - @_hash['net_amount_breakdown'] = 'net_amount_breakdown' - @_hash['total_refunded_amount'] = 'total_refunded_amount' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - gross_amount - paypal_fee - paypal_fee_in_receivable_currency - net_amount - net_amount_in_receivable_currency - platform_fees - net_amount_breakdown - total_refunded_amount - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(gross_amount: SKIP, paypal_fee: SKIP, - paypal_fee_in_receivable_currency: SKIP, net_amount: SKIP, - net_amount_in_receivable_currency: SKIP, platform_fees: SKIP, - net_amount_breakdown: SKIP, total_refunded_amount: SKIP) - @gross_amount = gross_amount unless gross_amount == SKIP - @paypal_fee = paypal_fee unless paypal_fee == SKIP - unless paypal_fee_in_receivable_currency == SKIP - @paypal_fee_in_receivable_currency = - paypal_fee_in_receivable_currency - end - @net_amount = net_amount unless net_amount == SKIP - unless net_amount_in_receivable_currency == SKIP - @net_amount_in_receivable_currency = - net_amount_in_receivable_currency - end - @platform_fees = platform_fees unless platform_fees == SKIP - @net_amount_breakdown = net_amount_breakdown unless net_amount_breakdown == SKIP - @total_refunded_amount = total_refunded_amount unless total_refunded_amount == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - gross_amount = Money.from_hash(hash['gross_amount']) if hash['gross_amount'] - paypal_fee = Money.from_hash(hash['paypal_fee']) if hash['paypal_fee'] - if hash['paypal_fee_in_receivable_currency'] - paypal_fee_in_receivable_currency = Money.from_hash(hash['paypal_fee_in_receivable_currency']) - end - net_amount = Money.from_hash(hash['net_amount']) if hash['net_amount'] - if hash['net_amount_in_receivable_currency'] - net_amount_in_receivable_currency = Money.from_hash(hash['net_amount_in_receivable_currency']) - end - # Parameter is an array, so we need to iterate through it - platform_fees = nil - unless hash['platform_fees'].nil? - platform_fees = [] - hash['platform_fees'].each do |structure| - platform_fees << (PlatformFee.from_hash(structure) if structure) - end - end - - platform_fees = SKIP unless hash.key?('platform_fees') - # Parameter is an array, so we need to iterate through it - net_amount_breakdown = nil - unless hash['net_amount_breakdown'].nil? - net_amount_breakdown = [] - hash['net_amount_breakdown'].each do |structure| - net_amount_breakdown << (NetAmountBreakdownItem.from_hash(structure) if structure) - end - end - - net_amount_breakdown = SKIP unless hash.key?('net_amount_breakdown') - total_refunded_amount = Money.from_hash(hash['total_refunded_amount']) if - hash['total_refunded_amount'] - - # Create object from extracted values. - SellerPayableBreakdown.new(gross_amount: gross_amount, - paypal_fee: paypal_fee, - paypal_fee_in_receivable_currency: paypal_fee_in_receivable_currency, - net_amount: net_amount, - net_amount_in_receivable_currency: net_amount_in_receivable_currency, - platform_fees: platform_fees, - net_amount_breakdown: net_amount_breakdown, - total_refunded_amount: total_refunded_amount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/seller_protection.rb b/lib/pay_pal_restap_is/models/seller_protection.rb deleted file mode 100644 index fbc7a31..0000000 --- a/lib/pay_pal_restap_is/models/seller_protection.rb +++ /dev/null @@ -1,65 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The level of protection offered as defined by [PayPal Seller Protection for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) - # . - class SellerProtection < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Indicates whether the transaction is eligible for seller protection. For - # information, see [PayPal Seller Protection for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protectio - # n). - # @return [SellerProtectionStatus] - attr_accessor :status - - # An array of conditions that are covered for the transaction. - # @return [Array[DisputeCategory]] - attr_accessor :dispute_categories - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash['dispute_categories'] = 'dispute_categories' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - dispute_categories - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP, dispute_categories: SKIP) - @status = status unless status == SKIP - @dispute_categories = dispute_categories unless dispute_categories == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - dispute_categories = - hash.key?('dispute_categories') ? hash['dispute_categories'] : SKIP - - # Create object from extracted values. - SellerProtection.new(status: status, - dispute_categories: dispute_categories) - end - end -end diff --git a/lib/pay_pal_restap_is/models/seller_protection_status.rb b/lib/pay_pal_restap_is/models/seller_protection_status.rb deleted file mode 100644 index 617ae01..0000000 --- a/lib/pay_pal_restap_is/models/seller_protection_status.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Indicates whether the transaction is eligible for seller protection. For - # information, see [PayPal Seller Protection for - # Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) - # . - class SellerProtectionStatus - SELLER_PROTECTION_STATUS = [ - # TODO: Write general description for ELIGIBLE - ELIGIBLE = 'ELIGIBLE'.freeze, - - # TODO: Write general description for PARTIALLY_ELIGIBLE - PARTIALLY_ELIGIBLE = 'PARTIALLY_ELIGIBLE'.freeze, - - # TODO: Write general description for NOT_ELIGIBLE - NOT_ELIGIBLE = 'NOT_ELIGIBLE'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb b/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb deleted file mode 100644 index f6cb4d5..0000000 --- a/lib/pay_pal_restap_is/models/seller_receivable_breakdown.rb +++ /dev/null @@ -1,129 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The detailed breakdown of the capture activity. This is not available for - # transactions that are in pending state. - class SellerReceivableBreakdown < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :gross_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :paypal_fee - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :paypal_fee_in_receivable_currency - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :net_amount - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :receivable_amount - - # The exchange rate that determines the amount to convert from one currency - # to another currency. - # @return [ExchangeRate] - attr_accessor :exchange_rate - - # An array of platform or partner fees, commissions, or brokerage fees that - # associated with the captured payment. - # @return [Array[PlatformFee]] - attr_accessor :platform_fees - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['gross_amount'] = 'gross_amount' - @_hash['paypal_fee'] = 'paypal_fee' - @_hash['paypal_fee_in_receivable_currency'] = - 'paypal_fee_in_receivable_currency' - @_hash['net_amount'] = 'net_amount' - @_hash['receivable_amount'] = 'receivable_amount' - @_hash['exchange_rate'] = 'exchange_rate' - @_hash['platform_fees'] = 'platform_fees' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - paypal_fee - paypal_fee_in_receivable_currency - net_amount - receivable_amount - exchange_rate - platform_fees - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(gross_amount:, paypal_fee: SKIP, - paypal_fee_in_receivable_currency: SKIP, net_amount: SKIP, - receivable_amount: SKIP, exchange_rate: SKIP, - platform_fees: SKIP) - @gross_amount = gross_amount - @paypal_fee = paypal_fee unless paypal_fee == SKIP - unless paypal_fee_in_receivable_currency == SKIP - @paypal_fee_in_receivable_currency = - paypal_fee_in_receivable_currency - end - @net_amount = net_amount unless net_amount == SKIP - @receivable_amount = receivable_amount unless receivable_amount == SKIP - @exchange_rate = exchange_rate unless exchange_rate == SKIP - @platform_fees = platform_fees unless platform_fees == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - gross_amount = Money.from_hash(hash['gross_amount']) if hash['gross_amount'] - paypal_fee = Money.from_hash(hash['paypal_fee']) if hash['paypal_fee'] - if hash['paypal_fee_in_receivable_currency'] - paypal_fee_in_receivable_currency = Money.from_hash(hash['paypal_fee_in_receivable_currency']) - end - net_amount = Money.from_hash(hash['net_amount']) if hash['net_amount'] - receivable_amount = Money.from_hash(hash['receivable_amount']) if hash['receivable_amount'] - exchange_rate = ExchangeRate.from_hash(hash['exchange_rate']) if hash['exchange_rate'] - # Parameter is an array, so we need to iterate through it - platform_fees = nil - unless hash['platform_fees'].nil? - platform_fees = [] - hash['platform_fees'].each do |structure| - platform_fees << (PlatformFee.from_hash(structure) if structure) - end - end - - platform_fees = SKIP unless hash.key?('platform_fees') - - # Create object from extracted values. - SellerReceivableBreakdown.new(gross_amount: gross_amount, - paypal_fee: paypal_fee, - paypal_fee_in_receivable_currency: paypal_fee_in_receivable_currency, - net_amount: net_amount, - receivable_amount: receivable_amount, - exchange_rate: exchange_rate, - platform_fees: platform_fees) - end - end -end diff --git a/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb b/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb deleted file mode 100644 index 8100102..0000000 --- a/lib/pay_pal_restap_is/models/sepa_debit_authorization_details.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Authorization details. - class SEPADebitAuthorizationDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The authorization status of the wallet instrument. - # @return [InstrumentAuthorizationStatus] - attr_accessor :status - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['status'] = 'status' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - status - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(status: SKIP) - @status = status unless status == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - status = hash.key?('status') ? hash['status'] : SKIP - - # Create object from extracted values. - SEPADebitAuthorizationDetails.new(status: status) - end - end -end diff --git a/lib/pay_pal_restap_is/models/sepa_debit_response.rb b/lib/pay_pal_restap_is/models/sepa_debit_response.rb deleted file mode 100644 index 3262bdb..0000000 --- a/lib/pay_pal_restap_is/models/sepa_debit_response.rb +++ /dev/null @@ -1,87 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # SEPADebitResponse Model. - class SEPADebitResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # The last characters of the IBAN used to pay. - # @return [Object] - attr_accessor :account_holder_name - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # Authorization details. - # @return [SEPADebitAuthorizationDetails] - attr_accessor :authorization_details - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash['account_holder_name'] = 'account_holder_name' - @_hash['billing_address'] = 'billing_address' - @_hash['authorization_details'] = 'authorization_details' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - iban_last_chars - account_holder_name - billing_address - authorization_details - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(iban_last_chars: SKIP, account_holder_name: SKIP, - billing_address: SKIP, authorization_details: SKIP) - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - @account_holder_name = account_holder_name unless account_holder_name == SKIP - @billing_address = billing_address unless billing_address == SKIP - @authorization_details = authorization_details unless authorization_details == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - account_holder_name = - hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - if hash['authorization_details'] - authorization_details = SEPADebitAuthorizationDetails.from_hash(hash['authorization_details']) - end - - # Create object from extracted values. - SEPADebitResponse.new(iban_last_chars: iban_last_chars, - account_holder_name: account_holder_name, - billing_address: billing_address, - authorization_details: authorization_details) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb b/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb deleted file mode 100644 index 111e7e0..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_card_experience_context.rb +++ /dev/null @@ -1,103 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the Vault creation flow experience for your customers. - class SetupTokenCardExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The URL where the customer is redirected after customer approves leaves - # the flow. It is a required field for contingency flows like PayPal wallet, - # 3DS. - # @return [String] - attr_accessor :return_url - - # The URL where the customer is redirected after customer cancels or leaves - # the flow. It is a required field for contingency flows like PayPal wallet, - # 3DS. - # @return [String] - attr_accessor :cancel_url - - # Vault Instruction on action to be performed after a successful payer - # approval. - # @return [String] - attr_accessor :vault_instruction - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['vault_instruction'] = 'vault_instruction' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - return_url - cancel_url - vault_instruction - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, - cancel_url: SKIP, - vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @vault_instruction = vault_instruction unless vault_instruction == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - vault_instruction = - hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' - - # Create object from extracted values. - SetupTokenCardExperienceContext.new(brand_name: brand_name, - locale: locale, - return_url: return_url, - cancel_url: cancel_url, - vault_instruction: vault_instruction) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_request.rb b/lib/pay_pal_restap_is/models/setup_token_request.rb deleted file mode 100644 index 593439f..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_request.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Setup Token Request where the `source` defines the type of instrument to be - # stored. - class SetupTokenRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Customer in merchant's or partner's system of records. - # @return [CustomerRequest] - attr_accessor :customer - - # The payment method to vault with the instrument details. - # @return [SetupTokenRequestPaymentSource] - attr_accessor :payment_source - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['payment_source'] = 'payment_source' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_source:, customer: SKIP) - @customer = customer unless customer == SKIP - @payment_source = payment_source - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_source = SetupTokenRequestPaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] - - # Create object from extracted values. - SetupTokenRequest.new(payment_source: payment_source, - customer: customer) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_request_card.rb b/lib/pay_pal_restap_is/models/setup_token_request_card.rb deleted file mode 100644 index f7c43c8..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_request_card.rb +++ /dev/null @@ -1,150 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A Resource representing a request to vault a Card. - class SetupTokenRequestCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The primary account number (PAN) for the payment card. - # @return [String] - attr_accessor :number - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # The three- or four-digit security code of the card. Also known as the CVV, - # CVC, CVN, CVE, or CID. This parameter cannot be present in the request - # when `payment_initiator=MERCHANT`. - # @return [String] - attr_accessor :security_code - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # The verification method of the card. - # @return [String] - attr_accessor :verification_method - - # Customizes the Vault creation flow experience for your customers. - # @return [SetupTokenCardExperienceContext] - attr_accessor :experience_context - - # Customizes the Vault creation flow experience for your customers. - # @return [Object] - attr_accessor :network_transaction_reference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['number'] = 'number' - @_hash['expiry'] = 'expiry' - @_hash['security_code'] = 'security_code' - @_hash['type'] = 'type' - @_hash['brand'] = 'brand' - @_hash['billing_address'] = 'billing_address' - @_hash['verification_method'] = 'verification_method' - @_hash['experience_context'] = 'experience_context' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - number - expiry - security_code - type - brand - billing_address - verification_method - experience_context - network_transaction_reference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, number: SKIP, expiry: SKIP, security_code: SKIP, - type: SKIP, brand: SKIP, billing_address: SKIP, - verification_method: SKIP, experience_context: SKIP, - network_transaction_reference: SKIP) - @name = name unless name == SKIP - @number = number unless number == SKIP - @expiry = expiry unless expiry == SKIP - @security_code = security_code unless security_code == SKIP - @type = type unless type == SKIP - @brand = brand unless brand == SKIP - @billing_address = billing_address unless billing_address == SKIP - @verification_method = verification_method unless verification_method == SKIP - @experience_context = experience_context unless experience_context == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - number = hash.key?('number') ? hash['number'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - security_code = hash.key?('security_code') ? hash['security_code'] : SKIP - type = hash.key?('type') ? hash['type'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - verification_method = - hash.key?('verification_method') ? hash['verification_method'] : SKIP - experience_context = SetupTokenCardExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - network_transaction_reference = - hash.key?('network_transaction_reference') ? hash['network_transaction_reference'] : SKIP - - # Create object from extracted values. - SetupTokenRequestCard.new(name: name, - number: number, - expiry: expiry, - security_code: security_code, - type: type, - brand: brand, - billing_address: billing_address, - verification_method: verification_method, - experience_context: experience_context, - network_transaction_reference: network_transaction_reference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb b/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb deleted file mode 100644 index 35d87ef..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_request_payment_source.rb +++ /dev/null @@ -1,77 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The payment method to vault with the instrument details. - class SetupTokenRequestPaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # A Resource representing a request to vault a Card. - # @return [SetupTokenRequestCard] - attr_accessor :card - - # A resource representing a request to vault PayPal Wallet. - # @return [VaultPayPalWalletRequest] - attr_accessor :paypal - - # A resource representing a request to vault PayPal Wallet. - # @return [VaultVenmoRequest] - attr_accessor :venmo - - # The Tokenized Payment Source representing a Request to Vault a Token. - # @return [VaultTokenRequest] - attr_accessor :token - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['paypal'] = 'paypal' - @_hash['venmo'] = 'venmo' - @_hash['token'] = 'token' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - paypal - venmo - token - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, paypal: SKIP, venmo: SKIP, token: SKIP) - @card = card unless card == SKIP - @paypal = paypal unless paypal == SKIP - @venmo = venmo unless venmo == SKIP - @token = token unless token == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = SetupTokenRequestCard.from_hash(hash['card']) if hash['card'] - paypal = VaultPayPalWalletRequest.from_hash(hash['paypal']) if hash['paypal'] - venmo = VaultVenmoRequest.from_hash(hash['venmo']) if hash['venmo'] - token = VaultTokenRequest.from_hash(hash['token']) if hash['token'] - - # Create object from extracted values. - SetupTokenRequestPaymentSource.new(card: card, - paypal: paypal, - venmo: venmo, - token: token) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_response.rb b/lib/pay_pal_restap_is/models/setup_token_response.rb deleted file mode 100644 index b7df301..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_response.rb +++ /dev/null @@ -1,106 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Minimal representation of a cached setup token. - class SetupTokenResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the vault token. - # @return [String] - attr_accessor :id - - # Ordinal number for sorting. - # @return [Integer] - attr_accessor :ordinal - - # Customer in merchant's or partner's system of records. - # @return [CustomerRequest] - attr_accessor :customer - - # The status of the payment token. - # @return [String] - attr_accessor :status - - # The setup payment method details. - # @return [SetupTokenResponsePaymentSource] - attr_accessor :payment_source - - # An array of related [HATEOAS links](/api/rest/responses/#hateoas). - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['ordinal'] = 'ordinal' - @_hash['customer'] = 'customer' - @_hash['status'] = 'status' - @_hash['payment_source'] = 'payment_source' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - ordinal - customer - status - payment_source - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, ordinal: SKIP, customer: SKIP, status: 'CREATED', - payment_source: SKIP, links: SKIP) - @id = id unless id == SKIP - @ordinal = ordinal unless ordinal == SKIP - @customer = customer unless customer == SKIP - @status = status unless status == SKIP - @payment_source = payment_source unless payment_source == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - ordinal = hash.key?('ordinal') ? hash['ordinal'] : SKIP - customer = CustomerRequest.from_hash(hash['customer']) if hash['customer'] - status = hash['status'] ||= 'CREATED' - payment_source = SetupTokenResponsePaymentSource.from_hash(hash['payment_source']) if - hash['payment_source'] - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - SetupTokenResponse.new(id: id, - ordinal: ordinal, - customer: customer, - status: status, - payment_source: payment_source, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_response_card.rb b/lib/pay_pal_restap_is/models/setup_token_response_card.rb deleted file mode 100644 index 92d8ec1..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_response_card.rb +++ /dev/null @@ -1,156 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # SetupTokenResponseCard Model. - class SetupTokenResponseCard < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The card holder's name as it appears on the card. - # @return [String] - attr_accessor :name - - # The last digits of the payment card. - # @return [String] - attr_accessor :last_digits - - # The card network or brand. Applies to credit, debit, gift, and payment - # cards. - # @return [CardBrand] - attr_accessor :brand - - # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date - # and time format](https://tools.ietf.org/html/rfc3339#section-5.6). - # @return [String] - attr_accessor :expiry - - # Address request details. - # @return [AddressDetails] - attr_accessor :billing_address - - # Verification status of Card. - # @return [String] - attr_accessor :verification_status - - # Card Verification details including the authorization details and 3D - # SECURE details. - # @return [CardVerificationDetails] - attr_accessor :verification - - # Previous network transaction reference including id in response. - # @return [NetworkTransactionReferenceEntity] - attr_accessor :network_transaction_reference - - # Results of Authentication such as 3D Secure. - # @return [AuthenticationResponse] - attr_accessor :authentication_result - - # Bank Identification Number (BIN) details used to fund a payment. - # @return [BinDetails] - attr_accessor :bin_details - - # Type of card. i.e Credit, Debit and so on. - # @return [CardType] - attr_accessor :type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['last_digits'] = 'last_digits' - @_hash['brand'] = 'brand' - @_hash['expiry'] = 'expiry' - @_hash['billing_address'] = 'billing_address' - @_hash['verification_status'] = 'verification_status' - @_hash['verification'] = 'verification' - @_hash['network_transaction_reference'] = - 'network_transaction_reference' - @_hash['authentication_result'] = 'authentication_result' - @_hash['bin_details'] = 'bin_details' - @_hash['type'] = 'type' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - last_digits - brand - expiry - billing_address - verification_status - verification - network_transaction_reference - authentication_result - bin_details - type - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, last_digits: SKIP, brand: SKIP, expiry: SKIP, - billing_address: SKIP, verification_status: SKIP, - verification: SKIP, network_transaction_reference: SKIP, - authentication_result: SKIP, bin_details: SKIP, type: SKIP) - @name = name unless name == SKIP - @last_digits = last_digits unless last_digits == SKIP - @brand = brand unless brand == SKIP - @expiry = expiry unless expiry == SKIP - @billing_address = billing_address unless billing_address == SKIP - @verification_status = verification_status unless verification_status == SKIP - @verification = verification unless verification == SKIP - unless network_transaction_reference == SKIP - @network_transaction_reference = - network_transaction_reference - end - @authentication_result = authentication_result unless authentication_result == SKIP - @bin_details = bin_details unless bin_details == SKIP - @type = type unless type == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - last_digits = hash.key?('last_digits') ? hash['last_digits'] : SKIP - brand = hash.key?('brand') ? hash['brand'] : SKIP - expiry = hash.key?('expiry') ? hash['expiry'] : SKIP - billing_address = AddressDetails.from_hash(hash['billing_address']) if - hash['billing_address'] - verification_status = - hash.key?('verification_status') ? hash['verification_status'] : SKIP - verification = CardVerificationDetails.from_hash(hash['verification']) if - hash['verification'] - if hash['network_transaction_reference'] - network_transaction_reference = NetworkTransactionReferenceEntity.from_hash(hash['network_transaction_reference']) - end - authentication_result = AuthenticationResponse.from_hash(hash['authentication_result']) if - hash['authentication_result'] - bin_details = BinDetails.from_hash(hash['bin_details']) if hash['bin_details'] - type = hash.key?('type') ? hash['type'] : SKIP - - # Create object from extracted values. - SetupTokenResponseCard.new(name: name, - last_digits: last_digits, - brand: brand, - expiry: expiry, - billing_address: billing_address, - verification_status: verification_status, - verification: verification, - network_transaction_reference: network_transaction_reference, - authentication_result: authentication_result, - bin_details: bin_details, - type: type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb b/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb deleted file mode 100644 index d3d9d80..0000000 --- a/lib/pay_pal_restap_is/models/setup_token_response_payment_source.rb +++ /dev/null @@ -1,68 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The setup payment method details. - class SetupTokenResponsePaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # TODO: Write general description for this method - # @return [SetupTokenResponseCard] - attr_accessor :card - - # TODO: Write general description for this method - # @return [PayPalPaymentToken] - attr_accessor :paypal - - # TODO: Write general description for this method - # @return [VenmoPaymentToken] - attr_accessor :venmo - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash['paypal'] = 'paypal' - @_hash['venmo'] = 'venmo' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - paypal - venmo - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP, paypal: SKIP, venmo: SKIP) - @card = card unless card == SKIP - @paypal = paypal unless paypal == SKIP - @venmo = venmo unless venmo == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = SetupTokenResponseCard.from_hash(hash['card']) if hash['card'] - paypal = PayPalPaymentToken.from_hash(hash['paypal']) if hash['paypal'] - venmo = VenmoPaymentToken.from_hash(hash['venmo']) if hash['venmo'] - - # Create object from extracted values. - SetupTokenResponsePaymentSource.new(card: card, - paypal: paypal, - venmo: venmo) - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipment_carrier.rb b/lib/pay_pal_restap_is/models/shipment_carrier.rb deleted file mode 100644 index ed32133..0000000 --- a/lib/pay_pal_restap_is/models/shipment_carrier.rb +++ /dev/null @@ -1,3852 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The carrier for the shipment. Some carriers have a global version as well as - # local subsidiaries. The subsidiaries are repeated over many countries and - # might also have an entry in the global list. Choose the carrier for your - # country. If the carrier is not available for your country, choose the global - # version of the carrier. If your carrier name is not in the list, set - # `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For - # allowed values, see Carriers. - class ShipmentCarrier - SHIPMENT_CARRIER = [ - # TODO: Write general description for DPD_RU - DPD_RU = 'DPD_RU'.freeze, - - # TODO: Write general description for BG_BULGARIAN_POST - BG_BULGARIAN_POST = 'BG_BULGARIAN_POST'.freeze, - - # TODO: Write general description for KR_KOREA_POST - KR_KOREA_POST = 'KR_KOREA_POST'.freeze, - - # TODO: Write general description for ZA_COURIERIT - ZA_COURIERIT = 'ZA_COURIERIT'.freeze, - - # TODO: Write general description for FR_EXAPAQ - FR_EXAPAQ = 'FR_EXAPAQ'.freeze, - - # TODO: Write general description for ARE_EMIRATES_POST - ARE_EMIRATES_POST = 'ARE_EMIRATES_POST'.freeze, - - # TODO: Write general description for GAC - GAC = 'GAC'.freeze, - - # TODO: Write general description for GEIS - GEIS = 'GEIS'.freeze, - - # TODO: Write general description for SF_EX - SF_EX = 'SF_EX'.freeze, - - # TODO: Write general description for PAGO - PAGO = 'PAGO'.freeze, - - # TODO: Write general description for MYHERMES - MYHERMES = 'MYHERMES'.freeze, - - # TODO: Write general description for DIAMOND_EUROGISTICS - DIAMOND_EUROGISTICS = 'DIAMOND_EUROGISTICS'.freeze, - - # TODO: Write general description for CORPORATECOURIERS_WEBHOOK - CORPORATECOURIERS_WEBHOOK = 'CORPORATECOURIERS_WEBHOOK'.freeze, - - # TODO: Write general description for BOND - BOND = 'BOND'.freeze, - - # TODO: Write general description for OMNIPARCEL - OMNIPARCEL = 'OMNIPARCEL'.freeze, - - # TODO: Write general description for SK_POSTA - SK_POSTA = 'SK_POSTA'.freeze, - - # TODO: Write general description for PUROLATOR - PUROLATOR = 'PUROLATOR'.freeze, - - # TODO: Write general description for FETCHR_WEBHOOK - FETCHR_WEBHOOK = 'FETCHR_WEBHOOK'.freeze, - - # TODO: Write general description for THEDELIVERYGROUP - THEDELIVERYGROUP = 'THEDELIVERYGROUP'.freeze, - - # TODO: Write general description for CELLO_SQUARE - CELLO_SQUARE = 'CELLO_SQUARE'.freeze, - - # TODO: Write general description for TARRIVE - TARRIVE = 'TARRIVE'.freeze, - - # TODO: Write general description for COLLIVERY - COLLIVERY = 'COLLIVERY'.freeze, - - # TODO: Write general description for MAINFREIGHT - MAINFREIGHT = 'MAINFREIGHT'.freeze, - - # TODO: Write general description for IND_FIRSTFLIGHT - IND_FIRSTFLIGHT = 'IND_FIRSTFLIGHT'.freeze, - - # TODO: Write general description for ACSWORLDWIDE - ACSWORLDWIDE = 'ACSWORLDWIDE'.freeze, - - # TODO: Write general description for AMSTAN - AMSTAN = 'AMSTAN'.freeze, - - # TODO: Write general description for OKAYPARCEL - OKAYPARCEL = 'OKAYPARCEL'.freeze, - - # TODO: Write general description for ENVIALIA_REFERENCE - ENVIALIA_REFERENCE = 'ENVIALIA_REFERENCE'.freeze, - - # TODO: Write general description for SEUR_ES - SEUR_ES = 'SEUR_ES'.freeze, - - # TODO: Write general description for CONTINENTAL - CONTINENTAL = 'CONTINENTAL'.freeze, - - # TODO: Write general description for FDSEXPRESS - FDSEXPRESS = 'FDSEXPRESS'.freeze, - - # TODO: Write general description for AMAZON_FBA_SWISHIP - AMAZON_FBA_SWISHIP = 'AMAZON_FBA_SWISHIP'.freeze, - - # TODO: Write general description for WYNGS - WYNGS = 'WYNGS'.freeze, - - # TODO: Write general description for DHL_ACTIVE_TRACING - DHL_ACTIVE_TRACING = 'DHL_ACTIVE_TRACING'.freeze, - - # TODO: Write general description for ZYLLEM - ZYLLEM = 'ZYLLEM'.freeze, - - # TODO: Write general description for RUSTON - RUSTON = 'RUSTON'.freeze, - - # TODO: Write general description for XPOST - XPOST = 'XPOST'.freeze, - - # TODO: Write general description for CORREOS_ES - CORREOS_ES = 'CORREOS_ES'.freeze, - - # TODO: Write general description for DHL_FR - DHL_FR = 'DHL_FR'.freeze, - - # TODO: Write general description for PAN_ASIA - PAN_ASIA = 'PAN_ASIA'.freeze, - - # TODO: Write general description for BRT_IT - BRT_IT = 'BRT_IT'.freeze, - - # TODO: Write general description for SRE_KOREA - SRE_KOREA = 'SRE_KOREA'.freeze, - - # TODO: Write general description for SPEEDEE - SPEEDEE = 'SPEEDEE'.freeze, - - # TODO: Write general description for TNT_UK - TNT_UK = 'TNT_UK'.freeze, - - # TODO: Write general description for VENIPAK - VENIPAK = 'VENIPAK'.freeze, - - # TODO: Write general description for SHREENANDANCOURIER - SHREENANDANCOURIER = 'SHREENANDANCOURIER'.freeze, - - # TODO: Write general description for CROSHOT - CROSHOT = 'CROSHOT'.freeze, - - # TODO: Write general description for NIPOST_NG - NIPOST_NG = 'NIPOST_NG'.freeze, - - # TODO: Write general description for EPST_GLBL - EPST_GLBL = 'EPST_GLBL'.freeze, - - # TODO: Write general description for NEWGISTICS - NEWGISTICS = 'NEWGISTICS'.freeze, - - # TODO: Write general description for POST_SLOVENIA - POST_SLOVENIA = 'POST_SLOVENIA'.freeze, - - # TODO: Write general description for JERSEY_POST - JERSEY_POST = 'JERSEY_POST'.freeze, - - # TODO: Write general description for BOMBINOEXP - BOMBINOEXP = 'BOMBINOEXP'.freeze, - - # TODO: Write general description for WMG - WMG = 'WMG'.freeze, - - # TODO: Write general description for XQ_EXPRESS - XQ_EXPRESS = 'XQ_EXPRESS'.freeze, - - # TODO: Write general description for FURDECO - FURDECO = 'FURDECO'.freeze, - - # TODO: Write general description for LHT_EXPRESS - LHT_EXPRESS = 'LHT_EXPRESS'.freeze, - - # TODO: Write general description for SOUTH_AFRICAN_POST_OFFICE - SOUTH_AFRICAN_POST_OFFICE = 'SOUTH_AFRICAN_POST_OFFICE'.freeze, - - # TODO: Write general description for SPOTON - SPOTON = 'SPOTON'.freeze, - - # TODO: Write general description for DIMERCO - DIMERCO = 'DIMERCO'.freeze, - - # TODO: Write general description for CYPRUS_POST_CYP - CYPRUS_POST_CYP = 'CYPRUS_POST_CYP'.freeze, - - # TODO: Write general description for ABCUSTOM - ABCUSTOM = 'ABCUSTOM'.freeze, - - # TODO: Write general description for IND_DELIVREE - IND_DELIVREE = 'IND_DELIVREE'.freeze, - - # TODO: Write general description for CN_BESTEXPRESS - CN_BESTEXPRESS = 'CN_BESTEXPRESS'.freeze, - - # TODO: Write general description for DX_SFTP - DX_SFTP = 'DX_SFTP'.freeze, - - # TODO: Write general description for PICKUPP_MYS - PICKUPP_MYS = 'PICKUPP_MYS'.freeze, - - # TODO: Write general description for FMX - FMX = 'FMX'.freeze, - - # TODO: Write general description for HELLMANN - HELLMANN = 'HELLMANN'.freeze, - - # TODO: Write general description for SHIP_IT_ASIA - SHIP_IT_ASIA = 'SHIP_IT_ASIA'.freeze, - - # TODO: Write general description for KERRY_ECOMMERCE - KERRY_ECOMMERCE = 'KERRY_ECOMMERCE'.freeze, - - # TODO: Write general description for FRETERAPIDO - FRETERAPIDO = 'FRETERAPIDO'.freeze, - - # TODO: Write general description for PITNEY_BOWES - PITNEY_BOWES = 'PITNEY_BOWES'.freeze, - - # TODO: Write general description for XPRESSEN_DK - XPRESSEN_DK = 'XPRESSEN_DK'.freeze, - - # TODO: Write general description for SEUR_SP_API - SEUR_SP_API = 'SEUR_SP_API'.freeze, - - # TODO: Write general description for DELIVERYONTIME - DELIVERYONTIME = 'DELIVERYONTIME'.freeze, - - # TODO: Write general description for JINSUNG - JINSUNG = 'JINSUNG'.freeze, - - # TODO: Write general description for TRANS_KARGO - TRANS_KARGO = 'TRANS_KARGO'.freeze, - - # TODO: Write general description for SWISHIP_DE - SWISHIP_DE = 'SWISHIP_DE'.freeze, - - # TODO: Write general description for IVOY_WEBHOOK - IVOY_WEBHOOK = 'IVOY_WEBHOOK'.freeze, - - # TODO: Write general description for AIRMEE_WEBHOOK - AIRMEE_WEBHOOK = 'AIRMEE_WEBHOOK'.freeze, - - # TODO: Write general description for DHL_BENELUX - DHL_BENELUX = 'DHL_BENELUX'.freeze, - - # TODO: Write general description for FIRSTMILE - FIRSTMILE = 'FIRSTMILE'.freeze, - - # TODO: Write general description for FASTWAY_IR - FASTWAY_IR = 'FASTWAY_IR'.freeze, - - # TODO: Write general description for HH_EXP - HH_EXP = 'HH_EXP'.freeze, - - # TODO: Write general description for MYS_MYPOST_ONLINE - MYS_MYPOST_ONLINE = 'MYS_MYPOST_ONLINE'.freeze, - - # TODO: Write general description for TNT_NL - TNT_NL = 'TNT_NL'.freeze, - - # TODO: Write general description for TIPSA - TIPSA = 'TIPSA'.freeze, - - # TODO: Write general description for TAQBIN_MY - TAQBIN_MY = 'TAQBIN_MY'.freeze, - - # TODO: Write general description for KGMHUB - KGMHUB = 'KGMHUB'.freeze, - - # TODO: Write general description for INTEXPRESS - INTEXPRESS = 'INTEXPRESS'.freeze, - - # TODO: Write general description for OVERSE_EXP - OVERSE_EXP = 'OVERSE_EXP'.freeze, - - # TODO: Write general description for ONECLICK - ONECLICK = 'ONECLICK'.freeze, - - # TODO: Write general description for ROADRUNNER_FREIGHT - ROADRUNNER_FREIGHT = 'ROADRUNNER_FREIGHT'.freeze, - - # TODO: Write general description for GLS_CROTIA - GLS_CROTIA = 'GLS_CROTIA'.freeze, - - # TODO: Write general description for MRW_FTP - MRW_FTP = 'MRW_FTP'.freeze, - - # TODO: Write general description for BLUEX - BLUEX = 'BLUEX'.freeze, - - # TODO: Write general description for DYLT - DYLT = 'DYLT'.freeze, - - # TODO: Write general description for DPD_IR - DPD_IR = 'DPD_IR'.freeze, - - # TODO: Write general description for SIN_GLBL - SIN_GLBL = 'SIN_GLBL'.freeze, - - # TODO: Write general description for TUFFNELLS_REFERENCE - TUFFNELLS_REFERENCE = 'TUFFNELLS_REFERENCE'.freeze, - - # TODO: Write general description for CJPACKET - CJPACKET = 'CJPACKET'.freeze, - - # TODO: Write general description for MILKMAN - MILKMAN = 'MILKMAN'.freeze, - - # TODO: Write general description for ASIGNA - ASIGNA = 'ASIGNA'.freeze, - - # TODO: Write general description for ONEWORLDEXPRESS - ONEWORLDEXPRESS = 'ONEWORLDEXPRESS'.freeze, - - # TODO: Write general description for ROYAL_MAIL - ROYAL_MAIL = 'ROYAL_MAIL'.freeze, - - # TODO: Write general description for VIA_EXPRESS - VIA_EXPRESS = 'VIA_EXPRESS'.freeze, - - # TODO: Write general description for TIGFREIGHT - TIGFREIGHT = 'TIGFREIGHT'.freeze, - - # TODO: Write general description for ZTO_EXPRESS - ZTO_EXPRESS = 'ZTO_EXPRESS'.freeze, - - # TODO: Write general description for TWO_GO - TWO_GO = 'TWO_GO'.freeze, - - # TODO: Write general description for IML - IML = 'IML'.freeze, - - # TODO: Write general description for INTEL_VALLEY - INTEL_VALLEY = 'INTEL_VALLEY'.freeze, - - # TODO: Write general description for EFS - EFS = 'EFS'.freeze, - - # TODO: Write general description for UK_UK_MAIL - UK_UK_MAIL = 'UK_UK_MAIL'.freeze, - - # TODO: Write general description for RAM - RAM = 'RAM'.freeze, - - # TODO: Write general description for ALLIEDEXPRESS - ALLIEDEXPRESS = 'ALLIEDEXPRESS'.freeze, - - # TODO: Write general description for APC_OVERNIGHT - APC_OVERNIGHT = 'APC_OVERNIGHT'.freeze, - - # TODO: Write general description for SHIPPIT - SHIPPIT = 'SHIPPIT'.freeze, - - # TODO: Write general description for TFM - TFM = 'TFM'.freeze, - - # TODO: Write general description for M_XPRESS - M_XPRESS = 'M_XPRESS'.freeze, - - # TODO: Write general description for HDB_BOX - HDB_BOX = 'HDB_BOX'.freeze, - - # TODO: Write general description for CLEVY_LINKS - CLEVY_LINKS = 'CLEVY_LINKS'.freeze, - - # TODO: Write general description for IBEONE - IBEONE = 'IBEONE'.freeze, - - # TODO: Write general description for FIEGE_NL - FIEGE_NL = 'FIEGE_NL'.freeze, - - # TODO: Write general description for KWE_GLOBAL - KWE_GLOBAL = 'KWE_GLOBAL'.freeze, - - # TODO: Write general description for CTC_EXPRESS - CTC_EXPRESS = 'CTC_EXPRESS'.freeze, - - # TODO: Write general description for LAO_POST - LAO_POST = 'LAO_POST'.freeze, - - # TODO: Write general description for AMAZON - AMAZON = 'AMAZON'.freeze, - - # TODO: Write general description for MORE_LINK - MORE_LINK = 'MORE_LINK'.freeze, - - # TODO: Write general description for JX - JX = 'JX'.freeze, - - # TODO: Write general description for EASY_MAIL - EASY_MAIL = 'EASY_MAIL'.freeze, - - # TODO: Write general description for ADUIEPYLE - ADUIEPYLE = 'ADUIEPYLE'.freeze, - - # TODO: Write general description for GB_PANTHER - GB_PANTHER = 'GB_PANTHER'.freeze, - - # TODO: Write general description for EXPRESSSALE - EXPRESSSALE = 'EXPRESSSALE'.freeze, - - # TODO: Write general description for SG_DETRACK - SG_DETRACK = 'SG_DETRACK'.freeze, - - # TODO: Write general description for TRUNKRS_WEBHOOK - TRUNKRS_WEBHOOK = 'TRUNKRS_WEBHOOK'.freeze, - - # TODO: Write general description for MATDESPATCH - MATDESPATCH = 'MATDESPATCH'.freeze, - - # TODO: Write general description for DICOM - DICOM = 'DICOM'.freeze, - - # TODO: Write general description for MBW - MBW = 'MBW'.freeze, - - # TODO: Write general description for KHM_CAMBODIA_POST - KHM_CAMBODIA_POST = 'KHM_CAMBODIA_POST'.freeze, - - # TODO: Write general description for SINOTRANS - SINOTRANS = 'SINOTRANS'.freeze, - - # TODO: Write general description for BRT_IT_PARCELID - BRT_IT_PARCELID = 'BRT_IT_PARCELID'.freeze, - - # TODO: Write general description for DHL_SUPPLY_CHAIN - DHL_SUPPLY_CHAIN = 'DHL_SUPPLY_CHAIN'.freeze, - - # TODO: Write general description for DHL_PL - DHL_PL = 'DHL_PL'.freeze, - - # TODO: Write general description for TOPYOU - TOPYOU = 'TOPYOU'.freeze, - - # TODO: Write general description for PALEXPRESS - PALEXPRESS = 'PALEXPRESS'.freeze, - - # TODO: Write general description for DHL_SG - DHL_SG = 'DHL_SG'.freeze, - - # TODO: Write general description for CN_WEDO - CN_WEDO = 'CN_WEDO'.freeze, - - # TODO: Write general description for FULFILLME - FULFILLME = 'FULFILLME'.freeze, - - # TODO: Write general description for DPD_DELISTRACK - DPD_DELISTRACK = 'DPD_DELISTRACK'.freeze, - - # TODO: Write general description for UPS_REFERENCE - UPS_REFERENCE = 'UPS_REFERENCE'.freeze, - - # TODO: Write general description for CARIBOU - CARIBOU = 'CARIBOU'.freeze, - - # TODO: Write general description for LOCUS_WEBHOOK - LOCUS_WEBHOOK = 'LOCUS_WEBHOOK'.freeze, - - # TODO: Write general description for DSV - DSV = 'DSV'.freeze, - - # TODO: Write general description for CN_GOFLY - CN_GOFLY = 'CN_GOFLY'.freeze, - - # TODO: Write general description for P2P_TRC - P2P_TRC = 'P2P_TRC'.freeze, - - # TODO: Write general description for DIRECTPARCELS - DIRECTPARCELS = 'DIRECTPARCELS'.freeze, - - # TODO: Write general description for NOVA_POSHTA_INT - NOVA_POSHTA_INT = 'NOVA_POSHTA_INT'.freeze, - - # TODO: Write general description for FEDEX_POLAND - FEDEX_POLAND = 'FEDEX_POLAND'.freeze, - - # TODO: Write general description for CN_JCEX - CN_JCEX = 'CN_JCEX'.freeze, - - # TODO: Write general description for FAR_INTERNATIONAL - FAR_INTERNATIONAL = 'FAR_INTERNATIONAL'.freeze, - - # TODO: Write general description for IDEXPRESS - IDEXPRESS = 'IDEXPRESS'.freeze, - - # TODO: Write general description for GANGBAO - GANGBAO = 'GANGBAO'.freeze, - - # TODO: Write general description for NEWAY - NEWAY = 'NEWAY'.freeze, - - # TODO: Write general description for POSTNL_INT_3_S - POSTNL_INT_3_S = 'POSTNL_INT_3_S'.freeze, - - # TODO: Write general description for RPX_ID - RPX_ID = 'RPX_ID'.freeze, - - # TODO: Write general description for DESIGNERTRANSPORT_WEBHOOK - DESIGNERTRANSPORT_WEBHOOK = 'DESIGNERTRANSPORT_WEBHOOK'.freeze, - - # TODO: Write general description for GLS_SLOVEN - GLS_SLOVEN = 'GLS_SLOVEN'.freeze, - - # TODO: Write general description for PARCELLED_IN - PARCELLED_IN = 'PARCELLED_IN'.freeze, - - # TODO: Write general description for GSI_EXPRESS - GSI_EXPRESS = 'GSI_EXPRESS'.freeze, - - # TODO: Write general description for CON_WAY - CON_WAY = 'CON_WAY'.freeze, - - # TODO: Write general description for BROUWER_TRANSPORT - BROUWER_TRANSPORT = 'BROUWER_TRANSPORT'.freeze, - - # TODO: Write general description for CPEX - CPEX = 'CPEX'.freeze, - - # TODO: Write general description for ISRAEL_POST - ISRAEL_POST = 'ISRAEL_POST'.freeze, - - # TODO: Write general description for DTDC_IN - DTDC_IN = 'DTDC_IN'.freeze, - - # TODO: Write general description for PTT_POST - PTT_POST = 'PTT_POST'.freeze, - - # TODO: Write general description for XDE_WEBHOOK - XDE_WEBHOOK = 'XDE_WEBHOOK'.freeze, - - # TODO: Write general description for TOLOS - TOLOS = 'TOLOS'.freeze, - - # TODO: Write general description for GIAO_HANG - GIAO_HANG = 'GIAO_HANG'.freeze, - - # TODO: Write general description for GEODIS_ESPACE - GEODIS_ESPACE = 'GEODIS_ESPACE'.freeze, - - # TODO: Write general description for MAGYAR_HU - MAGYAR_HU = 'MAGYAR_HU'.freeze, - - # TODO: Write general description for DOORDASH_WEBHOOK - DOORDASH_WEBHOOK = 'DOORDASH_WEBHOOK'.freeze, - - # TODO: Write general description for TIKI_ID - TIKI_ID = 'TIKI_ID'.freeze, - - # TODO: Write general description for CJ_HK_INTERNATIONAL - CJ_HK_INTERNATIONAL = 'CJ_HK_INTERNATIONAL'.freeze, - - # TODO: Write general description for STAR_TRACK_EXPRESS - STAR_TRACK_EXPRESS = 'STAR_TRACK_EXPRESS'.freeze, - - # TODO: Write general description for HELTHJEM - HELTHJEM = 'HELTHJEM'.freeze, - - # TODO: Write general description for SFB2C - SFB2C = 'SFB2C'.freeze, - - # TODO: Write general description for FREIGHTQUOTE - FREIGHTQUOTE = 'FREIGHTQUOTE'.freeze, - - # TODO: Write general description for LANDMARK_GLOBAL_REFERENCE - LANDMARK_GLOBAL_REFERENCE = 'LANDMARK_GLOBAL_REFERENCE'.freeze, - - # TODO: Write general description for PARCEL2GO - PARCEL2GO = 'PARCEL2GO'.freeze, - - # TODO: Write general description for DELNEXT - DELNEXT = 'DELNEXT'.freeze, - - # TODO: Write general description for RCL - RCL = 'RCL'.freeze, - - # TODO: Write general description for CGS_EXPRESS - CGS_EXPRESS = 'CGS_EXPRESS'.freeze, - - # TODO: Write general description for HK_POST - HK_POST = 'HK_POST'.freeze, - - # TODO: Write general description for SAP_EXPRESS - SAP_EXPRESS = 'SAP_EXPRESS'.freeze, - - # TODO: Write general description for PARCELPOST_SG - PARCELPOST_SG = 'PARCELPOST_SG'.freeze, - - # TODO: Write general description for HERMES - HERMES = 'HERMES'.freeze, - - # TODO: Write general description for IND_SAFEEXPRESS - IND_SAFEEXPRESS = 'IND_SAFEEXPRESS'.freeze, - - # TODO: Write general description for TOPHATTEREXPRESS - TOPHATTEREXPRESS = 'TOPHATTEREXPRESS'.freeze, - - # TODO: Write general description for MGLOBAL - MGLOBAL = 'MGLOBAL'.freeze, - - # TODO: Write general description for AVERITT - AVERITT = 'AVERITT'.freeze, - - # TODO: Write general description for LEADER - LEADER = 'LEADER'.freeze, - - # TODO: Write general description for _2EBOX - _2EBOX = '_2EBOX'.freeze, - - # TODO: Write general description for SG_SPEEDPOST - SG_SPEEDPOST = 'SG_SPEEDPOST'.freeze, - - # TODO: Write general description for DBSCHENKER_SE - DBSCHENKER_SE = 'DBSCHENKER_SE'.freeze, - - # TODO: Write general description for ISR_POST_DOMESTIC - ISR_POST_DOMESTIC = 'ISR_POST_DOMESTIC'.freeze, - - # TODO: Write general description for BESTWAYPARCEL - BESTWAYPARCEL = 'BESTWAYPARCEL'.freeze, - - # TODO: Write general description for ASENDIA_DE - ASENDIA_DE = 'ASENDIA_DE'.freeze, - - # TODO: Write general description for NIGHTLINE_UK - NIGHTLINE_UK = 'NIGHTLINE_UK'.freeze, - - # TODO: Write general description for TAQBIN_SG - TAQBIN_SG = 'TAQBIN_SG'.freeze, - - # TODO: Write general description for TCK_EXPRESS - TCK_EXPRESS = 'TCK_EXPRESS'.freeze, - - # TODO: Write general description for ENDEAVOUR_DELIVERY - ENDEAVOUR_DELIVERY = 'ENDEAVOUR_DELIVERY'.freeze, - - # TODO: Write general description for NANJINGWOYUAN - NANJINGWOYUAN = 'NANJINGWOYUAN'.freeze, - - # TODO: Write general description for HEPPNER_FR - HEPPNER_FR = 'HEPPNER_FR'.freeze, - - # TODO: Write general description for EMPS_CN - EMPS_CN = 'EMPS_CN'.freeze, - - # TODO: Write general description for FONSEN - FONSEN = 'FONSEN'.freeze, - - # TODO: Write general description for PICKRR - PICKRR = 'PICKRR'.freeze, - - # TODO: Write general description for APC_OVERNIGHT_CONNUM - APC_OVERNIGHT_CONNUM = 'APC_OVERNIGHT_CONNUM'.freeze, - - # TODO: Write general description for STAR_TRACK_NEXT_FLIGHT - STAR_TRACK_NEXT_FLIGHT = 'STAR_TRACK_NEXT_FLIGHT'.freeze, - - # TODO: Write general description for DAJIN - DAJIN = 'DAJIN'.freeze, - - # TODO: Write general description for UPS_FREIGHT - UPS_FREIGHT = 'UPS_FREIGHT'.freeze, - - # TODO: Write general description for POSTA_PLUS - POSTA_PLUS = 'POSTA_PLUS'.freeze, - - # TODO: Write general description for CEVA - CEVA = 'CEVA'.freeze, - - # TODO: Write general description for ANSERX - ANSERX = 'ANSERX'.freeze, - - # TODO: Write general description for JS_EXPRESS - JS_EXPRESS = 'JS_EXPRESS'.freeze, - - # TODO: Write general description for PADTF - PADTF = 'PADTF'.freeze, - - # TODO: Write general description for UPS_MAIL_INNOVATIONS - UPS_MAIL_INNOVATIONS = 'UPS_MAIL_INNOVATIONS'.freeze, - - # TODO: Write general description for EZSHIP - EZSHIP = 'EZSHIP'.freeze, - - # TODO: Write general description for SYPOST - SYPOST = 'SYPOST'.freeze, - - # TODO: Write general description for AMAZON_SHIP_MCF - AMAZON_SHIP_MCF = 'AMAZON_SHIP_MCF'.freeze, - - # TODO: Write general description for YUSEN - YUSEN = 'YUSEN'.freeze, - - # TODO: Write general description for BRING - BRING = 'BRING'.freeze, - - # TODO: Write general description for SDA_IT - SDA_IT = 'SDA_IT'.freeze, - - # TODO: Write general description for GBA - GBA = 'GBA'.freeze, - - # TODO: Write general description for NEWEGGEXPRESS - NEWEGGEXPRESS = 'NEWEGGEXPRESS'.freeze, - - # TODO: Write general description for SPEEDCOURIERS_GR - SPEEDCOURIERS_GR = 'SPEEDCOURIERS_GR'.freeze, - - # TODO: Write general description for FORRUN - FORRUN = 'FORRUN'.freeze, - - # TODO: Write general description for PICKUP - PICKUP = 'PICKUP'.freeze, - - # TODO: Write general description for ECMS - ECMS = 'ECMS'.freeze, - - # TODO: Write general description for INTELIPOST - INTELIPOST = 'INTELIPOST'.freeze, - - # TODO: Write general description for FLASHEXPRESS - FLASHEXPRESS = 'FLASHEXPRESS'.freeze, - - # TODO: Write general description for CN_STO - CN_STO = 'CN_STO'.freeze, - - # TODO: Write general description for SEKO_SFTP - SEKO_SFTP = 'SEKO_SFTP'.freeze, - - # TODO: Write general description for HOME_DELIVERY_SOLUTIONS - HOME_DELIVERY_SOLUTIONS = 'HOME_DELIVERY_SOLUTIONS'.freeze, - - # TODO: Write general description for DPD_HGRY - DPD_HGRY = 'DPD_HGRY'.freeze, - - # TODO: Write general description for KERRYTTC_VN - KERRYTTC_VN = 'KERRYTTC_VN'.freeze, - - # TODO: Write general description for JOYING_BOX - JOYING_BOX = 'JOYING_BOX'.freeze, - - # TODO: Write general description for TOTAL_EXPRESS - TOTAL_EXPRESS = 'TOTAL_EXPRESS'.freeze, - - # TODO: Write general description for ZJS_EXPRESS - ZJS_EXPRESS = 'ZJS_EXPRESS'.freeze, - - # TODO: Write general description for STARKEN - STARKEN = 'STARKEN'.freeze, - - # TODO: Write general description for DEMANDSHIP - DEMANDSHIP = 'DEMANDSHIP'.freeze, - - # TODO: Write general description for CN_DPEX - CN_DPEX = 'CN_DPEX'.freeze, - - # TODO: Write general description for AUPOST_CN - AUPOST_CN = 'AUPOST_CN'.freeze, - - # TODO: Write general description for LOGISTERS - LOGISTERS = 'LOGISTERS'.freeze, - - # TODO: Write general description for GOGLOBALPOST - GOGLOBALPOST = 'GOGLOBALPOST'.freeze, - - # TODO: Write general description for GLS_CZ - GLS_CZ = 'GLS_CZ'.freeze, - - # TODO: Write general description for PAACK_WEBHOOK - PAACK_WEBHOOK = 'PAACK_WEBHOOK'.freeze, - - # TODO: Write general description for GRAB_WEBHOOK - GRAB_WEBHOOK = 'GRAB_WEBHOOK'.freeze, - - # TODO: Write general description for PARCELPOINT - PARCELPOINT = 'PARCELPOINT'.freeze, - - # TODO: Write general description for ICUMULUS - ICUMULUS = 'ICUMULUS'.freeze, - - # TODO: Write general description for DAIGLOBALTRACK - DAIGLOBALTRACK = 'DAIGLOBALTRACK'.freeze, - - # TODO: Write general description for GLOBAL_IPARCEL - GLOBAL_IPARCEL = 'GLOBAL_IPARCEL'.freeze, - - # TODO: Write general description for YURTICI_KARGO - YURTICI_KARGO = 'YURTICI_KARGO'.freeze, - - # TODO: Write general description for CN_PAYPAL_PACKAGE - CN_PAYPAL_PACKAGE = 'CN_PAYPAL_PACKAGE'.freeze, - - # TODO: Write general description for PARCEL_2_POST - PARCEL_2_POST = 'PARCEL_2_POST'.freeze, - - # TODO: Write general description for GLS_IT - GLS_IT = 'GLS_IT'.freeze, - - # TODO: Write general description for PIL_LOGISTICS - PIL_LOGISTICS = 'PIL_LOGISTICS'.freeze, - - # TODO: Write general description for HEPPNER - HEPPNER = 'HEPPNER'.freeze, - - # TODO: Write general description for GENERAL_OVERNIGHT - GENERAL_OVERNIGHT = 'GENERAL_OVERNIGHT'.freeze, - - # TODO: Write general description for HAPPY2POINT - HAPPY2POINT = 'HAPPY2POINT'.freeze, - - # TODO: Write general description for CHITCHATS - CHITCHATS = 'CHITCHATS'.freeze, - - # TODO: Write general description for SMOOTH - SMOOTH = 'SMOOTH'.freeze, - - # TODO: Write general description for CLE_LOGISTICS - CLE_LOGISTICS = 'CLE_LOGISTICS'.freeze, - - # TODO: Write general description for FIEGE - FIEGE = 'FIEGE'.freeze, - - # TODO: Write general description for MX_CARGO - MX_CARGO = 'MX_CARGO'.freeze, - - # TODO: Write general description for ZIINGFINALMILE - ZIINGFINALMILE = 'ZIINGFINALMILE'.freeze, - - # TODO: Write general description for DAYTON_FREIGHT - DAYTON_FREIGHT = 'DAYTON_FREIGHT'.freeze, - - # TODO: Write general description for TCS - TCS = 'TCS'.freeze, - - # TODO: Write general description for AEX - AEX = 'AEX'.freeze, - - # TODO: Write general description for HERMES_DE - HERMES_DE = 'HERMES_DE'.freeze, - - # TODO: Write general description for ROUTIFIC_WEBHOOK - ROUTIFIC_WEBHOOK = 'ROUTIFIC_WEBHOOK'.freeze, - - # TODO: Write general description for GLOBAVEND - GLOBAVEND = 'GLOBAVEND'.freeze, - - # TODO: Write general description for CJ_LOGISTICS - CJ_LOGISTICS = 'CJ_LOGISTICS'.freeze, - - # TODO: Write general description for PALLET_NETWORK - PALLET_NETWORK = 'PALLET_NETWORK'.freeze, - - # TODO: Write general description for RAF_PH - RAF_PH = 'RAF_PH'.freeze, - - # TODO: Write general description for UK_XDP - UK_XDP = 'UK_XDP'.freeze, - - # TODO: Write general description for PAPER_EXPRESS - PAPER_EXPRESS = 'PAPER_EXPRESS'.freeze, - - # TODO: Write general description for LA_POSTE_SUIVI - LA_POSTE_SUIVI = 'LA_POSTE_SUIVI'.freeze, - - # TODO: Write general description for PAQUETEXPRESS - PAQUETEXPRESS = 'PAQUETEXPRESS'.freeze, - - # TODO: Write general description for LIEFERY - LIEFERY = 'LIEFERY'.freeze, - - # TODO: Write general description for STRECK_TRANSPORT - STRECK_TRANSPORT = 'STRECK_TRANSPORT'.freeze, - - # TODO: Write general description for PONY_EXPRESS - PONY_EXPRESS = 'PONY_EXPRESS'.freeze, - - # TODO: Write general description for ALWAYS_EXPRESS - ALWAYS_EXPRESS = 'ALWAYS_EXPRESS'.freeze, - - # TODO: Write general description for GBS_BROKER - GBS_BROKER = 'GBS_BROKER'.freeze, - - # TODO: Write general description for CITYLINK_MY - CITYLINK_MY = 'CITYLINK_MY'.freeze, - - # TODO: Write general description for ALLJOY - ALLJOY = 'ALLJOY'.freeze, - - # TODO: Write general description for YODEL - YODEL = 'YODEL'.freeze, - - # TODO: Write general description for YODEL_DIR - YODEL_DIR = 'YODEL_DIR'.freeze, - - # TODO: Write general description for STONE3PL - STONE3PL = 'STONE3PL'.freeze, - - # TODO: Write general description for PARCELPAL_WEBHOOK - PARCELPAL_WEBHOOK = 'PARCELPAL_WEBHOOK'.freeze, - - # TODO: Write general description for DHL_ECOMERCE_ASA - DHL_ECOMERCE_ASA = 'DHL_ECOMERCE_ASA'.freeze, - - # TODO: Write general description for SIMPLYPOST - SIMPLYPOST = 'SIMPLYPOST'.freeze, - - # TODO: Write general description for KY_EXPRESS - KY_EXPRESS = 'KY_EXPRESS'.freeze, - - # TODO: Write general description for SHENZHEN - SHENZHEN = 'SHENZHEN'.freeze, - - # TODO: Write general description for US_LASERSHIP - US_LASERSHIP = 'US_LASERSHIP'.freeze, - - # TODO: Write general description for UC_EXPRE - UC_EXPRE = 'UC_EXPRE'.freeze, - - # TODO: Write general description for DIDADI - DIDADI = 'DIDADI'.freeze, - - # TODO: Write general description for CJ_KR - CJ_KR = 'CJ_KR'.freeze, - - # TODO: Write general description for DBSCHENKER_B2B - DBSCHENKER_B2B = 'DBSCHENKER_B2B'.freeze, - - # TODO: Write general description for MXE - MXE = 'MXE'.freeze, - - # TODO: Write general description for CAE_DELIVERS - CAE_DELIVERS = 'CAE_DELIVERS'.freeze, - - # TODO: Write general description for PFCEXPRESS - PFCEXPRESS = 'PFCEXPRESS'.freeze, - - # TODO: Write general description for WHISTL - WHISTL = 'WHISTL'.freeze, - - # TODO: Write general description for WEPOST - WEPOST = 'WEPOST'.freeze, - - # TODO: Write general description for DHL_PARCEL_ES - DHL_PARCEL_ES = 'DHL_PARCEL_ES'.freeze, - - # TODO: Write general description for DDEXPRESS - DDEXPRESS = 'DDEXPRESS'.freeze, - - # TODO: Write general description for ARAMEX_AU - ARAMEX_AU = 'ARAMEX_AU'.freeze, - - # TODO: Write general description for BNEED - BNEED = 'BNEED'.freeze, - - # TODO: Write general description for HK_TGX - HK_TGX = 'HK_TGX'.freeze, - - # TODO: Write general description for LATVIJAS_PASTS - LATVIJAS_PASTS = 'LATVIJAS_PASTS'.freeze, - - # TODO: Write general description for VIAEUROPE - VIAEUROPE = 'VIAEUROPE'.freeze, - - # TODO: Write general description for CORREO_UY - CORREO_UY = 'CORREO_UY'.freeze, - - # TODO: Write general description for CHRONOPOST_FR - CHRONOPOST_FR = 'CHRONOPOST_FR'.freeze, - - # TODO: Write general description for J_NET - J_NET = 'J_NET'.freeze, - - # TODO: Write general description for _6LS - _6LS = '_6LS'.freeze, - - # TODO: Write general description for BLR_BELPOST - BLR_BELPOST = 'BLR_BELPOST'.freeze, - - # TODO: Write general description for BIRDSYSTEM - BIRDSYSTEM = 'BIRDSYSTEM'.freeze, - - # TODO: Write general description for DOBROPOST - DOBROPOST = 'DOBROPOST'.freeze, - - # TODO: Write general description for WAHANA_ID - WAHANA_ID = 'WAHANA_ID'.freeze, - - # TODO: Write general description for WEASHIP - WEASHIP = 'WEASHIP'.freeze, - - # TODO: Write general description for SONICTL - SONICTL = 'SONICTL'.freeze, - - # TODO: Write general description for KWT - KWT = 'KWT'.freeze, - - # TODO: Write general description for AFLLOG_FTP - AFLLOG_FTP = 'AFLLOG_FTP'.freeze, - - # TODO: Write general description for SKYNET_WORLDWIDE - SKYNET_WORLDWIDE = 'SKYNET_WORLDWIDE'.freeze, - - # TODO: Write general description for NOVA_POSHTA - NOVA_POSHTA = 'NOVA_POSHTA'.freeze, - - # TODO: Write general description for SEINO - SEINO = 'SEINO'.freeze, - - # TODO: Write general description for SZENDEX - SZENDEX = 'SZENDEX'.freeze, - - # TODO: Write general description for BPOST_INT - BPOST_INT = 'BPOST_INT'.freeze, - - # TODO: Write general description for DBSCHENKER_SV - DBSCHENKER_SV = 'DBSCHENKER_SV'.freeze, - - # TODO: Write general description for AO_DEUTSCHLAND - AO_DEUTSCHLAND = 'AO_DEUTSCHLAND'.freeze, - - # TODO: Write general description for EU_FLEET_SOLUTIONS - EU_FLEET_SOLUTIONS = 'EU_FLEET_SOLUTIONS'.freeze, - - # TODO: Write general description for PCFCORP - PCFCORP = 'PCFCORP'.freeze, - - # TODO: Write general description for LINKBRIDGE - LINKBRIDGE = 'LINKBRIDGE'.freeze, - - # TODO: Write general description for PRIMAMULTICIPTA - PRIMAMULTICIPTA = 'PRIMAMULTICIPTA'.freeze, - - # TODO: Write general description for COUREX - COUREX = 'COUREX'.freeze, - - # TODO: Write general description for ZAJIL_EXPRESS - ZAJIL_EXPRESS = 'ZAJIL_EXPRESS'.freeze, - - # TODO: Write general description for COLLECTCO - COLLECTCO = 'COLLECTCO'.freeze, - - # TODO: Write general description for JTEXPRESS - JTEXPRESS = 'JTEXPRESS'.freeze, - - # TODO: Write general description for FEDEX_UK - FEDEX_UK = 'FEDEX_UK'.freeze, - - # TODO: Write general description for USHIP - USHIP = 'USHIP'.freeze, - - # TODO: Write general description for PIXSELL - PIXSELL = 'PIXSELL'.freeze, - - # TODO: Write general description for SHIPTOR - SHIPTOR = 'SHIPTOR'.freeze, - - # TODO: Write general description for CDEK - CDEK = 'CDEK'.freeze, - - # TODO: Write general description for VNM_VIETTELPOST - VNM_VIETTELPOST = 'VNM_VIETTELPOST'.freeze, - - # TODO: Write general description for CJ_CENTURY - CJ_CENTURY = 'CJ_CENTURY'.freeze, - - # TODO: Write general description for GSO - GSO = 'GSO'.freeze, - - # TODO: Write general description for VIWO - VIWO = 'VIWO'.freeze, - - # TODO: Write general description for SKYBOX - SKYBOX = 'SKYBOX'.freeze, - - # TODO: Write general description for KERRYTJ - KERRYTJ = 'KERRYTJ'.freeze, - - # TODO: Write general description for NTLOGISTICS_VN - NTLOGISTICS_VN = 'NTLOGISTICS_VN'.freeze, - - # TODO: Write general description for SDH_SCM - SDH_SCM = 'SDH_SCM'.freeze, - - # TODO: Write general description for ZINC - ZINC = 'ZINC'.freeze, - - # TODO: Write general description for DPE_SOUTH_AFRC - DPE_SOUTH_AFRC = 'DPE_SOUTH_AFRC'.freeze, - - # TODO: Write general description for CESKA_CZ - CESKA_CZ = 'CESKA_CZ'.freeze, - - # TODO: Write general description for ACS_GR - ACS_GR = 'ACS_GR'.freeze, - - # TODO: Write general description for DEALERSEND - DEALERSEND = 'DEALERSEND'.freeze, - - # TODO: Write general description for JOCOM - JOCOM = 'JOCOM'.freeze, - - # TODO: Write general description for CSE - CSE = 'CSE'.freeze, - - # TODO: Write general description for TFORCE_FINALMILE - TFORCE_FINALMILE = 'TFORCE_FINALMILE'.freeze, - - # TODO: Write general description for SHIP_GATE - SHIP_GATE = 'SHIP_GATE'.freeze, - - # TODO: Write general description for SHIPTER - SHIPTER = 'SHIPTER'.freeze, - - # TODO: Write general description for NATIONAL_SAMEDAY - NATIONAL_SAMEDAY = 'NATIONAL_SAMEDAY'.freeze, - - # TODO: Write general description for YUNEXPRESS - YUNEXPRESS = 'YUNEXPRESS'.freeze, - - # TODO: Write general description for CAINIAO - CAINIAO = 'CAINIAO'.freeze, - - # TODO: Write general description for DMS_MATRIX - DMS_MATRIX = 'DMS_MATRIX'.freeze, - - # TODO: Write general description for DIRECTLOG - DIRECTLOG = 'DIRECTLOG'.freeze, - - # TODO: Write general description for ASENDIA_US - ASENDIA_US = 'ASENDIA_US'.freeze, - - # TODO: Write general description for _3JMSLOGISTICS - _3JMSLOGISTICS = '_3JMSLOGISTICS'.freeze, - - # TODO: Write general description for LICCARDI_EXPRESS - LICCARDI_EXPRESS = 'LICCARDI_EXPRESS'.freeze, - - # TODO: Write general description for SKY_POSTAL - SKY_POSTAL = 'SKY_POSTAL'.freeze, - - # TODO: Write general description for CNWANGTONG - CNWANGTONG = 'CNWANGTONG'.freeze, - - # TODO: Write general description for POSTNORD_LOGISTICS_DK - POSTNORD_LOGISTICS_DK = 'POSTNORD_LOGISTICS_DK'.freeze, - - # TODO: Write general description for LOGISTIKA - LOGISTIKA = 'LOGISTIKA'.freeze, - - # TODO: Write general description for CELERITAS - CELERITAS = 'CELERITAS'.freeze, - - # TODO: Write general description for PRESSIODE - PRESSIODE = 'PRESSIODE'.freeze, - - # TODO: Write general description for SHREE_MARUTI - SHREE_MARUTI = 'SHREE_MARUTI'.freeze, - - # TODO: Write general description for LOGISTICSWORLDWIDE_HK - LOGISTICSWORLDWIDE_HK = 'LOGISTICSWORLDWIDE_HK'.freeze, - - # TODO: Write general description for EFEX - EFEX = 'EFEX'.freeze, - - # TODO: Write general description for LOTTE - LOTTE = 'LOTTE'.freeze, - - # TODO: Write general description for LONESTAR - LONESTAR = 'LONESTAR'.freeze, - - # TODO: Write general description for APRISAEXPRESS - APRISAEXPRESS = 'APRISAEXPRESS'.freeze, - - # TODO: Write general description for BEL_RS - BEL_RS = 'BEL_RS'.freeze, - - # TODO: Write general description for OSM_WORLDWIDE - OSM_WORLDWIDE = 'OSM_WORLDWIDE'.freeze, - - # TODO: Write general description for WESTGATE_GL - WESTGATE_GL = 'WESTGATE_GL'.freeze, - - # TODO: Write general description for FASTRACK - FASTRACK = 'FASTRACK'.freeze, - - # TODO: Write general description for DTD_EXPR - DTD_EXPR = 'DTD_EXPR'.freeze, - - # TODO: Write general description for ALFATREX - ALFATREX = 'ALFATREX'.freeze, - - # TODO: Write general description for PROMEDDELIVERY - PROMEDDELIVERY = 'PROMEDDELIVERY'.freeze, - - # TODO: Write general description for THABIT_LOGISTICS - THABIT_LOGISTICS = 'THABIT_LOGISTICS'.freeze, - - # TODO: Write general description for HCT_LOGISTICS - HCT_LOGISTICS = 'HCT_LOGISTICS'.freeze, - - # TODO: Write general description for CARRY_FLAP - CARRY_FLAP = 'CARRY_FLAP'.freeze, - - # TODO: Write general description for US_OLD_DOMINION - US_OLD_DOMINION = 'US_OLD_DOMINION'.freeze, - - # TODO: Write general description for ANICAM_BOX - ANICAM_BOX = 'ANICAM_BOX'.freeze, - - # TODO: Write general description for WANBEXPRESS - WANBEXPRESS = 'WANBEXPRESS'.freeze, - - # TODO: Write general description for AN_POST - AN_POST = 'AN_POST'.freeze, - - # TODO: Write general description for DPD_LOCAL - DPD_LOCAL = 'DPD_LOCAL'.freeze, - - # TODO: Write general description for STALLIONEXPRESS - STALLIONEXPRESS = 'STALLIONEXPRESS'.freeze, - - # TODO: Write general description for RAIDEREX - RAIDEREX = 'RAIDEREX'.freeze, - - # TODO: Write general description for SHOPFANS - SHOPFANS = 'SHOPFANS'.freeze, - - # TODO: Write general description for KYUNGDONG_PARCEL - KYUNGDONG_PARCEL = 'KYUNGDONG_PARCEL'.freeze, - - # TODO: Write general description for CHAMPION_LOGISTICS - CHAMPION_LOGISTICS = 'CHAMPION_LOGISTICS'.freeze, - - # TODO: Write general description for PICKUPP_SGP - PICKUPP_SGP = 'PICKUPP_SGP'.freeze, - - # TODO: Write general description for MORNING_EXPRESS - MORNING_EXPRESS = 'MORNING_EXPRESS'.freeze, - - # TODO: Write general description for NACEX - NACEX = 'NACEX'.freeze, - - # TODO: Write general description for THENILE_WEBHOOK - THENILE_WEBHOOK = 'THENILE_WEBHOOK'.freeze, - - # TODO: Write general description for HOLISOL - HOLISOL = 'HOLISOL'.freeze, - - # TODO: Write general description for LBCEXPRESS_FTP - LBCEXPRESS_FTP = 'LBCEXPRESS_FTP'.freeze, - - # TODO: Write general description for KURASI - KURASI = 'KURASI'.freeze, - - # TODO: Write general description for USF_REDDAWAY - USF_REDDAWAY = 'USF_REDDAWAY'.freeze, - - # TODO: Write general description for APG - APG = 'APG'.freeze, - - # TODO: Write general description for CN_BOXC - CN_BOXC = 'CN_BOXC'.freeze, - - # TODO: Write general description for ECOSCOOTING - ECOSCOOTING = 'ECOSCOOTING'.freeze, - - # TODO: Write general description for MAINWAY - MAINWAY = 'MAINWAY'.freeze, - - # TODO: Write general description for PAPERFLY - PAPERFLY = 'PAPERFLY'.freeze, - - # TODO: Write general description for HOUNDEXPRESS - HOUNDEXPRESS = 'HOUNDEXPRESS'.freeze, - - # TODO: Write general description for BOX_BERRY - BOX_BERRY = 'BOX_BERRY'.freeze, - - # TODO: Write general description for EP_BOX - EP_BOX = 'EP_BOX'.freeze, - - # TODO: Write general description for PLUS_LOG_UK - PLUS_LOG_UK = 'PLUS_LOG_UK'.freeze, - - # TODO: Write general description for FULFILLA - FULFILLA = 'FULFILLA'.freeze, - - # TODO: Write general description for ASE - ASE = 'ASE'.freeze, - - # TODO: Write general description for MAIL_PLUS - MAIL_PLUS = 'MAIL_PLUS'.freeze, - - # TODO: Write general description for XPO_LOGISTICS - XPO_LOGISTICS = 'XPO_LOGISTICS'.freeze, - - # TODO: Write general description for WNDIRECT - WNDIRECT = 'WNDIRECT'.freeze, - - # TODO: Write general description for CLOUDWISH_ASIA - CLOUDWISH_ASIA = 'CLOUDWISH_ASIA'.freeze, - - # TODO: Write general description for ZELERIS - ZELERIS = 'ZELERIS'.freeze, - - # TODO: Write general description for GIO_EXPRESS - GIO_EXPRESS = 'GIO_EXPRESS'.freeze, - - # TODO: Write general description for OCS_WORLDWIDE - OCS_WORLDWIDE = 'OCS_WORLDWIDE'.freeze, - - # TODO: Write general description for ARK_LOGISTICS - ARK_LOGISTICS = 'ARK_LOGISTICS'.freeze, - - # TODO: Write general description for AQUILINE - AQUILINE = 'AQUILINE'.freeze, - - # TODO: Write general description for PILOT_FREIGHT - PILOT_FREIGHT = 'PILOT_FREIGHT'.freeze, - - # TODO: Write general description for QWINTRY - QWINTRY = 'QWINTRY'.freeze, - - # TODO: Write general description for DANSKE_FRAGT - DANSKE_FRAGT = 'DANSKE_FRAGT'.freeze, - - # TODO: Write general description for CARRIERS - CARRIERS = 'CARRIERS'.freeze, - - # TODO: Write general description for AIR_CANADA_GLOBAL - AIR_CANADA_GLOBAL = 'AIR_CANADA_GLOBAL'.freeze, - - # TODO: Write general description for PRESIDENT_TRANS - PRESIDENT_TRANS = 'PRESIDENT_TRANS'.freeze, - - # TODO: Write general description for STEPFORWARDFS - STEPFORWARDFS = 'STEPFORWARDFS'.freeze, - - # TODO: Write general description for SKYNET_UK - SKYNET_UK = 'SKYNET_UK'.freeze, - - # TODO: Write general description for PITTOHIO - PITTOHIO = 'PITTOHIO'.freeze, - - # TODO: Write general description for CORREOS_EXPRESS - CORREOS_EXPRESS = 'CORREOS_EXPRESS'.freeze, - - # TODO: Write general description for RL_US - RL_US = 'RL_US'.freeze, - - # TODO: Write general description for MARA_XPRESS - MARA_XPRESS = 'MARA_XPRESS'.freeze, - - # TODO: Write general description for DESTINY - DESTINY = 'DESTINY'.freeze, - - # TODO: Write general description for UK_YODEL - UK_YODEL = 'UK_YODEL'.freeze, - - # TODO: Write general description for COMET_TECH - COMET_TECH = 'COMET_TECH'.freeze, - - # TODO: Write general description for DHL_PARCEL_RU - DHL_PARCEL_RU = 'DHL_PARCEL_RU'.freeze, - - # TODO: Write general description for TNT_REFR - TNT_REFR = 'TNT_REFR'.freeze, - - # TODO: Write general description for SHREE_ANJANI_COURIER - SHREE_ANJANI_COURIER = 'SHREE_ANJANI_COURIER'.freeze, - - # TODO: Write general description for MIKROPAKKET_BE - MIKROPAKKET_BE = 'MIKROPAKKET_BE'.freeze, - - # TODO: Write general description for ETS_EXPRESS - ETS_EXPRESS = 'ETS_EXPRESS'.freeze, - - # TODO: Write general description for COLIS_PRIVE - COLIS_PRIVE = 'COLIS_PRIVE'.freeze, - - # TODO: Write general description for CN_YUNDA - CN_YUNDA = 'CN_YUNDA'.freeze, - - # TODO: Write general description for AAA_COOPER - AAA_COOPER = 'AAA_COOPER'.freeze, - - # TODO: Write general description for ROCKET_PARCEL - ROCKET_PARCEL = 'ROCKET_PARCEL'.freeze, - - # TODO: Write general description for _360LION - _360LION = '_360LION'.freeze, - - # TODO: Write general description for PANDU - PANDU = 'PANDU'.freeze, - - # TODO: Write general description for PROFESSIONAL_COURIERS - PROFESSIONAL_COURIERS = 'PROFESSIONAL_COURIERS'.freeze, - - # TODO: Write general description for FLYTEXPRESS - FLYTEXPRESS = 'FLYTEXPRESS'.freeze, - - # TODO: Write general description for LOGISTICSWORLDWIDE_MY - LOGISTICSWORLDWIDE_MY = 'LOGISTICSWORLDWIDE_MY'.freeze, - - # TODO: Write general description for CORREOS_DE_ESPANA - CORREOS_DE_ESPANA = 'CORREOS_DE_ESPANA'.freeze, - - # TODO: Write general description for IMX - IMX = 'IMX'.freeze, - - # TODO: Write general description for FOUR_PX_EXPRESS - FOUR_PX_EXPRESS = 'FOUR_PX_EXPRESS'.freeze, - - # TODO: Write general description for XPRESSBEES - XPRESSBEES = 'XPRESSBEES'.freeze, - - # TODO: Write general description for PICKUPP_VNM - PICKUPP_VNM = 'PICKUPP_VNM'.freeze, - - # TODO: Write general description for STARTRACK_EXPRESS1 - STARTRACK_EXPRESS1 = 'STARTRACK_EXPRESS'.freeze, - - # TODO: Write general description for FR_COLISSIMO - FR_COLISSIMO = 'FR_COLISSIMO'.freeze, - - # TODO: Write general description for NACEX_SPAIN_REFERENCE - NACEX_SPAIN_REFERENCE = 'NACEX_SPAIN_REFERENCE'.freeze, - - # TODO: Write general description for DHL_SUPPLY_CHAIN_AU - DHL_SUPPLY_CHAIN_AU = 'DHL_SUPPLY_CHAIN_AU'.freeze, - - # TODO: Write general description for ESHIPPING - ESHIPPING = 'ESHIPPING'.freeze, - - # TODO: Write general description for SHREETIRUPATI - SHREETIRUPATI = 'SHREETIRUPATI'.freeze, - - # TODO: Write general description for HX_EXPRESS - HX_EXPRESS = 'HX_EXPRESS'.freeze, - - # TODO: Write general description for INDOPAKET - INDOPAKET = 'INDOPAKET'.freeze, - - # TODO: Write general description for CN_17POST - CN_17POST = 'CN_17POST'.freeze, - - # TODO: Write general description for K1_EXPRESS - K1_EXPRESS = 'K1_EXPRESS'.freeze, - - # TODO: Write general description for CJ_GLS - CJ_GLS = 'CJ_GLS'.freeze, - - # TODO: Write general description for MYS_GDEX - MYS_GDEX = 'MYS_GDEX'.freeze, - - # TODO: Write general description for NATIONEX - NATIONEX = 'NATIONEX'.freeze, - - # TODO: Write general description for ANJUN - ANJUN = 'ANJUN'.freeze, - - # TODO: Write general description for FARGOOD - FARGOOD = 'FARGOOD'.freeze, - - # TODO: Write general description for SMG_EXPRESS - SMG_EXPRESS = 'SMG_EXPRESS'.freeze, - - # TODO: Write general description for RZYEXPRESS - RZYEXPRESS = 'RZYEXPRESS'.freeze, - - # TODO: Write general description for SEFL - SEFL = 'SEFL'.freeze, - - # TODO: Write general description for TNT_CLICK_IT - TNT_CLICK_IT = 'TNT_CLICK_IT'.freeze, - - # TODO: Write general description for HDB - HDB = 'HDB'.freeze, - - # TODO: Write general description for HIPSHIPPER - HIPSHIPPER = 'HIPSHIPPER'.freeze, - - # TODO: Write general description for RPXLOGISTICS - RPXLOGISTICS = 'RPXLOGISTICS'.freeze, - - # TODO: Write general description for KUEHNE - KUEHNE = 'KUEHNE'.freeze, - - # TODO: Write general description for IT_NEXIVE - IT_NEXIVE = 'IT_NEXIVE'.freeze, - - # TODO: Write general description for PTS - PTS = 'PTS'.freeze, - - # TODO: Write general description for SWISS_POST_FTP - SWISS_POST_FTP = 'SWISS_POST_FTP'.freeze, - - # TODO: Write general description for FASTRK_SERV - FASTRK_SERV = 'FASTRK_SERV'.freeze, - - # TODO: Write general description for _4_72 - _4_72 = '_4_72'.freeze, - - # TODO: Write general description for US_YRC - US_YRC = 'US_YRC'.freeze, - - # TODO: Write general description for POSTNL_INTL_3S - POSTNL_INTL_3S = 'POSTNL_INTL_3S'.freeze, - - # TODO: Write general description for ELIAN_POST - ELIAN_POST = 'ELIAN_POST'.freeze, - - # TODO: Write general description for CUBYN - CUBYN = 'CUBYN'.freeze, - - # TODO: Write general description for SAU_SAUDI_POST - SAU_SAUDI_POST = 'SAU_SAUDI_POST'.freeze, - - # TODO: Write general description for ABXEXPRESS_MY - ABXEXPRESS_MY = 'ABXEXPRESS_MY'.freeze, - - # TODO: Write general description for HUAHAN_EXPRESS - HUAHAN_EXPRESS = 'HUAHAN_EXPRESS'.freeze, - - # TODO: Write general description for IND_JAYONEXPRESS - IND_JAYONEXPRESS = 'IND_JAYONEXPRESS'.freeze, - - # TODO: Write general description for ZES_EXPRESS - ZES_EXPRESS = 'ZES_EXPRESS'.freeze, - - # TODO: Write general description for ZEPTO_EXPRESS - ZEPTO_EXPRESS = 'ZEPTO_EXPRESS'.freeze, - - # TODO: Write general description for SKYNET_ZA - SKYNET_ZA = 'SKYNET_ZA'.freeze, - - # TODO: Write general description for ZEEK_2_DOOR - ZEEK_2_DOOR = 'ZEEK_2_DOOR'.freeze, - - # TODO: Write general description for BLINKLASTMILE - BLINKLASTMILE = 'BLINKLASTMILE'.freeze, - - # TODO: Write general description for POSTA_UKR - POSTA_UKR = 'POSTA_UKR'.freeze, - - # TODO: Write general description for CHROBINSON - CHROBINSON = 'CHROBINSON'.freeze, - - # TODO: Write general description for CN_POST56 - CN_POST56 = 'CN_POST56'.freeze, - - # TODO: Write general description for COURANT_PLUS - COURANT_PLUS = 'COURANT_PLUS'.freeze, - - # TODO: Write general description for SCUDEX_EXPRESS - SCUDEX_EXPRESS = 'SCUDEX_EXPRESS'.freeze, - - # TODO: Write general description for SHIPENTEGRA - SHIPENTEGRA = 'SHIPENTEGRA'.freeze, - - # TODO: Write general description for B_TWO_C_EUROPE - B_TWO_C_EUROPE = 'B_TWO_C_EUROPE'.freeze, - - # TODO: Write general description for COPE - COPE = 'COPE'.freeze, - - # TODO: Write general description for IND_GATI - IND_GATI = 'IND_GATI'.freeze, - - # TODO: Write general description for CN_WISHPOST - CN_WISHPOST = 'CN_WISHPOST'.freeze, - - # TODO: Write general description for NACEX_ES - NACEX_ES = 'NACEX_ES'.freeze, - - # TODO: Write general description for TAQBIN_HK - TAQBIN_HK = 'TAQBIN_HK'.freeze, - - # TODO: Write general description for GLOBALTRANZ - GLOBALTRANZ = 'GLOBALTRANZ'.freeze, - - # TODO: Write general description for HKD - HKD = 'HKD'.freeze, - - # TODO: Write general description for BJSHOMEDELIVERY - BJSHOMEDELIVERY = 'BJSHOMEDELIVERY'.freeze, - - # TODO: Write general description for OMNIVA - OMNIVA = 'OMNIVA'.freeze, - - # TODO: Write general description for SUTTON - SUTTON = 'SUTTON'.freeze, - - # TODO: Write general description for PANTHER_REFERENCE - PANTHER_REFERENCE = 'PANTHER_REFERENCE'.freeze, - - # TODO: Write general description for SFCSERVICE - SFCSERVICE = 'SFCSERVICE'.freeze, - - # TODO: Write general description for LTL - LTL = 'LTL'.freeze, - - # TODO: Write general description for PARKNPARCEL - PARKNPARCEL = 'PARKNPARCEL'.freeze, - - # TODO: Write general description for SPRING_GDS - SPRING_GDS = 'SPRING_GDS'.freeze, - - # TODO: Write general description for ECEXPRESS - ECEXPRESS = 'ECEXPRESS'.freeze, - - # TODO: Write general description for INTERPARCEL_AU - INTERPARCEL_AU = 'INTERPARCEL_AU'.freeze, - - # TODO: Write general description for AGILITY - AGILITY = 'AGILITY'.freeze, - - # TODO: Write general description for XL_EXPRESS - XL_EXPRESS = 'XL_EXPRESS'.freeze, - - # TODO: Write general description for ADERONLINE - ADERONLINE = 'ADERONLINE'.freeze, - - # TODO: Write general description for DIRECTCOURIERS - DIRECTCOURIERS = 'DIRECTCOURIERS'.freeze, - - # TODO: Write general description for PLANZER - PLANZER = 'PLANZER'.freeze, - - # TODO: Write general description for SENDING - SENDING = 'SENDING'.freeze, - - # TODO: Write general description for NINJAVAN_WB - NINJAVAN_WB = 'NINJAVAN_WB'.freeze, - - # TODO: Write general description for NATIONWIDE_MY - NATIONWIDE_MY = 'NATIONWIDE_MY'.freeze, - - # TODO: Write general description for SENDIT - SENDIT = 'SENDIT'.freeze, - - # TODO: Write general description for GB_ARROW - GB_ARROW = 'GB_ARROW'.freeze, - - # TODO: Write general description for IND_GOJAVAS - IND_GOJAVAS = 'IND_GOJAVAS'.freeze, - - # TODO: Write general description for KPOST - KPOST = 'KPOST'.freeze, - - # TODO: Write general description for DHL_FREIGHT - DHL_FREIGHT = 'DHL_FREIGHT'.freeze, - - # TODO: Write general description for BLUECARE - BLUECARE = 'BLUECARE'.freeze, - - # TODO: Write general description for JINDOUYUN - JINDOUYUN = 'JINDOUYUN'.freeze, - - # TODO: Write general description for TRACKON - TRACKON = 'TRACKON'.freeze, - - # TODO: Write general description for GB_TUFFNELLS - GB_TUFFNELLS = 'GB_TUFFNELLS'.freeze, - - # TODO: Write general description for TRUMPCARD - TRUMPCARD = 'TRUMPCARD'.freeze, - - # TODO: Write general description for ETOTAL - ETOTAL = 'ETOTAL'.freeze, - - # TODO: Write general description for SFPLUS_WEBHOOK - SFPLUS_WEBHOOK = 'SFPLUS_WEBHOOK'.freeze, - - # TODO: Write general description for SEKOLOGISTICS - SEKOLOGISTICS = 'SEKOLOGISTICS'.freeze, - - # TODO: Write general description for HERMES_2MANN_HANDLING - HERMES_2MANN_HANDLING = 'HERMES_2MANN_HANDLING'.freeze, - - # TODO: Write general description for DPD_LOCAL_REF - DPD_LOCAL_REF = 'DPD_LOCAL_REF'.freeze, - - # TODO: Write general description for UDS - UDS = 'UDS'.freeze, - - # TODO: Write general description for ZA_SPECIALISED_FREIGHT - ZA_SPECIALISED_FREIGHT = 'ZA_SPECIALISED_FREIGHT'.freeze, - - # TODO: Write general description for THA_KERRY - THA_KERRY = 'THA_KERRY'.freeze, - - # TODO: Write general description for PRT_INT_SEUR - PRT_INT_SEUR = 'PRT_INT_SEUR'.freeze, - - # TODO: Write general description for BRA_CORREIOS - BRA_CORREIOS = 'BRA_CORREIOS'.freeze, - - # TODO: Write general description for NZ_NZ_POST - NZ_NZ_POST = 'NZ_NZ_POST'.freeze, - - # TODO: Write general description for CN_EQUICK - CN_EQUICK = 'CN_EQUICK'.freeze, - - # TODO: Write general description for MYS_EMS - MYS_EMS = 'MYS_EMS'.freeze, - - # TODO: Write general description for GB_NORSK - GB_NORSK = 'GB_NORSK'.freeze, - - # TODO: Write general description for ESP_MRW - ESP_MRW = 'ESP_MRW'.freeze, - - # TODO: Write general description for ESP_PACKLINK - ESP_PACKLINK = 'ESP_PACKLINK'.freeze, - - # TODO: Write general description for KANGAROO_MY - KANGAROO_MY = 'KANGAROO_MY'.freeze, - - # TODO: Write general description for RPX - RPX = 'RPX'.freeze, - - # TODO: Write general description for XDP_UK_REFERENCE - XDP_UK_REFERENCE = 'XDP_UK_REFERENCE'.freeze, - - # TODO: Write general description for NINJAVAN_MY - NINJAVAN_MY = 'NINJAVAN_MY'.freeze, - - # TODO: Write general description for ADICIONAL - ADICIONAL = 'ADICIONAL'.freeze, - - # TODO: Write general description for NINJAVAN_ID - NINJAVAN_ID = 'NINJAVAN_ID'.freeze, - - # TODO: Write general description for ROADBULL - ROADBULL = 'ROADBULL'.freeze, - - # TODO: Write general description for YAKIT - YAKIT = 'YAKIT'.freeze, - - # TODO: Write general description for MAILAMERICAS - MAILAMERICAS = 'MAILAMERICAS'.freeze, - - # TODO: Write general description for MIKROPAKKET - MIKROPAKKET = 'MIKROPAKKET'.freeze, - - # TODO: Write general description for DYNALOGIC - DYNALOGIC = 'DYNALOGIC'.freeze, - - # TODO: Write general description for DHL_ES - DHL_ES = 'DHL_ES'.freeze, - - # TODO: Write general description for DHL_PARCEL_NL - DHL_PARCEL_NL = 'DHL_PARCEL_NL'.freeze, - - # TODO: Write general description for DHL_GLOBAL_MAIL_ASIA - DHL_GLOBAL_MAIL_ASIA = 'DHL_GLOBAL_MAIL_ASIA'.freeze, - - # TODO: Write general description for DAWN_WING - DAWN_WING = 'DAWN_WING'.freeze, - - # TODO: Write general description for GENIKI_GR - GENIKI_GR = 'GENIKI_GR'.freeze, - - # TODO: Write general description for HERMESWORLD_UK - HERMESWORLD_UK = 'HERMESWORLD_UK'.freeze, - - # TODO: Write general description for ALPHAFAST - ALPHAFAST = 'ALPHAFAST'.freeze, - - # TODO: Write general description for BUYLOGIC - BUYLOGIC = 'BUYLOGIC'.freeze, - - # TODO: Write general description for EKART - EKART = 'EKART'.freeze, - - # TODO: Write general description for MEX_SENDA - MEX_SENDA = 'MEX_SENDA'.freeze, - - # TODO: Write general description for SFC_LOGISTICS - SFC_LOGISTICS = 'SFC_LOGISTICS'.freeze, - - # TODO: Write general description for POST_SERBIA - POST_SERBIA = 'POST_SERBIA'.freeze, - - # TODO: Write general description for IND_DELHIVERY - IND_DELHIVERY = 'IND_DELHIVERY'.freeze, - - # TODO: Write general description for DE_DPD_DELISTRACK - DE_DPD_DELISTRACK = 'DE_DPD_DELISTRACK'.freeze, - - # TODO: Write general description for RPD2MAN - RPD2MAN = 'RPD2MAN'.freeze, - - # TODO: Write general description for CN_SF_EXPRESS - CN_SF_EXPRESS = 'CN_SF_EXPRESS'.freeze, - - # TODO: Write general description for YANWEN - YANWEN = 'YANWEN'.freeze, - - # TODO: Write general description for MYS_SKYNET - MYS_SKYNET = 'MYS_SKYNET'.freeze, - - # TODO: Write general description for CORREOS_DE_MEXICO - CORREOS_DE_MEXICO = 'CORREOS_DE_MEXICO'.freeze, - - # TODO: Write general description for CBL_LOGISTICA - CBL_LOGISTICA = 'CBL_LOGISTICA'.freeze, - - # TODO: Write general description for MEX_ESTAFETA - MEX_ESTAFETA = 'MEX_ESTAFETA'.freeze, - - # TODO: Write general description for AU_AUSTRIAN_POST - AU_AUSTRIAN_POST = 'AU_AUSTRIAN_POST'.freeze, - - # TODO: Write general description for RINCOS - RINCOS = 'RINCOS'.freeze, - - # TODO: Write general description for NLD_DHL - NLD_DHL = 'NLD_DHL'.freeze, - - # TODO: Write general description for RUSSIAN_POST - RUSSIAN_POST = 'RUSSIAN_POST'.freeze, - - # TODO: Write general description for COURIERS_PLEASE - COURIERS_PLEASE = 'COURIERS_PLEASE'.freeze, - - # TODO: Write general description for POSTNORD_LOGISTICS - POSTNORD_LOGISTICS = 'POSTNORD_LOGISTICS'.freeze, - - # TODO: Write general description for FEDEX - FEDEX = 'FEDEX'.freeze, - - # TODO: Write general description for DPE_EXPRESS - DPE_EXPRESS = 'DPE_EXPRESS'.freeze, - - # TODO: Write general description for DPD - DPD = 'DPD'.freeze, - - # TODO: Write general description for ADSONE - ADSONE = 'ADSONE'.freeze, - - # TODO: Write general description for IDN_JNE - IDN_JNE = 'IDN_JNE'.freeze, - - # TODO: Write general description for THECOURIERGUY - THECOURIERGUY = 'THECOURIERGUY'.freeze, - - # TODO: Write general description for CNEXPS - CNEXPS = 'CNEXPS'.freeze, - - # TODO: Write general description for PRT_CHRONOPOST - PRT_CHRONOPOST = 'PRT_CHRONOPOST'.freeze, - - # TODO: Write general description for LANDMARK_GLOBAL - LANDMARK_GLOBAL = 'LANDMARK_GLOBAL'.freeze, - - # TODO: Write general description for IT_DHL_ECOMMERCE - IT_DHL_ECOMMERCE = 'IT_DHL_ECOMMERCE'.freeze, - - # TODO: Write general description for ESP_NACEX - ESP_NACEX = 'ESP_NACEX'.freeze, - - # TODO: Write general description for PRT_CTT - PRT_CTT = 'PRT_CTT'.freeze, - - # TODO: Write general description for BE_KIALA - BE_KIALA = 'BE_KIALA'.freeze, - - # TODO: Write general description for ASENDIA_UK - ASENDIA_UK = 'ASENDIA_UK'.freeze, - - # TODO: Write general description for GLOBAL_TNT - GLOBAL_TNT = 'GLOBAL_TNT'.freeze, - - # TODO: Write general description for POSTUR_IS - POSTUR_IS = 'POSTUR_IS'.freeze, - - # TODO: Write general description for EPARCEL_KR - EPARCEL_KR = 'EPARCEL_KR'.freeze, - - # TODO: Write general description for INPOST_PACZKOMATY - INPOST_PACZKOMATY = 'INPOST_PACZKOMATY'.freeze, - - # TODO: Write general description for IT_POSTE_ITALIA - IT_POSTE_ITALIA = 'IT_POSTE_ITALIA'.freeze, - - # TODO: Write general description for BE_BPOST - BE_BPOST = 'BE_BPOST'.freeze, - - # TODO: Write general description for PL_POCZTA_POLSKA - PL_POCZTA_POLSKA = 'PL_POCZTA_POLSKA'.freeze, - - # TODO: Write general description for MYS_MYS_POST - MYS_MYS_POST = 'MYS_MYS_POST'.freeze, - - # TODO: Write general description for SG_SG_POST - SG_SG_POST = 'SG_SG_POST'.freeze, - - # TODO: Write general description for THA_THAILAND_POST - THA_THAILAND_POST = 'THA_THAILAND_POST'.freeze, - - # TODO: Write general description for LEXSHIP - LEXSHIP = 'LEXSHIP'.freeze, - - # TODO: Write general description for FASTWAY_NZ - FASTWAY_NZ = 'FASTWAY_NZ'.freeze, - - # TODO: Write general description for DHL_AU - DHL_AU = 'DHL_AU'.freeze, - - # TODO: Write general description for COSTMETICSNOW - COSTMETICSNOW = 'COSTMETICSNOW'.freeze, - - # TODO: Write general description for PFLOGISTICS - PFLOGISTICS = 'PFLOGISTICS'.freeze, - - # TODO: Write general description for LOOMIS_EXPRESS - LOOMIS_EXPRESS = 'LOOMIS_EXPRESS'.freeze, - - # TODO: Write general description for GLS_ITALY - GLS_ITALY = 'GLS_ITALY'.freeze, - - # TODO: Write general description for LINE - LINE = 'LINE'.freeze, - - # TODO: Write general description for GEL_EXPRESS - GEL_EXPRESS = 'GEL_EXPRESS'.freeze, - - # TODO: Write general description for HUODULL - HUODULL = 'HUODULL'.freeze, - - # TODO: Write general description for NINJAVAN_SG - NINJAVAN_SG = 'NINJAVAN_SG'.freeze, - - # TODO: Write general description for JANIO - JANIO = 'JANIO'.freeze, - - # TODO: Write general description for AO_COURIER - AO_COURIER = 'AO_COURIER'.freeze, - - # TODO: Write general description for BRT_IT_SENDER_REF - BRT_IT_SENDER_REF = 'BRT_IT_SENDER_REF'.freeze, - - # TODO: Write general description for SAILPOST - SAILPOST = 'SAILPOST'.freeze, - - # TODO: Write general description for LALAMOVE - LALAMOVE = 'LALAMOVE'.freeze, - - # TODO: Write general description for NEWZEALAND_COURIERS - NEWZEALAND_COURIERS = 'NEWZEALAND_COURIERS'.freeze, - - # TODO: Write general description for ETOMARS - ETOMARS = 'ETOMARS'.freeze, - - # TODO: Write general description for VIRTRANSPORT - VIRTRANSPORT = 'VIRTRANSPORT'.freeze, - - # TODO: Write general description for WIZMO - WIZMO = 'WIZMO'.freeze, - - # TODO: Write general description for PALLETWAYS - PALLETWAYS = 'PALLETWAYS'.freeze, - - # TODO: Write general description for I_DIKA - I_DIKA = 'I_DIKA'.freeze, - - # TODO: Write general description for CFL_LOGISTICS - CFL_LOGISTICS = 'CFL_LOGISTICS'.freeze, - - # TODO: Write general description for GEMWORLDWIDE - GEMWORLDWIDE = 'GEMWORLDWIDE'.freeze, - - # TODO: Write general description for GLOBAL_EXPRESS - GLOBAL_EXPRESS = 'GLOBAL_EXPRESS'.freeze, - - # TODO: Write general description for LOGISTYX_TRANSGROUP - LOGISTYX_TRANSGROUP = 'LOGISTYX_TRANSGROUP'.freeze, - - # TODO: Write general description for WESTBANK_COURIER - WESTBANK_COURIER = 'WESTBANK_COURIER'.freeze, - - # TODO: Write general description for ARCO_SPEDIZIONI - ARCO_SPEDIZIONI = 'ARCO_SPEDIZIONI'.freeze, - - # TODO: Write general description for YDH_EXPRESS - YDH_EXPRESS = 'YDH_EXPRESS'.freeze, - - # TODO: Write general description for PARCELINKLOGISTICS - PARCELINKLOGISTICS = 'PARCELINKLOGISTICS'.freeze, - - # TODO: Write general description for CNDEXPRESS - CNDEXPRESS = 'CNDEXPRESS'.freeze, - - # TODO: Write general description for NOX_NIGHT_TIME_EXPRESS - NOX_NIGHT_TIME_EXPRESS = 'NOX_NIGHT_TIME_EXPRESS'.freeze, - - # TODO: Write general description for AERONET - AERONET = 'AERONET'.freeze, - - # TODO: Write general description for LTIANEXP - LTIANEXP = 'LTIANEXP'.freeze, - - # TODO: Write general description for INTEGRA2_FTP - INTEGRA2_FTP = 'INTEGRA2_FTP'.freeze, - - # TODO: Write general description for PARCELONE - PARCELONE = 'PARCELONE'.freeze, - - # TODO: Write general description for NOX_NACHTEXPRESS - NOX_NACHTEXPRESS = 'NOX_NACHTEXPRESS'.freeze, - - # TODO: Write general description for CN_CHINA_POST_EMS - CN_CHINA_POST_EMS = 'CN_CHINA_POST_EMS'.freeze, - - # TODO: Write general description for CHUKOU1 - CHUKOU1 = 'CHUKOU1'.freeze, - - # TODO: Write general description for GLS_SLOV - GLS_SLOV = 'GLS_SLOV'.freeze, - - # TODO: Write general description for ORANGE_DS - ORANGE_DS = 'ORANGE_DS'.freeze, - - # TODO: Write general description for JOOM_LOGIS - JOOM_LOGIS = 'JOOM_LOGIS'.freeze, - - # TODO: Write general description for AUS_STARTRACK - AUS_STARTRACK = 'AUS_STARTRACK'.freeze, - - # TODO: Write general description for DHL - DHL = 'DHL'.freeze, - - # TODO: Write general description for GB_APC - GB_APC = 'GB_APC'.freeze, - - # TODO: Write general description for BONDSCOURIERS - BONDSCOURIERS = 'BONDSCOURIERS'.freeze, - - # TODO: Write general description for JPN_JAPAN_POST - JPN_JAPAN_POST = 'JPN_JAPAN_POST'.freeze, - - # TODO: Write general description for USPS - USPS = 'USPS'.freeze, - - # TODO: Write general description for WINIT - WINIT = 'WINIT'.freeze, - - # TODO: Write general description for ARG_OCA - ARG_OCA = 'ARG_OCA'.freeze, - - # TODO: Write general description for TW_TAIWAN_POST - TW_TAIWAN_POST = 'TW_TAIWAN_POST'.freeze, - - # TODO: Write general description for DMM_NETWORK - DMM_NETWORK = 'DMM_NETWORK'.freeze, - - # TODO: Write general description for TNT - TNT = 'TNT'.freeze, - - # TODO: Write general description for BH_POSTA - BH_POSTA = 'BH_POSTA'.freeze, - - # TODO: Write general description for SWE_POSTNORD - SWE_POSTNORD = 'SWE_POSTNORD'.freeze, - - # TODO: Write general description for CA_CANADA_POST - CA_CANADA_POST = 'CA_CANADA_POST'.freeze, - - # TODO: Write general description for WISELOADS - WISELOADS = 'WISELOADS'.freeze, - - # TODO: Write general description for ASENDIA_HK - ASENDIA_HK = 'ASENDIA_HK'.freeze, - - # TODO: Write general description for NLD_GLS - NLD_GLS = 'NLD_GLS'.freeze, - - # TODO: Write general description for MEX_REDPACK - MEX_REDPACK = 'MEX_REDPACK'.freeze, - - # TODO: Write general description for JET_SHIP - JET_SHIP = 'JET_SHIP'.freeze, - - # TODO: Write general description for DE_DHL_EXPRESS - DE_DHL_EXPRESS = 'DE_DHL_EXPRESS'.freeze, - - # TODO: Write general description for NINJAVAN_THAI - NINJAVAN_THAI = 'NINJAVAN_THAI'.freeze, - - # TODO: Write general description for RABEN_GROUP - RABEN_GROUP = 'RABEN_GROUP'.freeze, - - # TODO: Write general description for ESP_ASM - ESP_ASM = 'ESP_ASM'.freeze, - - # TODO: Write general description for HRV_HRVATSKA - HRV_HRVATSKA = 'HRV_HRVATSKA'.freeze, - - # TODO: Write general description for GLOBAL_ESTES - GLOBAL_ESTES = 'GLOBAL_ESTES'.freeze, - - # TODO: Write general description for LTU_LIETUVOS - LTU_LIETUVOS = 'LTU_LIETUVOS'.freeze, - - # TODO: Write general description for BEL_DHL - BEL_DHL = 'BEL_DHL'.freeze, - - # TODO: Write general description for AU_AU_POST - AU_AU_POST = 'AU_AU_POST'.freeze, - - # TODO: Write general description for SPEEDEXCOURIER - SPEEDEXCOURIER = 'SPEEDEXCOURIER'.freeze, - - # TODO: Write general description for FR_COLIS - FR_COLIS = 'FR_COLIS'.freeze, - - # TODO: Write general description for ARAMEX - ARAMEX = 'ARAMEX'.freeze, - - # TODO: Write general description for DPEX - DPEX = 'DPEX'.freeze, - - # TODO: Write general description for MYS_AIRPAK - MYS_AIRPAK = 'MYS_AIRPAK'.freeze, - - # TODO: Write general description for CUCKOOEXPRESS - CUCKOOEXPRESS = 'CUCKOOEXPRESS'.freeze, - - # TODO: Write general description for DPD_POLAND - DPD_POLAND = 'DPD_POLAND'.freeze, - - # TODO: Write general description for NLD_POSTNL - NLD_POSTNL = 'NLD_POSTNL'.freeze, - - # TODO: Write general description for NIM_EXPRESS - NIM_EXPRESS = 'NIM_EXPRESS'.freeze, - - # TODO: Write general description for QUANTIUM - QUANTIUM = 'QUANTIUM'.freeze, - - # TODO: Write general description for SENDLE - SENDLE = 'SENDLE'.freeze, - - # TODO: Write general description for ESP_REDUR - ESP_REDUR = 'ESP_REDUR'.freeze, - - # TODO: Write general description for MATKAHUOLTO - MATKAHUOLTO = 'MATKAHUOLTO'.freeze, - - # TODO: Write general description for CPACKET - CPACKET = 'CPACKET'.freeze, - - # TODO: Write general description for POSTI - POSTI = 'POSTI'.freeze, - - # TODO: Write general description for HUNTER_EXPRESS - HUNTER_EXPRESS = 'HUNTER_EXPRESS'.freeze, - - # TODO: Write general description for CHOIR_EXP - CHOIR_EXP = 'CHOIR_EXP'.freeze, - - # TODO: Write general description for LEGION_EXPRESS - LEGION_EXPRESS = 'LEGION_EXPRESS'.freeze, - - # TODO: Write general description for AUSTRIAN_POST_EXPRESS - AUSTRIAN_POST_EXPRESS = 'AUSTRIAN_POST_EXPRESS'.freeze, - - # TODO: Write general description for GRUPO - GRUPO = 'GRUPO'.freeze, - - # TODO: Write general description for POSTA_RO - POSTA_RO = 'POSTA_RO'.freeze, - - # TODO: Write general description for INTERPARCEL_UK - INTERPARCEL_UK = 'INTERPARCEL_UK'.freeze, - - # TODO: Write general description for GLOBAL_ABF - GLOBAL_ABF = 'GLOBAL_ABF'.freeze, - - # TODO: Write general description for POSTEN_NORGE - POSTEN_NORGE = 'POSTEN_NORGE'.freeze, - - # TODO: Write general description for XPERT_DELIVERY - XPERT_DELIVERY = 'XPERT_DELIVERY'.freeze, - - # TODO: Write general description for DHL_REFR - DHL_REFR = 'DHL_REFR'.freeze, - - # TODO: Write general description for DHL_HK - DHL_HK = 'DHL_HK'.freeze, - - # TODO: Write general description for SKYNET_UAE - SKYNET_UAE = 'SKYNET_UAE'.freeze, - - # TODO: Write general description for GOJEK - GOJEK = 'GOJEK'.freeze, - - # TODO: Write general description for YODEL_INTNL - YODEL_INTNL = 'YODEL_INTNL'.freeze, - - # TODO: Write general description for JANCO - JANCO = 'JANCO'.freeze, - - # TODO: Write general description for YTO - YTO = 'YTO'.freeze, - - # TODO: Write general description for WISE_EXPRESS - WISE_EXPRESS = 'WISE_EXPRESS'.freeze, - - # TODO: Write general description for JTEXPRESS_VN - JTEXPRESS_VN = 'JTEXPRESS_VN'.freeze, - - # TODO: Write general description for FEDEX_INTL_MLSERV - FEDEX_INTL_MLSERV = 'FEDEX_INTL_MLSERV'.freeze, - - # TODO: Write general description for VAMOX - VAMOX = 'VAMOX'.freeze, - - # TODO: Write general description for AMS_GRP - AMS_GRP = 'AMS_GRP'.freeze, - - # TODO: Write general description for DHL_JP - DHL_JP = 'DHL_JP'.freeze, - - # TODO: Write general description for HRPARCEL - HRPARCEL = 'HRPARCEL'.freeze, - - # TODO: Write general description for GESWL - GESWL = 'GESWL'.freeze, - - # TODO: Write general description for BLUESTAR - BLUESTAR = 'BLUESTAR'.freeze, - - # TODO: Write general description for CDEK_TR - CDEK_TR = 'CDEK_TR'.freeze, - - # TODO: Write general description for DESCARTES - DESCARTES = 'DESCARTES'.freeze, - - # TODO: Write general description for DELTEC_UK - DELTEC_UK = 'DELTEC_UK'.freeze, - - # TODO: Write general description for DTDC_EXPRESS - DTDC_EXPRESS = 'DTDC_EXPRESS'.freeze, - - # TODO: Write general description for TOURLINE - TOURLINE = 'TOURLINE'.freeze, - - # TODO: Write general description for BH_WORLDWIDE - BH_WORLDWIDE = 'BH_WORLDWIDE'.freeze, - - # TODO: Write general description for OCS - OCS = 'OCS'.freeze, - - # TODO: Write general description for YINGNUO_LOGISTICS - YINGNUO_LOGISTICS = 'YINGNUO_LOGISTICS'.freeze, - - # TODO: Write general description for UPS - UPS = 'UPS'.freeze, - - # TODO: Write general description for TOLL - TOLL = 'TOLL'.freeze, - - # TODO: Write general description for PRT_SEUR - PRT_SEUR = 'PRT_SEUR'.freeze, - - # TODO: Write general description for DTDC_AU - DTDC_AU = 'DTDC_AU'.freeze, - - # TODO: Write general description for THA_DYNAMIC_LOGISTICS - THA_DYNAMIC_LOGISTICS = 'THA_DYNAMIC_LOGISTICS'.freeze, - - # TODO: Write general description for UBI_LOGISTICS - UBI_LOGISTICS = 'UBI_LOGISTICS'.freeze, - - # TODO: Write general description for FEDEX_CROSSBORDER - FEDEX_CROSSBORDER = 'FEDEX_CROSSBORDER'.freeze, - - # TODO: Write general description for A1POST - A1POST = 'A1POST'.freeze, - - # TODO: Write general description for TAZMANIAN_FREIGHT - TAZMANIAN_FREIGHT = 'TAZMANIAN_FREIGHT'.freeze, - - # TODO: Write general description for CJ_INT_MY - CJ_INT_MY = 'CJ_INT_MY'.freeze, - - # TODO: Write general description for SAIA_FREIGHT - SAIA_FREIGHT = 'SAIA_FREIGHT'.freeze, - - # TODO: Write general description for SG_QXPRESS - SG_QXPRESS = 'SG_QXPRESS'.freeze, - - # TODO: Write general description for NHANS_SOLUTIONS - NHANS_SOLUTIONS = 'NHANS_SOLUTIONS'.freeze, - - # TODO: Write general description for DPD_FR - DPD_FR = 'DPD_FR'.freeze, - - # TODO: Write general description for COORDINADORA - COORDINADORA = 'COORDINADORA'.freeze, - - # TODO: Write general description for ANDREANI - ANDREANI = 'ANDREANI'.freeze, - - # TODO: Write general description for DOORA - DOORA = 'DOORA'.freeze, - - # TODO: Write general description for INTERPARCEL_NZ - INTERPARCEL_NZ = 'INTERPARCEL_NZ'.freeze, - - # TODO: Write general description for PHL_JAMEXPRESS - PHL_JAMEXPRESS = 'PHL_JAMEXPRESS'.freeze, - - # TODO: Write general description for BEL_BELGIUM_POST - BEL_BELGIUM_POST = 'BEL_BELGIUM_POST'.freeze, - - # TODO: Write general description for US_APC - US_APC = 'US_APC'.freeze, - - # TODO: Write general description for IDN_POS - IDN_POS = 'IDN_POS'.freeze, - - # TODO: Write general description for FR_MONDIAL - FR_MONDIAL = 'FR_MONDIAL'.freeze, - - # TODO: Write general description for DE_DHL - DE_DHL = 'DE_DHL'.freeze, - - # TODO: Write general description for HK_RPX - HK_RPX = 'HK_RPX'.freeze, - - # TODO: Write general description for DHL_PIECEID - DHL_PIECEID = 'DHL_PIECEID'.freeze, - - # TODO: Write general description for VNPOST_EMS - VNPOST_EMS = 'VNPOST_EMS'.freeze, - - # TODO: Write general description for RRDONNELLEY - RRDONNELLEY = 'RRDONNELLEY'.freeze, - - # TODO: Write general description for DPD_DE - DPD_DE = 'DPD_DE'.freeze, - - # TODO: Write general description for DELCART_IN - DELCART_IN = 'DELCART_IN'.freeze, - - # TODO: Write general description for IMEXGLOBALSOLUTIONS - IMEXGLOBALSOLUTIONS = 'IMEXGLOBALSOLUTIONS'.freeze, - - # TODO: Write general description for ACOMMERCE - ACOMMERCE = 'ACOMMERCE'.freeze, - - # TODO: Write general description for EURODIS - EURODIS = 'EURODIS'.freeze, - - # TODO: Write general description for CANPAR - CANPAR = 'CANPAR'.freeze, - - # TODO: Write general description for GLS - GLS = 'GLS'.freeze, - - # TODO: Write general description for IND_ECOM - IND_ECOM = 'IND_ECOM'.freeze, - - # TODO: Write general description for ESP_ENVIALIA - ESP_ENVIALIA = 'ESP_ENVIALIA'.freeze, - - # TODO: Write general description for DHL_UK - DHL_UK = 'DHL_UK'.freeze, - - # TODO: Write general description for SMSA_EXPRESS - SMSA_EXPRESS = 'SMSA_EXPRESS'.freeze, - - # TODO: Write general description for TNT_FR - TNT_FR = 'TNT_FR'.freeze, - - # TODO: Write general description for DEX_I - DEX_I = 'DEX_I'.freeze, - - # TODO: Write general description for BUDBEE_WEBHOOK - BUDBEE_WEBHOOK = 'BUDBEE_WEBHOOK'.freeze, - - # TODO: Write general description for COPA_COURIER - COPA_COURIER = 'COPA_COURIER'.freeze, - - # TODO: Write general description for VNM_VIETNAM_POST - VNM_VIETNAM_POST = 'VNM_VIETNAM_POST'.freeze, - - # TODO: Write general description for DPD_HK - DPD_HK = 'DPD_HK'.freeze, - - # TODO: Write general description for TOLL_NZ - TOLL_NZ = 'TOLL_NZ'.freeze, - - # TODO: Write general description for ECHO - ECHO = 'ECHO'.freeze, - - # TODO: Write general description for FEDEX_FR - FEDEX_FR = 'FEDEX_FR'.freeze, - - # TODO: Write general description for BORDEREXPRESS - BORDEREXPRESS = 'BORDEREXPRESS'.freeze, - - # TODO: Write general description for MAILPLUS_JPN - MAILPLUS_JPN = 'MAILPLUS_JPN'.freeze, - - # TODO: Write general description for TNT_UK_REFR - TNT_UK_REFR = 'TNT_UK_REFR'.freeze, - - # TODO: Write general description for KEC - KEC = 'KEC'.freeze, - - # TODO: Write general description for DPD_RO - DPD_RO = 'DPD_RO'.freeze, - - # TODO: Write general description for TNT_JP - TNT_JP = 'TNT_JP'.freeze, - - # TODO: Write general description for TH_CJ - TH_CJ = 'TH_CJ'.freeze, - - # TODO: Write general description for EC_CN - EC_CN = 'EC_CN'.freeze, - - # TODO: Write general description for FASTWAY_UK - FASTWAY_UK = 'FASTWAY_UK'.freeze, - - # TODO: Write general description for FASTWAY_US - FASTWAY_US = 'FASTWAY_US'.freeze, - - # TODO: Write general description for GLS_DE - GLS_DE = 'GLS_DE'.freeze, - - # TODO: Write general description for GLS_ES - GLS_ES = 'GLS_ES'.freeze, - - # TODO: Write general description for GLS_FR - GLS_FR = 'GLS_FR'.freeze, - - # TODO: Write general description for MONDIAL_BE - MONDIAL_BE = 'MONDIAL_BE'.freeze, - - # TODO: Write general description for SGT_IT - SGT_IT = 'SGT_IT'.freeze, - - # TODO: Write general description for TNT_CN - TNT_CN = 'TNT_CN'.freeze, - - # TODO: Write general description for TNT_DE - TNT_DE = 'TNT_DE'.freeze, - - # TODO: Write general description for TNT_ES - TNT_ES = 'TNT_ES'.freeze, - - # TODO: Write general description for TNT_PL - TNT_PL = 'TNT_PL'.freeze, - - # TODO: Write general description for PARCELFORCE - PARCELFORCE = 'PARCELFORCE'.freeze, - - # TODO: Write general description for SWISS_POST - SWISS_POST = 'SWISS_POST'.freeze, - - # TODO: Write general description for TOLL_IPEC - TOLL_IPEC = 'TOLL_IPEC'.freeze, - - # TODO: Write general description for AIR_21 - AIR_21 = 'AIR_21'.freeze, - - # TODO: Write general description for AIRSPEED - AIRSPEED = 'AIRSPEED'.freeze, - - # TODO: Write general description for BERT - BERT = 'BERT'.freeze, - - # TODO: Write general description for BLUEDART - BLUEDART = 'BLUEDART'.freeze, - - # TODO: Write general description for COLLECTPLUS - COLLECTPLUS = 'COLLECTPLUS'.freeze, - - # TODO: Write general description for COURIERPLUS - COURIERPLUS = 'COURIERPLUS'.freeze, - - # TODO: Write general description for COURIER_POST - COURIER_POST = 'COURIER_POST'.freeze, - - # TODO: Write general description for DHL_GLOBAL_MAIL - DHL_GLOBAL_MAIL = 'DHL_GLOBAL_MAIL'.freeze, - - # TODO: Write general description for DPD_UK - DPD_UK = 'DPD_UK'.freeze, - - # TODO: Write general description for DELTEC_DE - DELTEC_DE = 'DELTEC_DE'.freeze, - - # TODO: Write general description for DEUTSCHE_DE - DEUTSCHE_DE = 'DEUTSCHE_DE'.freeze, - - # TODO: Write general description for DOTZOT - DOTZOT = 'DOTZOT'.freeze, - - # TODO: Write general description for ELTA_GR - ELTA_GR = 'ELTA_GR'.freeze, - - # TODO: Write general description for EMS_CN - EMS_CN = 'EMS_CN'.freeze, - - # TODO: Write general description for ECARGO - ECARGO = 'ECARGO'.freeze, - - # TODO: Write general description for ENSENDA - ENSENDA = 'ENSENDA'.freeze, - - # TODO: Write general description for FERCAM_IT - FERCAM_IT = 'FERCAM_IT'.freeze, - - # TODO: Write general description for FASTWAY_ZA - FASTWAY_ZA = 'FASTWAY_ZA'.freeze, - - # TODO: Write general description for FASTWAY_AU - FASTWAY_AU = 'FASTWAY_AU'.freeze, - - # TODO: Write general description for FIRST_LOGISITCS - FIRST_LOGISITCS = 'FIRST_LOGISITCS'.freeze, - - # TODO: Write general description for GEODIS - GEODIS = 'GEODIS'.freeze, - - # TODO: Write general description for GLOBEGISTICS - GLOBEGISTICS = 'GLOBEGISTICS'.freeze, - - # TODO: Write general description for GREYHOUND - GREYHOUND = 'GREYHOUND'.freeze, - - # TODO: Write general description for JETSHIP_MY - JETSHIP_MY = 'JETSHIP_MY'.freeze, - - # TODO: Write general description for LION_PARCEL - LION_PARCEL = 'LION_PARCEL'.freeze, - - # TODO: Write general description for AEROFLASH - AEROFLASH = 'AEROFLASH'.freeze, - - # TODO: Write general description for ONTRAC - ONTRAC = 'ONTRAC'.freeze, - - # TODO: Write general description for SAGAWA - SAGAWA = 'SAGAWA'.freeze, - - # TODO: Write general description for SIODEMKA - SIODEMKA = 'SIODEMKA'.freeze, - - # TODO: Write general description for STARTRACK - STARTRACK = 'STARTRACK'.freeze, - - # TODO: Write general description for TNT_AU - TNT_AU = 'TNT_AU'.freeze, - - # TODO: Write general description for TNT_IT - TNT_IT = 'TNT_IT'.freeze, - - # TODO: Write general description for TRANSMISSION - TRANSMISSION = 'TRANSMISSION'.freeze, - - # TODO: Write general description for YAMATO - YAMATO = 'YAMATO'.freeze, - - # TODO: Write general description for DHL_IT - DHL_IT = 'DHL_IT'.freeze, - - # TODO: Write general description for DHL_AT - DHL_AT = 'DHL_AT'.freeze, - - # TODO: Write general description for LOGISTICSWORLDWIDE_KR - LOGISTICSWORLDWIDE_KR = 'LOGISTICSWORLDWIDE_KR'.freeze, - - # TODO: Write general description for GLS_SPAIN - GLS_SPAIN = 'GLS_SPAIN'.freeze, - - # TODO: Write general description for AMAZON_UK_API - AMAZON_UK_API = 'AMAZON_UK_API'.freeze, - - # TODO: Write general description for DPD_FR_REFERENCE - DPD_FR_REFERENCE = 'DPD_FR_REFERENCE'.freeze, - - # TODO: Write general description for DHLPARCEL_UK - DHLPARCEL_UK = 'DHLPARCEL_UK'.freeze, - - # TODO: Write general description for MEGASAVE - MEGASAVE = 'MEGASAVE'.freeze, - - # TODO: Write general description for QUALITYPOST - QUALITYPOST = 'QUALITYPOST'.freeze, - - # TODO: Write general description for IDS_LOGISTICS - IDS_LOGISTICS = 'IDS_LOGISTICS'.freeze, - - # TODO: Write general description for JOYINGBOX1 - JOYINGBOX1 = 'JOYINGBOX'.freeze, - - # TODO: Write general description for PANTHER_ORDER_NUMBER - PANTHER_ORDER_NUMBER = 'PANTHER_ORDER_NUMBER'.freeze, - - # TODO: Write general description for WATKINS_SHEPARD - WATKINS_SHEPARD = 'WATKINS_SHEPARD'.freeze, - - # TODO: Write general description for FASTTRACK - FASTTRACK = 'FASTTRACK'.freeze, - - # TODO: Write general description for UP_EXPRESS - UP_EXPRESS = 'UP_EXPRESS'.freeze, - - # TODO: Write general description for ELOGISTICA - ELOGISTICA = 'ELOGISTICA'.freeze, - - # TODO: Write general description for ECOURIER - ECOURIER = 'ECOURIER'.freeze, - - # TODO: Write general description for CJ_PHILIPPINES - CJ_PHILIPPINES = 'CJ_PHILIPPINES'.freeze, - - # TODO: Write general description for SPEEDEX - SPEEDEX = 'SPEEDEX'.freeze, - - # TODO: Write general description for ORANGECONNEX - ORANGECONNEX = 'ORANGECONNEX'.freeze, - - # TODO: Write general description for TECOR - TECOR = 'TECOR'.freeze, - - # TODO: Write general description for SAEE - SAEE = 'SAEE'.freeze, - - # TODO: Write general description for GLS_ITALY_FTP - GLS_ITALY_FTP = 'GLS_ITALY_FTP'.freeze, - - # TODO: Write general description for DELIVERE - DELIVERE = 'DELIVERE'.freeze, - - # TODO: Write general description for YYCOM - YYCOM = 'YYCOM'.freeze, - - # TODO: Write general description for ADICIONAL_PT - ADICIONAL_PT = 'ADICIONAL_PT'.freeze, - - # TODO: Write general description for DKSH - DKSH = 'DKSH'.freeze, - - # TODO: Write general description for NIPPON_EXPRESS_FTP - NIPPON_EXPRESS_FTP = 'NIPPON_EXPRESS_FTP'.freeze, - - # TODO: Write general description for GOLS - GOLS = 'GOLS'.freeze, - - # TODO: Write general description for FUJEXP - FUJEXP = 'FUJEXP'.freeze, - - # TODO: Write general description for QTRACK - QTRACK = 'QTRACK'.freeze, - - # TODO: Write general description for OMLOGISTICS_API - OMLOGISTICS_API = 'OMLOGISTICS_API'.freeze, - - # TODO: Write general description for GDPHARM - GDPHARM = 'GDPHARM'.freeze, - - # TODO: Write general description for MISUMI_CN - MISUMI_CN = 'MISUMI_CN'.freeze, - - # TODO: Write general description for AIR_CANADA - AIR_CANADA = 'AIR_CANADA'.freeze, - - # TODO: Write general description for CITY56_WEBHOOK - CITY56_WEBHOOK = 'CITY56_WEBHOOK'.freeze, - - # TODO: Write general description for SAGAWA_API - SAGAWA_API = 'SAGAWA_API'.freeze, - - # TODO: Write general description for KEDAEX - KEDAEX = 'KEDAEX'.freeze, - - # TODO: Write general description for PGEON_API - PGEON_API = 'PGEON_API'.freeze, - - # TODO: Write general description for WEWORLDEXPRESS - WEWORLDEXPRESS = 'WEWORLDEXPRESS'.freeze, - - # TODO: Write general description for JT_LOGISTICS - JT_LOGISTICS = 'JT_LOGISTICS'.freeze, - - # TODO: Write general description for TRUSK - TRUSK = 'TRUSK'.freeze, - - # TODO: Write general description for VIAXPRESS - VIAXPRESS = 'VIAXPRESS'.freeze, - - # TODO: Write general description for DHL_SUPPLYCHAIN_ID - DHL_SUPPLYCHAIN_ID = 'DHL_SUPPLYCHAIN_ID'.freeze, - - # TODO: Write general description for ZUELLIGPHARMA_SFTP - ZUELLIGPHARMA_SFTP = 'ZUELLIGPHARMA_SFTP'.freeze, - - # TODO: Write general description for MEEST - MEEST = 'MEEST'.freeze, - - # TODO: Write general description for TOLL_PRIORITY - TOLL_PRIORITY = 'TOLL_PRIORITY'.freeze, - - # TODO: Write general description for MOTHERSHIP_API - MOTHERSHIP_API = 'MOTHERSHIP_API'.freeze, - - # TODO: Write general description for CAPITAL - CAPITAL = 'CAPITAL'.freeze, - - # TODO: Write general description for EUROPAKET_API - EUROPAKET_API = 'EUROPAKET_API'.freeze, - - # TODO: Write general description for HFD - HFD = 'HFD'.freeze, - - # TODO: Write general description for TOURLINE_REFERENCE - TOURLINE_REFERENCE = 'TOURLINE_REFERENCE'.freeze, - - # TODO: Write general description for GIO_ECOURIER - GIO_ECOURIER = 'GIO_ECOURIER'.freeze, - - # TODO: Write general description for CN_LOGISTICS - CN_LOGISTICS = 'CN_LOGISTICS'.freeze, - - # TODO: Write general description for PANDION - PANDION = 'PANDION'.freeze, - - # TODO: Write general description for BPOST_API - BPOST_API = 'BPOST_API'.freeze, - - # TODO: Write general description for PASSPORTSHIPPING - PASSPORTSHIPPING = 'PASSPORTSHIPPING'.freeze, - - # TODO: Write general description for PAKAJO - PAKAJO = 'PAKAJO'.freeze, - - # TODO: Write general description for DACHSER - DACHSER = 'DACHSER'.freeze, - - # TODO: Write general description for YUSEN_SFTP - YUSEN_SFTP = 'YUSEN_SFTP'.freeze, - - # TODO: Write general description for SHYPLITE - SHYPLITE = 'SHYPLITE'.freeze, - - # TODO: Write general description for XYY - XYY = 'XYY'.freeze, - - # TODO: Write general description for MWD - MWD = 'MWD'.freeze, - - # TODO: Write general description for FAXECARGO - FAXECARGO = 'FAXECARGO'.freeze, - - # TODO: Write general description for MAZET - MAZET = 'MAZET'.freeze, - - # TODO: Write general description for FIRST_LOGISTICS_API - FIRST_LOGISTICS_API = 'FIRST_LOGISTICS_API'.freeze, - - # TODO: Write general description for SPRINT_PACK - SPRINT_PACK = 'SPRINT_PACK'.freeze, - - # TODO: Write general description for HERMES_DE_FTP - HERMES_DE_FTP = 'HERMES_DE_FTP'.freeze, - - # TODO: Write general description for CONCISE - CONCISE = 'CONCISE'.freeze, - - # TODO: Write general description for KERRY_EXPRESS_TW_API - KERRY_EXPRESS_TW_API = 'KERRY_EXPRESS_TW_API'.freeze, - - # TODO: Write general description for EWE - EWE = 'EWE'.freeze, - - # TODO: Write general description for FASTDESPATCH - FASTDESPATCH = 'FASTDESPATCH'.freeze, - - # TODO: Write general description for ABCUSTOM_SFTP - ABCUSTOM_SFTP = 'ABCUSTOM_SFTP'.freeze, - - # TODO: Write general description for CHAZKI - CHAZKI = 'CHAZKI'.freeze, - - # TODO: Write general description for SHIPPIE - SHIPPIE = 'SHIPPIE'.freeze, - - # TODO: Write general description for GEODIS_API - GEODIS_API = 'GEODIS_API'.freeze, - - # TODO: Write general description for NAQEL_EXPRESS - NAQEL_EXPRESS = 'NAQEL_EXPRESS'.freeze, - - # TODO: Write general description for PAPA_WEBHOOK - PAPA_WEBHOOK = 'PAPA_WEBHOOK'.freeze, - - # TODO: Write general description for FORWARDAIR - FORWARDAIR = 'FORWARDAIR'.freeze, - - # TODO: Write general description for DIALOGO_LOGISTICA_API - DIALOGO_LOGISTICA_API = 'DIALOGO_LOGISTICA_API'.freeze, - - # TODO: Write general description for LALAMOVE_API - LALAMOVE_API = 'LALAMOVE_API'.freeze, - - # TODO: Write general description for TOMYDOOR - TOMYDOOR = 'TOMYDOOR'.freeze, - - # TODO: Write general description for KRONOS_WEBHOOK - KRONOS_WEBHOOK = 'KRONOS_WEBHOOK'.freeze, - - # TODO: Write general description for JTCARGO - JTCARGO = 'JTCARGO'.freeze, - - # TODO: Write general description for T_CAT - T_CAT = 'T_CAT'.freeze, - - # TODO: Write general description for CONCISE_WEBHOOK - CONCISE_WEBHOOK = 'CONCISE_WEBHOOK'.freeze, - - # TODO: Write general description for TELEPORT_WEBHOOK - TELEPORT_WEBHOOK = 'TELEPORT_WEBHOOK'.freeze, - - # TODO: Write general description for CUSTOMCO_API - CUSTOMCO_API = 'CUSTOMCO_API'.freeze, - - # TODO: Write general description for SPX_TH - SPX_TH = 'SPX_TH'.freeze, - - # TODO: Write general description for BOLLORE_LOGISTICS - BOLLORE_LOGISTICS = 'BOLLORE_LOGISTICS'.freeze, - - # TODO: Write general description for CLICKLINK_SFTP - CLICKLINK_SFTP = 'CLICKLINK_SFTP'.freeze, - - # TODO: Write general description for M3LOGISTICS - M3LOGISTICS = 'M3LOGISTICS'.freeze, - - # TODO: Write general description for VNPOST_API - VNPOST_API = 'VNPOST_API'.freeze, - - # TODO: Write general description for AXLEHIRE_FTP - AXLEHIRE_FTP = 'AXLEHIRE_FTP'.freeze, - - # TODO: Write general description for SHADOWFAX - SHADOWFAX = 'SHADOWFAX'.freeze, - - # TODO: Write general description for MYHERMES_UK_API - MYHERMES_UK_API = 'MYHERMES_UK_API'.freeze, - - # TODO: Write general description for DAIICHI - DAIICHI = 'DAIICHI'.freeze, - - # TODO: Write general description for MENSAJEROSURBANOS_API - MENSAJEROSURBANOS_API = 'MENSAJEROSURBANOS_API'.freeze, - - # TODO: Write general description for POLARSPEED - POLARSPEED = 'POLARSPEED'.freeze, - - # TODO: Write general description for IDEXPRESS_ID - IDEXPRESS_ID = 'IDEXPRESS_ID'.freeze, - - # TODO: Write general description for PAYO - PAYO = 'PAYO'.freeze, - - # TODO: Write general description for WHISTL_SFTP - WHISTL_SFTP = 'WHISTL_SFTP'.freeze, - - # TODO: Write general description for INTEX_DE - INTEX_DE = 'INTEX_DE'.freeze, - - # TODO: Write general description for TRANS2U - TRANS2U = 'TRANS2U'.freeze, - - # TODO: Write general description for PRODUCTCAREGROUP_SFTP - PRODUCTCAREGROUP_SFTP = 'PRODUCTCAREGROUP_SFTP'.freeze, - - # TODO: Write general description for BIGSMART - BIGSMART = 'BIGSMART'.freeze, - - # TODO: Write general description for EXPEDITORS_API_REF - EXPEDITORS_API_REF = 'EXPEDITORS_API_REF'.freeze, - - # TODO: Write general description for AITWORLDWIDE_API - AITWORLDWIDE_API = 'AITWORLDWIDE_API'.freeze, - - # TODO: Write general description for WORLDCOURIER - WORLDCOURIER = 'WORLDCOURIER'.freeze, - - # TODO: Write general description for QUIQUP - QUIQUP = 'QUIQUP'.freeze, - - # TODO: Write general description for AGEDISS_SFTP - AGEDISS_SFTP = 'AGEDISS_SFTP'.freeze, - - # TODO: Write general description for ANDREANI_API - ANDREANI_API = 'ANDREANI_API'.freeze, - - # TODO: Write general description for CRLEXPRESS - CRLEXPRESS = 'CRLEXPRESS'.freeze, - - # TODO: Write general description for SMARTCAT - SMARTCAT = 'SMARTCAT'.freeze, - - # TODO: Write general description for CROSSFLIGHT - CROSSFLIGHT = 'CROSSFLIGHT'.freeze, - - # TODO: Write general description for PROCARRIER - PROCARRIER = 'PROCARRIER'.freeze, - - # TODO: Write general description for DHL_REFERENCE_API - DHL_REFERENCE_API = 'DHL_REFERENCE_API'.freeze, - - # TODO: Write general description for SEINO_API - SEINO_API = 'SEINO_API'.freeze, - - # TODO: Write general description for WSPEXPRESS - WSPEXPRESS = 'WSPEXPRESS'.freeze, - - # TODO: Write general description for KRONOS - KRONOS = 'KRONOS'.freeze, - - # TODO: Write general description for TOTAL_EXPRESS_API - TOTAL_EXPRESS_API = 'TOTAL_EXPRESS_API'.freeze, - - # TODO: Write general description for PARCLL - PARCLL = 'PARCLL'.freeze, - - # TODO: Write general description for XPEDIGO - XPEDIGO = 'XPEDIGO'.freeze, - - # TODO: Write general description for STAR_TRACK_WEBHOOK - STAR_TRACK_WEBHOOK = 'STAR_TRACK_WEBHOOK'.freeze, - - # TODO: Write general description for GPOST - GPOST = 'GPOST'.freeze, - - # TODO: Write general description for UCS - UCS = 'UCS'.freeze, - - # TODO: Write general description for DMFGROUP - DMFGROUP = 'DMFGROUP'.freeze, - - # TODO: Write general description for COORDINADORA_API - COORDINADORA_API = 'COORDINADORA_API'.freeze, - - # TODO: Write general description for MARKEN - MARKEN = 'MARKEN'.freeze, - - # TODO: Write general description for NTL - NTL = 'NTL'.freeze, - - # TODO: Write general description for REDJEPAKKETJE - REDJEPAKKETJE = 'REDJEPAKKETJE'.freeze, - - # TODO: Write general description for ALLIED_EXPRESS_FTP - ALLIED_EXPRESS_FTP = 'ALLIED_EXPRESS_FTP'.freeze, - - # TODO: Write general description for MONDIALRELAY_ES - MONDIALRELAY_ES = 'MONDIALRELAY_ES'.freeze, - - # TODO: Write general description for NAEKO_FTP - NAEKO_FTP = 'NAEKO_FTP'.freeze, - - # TODO: Write general description for MHI - MHI = 'MHI'.freeze, - - # TODO: Write general description for SHIPPIFY - SHIPPIFY = 'SHIPPIFY'.freeze, - - # TODO: Write general description for MALCA_AMIT_API - MALCA_AMIT_API = 'MALCA_AMIT_API'.freeze, - - # TODO: Write general description for JTEXPRESS_SG_API - JTEXPRESS_SG_API = 'JTEXPRESS_SG_API'.freeze, - - # TODO: Write general description for DACHSER_WEB - DACHSER_WEB = 'DACHSER_WEB'.freeze, - - # TODO: Write general description for FLIGHTLG - FLIGHTLG = 'FLIGHTLG'.freeze, - - # TODO: Write general description for CAGO - CAGO = 'CAGO'.freeze, - - # TODO: Write general description for COM1EXPRESS - COM1EXPRESS = 'COM1EXPRESS'.freeze, - - # TODO: Write general description for TONAMI_FTP - TONAMI_FTP = 'TONAMI_FTP'.freeze, - - # TODO: Write general description for PACKFLEET - PACKFLEET = 'PACKFLEET'.freeze, - - # TODO: Write general description for PUROLATOR_INTERNATIONAL - PUROLATOR_INTERNATIONAL = 'PUROLATOR_INTERNATIONAL'.freeze, - - # TODO: Write general description for WINESHIPPING_WEBHOOK - WINESHIPPING_WEBHOOK = 'WINESHIPPING_WEBHOOK'.freeze, - - # TODO: Write general description for DHL_ES_SFTP - DHL_ES_SFTP = 'DHL_ES_SFTP'.freeze, - - # TODO: Write general description for PCHOME_API - PCHOME_API = 'PCHOME_API'.freeze, - - # TODO: Write general description for CESKAPOSTA_API - CESKAPOSTA_API = 'CESKAPOSTA_API'.freeze, - - # TODO: Write general description for GORUSH - GORUSH = 'GORUSH'.freeze, - - # TODO: Write general description for HOMERUNNER - HOMERUNNER = 'HOMERUNNER'.freeze, - - # TODO: Write general description for AMAZON_ORDER - AMAZON_ORDER = 'AMAZON_ORDER'.freeze, - - # TODO: Write general description for EFWNOW_API - EFWNOW_API = 'EFWNOW_API'.freeze, - - # TODO: Write general description for CBL_LOGISTICA_API - CBL_LOGISTICA_API = 'CBL_LOGISTICA_API'.freeze, - - # TODO: Write general description for NIMBUSPOST - NIMBUSPOST = 'NIMBUSPOST'.freeze, - - # TODO: Write general description for LOGWIN_LOGISTICS - LOGWIN_LOGISTICS = 'LOGWIN_LOGISTICS'.freeze, - - # TODO: Write general description for NOWLOG_API - NOWLOG_API = 'NOWLOG_API'.freeze, - - # TODO: Write general description for DPD_NL - DPD_NL = 'DPD_NL'.freeze, - - # TODO: Write general description for GODEPENDABLE - GODEPENDABLE = 'GODEPENDABLE'.freeze, - - # TODO: Write general description for ESDEX - ESDEX = 'ESDEX'.freeze, - - # TODO: Write general description for LOGISYSTEMS_SFTP - LOGISYSTEMS_SFTP = 'LOGISYSTEMS_SFTP'.freeze, - - # TODO: Write general description for EXPEDITORS - EXPEDITORS = 'EXPEDITORS'.freeze, - - # TODO: Write general description for SNTGLOBAL_API - SNTGLOBAL_API = 'SNTGLOBAL_API'.freeze, - - # TODO: Write general description for SHIPX - SHIPX = 'SHIPX'.freeze, - - # TODO: Write general description for QINTL_API - QINTL_API = 'QINTL_API'.freeze, - - # TODO: Write general description for PACKS - PACKS = 'PACKS'.freeze, - - # TODO: Write general description for POSTNL_INTERNATIONAL - POSTNL_INTERNATIONAL = 'POSTNL_INTERNATIONAL'.freeze, - - # TODO: Write general description for AMAZON_EMAIL_PUSH - AMAZON_EMAIL_PUSH = 'AMAZON_EMAIL_PUSH'.freeze, - - # TODO: Write general description for DHL_API - DHL_API = 'DHL_API'.freeze, - - # TODO: Write general description for SPX - SPX = 'SPX'.freeze, - - # TODO: Write general description for AXLEHIRE - AXLEHIRE = 'AXLEHIRE'.freeze, - - # TODO: Write general description for ICSCOURIER - ICSCOURIER = 'ICSCOURIER'.freeze, - - # TODO: Write general description for DIALOGO_LOGISTICA - DIALOGO_LOGISTICA = 'DIALOGO_LOGISTICA'.freeze, - - # TODO: Write general description for SHUNBANG_EXPRESS - SHUNBANG_EXPRESS = 'SHUNBANG_EXPRESS'.freeze, - - # TODO: Write general description for TCS_API - TCS_API = 'TCS_API'.freeze, - - # TODO: Write general description for SF_EXPRESS_CN - SF_EXPRESS_CN = 'SF_EXPRESS_CN'.freeze, - - # TODO: Write general description for PACKETA - PACKETA = 'PACKETA'.freeze, - - # TODO: Write general description for SIC_TELIWAY - SIC_TELIWAY = 'SIC_TELIWAY'.freeze, - - # TODO: Write general description for MONDIALRELAY_FR - MONDIALRELAY_FR = 'MONDIALRELAY_FR'.freeze, - - # TODO: Write general description for INTIME_FTP - INTIME_FTP = 'INTIME_FTP'.freeze, - - # TODO: Write general description for JD_EXPRESS - JD_EXPRESS = 'JD_EXPRESS'.freeze, - - # TODO: Write general description for FASTBOX - FASTBOX = 'FASTBOX'.freeze, - - # TODO: Write general description for PATHEON - PATHEON = 'PATHEON'.freeze, - - # TODO: Write general description for INDIA_POST - INDIA_POST = 'INDIA_POST'.freeze, - - # TODO: Write general description for TIPSA_REF - TIPSA_REF = 'TIPSA_REF'.freeze, - - # TODO: Write general description for ECOFREIGHT - ECOFREIGHT = 'ECOFREIGHT'.freeze, - - # TODO: Write general description for VOX - VOX = 'VOX'.freeze, - - # TODO: Write general description for DIRECTFREIGHT_AU_REF - DIRECTFREIGHT_AU_REF = 'DIRECTFREIGHT_AU_REF'.freeze, - - # TODO: Write general description for BESTTRANSPORT_SFTP - BESTTRANSPORT_SFTP = 'BESTTRANSPORT_SFTP'.freeze, - - # TODO: Write general description for AUSTRALIA_POST_API - AUSTRALIA_POST_API = 'AUSTRALIA_POST_API'.freeze, - - # TODO: Write general description for FRAGILEPAK_SFTP - FRAGILEPAK_SFTP = 'FRAGILEPAK_SFTP'.freeze, - - # TODO: Write general description for FLIPXP - FLIPXP = 'FLIPXP'.freeze, - - # TODO: Write general description for VALUE_WEBHOOK - VALUE_WEBHOOK = 'VALUE_WEBHOOK'.freeze, - - # TODO: Write general description for DAESHIN - DAESHIN = 'DAESHIN'.freeze, - - # TODO: Write general description for SHERPA - SHERPA = 'SHERPA'.freeze, - - # TODO: Write general description for MWD_API - MWD_API = 'MWD_API'.freeze, - - # TODO: Write general description for SMARTKARGO - SMARTKARGO = 'SMARTKARGO'.freeze, - - # TODO: Write general description for DNJ_EXPRESS - DNJ_EXPRESS = 'DNJ_EXPRESS'.freeze, - - # TODO: Write general description for GOPEOPLE - GOPEOPLE = 'GOPEOPLE'.freeze, - - # TODO: Write general description for MYSENDLE_API - MYSENDLE_API = 'MYSENDLE_API'.freeze, - - # TODO: Write general description for ARAMEX_API - ARAMEX_API = 'ARAMEX_API'.freeze, - - # TODO: Write general description for PIDGE - PIDGE = 'PIDGE'.freeze, - - # TODO: Write general description for THAIPARCELS - THAIPARCELS = 'THAIPARCELS'.freeze, - - # TODO: Write general description for PANTHER_REFERENCE_API - PANTHER_REFERENCE_API = 'PANTHER_REFERENCE_API'.freeze, - - # TODO: Write general description for POSTAPLUS1 - POSTAPLUS1 = 'POSTAPLUS'.freeze, - - # TODO: Write general description for BUFFALO - BUFFALO = 'BUFFALO'.freeze, - - # TODO: Write general description for U_ENVIOS - U_ENVIOS = 'U_ENVIOS'.freeze, - - # TODO: Write general description for ELITE_CO - ELITE_CO = 'ELITE_CO'.freeze, - - # TODO: Write general description for BARQEXP - BARQEXP = 'BARQEXP'.freeze, - - # TODO: Write general description for ROCHE_INTERNAL_SFTP - ROCHE_INTERNAL_SFTP = 'ROCHE_INTERNAL_SFTP'.freeze, - - # TODO: Write general description for DBSCHENKER_ICELAND - DBSCHENKER_ICELAND = 'DBSCHENKER_ICELAND'.freeze, - - # TODO: Write general description for TNT_FR_REFERENCE - TNT_FR_REFERENCE = 'TNT_FR_REFERENCE'.freeze, - - # TODO: Write general description for NEWGISTICSAPI - NEWGISTICSAPI = 'NEWGISTICSAPI'.freeze, - - # TODO: Write general description for GLOVO - GLOVO = 'GLOVO'.freeze, - - # TODO: Write general description for GWLOGIS_API - GWLOGIS_API = 'GWLOGIS_API'.freeze, - - # TODO: Write general description for SPREETAIL_API - SPREETAIL_API = 'SPREETAIL_API'.freeze, - - # TODO: Write general description for MOOVA - MOOVA = 'MOOVA'.freeze, - - # TODO: Write general description for PLYCONGROUP - PLYCONGROUP = 'PLYCONGROUP'.freeze, - - # TODO: Write general description for USPS_WEBHOOK - USPS_WEBHOOK = 'USPS_WEBHOOK'.freeze, - - # TODO: Write general description for REIMAGINEDELIVERY - REIMAGINEDELIVERY = 'REIMAGINEDELIVERY'.freeze, - - # TODO: Write general description for EDF_FTP - EDF_FTP = 'EDF_FTP'.freeze, - - # TODO: Write general description for DAO365 - DAO365 = 'DAO365'.freeze, - - # TODO: Write general description for BIOCAIR_FTP - BIOCAIR_FTP = 'BIOCAIR_FTP'.freeze, - - # TODO: Write general description for RANSA_WEBHOOK - RANSA_WEBHOOK = 'RANSA_WEBHOOK'.freeze, - - # TODO: Write general description for SHIPXPRES - SHIPXPRES = 'SHIPXPRES'.freeze, - - # TODO: Write general description for COURANT_PLUS_API - COURANT_PLUS_API = 'COURANT_PLUS_API'.freeze, - - # TODO: Write general description for SHIPA - SHIPA = 'SHIPA'.freeze, - - # TODO: Write general description for HOMELOGISTICS - HOMELOGISTICS = 'HOMELOGISTICS'.freeze, - - # TODO: Write general description for DX - DX = 'DX'.freeze, - - # TODO: Write general description for POSTE_ITALIANE_PACCOCELERE - POSTE_ITALIANE_PACCOCELERE = 'POSTE_ITALIANE_PACCOCELERE'.freeze, - - # TODO: Write general description for TOLL_WEBHOOK - TOLL_WEBHOOK = 'TOLL_WEBHOOK'.freeze, - - # TODO: Write general description for LCTBR_API - LCTBR_API = 'LCTBR_API'.freeze, - - # TODO: Write general description for DX_FREIGHT - DX_FREIGHT = 'DX_FREIGHT'.freeze, - - # TODO: Write general description for DHL_SFTP - DHL_SFTP = 'DHL_SFTP'.freeze, - - # TODO: Write general description for SHIPROCKET - SHIPROCKET = 'SHIPROCKET'.freeze, - - # TODO: Write general description for UBER_WEBHOOK - UBER_WEBHOOK = 'UBER_WEBHOOK'.freeze, - - # TODO: Write general description for STATOVERNIGHT - STATOVERNIGHT = 'STATOVERNIGHT'.freeze, - - # TODO: Write general description for BURD - BURD = 'BURD'.freeze, - - # TODO: Write general description for FASTSHIP - FASTSHIP = 'FASTSHIP'.freeze, - - # TODO: Write general description for IBVENTURE_WEBHOOK - IBVENTURE_WEBHOOK = 'IBVENTURE_WEBHOOK'.freeze, - - # TODO: Write general description for GATI_KWE_API - GATI_KWE_API = 'GATI_KWE_API'.freeze, - - # TODO: Write general description for CRYOPDP_FTP - CRYOPDP_FTP = 'CRYOPDP_FTP'.freeze, - - # TODO: Write general description for HUBBED - HUBBED = 'HUBBED'.freeze, - - # TODO: Write general description for TIPSA_API - TIPSA_API = 'TIPSA_API'.freeze, - - # TODO: Write general description for ARASKARGO - ARASKARGO = 'ARASKARGO'.freeze, - - # TODO: Write general description for THIJS_NL - THIJS_NL = 'THIJS_NL'.freeze, - - # TODO: Write general description for ATSHEALTHCARE_REFERENCE - ATSHEALTHCARE_REFERENCE = 'ATSHEALTHCARE_REFERENCE'.freeze, - - # TODO: Write general description for ENUM_99MINUTOS - ENUM_99MINUTOS = '99MINUTOS'.freeze, - - # TODO: Write general description for HELLENIC_POST - HELLENIC_POST = 'HELLENIC_POST'.freeze, - - # TODO: Write general description for HSM_GLOBAL - HSM_GLOBAL = 'HSM_GLOBAL'.freeze, - - # TODO: Write general description for MNX - MNX = 'MNX'.freeze, - - # TODO: Write general description for NMTRANSFER - NMTRANSFER = 'NMTRANSFER'.freeze, - - # TODO: Write general description for LOGYSTO - LOGYSTO = 'LOGYSTO'.freeze, - - # TODO: Write general description for INDIA_POST_INT - INDIA_POST_INT = 'INDIA_POST_INT'.freeze, - - # TODO: Write general description for AMAZON_FBA_SWISHIP_IN - AMAZON_FBA_SWISHIP_IN = 'AMAZON_FBA_SWISHIP_IN'.freeze, - - # TODO: Write general description for SRT_TRANSPORT - SRT_TRANSPORT = 'SRT_TRANSPORT'.freeze, - - # TODO: Write general description for BOMI - BOMI = 'BOMI'.freeze, - - # TODO: Write general description for DELIVERR_SFTP - DELIVERR_SFTP = 'DELIVERR_SFTP'.freeze, - - # TODO: Write general description for HSDEXPRESS - HSDEXPRESS = 'HSDEXPRESS'.freeze, - - # TODO: Write general description for SIMPLETIRE_WEBHOOK - SIMPLETIRE_WEBHOOK = 'SIMPLETIRE_WEBHOOK'.freeze, - - # TODO: Write general description for HUNTER_EXPRESS_SFTP - HUNTER_EXPRESS_SFTP = 'HUNTER_EXPRESS_SFTP'.freeze, - - # TODO: Write general description for UPS_API - UPS_API = 'UPS_API'.freeze, - - # TODO: Write general description for WOOYOUNG_LOGISTICS_SFTP - WOOYOUNG_LOGISTICS_SFTP = 'WOOYOUNG_LOGISTICS_SFTP'.freeze, - - # TODO: Write general description for PHSE_API - PHSE_API = 'PHSE_API'.freeze, - - # TODO: Write general description for WISH_EMAIL_PUSH - WISH_EMAIL_PUSH = 'WISH_EMAIL_PUSH'.freeze, - - # TODO: Write general description for NORTHLINE - NORTHLINE = 'NORTHLINE'.freeze, - - # TODO: Write general description for MEDAFRICA - MEDAFRICA = 'MEDAFRICA'.freeze, - - # TODO: Write general description for DPD_AT_SFTP - DPD_AT_SFTP = 'DPD_AT_SFTP'.freeze, - - # TODO: Write general description for ANTERAJA - ANTERAJA = 'ANTERAJA'.freeze, - - # TODO: Write general description for DHL_GLOBAL_FORWARDING_API - DHL_GLOBAL_FORWARDING_API = 'DHL_GLOBAL_FORWARDING_API'.freeze, - - # TODO: Write general description for LBCEXPRESS_API - LBCEXPRESS_API = 'LBCEXPRESS_API'.freeze, - - # TODO: Write general description for SIMSGLOBAL - SIMSGLOBAL = 'SIMSGLOBAL'.freeze, - - # TODO: Write general description for CDLDELIVERS - CDLDELIVERS = 'CDLDELIVERS'.freeze, - - # TODO: Write general description for TYP - TYP = 'TYP'.freeze, - - # TODO: Write general description for TESTING_COURIER_WEBHOOK - TESTING_COURIER_WEBHOOK = 'TESTING_COURIER_WEBHOOK'.freeze, - - # TODO: Write general description for PANDAGO_API - PANDAGO_API = 'PANDAGO_API'.freeze, - - # TODO: Write general description for ROYAL_MAIL_FTP - ROYAL_MAIL_FTP = 'ROYAL_MAIL_FTP'.freeze, - - # TODO: Write general description for THUNDEREXPRESS - THUNDEREXPRESS = 'THUNDEREXPRESS'.freeze, - - # TODO: Write general description for SECRETLAB_WEBHOOK - SECRETLAB_WEBHOOK = 'SECRETLAB_WEBHOOK'.freeze, - - # TODO: Write general description for SETEL - SETEL = 'SETEL'.freeze, - - # TODO: Write general description for JD_WORLDWIDE - JD_WORLDWIDE = 'JD_WORLDWIDE'.freeze, - - # TODO: Write general description for DPD_RU_API - DPD_RU_API = 'DPD_RU_API'.freeze, - - # TODO: Write general description for ARGENTS_WEBHOOK - ARGENTS_WEBHOOK = 'ARGENTS_WEBHOOK'.freeze, - - # TODO: Write general description for POSTONE - POSTONE = 'POSTONE'.freeze, - - # TODO: Write general description for TUSKLOGISTICS - TUSKLOGISTICS = 'TUSKLOGISTICS'.freeze, - - # TODO: Write general description for RHENUS_UK_API - RHENUS_UK_API = 'RHENUS_UK_API'.freeze, - - # TODO: Write general description for TAQBIN_SG_API - TAQBIN_SG_API = 'TAQBIN_SG_API'.freeze, - - # TODO: Write general description for INNTRALOG_SFTP - INNTRALOG_SFTP = 'INNTRALOG_SFTP'.freeze, - - # TODO: Write general description for DAYROSS - DAYROSS = 'DAYROSS'.freeze, - - # TODO: Write general description for CORREOSEXPRESS_API - CORREOSEXPRESS_API = 'CORREOSEXPRESS_API'.freeze, - - # TODO: Write general description for INTERNATIONAL_SEUR_API - INTERNATIONAL_SEUR_API = 'INTERNATIONAL_SEUR_API'.freeze, - - # TODO: Write general description for YODEL_API - YODEL_API = 'YODEL_API'.freeze, - - # TODO: Write general description for HEROEXPRESS - HEROEXPRESS = 'HEROEXPRESS'.freeze, - - # TODO: Write general description for DHL_SUPPLYCHAIN_IN - DHL_SUPPLYCHAIN_IN = 'DHL_SUPPLYCHAIN_IN'.freeze, - - # TODO: Write general description for URGENT_CARGUS - URGENT_CARGUS = 'URGENT_CARGUS'.freeze, - - # TODO: Write general description for FRONTDOORCORP - FRONTDOORCORP = 'FRONTDOORCORP'.freeze, - - # TODO: Write general description for JTEXPRESS_PH - JTEXPRESS_PH = 'JTEXPRESS_PH'.freeze, - - # TODO: Write general description for PARCELSTARS_WEBHOOK - PARCELSTARS_WEBHOOK = 'PARCELSTARS_WEBHOOK'.freeze, - - # TODO: Write general description for DPD_SK_SFTP - DPD_SK_SFTP = 'DPD_SK_SFTP'.freeze, - - # TODO: Write general description for MOVIANTO - MOVIANTO = 'MOVIANTO'.freeze, - - # TODO: Write general description for OZEPARTS_SHIPPING - OZEPARTS_SHIPPING = 'OZEPARTS_SHIPPING'.freeze, - - # TODO: Write general description for KARGOMKOLAY - KARGOMKOLAY = 'KARGOMKOLAY'.freeze, - - # TODO: Write general description for TRUNKRS - TRUNKRS = 'TRUNKRS'.freeze, - - # TODO: Write general description for OMNIRPS_WEBHOOK - OMNIRPS_WEBHOOK = 'OMNIRPS_WEBHOOK'.freeze, - - # TODO: Write general description for CHILEXPRESS - CHILEXPRESS = 'CHILEXPRESS'.freeze, - - # TODO: Write general description for TESTING_COURIER - TESTING_COURIER = 'TESTING_COURIER'.freeze, - - # TODO: Write general description for JNE_API - JNE_API = 'JNE_API'.freeze, - - # TODO: Write general description for BJSHOMEDELIVERY_FTP - BJSHOMEDELIVERY_FTP = 'BJSHOMEDELIVERY_FTP'.freeze, - - # TODO: Write general description for DEXPRESS_WEBHOOK - DEXPRESS_WEBHOOK = 'DEXPRESS_WEBHOOK'.freeze, - - # TODO: Write general description for USPS_API - USPS_API = 'USPS_API'.freeze, - - # TODO: Write general description for TRANSVIRTUAL - TRANSVIRTUAL = 'TRANSVIRTUAL'.freeze, - - # TODO: Write general description for SOLISTICA_API - SOLISTICA_API = 'SOLISTICA_API'.freeze, - - # TODO: Write general description for CHIENVENTURE_WEBHOOK - CHIENVENTURE_WEBHOOK = 'CHIENVENTURE_WEBHOOK'.freeze, - - # TODO: Write general description for DPD_UK_SFTP - DPD_UK_SFTP = 'DPD_UK_SFTP'.freeze, - - # TODO: Write general description for INPOST_UK - INPOST_UK = 'INPOST_UK'.freeze, - - # TODO: Write general description for JAVIT - JAVIT = 'JAVIT'.freeze, - - # TODO: Write general description for ZTO_DOMESTIC - ZTO_DOMESTIC = 'ZTO_DOMESTIC'.freeze, - - # TODO: Write general description for DHL_GT_API - DHL_GT_API = 'DHL_GT_API'.freeze, - - # TODO: Write general description for CEVA_TRACKING - CEVA_TRACKING = 'CEVA_TRACKING'.freeze, - - # TODO: Write general description for KOMON_EXPRESS - KOMON_EXPRESS = 'KOMON_EXPRESS'.freeze, - - # TODO: Write general description for EASTWESTCOURIER_FTP - EASTWESTCOURIER_FTP = 'EASTWESTCOURIER_FTP'.freeze, - - # TODO: Write general description for DANNIAO - DANNIAO = 'DANNIAO'.freeze, - - # TODO: Write general description for SPECTRAN - SPECTRAN = 'SPECTRAN'.freeze, - - # TODO: Write general description for DELIVER_IT - DELIVER_IT = 'DELIVER_IT'.freeze, - - # TODO: Write general description for RELAISCOLIS - RELAISCOLIS = 'RELAISCOLIS'.freeze, - - # TODO: Write general description for GLS_SPAIN_API - GLS_SPAIN_API = 'GLS_SPAIN_API'.freeze, - - # TODO: Write general description for POSTPLUS - POSTPLUS = 'POSTPLUS'.freeze, - - # TODO: Write general description for AIRTERRA - AIRTERRA = 'AIRTERRA'.freeze, - - # TODO: Write general description for GIO_ECOURIER_API - GIO_ECOURIER_API = 'GIO_ECOURIER_API'.freeze, - - # TODO: Write general description for DPD_CH_SFTP - DPD_CH_SFTP = 'DPD_CH_SFTP'.freeze, - - # TODO: Write general description for FEDEX_API - FEDEX_API = 'FEDEX_API'.freeze, - - # TODO: Write general description for INTERSMARTTRANS - INTERSMARTTRANS = 'INTERSMARTTRANS'.freeze, - - # TODO: Write general description for HERMES_UK_SFTP - HERMES_UK_SFTP = 'HERMES_UK_SFTP'.freeze, - - # TODO: Write general description for EXELOT_FTP - EXELOT_FTP = 'EXELOT_FTP'.freeze, - - # TODO: Write general description for DHL_PA_API - DHL_PA_API = 'DHL_PA_API'.freeze, - - # TODO: Write general description for VIRTRANSPORT_SFTP - VIRTRANSPORT_SFTP = 'VIRTRANSPORT_SFTP'.freeze, - - # TODO: Write general description for WORLDNET - WORLDNET = 'WORLDNET'.freeze, - - # TODO: Write general description for INSTABOX_WEBHOOK - INSTABOX_WEBHOOK = 'INSTABOX_WEBHOOK'.freeze, - - # TODO: Write general description for KNG - KNG = 'KNG'.freeze, - - # TODO: Write general description for FLASHEXPRESS_WEBHOOK - FLASHEXPRESS_WEBHOOK = 'FLASHEXPRESS_WEBHOOK'.freeze, - - # TODO: Write general description for MAGYAR_POSTA_API - MAGYAR_POSTA_API = 'MAGYAR_POSTA_API'.freeze, - - # TODO: Write general description for WESHIP_API - WESHIP_API = 'WESHIP_API'.freeze, - - # TODO: Write general description for OHI_WEBHOOK - OHI_WEBHOOK = 'OHI_WEBHOOK'.freeze, - - # TODO: Write general description for MUDITA - MUDITA = 'MUDITA'.freeze, - - # TODO: Write general description for BLUEDART_API - BLUEDART_API = 'BLUEDART_API'.freeze, - - # TODO: Write general description for T_CAT_API - T_CAT_API = 'T_CAT_API'.freeze, - - # TODO: Write general description for ADS - ADS = 'ADS'.freeze, - - # TODO: Write general description for HERMES_IT - HERMES_IT = 'HERMES_IT'.freeze, - - # TODO: Write general description for FITZMARK_API - FITZMARK_API = 'FITZMARK_API'.freeze, - - # TODO: Write general description for POSTI_API - POSTI_API = 'POSTI_API'.freeze, - - # TODO: Write general description for SMSA_EXPRESS_WEBHOOK - SMSA_EXPRESS_WEBHOOK = 'SMSA_EXPRESS_WEBHOOK'.freeze, - - # TODO: Write general description for TAMERGROUP_WEBHOOK - TAMERGROUP_WEBHOOK = 'TAMERGROUP_WEBHOOK'.freeze, - - # TODO: Write general description for LIVRAPIDE - LIVRAPIDE = 'LIVRAPIDE'.freeze, - - # TODO: Write general description for NIPPON_EXPRESS - NIPPON_EXPRESS = 'NIPPON_EXPRESS'.freeze, - - # TODO: Write general description for BETTERTRUCKS - BETTERTRUCKS = 'BETTERTRUCKS'.freeze, - - # TODO: Write general description for FAN - FAN = 'FAN'.freeze, - - # TODO: Write general description for PB_USPSFLATS_FTP - PB_USPSFLATS_FTP = 'PB_USPSFLATS_FTP'.freeze, - - # TODO: Write general description for PARCELRIGHT - PARCELRIGHT = 'PARCELRIGHT'.freeze, - - # TODO: Write general description for ITHINKLOGISTICS - ITHINKLOGISTICS = 'ITHINKLOGISTICS'.freeze, - - # TODO: Write general description for KERRY_EXPRESS_TH_WEBHOOK - KERRY_EXPRESS_TH_WEBHOOK = 'KERRY_EXPRESS_TH_WEBHOOK'.freeze, - - # TODO: Write general description for ECOUTIER - ECOUTIER = 'ECOUTIER'.freeze, - - # TODO: Write general description for SHOWL - SHOWL = 'SHOWL'.freeze, - - # TODO: Write general description for BRT_IT_API - BRT_IT_API = 'BRT_IT_API'.freeze, - - # TODO: Write general description for RIXONHK_API - RIXONHK_API = 'RIXONHK_API'.freeze, - - # TODO: Write general description for DBSCHENKER_API - DBSCHENKER_API = 'DBSCHENKER_API'.freeze, - - # TODO: Write general description for ILYANGLOGIS - ILYANGLOGIS = 'ILYANGLOGIS'.freeze, - - # TODO: Write general description for MAIL_BOX_ETC - MAIL_BOX_ETC = 'MAIL_BOX_ETC'.freeze, - - # TODO: Write general description for WESHIP - WESHIP = 'WESHIP'.freeze, - - # TODO: Write general description for DHL_GLOBAL_MAIL_API - DHL_GLOBAL_MAIL_API = 'DHL_GLOBAL_MAIL_API'.freeze, - - # TODO: Write general description for ACTIVOS24_API - ACTIVOS24_API = 'ACTIVOS24_API'.freeze, - - # TODO: Write general description for ATSHEALTHCARE - ATSHEALTHCARE = 'ATSHEALTHCARE'.freeze, - - # TODO: Write general description for LUWJISTIK - LUWJISTIK = 'LUWJISTIK'.freeze, - - # TODO: Write general description for GW_WORLD - GW_WORLD = 'GW_WORLD'.freeze, - - # TODO: Write general description for FAIRSENDEN_API - FAIRSENDEN_API = 'FAIRSENDEN_API'.freeze, - - # TODO: Write general description for SERVIP_WEBHOOK - SERVIP_WEBHOOK = 'SERVIP_WEBHOOK'.freeze, - - # TODO: Write general description for SWISHIP - SWISHIP = 'SWISHIP'.freeze, - - # TODO: Write general description for TANET - TANET = 'TANET'.freeze, - - # TODO: Write general description for HOTSIN_CARGO - HOTSIN_CARGO = 'HOTSIN_CARGO'.freeze, - - # TODO: Write general description for DIREX - DIREX = 'DIREX'.freeze, - - # TODO: Write general description for HUANTONG - HUANTONG = 'HUANTONG'.freeze, - - # TODO: Write general description for IMILE_API - IMILE_API = 'IMILE_API'.freeze, - - # TODO: Write general description for BDMNET - BDMNET = 'BDMNET'.freeze, - - # TODO: Write general description for AUEXPRESS - AUEXPRESS = 'AUEXPRESS'.freeze, - - # TODO: Write general description for NYTLOGISTICS - NYTLOGISTICS = 'NYTLOGISTICS'.freeze, - - # TODO: Write general description for DSV_REFERENCE - DSV_REFERENCE = 'DSV_REFERENCE'.freeze, - - # TODO: Write general description for NOVOFARMA_WEBHOOK - NOVOFARMA_WEBHOOK = 'NOVOFARMA_WEBHOOK'.freeze, - - # TODO: Write general description for AITWORLDWIDE_SFTP - AITWORLDWIDE_SFTP = 'AITWORLDWIDE_SFTP'.freeze, - - # TODO: Write general description for SHOPOLIVE - SHOPOLIVE = 'SHOPOLIVE'.freeze, - - # TODO: Write general description for FNF_ZA - FNF_ZA = 'FNF_ZA'.freeze, - - # TODO: Write general description for DHL_ECOMMERCE_GC - DHL_ECOMMERCE_GC = 'DHL_ECOMMERCE_GC'.freeze, - - # TODO: Write general description for FETCHR - FETCHR = 'FETCHR'.freeze, - - # TODO: Write general description for STARLINKS_API - STARLINKS_API = 'STARLINKS_API'.freeze, - - # TODO: Write general description for YYEXPRESS - YYEXPRESS = 'YYEXPRESS'.freeze, - - # TODO: Write general description for SERVIENTREGA - SERVIENTREGA = 'SERVIENTREGA'.freeze, - - # TODO: Write general description for HANJIN - HANJIN = 'HANJIN'.freeze, - - # TODO: Write general description for SPANISH_SEUR_FTP - SPANISH_SEUR_FTP = 'SPANISH_SEUR_FTP'.freeze, - - # TODO: Write general description for DX_B2B_CONNUM - DX_B2B_CONNUM = 'DX_B2B_CONNUM'.freeze, - - # TODO: Write general description for HELTHJEM_API - HELTHJEM_API = 'HELTHJEM_API'.freeze, - - # TODO: Write general description for INEXPOST - INEXPOST = 'INEXPOST'.freeze, - - # TODO: Write general description for A2B_BA - A2B_BA = 'A2B_BA'.freeze, - - # TODO: Write general description for RHENUS_GROUP - RHENUS_GROUP = 'RHENUS_GROUP'.freeze, - - # TODO: Write general description for SBERLOGISTICS_RU - SBERLOGISTICS_RU = 'SBERLOGISTICS_RU'.freeze, - - # TODO: Write general description for MALCA_AMIT - MALCA_AMIT = 'MALCA_AMIT'.freeze, - - # TODO: Write general description for PPL - PPL = 'PPL'.freeze, - - # TODO: Write general description for OSM_WORLDWIDE_SFTP - OSM_WORLDWIDE_SFTP = 'OSM_WORLDWIDE_SFTP'.freeze, - - # TODO: Write general description for ACILOGISTIX - ACILOGISTIX = 'ACILOGISTIX'.freeze, - - # TODO: Write general description for OPTIMACOURIER - OPTIMACOURIER = 'OPTIMACOURIER'.freeze, - - # TODO: Write general description for NOVA_POSHTA_API - NOVA_POSHTA_API = 'NOVA_POSHTA_API'.freeze, - - # TODO: Write general description for LOGGI - LOGGI = 'LOGGI'.freeze, - - # TODO: Write general description for YIFAN - YIFAN = 'YIFAN'.freeze, - - # TODO: Write general description for MYDYNALOGIC - MYDYNALOGIC = 'MYDYNALOGIC'.freeze, - - # TODO: Write general description for MORNINGLOBAL - MORNINGLOBAL = 'MORNINGLOBAL'.freeze, - - # TODO: Write general description for CONCISE_API - CONCISE_API = 'CONCISE_API'.freeze, - - # TODO: Write general description for FXTRAN - FXTRAN = 'FXTRAN'.freeze, - - # TODO: Write general description for DELIVERYOURPARCEL_ZA - DELIVERYOURPARCEL_ZA = 'DELIVERYOURPARCEL_ZA'.freeze, - - # TODO: Write general description for UPARCEL - UPARCEL = 'UPARCEL'.freeze, - - # TODO: Write general description for MOBI_BR - MOBI_BR = 'MOBI_BR'.freeze, - - # TODO: Write general description for LOGINEXT_WEBHOOK - LOGINEXT_WEBHOOK = 'LOGINEXT_WEBHOOK'.freeze, - - # TODO: Write general description for EMS - EMS = 'EMS'.freeze, - - # TODO: Write general description for SPEEDY - SPEEDY = 'SPEEDY'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_details.rb b/lib/pay_pal_restap_is/models/shipping_details.rb deleted file mode 100644 index 4b85d38..0000000 --- a/lib/pay_pal_restap_is/models/shipping_details.rb +++ /dev/null @@ -1,94 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The shipping details. - class ShippingDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The name of the party. - # @return [ShippingName] - attr_accessor :name - - # A classification for the method of purchase fulfillment (e.g shipping, - # in-store pickup, etc). Either `type` or `options` may be present, but not - # both. - # @return [FullfillmentType] - attr_accessor :type - - # An array of shipping options that the payee or merchant offers to the - # payer to ship or pick up their items. - # @return [Array[ShippingOption]] - attr_accessor :options - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['type'] = 'type' - @_hash['options'] = 'options' - @_hash['address'] = 'address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - type - options - address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, type: SKIP, options: SKIP, address: SKIP) - @name = name unless name == SKIP - @type = type unless type == SKIP - @options = options unless options == SKIP - @address = address unless address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = ShippingName.from_hash(hash['name']) if hash['name'] - type = hash.key?('type') ? hash['type'] : SKIP - # Parameter is an array, so we need to iterate through it - options = nil - unless hash['options'].nil? - options = [] - hash['options'].each do |structure| - options << (ShippingOption.from_hash(structure) if structure) - end - end - - options = SKIP unless hash.key?('options') - address = Address.from_hash(hash['address']) if hash['address'] - - # Create object from extracted values. - ShippingDetails.new(name: name, - type: type, - options: options, - address: address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_name.rb b/lib/pay_pal_restap_is/models/shipping_name.rb deleted file mode 100644 index c77869c..0000000 --- a/lib/pay_pal_restap_is/models/shipping_name.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The name of the party. - class ShippingName < BaseModel - SKIP = Object.new - private_constant :SKIP - - # When the party is a person, the party's full name. - # @return [String] - attr_accessor :full_name - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['full_name'] = 'full_name' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - full_name - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(full_name: SKIP) - @full_name = full_name unless full_name == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - full_name = hash.key?('full_name') ? hash['full_name'] : SKIP - - # Create object from extracted values. - ShippingName.new(full_name: full_name) - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_option.rb b/lib/pay_pal_restap_is/models/shipping_option.rb deleted file mode 100644 index 0781f87..0000000 --- a/lib/pay_pal_restap_is/models/shipping_option.rb +++ /dev/null @@ -1,94 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The options that the payee or merchant offers to the payer to ship or pick - # up their items. - class ShippingOption < BaseModel - SKIP = Object.new - private_constant :SKIP - - # A unique ID that identifies a payer-selected shipping option. - # @return [String] - attr_accessor :id - - # A description that the payer sees, which helps them choose an appropriate - # shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, - # `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this - # description to the payer's locale. - # @return [String] - attr_accessor :label - - # A classification for the method of purchase fulfillment. - # @return [ShippingType] - attr_accessor :type - - # The currency and amount for a financial transaction, such as a balance or - # payment due. - # @return [Money] - attr_accessor :amount - - # If the API request sets `selected = true`, it represents the shipping - # option that the payee or merchant expects to be pre-selected for the payer - # when they first view the `shipping.options` in the PayPal Checkout - # experience. As part of the response if a `shipping.option` contains - # `selected=true`, it represents the shipping option that the payer selected - # during the course of checkout with PayPal. Only one `shipping.option` can - # be set to `selected=true`. - # @return [TrueClass | FalseClass] - attr_accessor :selected - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['label'] = 'label' - @_hash['type'] = 'type' - @_hash['amount'] = 'amount' - @_hash['selected'] = 'selected' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - type - amount - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id:, label:, selected:, type: SKIP, amount: SKIP) - @id = id - @label = label - @type = type unless type == SKIP - @amount = amount unless amount == SKIP - @selected = selected - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : nil - label = hash.key?('label') ? hash['label'] : nil - selected = hash.key?('selected') ? hash['selected'] : nil - type = hash.key?('type') ? hash['type'] : SKIP - amount = Money.from_hash(hash['amount']) if hash['amount'] - - # Create object from extracted values. - ShippingOption.new(id: id, - label: label, - selected: selected, - type: type, - amount: amount) - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_preference.rb b/lib/pay_pal_restap_is/models/shipping_preference.rb deleted file mode 100644 index 9db3e81..0000000 --- a/lib/pay_pal_restap_is/models/shipping_preference.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The location from which the shipping address is derived. - class ShippingPreference - SHIPPING_PREFERENCE = [ - # TODO: Write general description for GET_FROM_FILE - GET_FROM_FILE = 'GET_FROM_FILE'.freeze, - - # TODO: Write general description for NO_SHIPPING - NO_SHIPPING = 'NO_SHIPPING'.freeze, - - # TODO: Write general description for SET_PROVIDED_ADDRESS - SET_PROVIDED_ADDRESS = 'SET_PROVIDED_ADDRESS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_type.rb b/lib/pay_pal_restap_is/models/shipping_type.rb deleted file mode 100644 index f2de97f..0000000 --- a/lib/pay_pal_restap_is/models/shipping_type.rb +++ /dev/null @@ -1,29 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A classification for the method of purchase fulfillment. - class ShippingType - SHIPPING_TYPE = [ - # TODO: Write general description for SHIPPING - SHIPPING = 'SHIPPING'.freeze, - - # TODO: Write general description for PICKUP - PICKUP = 'PICKUP'.freeze, - - # TODO: Write general description for PICKUP_IN_STORE - PICKUP_IN_STORE = 'PICKUP_IN_STORE'.freeze, - - # TODO: Write general description for PICKUP_FROM_PERSON - PICKUP_FROM_PERSON = 'PICKUP_FROM_PERSON'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb b/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb deleted file mode 100644 index 7d8bfd8..0000000 --- a/lib/pay_pal_restap_is/models/shipping_with_tracking_details.rb +++ /dev/null @@ -1,113 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The order shipping details. - class ShippingWithTrackingDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The name of the party. - # @return [ShippingName] - attr_accessor :name - - # A classification for the method of purchase fulfillment (e.g shipping, - # in-store pickup, etc). Either `type` or `options` may be present, but not - # both. - # @return [FullfillmentType] - attr_accessor :type - - # An array of shipping options that the payee or merchant offers to the - # payer to ship or pick up their items. - # @return [Array[ShippingOption]] - attr_accessor :options - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # An array of trackers for a transaction. - # @return [Array[OrderTrackerResponse]] - attr_accessor :trackers - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['type'] = 'type' - @_hash['options'] = 'options' - @_hash['address'] = 'address' - @_hash['trackers'] = 'trackers' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - type - options - address - trackers - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, type: SKIP, options: SKIP, address: SKIP, - trackers: SKIP) - @name = name unless name == SKIP - @type = type unless type == SKIP - @options = options unless options == SKIP - @address = address unless address == SKIP - @trackers = trackers unless trackers == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = ShippingName.from_hash(hash['name']) if hash['name'] - type = hash.key?('type') ? hash['type'] : SKIP - # Parameter is an array, so we need to iterate through it - options = nil - unless hash['options'].nil? - options = [] - hash['options'].each do |structure| - options << (ShippingOption.from_hash(structure) if structure) - end - end - - options = SKIP unless hash.key?('options') - address = Address.from_hash(hash['address']) if hash['address'] - # Parameter is an array, so we need to iterate through it - trackers = nil - unless hash['trackers'].nil? - trackers = [] - hash['trackers'].each do |structure| - trackers << (OrderTrackerResponse.from_hash(structure) if structure) - end - end - - trackers = SKIP unless hash.key?('trackers') - - # Create object from extracted values. - ShippingWithTrackingDetails.new(name: name, - type: type, - options: options, - address: address, - trackers: trackers) - end - end -end diff --git a/lib/pay_pal_restap_is/models/sofort_payment_object.rb b/lib/pay_pal_restap_is/models/sofort_payment_object.rb deleted file mode 100644 index bde504b..0000000 --- a/lib/pay_pal_restap_is/models/sofort_payment_object.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information used to pay using Sofort. - class SofortPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - iban_last_chars - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP, - iban_last_chars: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - - # Create object from extracted values. - SofortPaymentObject.new(name: name, - country_code: country_code, - bic: bic, - iban_last_chars: iban_last_chars) - end - end -end diff --git a/lib/pay_pal_restap_is/models/sofort_payment_request.rb b/lib/pay_pal_restap_is/models/sofort_payment_request.rb deleted file mode 100644 index f184766..0000000 --- a/lib/pay_pal_restap_is/models/sofort_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Sofort. - class SofortPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - SofortPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/standard_entry_class_code.rb b/lib/pay_pal_restap_is/models/standard_entry_class_code.rb deleted file mode 100644 index f1facdf..0000000 --- a/lib/pay_pal_restap_is/models/standard_entry_class_code.rb +++ /dev/null @@ -1,36 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # NACHA (the regulatory body governing the ACH network) requires that API - # callers (merchants, partners) obtain the consumer’s explicit authorization - # before initiating a transaction. To stay compliant, you’ll need to make sure - # that you retain a compliant authorization for each transaction that you - # originate to the ACH Network using this API. ACH transactions are - # categorized (using SEC codes) by how you capture authorization from the - # Receiver (the person whose bank account is being debited or credited). - # PayPal supports the following SEC codes. - class StandardEntryClassCode - STANDARD_ENTRY_CLASS_CODE = [ - # TODO: Write general description for TEL - TEL = 'TEL'.freeze, - - # TODO: Write general description for WEB - WEB = 'WEB'.freeze, - - # TODO: Write general description for CCD - CCD = 'CCD'.freeze, - - # TODO: Write general description for PPD - PPD = 'PPD'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb b/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb deleted file mode 100644 index 5dd1877..0000000 --- a/lib/pay_pal_restap_is/models/store_in_vault_instruction.rb +++ /dev/null @@ -1,20 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Defines how and when the payment source gets vaulted. - class StoreInVaultInstruction - STORE_IN_VAULT_INSTRUCTION = [ - # TODO: Write general description for ON_SUCCESS - ON_SUCCESS = 'ON_SUCCESS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source.rb b/lib/pay_pal_restap_is/models/stored_payment_source.rb deleted file mode 100644 index f287208..0000000 --- a/lib/pay_pal_restap_is/models/stored_payment_source.rb +++ /dev/null @@ -1,95 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Provides additional details to process a payment using a `payment_source` - # that has been stored or is intended to be stored (also referred to as - # stored_credential or card-on-file).
Parameter - # compatibility:
  • `payment_type=ONE_TIME` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with - # `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or - # `previous_network_transaction_reference` is compatible only with - # `payment_initiator=MERCHANT`.
  • Only one of the parameters - - # `previous_transaction_reference` and - # `previous_network_transaction_reference` - can be present in the - # request.
- class StoredPaymentSource < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The person or party who initiated or triggered the payment. - # @return [PaymentInitiator] - attr_accessor :payment_initiator - - # Indicates the type of the stored payment_source payment. - # @return [StoredPaymentSourcePaymentType] - attr_accessor :payment_type - - # Indicates if this is a `first` or `subsequent` payment using a stored - # payment source (also referred to as stored credential or card on file). - # @return [StoredPaymentSourceUsageType] - attr_accessor :usage - - # Reference values used by the card network to identify a transaction. - # @return [NetworkTransactionReference] - attr_accessor :previous_network_transaction_reference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['payment_initiator'] = 'payment_initiator' - @_hash['payment_type'] = 'payment_type' - @_hash['usage'] = 'usage' - @_hash['previous_network_transaction_reference'] = - 'previous_network_transaction_reference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - usage - previous_network_transaction_reference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(payment_initiator:, payment_type:, - usage: StoredPaymentSourceUsageType::DERIVED, - previous_network_transaction_reference: SKIP) - @payment_initiator = payment_initiator - @payment_type = payment_type - @usage = usage unless usage == SKIP - unless previous_network_transaction_reference == SKIP - @previous_network_transaction_reference = - previous_network_transaction_reference - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - payment_initiator = - hash.key?('payment_initiator') ? hash['payment_initiator'] : nil - payment_type = hash.key?('payment_type') ? hash['payment_type'] : nil - usage = hash['usage'] ||= StoredPaymentSourceUsageType::DERIVED - if hash['previous_network_transaction_reference'] - previous_network_transaction_reference = NetworkTransactionReference.from_hash(hash['previous_network_transaction_reference']) - end - - # Create object from extracted values. - StoredPaymentSource.new(payment_initiator: payment_initiator, - payment_type: payment_type, - usage: usage, - previous_network_transaction_reference: previous_network_transaction_reference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb b/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb deleted file mode 100644 index 8a2293a..0000000 --- a/lib/pay_pal_restap_is/models/stored_payment_source_payment_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Indicates the type of the stored payment_source payment. - class StoredPaymentSourcePaymentType - STORED_PAYMENT_SOURCE_PAYMENT_TYPE = [ - # TODO: Write general description for ONE_TIME - ONE_TIME = 'ONE_TIME'.freeze, - - # TODO: Write general description for RECURRING - RECURRING = 'RECURRING'.freeze, - - # TODO: Write general description for UNSCHEDULED - UNSCHEDULED = 'UNSCHEDULED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb b/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb deleted file mode 100644 index 490c416..0000000 --- a/lib/pay_pal_restap_is/models/stored_payment_source_usage_type.rb +++ /dev/null @@ -1,27 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Indicates if this is a `first` or `subsequent` payment using a stored - # payment source (also referred to as stored credential or card on file). - class StoredPaymentSourceUsageType - STORED_PAYMENT_SOURCE_USAGE_TYPE = [ - # TODO: Write general description for FIRST - FIRST = 'FIRST'.freeze, - - # TODO: Write general description for SUBSEQUENT - SUBSEQUENT = 'SUBSEQUENT'.freeze, - - # TODO: Write general description for DERIVED - DERIVED = 'DERIVED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/supplementary_data.rb b/lib/pay_pal_restap_is/models/supplementary_data.rb deleted file mode 100644 index 90eef5e..0000000 --- a/lib/pay_pal_restap_is/models/supplementary_data.rb +++ /dev/null @@ -1,58 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Supplementary data about a payment. This object passes information that can - # be used to improve risk assessments and processing costs, for example, by - # providing Level 2 and Level 3 payment data. - class SupplementaryData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Merchants and partners can add Level 2 and 3 data to payments to reduce - # risk and payment processing costs. For more information about processing - # payments, see che - # ckout or multiparty checkout. - # @return [CardSupplementaryData] - attr_accessor :card - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['card'] = 'card' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - card - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(card: SKIP) - @card = card unless card == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - card = CardSupplementaryData.from_hash(hash['card']) if hash['card'] - - # Create object from extracted values. - SupplementaryData.new(card: card) - end - end -end diff --git a/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb b/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb deleted file mode 100644 index 1bb753b..0000000 --- a/lib/pay_pal_restap_is/models/supplementary_purchase_data.rb +++ /dev/null @@ -1,63 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The capture identification-related fields. Includes the invoice ID, custom - # ID, note to payer, and soft descriptor. - class SupplementaryPurchaseData < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The API caller-provided external invoice number for this order. Appears in - # both the payer's transaction history and the emails that the payer - # receives. - # @return [String] - attr_accessor :invoice_id - - # An informational note about this settlement. Appears in both the payer's - # transaction history and the emails that the payer receives. - # @return [String] - attr_accessor :note_to_payer - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['invoice_id'] = 'invoice_id' - @_hash['note_to_payer'] = 'note_to_payer' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - invoice_id - note_to_payer - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(invoice_id: SKIP, note_to_payer: SKIP) - @invoice_id = invoice_id unless invoice_id == SKIP - @note_to_payer = note_to_payer unless note_to_payer == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - invoice_id = hash.key?('invoice_id') ? hash['invoice_id'] : SKIP - note_to_payer = hash.key?('note_to_payer') ? hash['note_to_payer'] : SKIP - - # Create object from extracted values. - SupplementaryPurchaseData.new(invoice_id: invoice_id, - note_to_payer: note_to_payer) - end - end -end diff --git a/lib/pay_pal_restap_is/models/tax_id_type.rb b/lib/pay_pal_restap_is/models/tax_id_type.rb deleted file mode 100644 index 8e8ffae..0000000 --- a/lib/pay_pal_restap_is/models/tax_id_type.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The customer's tax ID type. - class TaxIdType - TAX_ID_TYPE = [ - # TODO: Write general description for BR_CPF - BR_CPF = 'BR_CPF'.freeze, - - # TODO: Write general description for BR_CNPJ - BR_CNPJ = 'BR_CNPJ'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/tax_info.rb b/lib/pay_pal_restap_is/models/tax_info.rb deleted file mode 100644 index 3fbb8c8..0000000 --- a/lib/pay_pal_restap_is/models/tax_info.rb +++ /dev/null @@ -1,57 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The tax ID of the customer. The customer is also known as the payer. Both - # `tax_id` and `tax_id_type` are required. - class TaxInfo < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The customer's tax ID value. - # @return [String] - attr_accessor :tax_id - - # The customer's tax ID type. - # @return [TaxIdType] - attr_accessor :tax_id_type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['tax_id'] = 'tax_id' - @_hash['tax_id_type'] = 'tax_id_type' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(tax_id:, tax_id_type:) - @tax_id = tax_id - @tax_id_type = tax_id_type - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - tax_id = hash.key?('tax_id') ? hash['tax_id'] : nil - tax_id_type = hash.key?('tax_id_type') ? hash['tax_id_type'] : nil - - # Create object from extracted values. - TaxInfo.new(tax_id: tax_id, - tax_id_type: tax_id_type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb b/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb deleted file mode 100644 index f24a67b..0000000 --- a/lib/pay_pal_restap_is/models/three_d_secure_authentication_response.rb +++ /dev/null @@ -1,62 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Results of 3D Secure Authentication. - class ThreeDSecureAuthenticationResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Transactions status result identifier. The outcome of the issuer's - # authentication. - # @return [PAResStatus] - attr_accessor :authentication_status - - # Status of Authentication eligibility. - # @return [EnrollmentStatus] - attr_accessor :enrollment_status - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['authentication_status'] = 'authentication_status' - @_hash['enrollment_status'] = 'enrollment_status' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - authentication_status - enrollment_status - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(authentication_status: SKIP, enrollment_status: SKIP) - @authentication_status = authentication_status unless authentication_status == SKIP - @enrollment_status = enrollment_status unless enrollment_status == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - authentication_status = - hash.key?('authentication_status') ? hash['authentication_status'] : SKIP - enrollment_status = - hash.key?('enrollment_status') ? hash['enrollment_status'] : SKIP - - # Create object from extracted values. - ThreeDSecureAuthenticationResponse.new(authentication_status: authentication_status, - enrollment_status: enrollment_status) - end - end -end diff --git a/lib/pay_pal_restap_is/models/token.rb b/lib/pay_pal_restap_is/models/token.rb deleted file mode 100644 index 76f18b2..0000000 --- a/lib/pay_pal_restap_is/models/token.rb +++ /dev/null @@ -1,56 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The tokenized payment source to fund a payment. - class Token < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the token. - # @return [String] - attr_accessor :id - - # The tokenization method that generated the ID. - # @return [TokenType] - attr_accessor :type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['type'] = 'type' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id:, type:) - @id = id - @type = type - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : nil - type = hash.key?('type') ? hash['type'] : nil - - # Create object from extracted values. - Token.new(id: id, - type: type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/token_type.rb b/lib/pay_pal_restap_is/models/token_type.rb deleted file mode 100644 index 45540dd..0000000 --- a/lib/pay_pal_restap_is/models/token_type.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The tokenization method that generated the ID. - class TokenType - TOKEN_TYPE = [ - # TODO: Write general description for BILLING_AGREEMENT - BILLING_AGREEMENT = 'BILLING_AGREEMENT'.freeze, - - # TODO: Write general description for SETUP_TOKEN - SETUP_TOKEN = 'SETUP_TOKEN'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/trustly_payment_object.rb b/lib/pay_pal_restap_is/models/trustly_payment_object.rb deleted file mode 100644 index ddb5925..0000000 --- a/lib/pay_pal_restap_is/models/trustly_payment_object.rb +++ /dev/null @@ -1,85 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Trustly. - class TrustlyPaymentObject < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # The business identification code (BIC). In payments systems, a BIC is used - # to identify a specific business, most commonly a bank. - # @return [String] - attr_accessor :bic - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['bic'] = 'bic' - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - country_code - bic - iban_last_chars - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, country_code: SKIP, bic: SKIP, - iban_last_chars: SKIP) - @name = name unless name == SKIP - @country_code = country_code unless country_code == SKIP - @bic = bic unless bic == SKIP - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : SKIP - country_code = hash.key?('country_code') ? hash['country_code'] : SKIP - bic = hash.key?('bic') ? hash['bic'] : SKIP - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - - # Create object from extracted values. - TrustlyPaymentObject.new(name: name, - country_code: country_code, - bic: bic, - iban_last_chars: iban_last_chars) - end - end -end diff --git a/lib/pay_pal_restap_is/models/trustly_payment_request.rb b/lib/pay_pal_restap_is/models/trustly_payment_request.rb deleted file mode 100644 index 7a6e714..0000000 --- a/lib/pay_pal_restap_is/models/trustly_payment_request.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Trustly. - class TrustlyPaymentRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The full name representation like Mr J Smith. - # @return [String] - attr_accessor :name - - # The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) - # that identifies the country or region.
Note: - # The country code for Great Britain is GB and not - # UK as used in the top-level domain names for that country. - # Use the `C2` country code for China worldwide for comparable uncontrolled - # price (CUP) method, bank card, and cross-border transactions.
- # @return [String] - attr_accessor :country_code - - # Customizes the payer experience during the approval process for the - # payment. - # @return [ExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['country_code'] = 'country_code' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name:, country_code:, experience_context: SKIP) - @name = name - @country_code = country_code - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = hash.key?('name') ? hash['name'] : nil - country_code = hash.key?('country_code') ? hash['country_code'] : nil - experience_context = ExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - TrustlyPaymentRequest.new(name: name, - country_code: country_code, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/universal_product_code.rb b/lib/pay_pal_restap_is/models/universal_product_code.rb deleted file mode 100644 index 7d0479c..0000000 --- a/lib/pay_pal_restap_is/models/universal_product_code.rb +++ /dev/null @@ -1,56 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The Universal Product Code of the item. - class UniversalProductCode < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The Universal Product Code type. - # @return [UPCType] - attr_accessor :type - - # The UPC product code of the item. - # @return [String] - attr_accessor :code - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['type'] = 'type' - @_hash['code'] = 'code' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(type:, code:) - @type = type - @code = code - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - type = hash.key?('type') ? hash['type'] : nil - code = hash.key?('code') ? hash['code'] : nil - - # Create object from extracted values. - UniversalProductCode.new(type: type, - code: code) - end - end -end diff --git a/lib/pay_pal_restap_is/models/upc_type.rb b/lib/pay_pal_restap_is/models/upc_type.rb deleted file mode 100644 index 9261741..0000000 --- a/lib/pay_pal_restap_is/models/upc_type.rb +++ /dev/null @@ -1,38 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The Universal Product Code type. - class UPCType - UPC_TYPE = [ - # TODO: Write general description for UPCA - UPCA = 'UPC-A'.freeze, - - # TODO: Write general description for UPCB - UPCB = 'UPC-B'.freeze, - - # TODO: Write general description for UPCC - UPCC = 'UPC-C'.freeze, - - # TODO: Write general description for UPCD - UPCD = 'UPC-D'.freeze, - - # TODO: Write general description for UPCE - UPCE = 'UPC-E'.freeze, - - # TODO: Write general description for UPC2 - UPC2 = 'UPC-2'.freeze, - - # TODO: Write general description for UPC5 - UPC5 = 'UPC-5'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_customer.rb b/lib/pay_pal_restap_is/models/vault_customer.rb deleted file mode 100644 index 65017b7..0000000 --- a/lib/pay_pal_restap_is/models/vault_customer.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a customer in PayPal's system of record. - class VaultCustomer < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP) - @id = id unless id == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - - # Create object from extracted values. - VaultCustomer.new(id: id) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_experience_context.rb b/lib/pay_pal_restap_is/models/vault_experience_context.rb deleted file mode 100644 index 02b2d65..0000000 --- a/lib/pay_pal_restap_is/models/vault_experience_context.rb +++ /dev/null @@ -1,112 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the Vault creation flow experience for your customers. - class VaultExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the - # language in which to localize the error-related strings, such as messages, - # issues, and suggested actions. The tag is made up of the [ISO 639-2 - # language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), - # the optional [ISO-15924 script - # tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 - # alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region - # code](https://unstats.un.org/unsd/methodology/m49/). - # @return [String] - attr_accessor :locale - - # The URL where the customer is redirected after customer approves leaves - # the flow. It is a required field for contingency flows like PayPal wallet, - # 3DS. - # @return [String] - attr_accessor :return_url - - # The URL where the customer is redirected after customer cancels or leaves - # the flow. It is a required field for contingency flows like PayPal wallet, - # 3DS. - # @return [String] - attr_accessor :cancel_url - - # The shipping preference. This only applies to PayPal payment source. - # @return [String] - attr_accessor :shipping_preference - - # Vault Instruction on action to be performed after a successful payer - # approval. - # @return [String] - attr_accessor :vault_instruction - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['locale'] = 'locale' - @_hash['return_url'] = 'return_url' - @_hash['cancel_url'] = 'cancel_url' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['vault_instruction'] = 'vault_instruction' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - locale - return_url - cancel_url - shipping_preference - vault_instruction - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, locale: SKIP, return_url: SKIP, - cancel_url: SKIP, shipping_preference: 'GET_FROM_FILE', - vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') - @brand_name = brand_name unless brand_name == SKIP - @locale = locale unless locale == SKIP - @return_url = return_url unless return_url == SKIP - @cancel_url = cancel_url unless cancel_url == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @vault_instruction = vault_instruction unless vault_instruction == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - locale = hash.key?('locale') ? hash['locale'] : SKIP - return_url = hash.key?('return_url') ? hash['return_url'] : SKIP - cancel_url = hash.key?('cancel_url') ? hash['cancel_url'] : SKIP - shipping_preference = hash['shipping_preference'] ||= 'GET_FROM_FILE' - vault_instruction = - hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' - - # Create object from extracted values. - VaultExperienceContext.new(brand_name: brand_name, - locale: locale, - return_url: return_url, - cancel_url: cancel_url, - shipping_preference: shipping_preference, - vault_instruction: vault_instruction) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_instruction.rb b/lib/pay_pal_restap_is/models/vault_instruction.rb deleted file mode 100644 index fc02c8d..0000000 --- a/lib/pay_pal_restap_is/models/vault_instruction.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Base vaulting specification. The object can be extended for specific use - # cases within each payment_source that supports vaulting. - class VaultInstruction < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Defines how and when the payment source gets vaulted. - # @return [StoreInVaultInstruction] - attr_accessor :store_in_vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['store_in_vault'] = 'store_in_vault' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(store_in_vault:) - @store_in_vault = store_in_vault - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - store_in_vault = - hash.key?('store_in_vault') ? hash['store_in_vault'] : nil - - # Create object from extracted values. - VaultInstruction.new(store_in_vault: store_in_vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_instruction_base.rb b/lib/pay_pal_restap_is/models/vault_instruction_base.rb deleted file mode 100644 index ea770c0..0000000 --- a/lib/pay_pal_restap_is/models/vault_instruction_base.rb +++ /dev/null @@ -1,52 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Basic vault instruction specification that can be extended by specific - # payment sources that supports vaulting. - class VaultInstructionBase < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Defines how and when the payment source gets vaulted. - # @return [StoreInVaultInstruction] - attr_accessor :store_in_vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['store_in_vault'] = 'store_in_vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - store_in_vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(store_in_vault: SKIP) - @store_in_vault = store_in_vault unless store_in_vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - store_in_vault = - hash.key?('store_in_vault') ? hash['store_in_vault'] : SKIP - - # Create object from extracted values. - VaultInstructionBase.new(store_in_vault: store_in_vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb b/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb deleted file mode 100644 index d1aaafa..0000000 --- a/lib/pay_pal_restap_is/models/vault_pay_pal_wallet_request.rb +++ /dev/null @@ -1,115 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A resource representing a request to vault PayPal Wallet. - class VaultPayPalWalletRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The description displayed to the consumer on the approval flow for a - # digital wallet, as well as on the merchant view of the payment token - # management experience. exp: PayPal.com. - # @return [String] - attr_accessor :description - - # The shipping details. - # @return [VaultedDigitalWalletShippingDetails] - attr_accessor :shipping - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # The usage type associated with a digital wallet payment token. - # @return [String] - attr_accessor :usage_type - - # The customer type associated with a digital wallet payment token. This is - # to indicate whether the customer acting on the merchant / platform is - # either a business or a consumer. - # @return [String] - attr_accessor :customer_type - - # Customizes the Vault creation flow experience for your customers. - # @return [VaultExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['description'] = 'description' - @_hash['shipping'] = 'shipping' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - shipping - permit_multiple_payment_tokens - usage_type - customer_type - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(description: SKIP, shipping: SKIP, - permit_multiple_payment_tokens: false, usage_type: SKIP, - customer_type: SKIP, experience_context: SKIP) - @description = description unless description == SKIP - @shipping = shipping unless shipping == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - @usage_type = usage_type unless usage_type == SKIP - @customer_type = customer_type unless customer_type == SKIP - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - description = hash.key?('description') ? hash['description'] : SKIP - shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if - hash['shipping'] - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP - customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP - experience_context = VaultExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - VaultPayPalWalletRequest.new(description: description, - shipping: shipping, - permit_multiple_payment_tokens: permit_multiple_payment_tokens, - usage_type: usage_type, - customer_type: customer_type, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_response.rb b/lib/pay_pal_restap_is/models/vault_response.rb deleted file mode 100644 index d99219f..0000000 --- a/lib/pay_pal_restap_is/models/vault_response.rb +++ /dev/null @@ -1,86 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a saved payment source. - class VaultResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the saved payment source. - # @return [String] - attr_accessor :id - - # The vault status. - # @return [VaultStatus] - attr_accessor :status - - # The details about a customer in PayPal's system of record. - # @return [VaultCustomer] - attr_accessor :customer - - # An array of request-related HATEOAS links. - # @return [Array[LinkDescription]] - attr_accessor :links - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['status'] = 'status' - @_hash['customer'] = 'customer' - @_hash['links'] = 'links' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - status - customer - links - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, status: SKIP, customer: SKIP, links: SKIP) - @id = id unless id == SKIP - @status = status unless status == SKIP - @customer = customer unless customer == SKIP - @links = links unless links == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - status = hash.key?('status') ? hash['status'] : SKIP - customer = VaultCustomer.from_hash(hash['customer']) if hash['customer'] - # Parameter is an array, so we need to iterate through it - links = nil - unless hash['links'].nil? - links = [] - hash['links'].each do |structure| - links << (LinkDescription.from_hash(structure) if structure) - end - end - - links = SKIP unless hash.key?('links') - - # Create object from extracted values. - VaultResponse.new(id: id, - status: status, - customer: customer, - links: links) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb b/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb deleted file mode 100644 index 7216070..0000000 --- a/lib/pay_pal_restap_is/models/vault_sepa_debit_response.rb +++ /dev/null @@ -1,76 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # An API resource used in the response of securely storing a SEPA Debit. - class VaultSEPADebitResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The last characters of the IBAN used to pay. - # @return [String] - attr_accessor :iban_last_chars - - # The last characters of the IBAN used to pay. - # @return [Object] - attr_accessor :account_holder_name - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :billing_address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['iban_last_chars'] = 'iban_last_chars' - @_hash['account_holder_name'] = 'account_holder_name' - @_hash['billing_address'] = 'billing_address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - iban_last_chars - account_holder_name - billing_address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(iban_last_chars: SKIP, account_holder_name: SKIP, - billing_address: SKIP) - @iban_last_chars = iban_last_chars unless iban_last_chars == SKIP - @account_holder_name = account_holder_name unless account_holder_name == SKIP - @billing_address = billing_address unless billing_address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - iban_last_chars = - hash.key?('iban_last_chars') ? hash['iban_last_chars'] : SKIP - account_holder_name = - hash.key?('account_holder_name') ? hash['account_holder_name'] : SKIP - billing_address = Address.from_hash(hash['billing_address']) if hash['billing_address'] - - # Create object from extracted values. - VaultSEPADebitResponse.new(iban_last_chars: iban_last_chars, - account_holder_name: account_holder_name, - billing_address: billing_address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_status.rb b/lib/pay_pal_restap_is/models/vault_status.rb deleted file mode 100644 index ca2e567..0000000 --- a/lib/pay_pal_restap_is/models/vault_status.rb +++ /dev/null @@ -1,26 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The vault status. - class VaultStatus - VAULT_STATUS = [ - # TODO: Write general description for VAULTED - VAULTED = 'VAULTED'.freeze, - - # TODO: Write general description for CREATED - CREATED = 'CREATED'.freeze, - - # TODO: Write general description for APPROVED - APPROVED = 'APPROVED'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_token_request.rb b/lib/pay_pal_restap_is/models/vault_token_request.rb deleted file mode 100644 index 2e7a958..0000000 --- a/lib/pay_pal_restap_is/models/vault_token_request.rb +++ /dev/null @@ -1,56 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The Tokenized Payment Source representing a Request to Vault a Token. - class VaultTokenRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the token. - # @return [String] - attr_accessor :id - - # The tokenization method that generated the ID. - # @return [TokenType] - attr_accessor :type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['type'] = 'type' - @_hash - end - - # An array for optional fields - def self.optionals - [] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id:, type:) - @id = id - @type = type - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : nil - type = hash.key?('type') ? hash['type'] : nil - - # Create object from extracted values. - VaultTokenRequest.new(id: id, - type: type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb b/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb deleted file mode 100644 index e2c8eb5..0000000 --- a/lib/pay_pal_restap_is/models/vault_venmo_experience_context.rb +++ /dev/null @@ -1,73 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the Vault creation flow experience for your customers. - class VaultVenmoExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The label that overrides the business name in the PayPal account on the - # PayPal site. The pattern is defined by an external party and supports - # Unicode. - # @return [String] - attr_accessor :brand_name - - # The shipping preference. This only applies to PayPal payment source. - # @return [String] - attr_accessor :shipping_preference - - # Vault Instruction on action to be performed after a successful payer - # approval. - # @return [String] - attr_accessor :vault_instruction - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash['vault_instruction'] = 'vault_instruction' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - shipping_preference - vault_instruction - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, shipping_preference: 'GET_FROM_FILE', - vault_instruction: 'ON_CREATE_PAYMENT_TOKENS') - @brand_name = brand_name unless brand_name == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - @vault_instruction = vault_instruction unless vault_instruction == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - shipping_preference = hash['shipping_preference'] ||= 'GET_FROM_FILE' - vault_instruction = - hash['vault_instruction'] ||= 'ON_CREATE_PAYMENT_TOKENS' - - # Create object from extracted values. - VaultVenmoExperienceContext.new(brand_name: brand_name, - shipping_preference: shipping_preference, - vault_instruction: vault_instruction) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vault_venmo_request.rb b/lib/pay_pal_restap_is/models/vault_venmo_request.rb deleted file mode 100644 index 3e7a392..0000000 --- a/lib/pay_pal_restap_is/models/vault_venmo_request.rb +++ /dev/null @@ -1,115 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # VaultVenmoRequest Model. - class VaultVenmoRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The description displayed to the consumer on the approval flow for a - # digital wallet, as well as on the merchant view of the payment token - # management experience. exp: PayPal.com. - # @return [String] - attr_accessor :description - - # The shipping details. - # @return [VaultedDigitalWalletShippingDetails] - attr_accessor :shipping - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # The usage type associated with a digital wallet payment token. - # @return [String] - attr_accessor :usage_type - - # The customer type associated with a digital wallet payment token. This is - # to indicate whether the customer acting on the merchant / platform is - # either a business or a consumer. - # @return [String] - attr_accessor :customer_type - - # Customizes the Vault creation flow experience for your customers. - # @return [VaultVenmoExperienceContext] - attr_accessor :experience_context - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['description'] = 'description' - @_hash['shipping'] = 'shipping' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['experience_context'] = 'experience_context' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - shipping - permit_multiple_payment_tokens - usage_type - customer_type - experience_context - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(description: SKIP, shipping: SKIP, - permit_multiple_payment_tokens: false, usage_type: SKIP, - customer_type: SKIP, experience_context: SKIP) - @description = description unless description == SKIP - @shipping = shipping unless shipping == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - @usage_type = usage_type unless usage_type == SKIP - @customer_type = customer_type unless customer_type == SKIP - @experience_context = experience_context unless experience_context == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - description = hash.key?('description') ? hash['description'] : SKIP - shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if - hash['shipping'] - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP - customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP - experience_context = VaultVenmoExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - - # Create object from extracted values. - VaultVenmoRequest.new(description: description, - shipping: shipping, - permit_multiple_payment_tokens: permit_multiple_payment_tokens, - usage_type: usage_type, - customer_type: customer_type, - experience_context: experience_context) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb b/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb deleted file mode 100644 index db516d5..0000000 --- a/lib/pay_pal_restap_is/models/vaulted_digital_wallet.rb +++ /dev/null @@ -1,106 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Resource consolidating common request and response attributes for vaulting a - # Digital Wallet. - class VaultedDigitalWallet < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The description displayed to the consumer on the approval flow for a - # digital wallet, as well as on the merchant view of the payment token - # management experience. exp: PayPal.com. - # @return [String] - attr_accessor :description - - # The shipping details. - # @return [VaultedDigitalWalletShippingDetails] - attr_accessor :shipping - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # The usage type associated with a digital wallet payment token. - # @return [String] - attr_accessor :usage_type - - # The customer type associated with a digital wallet payment token. This is - # to indicate whether the customer acting on the merchant / platform is - # either a business or a consumer. - # @return [String] - attr_accessor :customer_type - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['description'] = 'description' - @_hash['shipping'] = 'shipping' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - shipping - permit_multiple_payment_tokens - usage_type - customer_type - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(description: SKIP, shipping: SKIP, - permit_multiple_payment_tokens: false, usage_type: SKIP, - customer_type: SKIP) - @description = description unless description == SKIP - @shipping = shipping unless shipping == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - @usage_type = usage_type unless usage_type == SKIP - @customer_type = customer_type unless customer_type == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - description = hash.key?('description') ? hash['description'] : SKIP - shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if - hash['shipping'] - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP - customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP - - # Create object from extracted values. - VaultedDigitalWallet.new(description: description, - shipping: shipping, - permit_multiple_payment_tokens: permit_multiple_payment_tokens, - usage_type: usage_type, - customer_type: customer_type) - end - end -end diff --git a/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb b/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb deleted file mode 100644 index f80cb7d..0000000 --- a/lib/pay_pal_restap_is/models/vaulted_digital_wallet_shipping_details.rb +++ /dev/null @@ -1,75 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The shipping details. - class VaultedDigitalWalletShippingDetails < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The name of the party. - # @return [ShippingName] - attr_accessor :name - - # A classification for the method of purchase fulfillment (e.g shipping, - # in-store pickup, etc). Either `type` or `options` may be present, but not - # both. - # @return [FullfillmentType] - attr_accessor :type - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['name'] = 'name' - @_hash['type'] = 'type' - @_hash['address'] = 'address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - name - type - address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(name: SKIP, type: SKIP, address: SKIP) - @name = name unless name == SKIP - @type = type unless type == SKIP - @address = address unless address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - name = ShippingName.from_hash(hash['name']) if hash['name'] - type = hash.key?('type') ? hash['type'] : SKIP - address = Address.from_hash(hash['address']) if hash['address'] - - # Create object from extracted values. - VaultedDigitalWalletShippingDetails.new(name: name, - type: type, - address: address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token.rb b/lib/pay_pal_restap_is/models/venmo_payment_token.rb deleted file mode 100644 index 64c0241..0000000 --- a/lib/pay_pal_restap_is/models/venmo_payment_token.rb +++ /dev/null @@ -1,169 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # VenmoPaymentToken Model. - class VenmoPaymentToken < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The description displayed to the consumer on the approval flow for a - # digital wallet, as well as on the merchant view of the payment token - # management experience. exp: PayPal.com. - # @return [String] - attr_accessor :description - - # The shipping details. - # @return [VaultedDigitalWalletShippingDetails] - attr_accessor :shipping - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same PayPal account. This only applies to - # PayPal payment source. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # The usage type associated with a digital wallet payment token. - # @return [String] - attr_accessor :usage_type - - # The customer type associated with a digital wallet payment token. This is - # to indicate whether the customer acting on the merchant / platform is - # either a business or a consumer. - # @return [String] - attr_accessor :customer_type - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The account identifier for a PayPal account. - # @return [String] - attr_accessor :payer_id - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone information. - # @return [PhoneWithType] - attr_accessor :phone - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # The Venmo username, as chosen by the user. - # @return [String] - attr_accessor :user_name - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['description'] = 'description' - @_hash['shipping'] = 'shipping' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['email_address'] = 'email_address' - @_hash['payer_id'] = 'payer_id' - @_hash['name'] = 'name' - @_hash['phone'] = 'phone' - @_hash['address'] = 'address' - @_hash['user_name'] = 'user_name' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - shipping - permit_multiple_payment_tokens - usage_type - customer_type - email_address - payer_id - name - phone - address - user_name - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(description: SKIP, shipping: SKIP, - permit_multiple_payment_tokens: false, usage_type: SKIP, - customer_type: SKIP, email_address: SKIP, payer_id: SKIP, - name: SKIP, phone: SKIP, address: SKIP, user_name: SKIP) - @description = description unless description == SKIP - @shipping = shipping unless shipping == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - @usage_type = usage_type unless usage_type == SKIP - @customer_type = customer_type unless customer_type == SKIP - @email_address = email_address unless email_address == SKIP - @payer_id = payer_id unless payer_id == SKIP - @name = name unless name == SKIP - @phone = phone unless phone == SKIP - @address = address unless address == SKIP - @user_name = user_name unless user_name == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - description = hash.key?('description') ? hash['description'] : SKIP - shipping = VaultedDigitalWalletShippingDetails.from_hash(hash['shipping']) if - hash['shipping'] - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - usage_type = hash.key?('usage_type') ? hash['usage_type'] : SKIP - customer_type = hash.key?('customer_type') ? hash['customer_type'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - payer_id = hash.key?('payer_id') ? hash['payer_id'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone = PhoneWithType.from_hash(hash['phone']) if hash['phone'] - address = Address.from_hash(hash['address']) if hash['address'] - user_name = hash.key?('user_name') ? hash['user_name'] : SKIP - - # Create object from extracted values. - VenmoPaymentToken.new(description: description, - shipping: shipping, - permit_multiple_payment_tokens: permit_multiple_payment_tokens, - usage_type: usage_type, - customer_type: customer_type, - email_address: email_address, - payer_id: payer_id, - name: name, - phone: phone, - address: address, - user_name: user_name) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb deleted file mode 100644 index 25f3626..0000000 --- a/lib/pay_pal_restap_is/models/venmo_payment_token_customer_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The customer type associated with the Venmo payment token. This is to - # indicate whether the customer acting on the merchant / platform is either a - # business or a consumer. - class VenmoPaymentTokenCustomerType - VENMO_PAYMENT_TOKEN_CUSTOMER_TYPE = [ - # TODO: Write general description for CONSUMER - CONSUMER = 'CONSUMER'.freeze, - - # TODO: Write general description for BUSINESS - BUSINESS = 'BUSINESS'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb deleted file mode 100644 index c12432f..0000000 --- a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_pattern.rb +++ /dev/null @@ -1,35 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Expected business/pricing model for the billing agreement. - class VenmoPaymentTokenUsagePattern - VENMO_PAYMENT_TOKEN_USAGE_PATTERN = [ - # TODO: Write general description for IMMEDIATE - IMMEDIATE = 'IMMEDIATE'.freeze, - - # TODO: Write general description for DEFERRED - DEFERRED = 'DEFERRED'.freeze, - - # TODO: Write general description for RECURRING_PREPAID - RECURRING_PREPAID = 'RECURRING_PREPAID'.freeze, - - # TODO: Write general description for RECURRING_POSTPAID - RECURRING_POSTPAID = 'RECURRING_POSTPAID'.freeze, - - # TODO: Write general description for THRESHOLD_PREPAID - THRESHOLD_PREPAID = 'THRESHOLD_PREPAID'.freeze, - - # TODO: Write general description for THRESHOLD_POSTPAID - THRESHOLD_POSTPAID = 'THRESHOLD_POSTPAID'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb b/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb deleted file mode 100644 index b1f273f..0000000 --- a/lib/pay_pal_restap_is/models/venmo_payment_token_usage_type.rb +++ /dev/null @@ -1,23 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The usage type associated with the Venmo payment token. - class VenmoPaymentTokenUsageType - VENMO_PAYMENT_TOKEN_USAGE_TYPE = [ - # TODO: Write general description for MERCHANT - MERCHANT = 'MERCHANT'.freeze, - - # TODO: Write general description for PLATFORM - PLATFORM = 'PLATFORM'.freeze - ].freeze - - def self.validate(value) - return false if value.nil? - - true - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb b/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb deleted file mode 100644 index eacb018..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_additional_attributes.rb +++ /dev/null @@ -1,60 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of this Venmo Wallet. - class VenmoWalletAdditionalAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a customer in PayPal's system of record. - # @return [VenmoWalletCustomerInformation] - attr_accessor :customer - - # Resource consolidating common request and response attirbutes for vaulting - # Venmo Wallet. - # @return [VenmoWalletVaultAttributes] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['customer'] = 'customer' - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - customer - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(customer: SKIP, vault: SKIP) - @customer = customer unless customer == SKIP - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - customer = VenmoWalletCustomerInformation.from_hash(hash['customer']) if hash['customer'] - vault = VenmoWalletVaultAttributes.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - VenmoWalletAdditionalAttributes.new(customer: customer, - vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb b/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb deleted file mode 100644 index 9004dc5..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_attributes_response.rb +++ /dev/null @@ -1,50 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Additional attributes associated with the use of a Venmo Wallet. - class VenmoWalletAttributesResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The details about a saved payment source. - # @return [VaultResponse] - attr_accessor :vault - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault'] = 'vault' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault: SKIP) - @vault = vault unless vault == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault = VaultResponse.from_hash(hash['vault']) if hash['vault'] - - # Create object from extracted values. - VenmoWalletAttributesResponse.new(vault: vault) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb b/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb deleted file mode 100644 index ddf1b87..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_customer_information.rb +++ /dev/null @@ -1,63 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # The details about a customer in PayPal's system of record. - class VenmoWalletCustomerInformation < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The unique ID for a customer generated by PayPal. - # @return [String] - attr_accessor :id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['id'] = 'id' - @_hash['email_address'] = 'email_address' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - id - email_address - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(id: SKIP, email_address: SKIP) - @id = id unless id == SKIP - @email_address = email_address unless email_address == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - id = hash.key?('id') ? hash['id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - - # Create object from extracted values. - VenmoWalletCustomerInformation.new(id: id, - email_address: email_address) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb b/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb deleted file mode 100644 index 64c3652..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_experience_context.rb +++ /dev/null @@ -1,65 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Customizes the buyer experience during the approval process for payment with - # Venmo.
Note: Partners and Marketplaces might - # configure shipping_preference during partner account setup, - # which overrides the request values.
- class VenmoWalletExperienceContext < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The business name of the merchant. The pattern is defined by an external - # party and supports Unicode. - # @return [String] - attr_accessor :brand_name - - # The location from which the shipping address is derived. - # @return [ShippingPreference] - attr_accessor :shipping_preference - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['brand_name'] = 'brand_name' - @_hash['shipping_preference'] = 'shipping_preference' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - brand_name - shipping_preference - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(brand_name: SKIP, - shipping_preference: ShippingPreference::GET_FROM_FILE) - @brand_name = brand_name unless brand_name == SKIP - @shipping_preference = shipping_preference unless shipping_preference == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - brand_name = hash.key?('brand_name') ? hash['brand_name'] : SKIP - shipping_preference = - hash['shipping_preference'] ||= ShippingPreference::GET_FROM_FILE - - # Create object from extracted values. - VenmoWalletExperienceContext.new(brand_name: brand_name, - shipping_preference: shipping_preference) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_request.rb b/lib/pay_pal_restap_is/models/venmo_wallet_request.rb deleted file mode 100644 index 5d90f99..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_request.rb +++ /dev/null @@ -1,89 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Information needed to pay using Venmo. - class VenmoWalletRequest < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The PayPal-generated ID for the vaulted payment source. This ID should be - # stored on the merchant's server so the saved payment source can be used - # for future transactions. - # @return [String] - attr_accessor :vault_id - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # Customizes the buyer experience during the approval process for payment - # with Venmo.
Note: Partners and Marketplaces - # might configure shipping_preference during partner account - # setup, which overrides the request values.
- # @return [VenmoWalletExperienceContext] - attr_accessor :experience_context - - # Additional attributes associated with the use of this Venmo Wallet. - # @return [VenmoWalletAdditionalAttributes] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['vault_id'] = 'vault_id' - @_hash['email_address'] = 'email_address' - @_hash['experience_context'] = 'experience_context' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - vault_id - email_address - experience_context - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(vault_id: SKIP, email_address: SKIP, - experience_context: SKIP, attributes: SKIP) - @vault_id = vault_id unless vault_id == SKIP - @email_address = email_address unless email_address == SKIP - @experience_context = experience_context unless experience_context == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - vault_id = hash.key?('vault_id') ? hash['vault_id'] : SKIP - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - experience_context = VenmoWalletExperienceContext.from_hash(hash['experience_context']) if - hash['experience_context'] - attributes = VenmoWalletAdditionalAttributes.from_hash(hash['attributes']) if - hash['attributes'] - - # Create object from extracted values. - VenmoWalletRequest.new(vault_id: vault_id, - email_address: email_address, - experience_context: experience_context, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_response.rb b/lib/pay_pal_restap_is/models/venmo_wallet_response.rb deleted file mode 100644 index d4f73d3..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_response.rb +++ /dev/null @@ -1,120 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Venmo wallet response. - class VenmoWalletResponse < BaseModel - SKIP = Object.new - private_constant :SKIP - - # The internationalized email address.
Note: Up - # to 64 characters are allowed before and 255 characters are allowed after - # the @ sign. However, the generally accepted maximum length - # for an email address is 254 characters. The pattern verifies that an - # unquoted @ sign exists.
- # @return [String] - attr_accessor :email_address - - # The PayPal payer ID, which is a masked version of the PayPal account - # number intended for use with third parties. The account number is - # reversibly encrypted and a proprietary variant of Base32 is used to encode - # the result. - # @return [String] - attr_accessor :account_id - - # The Venmo user name chosen by the user, also know as a Venmo handle. - # @return [String] - attr_accessor :user_name - - # The name of the party. - # @return [Name] - attr_accessor :name - - # The phone number in its canonical international [E.164 numbering plan - # format](https://www.itu.int/rec/T-REC-E.164/en). - # @return [PhoneNumber] - attr_accessor :phone_number - - # The portable international postal address. Maps to - # [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/ - # wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: - # the autocomplete - # attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-co - # ntrols-the-autocomplete-attribute). - # @return [Address] - attr_accessor :address - - # Additional attributes associated with the use of a Venmo Wallet. - # @return [VenmoWalletAttributesResponse] - attr_accessor :attributes - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['email_address'] = 'email_address' - @_hash['account_id'] = 'account_id' - @_hash['user_name'] = 'user_name' - @_hash['name'] = 'name' - @_hash['phone_number'] = 'phone_number' - @_hash['address'] = 'address' - @_hash['attributes'] = 'attributes' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - email_address - account_id - user_name - name - phone_number - address - attributes - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(email_address: SKIP, account_id: SKIP, user_name: SKIP, - name: SKIP, phone_number: SKIP, address: SKIP, - attributes: SKIP) - @email_address = email_address unless email_address == SKIP - @account_id = account_id unless account_id == SKIP - @user_name = user_name unless user_name == SKIP - @name = name unless name == SKIP - @phone_number = phone_number unless phone_number == SKIP - @address = address unless address == SKIP - @attributes = attributes unless attributes == SKIP - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - email_address = hash.key?('email_address') ? hash['email_address'] : SKIP - account_id = hash.key?('account_id') ? hash['account_id'] : SKIP - user_name = hash.key?('user_name') ? hash['user_name'] : SKIP - name = Name.from_hash(hash['name']) if hash['name'] - phone_number = PhoneNumber.from_hash(hash['phone_number']) if hash['phone_number'] - address = Address.from_hash(hash['address']) if hash['address'] - attributes = VenmoWalletAttributesResponse.from_hash(hash['attributes']) if - hash['attributes'] - - # Create object from extracted values. - VenmoWalletResponse.new(email_address: email_address, - account_id: account_id, - user_name: user_name, - name: name, - phone_number: phone_number, - address: address, - attributes: attributes) - end - end -end diff --git a/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb b/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb deleted file mode 100644 index c292a90..0000000 --- a/lib/pay_pal_restap_is/models/venmo_wallet_vault_attributes.rb +++ /dev/null @@ -1,114 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # Resource consolidating common request and response attirbutes for vaulting - # Venmo Wallet. - class VenmoWalletVaultAttributes < BaseModel - SKIP = Object.new - private_constant :SKIP - - # Defines how and when the payment source gets vaulted. - # @return [StoreInVaultInstruction] - attr_accessor :store_in_vault - - # The description displayed to Venmo consumer on the approval flow for - # Venmo, as well as on the Venmo payment token management experience on - # Venmo.com. - # @return [String] - attr_accessor :description - - # Expected business/pricing model for the billing agreement. - # @return [VenmoPaymentTokenUsagePattern] - attr_accessor :usage_pattern - - # The usage type associated with the Venmo payment token. - # @return [VenmoPaymentTokenUsageType] - attr_accessor :usage_type - - # The customer type associated with the Venmo payment token. This is to - # indicate whether the customer acting on the merchant / platform is either - # a business or a consumer. - # @return [VenmoPaymentTokenCustomerType] - attr_accessor :customer_type - - # Create multiple payment tokens for the same payer, merchant/platform - # combination. Use this when the customer has not logged in at - # merchant/platform. The payment token thus generated, can then also be used - # to create the customer account at merchant/platform. Use this also when - # multiple payment tokens are required for the same payer, different - # customer at merchant/platform. This helps to identify customers distinctly - # even though they may share the same Venmo account. - # @return [TrueClass | FalseClass] - attr_accessor :permit_multiple_payment_tokens - - # A mapping from model property names to API property names. - def self.names - @_hash = {} if @_hash.nil? - @_hash['store_in_vault'] = 'store_in_vault' - @_hash['description'] = 'description' - @_hash['usage_pattern'] = 'usage_pattern' - @_hash['usage_type'] = 'usage_type' - @_hash['customer_type'] = 'customer_type' - @_hash['permit_multiple_payment_tokens'] = - 'permit_multiple_payment_tokens' - @_hash - end - - # An array for optional fields - def self.optionals - %w[ - description - usage_pattern - customer_type - permit_multiple_payment_tokens - ] - end - - # An array for nullable fields - def self.nullables - [] - end - - def initialize(store_in_vault:, usage_type:, description: SKIP, - usage_pattern: SKIP, - customer_type: VenmoPaymentTokenCustomerType::CONSUMER, - permit_multiple_payment_tokens: false) - @store_in_vault = store_in_vault - @description = description unless description == SKIP - @usage_pattern = usage_pattern unless usage_pattern == SKIP - @usage_type = usage_type - @customer_type = customer_type unless customer_type == SKIP - unless permit_multiple_payment_tokens == SKIP - @permit_multiple_payment_tokens = - permit_multiple_payment_tokens - end - end - - # Creates an instance of the object from a hash. - def self.from_hash(hash) - return nil unless hash - - # Extract variables from the hash. - store_in_vault = - hash.key?('store_in_vault') ? hash['store_in_vault'] : nil - usage_type = hash.key?('usage_type') ? hash['usage_type'] : nil - description = hash.key?('description') ? hash['description'] : SKIP - usage_pattern = hash.key?('usage_pattern') ? hash['usage_pattern'] : SKIP - customer_type = - hash['customer_type'] ||= VenmoPaymentTokenCustomerType::CONSUMER - permit_multiple_payment_tokens = - hash['permit_multiple_payment_tokens'] ||= false - - # Create object from extracted values. - VenmoWalletVaultAttributes.new(store_in_vault: store_in_vault, - usage_type: usage_type, - description: description, - usage_pattern: usage_pattern, - customer_type: customer_type, - permit_multiple_payment_tokens: permit_multiple_payment_tokens) - end - end -end diff --git a/lib/pay_pal_restap_is/utilities/date_time_helper.rb b/lib/pay_pal_restap_is/utilities/date_time_helper.rb deleted file mode 100644 index 92da2f1..0000000 --- a/lib/pay_pal_restap_is/utilities/date_time_helper.rb +++ /dev/null @@ -1,11 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -require 'date' -module PayPalRestapIs - # A utility that supports dateTime conversion to different formats - class DateTimeHelper < CoreLibrary::DateTimeHelper - end -end diff --git a/lib/pay_pal_restap_is/utilities/file_wrapper.rb b/lib/pay_pal_restap_is/utilities/file_wrapper.rb deleted file mode 100644 index 71d7150..0000000 --- a/lib/pay_pal_restap_is/utilities/file_wrapper.rb +++ /dev/null @@ -1,16 +0,0 @@ -# pay_pal_restap_is -# -# This file was automatically generated by APIMATIC v2.0 -# ( https://apimatic.io ). - -module PayPalRestapIs - # A utility to allow users to set the content-type for files - class FileWrapper < CoreLibrary::FileWrapper - # The constructor. - # @param [File] file The file to be sent in the request. - # @param [string] content_type The content type of the provided file. - def initialize(file, content_type: 'application/octet-stream') - super - end - end -end diff --git a/pay_pal_restap_is.gemspec b/pay_pal_restap_is.gemspec deleted file mode 100644 index 9153f98..0000000 --- a/pay_pal_restap_is.gemspec +++ /dev/null @@ -1,16 +0,0 @@ -Gem::Specification.new do |s| - s.name = 'pay_pal_restap_is' - s.version = '2.16.0' - s.summary = 'pay_pal_restap_is' - s.description = 'An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders., Call the Payments API to authorize payments, capture authorized payments, refund payments that have already been captured, and show payment information. Use the Payments API in conjunction with the Orders API. For more information, see the PayPal Checkout Overview., The Payment Method Tokens API saves payment methods so payers don\'t have to enter details for future transactions. Payers can check out faster or pay without being present after they agree to save a payment method.

The API associates a payment method with a temporary setup token. Pass the setup token to the API to exchange the setup token for a permanent token.

The permanent token represents a payment method that\'s saved to the vault. This token can be used repeatedly for checkout or recurring transactions such as subscriptions.

The Payment Method Tokens API is available in the US only.' - s.authors = ['APIMatic SDK Generator'] - s.email = ['support@apimatic.io'] - s.homepage = 'https://apimatic.io' - s.licenses = ['MIT'] - s.add_dependency('apimatic_core_interfaces', '~> 0.2.1') - s.add_dependency('apimatic_core', '~> 0.3.9') - s.add_dependency('apimatic_faraday_client_adapter', '~> 0.1.4') - s.required_ruby_version = ['>= 2.6'] - s.files = Dir['{bin,lib,man,test,spec}/**/*', 'README*', 'LICENSE*'] - s.require_paths = ['lib'] -end From 4897a159d9be211a3fe0fb9b26749aebcdcfbfb7 Mon Sep 17 00:00:00 2001 From: moizgillani Date: Tue, 10 Sep 2024 16:37:25 +0500 Subject: [PATCH 3/4] workflow updates --- .codegenignore | 1 + .github/workflows/test-runner.yml | 4 ++++ .gitignore | 1 + Gemfile | 4 ++++ Rakefile | 1 + 5 files changed, 11 insertions(+) diff --git a/.codegenignore b/.codegenignore index 1b22d8f..0963e3d 100644 --- a/.codegenignore +++ b/.codegenignore @@ -3,3 +3,4 @@ test/flows/** .gitignore .github/** Rakefile +Gemfile diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 5334228..e846566 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -38,6 +38,10 @@ jobs: - name: Add UI Testing Framework Dependency run: | gem install capybara -v 3.40 && bundle add capybara + - name: Add Minitest Dependency + run: | + gem install minitest -v 5.24 && bundle add minitest + gem install minitest-proveit -v 1.0 && bundle add minitest-proveit - name: Add DotEnv Dependency run: | gem install dotenv && bundle add dotenv diff --git a/.gitignore b/.gitignore index b844b14..54c97d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ Gemfile.lock +.env \ No newline at end of file diff --git a/Gemfile b/Gemfile index fa75df1..e0d55aa 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,7 @@ source 'https://rubygems.org' +group :test do + gem 'rake' +end + gemspec diff --git a/Rakefile b/Rakefile index a75b707..420fa09 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "bundler/gem_tasks" From 451168319ebaff80e2615337519cb867563d0f34 Mon Sep 17 00:00:00 2001 From: moizgillani Date: Thu, 12 Sep 2024 14:31:53 +0500 Subject: [PATCH 4/4] token type updated to token request type --- test/flows/flow_test_base.rb | 4 ++-- .../tests/test_payment_method_without_purchase_flow.rb | 2 +- test/unit_tests/controller_test_base.rb | 6 +++--- test/unit_tests/test_vault_controller.rb | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/flows/flow_test_base.rb b/test/flows/flow_test_base.rb index 5ee8b09..85c19a9 100644 --- a/test/flows/flow_test_base.rb +++ b/test/flows/flow_test_base.rb @@ -1,11 +1,11 @@ require 'json' require 'minitest/autorun' -require 'pay_pal_restap_is' +require 'paypal_server_sdk' require_relative '../flows/ui_flow_executor' require 'dotenv' class FlowTestBase < Minitest::Test - include PayPalRestapIs + include PaypalServerSdk include CoreLibrary Dotenv.load diff --git a/test/flows/tests/test_payment_method_without_purchase_flow.rb b/test/flows/tests/test_payment_method_without_purchase_flow.rb index 79b0fee..53926dc 100644 --- a/test/flows/tests/test_payment_method_without_purchase_flow.rb +++ b/test/flows/tests/test_payment_method_without_purchase_flow.rb @@ -38,7 +38,7 @@ def test_payment_method_without_purchase_flow payment_source: PaymentTokenRequestPaymentSource.new( token: VaultTokenRequest.new( id: setup_token_api_response.data.id, - type: TokenType::SETUP_TOKEN + type: TokenRequestType::SETUP_TOKEN ) ) ) diff --git a/test/unit_tests/controller_test_base.rb b/test/unit_tests/controller_test_base.rb index 0955d11..5b93138 100644 --- a/test/unit_tests/controller_test_base.rb +++ b/test/unit_tests/controller_test_base.rb @@ -1,4 +1,4 @@ -# pay_pal_restap_is +# paypal_server_sdk # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). @@ -7,11 +7,11 @@ require 'minitest/autorun' require 'minitest/hell' require 'minitest/proveit' -require 'pay_pal_restap_is' +require 'paypal_server_sdk' require 'dotenv' class ControllerTestBase < Minitest::Test - include PayPalRestapIs + include PaypalServerSdk include CoreLibrary Dotenv.load diff --git a/test/unit_tests/test_vault_controller.rb b/test/unit_tests/test_vault_controller.rb index 023a505..f65e69f 100644 --- a/test/unit_tests/test_vault_controller.rb +++ b/test/unit_tests/test_vault_controller.rb @@ -55,7 +55,7 @@ def test_create_payment_token_400_status_code 'pay_pal_request_id' => '', 'body' => PaymentTokenRequest.new( payment_source: PaymentTokenRequestPaymentSource.new( - token: VaultTokenRequest.new(id: 'id0', type: TokenType::BILLING_AGREEMENT) + token: VaultTokenRequest.new(id: 'id0', type: TokenRequestType::BILLING_AGREEMENT) ) ) }