diff --git a/src/adyen/api.go b/src/adyen/api.go index 36483e301..461122d58 100644 --- a/src/adyen/api.go +++ b/src/adyen/api.go @@ -80,21 +80,21 @@ const ( type APIClient struct { client *common.Client // API Services - checkout *checkout.APIClient - payments *payments.APIClient - paymentsApp *paymentsapp.PaymentsAppApi - payout *payout.APIClient - recurring *recurring.GeneralApi - binLookup *binlookup.GeneralApi - balancecontrol *balancecontrol.GeneralApi - posTerminalManagement *posterminalmanagement.GeneralApi - disputes *disputes.GeneralApi - storedValue *storedvalue.GeneralApi - balancePlatform *balanceplatform.APIClient - transfers *transfers.APIClient - management *management.APIClient - legalEntity *legalentity.APIClient - dataProtection *dataprotection.GeneralApi + checkout *checkout.APIClient + payments *payments.APIClient + paymentsApp *paymentsapp.PaymentsAppApi + payout *payout.APIClient + recurring *recurring.GeneralApi + binLookup *binlookup.GeneralApi + balancecontrol *balancecontrol.GeneralApi + posTerminalManagement *posterminalmanagement.GeneralApi + disputes *disputes.GeneralApi + storedValue *storedvalue.GeneralApi + balancePlatform *balanceplatform.APIClient + transfers *transfers.APIClient + management *management.APIClient + legalEntity *legalentity.APIClient + dataProtection *dataprotection.GeneralApi } // NewClient optionally a custom http.Client can be passed via the Config allow for advanced features such as caching. diff --git a/src/binlookup/model_recurring.go b/src/binlookup/model_recurring.go index 479772572..c4b74c0dc 100644 --- a/src/binlookup/model_recurring.go +++ b/src/binlookup/model_recurring.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &Recurring{} // Recurring struct for Recurring type Recurring struct { - // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. Contract *string `json:"contract,omitempty"` // A descriptive name for this detail. RecurringDetailName *string `json:"recurringDetailName,omitempty"` @@ -274,7 +274,7 @@ func (v *NullableRecurring) UnmarshalJSON(src []byte) error { } func (o *Recurring) isValidContract() bool { - var allowedEnumValues = []string{"ONECLICK", "RECURRING", "PAYOUT"} + var allowedEnumValues = []string{"ONECLICK", "ONECLICK,RECURRING", "RECURRING", "PAYOUT", "EXTERNAL"} for _, allowed := range allowedEnumValues { if o.GetContract() == allowed { return true diff --git a/src/checkout/api_donations.go b/src/checkout/api_donations.go index b9122c2b3..4437de428 100644 --- a/src/checkout/api_donations.go +++ b/src/checkout/api_donations.go @@ -103,9 +103,9 @@ func (a *DonationsApi) DonationsInput() DonationsApiDonationsInput { } /* -Donations Start a transaction for donations +Donations Make a donation -Takes in the donation token generated by the `/payments` request and uses it to make the donation for the donation account specified in the request. +Takes in the donation token generated by the `/payments` request and uses it to make the donation. For more information, see [Donations](https://docs.adyen.com/online-payments/donations). diff --git a/src/checkout/api_modifications.go b/src/checkout/api_modifications.go index 9cec221f8..3d5e82bb0 100644 --- a/src/checkout/api_modifications.go +++ b/src/checkout/api_modifications.go @@ -51,7 +51,7 @@ CancelAuthorisedPayment Cancel an authorised payment Cancels the authorisation on a payment that has not yet been [captured](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/captures), and returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**TECHNICAL_CANCEL** webhook](https://docs.adyen.com/online-payments/cancel#cancellation-webhook). -If you want to cancel a payment using the [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference), use the [`/payments/{paymentPspReference}/cancels`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/cancels) endpoint instead. +If you want to cancel a payment using the [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference), use the [`/payments/{paymentPspReference}/cancels`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/cancels) endpoint instead. If you want to cancel a payment but are not sure whether it has been captured, use the [`/payments/{paymentPspReference}/reversals`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/reversals) endpoint instead. @@ -103,7 +103,7 @@ func (r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) PaymentCance /* Prepare a request for CancelAuthorisedPaymentByPspReference -@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to cancel. +@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment that you want to cancel. @return ModificationsApiCancelAuthorisedPaymentByPspReferenceInput */ func (a *ModificationsApi) CancelAuthorisedPaymentByPspReferenceInput(paymentPspReference string) ModificationsApiCancelAuthorisedPaymentByPspReferenceInput { @@ -117,7 +117,7 @@ CancelAuthorisedPaymentByPspReference Cancel an authorised payment Cancels the authorisation on a payment that has not yet been [captured](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/captures), and returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**CANCELLATION** webhook](https://docs.adyen.com/online-payments/cancel#cancellation-webhook). -If you want to cancel a payment but don't have the [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference), use the [`/cancels`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/cancels) endpoint instead. +If you want to cancel a payment but don't have the [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference), use the [`/cancels`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/cancels) endpoint instead. If you want to cancel a payment but are not sure whether it has been captured, use the [`/payments/{paymentPspReference}/reversals`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/reversals) endpoint instead. @@ -170,7 +170,7 @@ func (r ModificationsApiCaptureAuthorisedPaymentInput) PaymentCaptureRequest(pay /* Prepare a request for CaptureAuthorisedPayment -@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to capture. +@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment that you want to capture. @return ModificationsApiCaptureAuthorisedPaymentInput */ func (a *ModificationsApi) CaptureAuthorisedPaymentInput(paymentPspReference string) ModificationsApiCaptureAuthorisedPaymentInput { @@ -237,7 +237,7 @@ func (r ModificationsApiRefundCapturedPaymentInput) PaymentRefundRequest(payment /* Prepare a request for RefundCapturedPayment -@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to refund. +@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment that you want to refund. @return ModificationsApiRefundCapturedPaymentInput */ func (a *ModificationsApi) RefundCapturedPaymentInput(paymentPspReference string) ModificationsApiRefundCapturedPaymentInput { @@ -306,7 +306,7 @@ func (r ModificationsApiRefundOrCancelPaymentInput) PaymentReversalRequest(payme /* Prepare a request for RefundOrCancelPayment -@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to reverse. +@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment that you want to reverse. @return ModificationsApiRefundOrCancelPaymentInput */ func (a *ModificationsApi) RefundOrCancelPaymentInput(paymentPspReference string) ModificationsApiRefundOrCancelPaymentInput { @@ -318,7 +318,7 @@ func (a *ModificationsApi) RefundOrCancelPaymentInput(paymentPspReference string /* RefundOrCancelPayment Refund or cancel a payment -[Refunds](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/refunds) a payment if it has already been captured, and [cancels](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/cancels) a payment if it has not yet been captured. Returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**CANCEL_OR_REFUND** webhook](https://docs.adyen.com/online-payments/reverse#cancel-or-refund-webhook). +[Refunds](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/refunds) a payment if it has already been captured, and [cancels](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/cancels) a payment if it has not yet been captured. Returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**CANCEL_OR_REFUND** webhook](https://docs.adyen.com/online-payments/reversal/#cancel-or-refund-webhook). The reversed amount is always the full payment amount. > Do not use this request for payments that involve multiple partial captures. @@ -372,7 +372,7 @@ func (r ModificationsApiUpdateAuthorisedAmountInput) PaymentAmountUpdateRequest( /* Prepare a request for UpdateAuthorisedAmount -@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment. +@param paymentPspReference The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment. @return ModificationsApiUpdateAuthorisedAmountInput */ func (a *ModificationsApi) UpdateAuthorisedAmountInput(paymentPspReference string) ModificationsApiUpdateAuthorisedAmountInput { @@ -384,7 +384,7 @@ func (a *ModificationsApi) UpdateAuthorisedAmountInput(paymentPspReference strin /* UpdateAuthorisedAmount Update an authorised amount -Increases or decreases the authorised payment amount and returns a unique reference for this request. You get the outcome of the request asynchronously, in an [**AUTHORISATION_ADJUSTMENT** webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes). +Increases or decreases the authorised payment amount and returns a unique reference for this request. You get the outcome of the request asynchronously, in an [**AUTHORISATION_ADJUSTMENT** webhook](https://docs.adyen.com/development-resources/webhooks/webhook-types/#event-codes). You can only update authorised amounts that have not yet been [captured](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments/{paymentPspReference}/captures). diff --git a/src/checkout/api_payments.go b/src/checkout/api_payments.go index 1b07f39fd..c6075d50d 100644 --- a/src/checkout/api_payments.go +++ b/src/checkout/api_payments.go @@ -49,11 +49,29 @@ func (a *PaymentsApi) CardDetailsInput() PaymentsApiCardDetailsInput { /* CardDetails Get the brands and other details of a card -Use this endpoint to get information about the card or network token that enables you to decideon the routing of the transaction and the eligibility of the card for the type of transaction. +Use this endpoint to get information about the card or network token that enables you to decide on the routing of the transaction and the eligibility of the card for the type of transaction. -If you include [your supported brands](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/cardDetails__reqParam_supportedBrands) in the request, the response also tells you if you support each [brand that was identified on the card](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/cardDetails__resParam_details). +If you include [your supported brands](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/cardDetails__reqParam_supportedBrands) in the request, the response also tells you if you support each [brand that was identified on the card](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#responses-200-brands). -If you have an API-only integration and collect card data, use this endpoint to find out if the shopper's card is co-branded. For co-branded cards, you must let the shopper choose the brand to pay with if you support both brands. +If you have an API-only integration and collect card data, use this endpoint to find out if the shopper's card is co-bad. For co-badged cards, you must let the shopper choose the brand to pay with if you support both brands. + +## Server-side API libraries +We provide open-source [server-side API libraries](https://docs.adyen.com/development-resources/libraries/) in several languages: +- PHP +- Java +- Node.js +- .NET +- Go +- Python +- Ruby +- Apex (beta) + +See our [integration examples](https://github.com/adyen-examples#%EF%B8%8F-official-integration-examples) for example uses of the libraries. + +## Developer resources +BIN Lookup API is available through a Postman collection. Click the button below to create a fork, then set the environment variables at **Environments** > **Adyen APIs**. + +[![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/25716737-677c7679-a695-4ebb-91da-68b4e7c9228a?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D25716737-677c7679-a695-4ebb-91da-68b4e7c9228a%26entityType%3Dcollection%26workspaceId%3Da8d63f9f-cfc7-4810-90c5-9e0c60030d3e#?env%5BAdyen%20APIs%5D=W3sia2V5IjoiWC1BUEktS2V5IiwidmFsdWUiOiIiLCJlbmFibGVkIjp0cnVlLCJ0eXBlIjoic2VjcmV0In0seyJrZXkiOiJZT1VSX01FUkNIQU5UX0FDQ09VTlQiLCJ2YWx1ZSI6IiIsImVuYWJsZWQiOnRydWUsInR5cGUiOiJkZWZhdWx0In0seyJrZXkiOiJZT1VSX0NPTVBBTllfQUNDT1VOVCIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQifSx7ImtleSI6IllPVVJfQkFMQU5DRV9QTEFURk9STSIsInZhbHVlIjoiIiwiZW5hYmxlZCI6dHJ1ZSwidHlwZSI6ImRlZmF1bHQifV0=) @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentsApiCardDetailsInput - Request parameters, see CardDetailsInput diff --git a/src/checkout/api_utility.go b/src/checkout/api_utility.go index 16298a274..34f7668ea 100644 --- a/src/checkout/api_utility.go +++ b/src/checkout/api_utility.go @@ -196,3 +196,50 @@ func (a *UtilityApi) UpdatesOrderForPaypalExpressCheckout(ctx context.Context, r return *res, httpRes, err } + +// All parameters accepted by UtilityApi.ValidateShopperId +type UtilityApiValidateShopperIdInput struct { + validateShopperIdRequest *ValidateShopperIdRequest +} + +func (r UtilityApiValidateShopperIdInput) ValidateShopperIdRequest(validateShopperIdRequest ValidateShopperIdRequest) UtilityApiValidateShopperIdInput { + r.validateShopperIdRequest = &validateShopperIdRequest + return r +} + +/* +Prepare a request for ValidateShopperId + +@return UtilityApiValidateShopperIdInput +*/ +func (a *UtilityApi) ValidateShopperIdInput() UtilityApiValidateShopperIdInput { + return UtilityApiValidateShopperIdInput{} +} + +/* +ValidateShopperId Validates shopper Id + +Validates the shopperId. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r UtilityApiValidateShopperIdInput - Request parameters, see ValidateShopperIdInput +@return ValidateShopperIdResponse, *http.Response, error +*/ +func (a *UtilityApi) ValidateShopperId(ctx context.Context, r UtilityApiValidateShopperIdInput) (ValidateShopperIdResponse, *http.Response, error) { + res := &ValidateShopperIdResponse{} + path := "/validateShopperId" + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.validateShopperIdRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} diff --git a/src/checkout/model_additional_data_airline.go b/src/checkout/model_additional_data_airline.go index 5739f0aab..60b0cc963 100644 --- a/src/checkout/model_additional_data_airline.go +++ b/src/checkout/model_additional_data_airline.go @@ -51,7 +51,7 @@ type AdditionalDataAirline struct { AirlineLegDepartTax *string `json:"airline.leg.depart_tax,omitempty"` // The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. AirlineLegDestinationCode *string `json:"airline.leg.destination_code,omitempty"` - // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros. + // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros. AirlineLegFareBaseCode *string `json:"airline.leg.fare_base_code,omitempty"` // The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros. AirlineLegFlightNumber *string `json:"airline.leg.flight_number,omitempty"` diff --git a/src/checkout/model_additional_data_level23.go b/src/checkout/model_additional_data_level23.go index 53a9036be..c915f25f4 100644 --- a/src/checkout/model_additional_data_level23.go +++ b/src/checkout/model_additional_data_level23.go @@ -33,7 +33,7 @@ type AdditionalDataLevel23 struct { EnhancedSchemeDataFreightAmount *string `json:"enhancedSchemeData.freightAmount,omitempty"` // The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrCommodityCode *string `json:"enhancedSchemeData.itemDetailLine[itemNr].commodityCode,omitempty"` - // A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. + // A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrDescription *string `json:"enhancedSchemeData.itemDetailLine[itemNr].description,omitempty"` // The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters EnhancedSchemeDataItemDetailLineItemNrDiscountAmount *string `json:"enhancedSchemeData.itemDetailLine[itemNr].discountAmount,omitempty"` @@ -51,7 +51,7 @@ type AdditionalDataLevel23 struct { EnhancedSchemeDataOrderDate *string `json:"enhancedSchemeData.orderDate,omitempty"` // The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. EnhancedSchemeDataShipFromPostalCode *string `json:"enhancedSchemeData.shipFromPostalCode,omitempty"` - // The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + // The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. EnhancedSchemeDataTotalTaxAmount *string `json:"enhancedSchemeData.totalTaxAmount,omitempty"` } diff --git a/src/checkout/model_additional_data_sub_merchant.go b/src/checkout/model_additional_data_sub_merchant.go index c493d7346..9d0792192 100644 --- a/src/checkout/model_additional_data_sub_merchant.go +++ b/src/checkout/model_additional_data_sub_merchant.go @@ -31,9 +31,9 @@ type AdditionalDataSubMerchant struct { SubMerchantSubSellerSubSellerNrId *string `json:"subMerchant.subSeller[subSellerNr].id,omitempty"` // Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits SubMerchantSubSellerSubSellerNrMcc *string `json:"subMerchant.subSeller[subSellerNr].mcc,omitempty"` - // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters SubMerchantSubSellerSubSellerNrName *string `json:"subMerchant.subSeller[subSellerNr].name,omitempty"` - // Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + // Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters SubMerchantSubSellerSubSellerNrPhoneNumber *string `json:"subMerchant.subSeller[subSellerNr].phoneNumber,omitempty"` // Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits SubMerchantSubSellerSubSellerNrPostalCode *string `json:"subMerchant.subSeller[subSellerNr].postalCode,omitempty"` diff --git a/src/checkout/model_authentication_data.go b/src/checkout/model_authentication_data.go index e3d33059d..33bcf6715 100644 --- a/src/checkout/model_authentication_data.go +++ b/src/checkout/model_authentication_data.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &AuthenticationData{} type AuthenticationData struct { // Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined. AttemptAuthentication *string `json:"attemptAuthentication,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. Default: **false**. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**. AuthenticationOnly *bool `json:"authenticationOnly,omitempty"` ThreeDSRequestData *ThreeDSRequestData `json:"threeDSRequestData,omitempty"` } diff --git a/src/checkout/model_balance_check_request.go b/src/checkout/model_balance_check_request.go index 94b3d5262..cef18482f 100644 --- a/src/checkout/model_balance_check_request.go +++ b/src/checkout/model_balance_check_request.go @@ -67,9 +67,9 @@ type BalanceCheckRequest struct { SelectedRecurringDetailReference *string `json:"selectedRecurringDetailReference,omitempty"` // A session ID used to identify a payment session. SessionId *string `json:"sessionId,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` @@ -86,10 +86,10 @@ type BalanceCheckRequest struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. // Deprecated since Adyen Checkout API v69 // Use `authenticationData.authenticationOnly` instead. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` diff --git a/src/checkout/model_card_details.go b/src/checkout/model_card_details.go index eeacc1e3e..1f1124dcd 100644 --- a/src/checkout/model_card_details.go +++ b/src/checkout/model_card_details.go @@ -35,6 +35,8 @@ type CardDetails struct { EncryptedExpiryMonth *string `json:"encryptedExpiryMonth,omitempty"` // The encrypted card expiry year. EncryptedExpiryYear *string `json:"encryptedExpiryYear,omitempty"` + // This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + EncryptedPassword *string `json:"encryptedPassword,omitempty"` // The encrypted card verification code. EncryptedSecurityCode *string `json:"encryptedSecurityCode,omitempty"` // The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). @@ -47,7 +49,7 @@ type CardDetails struct { FundingSource *string `json:"fundingSource,omitempty"` // The name of the card holder. HolderName *string `json:"holderName,omitempty"` - // The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + // The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. NetworkPaymentReference *string `json:"networkPaymentReference,omitempty"` // The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). Number *string `json:"number,omitempty"` @@ -353,6 +355,38 @@ func (o *CardDetails) SetEncryptedExpiryYear(v string) { o.EncryptedExpiryYear = &v } +// GetEncryptedPassword returns the EncryptedPassword field value if set, zero value otherwise. +func (o *CardDetails) GetEncryptedPassword() string { + if o == nil || common.IsNil(o.EncryptedPassword) { + var ret string + return ret + } + return *o.EncryptedPassword +} + +// GetEncryptedPasswordOk returns a tuple with the EncryptedPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetails) GetEncryptedPasswordOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptedPassword) { + return nil, false + } + return o.EncryptedPassword, true +} + +// HasEncryptedPassword returns a boolean if a field has been set. +func (o *CardDetails) HasEncryptedPassword() bool { + if o != nil && !common.IsNil(o.EncryptedPassword) { + return true + } + + return false +} + +// SetEncryptedPassword gets a reference to the given string and assigns it to the EncryptedPassword field. +func (o *CardDetails) SetEncryptedPassword(v string) { + o.EncryptedPassword = &v +} + // GetEncryptedSecurityCode returns the EncryptedSecurityCode field value if set, zero value otherwise. func (o *CardDetails) GetEncryptedSecurityCode() string { if o == nil || common.IsNil(o.EncryptedSecurityCode) { @@ -937,6 +971,9 @@ func (o CardDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.EncryptedExpiryYear) { toSerialize["encryptedExpiryYear"] = o.EncryptedExpiryYear } + if !common.IsNil(o.EncryptedPassword) { + toSerialize["encryptedPassword"] = o.EncryptedPassword + } if !common.IsNil(o.EncryptedSecurityCode) { toSerialize["encryptedSecurityCode"] = o.EncryptedSecurityCode } diff --git a/src/checkout/model_card_details_request.go b/src/checkout/model_card_details_request.go index 194e9b5a8..bb28abef6 100644 --- a/src/checkout/model_card_details_request.go +++ b/src/checkout/model_card_details_request.go @@ -19,15 +19,15 @@ var _ common.MappedNullable = &CardDetailsRequest{} // CardDetailsRequest struct for CardDetailsRequest type CardDetailsRequest struct { - // A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. - CardNumber string `json:"cardNumber"` + // A minimum of the first six digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. + CardNumber *string `json:"cardNumber,omitempty"` // The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE CountryCode *string `json:"countryCode,omitempty"` // The encrypted card number. EncryptedCardNumber *string `json:"encryptedCardNumber,omitempty"` // The merchant account identifier, with which you want to process the transaction. MerchantAccount string `json:"merchantAccount"` - // The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods__resParam_paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code. + // The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#responses-200-paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code. SupportedBrands []string `json:"supportedBrands,omitempty"` } @@ -35,9 +35,8 @@ type CardDetailsRequest struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCardDetailsRequest(cardNumber string, merchantAccount string) *CardDetailsRequest { +func NewCardDetailsRequest(merchantAccount string) *CardDetailsRequest { this := CardDetailsRequest{} - this.CardNumber = cardNumber this.MerchantAccount = merchantAccount return &this } @@ -50,28 +49,36 @@ func NewCardDetailsRequestWithDefaults() *CardDetailsRequest { return &this } -// GetCardNumber returns the CardNumber field value +// GetCardNumber returns the CardNumber field value if set, zero value otherwise. func (o *CardDetailsRequest) GetCardNumber() string { - if o == nil { + if o == nil || common.IsNil(o.CardNumber) { var ret string return ret } - - return o.CardNumber + return *o.CardNumber } -// GetCardNumberOk returns a tuple with the CardNumber field value +// GetCardNumberOk returns a tuple with the CardNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CardDetailsRequest) GetCardNumberOk() (*string, bool) { - if o == nil { + if o == nil || common.IsNil(o.CardNumber) { return nil, false } - return &o.CardNumber, true + return o.CardNumber, true +} + +// HasCardNumber returns a boolean if a field has been set. +func (o *CardDetailsRequest) HasCardNumber() bool { + if o != nil && !common.IsNil(o.CardNumber) { + return true + } + + return false } -// SetCardNumber sets field value +// SetCardNumber gets a reference to the given string and assigns it to the CardNumber field. func (o *CardDetailsRequest) SetCardNumber(v string) { - o.CardNumber = v + o.CardNumber = &v } // GetCountryCode returns the CountryCode field value if set, zero value otherwise. @@ -204,7 +211,9 @@ func (o CardDetailsRequest) MarshalJSON() ([]byte, error) { func (o CardDetailsRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["cardNumber"] = o.CardNumber + if !common.IsNil(o.CardNumber) { + toSerialize["cardNumber"] = o.CardNumber + } if !common.IsNil(o.CountryCode) { toSerialize["countryCode"] = o.CountryCode } diff --git a/src/checkout/model_card_donations.go b/src/checkout/model_card_donations.go index 63c2f293e..77af655d7 100644 --- a/src/checkout/model_card_donations.go +++ b/src/checkout/model_card_donations.go @@ -35,6 +35,8 @@ type CardDonations struct { EncryptedExpiryMonth *string `json:"encryptedExpiryMonth,omitempty"` // The encrypted card expiry year. EncryptedExpiryYear *string `json:"encryptedExpiryYear,omitempty"` + // This field contains an encrypted, one-time password or an authentication code provided by the cardholder. + EncryptedPassword *string `json:"encryptedPassword,omitempty"` // The encrypted card verification code. EncryptedSecurityCode *string `json:"encryptedSecurityCode,omitempty"` // The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). @@ -47,7 +49,7 @@ type CardDonations struct { FundingSource *string `json:"fundingSource,omitempty"` // The name of the card holder. HolderName *string `json:"holderName,omitempty"` - // The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. + // The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. NetworkPaymentReference *string `json:"networkPaymentReference,omitempty"` // The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). Number *string `json:"number,omitempty"` @@ -353,6 +355,38 @@ func (o *CardDonations) SetEncryptedExpiryYear(v string) { o.EncryptedExpiryYear = &v } +// GetEncryptedPassword returns the EncryptedPassword field value if set, zero value otherwise. +func (o *CardDonations) GetEncryptedPassword() string { + if o == nil || common.IsNil(o.EncryptedPassword) { + var ret string + return ret + } + return *o.EncryptedPassword +} + +// GetEncryptedPasswordOk returns a tuple with the EncryptedPassword field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDonations) GetEncryptedPasswordOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptedPassword) { + return nil, false + } + return o.EncryptedPassword, true +} + +// HasEncryptedPassword returns a boolean if a field has been set. +func (o *CardDonations) HasEncryptedPassword() bool { + if o != nil && !common.IsNil(o.EncryptedPassword) { + return true + } + + return false +} + +// SetEncryptedPassword gets a reference to the given string and assigns it to the EncryptedPassword field. +func (o *CardDonations) SetEncryptedPassword(v string) { + o.EncryptedPassword = &v +} + // GetEncryptedSecurityCode returns the EncryptedSecurityCode field value if set, zero value otherwise. func (o *CardDonations) GetEncryptedSecurityCode() string { if o == nil || common.IsNil(o.EncryptedSecurityCode) { @@ -937,6 +971,9 @@ func (o CardDonations) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.EncryptedExpiryYear) { toSerialize["encryptedExpiryYear"] = o.EncryptedExpiryYear } + if !common.IsNil(o.EncryptedPassword) { + toSerialize["encryptedPassword"] = o.EncryptedPassword + } if !common.IsNil(o.EncryptedSecurityCode) { toSerialize["encryptedSecurityCode"] = o.EncryptedSecurityCode } diff --git a/src/checkout/model_checkout_payment_method.go b/src/checkout/model_checkout_payment_method.go index 26157cc62..befc77131 100644 --- a/src/checkout/model_checkout_payment_method.go +++ b/src/checkout/model_checkout_payment_method.go @@ -62,6 +62,7 @@ type CheckoutPaymentMethod struct { TwintDetails *TwintDetails UpiCollectDetails *UpiCollectDetails UpiIntentDetails *UpiIntentDetails + UpiQrDetails *UpiQrDetails VippsDetails *VippsDetails VisaCheckoutDetails *VisaCheckoutDetails WeChatPayDetails *WeChatPayDetails @@ -398,6 +399,13 @@ func UpiIntentDetailsAsCheckoutPaymentMethod(v *UpiIntentDetails) CheckoutPaymen } } +// UpiQrDetailsAsCheckoutPaymentMethod is a convenience function that returns UpiQrDetails wrapped in CheckoutPaymentMethod +func UpiQrDetailsAsCheckoutPaymentMethod(v *UpiQrDetails) CheckoutPaymentMethod { + return CheckoutPaymentMethod{ + UpiQrDetails: v, + } +} + // VippsDetailsAsCheckoutPaymentMethod is a convenience function that returns VippsDetails wrapped in CheckoutPaymentMethod func VippsDetailsAsCheckoutPaymentMethod(v *VippsDetails) CheckoutPaymentMethod { return CheckoutPaymentMethod{ @@ -1048,6 +1056,19 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.UpiIntentDetails = nil } + // try to unmarshal data into UpiQrDetails + err = json.Unmarshal(data, &dst.UpiQrDetails) + if err == nil { + jsonUpiQrDetails, _ := json.Marshal(dst.UpiQrDetails) + if string(jsonUpiQrDetails) == "{}" || !dst.UpiQrDetails.isValidType() { // empty struct + dst.UpiQrDetails = nil + } else { + match++ + } + } else { + dst.UpiQrDetails = nil + } + // try to unmarshal data into VippsDetails err = json.Unmarshal(data, &dst.VippsDetails) if err == nil { @@ -1162,6 +1183,7 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.TwintDetails = nil dst.UpiCollectDetails = nil dst.UpiIntentDetails = nil + dst.UpiQrDetails = nil dst.VippsDetails = nil dst.VisaCheckoutDetails = nil dst.WeChatPayDetails = nil @@ -1366,6 +1388,10 @@ func (src CheckoutPaymentMethod) MarshalJSON() ([]byte, error) { return json.Marshal(&src.UpiIntentDetails) } + if src.UpiQrDetails != nil { + return json.Marshal(&src.UpiQrDetails) + } + if src.VippsDetails != nil { return json.Marshal(&src.VippsDetails) } @@ -1582,6 +1608,10 @@ func (obj *CheckoutPaymentMethod) GetActualInstance() interface{} { return obj.UpiIntentDetails } + if obj.UpiQrDetails != nil { + return obj.UpiQrDetails + } + if obj.VippsDetails != nil { return obj.VippsDetails } diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index d2a3887e0..9cd37325e 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -56,7 +56,7 @@ type CreateCheckoutSessionRequest struct { FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]CheckoutSessionInstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` Mandate *Mandate `json:"mandate,omitempty"` // The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. @@ -83,18 +83,18 @@ type CreateCheckoutSessionRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.example.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The shopper's email address. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` + ShopperLocale *string `json:"shopperLocale,omitempty"` + ShopperName *ShopperName `json:"shopperName,omitempty"` // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. @@ -117,12 +117,12 @@ type CreateCheckoutSessionRequest struct { StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` // Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. ThemeId *string `json:"themeId,omitempty"` ThreeDS2RequestData *CheckoutSessionThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. // Deprecated since Adyen Checkout API v69 // Use `authenticationData.authenticationOnly` instead. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -1540,9 +1540,9 @@ func (o *CreateCheckoutSessionRequest) SetShopperLocale(v string) { } // GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *CreateCheckoutSessionRequest) GetShopperName() Name { +func (o *CreateCheckoutSessionRequest) GetShopperName() ShopperName { if o == nil || common.IsNil(o.ShopperName) { - var ret Name + var ret ShopperName return ret } return *o.ShopperName @@ -1550,7 +1550,7 @@ func (o *CreateCheckoutSessionRequest) GetShopperName() Name { // GetShopperNameOk returns a tuple with the ShopperName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionRequest) GetShopperNameOk() (*Name, bool) { +func (o *CreateCheckoutSessionRequest) GetShopperNameOk() (*ShopperName, bool) { if o == nil || common.IsNil(o.ShopperName) { return nil, false } @@ -1566,8 +1566,8 @@ func (o *CreateCheckoutSessionRequest) HasShopperName() bool { return false } -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *CreateCheckoutSessionRequest) SetShopperName(v Name) { +// SetShopperName gets a reference to the given ShopperName and assigns it to the ShopperName field. +func (o *CreateCheckoutSessionRequest) SetShopperName(v ShopperName) { o.ShopperName = &v } diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 8d1c8c143..d87d08f3a 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -58,7 +58,7 @@ type CreateCheckoutSessionResponse struct { Id string `json:"id"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]CheckoutSessionInstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` Mandate *Mandate `json:"mandate,omitempty"` // The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. @@ -85,20 +85,20 @@ type CreateCheckoutSessionResponse struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.example.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The payment session data you need to pass to your front end. SessionData *string `json:"sessionData,omitempty"` // The shopper's email address. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` + ShopperLocale *string `json:"shopperLocale,omitempty"` + ShopperName *ShopperName `json:"shopperName,omitempty"` // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. @@ -121,12 +121,12 @@ type CreateCheckoutSessionResponse struct { StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` // Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. ThemeId *string `json:"themeId,omitempty"` ThreeDS2RequestData *CheckoutSessionThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. // Deprecated since Adyen Checkout API v69 // Use `authenticationData.authenticationOnly` instead. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -1596,9 +1596,9 @@ func (o *CreateCheckoutSessionResponse) SetShopperLocale(v string) { } // GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *CreateCheckoutSessionResponse) GetShopperName() Name { +func (o *CreateCheckoutSessionResponse) GetShopperName() ShopperName { if o == nil || common.IsNil(o.ShopperName) { - var ret Name + var ret ShopperName return ret } return *o.ShopperName @@ -1606,7 +1606,7 @@ func (o *CreateCheckoutSessionResponse) GetShopperName() Name { // GetShopperNameOk returns a tuple with the ShopperName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionResponse) GetShopperNameOk() (*Name, bool) { +func (o *CreateCheckoutSessionResponse) GetShopperNameOk() (*ShopperName, bool) { if o == nil || common.IsNil(o.ShopperName) { return nil, false } @@ -1622,8 +1622,8 @@ func (o *CreateCheckoutSessionResponse) HasShopperName() bool { return false } -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *CreateCheckoutSessionResponse) SetShopperName(v Name) { +// SetShopperName gets a reference to the given ShopperName and assigns it to the ShopperName field. +func (o *CreateCheckoutSessionResponse) SetShopperName(v ShopperName) { o.ShopperName = &v } diff --git a/src/checkout/model_default_error_response_entity.go b/src/checkout/model_default_error_response_entity.go new file mode 100644 index 000000000..76011b168 --- /dev/null +++ b/src/checkout/model_default_error_response_entity.go @@ -0,0 +1,384 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the DefaultErrorResponseEntity type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &DefaultErrorResponseEntity{} + +// DefaultErrorResponseEntity Standardized error response following RFC-7807 format +type DefaultErrorResponseEntity struct { + // A human-readable explanation specific to this occurrence of the problem. + Detail *string `json:"detail,omitempty"` + // Unique business error code. + ErrorCode *string `json:"errorCode,omitempty"` + // A URI that identifies the specific occurrence of the problem if applicable. + Instance *string `json:"instance,omitempty"` + // Array of fields with validation errors when applicable. + InvalidFields []InvalidField `json:"invalidFields,omitempty"` + // The unique reference for the request. + RequestId *string `json:"requestId,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` + // A short, human-readable summary of the problem type. + Title *string `json:"title,omitempty"` + // A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + Type *string `json:"type,omitempty"` +} + +// NewDefaultErrorResponseEntity instantiates a new DefaultErrorResponseEntity object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultErrorResponseEntity() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// NewDefaultErrorResponseEntityWithDefaults instantiates a new DefaultErrorResponseEntity object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultErrorResponseEntityWithDefaults() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetDetail() string { + if o == nil || common.IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetDetailOk() (*string, bool) { + if o == nil || common.IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasDetail() bool { + if o != nil && !common.IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *DefaultErrorResponseEntity) SetDetail(v string) { + o.Detail = &v +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetErrorCode() string { + if o == nil || common.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetErrorCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasErrorCode() bool { + if o != nil && !common.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *DefaultErrorResponseEntity) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetInstance returns the Instance field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInstance() string { + if o == nil || common.IsNil(o.Instance) { + var ret string + return ret + } + return *o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInstanceOk() (*string, bool) { + if o == nil || common.IsNil(o.Instance) { + return nil, false + } + return o.Instance, true +} + +// HasInstance returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInstance() bool { + if o != nil && !common.IsNil(o.Instance) { + return true + } + + return false +} + +// SetInstance gets a reference to the given string and assigns it to the Instance field. +func (o *DefaultErrorResponseEntity) SetInstance(v string) { + o.Instance = &v +} + +// GetInvalidFields returns the InvalidFields field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInvalidFields() []InvalidField { + if o == nil || common.IsNil(o.InvalidFields) { + var ret []InvalidField + return ret + } + return o.InvalidFields +} + +// GetInvalidFieldsOk returns a tuple with the InvalidFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInvalidFieldsOk() ([]InvalidField, bool) { + if o == nil || common.IsNil(o.InvalidFields) { + return nil, false + } + return o.InvalidFields, true +} + +// HasInvalidFields returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInvalidFields() bool { + if o != nil && !common.IsNil(o.InvalidFields) { + return true + } + + return false +} + +// SetInvalidFields gets a reference to the given []InvalidField and assigns it to the InvalidFields field. +func (o *DefaultErrorResponseEntity) SetInvalidFields(v []InvalidField) { + o.InvalidFields = v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetRequestId() string { + if o == nil || common.IsNil(o.RequestId) { + var ret string + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetRequestIdOk() (*string, bool) { + if o == nil || common.IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasRequestId() bool { + if o != nil && !common.IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given string and assigns it to the RequestId field. +func (o *DefaultErrorResponseEntity) SetRequestId(v string) { + o.RequestId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetStatus() int32 { + if o == nil || common.IsNil(o.Status) { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetStatusOk() (*int32, bool) { + if o == nil || common.IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasStatus() bool { + if o != nil && !common.IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *DefaultErrorResponseEntity) SetStatus(v int32) { + o.Status = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetTitle() string { + if o == nil || common.IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTitleOk() (*string, bool) { + if o == nil || common.IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasTitle() bool { + if o != nil && !common.IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *DefaultErrorResponseEntity) SetTitle(v string) { + o.Title = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DefaultErrorResponseEntity) SetType(v string) { + o.Type = &v +} + +func (o DefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultErrorResponseEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + if !common.IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } + if !common.IsNil(o.Instance) { + toSerialize["instance"] = o.Instance + } + if !common.IsNil(o.InvalidFields) { + toSerialize["invalidFields"] = o.InvalidFields + } + if !common.IsNil(o.RequestId) { + toSerialize["requestId"] = o.RequestId + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableDefaultErrorResponseEntity struct { + value *DefaultErrorResponseEntity + isSet bool +} + +func (v NullableDefaultErrorResponseEntity) Get() *DefaultErrorResponseEntity { + return v.value +} + +func (v *NullableDefaultErrorResponseEntity) Set(val *DefaultErrorResponseEntity) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultErrorResponseEntity) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultErrorResponseEntity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultErrorResponseEntity(val *DefaultErrorResponseEntity) *NullableDefaultErrorResponseEntity { + return &NullableDefaultErrorResponseEntity{value: val, isSet: true} +} + +func (v NullableDefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultErrorResponseEntity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_details_request_authentication_data.go b/src/checkout/model_details_request_authentication_data.go index 860a9f394..ea7bdcc3d 100644 --- a/src/checkout/model_details_request_authentication_data.go +++ b/src/checkout/model_details_request_authentication_data.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &DetailsRequestAuthenticationData{} // DetailsRequestAuthenticationData struct for DetailsRequestAuthenticationData type DetailsRequestAuthenticationData struct { - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. Default: *false**. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. AuthenticationOnly *bool `json:"authenticationOnly,omitempty"` } diff --git a/src/checkout/model_donation_payment_request.go b/src/checkout/model_donation_payment_request.go index afa02c59d..6e3b3c7fd 100644 --- a/src/checkout/model_donation_payment_request.go +++ b/src/checkout/model_donation_payment_request.go @@ -53,7 +53,7 @@ type DonationPaymentRequest struct { DonationOriginalPspReference *string `json:"donationOriginalPspReference,omitempty"` // Donation token received in the `/payments` call. DonationToken *string `json:"donationToken,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account identifier, with which you want to process the transaction. MerchantAccount string `json:"merchantAccount"` @@ -61,7 +61,7 @@ type DonationPaymentRequest struct { // Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. Metadata *map[string]string `json:"metadata,omitempty"` MpiData *ThreeDSecureData `json:"mpiData,omitempty"` - // Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. + // > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. Origin *string `json:"origin,omitempty"` PaymentMethod DonationPaymentMethod `json:"paymentMethod"` // Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. @@ -72,27 +72,27 @@ type DonationPaymentRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.example.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` // The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 SessionValidity *string `json:"sessionValidity,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` - // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. + // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` + ShopperLocale *string `json:"shopperLocale,omitempty"` + ShopperName *ShopperName `json:"shopperName,omitempty"` // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The shopper's social security number. SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestFields `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. // Deprecated since Adyen Checkout API v69 // Use `authenticationData.authenticationOnly` instead. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -1243,9 +1243,9 @@ func (o *DonationPaymentRequest) SetShopperLocale(v string) { } // GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *DonationPaymentRequest) GetShopperName() Name { +func (o *DonationPaymentRequest) GetShopperName() ShopperName { if o == nil || common.IsNil(o.ShopperName) { - var ret Name + var ret ShopperName return ret } return *o.ShopperName @@ -1253,7 +1253,7 @@ func (o *DonationPaymentRequest) GetShopperName() Name { // GetShopperNameOk returns a tuple with the ShopperName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DonationPaymentRequest) GetShopperNameOk() (*Name, bool) { +func (o *DonationPaymentRequest) GetShopperNameOk() (*ShopperName, bool) { if o == nil || common.IsNil(o.ShopperName) { return nil, false } @@ -1269,8 +1269,8 @@ func (o *DonationPaymentRequest) HasShopperName() bool { return false } -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *DonationPaymentRequest) SetShopperName(v Name) { +// SetShopperName gets a reference to the given ShopperName and assigns it to the ShopperName field. +func (o *DonationPaymentRequest) SetShopperName(v ShopperName) { o.ShopperName = &v } diff --git a/src/checkout/model_invalid_field.go b/src/checkout/model_invalid_field.go new file mode 100644 index 000000000..520e93723 --- /dev/null +++ b/src/checkout/model_invalid_field.go @@ -0,0 +1,172 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the InvalidField type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &InvalidField{} + +// InvalidField struct for InvalidField +type InvalidField struct { + // The field that has an invalid value. + Name string `json:"name"` + // The invalid value. + Value string `json:"value"` + // Description of the validation error. + Message string `json:"message"` +} + +// NewInvalidField instantiates a new InvalidField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvalidField(name string, value string, message string) *InvalidField { + this := InvalidField{} + this.Name = name + this.Value = value + this.Message = message + return &this +} + +// NewInvalidFieldWithDefaults instantiates a new InvalidField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvalidFieldWithDefaults() *InvalidField { + this := InvalidField{} + return &this +} + +// GetName returns the Name field value +func (o *InvalidField) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *InvalidField) SetName(v string) { + o.Name = v +} + +// GetValue returns the Value field value +func (o *InvalidField) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *InvalidField) SetValue(v string) { + o.Value = v +} + +// GetMessage returns the Message field value +func (o *InvalidField) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *InvalidField) SetMessage(v string) { + o.Message = v +} + +func (o InvalidField) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvalidField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["value"] = o.Value + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableInvalidField struct { + value *InvalidField + isSet bool +} + +func (v NullableInvalidField) Get() *InvalidField { + return v.value +} + +func (v *NullableInvalidField) Set(val *InvalidField) { + v.value = val + v.isSet = true +} + +func (v NullableInvalidField) IsSet() bool { + return v.isSet +} + +func (v *NullableInvalidField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvalidField(val *InvalidField) *NullableInvalidField { + return &NullableInvalidField{value: val, isSet: true} +} + +func (v NullableInvalidField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvalidField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_leg.go b/src/checkout/model_leg.go index 516217fde..395f2b514 100644 --- a/src/checkout/model_leg.go +++ b/src/checkout/model_leg.go @@ -32,7 +32,7 @@ type Leg struct { DepartureTax *int64 `json:"departureTax,omitempty"` // The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. DestinationAirportCode *string `json:"destinationAirportCode,omitempty"` - // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not start with a space or be all spaces. * Must not be all zeros. + // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros. FareBasisCode *string `json:"fareBasisCode,omitempty"` // The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with a space or be all spaces. * Must not be all zeros. FlightNumber *string `json:"flightNumber,omitempty"` diff --git a/src/checkout/model_pay_to_payment_method.go b/src/checkout/model_pay_to_payment_method.go new file mode 100644 index 000000000..26679184a --- /dev/null +++ b/src/checkout/model_pay_to_payment_method.go @@ -0,0 +1,125 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the PayToPaymentMethod type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PayToPaymentMethod{} + +// PayToPaymentMethod struct for PayToPaymentMethod +type PayToPaymentMethod struct { + ShopperReference *string `json:"shopperReference,omitempty"` +} + +// NewPayToPaymentMethod instantiates a new PayToPaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPayToPaymentMethod(type_ string) *PayToPaymentMethod { + this := PayToPaymentMethod{} + this.Type = type_ + return &this +} + +// NewPayToPaymentMethodWithDefaults instantiates a new PayToPaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPayToPaymentMethodWithDefaults() *PayToPaymentMethod { + this := PayToPaymentMethod{} + return &this +} + +// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. +func (o *PayToPaymentMethod) GetShopperReference() string { + if o == nil || common.IsNil(o.ShopperReference) { + var ret string + return ret + } + return *o.ShopperReference +} + +// GetShopperReferenceOk returns a tuple with the ShopperReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayToPaymentMethod) GetShopperReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperReference) { + return nil, false + } + return o.ShopperReference, true +} + +// HasShopperReference returns a boolean if a field has been set. +func (o *PayToPaymentMethod) HasShopperReference() bool { + if o != nil && !common.IsNil(o.ShopperReference) { + return true + } + + return false +} + +// SetShopperReference gets a reference to the given string and assigns it to the ShopperReference field. +func (o *PayToPaymentMethod) SetShopperReference(v string) { + o.ShopperReference = &v +} + +func (o PayToPaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PayToPaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ShopperReference) { + toSerialize["shopperReference"] = o.ShopperReference + } + return toSerialize, nil +} + +type NullablePayToPaymentMethod struct { + value *PayToPaymentMethod + isSet bool +} + +func (v NullablePayToPaymentMethod) Get() *PayToPaymentMethod { + return v.value +} + +func (v *NullablePayToPaymentMethod) Set(val *PayToPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullablePayToPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullablePayToPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePayToPaymentMethod(val *PayToPaymentMethod) *NullablePayToPaymentMethod { + return &NullablePayToPaymentMethod{value: val, isSet: true} +} + +func (v NullablePayToPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePayToPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_pay_to_payment_method_all_of.go b/src/checkout/model_pay_to_payment_method_all_of.go new file mode 100644 index 000000000..44fbf8477 --- /dev/null +++ b/src/checkout/model_pay_to_payment_method_all_of.go @@ -0,0 +1,124 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the PayToPaymentMethodAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PayToPaymentMethodAllOf{} + +// PayToPaymentMethodAllOf struct for PayToPaymentMethodAllOf +type PayToPaymentMethodAllOf struct { + ShopperReference *string `json:"shopperReference,omitempty"` +} + +// NewPayToPaymentMethodAllOf instantiates a new PayToPaymentMethodAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPayToPaymentMethodAllOf() *PayToPaymentMethodAllOf { + this := PayToPaymentMethodAllOf{} + return &this +} + +// NewPayToPaymentMethodAllOfWithDefaults instantiates a new PayToPaymentMethodAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPayToPaymentMethodAllOfWithDefaults() *PayToPaymentMethodAllOf { + this := PayToPaymentMethodAllOf{} + return &this +} + +// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. +func (o *PayToPaymentMethodAllOf) GetShopperReference() string { + if o == nil || common.IsNil(o.ShopperReference) { + var ret string + return ret + } + return *o.ShopperReference +} + +// GetShopperReferenceOk returns a tuple with the ShopperReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayToPaymentMethodAllOf) GetShopperReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperReference) { + return nil, false + } + return o.ShopperReference, true +} + +// HasShopperReference returns a boolean if a field has been set. +func (o *PayToPaymentMethodAllOf) HasShopperReference() bool { + if o != nil && !common.IsNil(o.ShopperReference) { + return true + } + + return false +} + +// SetShopperReference gets a reference to the given string and assigns it to the ShopperReference field. +func (o *PayToPaymentMethodAllOf) SetShopperReference(v string) { + o.ShopperReference = &v +} + +func (o PayToPaymentMethodAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PayToPaymentMethodAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ShopperReference) { + toSerialize["shopperReference"] = o.ShopperReference + } + return toSerialize, nil +} + +type NullablePayToPaymentMethodAllOf struct { + value *PayToPaymentMethodAllOf + isSet bool +} + +func (v NullablePayToPaymentMethodAllOf) Get() *PayToPaymentMethodAllOf { + return v.value +} + +func (v *NullablePayToPaymentMethodAllOf) Set(val *PayToPaymentMethodAllOf) { + v.value = val + v.isSet = true +} + +func (v NullablePayToPaymentMethodAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullablePayToPaymentMethodAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePayToPaymentMethodAllOf(val *PayToPaymentMethodAllOf) *NullablePayToPaymentMethodAllOf { + return &NullablePayToPaymentMethodAllOf{value: val, isSet: true} +} + +func (v NullablePayToPaymentMethodAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePayToPaymentMethodAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_payment.go b/src/checkout/model_payment.go new file mode 100644 index 000000000..069d7dcaa --- /dev/null +++ b/src/checkout/model_payment.go @@ -0,0 +1,244 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the Payment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Payment{} + +// Payment struct for Payment +type Payment struct { + Amount *Amount `json:"amount,omitempty"` + PaymentMethod *ResponsePaymentMethod `json:"paymentMethod,omitempty"` + // Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request. + PspReference *string `json:"pspReference,omitempty"` + // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. + ResultCode *string `json:"resultCode,omitempty"` +} + +// NewPayment instantiates a new Payment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPayment() *Payment { + this := Payment{} + return &this +} + +// NewPaymentWithDefaults instantiates a new Payment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentWithDefaults() *Payment { + this := Payment{} + return &this +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *Payment) GetAmount() Amount { + if o == nil || common.IsNil(o.Amount) { + var ret Amount + return ret + } + return *o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Payment) GetAmountOk() (*Amount, bool) { + if o == nil || common.IsNil(o.Amount) { + return nil, false + } + return o.Amount, true +} + +// HasAmount returns a boolean if a field has been set. +func (o *Payment) HasAmount() bool { + if o != nil && !common.IsNil(o.Amount) { + return true + } + + return false +} + +// SetAmount gets a reference to the given Amount and assigns it to the Amount field. +func (o *Payment) SetAmount(v Amount) { + o.Amount = &v +} + +// GetPaymentMethod returns the PaymentMethod field value if set, zero value otherwise. +func (o *Payment) GetPaymentMethod() ResponsePaymentMethod { + if o == nil || common.IsNil(o.PaymentMethod) { + var ret ResponsePaymentMethod + return ret + } + return *o.PaymentMethod +} + +// GetPaymentMethodOk returns a tuple with the PaymentMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Payment) GetPaymentMethodOk() (*ResponsePaymentMethod, bool) { + if o == nil || common.IsNil(o.PaymentMethod) { + return nil, false + } + return o.PaymentMethod, true +} + +// HasPaymentMethod returns a boolean if a field has been set. +func (o *Payment) HasPaymentMethod() bool { + if o != nil && !common.IsNil(o.PaymentMethod) { + return true + } + + return false +} + +// SetPaymentMethod gets a reference to the given ResponsePaymentMethod and assigns it to the PaymentMethod field. +func (o *Payment) SetPaymentMethod(v ResponsePaymentMethod) { + o.PaymentMethod = &v +} + +// GetPspReference returns the PspReference field value if set, zero value otherwise. +func (o *Payment) GetPspReference() string { + if o == nil || common.IsNil(o.PspReference) { + var ret string + return ret + } + return *o.PspReference +} + +// GetPspReferenceOk returns a tuple with the PspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Payment) GetPspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PspReference) { + return nil, false + } + return o.PspReference, true +} + +// HasPspReference returns a boolean if a field has been set. +func (o *Payment) HasPspReference() bool { + if o != nil && !common.IsNil(o.PspReference) { + return true + } + + return false +} + +// SetPspReference gets a reference to the given string and assigns it to the PspReference field. +func (o *Payment) SetPspReference(v string) { + o.PspReference = &v +} + +// GetResultCode returns the ResultCode field value if set, zero value otherwise. +func (o *Payment) GetResultCode() string { + if o == nil || common.IsNil(o.ResultCode) { + var ret string + return ret + } + return *o.ResultCode +} + +// GetResultCodeOk returns a tuple with the ResultCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Payment) GetResultCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.ResultCode) { + return nil, false + } + return o.ResultCode, true +} + +// HasResultCode returns a boolean if a field has been set. +func (o *Payment) HasResultCode() bool { + if o != nil && !common.IsNil(o.ResultCode) { + return true + } + + return false +} + +// SetResultCode gets a reference to the given string and assigns it to the ResultCode field. +func (o *Payment) SetResultCode(v string) { + o.ResultCode = &v +} + +func (o Payment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Payment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + if !common.IsNil(o.PaymentMethod) { + toSerialize["paymentMethod"] = o.PaymentMethod + } + if !common.IsNil(o.PspReference) { + toSerialize["pspReference"] = o.PspReference + } + if !common.IsNil(o.ResultCode) { + toSerialize["resultCode"] = o.ResultCode + } + return toSerialize, nil +} + +type NullablePayment struct { + value *Payment + isSet bool +} + +func (v NullablePayment) Get() *Payment { + return v.value +} + +func (v *NullablePayment) Set(val *Payment) { + v.value = val + v.isSet = true +} + +func (v NullablePayment) IsSet() bool { + return v.isSet +} + +func (v *NullablePayment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePayment(val *Payment) *NullablePayment { + return &NullablePayment{value: val, isSet: true} +} + +func (v NullablePayment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePayment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *Payment) isValidResultCode() bool { + var allowedEnumValues = []string{"Authorised"} + for _, allowed := range allowedEnumValues { + if o.GetResultCode() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_payment_amount_update_request.go b/src/checkout/model_payment_amount_update_request.go index d2b215612..bc5b6abbe 100644 --- a/src/checkout/model_payment_amount_update_request.go +++ b/src/checkout/model_payment_amount_update_request.go @@ -19,8 +19,9 @@ var _ common.MappedNullable = &PaymentAmountUpdateRequest{} // PaymentAmountUpdateRequest struct for PaymentAmountUpdateRequest type PaymentAmountUpdateRequest struct { - Amount Amount `json:"amount"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + Amount Amount `json:"amount"` + ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + EnhancedSchemeData *EnhancedSchemeData `json:"enhancedSchemeData,omitempty"` // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** IndustryUsage *string `json:"industryUsage,omitempty"` // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. @@ -108,6 +109,38 @@ func (o *PaymentAmountUpdateRequest) SetApplicationInfo(v ApplicationInfo) { o.ApplicationInfo = &v } +// GetEnhancedSchemeData returns the EnhancedSchemeData field value if set, zero value otherwise. +func (o *PaymentAmountUpdateRequest) GetEnhancedSchemeData() EnhancedSchemeData { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + var ret EnhancedSchemeData + return ret + } + return *o.EnhancedSchemeData +} + +// GetEnhancedSchemeDataOk returns a tuple with the EnhancedSchemeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentAmountUpdateRequest) GetEnhancedSchemeDataOk() (*EnhancedSchemeData, bool) { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + return nil, false + } + return o.EnhancedSchemeData, true +} + +// HasEnhancedSchemeData returns a boolean if a field has been set. +func (o *PaymentAmountUpdateRequest) HasEnhancedSchemeData() bool { + if o != nil && !common.IsNil(o.EnhancedSchemeData) { + return true + } + + return false +} + +// SetEnhancedSchemeData gets a reference to the given EnhancedSchemeData and assigns it to the EnhancedSchemeData field. +func (o *PaymentAmountUpdateRequest) SetEnhancedSchemeData(v EnhancedSchemeData) { + o.EnhancedSchemeData = &v +} + // GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. func (o *PaymentAmountUpdateRequest) GetIndustryUsage() string { if o == nil || common.IsNil(o.IndustryUsage) { @@ -274,6 +307,9 @@ func (o PaymentAmountUpdateRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } + if !common.IsNil(o.EnhancedSchemeData) { + toSerialize["enhancedSchemeData"] = o.EnhancedSchemeData + } if !common.IsNil(o.IndustryUsage) { toSerialize["industryUsage"] = o.IndustryUsage } diff --git a/src/checkout/model_payment_amount_update_response.go b/src/checkout/model_payment_amount_update_response.go index 9c5d976b2..d8585b6af 100644 --- a/src/checkout/model_payment_amount_update_response.go +++ b/src/checkout/model_payment_amount_update_response.go @@ -26,7 +26,7 @@ type PaymentAmountUpdateResponse struct { LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to update. + // The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to update. PaymentPspReference string `json:"paymentPspReference"` // Adyen's 16-character reference associated with the amount update request. PspReference string `json:"pspReference"` diff --git a/src/checkout/model_payment_cancel_request.go b/src/checkout/model_payment_cancel_request.go index 40b0d8fbb..67fa19cb8 100644 --- a/src/checkout/model_payment_cancel_request.go +++ b/src/checkout/model_payment_cancel_request.go @@ -19,7 +19,8 @@ var _ common.MappedNullable = &PaymentCancelRequest{} // PaymentCancelRequest struct for PaymentCancelRequest type PaymentCancelRequest struct { - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + EnhancedSchemeData *EnhancedSchemeData `json:"enhancedSchemeData,omitempty"` // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` // Your reference for the cancel request. Maximum length: 80 characters. @@ -76,6 +77,38 @@ func (o *PaymentCancelRequest) SetApplicationInfo(v ApplicationInfo) { o.ApplicationInfo = &v } +// GetEnhancedSchemeData returns the EnhancedSchemeData field value if set, zero value otherwise. +func (o *PaymentCancelRequest) GetEnhancedSchemeData() EnhancedSchemeData { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + var ret EnhancedSchemeData + return ret + } + return *o.EnhancedSchemeData +} + +// GetEnhancedSchemeDataOk returns a tuple with the EnhancedSchemeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentCancelRequest) GetEnhancedSchemeDataOk() (*EnhancedSchemeData, bool) { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + return nil, false + } + return o.EnhancedSchemeData, true +} + +// HasEnhancedSchemeData returns a boolean if a field has been set. +func (o *PaymentCancelRequest) HasEnhancedSchemeData() bool { + if o != nil && !common.IsNil(o.EnhancedSchemeData) { + return true + } + + return false +} + +// SetEnhancedSchemeData gets a reference to the given EnhancedSchemeData and assigns it to the EnhancedSchemeData field. +func (o *PaymentCancelRequest) SetEnhancedSchemeData(v EnhancedSchemeData) { + o.EnhancedSchemeData = &v +} + // GetMerchantAccount returns the MerchantAccount field value func (o *PaymentCancelRequest) GetMerchantAccount() string { if o == nil { @@ -145,6 +178,9 @@ func (o PaymentCancelRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } + if !common.IsNil(o.EnhancedSchemeData) { + toSerialize["enhancedSchemeData"] = o.EnhancedSchemeData + } toSerialize["merchantAccount"] = o.MerchantAccount if !common.IsNil(o.Reference) { toSerialize["reference"] = o.Reference diff --git a/src/checkout/model_payment_cancel_response.go b/src/checkout/model_payment_cancel_response.go index 3014d553f..33f197621 100644 --- a/src/checkout/model_payment_cancel_response.go +++ b/src/checkout/model_payment_cancel_response.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &PaymentCancelResponse{} type PaymentCancelResponse struct { // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to cancel. + // The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to cancel. PaymentPspReference string `json:"paymentPspReference"` // Adyen's 16-character reference associated with the cancel request. PspReference string `json:"pspReference"` diff --git a/src/checkout/model_payment_capture_response.go b/src/checkout/model_payment_capture_response.go index 899672d11..287a039eb 100644 --- a/src/checkout/model_payment_capture_response.go +++ b/src/checkout/model_payment_capture_response.go @@ -24,7 +24,7 @@ type PaymentCaptureResponse struct { LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. + // The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to capture. PaymentPspReference string `json:"paymentPspReference"` PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // Adyen's 16-character reference associated with the capture request. diff --git a/src/checkout/model_payment_details.go b/src/checkout/model_payment_details.go index 3d2aa055b..452c0ca05 100644 --- a/src/checkout/model_payment_details.go +++ b/src/checkout/model_payment_details.go @@ -162,7 +162,7 @@ func (v *NullablePaymentDetails) UnmarshalJSON(src []byte) error { } func (o *PaymentDetails) isValidType() bool { - var allowedEnumValues = []string{"alipay", "multibanco", "bankTransfer_IBAN", "paybright", "paynow", "affirm_pos", "trustly", "trustlyvector", "oney", "facilypay", "facilypay_3x", "facilypay_4x", "facilypay_6x", "facilypay_10x", "facilypay_12x", "unionpay", "kcp_banktransfer", "kcp_payco", "kcp_creditcard", "wechatpaySDK", "wechatpayQR", "wechatpayWeb", "molpay_boost", "wallet_IN", "payu_IN_cashcard", "payu_IN_nb", "upi_qr", "paytm", "molpay_ebanking_VN", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "bizum", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} + var allowedEnumValues = []string{"alipay", "multibanco", "bankTransfer", "bankTransfer_IBAN", "paybright", "paynow", "affirm_pos", "iris", "trustly", "trustlyvector", "oney", "facilypay", "facilypay_3x", "facilypay_4x", "facilypay_6x", "facilypay_10x", "facilypay_12x", "unionpay", "kcp_banktransfer", "kcp_payco", "kcp_creditcard", "wechatpaySDK", "wechatpayQR", "wechatpayWeb", "molpay_boost", "wallet_IN", "payu_IN_cashcard", "payu_IN_nb", "paytm", "molpay_ebanking_VN", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "bizum", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "payme", "payme_pos", "konbini", "directEbanking", "boletobancario", "neteller", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_payment_details_response.go b/src/checkout/model_payment_details_response.go index 3c58ced56..479064c30 100644 --- a/src/checkout/model_payment_details_response.go +++ b/src/checkout/model_payment_details_response.go @@ -19,6 +19,7 @@ var _ common.MappedNullable = &PaymentDetailsResponse{} // PaymentDetailsResponse struct for PaymentDetailsResponse type PaymentDetailsResponse struct { + Action *PaymentDetailsResponseAction `json:"action,omitempty"` // Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. AdditionalData *map[string]string `json:"additionalData,omitempty"` Amount *Amount `json:"amount,omitempty"` @@ -62,6 +63,38 @@ func NewPaymentDetailsResponseWithDefaults() *PaymentDetailsResponse { return &this } +// GetAction returns the Action field value if set, zero value otherwise. +func (o *PaymentDetailsResponse) GetAction() PaymentDetailsResponseAction { + if o == nil || common.IsNil(o.Action) { + var ret PaymentDetailsResponseAction + return ret + } + return *o.Action +} + +// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentDetailsResponse) GetActionOk() (*PaymentDetailsResponseAction, bool) { + if o == nil || common.IsNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *PaymentDetailsResponse) HasAction() bool { + if o != nil && !common.IsNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given PaymentDetailsResponseAction and assigns it to the Action field. +func (o *PaymentDetailsResponse) SetAction(v PaymentDetailsResponseAction) { + o.Action = &v +} + // GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. func (o *PaymentDetailsResponse) GetAdditionalData() map[string]string { if o == nil || common.IsNil(o.AdditionalData) { @@ -552,6 +585,9 @@ func (o PaymentDetailsResponse) MarshalJSON() ([]byte, error) { func (o PaymentDetailsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.Action) { + toSerialize["action"] = o.Action + } if !common.IsNil(o.AdditionalData) { toSerialize["additionalData"] = o.AdditionalData } diff --git a/src/checkout/model_payment_details_response_action.go b/src/checkout/model_payment_details_response_action.go new file mode 100644 index 000000000..c08854c01 --- /dev/null +++ b/src/checkout/model_payment_details_response_action.go @@ -0,0 +1,113 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + "fmt" +) + +// PaymentDetailsResponseAction - Action to be taken for completing the payment. When returned, only the 3D Secure action is needed in most cases. +type PaymentDetailsResponseAction struct { + CheckoutThreeDS2Action *CheckoutThreeDS2Action +} + +// CheckoutThreeDS2ActionAsPaymentDetailsResponseAction is a convenience function that returns CheckoutThreeDS2Action wrapped in PaymentDetailsResponseAction +func CheckoutThreeDS2ActionAsPaymentDetailsResponseAction(v *CheckoutThreeDS2Action) PaymentDetailsResponseAction { + return PaymentDetailsResponseAction{ + CheckoutThreeDS2Action: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PaymentDetailsResponseAction) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into CheckoutThreeDS2Action + err = json.Unmarshal(data, &dst.CheckoutThreeDS2Action) + if err == nil { + jsonCheckoutThreeDS2Action, _ := json.Marshal(dst.CheckoutThreeDS2Action) + if string(jsonCheckoutThreeDS2Action) == "{}" || !dst.CheckoutThreeDS2Action.isValidType() { // empty struct + dst.CheckoutThreeDS2Action = nil + } else { + match++ + } + } else { + dst.CheckoutThreeDS2Action = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.CheckoutThreeDS2Action = nil + + return fmt.Errorf("data matches more than one schema in oneOf(PaymentDetailsResponseAction)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(PaymentDetailsResponseAction)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PaymentDetailsResponseAction) MarshalJSON() ([]byte, error) { + if src.CheckoutThreeDS2Action != nil { + return json.Marshal(&src.CheckoutThreeDS2Action) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *PaymentDetailsResponseAction) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.CheckoutThreeDS2Action != nil { + return obj.CheckoutThreeDS2Action + } + + // all schemas are nil + return nil +} + +type NullablePaymentDetailsResponseAction struct { + value *PaymentDetailsResponseAction + isSet bool +} + +func (v NullablePaymentDetailsResponseAction) Get() *PaymentDetailsResponseAction { + return v.value +} + +func (v *NullablePaymentDetailsResponseAction) Set(val *PaymentDetailsResponseAction) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentDetailsResponseAction) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentDetailsResponseAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentDetailsResponseAction(val *PaymentDetailsResponseAction) *NullablePaymentDetailsResponseAction { + return &NullablePaymentDetailsResponseAction{value: val, isSet: true} +} + +func (v NullablePaymentDetailsResponseAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentDetailsResponseAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_payment_link_request.go b/src/checkout/model_payment_link_request.go index 5e89ab877..d61cb80c8 100644 --- a/src/checkout/model_payment_link_request.go +++ b/src/checkout/model_payment_link_request.go @@ -44,7 +44,7 @@ type PaymentLinkRequest struct { FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]InstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` // Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). ManualCapture *bool `json:"manualCapture,omitempty"` @@ -89,7 +89,7 @@ type PaymentLinkRequest struct { Store *string `json:"store,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` // A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. ThemeId *string `json:"themeId,omitempty"` diff --git a/src/checkout/model_payment_link_response.go b/src/checkout/model_payment_link_response.go index af557b741..e2bac5b5a 100644 --- a/src/checkout/model_payment_link_response.go +++ b/src/checkout/model_payment_link_response.go @@ -46,7 +46,7 @@ type PaymentLinkResponse struct { Id string `json:"id"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]InstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` // Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). ManualCapture *bool `json:"manualCapture,omitempty"` @@ -93,7 +93,7 @@ type PaymentLinkResponse struct { Store *string `json:"store,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` // A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. ThemeId *string `json:"themeId,omitempty"` diff --git a/src/checkout/model_payment_method.go b/src/checkout/model_payment_method.go index 4c79d1c6f..64b4a2607 100644 --- a/src/checkout/model_payment_method.go +++ b/src/checkout/model_payment_method.go @@ -37,6 +37,8 @@ type PaymentMethod struct { Issuers []PaymentMethodIssuer `json:"issuers,omitempty"` // The displayable name of this payment method. Name *string `json:"name,omitempty"` + // Indicates whether this payment method should be promoted or not. + Promoted *bool `json:"promoted,omitempty"` // The unique payment method code. Type *string `json:"type,omitempty"` } @@ -349,6 +351,38 @@ func (o *PaymentMethod) SetName(v string) { o.Name = &v } +// GetPromoted returns the Promoted field value if set, zero value otherwise. +func (o *PaymentMethod) GetPromoted() bool { + if o == nil || common.IsNil(o.Promoted) { + var ret bool + return ret + } + return *o.Promoted +} + +// GetPromotedOk returns a tuple with the Promoted field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetPromotedOk() (*bool, bool) { + if o == nil || common.IsNil(o.Promoted) { + return nil, false + } + return o.Promoted, true +} + +// HasPromoted returns a boolean if a field has been set. +func (o *PaymentMethod) HasPromoted() bool { + if o != nil && !common.IsNil(o.Promoted) { + return true + } + + return false +} + +// SetPromoted gets a reference to the given bool and assigns it to the Promoted field. +func (o *PaymentMethod) SetPromoted(v bool) { + o.Promoted = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *PaymentMethod) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -418,6 +452,9 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Name) { toSerialize["name"] = o.Name } + if !common.IsNil(o.Promoted) { + toSerialize["promoted"] = o.Promoted + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/checkout/model_payment_methods_request.go b/src/checkout/model_payment_methods_request.go index 835eb9ade..f162d101d 100644 --- a/src/checkout/model_payment_methods_request.go +++ b/src/checkout/model_payment_methods_request.go @@ -25,7 +25,8 @@ type PaymentMethodsRequest struct { AllowedPaymentMethods []string `json:"allowedPaymentMethods,omitempty"` Amount *Amount `json:"amount,omitempty"` // List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` + BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` + BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` // The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web Channel *string `json:"channel,omitempty"` // The shopper's country code. @@ -35,6 +36,10 @@ type PaymentMethodsRequest struct { Order *EncryptedOrderData `json:"order,omitempty"` // A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. ShopperConversionId *string `json:"shopperConversionId,omitempty"` + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. + ShopperEmail *string `json:"shopperEmail,omitempty"` + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + ShopperIP *string `json:"shopperIP,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. ShopperLocale *string `json:"shopperLocale,omitempty"` // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. @@ -45,6 +50,8 @@ type PaymentMethodsRequest struct { Store *string `json:"store,omitempty"` // Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. StoreFiltrationMode *string `json:"storeFiltrationMode,omitempty"` + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. + TelephoneNumber *string `json:"telephoneNumber,omitempty"` } // NewPaymentMethodsRequest instantiates a new PaymentMethodsRequest object @@ -197,6 +204,38 @@ func (o *PaymentMethodsRequest) SetBlockedPaymentMethods(v []string) { o.BlockedPaymentMethods = v } +// GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. +func (o *PaymentMethodsRequest) GetBrowserInfo() BrowserInfo { + if o == nil || common.IsNil(o.BrowserInfo) { + var ret BrowserInfo + return ret + } + return *o.BrowserInfo +} + +// GetBrowserInfoOk returns a tuple with the BrowserInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodsRequest) GetBrowserInfoOk() (*BrowserInfo, bool) { + if o == nil || common.IsNil(o.BrowserInfo) { + return nil, false + } + return o.BrowserInfo, true +} + +// HasBrowserInfo returns a boolean if a field has been set. +func (o *PaymentMethodsRequest) HasBrowserInfo() bool { + if o != nil && !common.IsNil(o.BrowserInfo) { + return true + } + + return false +} + +// SetBrowserInfo gets a reference to the given BrowserInfo and assigns it to the BrowserInfo field. +func (o *PaymentMethodsRequest) SetBrowserInfo(v BrowserInfo) { + o.BrowserInfo = &v +} + // GetChannel returns the Channel field value if set, zero value otherwise. func (o *PaymentMethodsRequest) GetChannel() string { if o == nil || common.IsNil(o.Channel) { @@ -349,6 +388,70 @@ func (o *PaymentMethodsRequest) SetShopperConversionId(v string) { o.ShopperConversionId = &v } +// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. +func (o *PaymentMethodsRequest) GetShopperEmail() string { + if o == nil || common.IsNil(o.ShopperEmail) { + var ret string + return ret + } + return *o.ShopperEmail +} + +// GetShopperEmailOk returns a tuple with the ShopperEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodsRequest) GetShopperEmailOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperEmail) { + return nil, false + } + return o.ShopperEmail, true +} + +// HasShopperEmail returns a boolean if a field has been set. +func (o *PaymentMethodsRequest) HasShopperEmail() bool { + if o != nil && !common.IsNil(o.ShopperEmail) { + return true + } + + return false +} + +// SetShopperEmail gets a reference to the given string and assigns it to the ShopperEmail field. +func (o *PaymentMethodsRequest) SetShopperEmail(v string) { + o.ShopperEmail = &v +} + +// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. +func (o *PaymentMethodsRequest) GetShopperIP() string { + if o == nil || common.IsNil(o.ShopperIP) { + var ret string + return ret + } + return *o.ShopperIP +} + +// GetShopperIPOk returns a tuple with the ShopperIP field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodsRequest) GetShopperIPOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperIP) { + return nil, false + } + return o.ShopperIP, true +} + +// HasShopperIP returns a boolean if a field has been set. +func (o *PaymentMethodsRequest) HasShopperIP() bool { + if o != nil && !common.IsNil(o.ShopperIP) { + return true + } + + return false +} + +// SetShopperIP gets a reference to the given string and assigns it to the ShopperIP field. +func (o *PaymentMethodsRequest) SetShopperIP(v string) { + o.ShopperIP = &v +} + // GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. func (o *PaymentMethodsRequest) GetShopperLocale() string { if o == nil || common.IsNil(o.ShopperLocale) { @@ -509,6 +612,38 @@ func (o *PaymentMethodsRequest) SetStoreFiltrationMode(v string) { o.StoreFiltrationMode = &v } +// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. +func (o *PaymentMethodsRequest) GetTelephoneNumber() string { + if o == nil || common.IsNil(o.TelephoneNumber) { + var ret string + return ret + } + return *o.TelephoneNumber +} + +// GetTelephoneNumberOk returns a tuple with the TelephoneNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodsRequest) GetTelephoneNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.TelephoneNumber) { + return nil, false + } + return o.TelephoneNumber, true +} + +// HasTelephoneNumber returns a boolean if a field has been set. +func (o *PaymentMethodsRequest) HasTelephoneNumber() bool { + if o != nil && !common.IsNil(o.TelephoneNumber) { + return true + } + + return false +} + +// SetTelephoneNumber gets a reference to the given string and assigns it to the TelephoneNumber field. +func (o *PaymentMethodsRequest) SetTelephoneNumber(v string) { + o.TelephoneNumber = &v +} + func (o PaymentMethodsRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -531,6 +666,9 @@ func (o PaymentMethodsRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BlockedPaymentMethods) { toSerialize["blockedPaymentMethods"] = o.BlockedPaymentMethods } + if !common.IsNil(o.BrowserInfo) { + toSerialize["browserInfo"] = o.BrowserInfo + } if !common.IsNil(o.Channel) { toSerialize["channel"] = o.Channel } @@ -544,6 +682,12 @@ func (o PaymentMethodsRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ShopperConversionId) { toSerialize["shopperConversionId"] = o.ShopperConversionId } + if !common.IsNil(o.ShopperEmail) { + toSerialize["shopperEmail"] = o.ShopperEmail + } + if !common.IsNil(o.ShopperIP) { + toSerialize["shopperIP"] = o.ShopperIP + } if !common.IsNil(o.ShopperLocale) { toSerialize["shopperLocale"] = o.ShopperLocale } @@ -559,6 +703,9 @@ func (o PaymentMethodsRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.StoreFiltrationMode) { toSerialize["storeFiltrationMode"] = o.StoreFiltrationMode } + if !common.IsNil(o.TelephoneNumber) { + toSerialize["telephoneNumber"] = o.TelephoneNumber + } return toSerialize, nil } diff --git a/src/checkout/model_payment_refund_request.go b/src/checkout/model_payment_refund_request.go index 862dc148d..62e6a3792 100644 --- a/src/checkout/model_payment_refund_request.go +++ b/src/checkout/model_payment_refund_request.go @@ -21,6 +21,9 @@ var _ common.MappedNullable = &PaymentRefundRequest{} type PaymentRefundRequest struct { Amount Amount `json:"amount"` ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + // This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the specific capture to refund. + CapturePspReference *string `json:"capturePspReference,omitempty"` + EnhancedSchemeData *EnhancedSchemeData `json:"enhancedSchemeData,omitempty"` // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account that is used to process the payment. @@ -110,6 +113,70 @@ func (o *PaymentRefundRequest) SetApplicationInfo(v ApplicationInfo) { o.ApplicationInfo = &v } +// GetCapturePspReference returns the CapturePspReference field value if set, zero value otherwise. +func (o *PaymentRefundRequest) GetCapturePspReference() string { + if o == nil || common.IsNil(o.CapturePspReference) { + var ret string + return ret + } + return *o.CapturePspReference +} + +// GetCapturePspReferenceOk returns a tuple with the CapturePspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRefundRequest) GetCapturePspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.CapturePspReference) { + return nil, false + } + return o.CapturePspReference, true +} + +// HasCapturePspReference returns a boolean if a field has been set. +func (o *PaymentRefundRequest) HasCapturePspReference() bool { + if o != nil && !common.IsNil(o.CapturePspReference) { + return true + } + + return false +} + +// SetCapturePspReference gets a reference to the given string and assigns it to the CapturePspReference field. +func (o *PaymentRefundRequest) SetCapturePspReference(v string) { + o.CapturePspReference = &v +} + +// GetEnhancedSchemeData returns the EnhancedSchemeData field value if set, zero value otherwise. +func (o *PaymentRefundRequest) GetEnhancedSchemeData() EnhancedSchemeData { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + var ret EnhancedSchemeData + return ret + } + return *o.EnhancedSchemeData +} + +// GetEnhancedSchemeDataOk returns a tuple with the EnhancedSchemeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRefundRequest) GetEnhancedSchemeDataOk() (*EnhancedSchemeData, bool) { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + return nil, false + } + return o.EnhancedSchemeData, true +} + +// HasEnhancedSchemeData returns a boolean if a field has been set. +func (o *PaymentRefundRequest) HasEnhancedSchemeData() bool { + if o != nil && !common.IsNil(o.EnhancedSchemeData) { + return true + } + + return false +} + +// SetEnhancedSchemeData gets a reference to the given EnhancedSchemeData and assigns it to the EnhancedSchemeData field. +func (o *PaymentRefundRequest) SetEnhancedSchemeData(v EnhancedSchemeData) { + o.EnhancedSchemeData = &v +} + // GetLineItems returns the LineItems field value if set, zero value otherwise. func (o *PaymentRefundRequest) GetLineItems() []LineItem { if o == nil || common.IsNil(o.LineItems) { @@ -319,6 +386,12 @@ func (o PaymentRefundRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } + if !common.IsNil(o.CapturePspReference) { + toSerialize["capturePspReference"] = o.CapturePspReference + } + if !common.IsNil(o.EnhancedSchemeData) { + toSerialize["enhancedSchemeData"] = o.EnhancedSchemeData + } if !common.IsNil(o.LineItems) { toSerialize["lineItems"] = o.LineItems } diff --git a/src/checkout/model_payment_refund_response.go b/src/checkout/model_payment_refund_response.go index 65a14772b..b957346b8 100644 --- a/src/checkout/model_payment_refund_response.go +++ b/src/checkout/model_payment_refund_response.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &PaymentRefundResponse{} // PaymentRefundResponse struct for PaymentRefundResponse type PaymentRefundResponse struct { Amount Amount `json:"amount"` - // This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. + // This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the specific capture to refund. CapturePspReference *string `json:"capturePspReference,omitempty"` // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` @@ -28,7 +28,7 @@ type PaymentRefundResponse struct { MerchantAccount string `json:"merchantAccount"` // Your reason for the refund request. MerchantRefundReason common.NullableString `json:"merchantRefundReason,omitempty"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. + // The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to refund. PaymentPspReference string `json:"paymentPspReference"` // Adyen's 16-character reference associated with the refund request. PspReference string `json:"pspReference"` diff --git a/src/checkout/model_payment_request.go b/src/checkout/model_payment_request.go index d67382037..b74ddd28f 100644 --- a/src/checkout/model_payment_request.go +++ b/src/checkout/model_payment_request.go @@ -71,7 +71,7 @@ type PaymentRequest struct { // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** IndustryUsage *string `json:"industryUsage,omitempty"` Installments *Installments `json:"installments,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Riverty. LineItems []LineItem `json:"lineItems,omitempty"` // The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. LocalizedShopperStatement *map[string]string `json:"localizedShopperStatement,omitempty"` @@ -89,7 +89,7 @@ type PaymentRequest struct { Order *EncryptedOrderData `json:"order,omitempty"` // When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. OrderReference *string `json:"orderReference,omitempty"` - // Required for the 3D Secure 2 `channel` **Web** integration. Set this parameter to the origin URL of the page that you are loading the 3D Secure Component from. + // > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. Origin *string `json:"origin,omitempty"` PaymentMethod CheckoutPaymentMethod `json:"paymentMethod"` PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` @@ -105,22 +105,24 @@ type PaymentRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.example.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.example.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` + // Base64-encoded JSON object containing SDK related parameters required by the SDK to function optimally. Clients must not add unrelated or sensitive personal information. + SdkData *string `json:"sdkData,omitempty"` // The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 SessionValidity *string `json:"sessionValidity,omitempty"` // A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. ShopperConversionId *string `json:"shopperConversionId,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` + ShopperLocale *string `json:"shopperLocale,omitempty"` + ShopperName *ShopperName `json:"shopperName,omitempty"` // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. @@ -136,10 +138,10 @@ type PaymentRequest struct { // This field contains additional information on the submerchant, who is onboarded to an acquirer through a payment facilitator or aggregator SubMerchants []SubMerchantInfo `json:"subMerchants,omitempty"` Surcharge *Surcharge `json:"surcharge,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestFields `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorisation.Default: **false**. // Deprecated since Adyen Checkout API v69 // Use `authenticationData.authenticationOnly` instead. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -1841,6 +1843,38 @@ func (o *PaymentRequest) SetRiskData(v RiskData) { o.RiskData = &v } +// GetSdkData returns the SdkData field value if set, zero value otherwise. +func (o *PaymentRequest) GetSdkData() string { + if o == nil || common.IsNil(o.SdkData) { + var ret string + return ret + } + return *o.SdkData +} + +// GetSdkDataOk returns a tuple with the SdkData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRequest) GetSdkDataOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkData) { + return nil, false + } + return o.SdkData, true +} + +// HasSdkData returns a boolean if a field has been set. +func (o *PaymentRequest) HasSdkData() bool { + if o != nil && !common.IsNil(o.SdkData) { + return true + } + + return false +} + +// SetSdkData gets a reference to the given string and assigns it to the SdkData field. +func (o *PaymentRequest) SetSdkData(v string) { + o.SdkData = &v +} + // GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. func (o *PaymentRequest) GetSessionValidity() string { if o == nil || common.IsNil(o.SessionValidity) { @@ -2034,9 +2068,9 @@ func (o *PaymentRequest) SetShopperLocale(v string) { } // GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *PaymentRequest) GetShopperName() Name { +func (o *PaymentRequest) GetShopperName() ShopperName { if o == nil || common.IsNil(o.ShopperName) { - var ret Name + var ret ShopperName return ret } return *o.ShopperName @@ -2044,7 +2078,7 @@ func (o *PaymentRequest) GetShopperName() Name { // GetShopperNameOk returns a tuple with the ShopperName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentRequest) GetShopperNameOk() (*Name, bool) { +func (o *PaymentRequest) GetShopperNameOk() (*ShopperName, bool) { if o == nil || common.IsNil(o.ShopperName) { return nil, false } @@ -2060,8 +2094,8 @@ func (o *PaymentRequest) HasShopperName() bool { return false } -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *PaymentRequest) SetShopperName(v Name) { +// SetShopperName gets a reference to the given ShopperName and assigns it to the ShopperName field. +func (o *PaymentRequest) SetShopperName(v ShopperName) { o.ShopperName = &v } @@ -2614,6 +2648,9 @@ func (o PaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.RiskData) { toSerialize["riskData"] = o.RiskData } + if !common.IsNil(o.SdkData) { + toSerialize["sdkData"] = o.SdkData + } if !common.IsNil(o.SessionValidity) { toSerialize["sessionValidity"] = o.SessionValidity } diff --git a/src/checkout/model_payment_reversal_request.go b/src/checkout/model_payment_reversal_request.go index 43f7c1704..33d2d682e 100644 --- a/src/checkout/model_payment_reversal_request.go +++ b/src/checkout/model_payment_reversal_request.go @@ -19,7 +19,8 @@ var _ common.MappedNullable = &PaymentReversalRequest{} // PaymentReversalRequest struct for PaymentReversalRequest type PaymentReversalRequest struct { - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + EnhancedSchemeData *EnhancedSchemeData `json:"enhancedSchemeData,omitempty"` // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` // Your reference for the reversal request. Maximum length: 80 characters. @@ -76,6 +77,38 @@ func (o *PaymentReversalRequest) SetApplicationInfo(v ApplicationInfo) { o.ApplicationInfo = &v } +// GetEnhancedSchemeData returns the EnhancedSchemeData field value if set, zero value otherwise. +func (o *PaymentReversalRequest) GetEnhancedSchemeData() EnhancedSchemeData { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + var ret EnhancedSchemeData + return ret + } + return *o.EnhancedSchemeData +} + +// GetEnhancedSchemeDataOk returns a tuple with the EnhancedSchemeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentReversalRequest) GetEnhancedSchemeDataOk() (*EnhancedSchemeData, bool) { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + return nil, false + } + return o.EnhancedSchemeData, true +} + +// HasEnhancedSchemeData returns a boolean if a field has been set. +func (o *PaymentReversalRequest) HasEnhancedSchemeData() bool { + if o != nil && !common.IsNil(o.EnhancedSchemeData) { + return true + } + + return false +} + +// SetEnhancedSchemeData gets a reference to the given EnhancedSchemeData and assigns it to the EnhancedSchemeData field. +func (o *PaymentReversalRequest) SetEnhancedSchemeData(v EnhancedSchemeData) { + o.EnhancedSchemeData = &v +} + // GetMerchantAccount returns the MerchantAccount field value func (o *PaymentReversalRequest) GetMerchantAccount() string { if o == nil { @@ -145,6 +178,9 @@ func (o PaymentReversalRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } + if !common.IsNil(o.EnhancedSchemeData) { + toSerialize["enhancedSchemeData"] = o.EnhancedSchemeData + } toSerialize["merchantAccount"] = o.MerchantAccount if !common.IsNil(o.Reference) { toSerialize["reference"] = o.Reference diff --git a/src/checkout/model_payment_reversal_response.go b/src/checkout/model_payment_reversal_response.go index a350e27ea..b4088bbd3 100644 --- a/src/checkout/model_payment_reversal_response.go +++ b/src/checkout/model_payment_reversal_response.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &PaymentReversalResponse{} type PaymentReversalResponse struct { // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to reverse. + // The [`pspReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-pspReference) of the payment to reverse. PaymentPspReference string `json:"paymentPspReference"` // Adyen's 16-character reference associated with the reversal request. PspReference string `json:"pspReference"` diff --git a/src/checkout/model_phone.go b/src/checkout/model_phone.go index f1b3402d4..5aea1d61b 100644 --- a/src/checkout/model_phone.go +++ b/src/checkout/model_phone.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &Phone{} // Phone struct for Phone type Phone struct { - // Country code. Length: 1–3 characters. + // Country code. Length: 1–3 digits. Cc *string `json:"cc,omitempty"` - // Subscriber number. Maximum length: 15 characters. + // Subscriber number. Length: 4-15 digits. Subscriber *string `json:"subscriber,omitempty"` } diff --git a/src/checkout/model_pix_recurring.go b/src/checkout/model_pix_recurring.go index e798da714..82b093a3e 100644 --- a/src/checkout/model_pix_recurring.go +++ b/src/checkout/model_pix_recurring.go @@ -21,6 +21,8 @@ var _ common.MappedNullable = &PixRecurring{} type PixRecurring struct { // The date on which the shopper's payment method will be charged, in YYYY-MM-DD format. BillingDate *string `json:"billingDate,omitempty"` + // Flag used to define whether liquidation can happen only on business days + BusinessDayOnly *bool `json:"businessDayOnly,omitempty"` // End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. EndsAt *string `json:"endsAt,omitempty"` // The frequency at which the shopper will be charged. @@ -86,6 +88,38 @@ func (o *PixRecurring) SetBillingDate(v string) { o.BillingDate = &v } +// GetBusinessDayOnly returns the BusinessDayOnly field value if set, zero value otherwise. +func (o *PixRecurring) GetBusinessDayOnly() bool { + if o == nil || common.IsNil(o.BusinessDayOnly) { + var ret bool + return ret + } + return *o.BusinessDayOnly +} + +// GetBusinessDayOnlyOk returns a tuple with the BusinessDayOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PixRecurring) GetBusinessDayOnlyOk() (*bool, bool) { + if o == nil || common.IsNil(o.BusinessDayOnly) { + return nil, false + } + return o.BusinessDayOnly, true +} + +// HasBusinessDayOnly returns a boolean if a field has been set. +func (o *PixRecurring) HasBusinessDayOnly() bool { + if o != nil && !common.IsNil(o.BusinessDayOnly) { + return true + } + + return false +} + +// SetBusinessDayOnly gets a reference to the given bool and assigns it to the BusinessDayOnly field. +func (o *PixRecurring) SetBusinessDayOnly(v bool) { + o.BusinessDayOnly = &v +} + // GetEndsAt returns the EndsAt field value if set, zero value otherwise. func (o *PixRecurring) GetEndsAt() string { if o == nil || common.IsNil(o.EndsAt) { @@ -355,6 +389,9 @@ func (o PixRecurring) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BillingDate) { toSerialize["billingDate"] = o.BillingDate } + if !common.IsNil(o.BusinessDayOnly) { + toSerialize["businessDayOnly"] = o.BusinessDayOnly + } if !common.IsNil(o.EndsAt) { toSerialize["endsAt"] = o.EndsAt } diff --git a/src/checkout/model_recurring.go b/src/checkout/model_recurring.go index cc748697f..abbe8fa11 100644 --- a/src/checkout/model_recurring.go +++ b/src/checkout/model_recurring.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &Recurring{} // Recurring struct for Recurring type Recurring struct { - // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. Contract *string `json:"contract,omitempty"` // A descriptive name for this detail. RecurringDetailName *string `json:"recurringDetailName,omitempty"` @@ -274,7 +274,7 @@ func (v *NullableRecurring) UnmarshalJSON(src []byte) error { } func (o *Recurring) isValidContract() bool { - var allowedEnumValues = []string{"ONECLICK", "RECURRING", "PAYOUT"} + var allowedEnumValues = []string{"ONECLICK", "ONECLICK,RECURRING", "RECURRING", "PAYOUT", "EXTERNAL"} for _, allowed := range allowedEnumValues { if o.GetContract() == allowed { return true diff --git a/src/checkout/model_response_additional_data_common.go b/src/checkout/model_response_additional_data_common.go index 4b09d4b94..b5a2ddcac 100644 --- a/src/checkout/model_response_additional_data_common.go +++ b/src/checkout/model_response_additional_data_common.go @@ -65,7 +65,7 @@ type ResponseAdditionalDataCommon struct { FraudManualReview *string `json:"fraudManualReview,omitempty"` // The fraud result properties of the payment. FraudResultType *string `json:"fraudResultType,omitempty"` - // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> + // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh FraudRiskLevel *string `json:"fraudRiskLevel,omitempty"` // Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. FundingSource *string `json:"fundingSource,omitempty"` diff --git a/src/checkout/model_response_additional_data_swish.go b/src/checkout/model_response_additional_data_swish.go new file mode 100644 index 000000000..5196b9f0f --- /dev/null +++ b/src/checkout/model_response_additional_data_swish.go @@ -0,0 +1,125 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ResponseAdditionalDataSwish type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResponseAdditionalDataSwish{} + +// ResponseAdditionalDataSwish struct for ResponseAdditionalDataSwish +type ResponseAdditionalDataSwish struct { + // A Swish shopper's telephone number. + SwishPayerAlias *string `json:"swish.payerAlias,omitempty"` +} + +// NewResponseAdditionalDataSwish instantiates a new ResponseAdditionalDataSwish object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAdditionalDataSwish() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// NewResponseAdditionalDataSwishWithDefaults instantiates a new ResponseAdditionalDataSwish object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAdditionalDataSwishWithDefaults() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// GetSwishPayerAlias returns the SwishPayerAlias field value if set, zero value otherwise. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAlias() string { + if o == nil || common.IsNil(o.SwishPayerAlias) { + var ret string + return ret + } + return *o.SwishPayerAlias +} + +// GetSwishPayerAliasOk returns a tuple with the SwishPayerAlias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAliasOk() (*string, bool) { + if o == nil || common.IsNil(o.SwishPayerAlias) { + return nil, false + } + return o.SwishPayerAlias, true +} + +// HasSwishPayerAlias returns a boolean if a field has been set. +func (o *ResponseAdditionalDataSwish) HasSwishPayerAlias() bool { + if o != nil && !common.IsNil(o.SwishPayerAlias) { + return true + } + + return false +} + +// SetSwishPayerAlias gets a reference to the given string and assigns it to the SwishPayerAlias field. +func (o *ResponseAdditionalDataSwish) SetSwishPayerAlias(v string) { + o.SwishPayerAlias = &v +} + +func (o ResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAdditionalDataSwish) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SwishPayerAlias) { + toSerialize["swish.payerAlias"] = o.SwishPayerAlias + } + return toSerialize, nil +} + +type NullableResponseAdditionalDataSwish struct { + value *ResponseAdditionalDataSwish + isSet bool +} + +func (v NullableResponseAdditionalDataSwish) Get() *ResponseAdditionalDataSwish { + return v.value +} + +func (v *NullableResponseAdditionalDataSwish) Set(val *ResponseAdditionalDataSwish) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAdditionalDataSwish) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAdditionalDataSwish) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAdditionalDataSwish(val *ResponseAdditionalDataSwish) *NullableResponseAdditionalDataSwish { + return &NullableResponseAdditionalDataSwish{value: val, isSet: true} +} + +func (v NullableResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAdditionalDataSwish) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_result.go b/src/checkout/model_result.go new file mode 100644 index 000000000..cfb4d7ed2 --- /dev/null +++ b/src/checkout/model_result.go @@ -0,0 +1,110 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + "fmt" +) + +// Result the model 'Result' +type Result string + +// List of Result +const ( + VALID Result = "VALID" + INVALID Result = "INVALID" + UNKNOWN Result = "UNKNOWN" +) + +// All allowed values of Result enum +var AllowedResultEnumValues = []Result{ + "VALID", + "INVALID", + "UNKNOWN", +} + +func (v *Result) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Result(value) + for _, existing := range AllowedResultEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Result", value) +} + +// NewResultFromValue returns a pointer to a valid Result +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewResultFromValue(v string) (*Result, error) { + ev := Result(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Result: valid values are %v", v, AllowedResultEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Result) IsValid() bool { + for _, existing := range AllowedResultEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Result value +func (v Result) Ptr() *Result { + return &v +} + +type NullableResult struct { + value *Result + isSet bool +} + +func (v NullableResult) Get() *Result { + return v.value +} + +func (v *NullableResult) Set(val *Result) { + v.value = val + v.isSet = true +} + +func (v NullableResult) IsSet() bool { + return v.isSet +} + +func (v *NullableResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResult(val *Result) *NullableResult { + return &NullableResult{value: val, isSet: true} +} + +func (v NullableResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_riverty_details.go b/src/checkout/model_riverty_details.go index 79672ef7a..efeac808a 100644 --- a/src/checkout/model_riverty_details.go +++ b/src/checkout/model_riverty_details.go @@ -37,6 +37,8 @@ type RivertyDetails struct { RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` + // The payment method subtype. + Subtype *string `json:"subtype,omitempty"` // **riverty** Type string `json:"type"` } @@ -323,6 +325,38 @@ func (o *RivertyDetails) SetStoredPaymentMethodId(v string) { o.StoredPaymentMethodId = &v } +// GetSubtype returns the Subtype field value if set, zero value otherwise. +func (o *RivertyDetails) GetSubtype() string { + if o == nil || common.IsNil(o.Subtype) { + var ret string + return ret + } + return *o.Subtype +} + +// GetSubtypeOk returns a tuple with the Subtype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RivertyDetails) GetSubtypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Subtype) { + return nil, false + } + return o.Subtype, true +} + +// HasSubtype returns a boolean if a field has been set. +func (o *RivertyDetails) HasSubtype() bool { + if o != nil && !common.IsNil(o.Subtype) { + return true + } + + return false +} + +// SetSubtype gets a reference to the given string and assigns it to the Subtype field. +func (o *RivertyDetails) SetSubtype(v string) { + o.Subtype = &v +} + // GetType returns the Type field value func (o *RivertyDetails) GetType() string { if o == nil { @@ -381,6 +415,9 @@ func (o RivertyDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.StoredPaymentMethodId) { toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId } + if !common.IsNil(o.Subtype) { + toSerialize["subtype"] = o.Subtype + } toSerialize["type"] = o.Type return toSerialize, nil } @@ -422,7 +459,7 @@ func (v *NullableRivertyDetails) UnmarshalJSON(src []byte) error { } func (o *RivertyDetails) isValidType() bool { - var allowedEnumValues = []string{"riverty", "riverty_account", "sepadirectdebit_riverty"} + var allowedEnumValues = []string{"riverty", "riverty_account", "riverty_installments", "sepadirectdebit_riverty"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_session_result_response.go b/src/checkout/model_session_result_response.go index 1ada31214..6e278883e 100644 --- a/src/checkout/model_session_result_response.go +++ b/src/checkout/model_session_result_response.go @@ -19,8 +19,14 @@ var _ common.MappedNullable = &SessionResultResponse{} // SessionResultResponse struct for SessionResultResponse type SessionResultResponse struct { + // Contains additional information about the payment. Some fields are included only if you enable them. To enable these fields in your Customer Area, go to **Developers** > **Additional data**. + AdditionalData *map[string]string `json:"additionalData,omitempty"` // A unique identifier of the session. Id *string `json:"id,omitempty"` + // A list of all authorised payments done for this session. + Payments []Payment `json:"payments,omitempty"` + // The unique reference that you provided in the original `/sessions` request. This identifies the payment and is used in all communication with you about the payment status. + Reference *string `json:"reference,omitempty"` // The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. Status *string `json:"status,omitempty"` } @@ -42,6 +48,38 @@ func NewSessionResultResponseWithDefaults() *SessionResultResponse { return &this } +// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. +func (o *SessionResultResponse) GetAdditionalData() map[string]string { + if o == nil || common.IsNil(o.AdditionalData) { + var ret map[string]string + return ret + } + return *o.AdditionalData +} + +// GetAdditionalDataOk returns a tuple with the AdditionalData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionResultResponse) GetAdditionalDataOk() (*map[string]string, bool) { + if o == nil || common.IsNil(o.AdditionalData) { + return nil, false + } + return o.AdditionalData, true +} + +// HasAdditionalData returns a boolean if a field has been set. +func (o *SessionResultResponse) HasAdditionalData() bool { + if o != nil && !common.IsNil(o.AdditionalData) { + return true + } + + return false +} + +// SetAdditionalData gets a reference to the given map[string]string and assigns it to the AdditionalData field. +func (o *SessionResultResponse) SetAdditionalData(v map[string]string) { + o.AdditionalData = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *SessionResultResponse) GetId() string { if o == nil || common.IsNil(o.Id) { @@ -74,6 +112,70 @@ func (o *SessionResultResponse) SetId(v string) { o.Id = &v } +// GetPayments returns the Payments field value if set, zero value otherwise. +func (o *SessionResultResponse) GetPayments() []Payment { + if o == nil || common.IsNil(o.Payments) { + var ret []Payment + return ret + } + return o.Payments +} + +// GetPaymentsOk returns a tuple with the Payments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionResultResponse) GetPaymentsOk() ([]Payment, bool) { + if o == nil || common.IsNil(o.Payments) { + return nil, false + } + return o.Payments, true +} + +// HasPayments returns a boolean if a field has been set. +func (o *SessionResultResponse) HasPayments() bool { + if o != nil && !common.IsNil(o.Payments) { + return true + } + + return false +} + +// SetPayments gets a reference to the given []Payment and assigns it to the Payments field. +func (o *SessionResultResponse) SetPayments(v []Payment) { + o.Payments = v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *SessionResultResponse) GetReference() string { + if o == nil || common.IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SessionResultResponse) GetReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *SessionResultResponse) HasReference() bool { + if o != nil && !common.IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *SessionResultResponse) SetReference(v string) { + o.Reference = &v +} + // GetStatus returns the Status field value if set, zero value otherwise. func (o *SessionResultResponse) GetStatus() string { if o == nil || common.IsNil(o.Status) { @@ -116,9 +218,18 @@ func (o SessionResultResponse) MarshalJSON() ([]byte, error) { func (o SessionResultResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AdditionalData) { + toSerialize["additionalData"] = o.AdditionalData + } if !common.IsNil(o.Id) { toSerialize["id"] = o.Id } + if !common.IsNil(o.Payments) { + toSerialize["payments"] = o.Payments + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } if !common.IsNil(o.Status) { toSerialize["status"] = o.Status } diff --git a/src/checkout/model_shopper_id_payment_method.go b/src/checkout/model_shopper_id_payment_method.go new file mode 100644 index 000000000..638013314 --- /dev/null +++ b/src/checkout/model_shopper_id_payment_method.go @@ -0,0 +1,115 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ShopperIdPaymentMethod type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ShopperIdPaymentMethod{} + +// ShopperIdPaymentMethod struct for ShopperIdPaymentMethod +type ShopperIdPaymentMethod struct { + Type string `json:"type"` +} + +// NewShopperIdPaymentMethod instantiates a new ShopperIdPaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewShopperIdPaymentMethod(type_ string) *ShopperIdPaymentMethod { + this := ShopperIdPaymentMethod{} + this.Type = type_ + return &this +} + +// NewShopperIdPaymentMethodWithDefaults instantiates a new ShopperIdPaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewShopperIdPaymentMethodWithDefaults() *ShopperIdPaymentMethod { + this := ShopperIdPaymentMethod{} + return &this +} + +// GetType returns the Type field value +func (o *ShopperIdPaymentMethod) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ShopperIdPaymentMethod) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ShopperIdPaymentMethod) SetType(v string) { + o.Type = v +} + +func (o ShopperIdPaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShopperIdPaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableShopperIdPaymentMethod struct { + value *ShopperIdPaymentMethod + isSet bool +} + +func (v NullableShopperIdPaymentMethod) Get() *ShopperIdPaymentMethod { + return v.value +} + +func (v *NullableShopperIdPaymentMethod) Set(val *ShopperIdPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableShopperIdPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableShopperIdPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShopperIdPaymentMethod(val *ShopperIdPaymentMethod) *NullableShopperIdPaymentMethod { + return &NullableShopperIdPaymentMethod{value: val, isSet: true} +} + +func (v NullableShopperIdPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShopperIdPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_shopper_name.go b/src/checkout/model_shopper_name.go new file mode 100644 index 000000000..2160e7a61 --- /dev/null +++ b/src/checkout/model_shopper_name.go @@ -0,0 +1,144 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ShopperName type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ShopperName{} + +// ShopperName struct for ShopperName +type ShopperName struct { + // The first name. + FirstName string `json:"firstName"` + // The last name. + LastName string `json:"lastName"` +} + +// NewShopperName instantiates a new ShopperName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewShopperName(firstName string, lastName string) *ShopperName { + this := ShopperName{} + this.FirstName = firstName + this.LastName = lastName + return &this +} + +// NewShopperNameWithDefaults instantiates a new ShopperName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewShopperNameWithDefaults() *ShopperName { + this := ShopperName{} + return &this +} + +// GetFirstName returns the FirstName field value +func (o *ShopperName) GetFirstName() string { + if o == nil { + var ret string + return ret + } + + return o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value +// and a boolean to check if the value has been set. +func (o *ShopperName) GetFirstNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FirstName, true +} + +// SetFirstName sets field value +func (o *ShopperName) SetFirstName(v string) { + o.FirstName = v +} + +// GetLastName returns the LastName field value +func (o *ShopperName) GetLastName() string { + if o == nil { + var ret string + return ret + } + + return o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value +// and a boolean to check if the value has been set. +func (o *ShopperName) GetLastNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastName, true +} + +// SetLastName sets field value +func (o *ShopperName) SetLastName(v string) { + o.LastName = v +} + +func (o ShopperName) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShopperName) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["firstName"] = o.FirstName + toSerialize["lastName"] = o.LastName + return toSerialize, nil +} + +type NullableShopperName struct { + value *ShopperName + isSet bool +} + +func (v NullableShopperName) Get() *ShopperName { + return v.value +} + +func (v *NullableShopperName) Set(val *ShopperName) { + v.value = val + v.isSet = true +} + +func (v NullableShopperName) IsSet() bool { + return v.isSet +} + +func (v *NullableShopperName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShopperName(val *ShopperName) *NullableShopperName { + return &NullableShopperName{value: val, isSet: true} +} + +func (v NullableShopperName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShopperName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_split.go b/src/checkout/model_split.go index 93647d39a..535793c75 100644 --- a/src/checkout/model_split.go +++ b/src/checkout/model_split.go @@ -26,7 +26,7 @@ type Split struct { Description *string `json:"description,omitempty"` // Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. Reference *string `json:"reference,omitempty"` - // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. Type string `json:"type"` } diff --git a/src/checkout/model_standalone_payment_cancel_request.go b/src/checkout/model_standalone_payment_cancel_request.go index 1a8b54db4..a3aa96bc3 100644 --- a/src/checkout/model_standalone_payment_cancel_request.go +++ b/src/checkout/model_standalone_payment_cancel_request.go @@ -19,7 +19,8 @@ var _ common.MappedNullable = &StandalonePaymentCancelRequest{} // StandalonePaymentCancelRequest struct for StandalonePaymentCancelRequest type StandalonePaymentCancelRequest struct { - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + EnhancedSchemeData *EnhancedSchemeData `json:"enhancedSchemeData,omitempty"` // The merchant account that is used to process the payment. MerchantAccount string `json:"merchantAccount"` // The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel. @@ -79,6 +80,38 @@ func (o *StandalonePaymentCancelRequest) SetApplicationInfo(v ApplicationInfo) { o.ApplicationInfo = &v } +// GetEnhancedSchemeData returns the EnhancedSchemeData field value if set, zero value otherwise. +func (o *StandalonePaymentCancelRequest) GetEnhancedSchemeData() EnhancedSchemeData { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + var ret EnhancedSchemeData + return ret + } + return *o.EnhancedSchemeData +} + +// GetEnhancedSchemeDataOk returns a tuple with the EnhancedSchemeData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StandalonePaymentCancelRequest) GetEnhancedSchemeDataOk() (*EnhancedSchemeData, bool) { + if o == nil || common.IsNil(o.EnhancedSchemeData) { + return nil, false + } + return o.EnhancedSchemeData, true +} + +// HasEnhancedSchemeData returns a boolean if a field has been set. +func (o *StandalonePaymentCancelRequest) HasEnhancedSchemeData() bool { + if o != nil && !common.IsNil(o.EnhancedSchemeData) { + return true + } + + return false +} + +// SetEnhancedSchemeData gets a reference to the given EnhancedSchemeData and assigns it to the EnhancedSchemeData field. +func (o *StandalonePaymentCancelRequest) SetEnhancedSchemeData(v EnhancedSchemeData) { + o.EnhancedSchemeData = &v +} + // GetMerchantAccount returns the MerchantAccount field value func (o *StandalonePaymentCancelRequest) GetMerchantAccount() string { if o == nil { @@ -172,6 +205,9 @@ func (o StandalonePaymentCancelRequest) ToMap() (map[string]interface{}, error) if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } + if !common.IsNil(o.EnhancedSchemeData) { + toSerialize["enhancedSchemeData"] = o.EnhancedSchemeData + } toSerialize["merchantAccount"] = o.MerchantAccount toSerialize["paymentReference"] = o.PaymentReference if !common.IsNil(o.Reference) { diff --git a/src/checkout/model_sub_merchant_info.go b/src/checkout/model_sub_merchant_info.go index 7ce9b9845..c7a9fa5bd 100644 --- a/src/checkout/model_sub_merchant_info.go +++ b/src/checkout/model_sub_merchant_info.go @@ -27,7 +27,7 @@ type SubMerchantInfo struct { Id *string `json:"id,omitempty"` // Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits Mcc *string `json:"mcc,omitempty"` - // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters Name *string `json:"name,omitempty"` // Required for transactions performed by registered payment facilitators. The phone number associated with the sub-merchant's account. PhoneNumber *string `json:"phoneNumber,omitempty"` diff --git a/src/checkout/model_three_ds2_request_data.go b/src/checkout/model_three_ds2_request_data.go index 2dd9cd938..bc8f118e6 100644 --- a/src/checkout/model_three_ds2_request_data.go +++ b/src/checkout/model_three_ds2_request_data.go @@ -26,7 +26,7 @@ type ThreeDS2RequestData struct { AcquirerBIN *string `json:"acquirerBIN,omitempty"` // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. AcquirerMerchantID *string `json:"acquirerMerchantID,omitempty"` - // Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + // Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. AddrMatch *string `json:"addrMatch,omitempty"` // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. // Deprecated since Adyen Checkout API v50 diff --git a/src/checkout/model_three_ds2_request_fields.go b/src/checkout/model_three_ds2_request_fields.go index 371aed14d..9ba280f23 100644 --- a/src/checkout/model_three_ds2_request_fields.go +++ b/src/checkout/model_three_ds2_request_fields.go @@ -26,7 +26,7 @@ type ThreeDS2RequestFields struct { AcquirerBIN *string `json:"acquirerBIN,omitempty"` // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. AcquirerMerchantID *string `json:"acquirerMerchantID,omitempty"` - // Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + // Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. AddrMatch *string `json:"addrMatch,omitempty"` // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. // Deprecated since Adyen Checkout API v50 diff --git a/src/checkout/model_three_ds_request_data.go b/src/checkout/model_three_ds_request_data.go index 238fd764b..bb3aac5dc 100644 --- a/src/checkout/model_three_ds_request_data.go +++ b/src/checkout/model_three_ds_request_data.go @@ -21,9 +21,9 @@ var _ common.MappedNullable = &ThreeDSRequestData{} type ThreeDSRequestData struct { // Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen ChallengeWindowSize *string `json:"challengeWindowSize,omitempty"` - // Flag for data only flow. + // Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. DataOnly *string `json:"dataOnly,omitempty"` - // Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. + // Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow. NativeThreeDS *string `json:"nativeThreeDS,omitempty"` // The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** ThreeDSVersion *string `json:"threeDSVersion,omitempty"` diff --git a/src/checkout/model_upi_collect_details.go b/src/checkout/model_upi_collect_details.go index f7e396474..90f4748fe 100644 --- a/src/checkout/model_upi_collect_details.go +++ b/src/checkout/model_upi_collect_details.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &UpiCollectDetails{} // UpiCollectDetails struct for UpiCollectDetails type UpiCollectDetails struct { // The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - BillingSequenceNumber string `json:"billingSequenceNumber"` + BillingSequenceNumber *string `json:"billingSequenceNumber,omitempty"` // The checkout attempt identifier. CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. @@ -41,9 +41,8 @@ type UpiCollectDetails struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUpiCollectDetails(billingSequenceNumber string, type_ string) *UpiCollectDetails { +func NewUpiCollectDetails(type_ string) *UpiCollectDetails { this := UpiCollectDetails{} - this.BillingSequenceNumber = billingSequenceNumber this.Type = type_ return &this } @@ -58,28 +57,36 @@ func NewUpiCollectDetailsWithDefaults() *UpiCollectDetails { return &this } -// GetBillingSequenceNumber returns the BillingSequenceNumber field value +// GetBillingSequenceNumber returns the BillingSequenceNumber field value if set, zero value otherwise. func (o *UpiCollectDetails) GetBillingSequenceNumber() string { - if o == nil { + if o == nil || common.IsNil(o.BillingSequenceNumber) { var ret string return ret } - - return o.BillingSequenceNumber + return *o.BillingSequenceNumber } -// GetBillingSequenceNumberOk returns a tuple with the BillingSequenceNumber field value +// GetBillingSequenceNumberOk returns a tuple with the BillingSequenceNumber field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpiCollectDetails) GetBillingSequenceNumberOk() (*string, bool) { - if o == nil { + if o == nil || common.IsNil(o.BillingSequenceNumber) { return nil, false } - return &o.BillingSequenceNumber, true + return o.BillingSequenceNumber, true +} + +// HasBillingSequenceNumber returns a boolean if a field has been set. +func (o *UpiCollectDetails) HasBillingSequenceNumber() bool { + if o != nil && !common.IsNil(o.BillingSequenceNumber) { + return true + } + + return false } -// SetBillingSequenceNumber sets field value +// SetBillingSequenceNumber gets a reference to the given string and assigns it to the BillingSequenceNumber field. func (o *UpiCollectDetails) SetBillingSequenceNumber(v string) { - o.BillingSequenceNumber = v + o.BillingSequenceNumber = &v } // GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. @@ -282,7 +289,9 @@ func (o UpiCollectDetails) MarshalJSON() ([]byte, error) { func (o UpiCollectDetails) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["billingSequenceNumber"] = o.BillingSequenceNumber + if !common.IsNil(o.BillingSequenceNumber) { + toSerialize["billingSequenceNumber"] = o.BillingSequenceNumber + } if !common.IsNil(o.CheckoutAttemptId) { toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId } diff --git a/src/checkout/model_upi_intent_details.go b/src/checkout/model_upi_intent_details.go index 2f2815859..a2100429a 100644 --- a/src/checkout/model_upi_intent_details.go +++ b/src/checkout/model_upi_intent_details.go @@ -21,6 +21,8 @@ var _ common.MappedNullable = &UpiIntentDetails{} type UpiIntentDetails struct { // TPAP (Third Party Application) Id that is being used to make the UPI payment AppId *string `json:"appId,omitempty"` + // The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + BillingSequenceNumber *string `json:"billingSequenceNumber,omitempty"` // The checkout attempt identifier. CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. @@ -87,6 +89,38 @@ func (o *UpiIntentDetails) SetAppId(v string) { o.AppId = &v } +// GetBillingSequenceNumber returns the BillingSequenceNumber field value if set, zero value otherwise. +func (o *UpiIntentDetails) GetBillingSequenceNumber() string { + if o == nil || common.IsNil(o.BillingSequenceNumber) { + var ret string + return ret + } + return *o.BillingSequenceNumber +} + +// GetBillingSequenceNumberOk returns a tuple with the BillingSequenceNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpiIntentDetails) GetBillingSequenceNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.BillingSequenceNumber) { + return nil, false + } + return o.BillingSequenceNumber, true +} + +// HasBillingSequenceNumber returns a boolean if a field has been set. +func (o *UpiIntentDetails) HasBillingSequenceNumber() bool { + if o != nil && !common.IsNil(o.BillingSequenceNumber) { + return true + } + + return false +} + +// SetBillingSequenceNumber gets a reference to the given string and assigns it to the BillingSequenceNumber field. +func (o *UpiIntentDetails) SetBillingSequenceNumber(v string) { + o.BillingSequenceNumber = &v +} + // GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. func (o *UpiIntentDetails) GetCheckoutAttemptId() string { if o == nil || common.IsNil(o.CheckoutAttemptId) { @@ -258,6 +292,9 @@ func (o UpiIntentDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AppId) { toSerialize["appId"] = o.AppId } + if !common.IsNil(o.BillingSequenceNumber) { + toSerialize["billingSequenceNumber"] = o.BillingSequenceNumber + } if !common.IsNil(o.CheckoutAttemptId) { toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId } diff --git a/src/checkout/model_upi_payment_method.go b/src/checkout/model_upi_payment_method.go new file mode 100644 index 000000000..f74ba598a --- /dev/null +++ b/src/checkout/model_upi_payment_method.go @@ -0,0 +1,125 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the UPIPaymentMethod type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UPIPaymentMethod{} + +// UPIPaymentMethod struct for UPIPaymentMethod +type UPIPaymentMethod struct { + VirtualPaymentAddress *string `json:"virtualPaymentAddress,omitempty"` +} + +// NewUPIPaymentMethod instantiates a new UPIPaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUPIPaymentMethod(type_ string) *UPIPaymentMethod { + this := UPIPaymentMethod{} + this.Type = type_ + return &this +} + +// NewUPIPaymentMethodWithDefaults instantiates a new UPIPaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUPIPaymentMethodWithDefaults() *UPIPaymentMethod { + this := UPIPaymentMethod{} + return &this +} + +// GetVirtualPaymentAddress returns the VirtualPaymentAddress field value if set, zero value otherwise. +func (o *UPIPaymentMethod) GetVirtualPaymentAddress() string { + if o == nil || common.IsNil(o.VirtualPaymentAddress) { + var ret string + return ret + } + return *o.VirtualPaymentAddress +} + +// GetVirtualPaymentAddressOk returns a tuple with the VirtualPaymentAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UPIPaymentMethod) GetVirtualPaymentAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.VirtualPaymentAddress) { + return nil, false + } + return o.VirtualPaymentAddress, true +} + +// HasVirtualPaymentAddress returns a boolean if a field has been set. +func (o *UPIPaymentMethod) HasVirtualPaymentAddress() bool { + if o != nil && !common.IsNil(o.VirtualPaymentAddress) { + return true + } + + return false +} + +// SetVirtualPaymentAddress gets a reference to the given string and assigns it to the VirtualPaymentAddress field. +func (o *UPIPaymentMethod) SetVirtualPaymentAddress(v string) { + o.VirtualPaymentAddress = &v +} + +func (o UPIPaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UPIPaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.VirtualPaymentAddress) { + toSerialize["virtualPaymentAddress"] = o.VirtualPaymentAddress + } + return toSerialize, nil +} + +type NullableUPIPaymentMethod struct { + value *UPIPaymentMethod + isSet bool +} + +func (v NullableUPIPaymentMethod) Get() *UPIPaymentMethod { + return v.value +} + +func (v *NullableUPIPaymentMethod) Set(val *UPIPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableUPIPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableUPIPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUPIPaymentMethod(val *UPIPaymentMethod) *NullableUPIPaymentMethod { + return &NullableUPIPaymentMethod{value: val, isSet: true} +} + +func (v NullableUPIPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUPIPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_upi_payment_method_all_of.go b/src/checkout/model_upi_payment_method_all_of.go new file mode 100644 index 000000000..c054ab2c0 --- /dev/null +++ b/src/checkout/model_upi_payment_method_all_of.go @@ -0,0 +1,124 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the UPIPaymentMethodAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UPIPaymentMethodAllOf{} + +// UPIPaymentMethodAllOf struct for UPIPaymentMethodAllOf +type UPIPaymentMethodAllOf struct { + VirtualPaymentAddress *string `json:"virtualPaymentAddress,omitempty"` +} + +// NewUPIPaymentMethodAllOf instantiates a new UPIPaymentMethodAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUPIPaymentMethodAllOf() *UPIPaymentMethodAllOf { + this := UPIPaymentMethodAllOf{} + return &this +} + +// NewUPIPaymentMethodAllOfWithDefaults instantiates a new UPIPaymentMethodAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUPIPaymentMethodAllOfWithDefaults() *UPIPaymentMethodAllOf { + this := UPIPaymentMethodAllOf{} + return &this +} + +// GetVirtualPaymentAddress returns the VirtualPaymentAddress field value if set, zero value otherwise. +func (o *UPIPaymentMethodAllOf) GetVirtualPaymentAddress() string { + if o == nil || common.IsNil(o.VirtualPaymentAddress) { + var ret string + return ret + } + return *o.VirtualPaymentAddress +} + +// GetVirtualPaymentAddressOk returns a tuple with the VirtualPaymentAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UPIPaymentMethodAllOf) GetVirtualPaymentAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.VirtualPaymentAddress) { + return nil, false + } + return o.VirtualPaymentAddress, true +} + +// HasVirtualPaymentAddress returns a boolean if a field has been set. +func (o *UPIPaymentMethodAllOf) HasVirtualPaymentAddress() bool { + if o != nil && !common.IsNil(o.VirtualPaymentAddress) { + return true + } + + return false +} + +// SetVirtualPaymentAddress gets a reference to the given string and assigns it to the VirtualPaymentAddress field. +func (o *UPIPaymentMethodAllOf) SetVirtualPaymentAddress(v string) { + o.VirtualPaymentAddress = &v +} + +func (o UPIPaymentMethodAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UPIPaymentMethodAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.VirtualPaymentAddress) { + toSerialize["virtualPaymentAddress"] = o.VirtualPaymentAddress + } + return toSerialize, nil +} + +type NullableUPIPaymentMethodAllOf struct { + value *UPIPaymentMethodAllOf + isSet bool +} + +func (v NullableUPIPaymentMethodAllOf) Get() *UPIPaymentMethodAllOf { + return v.value +} + +func (v *NullableUPIPaymentMethodAllOf) Set(val *UPIPaymentMethodAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableUPIPaymentMethodAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableUPIPaymentMethodAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUPIPaymentMethodAllOf(val *UPIPaymentMethodAllOf) *NullableUPIPaymentMethodAllOf { + return &NullableUPIPaymentMethodAllOf{value: val, isSet: true} +} + +func (v NullableUPIPaymentMethodAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUPIPaymentMethodAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_upi_qr_details.go b/src/checkout/model_upi_qr_details.go new file mode 100644 index 000000000..3eb15710c --- /dev/null +++ b/src/checkout/model_upi_qr_details.go @@ -0,0 +1,321 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the UpiQrDetails type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UpiQrDetails{} + +// UpiQrDetails struct for UpiQrDetails +type UpiQrDetails struct { + // The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. + BillingSequenceNumber *string `json:"billingSequenceNumber,omitempty"` + // The checkout attempt identifier. + CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + // Deprecated since Adyen Checkout API v49 + // Use `storedPaymentMethodId` instead. + RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` + // The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. + ShopperNotificationReference *string `json:"shopperNotificationReference,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` + // **upi_qr** + Type string `json:"type"` +} + +// NewUpiQrDetails instantiates a new UpiQrDetails object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpiQrDetails(type_ string) *UpiQrDetails { + this := UpiQrDetails{} + this.Type = type_ + return &this +} + +// NewUpiQrDetailsWithDefaults instantiates a new UpiQrDetails object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpiQrDetailsWithDefaults() *UpiQrDetails { + this := UpiQrDetails{} + var type_ string = "upi_qr" + this.Type = type_ + return &this +} + +// GetBillingSequenceNumber returns the BillingSequenceNumber field value if set, zero value otherwise. +func (o *UpiQrDetails) GetBillingSequenceNumber() string { + if o == nil || common.IsNil(o.BillingSequenceNumber) { + var ret string + return ret + } + return *o.BillingSequenceNumber +} + +// GetBillingSequenceNumberOk returns a tuple with the BillingSequenceNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpiQrDetails) GetBillingSequenceNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.BillingSequenceNumber) { + return nil, false + } + return o.BillingSequenceNumber, true +} + +// HasBillingSequenceNumber returns a boolean if a field has been set. +func (o *UpiQrDetails) HasBillingSequenceNumber() bool { + if o != nil && !common.IsNil(o.BillingSequenceNumber) { + return true + } + + return false +} + +// SetBillingSequenceNumber gets a reference to the given string and assigns it to the BillingSequenceNumber field. +func (o *UpiQrDetails) SetBillingSequenceNumber(v string) { + o.BillingSequenceNumber = &v +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *UpiQrDetails) GetCheckoutAttemptId() string { + if o == nil || common.IsNil(o.CheckoutAttemptId) { + var ret string + return ret + } + return *o.CheckoutAttemptId +} + +// GetCheckoutAttemptIdOk returns a tuple with the CheckoutAttemptId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpiQrDetails) GetCheckoutAttemptIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CheckoutAttemptId) { + return nil, false + } + return o.CheckoutAttemptId, true +} + +// HasCheckoutAttemptId returns a boolean if a field has been set. +func (o *UpiQrDetails) HasCheckoutAttemptId() bool { + if o != nil && !common.IsNil(o.CheckoutAttemptId) { + return true + } + + return false +} + +// SetCheckoutAttemptId gets a reference to the given string and assigns it to the CheckoutAttemptId field. +func (o *UpiQrDetails) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *UpiQrDetails) GetRecurringDetailReference() string { + if o == nil || common.IsNil(o.RecurringDetailReference) { + var ret string + return ret + } + return *o.RecurringDetailReference +} + +// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *UpiQrDetails) GetRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.RecurringDetailReference) { + return nil, false + } + return o.RecurringDetailReference, true +} + +// HasRecurringDetailReference returns a boolean if a field has been set. +func (o *UpiQrDetails) HasRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.RecurringDetailReference) { + return true + } + + return false +} + +// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *UpiQrDetails) SetRecurringDetailReference(v string) { + o.RecurringDetailReference = &v +} + +// GetShopperNotificationReference returns the ShopperNotificationReference field value if set, zero value otherwise. +func (o *UpiQrDetails) GetShopperNotificationReference() string { + if o == nil || common.IsNil(o.ShopperNotificationReference) { + var ret string + return ret + } + return *o.ShopperNotificationReference +} + +// GetShopperNotificationReferenceOk returns a tuple with the ShopperNotificationReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpiQrDetails) GetShopperNotificationReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperNotificationReference) { + return nil, false + } + return o.ShopperNotificationReference, true +} + +// HasShopperNotificationReference returns a boolean if a field has been set. +func (o *UpiQrDetails) HasShopperNotificationReference() bool { + if o != nil && !common.IsNil(o.ShopperNotificationReference) { + return true + } + + return false +} + +// SetShopperNotificationReference gets a reference to the given string and assigns it to the ShopperNotificationReference field. +func (o *UpiQrDetails) SetShopperNotificationReference(v string) { + o.ShopperNotificationReference = &v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. +func (o *UpiQrDetails) GetStoredPaymentMethodId() string { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + var ret string + return ret + } + return *o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpiQrDetails) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + return nil, false + } + return o.StoredPaymentMethodId, true +} + +// HasStoredPaymentMethodId returns a boolean if a field has been set. +func (o *UpiQrDetails) HasStoredPaymentMethodId() bool { + if o != nil && !common.IsNil(o.StoredPaymentMethodId) { + return true + } + + return false +} + +// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field. +func (o *UpiQrDetails) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = &v +} + +// GetType returns the Type field value +func (o *UpiQrDetails) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *UpiQrDetails) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *UpiQrDetails) SetType(v string) { + o.Type = v +} + +func (o UpiQrDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpiQrDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.BillingSequenceNumber) { + toSerialize["billingSequenceNumber"] = o.BillingSequenceNumber + } + if !common.IsNil(o.CheckoutAttemptId) { + toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId + } + if !common.IsNil(o.RecurringDetailReference) { + toSerialize["recurringDetailReference"] = o.RecurringDetailReference + } + if !common.IsNil(o.ShopperNotificationReference) { + toSerialize["shopperNotificationReference"] = o.ShopperNotificationReference + } + if !common.IsNil(o.StoredPaymentMethodId) { + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableUpiQrDetails struct { + value *UpiQrDetails + isSet bool +} + +func (v NullableUpiQrDetails) Get() *UpiQrDetails { + return v.value +} + +func (v *NullableUpiQrDetails) Set(val *UpiQrDetails) { + v.value = val + v.isSet = true +} + +func (v NullableUpiQrDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableUpiQrDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpiQrDetails(val *UpiQrDetails) *NullableUpiQrDetails { + return &NullableUpiQrDetails{value: val, isSet: true} +} + +func (v NullableUpiQrDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpiQrDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *UpiQrDetails) isValidType() bool { + var allowedEnumValues = []string{"upi_qr"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_validate_shopper_id_request.go b/src/checkout/model_validate_shopper_id_request.go new file mode 100644 index 000000000..875b18d42 --- /dev/null +++ b/src/checkout/model_validate_shopper_id_request.go @@ -0,0 +1,251 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ValidateShopperIdRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ValidateShopperIdRequest{} + +// ValidateShopperIdRequest struct for ValidateShopperIdRequest +type ValidateShopperIdRequest struct { + // The merchant account identifier, with which you want to process the transaction. + MerchantAccount string `json:"merchantAccount"` + PaymentMethod ShopperIdPaymentMethod `json:"paymentMethod"` + ShopperEmail *string `json:"shopperEmail,omitempty"` + ShopperIP *string `json:"shopperIP,omitempty"` + ShopperReference *string `json:"shopperReference,omitempty"` +} + +// NewValidateShopperIdRequest instantiates a new ValidateShopperIdRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidateShopperIdRequest(merchantAccount string, paymentMethod ShopperIdPaymentMethod) *ValidateShopperIdRequest { + this := ValidateShopperIdRequest{} + this.MerchantAccount = merchantAccount + this.PaymentMethod = paymentMethod + return &this +} + +// NewValidateShopperIdRequestWithDefaults instantiates a new ValidateShopperIdRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidateShopperIdRequestWithDefaults() *ValidateShopperIdRequest { + this := ValidateShopperIdRequest{} + return &this +} + +// GetMerchantAccount returns the MerchantAccount field value +func (o *ValidateShopperIdRequest) GetMerchantAccount() string { + if o == nil { + var ret string + return ret + } + + return o.MerchantAccount +} + +// GetMerchantAccountOk returns a tuple with the MerchantAccount field value +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdRequest) GetMerchantAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MerchantAccount, true +} + +// SetMerchantAccount sets field value +func (o *ValidateShopperIdRequest) SetMerchantAccount(v string) { + o.MerchantAccount = v +} + +// GetPaymentMethod returns the PaymentMethod field value +func (o *ValidateShopperIdRequest) GetPaymentMethod() ShopperIdPaymentMethod { + if o == nil { + var ret ShopperIdPaymentMethod + return ret + } + + return o.PaymentMethod +} + +// GetPaymentMethodOk returns a tuple with the PaymentMethod field value +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdRequest) GetPaymentMethodOk() (*ShopperIdPaymentMethod, bool) { + if o == nil { + return nil, false + } + return &o.PaymentMethod, true +} + +// SetPaymentMethod sets field value +func (o *ValidateShopperIdRequest) SetPaymentMethod(v ShopperIdPaymentMethod) { + o.PaymentMethod = v +} + +// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. +func (o *ValidateShopperIdRequest) GetShopperEmail() string { + if o == nil || common.IsNil(o.ShopperEmail) { + var ret string + return ret + } + return *o.ShopperEmail +} + +// GetShopperEmailOk returns a tuple with the ShopperEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdRequest) GetShopperEmailOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperEmail) { + return nil, false + } + return o.ShopperEmail, true +} + +// HasShopperEmail returns a boolean if a field has been set. +func (o *ValidateShopperIdRequest) HasShopperEmail() bool { + if o != nil && !common.IsNil(o.ShopperEmail) { + return true + } + + return false +} + +// SetShopperEmail gets a reference to the given string and assigns it to the ShopperEmail field. +func (o *ValidateShopperIdRequest) SetShopperEmail(v string) { + o.ShopperEmail = &v +} + +// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. +func (o *ValidateShopperIdRequest) GetShopperIP() string { + if o == nil || common.IsNil(o.ShopperIP) { + var ret string + return ret + } + return *o.ShopperIP +} + +// GetShopperIPOk returns a tuple with the ShopperIP field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdRequest) GetShopperIPOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperIP) { + return nil, false + } + return o.ShopperIP, true +} + +// HasShopperIP returns a boolean if a field has been set. +func (o *ValidateShopperIdRequest) HasShopperIP() bool { + if o != nil && !common.IsNil(o.ShopperIP) { + return true + } + + return false +} + +// SetShopperIP gets a reference to the given string and assigns it to the ShopperIP field. +func (o *ValidateShopperIdRequest) SetShopperIP(v string) { + o.ShopperIP = &v +} + +// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. +func (o *ValidateShopperIdRequest) GetShopperReference() string { + if o == nil || common.IsNil(o.ShopperReference) { + var ret string + return ret + } + return *o.ShopperReference +} + +// GetShopperReferenceOk returns a tuple with the ShopperReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdRequest) GetShopperReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ShopperReference) { + return nil, false + } + return o.ShopperReference, true +} + +// HasShopperReference returns a boolean if a field has been set. +func (o *ValidateShopperIdRequest) HasShopperReference() bool { + if o != nil && !common.IsNil(o.ShopperReference) { + return true + } + + return false +} + +// SetShopperReference gets a reference to the given string and assigns it to the ShopperReference field. +func (o *ValidateShopperIdRequest) SetShopperReference(v string) { + o.ShopperReference = &v +} + +func (o ValidateShopperIdRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidateShopperIdRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["merchantAccount"] = o.MerchantAccount + toSerialize["paymentMethod"] = o.PaymentMethod + if !common.IsNil(o.ShopperEmail) { + toSerialize["shopperEmail"] = o.ShopperEmail + } + if !common.IsNil(o.ShopperIP) { + toSerialize["shopperIP"] = o.ShopperIP + } + if !common.IsNil(o.ShopperReference) { + toSerialize["shopperReference"] = o.ShopperReference + } + return toSerialize, nil +} + +type NullableValidateShopperIdRequest struct { + value *ValidateShopperIdRequest + isSet bool +} + +func (v NullableValidateShopperIdRequest) Get() *ValidateShopperIdRequest { + return v.value +} + +func (v *NullableValidateShopperIdRequest) Set(val *ValidateShopperIdRequest) { + v.value = val + v.isSet = true +} + +func (v NullableValidateShopperIdRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableValidateShopperIdRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidateShopperIdRequest(val *ValidateShopperIdRequest) *NullableValidateShopperIdRequest { + return &NullableValidateShopperIdRequest{value: val, isSet: true} +} + +func (v NullableValidateShopperIdRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidateShopperIdRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_validate_shopper_id_response.go b/src/checkout/model_validate_shopper_id_response.go new file mode 100644 index 000000000..9d7b1156d --- /dev/null +++ b/src/checkout/model_validate_shopper_id_response.go @@ -0,0 +1,161 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ValidateShopperIdResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ValidateShopperIdResponse{} + +// ValidateShopperIdResponse struct for ValidateShopperIdResponse +type ValidateShopperIdResponse struct { + // Reason for the result. + Reason *string `json:"reason,omitempty"` + Result *Result `json:"result,omitempty"` +} + +// NewValidateShopperIdResponse instantiates a new ValidateShopperIdResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidateShopperIdResponse() *ValidateShopperIdResponse { + this := ValidateShopperIdResponse{} + return &this +} + +// NewValidateShopperIdResponseWithDefaults instantiates a new ValidateShopperIdResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidateShopperIdResponseWithDefaults() *ValidateShopperIdResponse { + this := ValidateShopperIdResponse{} + return &this +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *ValidateShopperIdResponse) GetReason() string { + if o == nil || common.IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdResponse) GetReasonOk() (*string, bool) { + if o == nil || common.IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *ValidateShopperIdResponse) HasReason() bool { + if o != nil && !common.IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *ValidateShopperIdResponse) SetReason(v string) { + o.Reason = &v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ValidateShopperIdResponse) GetResult() Result { + if o == nil || common.IsNil(o.Result) { + var ret Result + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidateShopperIdResponse) GetResultOk() (*Result, bool) { + if o == nil || common.IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *ValidateShopperIdResponse) HasResult() bool { + if o != nil && !common.IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given Result and assigns it to the Result field. +func (o *ValidateShopperIdResponse) SetResult(v Result) { + o.Result = &v +} + +func (o ValidateShopperIdResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidateShopperIdResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + if !common.IsNil(o.Result) { + toSerialize["result"] = o.Result + } + return toSerialize, nil +} + +type NullableValidateShopperIdResponse struct { + value *ValidateShopperIdResponse + isSet bool +} + +func (v NullableValidateShopperIdResponse) Get() *ValidateShopperIdResponse { + return v.value +} + +func (v *NullableValidateShopperIdResponse) Set(val *ValidateShopperIdResponse) { + v.value = val + v.isSet = true +} + +func (v NullableValidateShopperIdResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableValidateShopperIdResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidateShopperIdResponse(val *ValidateShopperIdResponse) *NullableValidateShopperIdResponse { + return &NullableValidateShopperIdResponse{value: val, isSet: true} +} + +func (v NullableValidateShopperIdResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidateShopperIdResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/payments/model_additional_data_airline.go b/src/payments/model_additional_data_airline.go index 0a49906d6..fa127801c 100644 --- a/src/payments/model_additional_data_airline.go +++ b/src/payments/model_additional_data_airline.go @@ -51,7 +51,7 @@ type AdditionalDataAirline struct { AirlineLegDepartTax *string `json:"airline.leg.depart_tax,omitempty"` // The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. AirlineLegDestinationCode *string `json:"airline.leg.destination_code,omitempty"` - // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros. + // The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros. AirlineLegFareBaseCode *string `json:"airline.leg.fare_base_code,omitempty"` // The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros. AirlineLegFlightNumber *string `json:"airline.leg.flight_number,omitempty"` diff --git a/src/payments/model_additional_data_level23.go b/src/payments/model_additional_data_level23.go index 50464e9fe..a02403350 100644 --- a/src/payments/model_additional_data_level23.go +++ b/src/payments/model_additional_data_level23.go @@ -33,7 +33,7 @@ type AdditionalDataLevel23 struct { EnhancedSchemeDataFreightAmount *string `json:"enhancedSchemeData.freightAmount,omitempty"` // The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrCommodityCode *string `json:"enhancedSchemeData.itemDetailLine[itemNr].commodityCode,omitempty"` - // A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. + // A description of the item, that provides details about the purchase. For Visa transactions with level 3 ESD, the description must not be the same or very similar to your merchant name, or, consist only of common words like \"product\", or \"service\". * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not be all special characters. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrDescription *string `json:"enhancedSchemeData.itemDetailLine[itemNr].description,omitempty"` // The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters EnhancedSchemeDataItemDetailLineItemNrDiscountAmount *string `json:"enhancedSchemeData.itemDetailLine[itemNr].discountAmount,omitempty"` @@ -51,7 +51,7 @@ type AdditionalDataLevel23 struct { EnhancedSchemeDataOrderDate *string `json:"enhancedSchemeData.orderDate,omitempty"` // The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. EnhancedSchemeDataShipFromPostalCode *string `json:"enhancedSchemeData.shipFromPostalCode,omitempty"` - // The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. + // The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * For L2 data: must not be all zeroes. * For L3 data: can be zero. EnhancedSchemeDataTotalTaxAmount *string `json:"enhancedSchemeData.totalTaxAmount,omitempty"` } diff --git a/src/payments/model_additional_data_sub_merchant.go b/src/payments/model_additional_data_sub_merchant.go index b621fc2dd..2d2f7ad5f 100644 --- a/src/payments/model_additional_data_sub_merchant.go +++ b/src/payments/model_additional_data_sub_merchant.go @@ -31,9 +31,9 @@ type AdditionalDataSubMerchant struct { SubMerchantSubSellerSubSellerNrId *string `json:"subMerchant.subSeller[subSellerNr].id,omitempty"` // Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits SubMerchantSubSellerSubSellerNrMcc *string `json:"subMerchant.subSeller[subSellerNr].mcc,omitempty"` - // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters + // Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters SubMerchantSubSellerSubSellerNrName *string `json:"subMerchant.subSeller[subSellerNr].name,omitempty"` - // Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters + // Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant. * Format: Alphanumeric and special characters * Maximum length: 20 characters SubMerchantSubSellerSubSellerNrPhoneNumber *string `json:"subMerchant.subSeller[subSellerNr].phoneNumber,omitempty"` // Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits SubMerchantSubSellerSubSellerNrPostalCode *string `json:"subMerchant.subSeller[subSellerNr].postalCode,omitempty"` diff --git a/src/payments/model_payment_request.go b/src/payments/model_payment_request.go index e68b470a0..6c2c6716b 100644 --- a/src/payments/model_payment_request.go +++ b/src/payments/model_payment_request.go @@ -79,9 +79,9 @@ type PaymentRequest struct { SelectedRecurringDetailReference *string `json:"selectedRecurringDetailReference,omitempty"` // A session ID used to identify a payment session. SessionId *string `json:"sessionId,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` @@ -98,10 +98,10 @@ type PaymentRequest struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` // The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). TotalsGroup *string `json:"totalsGroup,omitempty"` diff --git a/src/payments/model_payment_request3d.go b/src/payments/model_payment_request3d.go index 0b773a7d8..1db3b454d 100644 --- a/src/payments/model_payment_request3d.go +++ b/src/payments/model_payment_request3d.go @@ -69,9 +69,9 @@ type PaymentRequest3d struct { SelectedRecurringDetailReference *string `json:"selectedRecurringDetailReference,omitempty"` // A session ID used to identify a payment session. SessionId *string `json:"sessionId,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` @@ -88,10 +88,10 @@ type PaymentRequest3d struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` // The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). TotalsGroup *string `json:"totalsGroup,omitempty"` diff --git a/src/payments/model_payment_request3ds2.go b/src/payments/model_payment_request3ds2.go index 3ef9b6137..9fdd6f5ad 100644 --- a/src/payments/model_payment_request3ds2.go +++ b/src/payments/model_payment_request3ds2.go @@ -65,9 +65,9 @@ type PaymentRequest3ds2 struct { SelectedRecurringDetailReference *string `json:"selectedRecurringDetailReference,omitempty"` // A session ID used to identify a payment session. SessionId *string `json:"sessionId,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). + // The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). ShopperIP *string `json:"shopperIP,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` @@ -84,13 +84,13 @@ type PaymentRequest3ds2 struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` ThreeDS2RequestData *ThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` ThreeDS2Result *ThreeDS2Result `json:"threeDS2Result,omitempty"` // The ThreeDS2Token that was returned in the /authorise call. ThreeDS2Token *string `json:"threeDS2Token,omitempty"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` // The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). TotalsGroup *string `json:"totalsGroup,omitempty"` diff --git a/src/payments/model_phone.go b/src/payments/model_phone.go index 578206c59..89be60842 100644 --- a/src/payments/model_phone.go +++ b/src/payments/model_phone.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &Phone{} // Phone struct for Phone type Phone struct { - // Country code. Length: 1–3 characters. + // Country code. Length: 1–3 digits. Cc *string `json:"cc,omitempty"` - // Subscriber number. Maximum length: 15 characters. + // Subscriber number. Length: 4-15 digits. Subscriber *string `json:"subscriber,omitempty"` } diff --git a/src/payments/model_recurring.go b/src/payments/model_recurring.go index 52d2f5c32..e10e6e537 100644 --- a/src/payments/model_recurring.go +++ b/src/payments/model_recurring.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &Recurring{} // Recurring struct for Recurring type Recurring struct { - // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. Contract *string `json:"contract,omitempty"` // A descriptive name for this detail. RecurringDetailName *string `json:"recurringDetailName,omitempty"` @@ -274,7 +274,7 @@ func (v *NullableRecurring) UnmarshalJSON(src []byte) error { } func (o *Recurring) isValidContract() bool { - var allowedEnumValues = []string{"ONECLICK", "RECURRING", "PAYOUT"} + var allowedEnumValues = []string{"ONECLICK", "ONECLICK,RECURRING", "RECURRING", "PAYOUT", "EXTERNAL"} for _, allowed := range allowedEnumValues { if o.GetContract() == allowed { return true diff --git a/src/payments/model_response_additional_data_common.go b/src/payments/model_response_additional_data_common.go index 70d9f9acd..8a29245c5 100644 --- a/src/payments/model_response_additional_data_common.go +++ b/src/payments/model_response_additional_data_common.go @@ -65,7 +65,7 @@ type ResponseAdditionalDataCommon struct { FraudManualReview *string `json:"fraudManualReview,omitempty"` // The fraud result properties of the payment. FraudResultType *string `json:"fraudResultType,omitempty"` - // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> + // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh FraudRiskLevel *string `json:"fraudRiskLevel,omitempty"` // Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. FundingSource *string `json:"fundingSource,omitempty"` diff --git a/src/payments/model_response_additional_data_swish.go b/src/payments/model_response_additional_data_swish.go new file mode 100644 index 000000000..535682525 --- /dev/null +++ b/src/payments/model_response_additional_data_swish.go @@ -0,0 +1,125 @@ +/* +Adyen Payment API + +API version: 68 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package payments + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ResponseAdditionalDataSwish type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResponseAdditionalDataSwish{} + +// ResponseAdditionalDataSwish struct for ResponseAdditionalDataSwish +type ResponseAdditionalDataSwish struct { + // A Swish shopper's telephone number. + SwishPayerAlias *string `json:"swish.payerAlias,omitempty"` +} + +// NewResponseAdditionalDataSwish instantiates a new ResponseAdditionalDataSwish object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAdditionalDataSwish() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// NewResponseAdditionalDataSwishWithDefaults instantiates a new ResponseAdditionalDataSwish object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAdditionalDataSwishWithDefaults() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// GetSwishPayerAlias returns the SwishPayerAlias field value if set, zero value otherwise. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAlias() string { + if o == nil || common.IsNil(o.SwishPayerAlias) { + var ret string + return ret + } + return *o.SwishPayerAlias +} + +// GetSwishPayerAliasOk returns a tuple with the SwishPayerAlias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAliasOk() (*string, bool) { + if o == nil || common.IsNil(o.SwishPayerAlias) { + return nil, false + } + return o.SwishPayerAlias, true +} + +// HasSwishPayerAlias returns a boolean if a field has been set. +func (o *ResponseAdditionalDataSwish) HasSwishPayerAlias() bool { + if o != nil && !common.IsNil(o.SwishPayerAlias) { + return true + } + + return false +} + +// SetSwishPayerAlias gets a reference to the given string and assigns it to the SwishPayerAlias field. +func (o *ResponseAdditionalDataSwish) SetSwishPayerAlias(v string) { + o.SwishPayerAlias = &v +} + +func (o ResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAdditionalDataSwish) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SwishPayerAlias) { + toSerialize["swish.payerAlias"] = o.SwishPayerAlias + } + return toSerialize, nil +} + +type NullableResponseAdditionalDataSwish struct { + value *ResponseAdditionalDataSwish + isSet bool +} + +func (v NullableResponseAdditionalDataSwish) Get() *ResponseAdditionalDataSwish { + return v.value +} + +func (v *NullableResponseAdditionalDataSwish) Set(val *ResponseAdditionalDataSwish) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAdditionalDataSwish) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAdditionalDataSwish) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAdditionalDataSwish(val *ResponseAdditionalDataSwish) *NullableResponseAdditionalDataSwish { + return &NullableResponseAdditionalDataSwish{value: val, isSet: true} +} + +func (v NullableResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAdditionalDataSwish) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/payments/model_split.go b/src/payments/model_split.go index 00c19fe1c..4c0ad4a4e 100644 --- a/src/payments/model_split.go +++ b/src/payments/model_split.go @@ -26,7 +26,7 @@ type Split struct { Description *string `json:"description,omitempty"` // Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. Reference *string `json:"reference,omitempty"` - // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. + // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. Type string `json:"type"` } diff --git a/src/payments/model_three_ds2_request_data.go b/src/payments/model_three_ds2_request_data.go index 5c5cc3e6f..46f5149c8 100644 --- a/src/payments/model_three_ds2_request_data.go +++ b/src/payments/model_three_ds2_request_data.go @@ -26,7 +26,7 @@ type ThreeDS2RequestData struct { AcquirerBIN *string `json:"acquirerBIN,omitempty"` // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. AcquirerMerchantID *string `json:"acquirerMerchantID,omitempty"` - // Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + // Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. AddrMatch *string `json:"addrMatch,omitempty"` // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. // Deprecated since Adyen Payment API v50 diff --git a/src/payout/model_payout_request.go b/src/payout/model_payout_request.go index c04de406d..b9b213a02 100644 --- a/src/payout/model_payout_request.go +++ b/src/payout/model_payout_request.go @@ -32,14 +32,14 @@ type PayoutRequest struct { Reference string `json:"reference"` // The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. SelectedRecurringDetailReference *string `json:"selectedRecurringDetailReference,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. + // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. ShopperEmail *string `json:"shopperEmail,omitempty"` // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. ShopperInteraction *string `json:"shopperInteraction,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` - // The shopper's telephone number. + // The shopper's telephone number. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we do not submit it for authentication. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. TelephoneNumber *string `json:"telephoneNumber,omitempty"` } diff --git a/src/payout/model_recurring.go b/src/payout/model_recurring.go index 7e127d506..d370de994 100644 --- a/src/payout/model_recurring.go +++ b/src/payout/model_recurring.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &Recurring{} // Recurring struct for Recurring type Recurring struct { - // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. Contract *string `json:"contract,omitempty"` // A descriptive name for this detail. RecurringDetailName *string `json:"recurringDetailName,omitempty"` @@ -274,7 +274,7 @@ func (v *NullableRecurring) UnmarshalJSON(src []byte) error { } func (o *Recurring) isValidContract() bool { - var allowedEnumValues = []string{"ONECLICK", "RECURRING", "PAYOUT"} + var allowedEnumValues = []string{"ONECLICK", "ONECLICK,RECURRING", "RECURRING", "PAYOUT", "EXTERNAL"} for _, allowed := range allowedEnumValues { if o.GetContract() == allowed { return true diff --git a/src/payout/model_response_additional_data_common.go b/src/payout/model_response_additional_data_common.go index d5d280fb6..ee385954e 100644 --- a/src/payout/model_response_additional_data_common.go +++ b/src/payout/model_response_additional_data_common.go @@ -65,7 +65,7 @@ type ResponseAdditionalDataCommon struct { FraudManualReview *string `json:"fraudManualReview,omitempty"` // The fraud result properties of the payment. FraudResultType *string `json:"fraudResultType,omitempty"` - // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> + // The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh FraudRiskLevel *string `json:"fraudRiskLevel,omitempty"` // Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. FundingSource *string `json:"fundingSource,omitempty"` diff --git a/src/payout/model_response_additional_data_swish.go b/src/payout/model_response_additional_data_swish.go new file mode 100644 index 000000000..7b8fb85fb --- /dev/null +++ b/src/payout/model_response_additional_data_swish.go @@ -0,0 +1,125 @@ +/* +Adyen Payout API + +API version: 68 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package payout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ResponseAdditionalDataSwish type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResponseAdditionalDataSwish{} + +// ResponseAdditionalDataSwish struct for ResponseAdditionalDataSwish +type ResponseAdditionalDataSwish struct { + // A Swish shopper's telephone number. + SwishPayerAlias *string `json:"swish.payerAlias,omitempty"` +} + +// NewResponseAdditionalDataSwish instantiates a new ResponseAdditionalDataSwish object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAdditionalDataSwish() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// NewResponseAdditionalDataSwishWithDefaults instantiates a new ResponseAdditionalDataSwish object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAdditionalDataSwishWithDefaults() *ResponseAdditionalDataSwish { + this := ResponseAdditionalDataSwish{} + return &this +} + +// GetSwishPayerAlias returns the SwishPayerAlias field value if set, zero value otherwise. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAlias() string { + if o == nil || common.IsNil(o.SwishPayerAlias) { + var ret string + return ret + } + return *o.SwishPayerAlias +} + +// GetSwishPayerAliasOk returns a tuple with the SwishPayerAlias field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataSwish) GetSwishPayerAliasOk() (*string, bool) { + if o == nil || common.IsNil(o.SwishPayerAlias) { + return nil, false + } + return o.SwishPayerAlias, true +} + +// HasSwishPayerAlias returns a boolean if a field has been set. +func (o *ResponseAdditionalDataSwish) HasSwishPayerAlias() bool { + if o != nil && !common.IsNil(o.SwishPayerAlias) { + return true + } + + return false +} + +// SetSwishPayerAlias gets a reference to the given string and assigns it to the SwishPayerAlias field. +func (o *ResponseAdditionalDataSwish) SetSwishPayerAlias(v string) { + o.SwishPayerAlias = &v +} + +func (o ResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAdditionalDataSwish) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SwishPayerAlias) { + toSerialize["swish.payerAlias"] = o.SwishPayerAlias + } + return toSerialize, nil +} + +type NullableResponseAdditionalDataSwish struct { + value *ResponseAdditionalDataSwish + isSet bool +} + +func (v NullableResponseAdditionalDataSwish) Get() *ResponseAdditionalDataSwish { + return v.value +} + +func (v *NullableResponseAdditionalDataSwish) Set(val *ResponseAdditionalDataSwish) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAdditionalDataSwish) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAdditionalDataSwish) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAdditionalDataSwish(val *ResponseAdditionalDataSwish) *NullableResponseAdditionalDataSwish { + return &NullableResponseAdditionalDataSwish{value: val, isSet: true} +} + +func (v NullableResponseAdditionalDataSwish) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAdditionalDataSwish) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/recurring/api_general.go b/src/recurring/api_general.go index b820a1723..c71e12a3f 100644 --- a/src/recurring/api_general.go +++ b/src/recurring/api_general.go @@ -84,8 +84,6 @@ func (r GeneralApiDisableInput) DisableRequest(disableRequest DisableRequest) Ge Prepare a request for Disable @return GeneralApiDisableInput - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) DisableInput() GeneralApiDisableInput { return GeneralApiDisableInput{} @@ -101,8 +99,6 @@ For more information, refer to [Disable stored details](https://docs.adyen.com/c @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiDisableInput - Request parameters, see DisableInput @return DisableResult, *http.Response, error - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) Disable(ctx context.Context, r GeneralApiDisableInput) (DisableResult, *http.Response, error) { res := &DisableResult{} @@ -188,8 +184,6 @@ func (r GeneralApiListRecurringDetailsInput) RecurringDetailsRequest(recurringDe Prepare a request for ListRecurringDetails @return GeneralApiListRecurringDetailsInput - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) ListRecurringDetailsInput() GeneralApiListRecurringDetailsInput { return GeneralApiListRecurringDetailsInput{} @@ -205,8 +199,6 @@ For more information, refer to [Retrieve stored details](https://docs.adyen.com/ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiListRecurringDetailsInput - Request parameters, see ListRecurringDetailsInput @return RecurringDetailsResult, *http.Response, error - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) ListRecurringDetails(ctx context.Context, r GeneralApiListRecurringDetailsInput) (RecurringDetailsResult, *http.Response, error) { res := &RecurringDetailsResult{} @@ -241,8 +233,6 @@ func (r GeneralApiNotifyShopperInput) NotifyShopperRequest(notifyShopperRequest Prepare a request for NotifyShopper @return GeneralApiNotifyShopperInput - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) NotifyShopperInput() GeneralApiNotifyShopperInput { return GeneralApiNotifyShopperInput{} @@ -256,8 +246,6 @@ Sends a request to the issuer so they can inform the shopper about the upcoming @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiNotifyShopperInput - Request parameters, see NotifyShopperInput @return NotifyShopperResult, *http.Response, error - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) NotifyShopper(ctx context.Context, r GeneralApiNotifyShopperInput) (NotifyShopperResult, *http.Response, error) { res := &NotifyShopperResult{} @@ -292,8 +280,6 @@ func (r GeneralApiScheduleAccountUpdaterInput) ScheduleAccountUpdaterRequest(sch Prepare a request for ScheduleAccountUpdater @return GeneralApiScheduleAccountUpdaterInput - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) ScheduleAccountUpdaterInput() GeneralApiScheduleAccountUpdaterInput { return GeneralApiScheduleAccountUpdaterInput{} @@ -309,8 +295,6 @@ When making the API call, you can submit either the credit card information, or @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiScheduleAccountUpdaterInput - Request parameters, see ScheduleAccountUpdaterInput @return ScheduleAccountUpdaterResult, *http.Response, error - -Deprecated since Adyen Recurring API v68 */ func (a *GeneralApi) ScheduleAccountUpdater(ctx context.Context, r GeneralApiScheduleAccountUpdaterInput) (ScheduleAccountUpdaterResult, *http.Response, error) { res := &ScheduleAccountUpdaterResult{} diff --git a/src/recurring/model_recurring.go b/src/recurring/model_recurring.go index 7b665cfd1..33b2fce7e 100644 --- a/src/recurring/model_recurring.go +++ b/src/recurring/model_recurring.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &Recurring{} // Recurring struct for Recurring type Recurring struct { - // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). + // The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). * `EXTERNAL` - Use this when you store payment details and send the raw card number or network token directly in your API request. Contract *string `json:"contract,omitempty"` // A descriptive name for this detail. RecurringDetailName *string `json:"recurringDetailName,omitempty"` @@ -274,7 +274,7 @@ func (v *NullableRecurring) UnmarshalJSON(src []byte) error { } func (o *Recurring) isValidContract() bool { - var allowedEnumValues = []string{"ONECLICK", "RECURRING", "PAYOUT"} + var allowedEnumValues = []string{"ONECLICK", "ONECLICK,RECURRING", "RECURRING", "PAYOUT", "EXTERNAL"} for _, allowed := range allowedEnumValues { if o.GetContract() == allowed { return true