diff --git a/Makefile b/Makefile index a7b66d2dd..b29149b96 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,8 @@ $(services): schema $(openapi-generator-jar) $(goimports) --global-property modelDocs=false \ --skip-validate-spec \ --enable-post-process-file \ - --inline-schema-name-mappings PaymentDonationRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings PaymentRequest_paymentMethod=CheckoutPaymentMethod \ + --inline-schema-name-mappings DonationPaymentRequest_paymentMethod=DonationPaymentMethod \ --additional-properties=serviceName=$(serviceName) \ --additional-properties=$(if $(hasRestServiceError),hasRestServiceError=true) rm -rf $(output)/$(@)/go.{mod,sum} diff --git a/src/checkout/api_modifications.go b/src/checkout/api_modifications.go index b418a40e1..6782d7ba0 100644 --- a/src/checkout/api_modifications.go +++ b/src/checkout/api_modifications.go @@ -22,8 +22,8 @@ type ModificationsApi common.Service // All parameters accepted by ModificationsApi.CancelAuthorisedPayment type ModificationsApiCancelAuthorisedPaymentInput struct { - idempotencyKey *string - createStandalonePaymentCancelRequest *CreateStandalonePaymentCancelRequest + idempotencyKey *string + standalonePaymentCancelRequest *StandalonePaymentCancelRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -32,8 +32,8 @@ func (r ModificationsApiCancelAuthorisedPaymentInput) IdempotencyKey(idempotency return r } -func (r ModificationsApiCancelAuthorisedPaymentInput) CreateStandalonePaymentCancelRequest(createStandalonePaymentCancelRequest CreateStandalonePaymentCancelRequest) ModificationsApiCancelAuthorisedPaymentInput { - r.createStandalonePaymentCancelRequest = &createStandalonePaymentCancelRequest +func (r ModificationsApiCancelAuthorisedPaymentInput) StandalonePaymentCancelRequest(standalonePaymentCancelRequest StandalonePaymentCancelRequest) ModificationsApiCancelAuthorisedPaymentInput { + r.standalonePaymentCancelRequest = &standalonePaymentCancelRequest return r } @@ -59,10 +59,10 @@ For more information, refer to [Cancel](https://docs.adyen.com/online-payments/c @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiCancelAuthorisedPaymentInput - Request parameters, see CancelAuthorisedPaymentInput -@return StandalonePaymentCancelResource, *http.Response, error +@return StandalonePaymentCancelResponse, *http.Response, error */ -func (a *ModificationsApi) CancelAuthorisedPayment(ctx context.Context, r ModificationsApiCancelAuthorisedPaymentInput) (StandalonePaymentCancelResource, *http.Response, error) { - res := &StandalonePaymentCancelResource{} +func (a *ModificationsApi) CancelAuthorisedPayment(ctx context.Context, r ModificationsApiCancelAuthorisedPaymentInput) (StandalonePaymentCancelResponse, *http.Response, error) { + res := &StandalonePaymentCancelResponse{} path := "/cancels" queryParams := url.Values{} headerParams := make(map[string]string) @@ -72,7 +72,7 @@ func (a *ModificationsApi) CancelAuthorisedPayment(ctx context.Context, r Modifi httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createStandalonePaymentCancelRequest, + r.standalonePaymentCancelRequest, res, http.MethodPost, a.BasePath()+path, @@ -85,9 +85,9 @@ func (a *ModificationsApi) CancelAuthorisedPayment(ctx context.Context, r Modifi // All parameters accepted by ModificationsApi.CancelAuthorisedPaymentByPspReference type ModificationsApiCancelAuthorisedPaymentByPspReferenceInput struct { - paymentPspReference string - idempotencyKey *string - createPaymentCancelRequest *CreatePaymentCancelRequest + paymentPspReference string + idempotencyKey *string + paymentCancelRequest *PaymentCancelRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -96,8 +96,8 @@ func (r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) IdempotencyK return r } -func (r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) CreatePaymentCancelRequest(createPaymentCancelRequest CreatePaymentCancelRequest) ModificationsApiCancelAuthorisedPaymentByPspReferenceInput { - r.createPaymentCancelRequest = &createPaymentCancelRequest +func (r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) PaymentCancelRequest(paymentCancelRequest PaymentCancelRequest) ModificationsApiCancelAuthorisedPaymentByPspReferenceInput { + r.paymentCancelRequest = &paymentCancelRequest return r } @@ -125,10 +125,10 @@ For more information, refer to [Cancel](https://docs.adyen.com/online-payments/c @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput - Request parameters, see CancelAuthorisedPaymentByPspReferenceInput -@return PaymentCancelResource, *http.Response, error +@return PaymentCancelResponse, *http.Response, error */ -func (a *ModificationsApi) CancelAuthorisedPaymentByPspReference(ctx context.Context, r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) (PaymentCancelResource, *http.Response, error) { - res := &PaymentCancelResource{} +func (a *ModificationsApi) CancelAuthorisedPaymentByPspReference(ctx context.Context, r ModificationsApiCancelAuthorisedPaymentByPspReferenceInput) (PaymentCancelResponse, *http.Response, error) { + res := &PaymentCancelResponse{} path := "/payments/{paymentPspReference}/cancels" path = strings.Replace(path, "{"+"paymentPspReference"+"}", url.PathEscape(common.ParameterValueToString(r.paymentPspReference, "paymentPspReference")), -1) queryParams := url.Values{} @@ -139,7 +139,7 @@ func (a *ModificationsApi) CancelAuthorisedPaymentByPspReference(ctx context.Con httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentCancelRequest, + r.paymentCancelRequest, res, http.MethodPost, a.BasePath()+path, @@ -152,9 +152,9 @@ func (a *ModificationsApi) CancelAuthorisedPaymentByPspReference(ctx context.Con // All parameters accepted by ModificationsApi.CaptureAuthorisedPayment type ModificationsApiCaptureAuthorisedPaymentInput struct { - paymentPspReference string - idempotencyKey *string - createPaymentCaptureRequest *CreatePaymentCaptureRequest + paymentPspReference string + idempotencyKey *string + paymentCaptureRequest *PaymentCaptureRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -163,8 +163,8 @@ func (r ModificationsApiCaptureAuthorisedPaymentInput) IdempotencyKey(idempotenc return r } -func (r ModificationsApiCaptureAuthorisedPaymentInput) CreatePaymentCaptureRequest(createPaymentCaptureRequest CreatePaymentCaptureRequest) ModificationsApiCaptureAuthorisedPaymentInput { - r.createPaymentCaptureRequest = &createPaymentCaptureRequest +func (r ModificationsApiCaptureAuthorisedPaymentInput) PaymentCaptureRequest(paymentCaptureRequest PaymentCaptureRequest) ModificationsApiCaptureAuthorisedPaymentInput { + r.paymentCaptureRequest = &paymentCaptureRequest return r } @@ -192,10 +192,10 @@ For more information, refer to [Capture](https://docs.adyen.com/online-payments/ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiCaptureAuthorisedPaymentInput - Request parameters, see CaptureAuthorisedPaymentInput -@return PaymentCaptureResource, *http.Response, error +@return PaymentCaptureResponse, *http.Response, error */ -func (a *ModificationsApi) CaptureAuthorisedPayment(ctx context.Context, r ModificationsApiCaptureAuthorisedPaymentInput) (PaymentCaptureResource, *http.Response, error) { - res := &PaymentCaptureResource{} +func (a *ModificationsApi) CaptureAuthorisedPayment(ctx context.Context, r ModificationsApiCaptureAuthorisedPaymentInput) (PaymentCaptureResponse, *http.Response, error) { + res := &PaymentCaptureResponse{} path := "/payments/{paymentPspReference}/captures" path = strings.Replace(path, "{"+"paymentPspReference"+"}", url.PathEscape(common.ParameterValueToString(r.paymentPspReference, "paymentPspReference")), -1) queryParams := url.Values{} @@ -206,7 +206,7 @@ func (a *ModificationsApi) CaptureAuthorisedPayment(ctx context.Context, r Modif httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentCaptureRequest, + r.paymentCaptureRequest, res, http.MethodPost, a.BasePath()+path, @@ -219,9 +219,9 @@ func (a *ModificationsApi) CaptureAuthorisedPayment(ctx context.Context, r Modif // All parameters accepted by ModificationsApi.RefundCapturedPayment type ModificationsApiRefundCapturedPaymentInput struct { - paymentPspReference string - idempotencyKey *string - createPaymentRefundRequest *CreatePaymentRefundRequest + paymentPspReference string + idempotencyKey *string + paymentRefundRequest *PaymentRefundRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -230,8 +230,8 @@ func (r ModificationsApiRefundCapturedPaymentInput) IdempotencyKey(idempotencyKe return r } -func (r ModificationsApiRefundCapturedPaymentInput) CreatePaymentRefundRequest(createPaymentRefundRequest CreatePaymentRefundRequest) ModificationsApiRefundCapturedPaymentInput { - r.createPaymentRefundRequest = &createPaymentRefundRequest +func (r ModificationsApiRefundCapturedPaymentInput) PaymentRefundRequest(paymentRefundRequest PaymentRefundRequest) ModificationsApiRefundCapturedPaymentInput { + r.paymentRefundRequest = &paymentRefundRequest return r } @@ -261,10 +261,10 @@ For more information, refer to [Refund](https://docs.adyen.com/online-payments/r @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiRefundCapturedPaymentInput - Request parameters, see RefundCapturedPaymentInput -@return PaymentRefundResource, *http.Response, error +@return PaymentRefundResponse, *http.Response, error */ -func (a *ModificationsApi) RefundCapturedPayment(ctx context.Context, r ModificationsApiRefundCapturedPaymentInput) (PaymentRefundResource, *http.Response, error) { - res := &PaymentRefundResource{} +func (a *ModificationsApi) RefundCapturedPayment(ctx context.Context, r ModificationsApiRefundCapturedPaymentInput) (PaymentRefundResponse, *http.Response, error) { + res := &PaymentRefundResponse{} path := "/payments/{paymentPspReference}/refunds" path = strings.Replace(path, "{"+"paymentPspReference"+"}", url.PathEscape(common.ParameterValueToString(r.paymentPspReference, "paymentPspReference")), -1) queryParams := url.Values{} @@ -275,7 +275,7 @@ func (a *ModificationsApi) RefundCapturedPayment(ctx context.Context, r Modifica httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentRefundRequest, + r.paymentRefundRequest, res, http.MethodPost, a.BasePath()+path, @@ -288,9 +288,9 @@ func (a *ModificationsApi) RefundCapturedPayment(ctx context.Context, r Modifica // All parameters accepted by ModificationsApi.RefundOrCancelPayment type ModificationsApiRefundOrCancelPaymentInput struct { - paymentPspReference string - idempotencyKey *string - createPaymentReversalRequest *CreatePaymentReversalRequest + paymentPspReference string + idempotencyKey *string + paymentReversalRequest *PaymentReversalRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -299,8 +299,8 @@ func (r ModificationsApiRefundOrCancelPaymentInput) IdempotencyKey(idempotencyKe return r } -func (r ModificationsApiRefundOrCancelPaymentInput) CreatePaymentReversalRequest(createPaymentReversalRequest CreatePaymentReversalRequest) ModificationsApiRefundOrCancelPaymentInput { - r.createPaymentReversalRequest = &createPaymentReversalRequest +func (r ModificationsApiRefundOrCancelPaymentInput) PaymentReversalRequest(paymentReversalRequest PaymentReversalRequest) ModificationsApiRefundOrCancelPaymentInput { + r.paymentReversalRequest = &paymentReversalRequest return r } @@ -327,10 +327,10 @@ For more information, refer to [Reversal](https://docs.adyen.com/online-payments @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiRefundOrCancelPaymentInput - Request parameters, see RefundOrCancelPaymentInput -@return PaymentReversalResource, *http.Response, error +@return PaymentReversalResponse, *http.Response, error */ -func (a *ModificationsApi) RefundOrCancelPayment(ctx context.Context, r ModificationsApiRefundOrCancelPaymentInput) (PaymentReversalResource, *http.Response, error) { - res := &PaymentReversalResource{} +func (a *ModificationsApi) RefundOrCancelPayment(ctx context.Context, r ModificationsApiRefundOrCancelPaymentInput) (PaymentReversalResponse, *http.Response, error) { + res := &PaymentReversalResponse{} path := "/payments/{paymentPspReference}/reversals" path = strings.Replace(path, "{"+"paymentPspReference"+"}", url.PathEscape(common.ParameterValueToString(r.paymentPspReference, "paymentPspReference")), -1) queryParams := url.Values{} @@ -341,7 +341,7 @@ func (a *ModificationsApi) RefundOrCancelPayment(ctx context.Context, r Modifica httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentReversalRequest, + r.paymentReversalRequest, res, http.MethodPost, a.BasePath()+path, @@ -354,9 +354,9 @@ func (a *ModificationsApi) RefundOrCancelPayment(ctx context.Context, r Modifica // All parameters accepted by ModificationsApi.UpdateAuthorisedAmount type ModificationsApiUpdateAuthorisedAmountInput struct { - paymentPspReference string - idempotencyKey *string - createPaymentAmountUpdateRequest *CreatePaymentAmountUpdateRequest + paymentPspReference string + idempotencyKey *string + paymentAmountUpdateRequest *PaymentAmountUpdateRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -365,8 +365,8 @@ func (r ModificationsApiUpdateAuthorisedAmountInput) IdempotencyKey(idempotencyK return r } -func (r ModificationsApiUpdateAuthorisedAmountInput) CreatePaymentAmountUpdateRequest(createPaymentAmountUpdateRequest CreatePaymentAmountUpdateRequest) ModificationsApiUpdateAuthorisedAmountInput { - r.createPaymentAmountUpdateRequest = &createPaymentAmountUpdateRequest +func (r ModificationsApiUpdateAuthorisedAmountInput) PaymentAmountUpdateRequest(paymentAmountUpdateRequest PaymentAmountUpdateRequest) ModificationsApiUpdateAuthorisedAmountInput { + r.paymentAmountUpdateRequest = &paymentAmountUpdateRequest return r } @@ -394,10 +394,10 @@ For more information, refer to [Authorisation adjustment](https://docs.adyen.com @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiUpdateAuthorisedAmountInput - Request parameters, see UpdateAuthorisedAmountInput -@return PaymentAmountUpdateResource, *http.Response, error +@return PaymentAmountUpdateResponse, *http.Response, error */ -func (a *ModificationsApi) UpdateAuthorisedAmount(ctx context.Context, r ModificationsApiUpdateAuthorisedAmountInput) (PaymentAmountUpdateResource, *http.Response, error) { - res := &PaymentAmountUpdateResource{} +func (a *ModificationsApi) UpdateAuthorisedAmount(ctx context.Context, r ModificationsApiUpdateAuthorisedAmountInput) (PaymentAmountUpdateResponse, *http.Response, error) { + res := &PaymentAmountUpdateResponse{} path := "/payments/{paymentPspReference}/amountUpdates" path = strings.Replace(path, "{"+"paymentPspReference"+"}", url.PathEscape(common.ParameterValueToString(r.paymentPspReference, "paymentPspReference")), -1) queryParams := url.Values{} @@ -408,7 +408,7 @@ func (a *ModificationsApi) UpdateAuthorisedAmount(ctx context.Context, r Modific httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentAmountUpdateRequest, + r.paymentAmountUpdateRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/api_orders.go b/src/checkout/api_orders.go index 19a2216b2..adb16656c 100644 --- a/src/checkout/api_orders.go +++ b/src/checkout/api_orders.go @@ -21,8 +21,8 @@ type OrdersApi common.Service // All parameters accepted by OrdersApi.CancelOrder type OrdersApiCancelOrderInput struct { - idempotencyKey *string - checkoutCancelOrderRequest *CheckoutCancelOrderRequest + idempotencyKey *string + cancelOrderRequest *CancelOrderRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -31,8 +31,8 @@ func (r OrdersApiCancelOrderInput) IdempotencyKey(idempotencyKey string) OrdersA return r } -func (r OrdersApiCancelOrderInput) CheckoutCancelOrderRequest(checkoutCancelOrderRequest CheckoutCancelOrderRequest) OrdersApiCancelOrderInput { - r.checkoutCancelOrderRequest = &checkoutCancelOrderRequest +func (r OrdersApiCancelOrderInput) CancelOrderRequest(cancelOrderRequest CancelOrderRequest) OrdersApiCancelOrderInput { + r.cancelOrderRequest = &cancelOrderRequest return r } @@ -52,10 +52,10 @@ Cancels an order. Cancellation of an order results in an automatic rollback of a @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r OrdersApiCancelOrderInput - Request parameters, see CancelOrderInput -@return CheckoutCancelOrderResponse, *http.Response, error +@return CancelOrderResponse, *http.Response, error */ -func (a *OrdersApi) CancelOrder(ctx context.Context, r OrdersApiCancelOrderInput) (CheckoutCancelOrderResponse, *http.Response, error) { - res := &CheckoutCancelOrderResponse{} +func (a *OrdersApi) CancelOrder(ctx context.Context, r OrdersApiCancelOrderInput) (CancelOrderResponse, *http.Response, error) { + res := &CancelOrderResponse{} path := "/orders/cancel" queryParams := url.Values{} headerParams := make(map[string]string) @@ -65,7 +65,7 @@ func (a *OrdersApi) CancelOrder(ctx context.Context, r OrdersApiCancelOrderInput httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.checkoutCancelOrderRequest, + r.cancelOrderRequest, res, http.MethodPost, a.BasePath()+path, @@ -78,8 +78,8 @@ func (a *OrdersApi) CancelOrder(ctx context.Context, r OrdersApiCancelOrderInput // All parameters accepted by OrdersApi.GetBalanceOfGiftCard type OrdersApiGetBalanceOfGiftCardInput struct { - idempotencyKey *string - checkoutBalanceCheckRequest *CheckoutBalanceCheckRequest + idempotencyKey *string + balanceCheckRequest *BalanceCheckRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -88,8 +88,8 @@ func (r OrdersApiGetBalanceOfGiftCardInput) IdempotencyKey(idempotencyKey string return r } -func (r OrdersApiGetBalanceOfGiftCardInput) CheckoutBalanceCheckRequest(checkoutBalanceCheckRequest CheckoutBalanceCheckRequest) OrdersApiGetBalanceOfGiftCardInput { - r.checkoutBalanceCheckRequest = &checkoutBalanceCheckRequest +func (r OrdersApiGetBalanceOfGiftCardInput) BalanceCheckRequest(balanceCheckRequest BalanceCheckRequest) OrdersApiGetBalanceOfGiftCardInput { + r.balanceCheckRequest = &balanceCheckRequest return r } @@ -109,10 +109,10 @@ Retrieves the balance remaining on a shopper's gift card. To check a gift card's @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r OrdersApiGetBalanceOfGiftCardInput - Request parameters, see GetBalanceOfGiftCardInput -@return CheckoutBalanceCheckResponse, *http.Response, error +@return BalanceCheckResponse, *http.Response, error */ -func (a *OrdersApi) GetBalanceOfGiftCard(ctx context.Context, r OrdersApiGetBalanceOfGiftCardInput) (CheckoutBalanceCheckResponse, *http.Response, error) { - res := &CheckoutBalanceCheckResponse{} +func (a *OrdersApi) GetBalanceOfGiftCard(ctx context.Context, r OrdersApiGetBalanceOfGiftCardInput) (BalanceCheckResponse, *http.Response, error) { + res := &BalanceCheckResponse{} path := "/paymentMethods/balance" queryParams := url.Values{} headerParams := make(map[string]string) @@ -122,7 +122,7 @@ func (a *OrdersApi) GetBalanceOfGiftCard(ctx context.Context, r OrdersApiGetBala httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.checkoutBalanceCheckRequest, + r.balanceCheckRequest, res, http.MethodPost, a.BasePath()+path, @@ -135,8 +135,8 @@ func (a *OrdersApi) GetBalanceOfGiftCard(ctx context.Context, r OrdersApiGetBala // All parameters accepted by OrdersApi.Orders type OrdersApiOrdersInput struct { - idempotencyKey *string - checkoutCreateOrderRequest *CheckoutCreateOrderRequest + idempotencyKey *string + createOrderRequest *CreateOrderRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -145,8 +145,8 @@ func (r OrdersApiOrdersInput) IdempotencyKey(idempotencyKey string) OrdersApiOrd return r } -func (r OrdersApiOrdersInput) CheckoutCreateOrderRequest(checkoutCreateOrderRequest CheckoutCreateOrderRequest) OrdersApiOrdersInput { - r.checkoutCreateOrderRequest = &checkoutCreateOrderRequest +func (r OrdersApiOrdersInput) CreateOrderRequest(createOrderRequest CreateOrderRequest) OrdersApiOrdersInput { + r.createOrderRequest = &createOrderRequest return r } @@ -166,10 +166,10 @@ Creates an order to be used for partial payments. Make a POST `/orders` call bef @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r OrdersApiOrdersInput - Request parameters, see OrdersInput -@return CheckoutCreateOrderResponse, *http.Response, error +@return CreateOrderResponse, *http.Response, error */ -func (a *OrdersApi) Orders(ctx context.Context, r OrdersApiOrdersInput) (CheckoutCreateOrderResponse, *http.Response, error) { - res := &CheckoutCreateOrderResponse{} +func (a *OrdersApi) Orders(ctx context.Context, r OrdersApiOrdersInput) (CreateOrderResponse, *http.Response, error) { + res := &CreateOrderResponse{} path := "/orders" queryParams := url.Values{} headerParams := make(map[string]string) @@ -179,7 +179,7 @@ func (a *OrdersApi) Orders(ctx context.Context, r OrdersApiOrdersInput) (Checkou httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.checkoutCreateOrderRequest, + r.createOrderRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/api_payment_links.go b/src/checkout/api_payment_links.go index 25d68596b..3c74f91fb 100644 --- a/src/checkout/api_payment_links.go +++ b/src/checkout/api_payment_links.go @@ -67,8 +67,8 @@ func (a *PaymentLinksApi) GetPaymentLink(ctx context.Context, r PaymentLinksApiG // All parameters accepted by PaymentLinksApi.PaymentLinks type PaymentLinksApiPaymentLinksInput struct { - idempotencyKey *string - createPaymentLinkRequest *CreatePaymentLinkRequest + idempotencyKey *string + paymentLinkRequest *PaymentLinkRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -77,8 +77,8 @@ func (r PaymentLinksApiPaymentLinksInput) IdempotencyKey(idempotencyKey string) return r } -func (r PaymentLinksApiPaymentLinksInput) CreatePaymentLinkRequest(createPaymentLinkRequest CreatePaymentLinkRequest) PaymentLinksApiPaymentLinksInput { - r.createPaymentLinkRequest = &createPaymentLinkRequest +func (r PaymentLinksApiPaymentLinksInput) PaymentLinkRequest(paymentLinkRequest PaymentLinkRequest) PaymentLinksApiPaymentLinksInput { + r.paymentLinkRequest = &paymentLinkRequest return r } @@ -113,7 +113,7 @@ func (a *PaymentLinksApi) PaymentLinks(ctx context.Context, r PaymentLinksApiPay httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createPaymentLinkRequest, + r.paymentLinkRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/api_payments.go b/src/checkout/api_payments.go index 6c90b5134..180745258 100644 --- a/src/checkout/api_payments.go +++ b/src/checkout/api_payments.go @@ -12,6 +12,7 @@ import ( "context" "net/http" "net/url" + "strings" "github.com/adyen/adyen-go-api-library/v8/src/common" ) @@ -83,7 +84,7 @@ func (a *PaymentsApi) CardDetails(ctx context.Context, r PaymentsApiCardDetailsI // All parameters accepted by PaymentsApi.Donations type PaymentsApiDonationsInput struct { idempotencyKey *string - paymentDonationRequest *PaymentDonationRequest + donationPaymentRequest *DonationPaymentRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -92,8 +93,8 @@ func (r PaymentsApiDonationsInput) IdempotencyKey(idempotencyKey string) Payment return r } -func (r PaymentsApiDonationsInput) PaymentDonationRequest(paymentDonationRequest PaymentDonationRequest) PaymentsApiDonationsInput { - r.paymentDonationRequest = &paymentDonationRequest +func (r PaymentsApiDonationsInput) DonationPaymentRequest(donationPaymentRequest DonationPaymentRequest) PaymentsApiDonationsInput { + r.donationPaymentRequest = &donationPaymentRequest return r } @@ -115,10 +116,10 @@ For more information, see [Donations](https://docs.adyen.com/online-payments/don @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentsApiDonationsInput - Request parameters, see DonationsInput -@return DonationResponse, *http.Response, error +@return DonationPaymentResponse, *http.Response, error */ -func (a *PaymentsApi) Donations(ctx context.Context, r PaymentsApiDonationsInput) (DonationResponse, *http.Response, error) { - res := &DonationResponse{} +func (a *PaymentsApi) Donations(ctx context.Context, r PaymentsApiDonationsInput) (DonationPaymentResponse, *http.Response, error) { + res := &DonationPaymentResponse{} path := "/donations" queryParams := url.Values{} headerParams := make(map[string]string) @@ -128,7 +129,7 @@ func (a *PaymentsApi) Donations(ctx context.Context, r PaymentsApiDonationsInput httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.paymentDonationRequest, + r.donationPaymentRequest, res, http.MethodPost, a.BasePath()+path, @@ -139,6 +140,61 @@ func (a *PaymentsApi) Donations(ctx context.Context, r PaymentsApiDonationsInput return *res, httpRes, err } +// All parameters accepted by PaymentsApi.GetResultOfPaymentSession +type PaymentsApiGetResultOfPaymentSessionInput struct { + sessionId string + sessionResult *string +} + +// The `sessionResult` value from the Drop-in or Component. +func (r PaymentsApiGetResultOfPaymentSessionInput) SessionResult(sessionResult string) PaymentsApiGetResultOfPaymentSessionInput { + r.sessionResult = &sessionResult + return r +} + +/* +Prepare a request for GetResultOfPaymentSession +@param sessionId A unique identifier of the session. +@return PaymentsApiGetResultOfPaymentSessionInput +*/ +func (a *PaymentsApi) GetResultOfPaymentSessionInput(sessionId string) PaymentsApiGetResultOfPaymentSessionInput { + return PaymentsApiGetResultOfPaymentSessionInput{ + sessionId: sessionId, + } +} + +/* +GetResultOfPaymentSession Get the result of a payment session + +Returns the status of the payment session with the `sessionId` and `sessionResult` specified in the path. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r PaymentsApiGetResultOfPaymentSessionInput - Request parameters, see GetResultOfPaymentSessionInput +@return SessionResultResponse, *http.Response, error +*/ +func (a *PaymentsApi) GetResultOfPaymentSession(ctx context.Context, r PaymentsApiGetResultOfPaymentSessionInput) (SessionResultResponse, *http.Response, error) { + res := &SessionResultResponse{} + path := "/sessions/{sessionId}" + path = strings.Replace(path, "{"+"sessionId"+"}", url.PathEscape(common.ParameterValueToString(r.sessionId, "sessionId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.sessionResult != nil { + common.ParameterAddToQuery(queryParams, "sessionResult", r.sessionResult, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} + // All parameters accepted by PaymentsApi.PaymentMethods type PaymentsApiPaymentMethodsInput struct { idempotencyKey *string @@ -260,8 +316,8 @@ func (a *PaymentsApi) Payments(ctx context.Context, r PaymentsApiPaymentsInput) // All parameters accepted by PaymentsApi.PaymentsDetails type PaymentsApiPaymentsDetailsInput struct { - idempotencyKey *string - detailsRequest *DetailsRequest + idempotencyKey *string + paymentDetailsRequest *PaymentDetailsRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -270,8 +326,8 @@ func (r PaymentsApiPaymentsDetailsInput) IdempotencyKey(idempotencyKey string) P return r } -func (r PaymentsApiPaymentsDetailsInput) DetailsRequest(detailsRequest DetailsRequest) PaymentsApiPaymentsDetailsInput { - r.detailsRequest = &detailsRequest +func (r PaymentsApiPaymentsDetailsInput) PaymentDetailsRequest(paymentDetailsRequest PaymentDetailsRequest) PaymentsApiPaymentsDetailsInput { + r.paymentDetailsRequest = &paymentDetailsRequest return r } @@ -306,7 +362,7 @@ func (a *PaymentsApi) PaymentsDetails(ctx context.Context, r PaymentsApiPayments httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.detailsRequest, + r.paymentDetailsRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/api_recurring.go b/src/checkout/api_recurring.go index c4017a48d..3344a221e 100644 --- a/src/checkout/api_recurring.go +++ b/src/checkout/api_recurring.go @@ -22,9 +22,9 @@ type RecurringApi common.Service // All parameters accepted by RecurringApi.DeleteTokenForStoredPaymentDetails type RecurringApiDeleteTokenForStoredPaymentDetailsInput struct { - recurringId string - shopperReference *string - merchantAccount *string + storedPaymentMethodId string + shopperReference *string + merchantAccount *string } // 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. @@ -41,12 +41,12 @@ func (r RecurringApiDeleteTokenForStoredPaymentDetailsInput) MerchantAccount(mer /* Prepare a request for DeleteTokenForStoredPaymentDetails -@param recurringId The unique identifier of the token. +@param storedPaymentMethodId The unique identifier of the token. @return RecurringApiDeleteTokenForStoredPaymentDetailsInput */ -func (a *RecurringApi) DeleteTokenForStoredPaymentDetailsInput(recurringId string) RecurringApiDeleteTokenForStoredPaymentDetailsInput { +func (a *RecurringApi) DeleteTokenForStoredPaymentDetailsInput(storedPaymentMethodId string) RecurringApiDeleteTokenForStoredPaymentDetailsInput { return RecurringApiDeleteTokenForStoredPaymentDetailsInput{ - recurringId: recurringId, + storedPaymentMethodId: storedPaymentMethodId, } } @@ -57,12 +57,12 @@ Deletes the token identified in the path. The token can no longer be used with p @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r RecurringApiDeleteTokenForStoredPaymentDetailsInput - Request parameters, see DeleteTokenForStoredPaymentDetailsInput -@return StoredPaymentMethodResource, *http.Response, error +@return *http.Response, error */ -func (a *RecurringApi) DeleteTokenForStoredPaymentDetails(ctx context.Context, r RecurringApiDeleteTokenForStoredPaymentDetailsInput) (StoredPaymentMethodResource, *http.Response, error) { - res := &StoredPaymentMethodResource{} - path := "/storedPaymentMethods/{recurringId}" - path = strings.Replace(path, "{"+"recurringId"+"}", url.PathEscape(common.ParameterValueToString(r.recurringId, "recurringId")), -1) +func (a *RecurringApi) DeleteTokenForStoredPaymentDetails(ctx context.Context, r RecurringApiDeleteTokenForStoredPaymentDetailsInput) (*http.Response, error) { + var res interface{} + path := "/storedPaymentMethods/{storedPaymentMethodId}" + path = strings.Replace(path, "{"+"storedPaymentMethodId"+"}", url.PathEscape(common.ParameterValueToString(r.storedPaymentMethodId, "storedPaymentMethodId")), -1) queryParams := url.Values{} headerParams := make(map[string]string) if r.shopperReference != nil { @@ -82,7 +82,7 @@ func (a *RecurringApi) DeleteTokenForStoredPaymentDetails(ctx context.Context, r headerParams, ) - return *res, httpRes, err + return httpRes, err } // All parameters accepted by RecurringApi.GetTokensForStoredPaymentDetails diff --git a/src/checkout/api_utility.go b/src/checkout/api_utility.go index d38e43925..ca8f91d74 100644 --- a/src/checkout/api_utility.go +++ b/src/checkout/api_utility.go @@ -21,8 +21,8 @@ type UtilityApi common.Service // All parameters accepted by UtilityApi.GetApplePaySession type UtilityApiGetApplePaySessionInput struct { - idempotencyKey *string - createApplePaySessionRequest *CreateApplePaySessionRequest + idempotencyKey *string + applePaySessionRequest *ApplePaySessionRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -31,8 +31,8 @@ func (r UtilityApiGetApplePaySessionInput) IdempotencyKey(idempotencyKey string) return r } -func (r UtilityApiGetApplePaySessionInput) CreateApplePaySessionRequest(createApplePaySessionRequest CreateApplePaySessionRequest) UtilityApiGetApplePaySessionInput { - r.createApplePaySessionRequest = &createApplePaySessionRequest +func (r UtilityApiGetApplePaySessionInput) ApplePaySessionRequest(applePaySessionRequest ApplePaySessionRequest) UtilityApiGetApplePaySessionInput { + r.applePaySessionRequest = &applePaySessionRequest return r } @@ -67,7 +67,7 @@ func (a *UtilityApi) GetApplePaySession(ctx context.Context, r UtilityApiGetAppl httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.createApplePaySessionRequest, + r.applePaySessionRequest, res, http.MethodPost, a.BasePath()+path, @@ -80,8 +80,8 @@ func (a *UtilityApi) GetApplePaySession(ctx context.Context, r UtilityApiGetAppl // All parameters accepted by UtilityApi.OriginKeys type UtilityApiOriginKeysInput struct { - idempotencyKey *string - checkoutUtilityRequest *CheckoutUtilityRequest + idempotencyKey *string + utilityRequest *UtilityRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -90,8 +90,8 @@ func (r UtilityApiOriginKeysInput) IdempotencyKey(idempotencyKey string) Utility return r } -func (r UtilityApiOriginKeysInput) CheckoutUtilityRequest(checkoutUtilityRequest CheckoutUtilityRequest) UtilityApiOriginKeysInput { - r.checkoutUtilityRequest = &checkoutUtilityRequest +func (r UtilityApiOriginKeysInput) UtilityRequest(utilityRequest UtilityRequest) UtilityApiOriginKeysInput { + r.utilityRequest = &utilityRequest return r } @@ -114,12 +114,12 @@ This operation takes the origin domains and returns a JSON object containing the @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UtilityApiOriginKeysInput - Request parameters, see OriginKeysInput -@return CheckoutUtilityResponse, *http.Response, error +@return UtilityResponse, *http.Response, error Deprecated */ -func (a *UtilityApi) OriginKeys(ctx context.Context, r UtilityApiOriginKeysInput) (CheckoutUtilityResponse, *http.Response, error) { - res := &CheckoutUtilityResponse{} +func (a *UtilityApi) OriginKeys(ctx context.Context, r UtilityApiOriginKeysInput) (UtilityResponse, *http.Response, error) { + res := &UtilityResponse{} path := "/originKeys" queryParams := url.Values{} headerParams := make(map[string]string) @@ -129,7 +129,7 @@ func (a *UtilityApi) OriginKeys(ctx context.Context, r UtilityApiOriginKeysInput httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.checkoutUtilityRequest, + r.utilityRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/model_ach_details.go b/src/checkout/model_ach_details.go index 6a5347874..322f8cf2a 100644 --- a/src/checkout/model_ach_details.go +++ b/src/checkout/model_ach_details.go @@ -21,6 +21,8 @@ var _ common.MappedNullable = &AchDetails{} type AchDetails struct { // The bank account number (without separators). BankAccountNumber string `json:"bankAccountNumber"` + // The bank account type (checking, savings...). + BankAccountType *string `json:"bankAccountType,omitempty"` // The bank routing number of the account. The field value is `nil` in most cases. BankLocationId *string `json:"bankLocationId,omitempty"` // The checkout attempt identifier. @@ -86,6 +88,38 @@ func (o *AchDetails) SetBankAccountNumber(v string) { o.BankAccountNumber = v } +// GetBankAccountType returns the BankAccountType field value if set, zero value otherwise. +func (o *AchDetails) GetBankAccountType() string { + if o == nil || common.IsNil(o.BankAccountType) { + var ret string + return ret + } + return *o.BankAccountType +} + +// GetBankAccountTypeOk returns a tuple with the BankAccountType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AchDetails) GetBankAccountTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.BankAccountType) { + return nil, false + } + return o.BankAccountType, true +} + +// HasBankAccountType returns a boolean if a field has been set. +func (o *AchDetails) HasBankAccountType() bool { + if o != nil && !common.IsNil(o.BankAccountType) { + return true + } + + return false +} + +// SetBankAccountType gets a reference to the given string and assigns it to the BankAccountType field. +func (o *AchDetails) SetBankAccountType(v string) { + o.BankAccountType = &v +} + // GetBankLocationId returns the BankLocationId field value if set, zero value otherwise. func (o *AchDetails) GetBankLocationId() string { if o == nil || common.IsNil(o.BankLocationId) { @@ -356,6 +390,9 @@ func (o AchDetails) MarshalJSON() ([]byte, error) { func (o AchDetails) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["bankAccountNumber"] = o.BankAccountNumber + if !common.IsNil(o.BankAccountType) { + toSerialize["bankAccountType"] = o.BankAccountType + } if !common.IsNil(o.BankLocationId) { toSerialize["bankLocationId"] = o.BankLocationId } @@ -419,6 +456,15 @@ func (v *NullableAchDetails) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *AchDetails) isValidBankAccountType() bool { + var allowedEnumValues = []string{"balance", "checking", "deposit", "general", "other", "payment", "savings"} + for _, allowed := range allowedEnumValues { + if o.GetBankAccountType() == allowed { + return true + } + } + return false +} func (o *AchDetails) isValidType() bool { var allowedEnumValues = []string{"ach", "ach_plaid"} for _, allowed := range allowedEnumValues { diff --git a/src/checkout/model_additional_data_airline.go b/src/checkout/model_additional_data_airline.go index eed9f34c4..8d6fde8d8 100644 --- a/src/checkout/model_additional_data_airline.go +++ b/src/checkout/model_additional_data_airline.go @@ -23,9 +23,9 @@ type AdditionalDataAirline struct { AirlineAgencyInvoiceNumber *string `json:"airline.agency_invoice_number,omitempty"` // The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters AirlineAgencyPlanName *string `json:"airline.agency_plan_name,omitempty"` - // The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + // The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. AirlineAirlineCode *string `json:"airline.airline_code,omitempty"` - // The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + // The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. AirlineAirlineDesignatorCode *string `json:"airline.airline_designator_code,omitempty"` // The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters AirlineBoardingFee *string `json:"airline.boarding_fee,omitempty"` @@ -37,21 +37,21 @@ type AdditionalDataAirline struct { AirlineDocumentType *string `json:"airline.document_type,omitempty"` // The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters AirlineFlightDate *string `json:"airline.flight_date,omitempty"` - // The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros + // The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces *Must not be all zeros. AirlineLegCarrierCode *string `json:"airline.leg.carrier_code,omitempty"` - // A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros + // A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces *Must not be all zeros. AirlineLegClassOfTravel *string `json:"airline.leg.class_of_travel,omitempty"` // Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters AirlineLegDateOfTravel *string `json:"airline.leg.date_of_travel,omitempty"` - // The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros + // The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces *Must not be all zeros. AirlineLegDepartAirport *string `json:"airline.leg.depart_airport,omitempty"` - // The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros + // The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 *Must not be all zeros. 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 + // 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: 6 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 + // 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"` // A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character AirlineLegStopOverCode *string `json:"airline.leg.stop_over_code,omitempty"` @@ -65,15 +65,15 @@ type AdditionalDataAirline struct { AirlinePassengerTelephoneNumber *string `json:"airline.passenger.telephone_number,omitempty"` // The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters AirlinePassengerTravellerType *string `json:"airline.passenger.traveller_type,omitempty"` - // The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros + // The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces *Must not be all zeros. AirlinePassengerName string `json:"airline.passenger_name"` // The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters AirlineTicketIssueAddress *string `json:"airline.ticket_issue_address,omitempty"` - // The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros + // The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces *Must not be all zeros. AirlineTicketNumber *string `json:"airline.ticket_number,omitempty"` - // The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros + // The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces *Must not be all zeros. AirlineTravelAgencyCode *string `json:"airline.travel_agency_code,omitempty"` - // The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros + // The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces *Must not be all zeros. AirlineTravelAgencyName *string `json:"airline.travel_agency_name,omitempty"` } diff --git a/src/checkout/model_additional_data_car_rental.go b/src/checkout/model_additional_data_car_rental.go index 734b5f0f2..6437ed896 100644 --- a/src/checkout/model_additional_data_car_rental.go +++ b/src/checkout/model_additional_data_car_rental.go @@ -21,19 +21,19 @@ var _ common.MappedNullable = &AdditionalDataCarRental{} type AdditionalDataCarRental struct { // The pick-up date. * Date format: `yyyyMMdd` CarRentalCheckOutDate *string `json:"carRental.checkOutDate,omitempty"` - // The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + // The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. CarRentalCustomerServiceTollFreeNumber *string `json:"carRental.customerServiceTollFreeNumber,omitempty"` - // Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces + // Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces CarRentalDaysRented *string `json:"carRental.daysRented,omitempty"` // Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 CarRentalFuelCharges *string `json:"carRental.fuelCharges,omitempty"` - // Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces * Must not be all zeros + // Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros. CarRentalInsuranceCharges *string `json:"carRental.insuranceCharges,omitempty"` - // The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + // The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalLocationCity *string `json:"carRental.locationCity,omitempty"` // The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 CarRentalLocationCountry *string `json:"carRental.locationCountry,omitempty"` - // The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces * Must not be all zeros + // The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalLocationStateProvince *string `json:"carRental.locationStateProvince,omitempty"` // Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable CarRentalNoShowIndicator *string `json:"carRental.noShowIndicator,omitempty"` @@ -43,25 +43,25 @@ type AdditionalDataCarRental struct { CarRentalRate *string `json:"carRental.rate,omitempty"` // Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate CarRentalRateIndicator *string `json:"carRental.rateIndicator,omitempty"` - // The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces * Must not be all zeros + // The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalRentalAgreementNumber *string `json:"carRental.rentalAgreementNumber,omitempty"` - // The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces * Must not be all zeros + // The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalRentalClassId *string `json:"carRental.rentalClassId,omitempty"` - // The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces * Must not be all zeros + // The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros. CarRentalRenterName *string `json:"carRental.renterName,omitempty"` - // The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces * Must not be all zeros + // The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalReturnCity *string `json:"carRental.returnCity,omitempty"` // The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 CarRentalReturnCountry *string `json:"carRental.returnCountry,omitempty"` // The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 CarRentalReturnDate *string `json:"carRental.returnDate,omitempty"` - // The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces * Must not be all zeros + // The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalReturnLocationId *string `json:"carRental.returnLocationId,omitempty"` - // The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces * Must not be all zeros + // The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros. CarRentalReturnStateProvince *string `json:"carRental.returnStateProvince,omitempty"` // Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected CarRentalTaxExemptIndicator *string `json:"carRental.taxExemptIndicator,omitempty"` - // Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 2 + // Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4 TravelEntertainmentAuthDataDuration *string `json:"travelEntertainmentAuthData.duration,omitempty"` // Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 TravelEntertainmentAuthDataMarket *string `json:"travelEntertainmentAuthData.market,omitempty"` diff --git a/src/checkout/model_additional_data_level23.go b/src/checkout/model_additional_data_level23.go index 3c1b0b8cb..b6ebf9f9a 100644 --- a/src/checkout/model_additional_data_level23.go +++ b/src/checkout/model_additional_data_level23.go @@ -19,39 +19,39 @@ var _ common.MappedNullable = &AdditionalDataLevel23{} // AdditionalDataLevel23 struct for AdditionalDataLevel23 type AdditionalDataLevel23 struct { - // The customer code, if supplied by a customer. Encoding: ASCII Max length: 25 characters Must not start with a space or be all spaces Must not be all zeros + // The customer code. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces * Must not be all zeros. EnhancedSchemeDataCustomerReference *string `json:"enhancedSchemeData.customerReference,omitempty"` - // The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. Encoding: ASCII Fixed length: 3 characters + // The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters EnhancedSchemeDataDestinationCountryCode *string `json:"enhancedSchemeData.destinationCountryCode,omitempty"` - // The postal code of the destination address. Encoding: ASCII Max length: 10 characters Must not start with a space + // The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space EnhancedSchemeDataDestinationPostalCode *string `json:"enhancedSchemeData.destinationPostalCode,omitempty"` - // Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space + // Destination state or province code. * Encoding: ASCII * Max length: 3 characters * Must not start with a space EnhancedSchemeDataDestinationStateProvinceCode *string `json:"enhancedSchemeData.destinationStateProvinceCode,omitempty"` - // The duty 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 + // The duty 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 EnhancedSchemeDataDutyAmount *string `json:"enhancedSchemeData.dutyAmount,omitempty"` - // The shipping 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 + // The shipping 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 EnhancedSchemeDataFreightAmount *string `json:"enhancedSchemeData.freightAmount,omitempty"` - // The [UNSPC commodity code](https://www.unspsc.org/) of the item. Encoding: ASCII Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + // The [UNSPC commodity code](https://www.unspsc.org/) of the item. * 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 start with a space or be all spaces Must not be all zeros + // A description of the item. * Encoding: ASCII * Max length: 26 characters * 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 + // 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"` - // The product code. Encoding: ASCII. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + // The product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrProductCode *string `json:"enhancedSchemeData.itemDetailLine[itemNr].productCode,omitempty"` - // The number of items. Must be an integer greater than zero. Encoding: Numeric Max length: 12 characters Must not start with a space or be all spaces + // The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces EnhancedSchemeDataItemDetailLineItemNrQuantity *string `json:"enhancedSchemeData.itemDetailLine[itemNr].quantity,omitempty"` - // The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Max length: 12 characters Must not start with a space or be all spaces Must not be all zeros + // The total amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrTotalAmount *string `json:"enhancedSchemeData.itemDetailLine[itemNr].totalAmount,omitempty"` - // The unit of measurement for an item. Encoding: ASCII Max length: 3 characters Must not start with a space or be all spaces Must not be all zeros + // The unit of measurement for an item. * Encoding: ASCII Max length: 3 characters * Must not start with a space or be all spaces * Must not be all zeros. EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure *string `json:"enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure,omitempty"` - // The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00. Encoding: Numeric Max length: 12 characters + // The unit price 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. EnhancedSchemeDataItemDetailLineItemNrUnitPrice *string `json:"enhancedSchemeData.itemDetailLine[itemNr].unitPrice,omitempty"` - // The order date. * Format: `ddMMyy` Encoding: ASCII Max length: 6 characters + // The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters EnhancedSchemeDataOrderDate *string `json:"enhancedSchemeData.orderDate,omitempty"` - // The postal code of the address 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 + // The postal code of the address 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. EnhancedSchemeDataShipFromPostalCode *string `json:"enhancedSchemeData.shipFromPostalCode,omitempty"` - // The total tax 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 + // The total tax 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 * Must not be all zeros. EnhancedSchemeDataTotalTaxAmount *string `json:"enhancedSchemeData.totalTaxAmount,omitempty"` } diff --git a/src/checkout/model_additional_data_lodging.go b/src/checkout/model_additional_data_lodging.go index 40cf96403..3fa00957f 100644 --- a/src/checkout/model_additional_data_lodging.go +++ b/src/checkout/model_additional_data_lodging.go @@ -23,13 +23,13 @@ type AdditionalDataLodging struct { LodgingCheckInDate *string `json:"lodging.checkInDate,omitempty"` // The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. LodgingCheckOutDate *string `json:"lodging.checkOutDate,omitempty"` - // The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + // The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. LodgingCustomerServiceTollFreeNumber *string `json:"lodging.customerServiceTollFreeNumber,omitempty"` // Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character LodgingFireSafetyActIndicator *string `json:"lodging.fireSafetyActIndicator,omitempty"` // The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters LodgingFolioCashAdvances *string `json:"lodging.folioCashAdvances,omitempty"` - // The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space * Must not be all zeros + // The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters. * Must not start with a space *Must not be all zeros. LodgingFolioNumber *string `json:"lodging.folioNumber,omitempty"` // Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters LodgingFoodBeverageCharges *string `json:"lodging.foodBeverageCharges,omitempty"` @@ -37,9 +37,9 @@ type AdditionalDataLodging struct { LodgingNoShowIndicator *string `json:"lodging.noShowIndicator,omitempty"` // The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters LodgingPrepaidExpenses *string `json:"lodging.prepaidExpenses,omitempty"` - // The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not be all zeros * Must not contain any special characters such as + or - + // The lodging property location's phone number. * Format: numeric. * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. LodgingPropertyPhoneNumber *string `json:"lodging.propertyPhoneNumber,omitempty"` - // The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters + // The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters LodgingRoom1NumberOfNights *string `json:"lodging.room1.numberOfNights,omitempty"` // The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number LodgingRoom1Rate *string `json:"lodging.room1.rate,omitempty"` @@ -47,7 +47,7 @@ type AdditionalDataLodging struct { LodgingTotalRoomTax *string `json:"lodging.totalRoomTax,omitempty"` // The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number LodgingTotalTax *string `json:"lodging.totalTax,omitempty"` - // The number of nights. This should be included in the auth message. * Format: numeric * Max length: 2 characters + // The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters TravelEntertainmentAuthDataDuration *string `json:"travelEntertainmentAuthData.duration,omitempty"` // Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character TravelEntertainmentAuthDataMarket *string `json:"travelEntertainmentAuthData.market,omitempty"` diff --git a/src/checkout/model_additional_data_temporary_services.go b/src/checkout/model_additional_data_temporary_services.go index 6c5ba2fa1..8760d41c2 100644 --- a/src/checkout/model_additional_data_temporary_services.go +++ b/src/checkout/model_additional_data_temporary_services.go @@ -21,9 +21,9 @@ var _ common.MappedNullable = &AdditionalDataTemporaryServices{} type AdditionalDataTemporaryServices struct { // The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 EnhancedSchemeDataCustomerReference *string `json:"enhancedSchemeData.customerReference,omitempty"` - // The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + // The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. EnhancedSchemeDataEmployeeName *string `json:"enhancedSchemeData.employeeName,omitempty"` - // The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces + // The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. EnhancedSchemeDataJobDescription *string `json:"enhancedSchemeData.jobDescription,omitempty"` // The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros EnhancedSchemeDataRegularHoursRate *string `json:"enhancedSchemeData.regularHoursRate,omitempty"` diff --git a/src/checkout/model_afterpay_details.go b/src/checkout/model_afterpay_details.go index 0e591bbae..c8ad19ce5 100644 --- a/src/checkout/model_afterpay_details.go +++ b/src/checkout/model_afterpay_details.go @@ -344,7 +344,7 @@ func (v *NullableAfterpayDetails) UnmarshalJSON(src []byte) error { } func (o *AfterpayDetails) isValidType() bool { - var allowedEnumValues = []string{"afterpay_default", "afterpaytouch", "afterpay_b2b"} + var allowedEnumValues = []string{"afterpay_default", "afterpaytouch", "afterpay_b2b", "clearpay"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_amazon_pay_details.go b/src/checkout/model_amazon_pay_details.go index 24e1da433..27381828e 100644 --- a/src/checkout/model_amazon_pay_details.go +++ b/src/checkout/model_amazon_pay_details.go @@ -19,10 +19,12 @@ var _ common.MappedNullable = &AmazonPayDetails{} // AmazonPayDetails struct for AmazonPayDetails type AmazonPayDetails struct { - // This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. + // This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. AmazonPayToken *string `json:"amazonPayToken,omitempty"` // The checkout attempt identifier. CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. + CheckoutSessionId *string `json:"checkoutSessionId,omitempty"` // **amazonpay** Type *string `json:"type,omitempty"` } @@ -112,6 +114,38 @@ func (o *AmazonPayDetails) SetCheckoutAttemptId(v string) { o.CheckoutAttemptId = &v } +// GetCheckoutSessionId returns the CheckoutSessionId field value if set, zero value otherwise. +func (o *AmazonPayDetails) GetCheckoutSessionId() string { + if o == nil || common.IsNil(o.CheckoutSessionId) { + var ret string + return ret + } + return *o.CheckoutSessionId +} + +// GetCheckoutSessionIdOk returns a tuple with the CheckoutSessionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AmazonPayDetails) GetCheckoutSessionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CheckoutSessionId) { + return nil, false + } + return o.CheckoutSessionId, true +} + +// HasCheckoutSessionId returns a boolean if a field has been set. +func (o *AmazonPayDetails) HasCheckoutSessionId() bool { + if o != nil && !common.IsNil(o.CheckoutSessionId) { + return true + } + + return false +} + +// SetCheckoutSessionId gets a reference to the given string and assigns it to the CheckoutSessionId field. +func (o *AmazonPayDetails) SetCheckoutSessionId(v string) { + o.CheckoutSessionId = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *AmazonPayDetails) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -160,6 +194,9 @@ func (o AmazonPayDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CheckoutAttemptId) { toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId } + if !common.IsNil(o.CheckoutSessionId) { + toSerialize["checkoutSessionId"] = o.CheckoutSessionId + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/checkout/model_balance_check_request.go b/src/checkout/model_balance_check_request.go index dd93efb00..34308994d 100644 --- a/src/checkout/model_balance_check_request.go +++ b/src/checkout/model_balance_check_request.go @@ -41,7 +41,7 @@ type BalanceCheckRequest struct { // An integer value that is added to the normal fraud score. The value can be either positive or negative. FraudOffset *int32 `json:"fraudOffset,omitempty"` Installments *Installments `json:"installments,omitempty"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + // 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"` // 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. Mcc *string `json:"mcc,omitempty"` diff --git a/src/checkout/model_billing_address.go b/src/checkout/model_billing_address.go new file mode 100644 index 000000000..31bcd8e98 --- /dev/null +++ b/src/checkout/model_billing_address.go @@ -0,0 +1,265 @@ +/* +Adyen Checkout API + +API version: 70 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the BillingAddress type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BillingAddress{} + +// BillingAddress struct for BillingAddress +type BillingAddress struct { + // The name of the city. Maximum length: 3000 characters. + City string `json:"city"` + // The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + Country string `json:"country"` + // The number or name of the house. Maximum length: 3000 characters. + HouseNumberOrName string `json:"houseNumberOrName"` + // A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + PostalCode string `json:"postalCode"` + // The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + StateOrProvince *string `json:"stateOrProvince,omitempty"` + // The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + Street string `json:"street"` +} + +// NewBillingAddress instantiates a new BillingAddress 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 NewBillingAddress(city string, country string, houseNumberOrName string, postalCode string, street string) *BillingAddress { + this := BillingAddress{} + this.City = city + this.Country = country + this.HouseNumberOrName = houseNumberOrName + this.PostalCode = postalCode + this.Street = street + return &this +} + +// NewBillingAddressWithDefaults instantiates a new BillingAddress 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 NewBillingAddressWithDefaults() *BillingAddress { + this := BillingAddress{} + return &this +} + +// GetCity returns the City field value +func (o *BillingAddress) GetCity() string { + if o == nil { + var ret string + return ret + } + + return o.City +} + +// GetCityOk returns a tuple with the City field value +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetCityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.City, true +} + +// SetCity sets field value +func (o *BillingAddress) SetCity(v string) { + o.City = v +} + +// GetCountry returns the Country field value +func (o *BillingAddress) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *BillingAddress) SetCountry(v string) { + o.Country = v +} + +// GetHouseNumberOrName returns the HouseNumberOrName field value +func (o *BillingAddress) GetHouseNumberOrName() string { + if o == nil { + var ret string + return ret + } + + return o.HouseNumberOrName +} + +// GetHouseNumberOrNameOk returns a tuple with the HouseNumberOrName field value +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetHouseNumberOrNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HouseNumberOrName, true +} + +// SetHouseNumberOrName sets field value +func (o *BillingAddress) SetHouseNumberOrName(v string) { + o.HouseNumberOrName = v +} + +// GetPostalCode returns the PostalCode field value +func (o *BillingAddress) GetPostalCode() string { + if o == nil { + var ret string + return ret + } + + return o.PostalCode +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetPostalCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PostalCode, true +} + +// SetPostalCode sets field value +func (o *BillingAddress) SetPostalCode(v string) { + o.PostalCode = v +} + +// GetStateOrProvince returns the StateOrProvince field value if set, zero value otherwise. +func (o *BillingAddress) GetStateOrProvince() string { + if o == nil || common.IsNil(o.StateOrProvince) { + var ret string + return ret + } + return *o.StateOrProvince +} + +// GetStateOrProvinceOk returns a tuple with the StateOrProvince field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetStateOrProvinceOk() (*string, bool) { + if o == nil || common.IsNil(o.StateOrProvince) { + return nil, false + } + return o.StateOrProvince, true +} + +// HasStateOrProvince returns a boolean if a field has been set. +func (o *BillingAddress) HasStateOrProvince() bool { + if o != nil && !common.IsNil(o.StateOrProvince) { + return true + } + + return false +} + +// SetStateOrProvince gets a reference to the given string and assigns it to the StateOrProvince field. +func (o *BillingAddress) SetStateOrProvince(v string) { + o.StateOrProvince = &v +} + +// GetStreet returns the Street field value +func (o *BillingAddress) GetStreet() string { + if o == nil { + var ret string + return ret + } + + return o.Street +} + +// GetStreetOk returns a tuple with the Street field value +// and a boolean to check if the value has been set. +func (o *BillingAddress) GetStreetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Street, true +} + +// SetStreet sets field value +func (o *BillingAddress) SetStreet(v string) { + o.Street = v +} + +func (o BillingAddress) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BillingAddress) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["city"] = o.City + toSerialize["country"] = o.Country + toSerialize["houseNumberOrName"] = o.HouseNumberOrName + toSerialize["postalCode"] = o.PostalCode + if !common.IsNil(o.StateOrProvince) { + toSerialize["stateOrProvince"] = o.StateOrProvince + } + toSerialize["street"] = o.Street + return toSerialize, nil +} + +type NullableBillingAddress struct { + value *BillingAddress + isSet bool +} + +func (v NullableBillingAddress) Get() *BillingAddress { + return v.value +} + +func (v *NullableBillingAddress) Set(val *BillingAddress) { + v.value = val + v.isSet = true +} + +func (v NullableBillingAddress) IsSet() bool { + return v.isSet +} + +func (v *NullableBillingAddress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBillingAddress(val *BillingAddress) *NullableBillingAddress { + return &NullableBillingAddress{value: val, isSet: true} +} + +func (v NullableBillingAddress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBillingAddress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_card_details.go b/src/checkout/model_card_details.go index 13aba3ec7..7e1e8b667 100644 --- a/src/checkout/model_card_details.go +++ b/src/checkout/model_card_details.go @@ -811,7 +811,7 @@ func (o *CardDetails) isValidFundingSource() bool { return false } func (o *CardDetails) isValidType() bool { - var allowedEnumValues = []string{"scheme", "networkToken", "giftcard", "alliancedata", "card"} + var allowedEnumValues = []string{"scheme", "networkToken", "card"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_checkout_balance_check_request.go b/src/checkout/model_checkout_balance_check_request.go deleted file mode 100644 index 56399a2a2..000000000 --- a/src/checkout/model_checkout_balance_check_request.go +++ /dev/null @@ -1,1713 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - "time" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutBalanceCheckRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutBalanceCheckRequest{} - -// CheckoutBalanceCheckRequest struct for CheckoutBalanceCheckRequest -type CheckoutBalanceCheckRequest struct { - AccountInfo *AccountInfo `json:"accountInfo,omitempty"` - AdditionalAmount *Amount `json:"additionalAmount,omitempty"` - // This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - AdditionalData *map[string]string `json:"additionalData,omitempty"` - Amount *Amount `json:"amount,omitempty"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` - BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` - // The delay between the authorisation and scheduled auto-capture, specified in hours. - CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` - // The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` - DccQuote *ForexQuote `json:"dccQuote,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` - // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - DeliveryDate *time.Time `json:"deliveryDate,omitempty"` - // A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - DeviceFingerprint *string `json:"deviceFingerprint,omitempty"` - // An integer value that is added to the normal fraud score. The value can be either positive or negative. - FraudOffset *int32 `json:"fraudOffset,omitempty"` - Installments *Installments `json:"installments,omitempty"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. - LocalizedShopperStatement *map[string]string `json:"localizedShopperStatement,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. - Mcc *string `json:"mcc,omitempty"` - // The merchant account identifier, with which you want to process the transaction. - MerchantAccount string `json:"merchantAccount"` - // This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - MerchantOrderReference *string `json:"merchantOrderReference,omitempty"` - MerchantRiskIndicator *MerchantRiskIndicator `json:"merchantRiskIndicator,omitempty"` - // 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"` - // 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"` - // The collection that contains the type of the payment method and its specific information. - PaymentMethod map[string]string `json:"paymentMethod"` - Recurring *Recurring `json:"recurring,omitempty"` - // 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. - RecurringProcessingModel *string `json:"recurringProcessingModel,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,omitempty"` - // Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - SelectedBrand *string `json:"selectedBrand,omitempty"` - // 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"` - // 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. - 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). - 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"` - // 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 **. , ' _ - ? + * /_**. - ShopperStatement *string `json:"shopperStatement,omitempty"` - // The shopper's social security number. - SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. - Store *string `json:"store,omitempty"` - // The shopper's telephone number. - 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. - // Deprecated - 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"` - // Set to true if the payment should be routed to a trusted MID. - TrustedShopper *bool `json:"trustedShopper,omitempty"` -} - -// NewCheckoutBalanceCheckRequest instantiates a new CheckoutBalanceCheckRequest 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 NewCheckoutBalanceCheckRequest(merchantAccount string, paymentMethod map[string]string) *CheckoutBalanceCheckRequest { - this := CheckoutBalanceCheckRequest{} - this.MerchantAccount = merchantAccount - this.PaymentMethod = paymentMethod - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// NewCheckoutBalanceCheckRequestWithDefaults instantiates a new CheckoutBalanceCheckRequest 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 NewCheckoutBalanceCheckRequestWithDefaults() *CheckoutBalanceCheckRequest { - this := CheckoutBalanceCheckRequest{} - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// GetAccountInfo returns the AccountInfo field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetAccountInfo() AccountInfo { - if o == nil || common.IsNil(o.AccountInfo) { - var ret AccountInfo - return ret - } - return *o.AccountInfo -} - -// GetAccountInfoOk returns a tuple with the AccountInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetAccountInfoOk() (*AccountInfo, bool) { - if o == nil || common.IsNil(o.AccountInfo) { - return nil, false - } - return o.AccountInfo, true -} - -// HasAccountInfo returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasAccountInfo() bool { - if o != nil && !common.IsNil(o.AccountInfo) { - return true - } - - return false -} - -// SetAccountInfo gets a reference to the given AccountInfo and assigns it to the AccountInfo field. -func (o *CheckoutBalanceCheckRequest) SetAccountInfo(v AccountInfo) { - o.AccountInfo = &v -} - -// GetAdditionalAmount returns the AdditionalAmount field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetAdditionalAmount() Amount { - if o == nil || common.IsNil(o.AdditionalAmount) { - var ret Amount - return ret - } - return *o.AdditionalAmount -} - -// GetAdditionalAmountOk returns a tuple with the AdditionalAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetAdditionalAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.AdditionalAmount) { - return nil, false - } - return o.AdditionalAmount, true -} - -// HasAdditionalAmount returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasAdditionalAmount() bool { - if o != nil && !common.IsNil(o.AdditionalAmount) { - return true - } - - return false -} - -// SetAdditionalAmount gets a reference to the given Amount and assigns it to the AdditionalAmount field. -func (o *CheckoutBalanceCheckRequest) SetAdditionalAmount(v Amount) { - o.AdditionalAmount = &v -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetAmount(v Amount) { - o.Amount = &v -} - -// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetApplicationInfo() ApplicationInfo { - if o == nil || common.IsNil(o.ApplicationInfo) { - var ret ApplicationInfo - return ret - } - return *o.ApplicationInfo -} - -// GetApplicationInfoOk returns a tuple with the ApplicationInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetApplicationInfoOk() (*ApplicationInfo, bool) { - if o == nil || common.IsNil(o.ApplicationInfo) { - return nil, false - } - return o.ApplicationInfo, true -} - -// HasApplicationInfo returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasApplicationInfo() bool { - if o != nil && !common.IsNil(o.ApplicationInfo) { - return true - } - - return false -} - -// SetApplicationInfo gets a reference to the given ApplicationInfo and assigns it to the ApplicationInfo field. -func (o *CheckoutBalanceCheckRequest) SetApplicationInfo(v ApplicationInfo) { - o.ApplicationInfo = &v -} - -// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetBillingAddress() Address { - if o == nil || common.IsNil(o.BillingAddress) { - var ret Address - return ret - } - return *o.BillingAddress -} - -// GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetBillingAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.BillingAddress) { - return nil, false - } - return o.BillingAddress, true -} - -// HasBillingAddress returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasBillingAddress() bool { - if o != nil && !common.IsNil(o.BillingAddress) { - return true - } - - return false -} - -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *CheckoutBalanceCheckRequest) SetBillingAddress(v Address) { - o.BillingAddress = &v -} - -// GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetBrowserInfo(v BrowserInfo) { - o.BrowserInfo = &v -} - -// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetCaptureDelayHours() int32 { - if o == nil || common.IsNil(o.CaptureDelayHours) { - var ret int32 - return ret - } - return *o.CaptureDelayHours -} - -// GetCaptureDelayHoursOk returns a tuple with the CaptureDelayHours field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetCaptureDelayHoursOk() (*int32, bool) { - if o == nil || common.IsNil(o.CaptureDelayHours) { - return nil, false - } - return o.CaptureDelayHours, true -} - -// HasCaptureDelayHours returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasCaptureDelayHours() bool { - if o != nil && !common.IsNil(o.CaptureDelayHours) { - return true - } - - return false -} - -// SetCaptureDelayHours gets a reference to the given int32 and assigns it to the CaptureDelayHours field. -func (o *CheckoutBalanceCheckRequest) SetCaptureDelayHours(v int32) { - o.CaptureDelayHours = &v -} - -// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetDateOfBirth() string { - if o == nil || common.IsNil(o.DateOfBirth) { - var ret string - return ret - } - return *o.DateOfBirth -} - -// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetDateOfBirthOk() (*string, bool) { - if o == nil || common.IsNil(o.DateOfBirth) { - return nil, false - } - return o.DateOfBirth, true -} - -// HasDateOfBirth returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasDateOfBirth() bool { - if o != nil && !common.IsNil(o.DateOfBirth) { - return true - } - - return false -} - -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *CheckoutBalanceCheckRequest) SetDateOfBirth(v string) { - o.DateOfBirth = &v -} - -// GetDccQuote returns the DccQuote field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetDccQuote() ForexQuote { - if o == nil || common.IsNil(o.DccQuote) { - var ret ForexQuote - return ret - } - return *o.DccQuote -} - -// GetDccQuoteOk returns a tuple with the DccQuote field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetDccQuoteOk() (*ForexQuote, bool) { - if o == nil || common.IsNil(o.DccQuote) { - return nil, false - } - return o.DccQuote, true -} - -// HasDccQuote returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasDccQuote() bool { - if o != nil && !common.IsNil(o.DccQuote) { - return true - } - - return false -} - -// SetDccQuote gets a reference to the given ForexQuote and assigns it to the DccQuote field. -func (o *CheckoutBalanceCheckRequest) SetDccQuote(v ForexQuote) { - o.DccQuote = &v -} - -// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetDeliveryAddress() Address { - if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address - return ret - } - return *o.DeliveryAddress -} - -// GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetDeliveryAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.DeliveryAddress) { - return nil, false - } - return o.DeliveryAddress, true -} - -// HasDeliveryAddress returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasDeliveryAddress() bool { - if o != nil && !common.IsNil(o.DeliveryAddress) { - return true - } - - return false -} - -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *CheckoutBalanceCheckRequest) SetDeliveryAddress(v Address) { - o.DeliveryAddress = &v -} - -// GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetDeliveryDate() time.Time { - if o == nil || common.IsNil(o.DeliveryDate) { - var ret time.Time - return ret - } - return *o.DeliveryDate -} - -// GetDeliveryDateOk returns a tuple with the DeliveryDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetDeliveryDateOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.DeliveryDate) { - return nil, false - } - return o.DeliveryDate, true -} - -// HasDeliveryDate returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasDeliveryDate() bool { - if o != nil && !common.IsNil(o.DeliveryDate) { - return true - } - - return false -} - -// SetDeliveryDate gets a reference to the given time.Time and assigns it to the DeliveryDate field. -func (o *CheckoutBalanceCheckRequest) SetDeliveryDate(v time.Time) { - o.DeliveryDate = &v -} - -// GetDeviceFingerprint returns the DeviceFingerprint field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetDeviceFingerprint() string { - if o == nil || common.IsNil(o.DeviceFingerprint) { - var ret string - return ret - } - return *o.DeviceFingerprint -} - -// GetDeviceFingerprintOk returns a tuple with the DeviceFingerprint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetDeviceFingerprintOk() (*string, bool) { - if o == nil || common.IsNil(o.DeviceFingerprint) { - return nil, false - } - return o.DeviceFingerprint, true -} - -// HasDeviceFingerprint returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasDeviceFingerprint() bool { - if o != nil && !common.IsNil(o.DeviceFingerprint) { - return true - } - - return false -} - -// SetDeviceFingerprint gets a reference to the given string and assigns it to the DeviceFingerprint field. -func (o *CheckoutBalanceCheckRequest) SetDeviceFingerprint(v string) { - o.DeviceFingerprint = &v -} - -// GetFraudOffset returns the FraudOffset field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetFraudOffset() int32 { - if o == nil || common.IsNil(o.FraudOffset) { - var ret int32 - return ret - } - return *o.FraudOffset -} - -// GetFraudOffsetOk returns a tuple with the FraudOffset field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetFraudOffsetOk() (*int32, bool) { - if o == nil || common.IsNil(o.FraudOffset) { - return nil, false - } - return o.FraudOffset, true -} - -// HasFraudOffset returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasFraudOffset() bool { - if o != nil && !common.IsNil(o.FraudOffset) { - return true - } - - return false -} - -// SetFraudOffset gets a reference to the given int32 and assigns it to the FraudOffset field. -func (o *CheckoutBalanceCheckRequest) SetFraudOffset(v int32) { - o.FraudOffset = &v -} - -// GetInstallments returns the Installments field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetInstallments() Installments { - if o == nil || common.IsNil(o.Installments) { - var ret Installments - return ret - } - return *o.Installments -} - -// GetInstallmentsOk returns a tuple with the Installments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetInstallmentsOk() (*Installments, bool) { - if o == nil || common.IsNil(o.Installments) { - return nil, false - } - return o.Installments, true -} - -// HasInstallments returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasInstallments() bool { - if o != nil && !common.IsNil(o.Installments) { - return true - } - - return false -} - -// SetInstallments gets a reference to the given Installments and assigns it to the Installments field. -func (o *CheckoutBalanceCheckRequest) SetInstallments(v Installments) { - o.Installments = &v -} - -// GetLocalizedShopperStatement returns the LocalizedShopperStatement field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetLocalizedShopperStatement() map[string]string { - if o == nil || common.IsNil(o.LocalizedShopperStatement) { - var ret map[string]string - return ret - } - return *o.LocalizedShopperStatement -} - -// GetLocalizedShopperStatementOk returns a tuple with the LocalizedShopperStatement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetLocalizedShopperStatementOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.LocalizedShopperStatement) { - return nil, false - } - return o.LocalizedShopperStatement, true -} - -// HasLocalizedShopperStatement returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasLocalizedShopperStatement() bool { - if o != nil && !common.IsNil(o.LocalizedShopperStatement) { - return true - } - - return false -} - -// SetLocalizedShopperStatement gets a reference to the given map[string]string and assigns it to the LocalizedShopperStatement field. -func (o *CheckoutBalanceCheckRequest) SetLocalizedShopperStatement(v map[string]string) { - o.LocalizedShopperStatement = &v -} - -// GetMcc returns the Mcc field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetMcc() string { - if o == nil || common.IsNil(o.Mcc) { - var ret string - return ret - } - return *o.Mcc -} - -// GetMccOk returns a tuple with the Mcc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetMccOk() (*string, bool) { - if o == nil || common.IsNil(o.Mcc) { - return nil, false - } - return o.Mcc, true -} - -// HasMcc returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasMcc() bool { - if o != nil && !common.IsNil(o.Mcc) { - return true - } - - return false -} - -// SetMcc gets a reference to the given string and assigns it to the Mcc field. -func (o *CheckoutBalanceCheckRequest) SetMcc(v string) { - o.Mcc = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CheckoutBalanceCheckRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetMerchantOrderReference() string { - if o == nil || common.IsNil(o.MerchantOrderReference) { - var ret string - return ret - } - return *o.MerchantOrderReference -} - -// GetMerchantOrderReferenceOk returns a tuple with the MerchantOrderReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetMerchantOrderReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantOrderReference) { - return nil, false - } - return o.MerchantOrderReference, true -} - -// HasMerchantOrderReference returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasMerchantOrderReference() bool { - if o != nil && !common.IsNil(o.MerchantOrderReference) { - return true - } - - return false -} - -// SetMerchantOrderReference gets a reference to the given string and assigns it to the MerchantOrderReference field. -func (o *CheckoutBalanceCheckRequest) SetMerchantOrderReference(v string) { - o.MerchantOrderReference = &v -} - -// GetMerchantRiskIndicator returns the MerchantRiskIndicator field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetMerchantRiskIndicator() MerchantRiskIndicator { - if o == nil || common.IsNil(o.MerchantRiskIndicator) { - var ret MerchantRiskIndicator - return ret - } - return *o.MerchantRiskIndicator -} - -// GetMerchantRiskIndicatorOk returns a tuple with the MerchantRiskIndicator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetMerchantRiskIndicatorOk() (*MerchantRiskIndicator, bool) { - if o == nil || common.IsNil(o.MerchantRiskIndicator) { - return nil, false - } - return o.MerchantRiskIndicator, true -} - -// HasMerchantRiskIndicator returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasMerchantRiskIndicator() bool { - if o != nil && !common.IsNil(o.MerchantRiskIndicator) { - return true - } - - return false -} - -// SetMerchantRiskIndicator gets a reference to the given MerchantRiskIndicator and assigns it to the MerchantRiskIndicator field. -func (o *CheckoutBalanceCheckRequest) SetMerchantRiskIndicator(v MerchantRiskIndicator) { - o.MerchantRiskIndicator = &v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetMetadata() map[string]string { - if o == nil || common.IsNil(o.Metadata) { - var ret map[string]string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetMetadataOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasMetadata() bool { - if o != nil && !common.IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. -func (o *CheckoutBalanceCheckRequest) SetMetadata(v map[string]string) { - o.Metadata = &v -} - -// GetOrderReference returns the OrderReference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetOrderReference() string { - if o == nil || common.IsNil(o.OrderReference) { - var ret string - return ret - } - return *o.OrderReference -} - -// GetOrderReferenceOk returns a tuple with the OrderReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetOrderReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.OrderReference) { - return nil, false - } - return o.OrderReference, true -} - -// HasOrderReference returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasOrderReference() bool { - if o != nil && !common.IsNil(o.OrderReference) { - return true - } - - return false -} - -// SetOrderReference gets a reference to the given string and assigns it to the OrderReference field. -func (o *CheckoutBalanceCheckRequest) SetOrderReference(v string) { - o.OrderReference = &v -} - -// GetPaymentMethod returns the PaymentMethod field value -func (o *CheckoutBalanceCheckRequest) GetPaymentMethod() map[string]string { - if o == nil { - var ret map[string]string - 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 *CheckoutBalanceCheckRequest) GetPaymentMethodOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentMethod, true -} - -// SetPaymentMethod sets field value -func (o *CheckoutBalanceCheckRequest) SetPaymentMethod(v map[string]string) { - o.PaymentMethod = v -} - -// GetRecurring returns the Recurring field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetRecurring() Recurring { - if o == nil || common.IsNil(o.Recurring) { - var ret Recurring - return ret - } - return *o.Recurring -} - -// GetRecurringOk returns a tuple with the Recurring field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetRecurringOk() (*Recurring, bool) { - if o == nil || common.IsNil(o.Recurring) { - return nil, false - } - return o.Recurring, true -} - -// HasRecurring returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasRecurring() bool { - if o != nil && !common.IsNil(o.Recurring) { - return true - } - - return false -} - -// SetRecurring gets a reference to the given Recurring and assigns it to the Recurring field. -func (o *CheckoutBalanceCheckRequest) SetRecurring(v Recurring) { - o.Recurring = &v -} - -// GetRecurringProcessingModel returns the RecurringProcessingModel field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetRecurringProcessingModel() string { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - var ret string - return ret - } - return *o.RecurringProcessingModel -} - -// GetRecurringProcessingModelOk returns a tuple with the RecurringProcessingModel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetRecurringProcessingModelOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - return nil, false - } - return o.RecurringProcessingModel, true -} - -// HasRecurringProcessingModel returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasRecurringProcessingModel() bool { - if o != nil && !common.IsNil(o.RecurringProcessingModel) { - return true - } - - return false -} - -// SetRecurringProcessingModel gets a reference to the given string and assigns it to the RecurringProcessingModel field. -func (o *CheckoutBalanceCheckRequest) SetRecurringProcessingModel(v string) { - o.RecurringProcessingModel = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetReference(v string) { - o.Reference = &v -} - -// GetSelectedBrand returns the SelectedBrand field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetSelectedBrand() string { - if o == nil || common.IsNil(o.SelectedBrand) { - var ret string - return ret - } - return *o.SelectedBrand -} - -// GetSelectedBrandOk returns a tuple with the SelectedBrand field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetSelectedBrandOk() (*string, bool) { - if o == nil || common.IsNil(o.SelectedBrand) { - return nil, false - } - return o.SelectedBrand, true -} - -// HasSelectedBrand returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasSelectedBrand() bool { - if o != nil && !common.IsNil(o.SelectedBrand) { - return true - } - - return false -} - -// SetSelectedBrand gets a reference to the given string and assigns it to the SelectedBrand field. -func (o *CheckoutBalanceCheckRequest) SetSelectedBrand(v string) { - o.SelectedBrand = &v -} - -// GetSelectedRecurringDetailReference returns the SelectedRecurringDetailReference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetSelectedRecurringDetailReference() string { - if o == nil || common.IsNil(o.SelectedRecurringDetailReference) { - var ret string - return ret - } - return *o.SelectedRecurringDetailReference -} - -// GetSelectedRecurringDetailReferenceOk returns a tuple with the SelectedRecurringDetailReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetSelectedRecurringDetailReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.SelectedRecurringDetailReference) { - return nil, false - } - return o.SelectedRecurringDetailReference, true -} - -// HasSelectedRecurringDetailReference returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasSelectedRecurringDetailReference() bool { - if o != nil && !common.IsNil(o.SelectedRecurringDetailReference) { - return true - } - - return false -} - -// SetSelectedRecurringDetailReference gets a reference to the given string and assigns it to the SelectedRecurringDetailReference field. -func (o *CheckoutBalanceCheckRequest) SetSelectedRecurringDetailReference(v string) { - o.SelectedRecurringDetailReference = &v -} - -// GetSessionId returns the SessionId field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetSessionId() string { - if o == nil || common.IsNil(o.SessionId) { - var ret string - return ret - } - return *o.SessionId -} - -// GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetSessionIdOk() (*string, bool) { - if o == nil || common.IsNil(o.SessionId) { - return nil, false - } - return o.SessionId, true -} - -// HasSessionId returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasSessionId() bool { - if o != nil && !common.IsNil(o.SessionId) { - return true - } - - return false -} - -// SetSessionId gets a reference to the given string and assigns it to the SessionId field. -func (o *CheckoutBalanceCheckRequest) SetSessionId(v string) { - o.SessionId = &v -} - -// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetShopperEmail(v string) { - o.ShopperEmail = &v -} - -// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetShopperIP(v string) { - o.ShopperIP = &v -} - -// GetShopperInteraction returns the ShopperInteraction field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetShopperInteraction() string { - if o == nil || common.IsNil(o.ShopperInteraction) { - var ret string - return ret - } - return *o.ShopperInteraction -} - -// GetShopperInteractionOk returns a tuple with the ShopperInteraction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetShopperInteractionOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperInteraction) { - return nil, false - } - return o.ShopperInteraction, true -} - -// HasShopperInteraction returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasShopperInteraction() bool { - if o != nil && !common.IsNil(o.ShopperInteraction) { - return true - } - - return false -} - -// SetShopperInteraction gets a reference to the given string and assigns it to the ShopperInteraction field. -func (o *CheckoutBalanceCheckRequest) SetShopperInteraction(v string) { - o.ShopperInteraction = &v -} - -// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetShopperLocale() string { - if o == nil || common.IsNil(o.ShopperLocale) { - var ret string - return ret - } - return *o.ShopperLocale -} - -// GetShopperLocaleOk returns a tuple with the ShopperLocale field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetShopperLocaleOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperLocale) { - return nil, false - } - return o.ShopperLocale, true -} - -// HasShopperLocale returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasShopperLocale() bool { - if o != nil && !common.IsNil(o.ShopperLocale) { - return true - } - - return false -} - -// SetShopperLocale gets a reference to the given string and assigns it to the ShopperLocale field. -func (o *CheckoutBalanceCheckRequest) SetShopperLocale(v string) { - o.ShopperLocale = &v -} - -// GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetShopperName() Name { - if o == nil || common.IsNil(o.ShopperName) { - var ret Name - return ret - } - return *o.ShopperName -} - -// 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 *CheckoutBalanceCheckRequest) GetShopperNameOk() (*Name, bool) { - if o == nil || common.IsNil(o.ShopperName) { - return nil, false - } - return o.ShopperName, true -} - -// HasShopperName returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasShopperName() bool { - if o != nil && !common.IsNil(o.ShopperName) { - return true - } - - return false -} - -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *CheckoutBalanceCheckRequest) SetShopperName(v Name) { - o.ShopperName = &v -} - -// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetShopperReference(v string) { - o.ShopperReference = &v -} - -// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetShopperStatement() string { - if o == nil || common.IsNil(o.ShopperStatement) { - var ret string - return ret - } - return *o.ShopperStatement -} - -// GetShopperStatementOk returns a tuple with the ShopperStatement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetShopperStatementOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperStatement) { - return nil, false - } - return o.ShopperStatement, true -} - -// HasShopperStatement returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasShopperStatement() bool { - if o != nil && !common.IsNil(o.ShopperStatement) { - return true - } - - return false -} - -// SetShopperStatement gets a reference to the given string and assigns it to the ShopperStatement field. -func (o *CheckoutBalanceCheckRequest) SetShopperStatement(v string) { - o.ShopperStatement = &v -} - -// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetSocialSecurityNumber() string { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - var ret string - return ret - } - return *o.SocialSecurityNumber -} - -// GetSocialSecurityNumberOk returns a tuple with the SocialSecurityNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetSocialSecurityNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - return nil, false - } - return o.SocialSecurityNumber, true -} - -// HasSocialSecurityNumber returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasSocialSecurityNumber() bool { - if o != nil && !common.IsNil(o.SocialSecurityNumber) { - return true - } - - return false -} - -// SetSocialSecurityNumber gets a reference to the given string and assigns it to the SocialSecurityNumber field. -func (o *CheckoutBalanceCheckRequest) SetSocialSecurityNumber(v string) { - o.SocialSecurityNumber = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *CheckoutBalanceCheckRequest) SetSplits(v []Split) { - o.Splits = v -} - -// GetStore returns the Store field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetStore() string { - if o == nil || common.IsNil(o.Store) { - var ret string - return ret - } - return *o.Store -} - -// GetStoreOk returns a tuple with the Store field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetStoreOk() (*string, bool) { - if o == nil || common.IsNil(o.Store) { - return nil, false - } - return o.Store, true -} - -// HasStore returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasStore() bool { - if o != nil && !common.IsNil(o.Store) { - return true - } - - return false -} - -// SetStore gets a reference to the given string and assigns it to the Store field. -func (o *CheckoutBalanceCheckRequest) SetStore(v string) { - o.Store = &v -} - -// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) 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 *CheckoutBalanceCheckRequest) SetTelephoneNumber(v string) { - o.TelephoneNumber = &v -} - -// GetThreeDS2RequestData returns the ThreeDS2RequestData field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetThreeDS2RequestData() ThreeDS2RequestData { - if o == nil || common.IsNil(o.ThreeDS2RequestData) { - var ret ThreeDS2RequestData - return ret - } - return *o.ThreeDS2RequestData -} - -// GetThreeDS2RequestDataOk returns a tuple with the ThreeDS2RequestData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData, bool) { - if o == nil || common.IsNil(o.ThreeDS2RequestData) { - return nil, false - } - return o.ThreeDS2RequestData, true -} - -// HasThreeDS2RequestData returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasThreeDS2RequestData() bool { - if o != nil && !common.IsNil(o.ThreeDS2RequestData) { - return true - } - - return false -} - -// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData and assigns it to the ThreeDS2RequestData field. -func (o *CheckoutBalanceCheckRequest) SetThreeDS2RequestData(v ThreeDS2RequestData) { - o.ThreeDS2RequestData = &v -} - -// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. -// Deprecated -func (o *CheckoutBalanceCheckRequest) GetThreeDSAuthenticationOnly() bool { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - var ret bool - return ret - } - return *o.ThreeDSAuthenticationOnly -} - -// GetThreeDSAuthenticationOnlyOk returns a tuple with the ThreeDSAuthenticationOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *CheckoutBalanceCheckRequest) GetThreeDSAuthenticationOnlyOk() (*bool, bool) { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - return nil, false - } - return o.ThreeDSAuthenticationOnly, true -} - -// HasThreeDSAuthenticationOnly returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasThreeDSAuthenticationOnly() bool { - if o != nil && !common.IsNil(o.ThreeDSAuthenticationOnly) { - return true - } - - return false -} - -// SetThreeDSAuthenticationOnly gets a reference to the given bool and assigns it to the ThreeDSAuthenticationOnly field. -// Deprecated -func (o *CheckoutBalanceCheckRequest) SetThreeDSAuthenticationOnly(v bool) { - o.ThreeDSAuthenticationOnly = &v -} - -// GetTotalsGroup returns the TotalsGroup field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetTotalsGroup() string { - if o == nil || common.IsNil(o.TotalsGroup) { - var ret string - return ret - } - return *o.TotalsGroup -} - -// GetTotalsGroupOk returns a tuple with the TotalsGroup field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetTotalsGroupOk() (*string, bool) { - if o == nil || common.IsNil(o.TotalsGroup) { - return nil, false - } - return o.TotalsGroup, true -} - -// HasTotalsGroup returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasTotalsGroup() bool { - if o != nil && !common.IsNil(o.TotalsGroup) { - return true - } - - return false -} - -// SetTotalsGroup gets a reference to the given string and assigns it to the TotalsGroup field. -func (o *CheckoutBalanceCheckRequest) SetTotalsGroup(v string) { - o.TotalsGroup = &v -} - -// GetTrustedShopper returns the TrustedShopper field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckRequest) GetTrustedShopper() bool { - if o == nil || common.IsNil(o.TrustedShopper) { - var ret bool - return ret - } - return *o.TrustedShopper -} - -// GetTrustedShopperOk returns a tuple with the TrustedShopper field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckRequest) GetTrustedShopperOk() (*bool, bool) { - if o == nil || common.IsNil(o.TrustedShopper) { - return nil, false - } - return o.TrustedShopper, true -} - -// HasTrustedShopper returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckRequest) HasTrustedShopper() bool { - if o != nil && !common.IsNil(o.TrustedShopper) { - return true - } - - return false -} - -// SetTrustedShopper gets a reference to the given bool and assigns it to the TrustedShopper field. -func (o *CheckoutBalanceCheckRequest) SetTrustedShopper(v bool) { - o.TrustedShopper = &v -} - -func (o CheckoutBalanceCheckRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutBalanceCheckRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AccountInfo) { - toSerialize["accountInfo"] = o.AccountInfo - } - if !common.IsNil(o.AdditionalAmount) { - toSerialize["additionalAmount"] = o.AdditionalAmount - } - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - if !common.IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !common.IsNil(o.ApplicationInfo) { - toSerialize["applicationInfo"] = o.ApplicationInfo - } - if !common.IsNil(o.BillingAddress) { - toSerialize["billingAddress"] = o.BillingAddress - } - if !common.IsNil(o.BrowserInfo) { - toSerialize["browserInfo"] = o.BrowserInfo - } - if !common.IsNil(o.CaptureDelayHours) { - toSerialize["captureDelayHours"] = o.CaptureDelayHours - } - if !common.IsNil(o.DateOfBirth) { - toSerialize["dateOfBirth"] = o.DateOfBirth - } - if !common.IsNil(o.DccQuote) { - toSerialize["dccQuote"] = o.DccQuote - } - if !common.IsNil(o.DeliveryAddress) { - toSerialize["deliveryAddress"] = o.DeliveryAddress - } - if !common.IsNil(o.DeliveryDate) { - toSerialize["deliveryDate"] = o.DeliveryDate - } - if !common.IsNil(o.DeviceFingerprint) { - toSerialize["deviceFingerprint"] = o.DeviceFingerprint - } - if !common.IsNil(o.FraudOffset) { - toSerialize["fraudOffset"] = o.FraudOffset - } - if !common.IsNil(o.Installments) { - toSerialize["installments"] = o.Installments - } - if !common.IsNil(o.LocalizedShopperStatement) { - toSerialize["localizedShopperStatement"] = o.LocalizedShopperStatement - } - if !common.IsNil(o.Mcc) { - toSerialize["mcc"] = o.Mcc - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.MerchantOrderReference) { - toSerialize["merchantOrderReference"] = o.MerchantOrderReference - } - if !common.IsNil(o.MerchantRiskIndicator) { - toSerialize["merchantRiskIndicator"] = o.MerchantRiskIndicator - } - if !common.IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !common.IsNil(o.OrderReference) { - toSerialize["orderReference"] = o.OrderReference - } - toSerialize["paymentMethod"] = o.PaymentMethod - if !common.IsNil(o.Recurring) { - toSerialize["recurring"] = o.Recurring - } - if !common.IsNil(o.RecurringProcessingModel) { - toSerialize["recurringProcessingModel"] = o.RecurringProcessingModel - } - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.SelectedBrand) { - toSerialize["selectedBrand"] = o.SelectedBrand - } - if !common.IsNil(o.SelectedRecurringDetailReference) { - toSerialize["selectedRecurringDetailReference"] = o.SelectedRecurringDetailReference - } - if !common.IsNil(o.SessionId) { - toSerialize["sessionId"] = o.SessionId - } - if !common.IsNil(o.ShopperEmail) { - toSerialize["shopperEmail"] = o.ShopperEmail - } - if !common.IsNil(o.ShopperIP) { - toSerialize["shopperIP"] = o.ShopperIP - } - if !common.IsNil(o.ShopperInteraction) { - toSerialize["shopperInteraction"] = o.ShopperInteraction - } - if !common.IsNil(o.ShopperLocale) { - toSerialize["shopperLocale"] = o.ShopperLocale - } - if !common.IsNil(o.ShopperName) { - toSerialize["shopperName"] = o.ShopperName - } - if !common.IsNil(o.ShopperReference) { - toSerialize["shopperReference"] = o.ShopperReference - } - if !common.IsNil(o.ShopperStatement) { - toSerialize["shopperStatement"] = o.ShopperStatement - } - if !common.IsNil(o.SocialSecurityNumber) { - toSerialize["socialSecurityNumber"] = o.SocialSecurityNumber - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - if !common.IsNil(o.Store) { - toSerialize["store"] = o.Store - } - if !common.IsNil(o.TelephoneNumber) { - toSerialize["telephoneNumber"] = o.TelephoneNumber - } - if !common.IsNil(o.ThreeDS2RequestData) { - toSerialize["threeDS2RequestData"] = o.ThreeDS2RequestData - } - if !common.IsNil(o.ThreeDSAuthenticationOnly) { - toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly - } - if !common.IsNil(o.TotalsGroup) { - toSerialize["totalsGroup"] = o.TotalsGroup - } - if !common.IsNil(o.TrustedShopper) { - toSerialize["trustedShopper"] = o.TrustedShopper - } - return toSerialize, nil -} - -type NullableCheckoutBalanceCheckRequest struct { - value *CheckoutBalanceCheckRequest - isSet bool -} - -func (v NullableCheckoutBalanceCheckRequest) Get() *CheckoutBalanceCheckRequest { - return v.value -} - -func (v *NullableCheckoutBalanceCheckRequest) Set(val *CheckoutBalanceCheckRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutBalanceCheckRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutBalanceCheckRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutBalanceCheckRequest(val *CheckoutBalanceCheckRequest) *NullableCheckoutBalanceCheckRequest { - return &NullableCheckoutBalanceCheckRequest{value: val, isSet: true} -} - -func (v NullableCheckoutBalanceCheckRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutBalanceCheckRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CheckoutBalanceCheckRequest) isValidRecurringProcessingModel() bool { - var allowedEnumValues = []string{"CardOnFile", "Subscription", "UnscheduledCardOnFile"} - for _, allowed := range allowedEnumValues { - if o.GetRecurringProcessingModel() == allowed { - return true - } - } - return false -} -func (o *CheckoutBalanceCheckRequest) isValidShopperInteraction() bool { - var allowedEnumValues = []string{"Ecommerce", "ContAuth", "Moto", "POS"} - for _, allowed := range allowedEnumValues { - if o.GetShopperInteraction() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_checkout_balance_check_response.go b/src/checkout/model_checkout_balance_check_response.go deleted file mode 100644 index b145cac7f..000000000 --- a/src/checkout/model_checkout_balance_check_response.go +++ /dev/null @@ -1,336 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutBalanceCheckResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutBalanceCheckResponse{} - -// CheckoutBalanceCheckResponse struct for CheckoutBalanceCheckResponse -type CheckoutBalanceCheckResponse struct { - // 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"` - Balance Amount `json:"balance"` - FraudResult *FraudResult `json:"fraudResult,omitempty"` - // Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - PspReference *string `json:"pspReference,omitempty"` - // If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - RefusalReason *string `json:"refusalReason,omitempty"` - // The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. - ResultCode string `json:"resultCode"` - TransactionLimit *Amount `json:"transactionLimit,omitempty"` -} - -// NewCheckoutBalanceCheckResponse instantiates a new CheckoutBalanceCheckResponse 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 NewCheckoutBalanceCheckResponse(balance Amount, resultCode string) *CheckoutBalanceCheckResponse { - this := CheckoutBalanceCheckResponse{} - this.Balance = balance - this.ResultCode = resultCode - return &this -} - -// NewCheckoutBalanceCheckResponseWithDefaults instantiates a new CheckoutBalanceCheckResponse 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 NewCheckoutBalanceCheckResponseWithDefaults() *CheckoutBalanceCheckResponse { - this := CheckoutBalanceCheckResponse{} - return &this -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetBalance returns the Balance field value -func (o *CheckoutBalanceCheckResponse) GetBalance() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Balance -} - -// GetBalanceOk returns a tuple with the Balance field value -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckResponse) GetBalanceOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Balance, true -} - -// SetBalance sets field value -func (o *CheckoutBalanceCheckResponse) SetBalance(v Amount) { - o.Balance = v -} - -// GetFraudResult returns the FraudResult field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckResponse) GetFraudResult() FraudResult { - if o == nil || common.IsNil(o.FraudResult) { - var ret FraudResult - return ret - } - return *o.FraudResult -} - -// GetFraudResultOk returns a tuple with the FraudResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckResponse) GetFraudResultOk() (*FraudResult, bool) { - if o == nil || common.IsNil(o.FraudResult) { - return nil, false - } - return o.FraudResult, true -} - -// HasFraudResult returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckResponse) HasFraudResult() bool { - if o != nil && !common.IsNil(o.FraudResult) { - return true - } - - return false -} - -// SetFraudResult gets a reference to the given FraudResult and assigns it to the FraudResult field. -func (o *CheckoutBalanceCheckResponse) SetFraudResult(v FraudResult) { - o.FraudResult = &v -} - -// GetPspReference returns the PspReference field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) 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 *CheckoutBalanceCheckResponse) SetPspReference(v string) { - o.PspReference = &v -} - -// GetRefusalReason returns the RefusalReason field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckResponse) GetRefusalReason() string { - if o == nil || common.IsNil(o.RefusalReason) { - var ret string - return ret - } - return *o.RefusalReason -} - -// GetRefusalReasonOk returns a tuple with the RefusalReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckResponse) GetRefusalReasonOk() (*string, bool) { - if o == nil || common.IsNil(o.RefusalReason) { - return nil, false - } - return o.RefusalReason, true -} - -// HasRefusalReason returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckResponse) HasRefusalReason() bool { - if o != nil && !common.IsNil(o.RefusalReason) { - return true - } - - return false -} - -// SetRefusalReason gets a reference to the given string and assigns it to the RefusalReason field. -func (o *CheckoutBalanceCheckResponse) SetRefusalReason(v string) { - o.RefusalReason = &v -} - -// GetResultCode returns the ResultCode field value -func (o *CheckoutBalanceCheckResponse) GetResultCode() string { - if o == nil { - var ret string - return ret - } - - return o.ResultCode -} - -// GetResultCodeOk returns a tuple with the ResultCode field value -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckResponse) GetResultCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResultCode, true -} - -// SetResultCode sets field value -func (o *CheckoutBalanceCheckResponse) SetResultCode(v string) { - o.ResultCode = v -} - -// GetTransactionLimit returns the TransactionLimit field value if set, zero value otherwise. -func (o *CheckoutBalanceCheckResponse) GetTransactionLimit() Amount { - if o == nil || common.IsNil(o.TransactionLimit) { - var ret Amount - return ret - } - return *o.TransactionLimit -} - -// GetTransactionLimitOk returns a tuple with the TransactionLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutBalanceCheckResponse) GetTransactionLimitOk() (*Amount, bool) { - if o == nil || common.IsNil(o.TransactionLimit) { - return nil, false - } - return o.TransactionLimit, true -} - -// HasTransactionLimit returns a boolean if a field has been set. -func (o *CheckoutBalanceCheckResponse) HasTransactionLimit() bool { - if o != nil && !common.IsNil(o.TransactionLimit) { - return true - } - - return false -} - -// SetTransactionLimit gets a reference to the given Amount and assigns it to the TransactionLimit field. -func (o *CheckoutBalanceCheckResponse) SetTransactionLimit(v Amount) { - o.TransactionLimit = &v -} - -func (o CheckoutBalanceCheckResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutBalanceCheckResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - toSerialize["balance"] = o.Balance - if !common.IsNil(o.FraudResult) { - toSerialize["fraudResult"] = o.FraudResult - } - if !common.IsNil(o.PspReference) { - toSerialize["pspReference"] = o.PspReference - } - if !common.IsNil(o.RefusalReason) { - toSerialize["refusalReason"] = o.RefusalReason - } - toSerialize["resultCode"] = o.ResultCode - if !common.IsNil(o.TransactionLimit) { - toSerialize["transactionLimit"] = o.TransactionLimit - } - return toSerialize, nil -} - -type NullableCheckoutBalanceCheckResponse struct { - value *CheckoutBalanceCheckResponse - isSet bool -} - -func (v NullableCheckoutBalanceCheckResponse) Get() *CheckoutBalanceCheckResponse { - return v.value -} - -func (v *NullableCheckoutBalanceCheckResponse) Set(val *CheckoutBalanceCheckResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutBalanceCheckResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutBalanceCheckResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutBalanceCheckResponse(val *CheckoutBalanceCheckResponse) *NullableCheckoutBalanceCheckResponse { - return &NullableCheckoutBalanceCheckResponse{value: val, isSet: true} -} - -func (v NullableCheckoutBalanceCheckResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutBalanceCheckResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CheckoutBalanceCheckResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"Success", "NotEnoughBalance", "Failed"} - for _, allowed := range allowedEnumValues { - if o.GetResultCode() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_checkout_cancel_order_request.go b/src/checkout/model_checkout_cancel_order_request.go deleted file mode 100644 index ea7fb0ecc..000000000 --- a/src/checkout/model_checkout_cancel_order_request.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutCancelOrderRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutCancelOrderRequest{} - -// CheckoutCancelOrderRequest struct for CheckoutCancelOrderRequest -type CheckoutCancelOrderRequest struct { - // The merchant account identifier that orderData belongs to. - MerchantAccount string `json:"merchantAccount"` - Order EncryptedOrderData `json:"order"` -} - -// NewCheckoutCancelOrderRequest instantiates a new CheckoutCancelOrderRequest 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 NewCheckoutCancelOrderRequest(merchantAccount string, order EncryptedOrderData) *CheckoutCancelOrderRequest { - this := CheckoutCancelOrderRequest{} - this.MerchantAccount = merchantAccount - this.Order = order - return &this -} - -// NewCheckoutCancelOrderRequestWithDefaults instantiates a new CheckoutCancelOrderRequest 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 NewCheckoutCancelOrderRequestWithDefaults() *CheckoutCancelOrderRequest { - this := CheckoutCancelOrderRequest{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CheckoutCancelOrderRequest) 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 *CheckoutCancelOrderRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CheckoutCancelOrderRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetOrder returns the Order field value -func (o *CheckoutCancelOrderRequest) GetOrder() EncryptedOrderData { - if o == nil { - var ret EncryptedOrderData - return ret - } - - return o.Order -} - -// GetOrderOk returns a tuple with the Order field value -// and a boolean to check if the value has been set. -func (o *CheckoutCancelOrderRequest) GetOrderOk() (*EncryptedOrderData, bool) { - if o == nil { - return nil, false - } - return &o.Order, true -} - -// SetOrder sets field value -func (o *CheckoutCancelOrderRequest) SetOrder(v EncryptedOrderData) { - o.Order = v -} - -func (o CheckoutCancelOrderRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutCancelOrderRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["order"] = o.Order - return toSerialize, nil -} - -type NullableCheckoutCancelOrderRequest struct { - value *CheckoutCancelOrderRequest - isSet bool -} - -func (v NullableCheckoutCancelOrderRequest) Get() *CheckoutCancelOrderRequest { - return v.value -} - -func (v *NullableCheckoutCancelOrderRequest) Set(val *CheckoutCancelOrderRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutCancelOrderRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutCancelOrderRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutCancelOrderRequest(val *CheckoutCancelOrderRequest) *NullableCheckoutCancelOrderRequest { - return &NullableCheckoutCancelOrderRequest{value: val, isSet: true} -} - -func (v NullableCheckoutCancelOrderRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutCancelOrderRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_checkout_cancel_order_response.go b/src/checkout/model_checkout_cancel_order_response.go deleted file mode 100644 index 20cd303d0..000000000 --- a/src/checkout/model_checkout_cancel_order_response.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutCancelOrderResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutCancelOrderResponse{} - -// CheckoutCancelOrderResponse struct for CheckoutCancelOrderResponse -type CheckoutCancelOrderResponse struct { - // A unique reference of the cancellation request. - PspReference string `json:"pspReference"` - // The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. - ResultCode string `json:"resultCode"` -} - -// NewCheckoutCancelOrderResponse instantiates a new CheckoutCancelOrderResponse 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 NewCheckoutCancelOrderResponse(pspReference string, resultCode string) *CheckoutCancelOrderResponse { - this := CheckoutCancelOrderResponse{} - this.PspReference = pspReference - this.ResultCode = resultCode - return &this -} - -// NewCheckoutCancelOrderResponseWithDefaults instantiates a new CheckoutCancelOrderResponse 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 NewCheckoutCancelOrderResponseWithDefaults() *CheckoutCancelOrderResponse { - this := CheckoutCancelOrderResponse{} - return &this -} - -// GetPspReference returns the PspReference field value -func (o *CheckoutCancelOrderResponse) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *CheckoutCancelOrderResponse) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *CheckoutCancelOrderResponse) SetPspReference(v string) { - o.PspReference = v -} - -// GetResultCode returns the ResultCode field value -func (o *CheckoutCancelOrderResponse) GetResultCode() string { - if o == nil { - var ret string - return ret - } - - return o.ResultCode -} - -// GetResultCodeOk returns a tuple with the ResultCode field value -// and a boolean to check if the value has been set. -func (o *CheckoutCancelOrderResponse) GetResultCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResultCode, true -} - -// SetResultCode sets field value -func (o *CheckoutCancelOrderResponse) SetResultCode(v string) { - o.ResultCode = v -} - -func (o CheckoutCancelOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutCancelOrderResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["pspReference"] = o.PspReference - toSerialize["resultCode"] = o.ResultCode - return toSerialize, nil -} - -type NullableCheckoutCancelOrderResponse struct { - value *CheckoutCancelOrderResponse - isSet bool -} - -func (v NullableCheckoutCancelOrderResponse) Get() *CheckoutCancelOrderResponse { - return v.value -} - -func (v *NullableCheckoutCancelOrderResponse) Set(val *CheckoutCancelOrderResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutCancelOrderResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutCancelOrderResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutCancelOrderResponse(val *CheckoutCancelOrderResponse) *NullableCheckoutCancelOrderResponse { - return &NullableCheckoutCancelOrderResponse{value: val, isSet: true} -} - -func (v NullableCheckoutCancelOrderResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutCancelOrderResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CheckoutCancelOrderResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"Received"} - for _, allowed := range allowedEnumValues { - if o.GetResultCode() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_checkout_create_order_request.go b/src/checkout/model_checkout_create_order_request.go deleted file mode 100644 index db48cf5b6..000000000 --- a/src/checkout/model_checkout_create_order_request.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutCreateOrderRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutCreateOrderRequest{} - -// CheckoutCreateOrderRequest struct for CheckoutCreateOrderRequest -type CheckoutCreateOrderRequest struct { - Amount Amount `json:"amount"` - // The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day. - ExpiresAt *string `json:"expiresAt,omitempty"` - // The merchant account identifier, with which you want to process the order. - MerchantAccount string `json:"merchantAccount"` - // A custom reference identifying the order. - Reference string `json:"reference"` -} - -// NewCheckoutCreateOrderRequest instantiates a new CheckoutCreateOrderRequest 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 NewCheckoutCreateOrderRequest(amount Amount, merchantAccount string, reference string) *CheckoutCreateOrderRequest { - this := CheckoutCreateOrderRequest{} - this.Amount = amount - this.MerchantAccount = merchantAccount - this.Reference = reference - return &this -} - -// NewCheckoutCreateOrderRequestWithDefaults instantiates a new CheckoutCreateOrderRequest 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 NewCheckoutCreateOrderRequestWithDefaults() *CheckoutCreateOrderRequest { - this := CheckoutCreateOrderRequest{} - return &this -} - -// GetAmount returns the Amount field value -func (o *CheckoutCreateOrderRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CheckoutCreateOrderRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *CheckoutCreateOrderRequest) GetExpiresAt() string { - if o == nil || common.IsNil(o.ExpiresAt) { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderRequest) GetExpiresAtOk() (*string, bool) { - if o == nil || common.IsNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *CheckoutCreateOrderRequest) HasExpiresAt() bool { - if o != nil && !common.IsNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *CheckoutCreateOrderRequest) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CheckoutCreateOrderRequest) 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 *CheckoutCreateOrderRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CheckoutCreateOrderRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetReference returns the Reference field value -func (o *CheckoutCreateOrderRequest) GetReference() string { - if o == nil { - var ret string - return ret - } - - return o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderRequest) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *CheckoutCreateOrderRequest) SetReference(v string) { - o.Reference = v -} - -func (o CheckoutCreateOrderRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutCreateOrderRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.ExpiresAt) { - toSerialize["expiresAt"] = o.ExpiresAt - } - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["reference"] = o.Reference - return toSerialize, nil -} - -type NullableCheckoutCreateOrderRequest struct { - value *CheckoutCreateOrderRequest - isSet bool -} - -func (v NullableCheckoutCreateOrderRequest) Get() *CheckoutCreateOrderRequest { - return v.value -} - -func (v *NullableCheckoutCreateOrderRequest) Set(val *CheckoutCreateOrderRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutCreateOrderRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutCreateOrderRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutCreateOrderRequest(val *CheckoutCreateOrderRequest) *NullableCheckoutCreateOrderRequest { - return &NullableCheckoutCreateOrderRequest{value: val, isSet: true} -} - -func (v NullableCheckoutCreateOrderRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutCreateOrderRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_checkout_create_order_response.go b/src/checkout/model_checkout_create_order_response.go deleted file mode 100644 index ee6e72959..000000000 --- a/src/checkout/model_checkout_create_order_response.go +++ /dev/null @@ -1,420 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutCreateOrderResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutCreateOrderResponse{} - -// CheckoutCreateOrderResponse struct for CheckoutCreateOrderResponse -type CheckoutCreateOrderResponse struct { - // 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"` - // The date that the order will expire. - ExpiresAt string `json:"expiresAt"` - FraudResult *FraudResult `json:"fraudResult,omitempty"` - // The encrypted data that will be used by merchant for adding payments to the order. - OrderData string `json:"orderData"` - // Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - PspReference *string `json:"pspReference,omitempty"` - // The reference provided by merchant for creating the order. - Reference *string `json:"reference,omitempty"` - // If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - RefusalReason *string `json:"refusalReason,omitempty"` - RemainingAmount Amount `json:"remainingAmount"` - // The result of the order creation request. The value is always **Success**. - ResultCode string `json:"resultCode"` -} - -// NewCheckoutCreateOrderResponse instantiates a new CheckoutCreateOrderResponse 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 NewCheckoutCreateOrderResponse(amount Amount, expiresAt string, orderData string, remainingAmount Amount, resultCode string) *CheckoutCreateOrderResponse { - this := CheckoutCreateOrderResponse{} - this.Amount = amount - this.ExpiresAt = expiresAt - this.OrderData = orderData - this.RemainingAmount = remainingAmount - this.ResultCode = resultCode - return &this -} - -// NewCheckoutCreateOrderResponseWithDefaults instantiates a new CheckoutCreateOrderResponse 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 NewCheckoutCreateOrderResponseWithDefaults() *CheckoutCreateOrderResponse { - this := CheckoutCreateOrderResponse{} - return &this -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetAmount returns the Amount field value -func (o *CheckoutCreateOrderResponse) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CheckoutCreateOrderResponse) SetAmount(v Amount) { - o.Amount = v -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *CheckoutCreateOrderResponse) GetExpiresAt() string { - if o == nil { - var ret string - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetExpiresAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *CheckoutCreateOrderResponse) SetExpiresAt(v string) { - o.ExpiresAt = v -} - -// GetFraudResult returns the FraudResult field value if set, zero value otherwise. -func (o *CheckoutCreateOrderResponse) GetFraudResult() FraudResult { - if o == nil || common.IsNil(o.FraudResult) { - var ret FraudResult - return ret - } - return *o.FraudResult -} - -// GetFraudResultOk returns a tuple with the FraudResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetFraudResultOk() (*FraudResult, bool) { - if o == nil || common.IsNil(o.FraudResult) { - return nil, false - } - return o.FraudResult, true -} - -// HasFraudResult returns a boolean if a field has been set. -func (o *CheckoutCreateOrderResponse) HasFraudResult() bool { - if o != nil && !common.IsNil(o.FraudResult) { - return true - } - - return false -} - -// SetFraudResult gets a reference to the given FraudResult and assigns it to the FraudResult field. -func (o *CheckoutCreateOrderResponse) SetFraudResult(v FraudResult) { - o.FraudResult = &v -} - -// GetOrderData returns the OrderData field value -func (o *CheckoutCreateOrderResponse) GetOrderData() string { - if o == nil { - var ret string - return ret - } - - return o.OrderData -} - -// GetOrderDataOk returns a tuple with the OrderData field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetOrderDataOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrderData, true -} - -// SetOrderData sets field value -func (o *CheckoutCreateOrderResponse) SetOrderData(v string) { - o.OrderData = v -} - -// GetPspReference returns the PspReference field value if set, zero value otherwise. -func (o *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) SetPspReference(v string) { - o.PspReference = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) 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 *CheckoutCreateOrderResponse) SetReference(v string) { - o.Reference = &v -} - -// GetRefusalReason returns the RefusalReason field value if set, zero value otherwise. -func (o *CheckoutCreateOrderResponse) GetRefusalReason() string { - if o == nil || common.IsNil(o.RefusalReason) { - var ret string - return ret - } - return *o.RefusalReason -} - -// GetRefusalReasonOk returns a tuple with the RefusalReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetRefusalReasonOk() (*string, bool) { - if o == nil || common.IsNil(o.RefusalReason) { - return nil, false - } - return o.RefusalReason, true -} - -// HasRefusalReason returns a boolean if a field has been set. -func (o *CheckoutCreateOrderResponse) HasRefusalReason() bool { - if o != nil && !common.IsNil(o.RefusalReason) { - return true - } - - return false -} - -// SetRefusalReason gets a reference to the given string and assigns it to the RefusalReason field. -func (o *CheckoutCreateOrderResponse) SetRefusalReason(v string) { - o.RefusalReason = &v -} - -// GetRemainingAmount returns the RemainingAmount field value -func (o *CheckoutCreateOrderResponse) GetRemainingAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.RemainingAmount -} - -// GetRemainingAmountOk returns a tuple with the RemainingAmount field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetRemainingAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.RemainingAmount, true -} - -// SetRemainingAmount sets field value -func (o *CheckoutCreateOrderResponse) SetRemainingAmount(v Amount) { - o.RemainingAmount = v -} - -// GetResultCode returns the ResultCode field value -func (o *CheckoutCreateOrderResponse) GetResultCode() string { - if o == nil { - var ret string - return ret - } - - return o.ResultCode -} - -// GetResultCodeOk returns a tuple with the ResultCode field value -// and a boolean to check if the value has been set. -func (o *CheckoutCreateOrderResponse) GetResultCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResultCode, true -} - -// SetResultCode sets field value -func (o *CheckoutCreateOrderResponse) SetResultCode(v string) { - o.ResultCode = v -} - -func (o CheckoutCreateOrderResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutCreateOrderResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - toSerialize["amount"] = o.Amount - toSerialize["expiresAt"] = o.ExpiresAt - if !common.IsNil(o.FraudResult) { - toSerialize["fraudResult"] = o.FraudResult - } - toSerialize["orderData"] = o.OrderData - if !common.IsNil(o.PspReference) { - toSerialize["pspReference"] = o.PspReference - } - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.RefusalReason) { - toSerialize["refusalReason"] = o.RefusalReason - } - toSerialize["remainingAmount"] = o.RemainingAmount - toSerialize["resultCode"] = o.ResultCode - return toSerialize, nil -} - -type NullableCheckoutCreateOrderResponse struct { - value *CheckoutCreateOrderResponse - isSet bool -} - -func (v NullableCheckoutCreateOrderResponse) Get() *CheckoutCreateOrderResponse { - return v.value -} - -func (v *NullableCheckoutCreateOrderResponse) Set(val *CheckoutCreateOrderResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutCreateOrderResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutCreateOrderResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutCreateOrderResponse(val *CheckoutCreateOrderResponse) *NullableCheckoutCreateOrderResponse { - return &NullableCheckoutCreateOrderResponse{value: val, isSet: true} -} - -func (v NullableCheckoutCreateOrderResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutCreateOrderResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CheckoutCreateOrderResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"Success"} - for _, allowed := range allowedEnumValues { - if o.GetResultCode() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_checkout_utility_request.go b/src/checkout/model_checkout_utility_request.go deleted file mode 100644 index 4dbe5865d..000000000 --- a/src/checkout/model_checkout_utility_request.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutUtilityRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutUtilityRequest{} - -// CheckoutUtilityRequest struct for CheckoutUtilityRequest -type CheckoutUtilityRequest struct { - // The list of origin domains, for which origin keys are requested. - OriginDomains []string `json:"originDomains"` -} - -// NewCheckoutUtilityRequest instantiates a new CheckoutUtilityRequest 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 NewCheckoutUtilityRequest(originDomains []string) *CheckoutUtilityRequest { - this := CheckoutUtilityRequest{} - this.OriginDomains = originDomains - return &this -} - -// NewCheckoutUtilityRequestWithDefaults instantiates a new CheckoutUtilityRequest 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 NewCheckoutUtilityRequestWithDefaults() *CheckoutUtilityRequest { - this := CheckoutUtilityRequest{} - return &this -} - -// GetOriginDomains returns the OriginDomains field value -func (o *CheckoutUtilityRequest) GetOriginDomains() []string { - if o == nil { - var ret []string - return ret - } - - return o.OriginDomains -} - -// GetOriginDomainsOk returns a tuple with the OriginDomains field value -// and a boolean to check if the value has been set. -func (o *CheckoutUtilityRequest) GetOriginDomainsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.OriginDomains, true -} - -// SetOriginDomains sets field value -func (o *CheckoutUtilityRequest) SetOriginDomains(v []string) { - o.OriginDomains = v -} - -func (o CheckoutUtilityRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutUtilityRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["originDomains"] = o.OriginDomains - return toSerialize, nil -} - -type NullableCheckoutUtilityRequest struct { - value *CheckoutUtilityRequest - isSet bool -} - -func (v NullableCheckoutUtilityRequest) Get() *CheckoutUtilityRequest { - return v.value -} - -func (v *NullableCheckoutUtilityRequest) Set(val *CheckoutUtilityRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutUtilityRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutUtilityRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutUtilityRequest(val *CheckoutUtilityRequest) *NullableCheckoutUtilityRequest { - return &NullableCheckoutUtilityRequest{value: val, isSet: true} -} - -func (v NullableCheckoutUtilityRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutUtilityRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_checkout_utility_response.go b/src/checkout/model_checkout_utility_response.go deleted file mode 100644 index c65d5db8e..000000000 --- a/src/checkout/model_checkout_utility_response.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CheckoutUtilityResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CheckoutUtilityResponse{} - -// CheckoutUtilityResponse struct for CheckoutUtilityResponse -type CheckoutUtilityResponse struct { - // The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key. - OriginKeys *map[string]string `json:"originKeys,omitempty"` -} - -// NewCheckoutUtilityResponse instantiates a new CheckoutUtilityResponse 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 NewCheckoutUtilityResponse() *CheckoutUtilityResponse { - this := CheckoutUtilityResponse{} - return &this -} - -// NewCheckoutUtilityResponseWithDefaults instantiates a new CheckoutUtilityResponse 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 NewCheckoutUtilityResponseWithDefaults() *CheckoutUtilityResponse { - this := CheckoutUtilityResponse{} - return &this -} - -// GetOriginKeys returns the OriginKeys field value if set, zero value otherwise. -func (o *CheckoutUtilityResponse) GetOriginKeys() map[string]string { - if o == nil || common.IsNil(o.OriginKeys) { - var ret map[string]string - return ret - } - return *o.OriginKeys -} - -// GetOriginKeysOk returns a tuple with the OriginKeys field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CheckoutUtilityResponse) GetOriginKeysOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.OriginKeys) { - return nil, false - } - return o.OriginKeys, true -} - -// HasOriginKeys returns a boolean if a field has been set. -func (o *CheckoutUtilityResponse) HasOriginKeys() bool { - if o != nil && !common.IsNil(o.OriginKeys) { - return true - } - - return false -} - -// SetOriginKeys gets a reference to the given map[string]string and assigns it to the OriginKeys field. -func (o *CheckoutUtilityResponse) SetOriginKeys(v map[string]string) { - o.OriginKeys = &v -} - -func (o CheckoutUtilityResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CheckoutUtilityResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.OriginKeys) { - toSerialize["originKeys"] = o.OriginKeys - } - return toSerialize, nil -} - -type NullableCheckoutUtilityResponse struct { - value *CheckoutUtilityResponse - isSet bool -} - -func (v NullableCheckoutUtilityResponse) Get() *CheckoutUtilityResponse { - return v.value -} - -func (v *NullableCheckoutUtilityResponse) Set(val *CheckoutUtilityResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCheckoutUtilityResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCheckoutUtilityResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCheckoutUtilityResponse(val *CheckoutUtilityResponse) *NullableCheckoutUtilityResponse { - return &NullableCheckoutUtilityResponse{value: val, isSet: true} -} - -func (v NullableCheckoutUtilityResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCheckoutUtilityResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_checkout_voucher_action.go b/src/checkout/model_checkout_voucher_action.go index 8c27d140c..2820d6837 100644 --- a/src/checkout/model_checkout_voucher_action.go +++ b/src/checkout/model_checkout_voucher_action.go @@ -40,6 +40,8 @@ type CheckoutVoucherAction struct { MerchantName *string `json:"merchantName,omitempty"` // The merchant reference. MerchantReference *string `json:"merchantReference,omitempty"` + // A base64 encoded signature of all properties + PassCreationToken *string `json:"passCreationToken,omitempty"` // A value that must be submitted to the `/payments/details` endpoint to verify this payment. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. @@ -428,6 +430,38 @@ func (o *CheckoutVoucherAction) SetMerchantReference(v string) { o.MerchantReference = &v } +// GetPassCreationToken returns the PassCreationToken field value if set, zero value otherwise. +func (o *CheckoutVoucherAction) GetPassCreationToken() string { + if o == nil || common.IsNil(o.PassCreationToken) { + var ret string + return ret + } + return *o.PassCreationToken +} + +// GetPassCreationTokenOk returns a tuple with the PassCreationToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckoutVoucherAction) GetPassCreationTokenOk() (*string, bool) { + if o == nil || common.IsNil(o.PassCreationToken) { + return nil, false + } + return o.PassCreationToken, true +} + +// HasPassCreationToken returns a boolean if a field has been set. +func (o *CheckoutVoucherAction) HasPassCreationToken() bool { + if o != nil && !common.IsNil(o.PassCreationToken) { + return true + } + + return false +} + +// SetPassCreationToken gets a reference to the given string and assigns it to the PassCreationToken field. +func (o *CheckoutVoucherAction) SetPassCreationToken(v string) { + o.PassCreationToken = &v +} + // GetPaymentData returns the PaymentData field value if set, zero value otherwise. func (o *CheckoutVoucherAction) GetPaymentData() string { if o == nil || common.IsNil(o.PaymentData) { @@ -751,6 +785,9 @@ func (o CheckoutVoucherAction) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.MerchantReference) { toSerialize["merchantReference"] = o.MerchantReference } + if !common.IsNil(o.PassCreationToken) { + toSerialize["passCreationToken"] = o.PassCreationToken + } if !common.IsNil(o.PaymentData) { toSerialize["paymentData"] = o.PaymentData } diff --git a/src/checkout/model_create_apple_pay_session_request.go b/src/checkout/model_create_apple_pay_session_request.go deleted file mode 100644 index af2b85dc9..000000000 --- a/src/checkout/model_create_apple_pay_session_request.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreateApplePaySessionRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreateApplePaySessionRequest{} - -// CreateApplePaySessionRequest struct for CreateApplePaySessionRequest -type CreateApplePaySessionRequest struct { - // This is the name that your shoppers will see in the Apple Pay interface. The value returned as `configuration.merchantName` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - DisplayName string `json:"displayName"` - // The domain name you provided when you added Apple Pay in your Customer Area. This must match the `window.location.hostname` of the web shop. - DomainName string `json:"domainName"` - // Your merchant identifier registered with Apple Pay. Use the value of the `configuration.merchantId` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - MerchantIdentifier string `json:"merchantIdentifier"` -} - -// NewCreateApplePaySessionRequest instantiates a new CreateApplePaySessionRequest 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 NewCreateApplePaySessionRequest(displayName string, domainName string, merchantIdentifier string) *CreateApplePaySessionRequest { - this := CreateApplePaySessionRequest{} - this.DisplayName = displayName - this.DomainName = domainName - this.MerchantIdentifier = merchantIdentifier - return &this -} - -// NewCreateApplePaySessionRequestWithDefaults instantiates a new CreateApplePaySessionRequest 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 NewCreateApplePaySessionRequestWithDefaults() *CreateApplePaySessionRequest { - this := CreateApplePaySessionRequest{} - return &this -} - -// GetDisplayName returns the DisplayName field value -func (o *CreateApplePaySessionRequest) GetDisplayName() string { - if o == nil { - var ret string - return ret - } - - return o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value -// and a boolean to check if the value has been set. -func (o *CreateApplePaySessionRequest) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DisplayName, true -} - -// SetDisplayName sets field value -func (o *CreateApplePaySessionRequest) SetDisplayName(v string) { - o.DisplayName = v -} - -// GetDomainName returns the DomainName field value -func (o *CreateApplePaySessionRequest) GetDomainName() string { - if o == nil { - var ret string - return ret - } - - return o.DomainName -} - -// GetDomainNameOk returns a tuple with the DomainName field value -// and a boolean to check if the value has been set. -func (o *CreateApplePaySessionRequest) GetDomainNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DomainName, true -} - -// SetDomainName sets field value -func (o *CreateApplePaySessionRequest) SetDomainName(v string) { - o.DomainName = v -} - -// GetMerchantIdentifier returns the MerchantIdentifier field value -func (o *CreateApplePaySessionRequest) GetMerchantIdentifier() string { - if o == nil { - var ret string - return ret - } - - return o.MerchantIdentifier -} - -// GetMerchantIdentifierOk returns a tuple with the MerchantIdentifier field value -// and a boolean to check if the value has been set. -func (o *CreateApplePaySessionRequest) GetMerchantIdentifierOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantIdentifier, true -} - -// SetMerchantIdentifier sets field value -func (o *CreateApplePaySessionRequest) SetMerchantIdentifier(v string) { - o.MerchantIdentifier = v -} - -func (o CreateApplePaySessionRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateApplePaySessionRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["displayName"] = o.DisplayName - toSerialize["domainName"] = o.DomainName - toSerialize["merchantIdentifier"] = o.MerchantIdentifier - return toSerialize, nil -} - -type NullableCreateApplePaySessionRequest struct { - value *CreateApplePaySessionRequest - isSet bool -} - -func (v NullableCreateApplePaySessionRequest) Get() *CreateApplePaySessionRequest { - return v.value -} - -func (v *NullableCreateApplePaySessionRequest) Set(val *CreateApplePaySessionRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateApplePaySessionRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateApplePaySessionRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateApplePaySessionRequest(val *CreateApplePaySessionRequest) *NullableCreateApplePaySessionRequest { - return &NullableCreateApplePaySessionRequest{value: val, isSet: true} -} - -func (v NullableCreateApplePaySessionRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateApplePaySessionRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index a76f1fbad..2b12d4406 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -29,7 +29,7 @@ type CreateCheckoutSessionRequest struct { Amount Amount `json:"amount"` ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` + BillingAddress *BillingAddress `json:"billingAddress,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\",\"giropay\"]` BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` // The delay between the authorisation and scheduled auto-capture, specified in hours. @@ -42,8 +42,8 @@ type CreateCheckoutSessionRequest struct { // The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD DateOfBirth *string `json:"dateOfBirth,omitempty"` // The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - DeliverAt *time.Time `json:"deliverAt,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` + DeliverAt *time.Time `json:"deliverAt,omitempty"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. EnableOneClick *bool `json:"enableOneClick,omitempty"` // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. @@ -66,8 +66,9 @@ type CreateCheckoutSessionRequest struct { // This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. MerchantOrderReference *string `json:"merchantOrderReference,omitempty"` // Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. - Metadata *map[string]string `json:"metadata,omitempty"` - MpiData *ThreeDSecureData `json:"mpiData,omitempty"` + Metadata *map[string]string `json:"metadata,omitempty"` + MpiData *ThreeDSecureData `json:"mpiData,omitempty"` + PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // Date after which no further authorisations shall be performed. Only for 3D Secure 2. RecurringExpiry *string `json:"recurringExpiry,omitempty"` // Minimum number of days between authorisations. Only for 3D Secure 2. @@ -100,9 +101,9 @@ type CreateCheckoutSessionRequest struct { SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` // Boolean value indicating whether the card payment method should be split into separate debit and credit options. SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` - // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + // An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. + // The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). Store *string `json:"store,omitempty"` // When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` @@ -363,9 +364,9 @@ func (o *CreateCheckoutSessionRequest) SetAuthenticationData(v AuthenticationDat } // GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *CreateCheckoutSessionRequest) GetBillingAddress() Address { +func (o *CreateCheckoutSessionRequest) GetBillingAddress() BillingAddress { if o == nil || common.IsNil(o.BillingAddress) { - var ret Address + var ret BillingAddress return ret } return *o.BillingAddress @@ -373,7 +374,7 @@ func (o *CreateCheckoutSessionRequest) GetBillingAddress() Address { // GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionRequest) GetBillingAddressOk() (*Address, bool) { +func (o *CreateCheckoutSessionRequest) GetBillingAddressOk() (*BillingAddress, bool) { if o == nil || common.IsNil(o.BillingAddress) { return nil, false } @@ -389,8 +390,8 @@ func (o *CreateCheckoutSessionRequest) HasBillingAddress() bool { return false } -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *CreateCheckoutSessionRequest) SetBillingAddress(v Address) { +// SetBillingAddress gets a reference to the given BillingAddress and assigns it to the BillingAddress field. +func (o *CreateCheckoutSessionRequest) SetBillingAddress(v BillingAddress) { o.BillingAddress = &v } @@ -619,9 +620,9 @@ func (o *CreateCheckoutSessionRequest) SetDeliverAt(v time.Time) { } // GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *CreateCheckoutSessionRequest) GetDeliveryAddress() Address { +func (o *CreateCheckoutSessionRequest) GetDeliveryAddress() DeliveryAddress { if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address + var ret DeliveryAddress return ret } return *o.DeliveryAddress @@ -629,7 +630,7 @@ func (o *CreateCheckoutSessionRequest) GetDeliveryAddress() Address { // GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionRequest) GetDeliveryAddressOk() (*Address, bool) { +func (o *CreateCheckoutSessionRequest) GetDeliveryAddressOk() (*DeliveryAddress, bool) { if o == nil || common.IsNil(o.DeliveryAddress) { return nil, false } @@ -645,8 +646,8 @@ func (o *CreateCheckoutSessionRequest) HasDeliveryAddress() bool { return false } -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *CreateCheckoutSessionRequest) SetDeliveryAddress(v Address) { +// SetDeliveryAddress gets a reference to the given DeliveryAddress and assigns it to the DeliveryAddress field. +func (o *CreateCheckoutSessionRequest) SetDeliveryAddress(v DeliveryAddress) { o.DeliveryAddress = &v } @@ -1090,6 +1091,38 @@ func (o *CreateCheckoutSessionRequest) SetMpiData(v ThreeDSecureData) { o.MpiData = &v } +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *CreateCheckoutSessionRequest) GetPlatformChargebackLogic() PlatformChargebackLogic { + if o == nil || common.IsNil(o.PlatformChargebackLogic) { + var ret PlatformChargebackLogic + return ret + } + return *o.PlatformChargebackLogic +} + +// GetPlatformChargebackLogicOk returns a tuple with the PlatformChargebackLogic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCheckoutSessionRequest) GetPlatformChargebackLogicOk() (*PlatformChargebackLogic, bool) { + if o == nil || common.IsNil(o.PlatformChargebackLogic) { + return nil, false + } + return o.PlatformChargebackLogic, true +} + +// HasPlatformChargebackLogic returns a boolean if a field has been set. +func (o *CreateCheckoutSessionRequest) HasPlatformChargebackLogic() bool { + if o != nil && !common.IsNil(o.PlatformChargebackLogic) { + return true + } + + return false +} + +// SetPlatformChargebackLogic gets a reference to the given PlatformChargebackLogic and assigns it to the PlatformChargebackLogic field. +func (o *CreateCheckoutSessionRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + // GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. func (o *CreateCheckoutSessionRequest) GetRecurringExpiry() string { if o == nil || common.IsNil(o.RecurringExpiry) { @@ -1941,6 +1974,9 @@ func (o CreateCheckoutSessionRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.MpiData) { toSerialize["mpiData"] = o.MpiData } + if !common.IsNil(o.PlatformChargebackLogic) { + toSerialize["platformChargebackLogic"] = o.PlatformChargebackLogic + } if !common.IsNil(o.RecurringExpiry) { toSerialize["recurringExpiry"] = o.RecurringExpiry } diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 304aaa8fb..01e488960 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -29,7 +29,7 @@ type CreateCheckoutSessionResponse struct { Amount Amount `json:"amount"` ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` + BillingAddress *BillingAddress `json:"billingAddress,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\",\"giropay\"]` BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` // The delay between the authorisation and scheduled auto-capture, specified in hours. @@ -39,11 +39,11 @@ type CreateCheckoutSessionResponse struct { Company *Company `json:"company,omitempty"` // The shopper's two-letter country code. CountryCode *string `json:"countryCode,omitempty"` - // The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` + // The shopper's date of birth in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + DateOfBirth *time.Time `json:"dateOfBirth,omitempty"` // The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - DeliverAt *time.Time `json:"deliverAt,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` + DeliverAt *time.Time `json:"deliverAt,omitempty"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. EnableOneClick *bool `json:"enableOneClick,omitempty"` // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. @@ -70,8 +70,9 @@ type CreateCheckoutSessionResponse struct { // Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. Metadata *map[string]string `json:"metadata,omitempty"` // Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - Mode *string `json:"mode,omitempty"` - MpiData *ThreeDSecureData `json:"mpiData,omitempty"` + Mode *string `json:"mode,omitempty"` + MpiData *ThreeDSecureData `json:"mpiData,omitempty"` + PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // Date after which no further authorisations shall be performed. Only for 3D Secure 2. RecurringExpiry *string `json:"recurringExpiry,omitempty"` // Minimum number of days between authorisations. Only for 3D Secure 2. @@ -106,9 +107,9 @@ type CreateCheckoutSessionResponse struct { SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` // Boolean value indicating whether the card payment method should be split into separate debit and credit options. SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` - // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). + // An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. + // The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). Store *string `json:"store,omitempty"` // When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` @@ -375,9 +376,9 @@ func (o *CreateCheckoutSessionResponse) SetAuthenticationData(v AuthenticationDa } // GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *CreateCheckoutSessionResponse) GetBillingAddress() Address { +func (o *CreateCheckoutSessionResponse) GetBillingAddress() BillingAddress { if o == nil || common.IsNil(o.BillingAddress) { - var ret Address + var ret BillingAddress return ret } return *o.BillingAddress @@ -385,7 +386,7 @@ func (o *CreateCheckoutSessionResponse) GetBillingAddress() Address { // GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionResponse) GetBillingAddressOk() (*Address, bool) { +func (o *CreateCheckoutSessionResponse) GetBillingAddressOk() (*BillingAddress, bool) { if o == nil || common.IsNil(o.BillingAddress) { return nil, false } @@ -401,8 +402,8 @@ func (o *CreateCheckoutSessionResponse) HasBillingAddress() bool { return false } -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *CreateCheckoutSessionResponse) SetBillingAddress(v Address) { +// SetBillingAddress gets a reference to the given BillingAddress and assigns it to the BillingAddress field. +func (o *CreateCheckoutSessionResponse) SetBillingAddress(v BillingAddress) { o.BillingAddress = &v } @@ -567,9 +568,9 @@ func (o *CreateCheckoutSessionResponse) SetCountryCode(v string) { } // GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *CreateCheckoutSessionResponse) GetDateOfBirth() string { +func (o *CreateCheckoutSessionResponse) GetDateOfBirth() time.Time { if o == nil || common.IsNil(o.DateOfBirth) { - var ret string + var ret time.Time return ret } return *o.DateOfBirth @@ -577,7 +578,7 @@ func (o *CreateCheckoutSessionResponse) GetDateOfBirth() string { // GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionResponse) GetDateOfBirthOk() (*string, bool) { +func (o *CreateCheckoutSessionResponse) GetDateOfBirthOk() (*time.Time, bool) { if o == nil || common.IsNil(o.DateOfBirth) { return nil, false } @@ -593,8 +594,8 @@ func (o *CreateCheckoutSessionResponse) HasDateOfBirth() bool { return false } -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *CreateCheckoutSessionResponse) SetDateOfBirth(v string) { +// SetDateOfBirth gets a reference to the given time.Time and assigns it to the DateOfBirth field. +func (o *CreateCheckoutSessionResponse) SetDateOfBirth(v time.Time) { o.DateOfBirth = &v } @@ -631,9 +632,9 @@ func (o *CreateCheckoutSessionResponse) SetDeliverAt(v time.Time) { } // GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *CreateCheckoutSessionResponse) GetDeliveryAddress() Address { +func (o *CreateCheckoutSessionResponse) GetDeliveryAddress() DeliveryAddress { if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address + var ret DeliveryAddress return ret } return *o.DeliveryAddress @@ -641,7 +642,7 @@ func (o *CreateCheckoutSessionResponse) GetDeliveryAddress() Address { // GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCheckoutSessionResponse) GetDeliveryAddressOk() (*Address, bool) { +func (o *CreateCheckoutSessionResponse) GetDeliveryAddressOk() (*DeliveryAddress, bool) { if o == nil || common.IsNil(o.DeliveryAddress) { return nil, false } @@ -657,8 +658,8 @@ func (o *CreateCheckoutSessionResponse) HasDeliveryAddress() bool { return false } -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *CreateCheckoutSessionResponse) SetDeliveryAddress(v Address) { +// SetDeliveryAddress gets a reference to the given DeliveryAddress and assigns it to the DeliveryAddress field. +func (o *CreateCheckoutSessionResponse) SetDeliveryAddress(v DeliveryAddress) { o.DeliveryAddress = &v } @@ -1150,6 +1151,38 @@ func (o *CreateCheckoutSessionResponse) SetMpiData(v ThreeDSecureData) { o.MpiData = &v } +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *CreateCheckoutSessionResponse) GetPlatformChargebackLogic() PlatformChargebackLogic { + if o == nil || common.IsNil(o.PlatformChargebackLogic) { + var ret PlatformChargebackLogic + return ret + } + return *o.PlatformChargebackLogic +} + +// GetPlatformChargebackLogicOk returns a tuple with the PlatformChargebackLogic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCheckoutSessionResponse) GetPlatformChargebackLogicOk() (*PlatformChargebackLogic, bool) { + if o == nil || common.IsNil(o.PlatformChargebackLogic) { + return nil, false + } + return o.PlatformChargebackLogic, true +} + +// HasPlatformChargebackLogic returns a boolean if a field has been set. +func (o *CreateCheckoutSessionResponse) HasPlatformChargebackLogic() bool { + if o != nil && !common.IsNil(o.PlatformChargebackLogic) { + return true + } + + return false +} + +// SetPlatformChargebackLogic gets a reference to the given PlatformChargebackLogic and assigns it to the PlatformChargebackLogic field. +func (o *CreateCheckoutSessionResponse) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + // GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. func (o *CreateCheckoutSessionResponse) GetRecurringExpiry() string { if o == nil || common.IsNil(o.RecurringExpiry) { @@ -2035,6 +2068,9 @@ func (o CreateCheckoutSessionResponse) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.MpiData) { toSerialize["mpiData"] = o.MpiData } + if !common.IsNil(o.PlatformChargebackLogic) { + toSerialize["platformChargebackLogic"] = o.PlatformChargebackLogic + } if !common.IsNil(o.RecurringExpiry) { toSerialize["recurringExpiry"] = o.RecurringExpiry } diff --git a/src/checkout/model_create_payment_amount_update_request.go b/src/checkout/model_create_payment_amount_update_request.go deleted file mode 100644 index 31c3eea05..000000000 --- a/src/checkout/model_create_payment_amount_update_request.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentAmountUpdateRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentAmountUpdateRequest{} - -// CreatePaymentAmountUpdateRequest struct for CreatePaymentAmountUpdateRequest -type CreatePaymentAmountUpdateRequest struct { - Amount Amount `json:"amount"` - // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - IndustryUsage *string `json:"industryUsage,omitempty"` - // The merchant account that is used to process the payment. - MerchantAccount string `json:"merchantAccount"` - // Your reference for the amount update request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` -} - -// NewCreatePaymentAmountUpdateRequest instantiates a new CreatePaymentAmountUpdateRequest 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 NewCreatePaymentAmountUpdateRequest(amount Amount, merchantAccount string) *CreatePaymentAmountUpdateRequest { - this := CreatePaymentAmountUpdateRequest{} - this.Amount = amount - this.MerchantAccount = merchantAccount - return &this -} - -// NewCreatePaymentAmountUpdateRequestWithDefaults instantiates a new CreatePaymentAmountUpdateRequest 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 NewCreatePaymentAmountUpdateRequestWithDefaults() *CreatePaymentAmountUpdateRequest { - this := CreatePaymentAmountUpdateRequest{} - return &this -} - -// GetAmount returns the Amount field value -func (o *CreatePaymentAmountUpdateRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CreatePaymentAmountUpdateRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CreatePaymentAmountUpdateRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. -func (o *CreatePaymentAmountUpdateRequest) GetIndustryUsage() string { - if o == nil || common.IsNil(o.IndustryUsage) { - var ret string - return ret - } - return *o.IndustryUsage -} - -// GetIndustryUsageOk returns a tuple with the IndustryUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentAmountUpdateRequest) GetIndustryUsageOk() (*string, bool) { - if o == nil || common.IsNil(o.IndustryUsage) { - return nil, false - } - return o.IndustryUsage, true -} - -// HasIndustryUsage returns a boolean if a field has been set. -func (o *CreatePaymentAmountUpdateRequest) HasIndustryUsage() bool { - if o != nil && !common.IsNil(o.IndustryUsage) { - return true - } - - return false -} - -// SetIndustryUsage gets a reference to the given string and assigns it to the IndustryUsage field. -func (o *CreatePaymentAmountUpdateRequest) SetIndustryUsage(v string) { - o.IndustryUsage = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentAmountUpdateRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) SetReference(v string) { - o.Reference = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *CreatePaymentAmountUpdateRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentAmountUpdateRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *CreatePaymentAmountUpdateRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *CreatePaymentAmountUpdateRequest) SetSplits(v []Split) { - o.Splits = v -} - -func (o CreatePaymentAmountUpdateRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentAmountUpdateRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.IndustryUsage) { - toSerialize["industryUsage"] = o.IndustryUsage - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - return toSerialize, nil -} - -type NullableCreatePaymentAmountUpdateRequest struct { - value *CreatePaymentAmountUpdateRequest - isSet bool -} - -func (v NullableCreatePaymentAmountUpdateRequest) Get() *CreatePaymentAmountUpdateRequest { - return v.value -} - -func (v *NullableCreatePaymentAmountUpdateRequest) Set(val *CreatePaymentAmountUpdateRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentAmountUpdateRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentAmountUpdateRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentAmountUpdateRequest(val *CreatePaymentAmountUpdateRequest) *NullableCreatePaymentAmountUpdateRequest { - return &NullableCreatePaymentAmountUpdateRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentAmountUpdateRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentAmountUpdateRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CreatePaymentAmountUpdateRequest) isValidIndustryUsage() bool { - var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} - for _, allowed := range allowedEnumValues { - if o.GetIndustryUsage() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_create_payment_cancel_request.go b/src/checkout/model_create_payment_cancel_request.go deleted file mode 100644 index 62d0d2e29..000000000 --- a/src/checkout/model_create_payment_cancel_request.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentCancelRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentCancelRequest{} - -// CreatePaymentCancelRequest struct for CreatePaymentCancelRequest -type CreatePaymentCancelRequest struct { - // The merchant account that is used to process the payment. - MerchantAccount string `json:"merchantAccount"` - // Your reference for the cancel request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` -} - -// NewCreatePaymentCancelRequest instantiates a new CreatePaymentCancelRequest 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 NewCreatePaymentCancelRequest(merchantAccount string) *CreatePaymentCancelRequest { - this := CreatePaymentCancelRequest{} - this.MerchantAccount = merchantAccount - return &this -} - -// NewCreatePaymentCancelRequestWithDefaults instantiates a new CreatePaymentCancelRequest 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 NewCreatePaymentCancelRequestWithDefaults() *CreatePaymentCancelRequest { - this := CreatePaymentCancelRequest{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentCancelRequest) 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 *CreatePaymentCancelRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentCancelRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreatePaymentCancelRequest) 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 *CreatePaymentCancelRequest) 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 *CreatePaymentCancelRequest) 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 *CreatePaymentCancelRequest) SetReference(v string) { - o.Reference = &v -} - -func (o CreatePaymentCancelRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentCancelRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - return toSerialize, nil -} - -type NullableCreatePaymentCancelRequest struct { - value *CreatePaymentCancelRequest - isSet bool -} - -func (v NullableCreatePaymentCancelRequest) Get() *CreatePaymentCancelRequest { - return v.value -} - -func (v *NullableCreatePaymentCancelRequest) Set(val *CreatePaymentCancelRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentCancelRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentCancelRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentCancelRequest(val *CreatePaymentCancelRequest) *NullableCreatePaymentCancelRequest { - return &NullableCreatePaymentCancelRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentCancelRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentCancelRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_create_payment_capture_request.go b/src/checkout/model_create_payment_capture_request.go deleted file mode 100644 index be76c5768..000000000 --- a/src/checkout/model_create_payment_capture_request.go +++ /dev/null @@ -1,254 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentCaptureRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentCaptureRequest{} - -// CreatePaymentCaptureRequest struct for CreatePaymentCaptureRequest -type CreatePaymentCaptureRequest struct { - Amount Amount `json:"amount"` - // 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. - MerchantAccount string `json:"merchantAccount"` - // Your reference for the capture request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` -} - -// NewCreatePaymentCaptureRequest instantiates a new CreatePaymentCaptureRequest 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 NewCreatePaymentCaptureRequest(amount Amount, merchantAccount string) *CreatePaymentCaptureRequest { - this := CreatePaymentCaptureRequest{} - this.Amount = amount - this.MerchantAccount = merchantAccount - return &this -} - -// NewCreatePaymentCaptureRequestWithDefaults instantiates a new CreatePaymentCaptureRequest 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 NewCreatePaymentCaptureRequestWithDefaults() *CreatePaymentCaptureRequest { - this := CreatePaymentCaptureRequest{} - return &this -} - -// GetAmount returns the Amount field value -func (o *CreatePaymentCaptureRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CreatePaymentCaptureRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CreatePaymentCaptureRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *CreatePaymentCaptureRequest) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentCaptureRequest) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *CreatePaymentCaptureRequest) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *CreatePaymentCaptureRequest) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentCaptureRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) SetReference(v string) { - o.Reference = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *CreatePaymentCaptureRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentCaptureRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *CreatePaymentCaptureRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *CreatePaymentCaptureRequest) SetSplits(v []Split) { - o.Splits = v -} - -func (o CreatePaymentCaptureRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentCaptureRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - return toSerialize, nil -} - -type NullableCreatePaymentCaptureRequest struct { - value *CreatePaymentCaptureRequest - isSet bool -} - -func (v NullableCreatePaymentCaptureRequest) Get() *CreatePaymentCaptureRequest { - return v.value -} - -func (v *NullableCreatePaymentCaptureRequest) Set(val *CreatePaymentCaptureRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentCaptureRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentCaptureRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentCaptureRequest(val *CreatePaymentCaptureRequest) *NullableCreatePaymentCaptureRequest { - return &NullableCreatePaymentCaptureRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentCaptureRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentCaptureRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_create_payment_link_request.go b/src/checkout/model_create_payment_link_request.go deleted file mode 100644 index cb090b7b1..000000000 --- a/src/checkout/model_create_payment_link_request.go +++ /dev/null @@ -1,1489 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - "time" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentLinkRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentLinkRequest{} - -// CreatePaymentLinkRequest struct for CreatePaymentLinkRequest -type CreatePaymentLinkRequest struct { - // List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` - AllowedPaymentMethods []string `json:"allowedPaymentMethods,omitempty"` - Amount Amount `json:"amount"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` - BillingAddress *Address `json:"billingAddress,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\",\"giropay\"]` - BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` - // The delay between the authorisation and scheduled auto-capture, specified in hours. - CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` - // The shopper's two-letter country code. - CountryCode *string `json:"countryCode,omitempty"` - // The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` - // The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - DeliverAt *time.Time `json:"deliverAt,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` - // A short description visible on the payment page. Maximum length: 280 characters. - Description *string `json:"description,omitempty"` - // The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. - ExpiresAt *string `json:"expiresAt,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, and Zip. - 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"` - // 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. - Mcc *string `json:"mcc,omitempty"` - // The merchant account identifier for which the payment link is created. - MerchantAccount string `json:"merchantAccount"` - // This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - MerchantOrderReference *string `json:"merchantOrderReference,omitempty"` - // Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. - Metadata *map[string]string `json:"metadata,omitempty"` - // Defines a recurring payment type. Required when creating a token to store payment details. Possible 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 has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - RecurringProcessingModel *string `json:"recurringProcessingModel,omitempty"` - // A reference that is used to uniquely identify the payment in future communications about the payment status. - Reference string `json:"reference"` - // List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. - RequiredShopperFields []string `json:"requiredShopperFields,omitempty"` - // Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - ReturnUrl *string `json:"returnUrl,omitempty"` - // Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - Reusable *bool `json:"reusable,omitempty"` - RiskData *RiskData `json:"riskData,omitempty"` - // The shopper's email address. - ShopperEmail *string `json:"shopperEmail,omitempty"` - // The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` - // 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 **. , ' _ - ? + * /_**. - ShopperStatement *string `json:"shopperStatement,omitempty"` - // Set to **false** to hide the button that lets the shopper remove a stored payment method. - ShowRemovePaymentMethodButton *bool `json:"showRemovePaymentMethodButton,omitempty"` - // The shopper's social security number. - SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // Boolean value indicating whether the card payment method should be split into separate debit and credit options. - SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` - // An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` - // The physical store, for which this payment is processed. - 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. - StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` - // The shopper's telephone number. - 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"` -} - -// NewCreatePaymentLinkRequest instantiates a new CreatePaymentLinkRequest 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 NewCreatePaymentLinkRequest(amount Amount, merchantAccount string, reference string) *CreatePaymentLinkRequest { - this := CreatePaymentLinkRequest{} - this.Amount = amount - this.MerchantAccount = merchantAccount - this.Reference = reference - var showRemovePaymentMethodButton bool = true - this.ShowRemovePaymentMethodButton = &showRemovePaymentMethodButton - var splitCardFundingSources bool = false - this.SplitCardFundingSources = &splitCardFundingSources - return &this -} - -// NewCreatePaymentLinkRequestWithDefaults instantiates a new CreatePaymentLinkRequest 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 NewCreatePaymentLinkRequestWithDefaults() *CreatePaymentLinkRequest { - this := CreatePaymentLinkRequest{} - var showRemovePaymentMethodButton bool = true - this.ShowRemovePaymentMethodButton = &showRemovePaymentMethodButton - var splitCardFundingSources bool = false - this.SplitCardFundingSources = &splitCardFundingSources - return &this -} - -// GetAllowedPaymentMethods returns the AllowedPaymentMethods field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetAllowedPaymentMethods() []string { - if o == nil || common.IsNil(o.AllowedPaymentMethods) { - var ret []string - return ret - } - return o.AllowedPaymentMethods -} - -// GetAllowedPaymentMethodsOk returns a tuple with the AllowedPaymentMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetAllowedPaymentMethodsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AllowedPaymentMethods) { - return nil, false - } - return o.AllowedPaymentMethods, true -} - -// HasAllowedPaymentMethods returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasAllowedPaymentMethods() bool { - if o != nil && !common.IsNil(o.AllowedPaymentMethods) { - return true - } - - return false -} - -// SetAllowedPaymentMethods gets a reference to the given []string and assigns it to the AllowedPaymentMethods field. -func (o *CreatePaymentLinkRequest) SetAllowedPaymentMethods(v []string) { - o.AllowedPaymentMethods = v -} - -// GetAmount returns the Amount field value -func (o *CreatePaymentLinkRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CreatePaymentLinkRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetApplicationInfo() ApplicationInfo { - if o == nil || common.IsNil(o.ApplicationInfo) { - var ret ApplicationInfo - return ret - } - return *o.ApplicationInfo -} - -// GetApplicationInfoOk returns a tuple with the ApplicationInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetApplicationInfoOk() (*ApplicationInfo, bool) { - if o == nil || common.IsNil(o.ApplicationInfo) { - return nil, false - } - return o.ApplicationInfo, true -} - -// HasApplicationInfo returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasApplicationInfo() bool { - if o != nil && !common.IsNil(o.ApplicationInfo) { - return true - } - - return false -} - -// SetApplicationInfo gets a reference to the given ApplicationInfo and assigns it to the ApplicationInfo field. -func (o *CreatePaymentLinkRequest) SetApplicationInfo(v ApplicationInfo) { - o.ApplicationInfo = &v -} - -// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetBillingAddress() Address { - if o == nil || common.IsNil(o.BillingAddress) { - var ret Address - return ret - } - return *o.BillingAddress -} - -// GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetBillingAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.BillingAddress) { - return nil, false - } - return o.BillingAddress, true -} - -// HasBillingAddress returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasBillingAddress() bool { - if o != nil && !common.IsNil(o.BillingAddress) { - return true - } - - return false -} - -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *CreatePaymentLinkRequest) SetBillingAddress(v Address) { - o.BillingAddress = &v -} - -// GetBlockedPaymentMethods returns the BlockedPaymentMethods field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetBlockedPaymentMethods() []string { - if o == nil || common.IsNil(o.BlockedPaymentMethods) { - var ret []string - return ret - } - return o.BlockedPaymentMethods -} - -// GetBlockedPaymentMethodsOk returns a tuple with the BlockedPaymentMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetBlockedPaymentMethodsOk() ([]string, bool) { - if o == nil || common.IsNil(o.BlockedPaymentMethods) { - return nil, false - } - return o.BlockedPaymentMethods, true -} - -// HasBlockedPaymentMethods returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasBlockedPaymentMethods() bool { - if o != nil && !common.IsNil(o.BlockedPaymentMethods) { - return true - } - - return false -} - -// SetBlockedPaymentMethods gets a reference to the given []string and assigns it to the BlockedPaymentMethods field. -func (o *CreatePaymentLinkRequest) SetBlockedPaymentMethods(v []string) { - o.BlockedPaymentMethods = v -} - -// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetCaptureDelayHours() int32 { - if o == nil || common.IsNil(o.CaptureDelayHours) { - var ret int32 - return ret - } - return *o.CaptureDelayHours -} - -// GetCaptureDelayHoursOk returns a tuple with the CaptureDelayHours field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetCaptureDelayHoursOk() (*int32, bool) { - if o == nil || common.IsNil(o.CaptureDelayHours) { - return nil, false - } - return o.CaptureDelayHours, true -} - -// HasCaptureDelayHours returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasCaptureDelayHours() bool { - if o != nil && !common.IsNil(o.CaptureDelayHours) { - return true - } - - return false -} - -// SetCaptureDelayHours gets a reference to the given int32 and assigns it to the CaptureDelayHours field. -func (o *CreatePaymentLinkRequest) SetCaptureDelayHours(v int32) { - o.CaptureDelayHours = &v -} - -// GetCountryCode returns the CountryCode field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetCountryCode() string { - if o == nil || common.IsNil(o.CountryCode) { - var ret string - return ret - } - return *o.CountryCode -} - -// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetCountryCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.CountryCode) { - return nil, false - } - return o.CountryCode, true -} - -// HasCountryCode returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasCountryCode() bool { - if o != nil && !common.IsNil(o.CountryCode) { - return true - } - - return false -} - -// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field. -func (o *CreatePaymentLinkRequest) SetCountryCode(v string) { - o.CountryCode = &v -} - -// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetDateOfBirth() string { - if o == nil || common.IsNil(o.DateOfBirth) { - var ret string - return ret - } - return *o.DateOfBirth -} - -// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetDateOfBirthOk() (*string, bool) { - if o == nil || common.IsNil(o.DateOfBirth) { - return nil, false - } - return o.DateOfBirth, true -} - -// HasDateOfBirth returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasDateOfBirth() bool { - if o != nil && !common.IsNil(o.DateOfBirth) { - return true - } - - return false -} - -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *CreatePaymentLinkRequest) SetDateOfBirth(v string) { - o.DateOfBirth = &v -} - -// GetDeliverAt returns the DeliverAt field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetDeliverAt() time.Time { - if o == nil || common.IsNil(o.DeliverAt) { - var ret time.Time - return ret - } - return *o.DeliverAt -} - -// GetDeliverAtOk returns a tuple with the DeliverAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetDeliverAtOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.DeliverAt) { - return nil, false - } - return o.DeliverAt, true -} - -// HasDeliverAt returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasDeliverAt() bool { - if o != nil && !common.IsNil(o.DeliverAt) { - return true - } - - return false -} - -// SetDeliverAt gets a reference to the given time.Time and assigns it to the DeliverAt field. -func (o *CreatePaymentLinkRequest) SetDeliverAt(v time.Time) { - o.DeliverAt = &v -} - -// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetDeliveryAddress() Address { - if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address - return ret - } - return *o.DeliveryAddress -} - -// GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetDeliveryAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.DeliveryAddress) { - return nil, false - } - return o.DeliveryAddress, true -} - -// HasDeliveryAddress returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasDeliveryAddress() bool { - if o != nil && !common.IsNil(o.DeliveryAddress) { - return true - } - - return false -} - -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *CreatePaymentLinkRequest) SetDeliveryAddress(v Address) { - o.DeliveryAddress = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetDescription() string { - if o == nil || common.IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetDescriptionOk() (*string, bool) { - if o == nil || common.IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasDescription() bool { - if o != nil && !common.IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *CreatePaymentLinkRequest) SetDescription(v string) { - o.Description = &v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetExpiresAt() string { - if o == nil || common.IsNil(o.ExpiresAt) { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetExpiresAtOk() (*string, bool) { - if o == nil || common.IsNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasExpiresAt() bool { - if o != nil && !common.IsNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *CreatePaymentLinkRequest) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -// GetInstallmentOptions returns the InstallmentOptions field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetInstallmentOptions() map[string]InstallmentOption { - if o == nil || common.IsNil(o.InstallmentOptions) { - var ret map[string]InstallmentOption - return ret - } - return *o.InstallmentOptions -} - -// GetInstallmentOptionsOk returns a tuple with the InstallmentOptions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetInstallmentOptionsOk() (*map[string]InstallmentOption, bool) { - if o == nil || common.IsNil(o.InstallmentOptions) { - return nil, false - } - return o.InstallmentOptions, true -} - -// HasInstallmentOptions returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasInstallmentOptions() bool { - if o != nil && !common.IsNil(o.InstallmentOptions) { - return true - } - - return false -} - -// SetInstallmentOptions gets a reference to the given map[string]InstallmentOption and assigns it to the InstallmentOptions field. -func (o *CreatePaymentLinkRequest) SetInstallmentOptions(v map[string]InstallmentOption) { - o.InstallmentOptions = &v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *CreatePaymentLinkRequest) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetManualCapture returns the ManualCapture field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetManualCapture() bool { - if o == nil || common.IsNil(o.ManualCapture) { - var ret bool - return ret - } - return *o.ManualCapture -} - -// GetManualCaptureOk returns a tuple with the ManualCapture field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetManualCaptureOk() (*bool, bool) { - if o == nil || common.IsNil(o.ManualCapture) { - return nil, false - } - return o.ManualCapture, true -} - -// HasManualCapture returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasManualCapture() bool { - if o != nil && !common.IsNil(o.ManualCapture) { - return true - } - - return false -} - -// SetManualCapture gets a reference to the given bool and assigns it to the ManualCapture field. -func (o *CreatePaymentLinkRequest) SetManualCapture(v bool) { - o.ManualCapture = &v -} - -// GetMcc returns the Mcc field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetMcc() string { - if o == nil || common.IsNil(o.Mcc) { - var ret string - return ret - } - return *o.Mcc -} - -// GetMccOk returns a tuple with the Mcc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetMccOk() (*string, bool) { - if o == nil || common.IsNil(o.Mcc) { - return nil, false - } - return o.Mcc, true -} - -// HasMcc returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasMcc() bool { - if o != nil && !common.IsNil(o.Mcc) { - return true - } - - return false -} - -// SetMcc gets a reference to the given string and assigns it to the Mcc field. -func (o *CreatePaymentLinkRequest) SetMcc(v string) { - o.Mcc = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentLinkRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetMerchantOrderReference() string { - if o == nil || common.IsNil(o.MerchantOrderReference) { - var ret string - return ret - } - return *o.MerchantOrderReference -} - -// GetMerchantOrderReferenceOk returns a tuple with the MerchantOrderReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetMerchantOrderReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantOrderReference) { - return nil, false - } - return o.MerchantOrderReference, true -} - -// HasMerchantOrderReference returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasMerchantOrderReference() bool { - if o != nil && !common.IsNil(o.MerchantOrderReference) { - return true - } - - return false -} - -// SetMerchantOrderReference gets a reference to the given string and assigns it to the MerchantOrderReference field. -func (o *CreatePaymentLinkRequest) SetMerchantOrderReference(v string) { - o.MerchantOrderReference = &v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetMetadata() map[string]string { - if o == nil || common.IsNil(o.Metadata) { - var ret map[string]string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetMetadataOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasMetadata() bool { - if o != nil && !common.IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. -func (o *CreatePaymentLinkRequest) SetMetadata(v map[string]string) { - o.Metadata = &v -} - -// GetRecurringProcessingModel returns the RecurringProcessingModel field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetRecurringProcessingModel() string { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - var ret string - return ret - } - return *o.RecurringProcessingModel -} - -// GetRecurringProcessingModelOk returns a tuple with the RecurringProcessingModel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetRecurringProcessingModelOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - return nil, false - } - return o.RecurringProcessingModel, true -} - -// HasRecurringProcessingModel returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasRecurringProcessingModel() bool { - if o != nil && !common.IsNil(o.RecurringProcessingModel) { - return true - } - - return false -} - -// SetRecurringProcessingModel gets a reference to the given string and assigns it to the RecurringProcessingModel field. -func (o *CreatePaymentLinkRequest) SetRecurringProcessingModel(v string) { - o.RecurringProcessingModel = &v -} - -// GetReference returns the Reference field value -func (o *CreatePaymentLinkRequest) GetReference() string { - if o == nil { - var ret string - return ret - } - - return o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *CreatePaymentLinkRequest) SetReference(v string) { - o.Reference = v -} - -// GetRequiredShopperFields returns the RequiredShopperFields field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetRequiredShopperFields() []string { - if o == nil || common.IsNil(o.RequiredShopperFields) { - var ret []string - return ret - } - return o.RequiredShopperFields -} - -// GetRequiredShopperFieldsOk returns a tuple with the RequiredShopperFields field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetRequiredShopperFieldsOk() ([]string, bool) { - if o == nil || common.IsNil(o.RequiredShopperFields) { - return nil, false - } - return o.RequiredShopperFields, true -} - -// HasRequiredShopperFields returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasRequiredShopperFields() bool { - if o != nil && !common.IsNil(o.RequiredShopperFields) { - return true - } - - return false -} - -// SetRequiredShopperFields gets a reference to the given []string and assigns it to the RequiredShopperFields field. -func (o *CreatePaymentLinkRequest) SetRequiredShopperFields(v []string) { - o.RequiredShopperFields = v -} - -// GetReturnUrl returns the ReturnUrl field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetReturnUrl() string { - if o == nil || common.IsNil(o.ReturnUrl) { - var ret string - return ret - } - return *o.ReturnUrl -} - -// GetReturnUrlOk returns a tuple with the ReturnUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetReturnUrlOk() (*string, bool) { - if o == nil || common.IsNil(o.ReturnUrl) { - return nil, false - } - return o.ReturnUrl, true -} - -// HasReturnUrl returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasReturnUrl() bool { - if o != nil && !common.IsNil(o.ReturnUrl) { - return true - } - - return false -} - -// SetReturnUrl gets a reference to the given string and assigns it to the ReturnUrl field. -func (o *CreatePaymentLinkRequest) SetReturnUrl(v string) { - o.ReturnUrl = &v -} - -// GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetReusable() bool { - if o == nil || common.IsNil(o.Reusable) { - var ret bool - return ret - } - return *o.Reusable -} - -// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetReusableOk() (*bool, bool) { - if o == nil || common.IsNil(o.Reusable) { - return nil, false - } - return o.Reusable, true -} - -// HasReusable returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasReusable() bool { - if o != nil && !common.IsNil(o.Reusable) { - return true - } - - return false -} - -// SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *CreatePaymentLinkRequest) SetReusable(v bool) { - o.Reusable = &v -} - -// GetRiskData returns the RiskData field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetRiskData() RiskData { - if o == nil || common.IsNil(o.RiskData) { - var ret RiskData - return ret - } - return *o.RiskData -} - -// GetRiskDataOk returns a tuple with the RiskData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetRiskDataOk() (*RiskData, bool) { - if o == nil || common.IsNil(o.RiskData) { - return nil, false - } - return o.RiskData, true -} - -// HasRiskData returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasRiskData() bool { - if o != nil && !common.IsNil(o.RiskData) { - return true - } - - return false -} - -// SetRiskData gets a reference to the given RiskData and assigns it to the RiskData field. -func (o *CreatePaymentLinkRequest) SetRiskData(v RiskData) { - o.RiskData = &v -} - -// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) SetShopperEmail(v string) { - o.ShopperEmail = &v -} - -// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetShopperLocale() string { - if o == nil || common.IsNil(o.ShopperLocale) { - var ret string - return ret - } - return *o.ShopperLocale -} - -// GetShopperLocaleOk returns a tuple with the ShopperLocale field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetShopperLocaleOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperLocale) { - return nil, false - } - return o.ShopperLocale, true -} - -// HasShopperLocale returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasShopperLocale() bool { - if o != nil && !common.IsNil(o.ShopperLocale) { - return true - } - - return false -} - -// SetShopperLocale gets a reference to the given string and assigns it to the ShopperLocale field. -func (o *CreatePaymentLinkRequest) SetShopperLocale(v string) { - o.ShopperLocale = &v -} - -// GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetShopperName() Name { - if o == nil || common.IsNil(o.ShopperName) { - var ret Name - return ret - } - return *o.ShopperName -} - -// 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 *CreatePaymentLinkRequest) GetShopperNameOk() (*Name, bool) { - if o == nil || common.IsNil(o.ShopperName) { - return nil, false - } - return o.ShopperName, true -} - -// HasShopperName returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasShopperName() bool { - if o != nil && !common.IsNil(o.ShopperName) { - return true - } - - return false -} - -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *CreatePaymentLinkRequest) SetShopperName(v Name) { - o.ShopperName = &v -} - -// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) SetShopperReference(v string) { - o.ShopperReference = &v -} - -// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetShopperStatement() string { - if o == nil || common.IsNil(o.ShopperStatement) { - var ret string - return ret - } - return *o.ShopperStatement -} - -// GetShopperStatementOk returns a tuple with the ShopperStatement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetShopperStatementOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperStatement) { - return nil, false - } - return o.ShopperStatement, true -} - -// HasShopperStatement returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasShopperStatement() bool { - if o != nil && !common.IsNil(o.ShopperStatement) { - return true - } - - return false -} - -// SetShopperStatement gets a reference to the given string and assigns it to the ShopperStatement field. -func (o *CreatePaymentLinkRequest) SetShopperStatement(v string) { - o.ShopperStatement = &v -} - -// GetShowRemovePaymentMethodButton returns the ShowRemovePaymentMethodButton field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetShowRemovePaymentMethodButton() bool { - if o == nil || common.IsNil(o.ShowRemovePaymentMethodButton) { - var ret bool - return ret - } - return *o.ShowRemovePaymentMethodButton -} - -// GetShowRemovePaymentMethodButtonOk returns a tuple with the ShowRemovePaymentMethodButton field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetShowRemovePaymentMethodButtonOk() (*bool, bool) { - if o == nil || common.IsNil(o.ShowRemovePaymentMethodButton) { - return nil, false - } - return o.ShowRemovePaymentMethodButton, true -} - -// HasShowRemovePaymentMethodButton returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasShowRemovePaymentMethodButton() bool { - if o != nil && !common.IsNil(o.ShowRemovePaymentMethodButton) { - return true - } - - return false -} - -// SetShowRemovePaymentMethodButton gets a reference to the given bool and assigns it to the ShowRemovePaymentMethodButton field. -func (o *CreatePaymentLinkRequest) SetShowRemovePaymentMethodButton(v bool) { - o.ShowRemovePaymentMethodButton = &v -} - -// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetSocialSecurityNumber() string { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - var ret string - return ret - } - return *o.SocialSecurityNumber -} - -// GetSocialSecurityNumberOk returns a tuple with the SocialSecurityNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetSocialSecurityNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - return nil, false - } - return o.SocialSecurityNumber, true -} - -// HasSocialSecurityNumber returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasSocialSecurityNumber() bool { - if o != nil && !common.IsNil(o.SocialSecurityNumber) { - return true - } - - return false -} - -// SetSocialSecurityNumber gets a reference to the given string and assigns it to the SocialSecurityNumber field. -func (o *CreatePaymentLinkRequest) SetSocialSecurityNumber(v string) { - o.SocialSecurityNumber = &v -} - -// GetSplitCardFundingSources returns the SplitCardFundingSources field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetSplitCardFundingSources() bool { - if o == nil || common.IsNil(o.SplitCardFundingSources) { - var ret bool - return ret - } - return *o.SplitCardFundingSources -} - -// GetSplitCardFundingSourcesOk returns a tuple with the SplitCardFundingSources field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetSplitCardFundingSourcesOk() (*bool, bool) { - if o == nil || common.IsNil(o.SplitCardFundingSources) { - return nil, false - } - return o.SplitCardFundingSources, true -} - -// HasSplitCardFundingSources returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasSplitCardFundingSources() bool { - if o != nil && !common.IsNil(o.SplitCardFundingSources) { - return true - } - - return false -} - -// SetSplitCardFundingSources gets a reference to the given bool and assigns it to the SplitCardFundingSources field. -func (o *CreatePaymentLinkRequest) SetSplitCardFundingSources(v bool) { - o.SplitCardFundingSources = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *CreatePaymentLinkRequest) SetSplits(v []Split) { - o.Splits = v -} - -// GetStore returns the Store field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetStore() string { - if o == nil || common.IsNil(o.Store) { - var ret string - return ret - } - return *o.Store -} - -// GetStoreOk returns a tuple with the Store field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetStoreOk() (*string, bool) { - if o == nil || common.IsNil(o.Store) { - return nil, false - } - return o.Store, true -} - -// HasStore returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasStore() bool { - if o != nil && !common.IsNil(o.Store) { - return true - } - - return false -} - -// SetStore gets a reference to the given string and assigns it to the Store field. -func (o *CreatePaymentLinkRequest) SetStore(v string) { - o.Store = &v -} - -// GetStorePaymentMethodMode returns the StorePaymentMethodMode field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetStorePaymentMethodMode() string { - if o == nil || common.IsNil(o.StorePaymentMethodMode) { - var ret string - return ret - } - return *o.StorePaymentMethodMode -} - -// GetStorePaymentMethodModeOk returns a tuple with the StorePaymentMethodMode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetStorePaymentMethodModeOk() (*string, bool) { - if o == nil || common.IsNil(o.StorePaymentMethodMode) { - return nil, false - } - return o.StorePaymentMethodMode, true -} - -// HasStorePaymentMethodMode returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasStorePaymentMethodMode() bool { - if o != nil && !common.IsNil(o.StorePaymentMethodMode) { - return true - } - - return false -} - -// SetStorePaymentMethodMode gets a reference to the given string and assigns it to the StorePaymentMethodMode field. -func (o *CreatePaymentLinkRequest) SetStorePaymentMethodMode(v string) { - o.StorePaymentMethodMode = &v -} - -// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) 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 *CreatePaymentLinkRequest) SetTelephoneNumber(v string) { - o.TelephoneNumber = &v -} - -// GetThemeId returns the ThemeId field value if set, zero value otherwise. -func (o *CreatePaymentLinkRequest) GetThemeId() string { - if o == nil || common.IsNil(o.ThemeId) { - var ret string - return ret - } - return *o.ThemeId -} - -// GetThemeIdOk returns a tuple with the ThemeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentLinkRequest) GetThemeIdOk() (*string, bool) { - if o == nil || common.IsNil(o.ThemeId) { - return nil, false - } - return o.ThemeId, true -} - -// HasThemeId returns a boolean if a field has been set. -func (o *CreatePaymentLinkRequest) HasThemeId() bool { - if o != nil && !common.IsNil(o.ThemeId) { - return true - } - - return false -} - -// SetThemeId gets a reference to the given string and assigns it to the ThemeId field. -func (o *CreatePaymentLinkRequest) SetThemeId(v string) { - o.ThemeId = &v -} - -func (o CreatePaymentLinkRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentLinkRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AllowedPaymentMethods) { - toSerialize["allowedPaymentMethods"] = o.AllowedPaymentMethods - } - toSerialize["amount"] = o.Amount - if !common.IsNil(o.ApplicationInfo) { - toSerialize["applicationInfo"] = o.ApplicationInfo - } - if !common.IsNil(o.BillingAddress) { - toSerialize["billingAddress"] = o.BillingAddress - } - if !common.IsNil(o.BlockedPaymentMethods) { - toSerialize["blockedPaymentMethods"] = o.BlockedPaymentMethods - } - if !common.IsNil(o.CaptureDelayHours) { - toSerialize["captureDelayHours"] = o.CaptureDelayHours - } - if !common.IsNil(o.CountryCode) { - toSerialize["countryCode"] = o.CountryCode - } - if !common.IsNil(o.DateOfBirth) { - toSerialize["dateOfBirth"] = o.DateOfBirth - } - if !common.IsNil(o.DeliverAt) { - toSerialize["deliverAt"] = o.DeliverAt - } - if !common.IsNil(o.DeliveryAddress) { - toSerialize["deliveryAddress"] = o.DeliveryAddress - } - if !common.IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !common.IsNil(o.ExpiresAt) { - toSerialize["expiresAt"] = o.ExpiresAt - } - if !common.IsNil(o.InstallmentOptions) { - toSerialize["installmentOptions"] = o.InstallmentOptions - } - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - if !common.IsNil(o.ManualCapture) { - toSerialize["manualCapture"] = o.ManualCapture - } - if !common.IsNil(o.Mcc) { - toSerialize["mcc"] = o.Mcc - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.MerchantOrderReference) { - toSerialize["merchantOrderReference"] = o.MerchantOrderReference - } - if !common.IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !common.IsNil(o.RecurringProcessingModel) { - toSerialize["recurringProcessingModel"] = o.RecurringProcessingModel - } - toSerialize["reference"] = o.Reference - if !common.IsNil(o.RequiredShopperFields) { - toSerialize["requiredShopperFields"] = o.RequiredShopperFields - } - if !common.IsNil(o.ReturnUrl) { - toSerialize["returnUrl"] = o.ReturnUrl - } - if !common.IsNil(o.Reusable) { - toSerialize["reusable"] = o.Reusable - } - if !common.IsNil(o.RiskData) { - toSerialize["riskData"] = o.RiskData - } - if !common.IsNil(o.ShopperEmail) { - toSerialize["shopperEmail"] = o.ShopperEmail - } - if !common.IsNil(o.ShopperLocale) { - toSerialize["shopperLocale"] = o.ShopperLocale - } - if !common.IsNil(o.ShopperName) { - toSerialize["shopperName"] = o.ShopperName - } - if !common.IsNil(o.ShopperReference) { - toSerialize["shopperReference"] = o.ShopperReference - } - if !common.IsNil(o.ShopperStatement) { - toSerialize["shopperStatement"] = o.ShopperStatement - } - if !common.IsNil(o.ShowRemovePaymentMethodButton) { - toSerialize["showRemovePaymentMethodButton"] = o.ShowRemovePaymentMethodButton - } - if !common.IsNil(o.SocialSecurityNumber) { - toSerialize["socialSecurityNumber"] = o.SocialSecurityNumber - } - if !common.IsNil(o.SplitCardFundingSources) { - toSerialize["splitCardFundingSources"] = o.SplitCardFundingSources - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - if !common.IsNil(o.Store) { - toSerialize["store"] = o.Store - } - if !common.IsNil(o.StorePaymentMethodMode) { - toSerialize["storePaymentMethodMode"] = o.StorePaymentMethodMode - } - if !common.IsNil(o.TelephoneNumber) { - toSerialize["telephoneNumber"] = o.TelephoneNumber - } - if !common.IsNil(o.ThemeId) { - toSerialize["themeId"] = o.ThemeId - } - return toSerialize, nil -} - -type NullableCreatePaymentLinkRequest struct { - value *CreatePaymentLinkRequest - isSet bool -} - -func (v NullableCreatePaymentLinkRequest) Get() *CreatePaymentLinkRequest { - return v.value -} - -func (v *NullableCreatePaymentLinkRequest) Set(val *CreatePaymentLinkRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentLinkRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentLinkRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentLinkRequest(val *CreatePaymentLinkRequest) *NullableCreatePaymentLinkRequest { - return &NullableCreatePaymentLinkRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentLinkRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentLinkRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CreatePaymentLinkRequest) isValidRecurringProcessingModel() bool { - var allowedEnumValues = []string{"CardOnFile", "Subscription", "UnscheduledCardOnFile"} - for _, allowed := range allowedEnumValues { - if o.GetRecurringProcessingModel() == allowed { - return true - } - } - return false -} -func (o *CreatePaymentLinkRequest) isValidStorePaymentMethodMode() bool { - var allowedEnumValues = []string{"askForConsent", "disabled", "enabled"} - for _, allowed := range allowedEnumValues { - if o.GetStorePaymentMethodMode() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_create_payment_refund_request.go b/src/checkout/model_create_payment_refund_request.go deleted file mode 100644 index 62b064d8d..000000000 --- a/src/checkout/model_create_payment_refund_request.go +++ /dev/null @@ -1,301 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentRefundRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentRefundRequest{} - -// CreatePaymentRefundRequest struct for CreatePaymentRefundRequest -type CreatePaymentRefundRequest struct { - Amount Amount `json:"amount"` - // 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. - MerchantAccount string `json:"merchantAccount"` - // Your reason for the refund request - MerchantRefundReason *string `json:"merchantRefundReason,omitempty"` - // Your reference for the refund request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` -} - -// NewCreatePaymentRefundRequest instantiates a new CreatePaymentRefundRequest 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 NewCreatePaymentRefundRequest(amount Amount, merchantAccount string) *CreatePaymentRefundRequest { - this := CreatePaymentRefundRequest{} - this.Amount = amount - this.MerchantAccount = merchantAccount - return &this -} - -// NewCreatePaymentRefundRequestWithDefaults instantiates a new CreatePaymentRefundRequest 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 NewCreatePaymentRefundRequestWithDefaults() *CreatePaymentRefundRequest { - this := CreatePaymentRefundRequest{} - return &this -} - -// GetAmount returns the Amount field value -func (o *CreatePaymentRefundRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *CreatePaymentRefundRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *CreatePaymentRefundRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *CreatePaymentRefundRequest) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentRefundRequest) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *CreatePaymentRefundRequest) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *CreatePaymentRefundRequest) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentRefundRequest) 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 *CreatePaymentRefundRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentRefundRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantRefundReason returns the MerchantRefundReason field value if set, zero value otherwise. -func (o *CreatePaymentRefundRequest) GetMerchantRefundReason() string { - if o == nil || common.IsNil(o.MerchantRefundReason) { - var ret string - return ret - } - return *o.MerchantRefundReason -} - -// GetMerchantRefundReasonOk returns a tuple with the MerchantRefundReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentRefundRequest) GetMerchantRefundReasonOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantRefundReason) { - return nil, false - } - return o.MerchantRefundReason, true -} - -// HasMerchantRefundReason returns a boolean if a field has been set. -func (o *CreatePaymentRefundRequest) HasMerchantRefundReason() bool { - if o != nil && !common.IsNil(o.MerchantRefundReason) { - return true - } - - return false -} - -// SetMerchantRefundReason gets a reference to the given string and assigns it to the MerchantRefundReason field. -func (o *CreatePaymentRefundRequest) SetMerchantRefundReason(v string) { - o.MerchantRefundReason = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreatePaymentRefundRequest) 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 *CreatePaymentRefundRequest) 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 *CreatePaymentRefundRequest) 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 *CreatePaymentRefundRequest) SetReference(v string) { - o.Reference = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *CreatePaymentRefundRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePaymentRefundRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *CreatePaymentRefundRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *CreatePaymentRefundRequest) SetSplits(v []Split) { - o.Splits = v -} - -func (o CreatePaymentRefundRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentRefundRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.MerchantRefundReason) { - toSerialize["merchantRefundReason"] = o.MerchantRefundReason - } - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - return toSerialize, nil -} - -type NullableCreatePaymentRefundRequest struct { - value *CreatePaymentRefundRequest - isSet bool -} - -func (v NullableCreatePaymentRefundRequest) Get() *CreatePaymentRefundRequest { - return v.value -} - -func (v *NullableCreatePaymentRefundRequest) Set(val *CreatePaymentRefundRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentRefundRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentRefundRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentRefundRequest(val *CreatePaymentRefundRequest) *NullableCreatePaymentRefundRequest { - return &NullableCreatePaymentRefundRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentRefundRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentRefundRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CreatePaymentRefundRequest) isValidMerchantRefundReason() bool { - var allowedEnumValues = []string{"FRAUD", "CUSTOMER REQUEST", "RETURN", "DUPLICATE", "OTHER"} - for _, allowed := range allowedEnumValues { - if o.GetMerchantRefundReason() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_create_payment_reversal_request.go b/src/checkout/model_create_payment_reversal_request.go deleted file mode 100644 index 23979b927..000000000 --- a/src/checkout/model_create_payment_reversal_request.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreatePaymentReversalRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreatePaymentReversalRequest{} - -// CreatePaymentReversalRequest struct for CreatePaymentReversalRequest -type CreatePaymentReversalRequest struct { - // The merchant account that is used to process the payment. - MerchantAccount string `json:"merchantAccount"` - // Your reference for the reversal request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` -} - -// NewCreatePaymentReversalRequest instantiates a new CreatePaymentReversalRequest 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 NewCreatePaymentReversalRequest(merchantAccount string) *CreatePaymentReversalRequest { - this := CreatePaymentReversalRequest{} - this.MerchantAccount = merchantAccount - return &this -} - -// NewCreatePaymentReversalRequestWithDefaults instantiates a new CreatePaymentReversalRequest 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 NewCreatePaymentReversalRequestWithDefaults() *CreatePaymentReversalRequest { - this := CreatePaymentReversalRequest{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreatePaymentReversalRequest) 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 *CreatePaymentReversalRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreatePaymentReversalRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreatePaymentReversalRequest) 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 *CreatePaymentReversalRequest) 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 *CreatePaymentReversalRequest) 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 *CreatePaymentReversalRequest) SetReference(v string) { - o.Reference = &v -} - -func (o CreatePaymentReversalRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePaymentReversalRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - return toSerialize, nil -} - -type NullableCreatePaymentReversalRequest struct { - value *CreatePaymentReversalRequest - isSet bool -} - -func (v NullableCreatePaymentReversalRequest) Get() *CreatePaymentReversalRequest { - return v.value -} - -func (v *NullableCreatePaymentReversalRequest) Set(val *CreatePaymentReversalRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePaymentReversalRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePaymentReversalRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePaymentReversalRequest(val *CreatePaymentReversalRequest) *NullableCreatePaymentReversalRequest { - return &NullableCreatePaymentReversalRequest{value: val, isSet: true} -} - -func (v NullableCreatePaymentReversalRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePaymentReversalRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_create_standalone_payment_cancel_request.go b/src/checkout/model_create_standalone_payment_cancel_request.go deleted file mode 100644 index ab83b78cc..000000000 --- a/src/checkout/model_create_standalone_payment_cancel_request.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the CreateStandalonePaymentCancelRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CreateStandalonePaymentCancelRequest{} - -// CreateStandalonePaymentCancelRequest struct for CreateStandalonePaymentCancelRequest -type CreateStandalonePaymentCancelRequest struct { - // 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. - PaymentReference string `json:"paymentReference"` - // Your reference for the cancel request. Maximum length: 80 characters. - Reference *string `json:"reference,omitempty"` -} - -// NewCreateStandalonePaymentCancelRequest instantiates a new CreateStandalonePaymentCancelRequest 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 NewCreateStandalonePaymentCancelRequest(merchantAccount string, paymentReference string) *CreateStandalonePaymentCancelRequest { - this := CreateStandalonePaymentCancelRequest{} - this.MerchantAccount = merchantAccount - this.PaymentReference = paymentReference - return &this -} - -// NewCreateStandalonePaymentCancelRequestWithDefaults instantiates a new CreateStandalonePaymentCancelRequest 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 NewCreateStandalonePaymentCancelRequestWithDefaults() *CreateStandalonePaymentCancelRequest { - this := CreateStandalonePaymentCancelRequest{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *CreateStandalonePaymentCancelRequest) 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 *CreateStandalonePaymentCancelRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *CreateStandalonePaymentCancelRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentReference returns the PaymentReference field value -func (o *CreateStandalonePaymentCancelRequest) GetPaymentReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentReference -} - -// GetPaymentReferenceOk returns a tuple with the PaymentReference field value -// and a boolean to check if the value has been set. -func (o *CreateStandalonePaymentCancelRequest) GetPaymentReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentReference, true -} - -// SetPaymentReference sets field value -func (o *CreateStandalonePaymentCancelRequest) SetPaymentReference(v string) { - o.PaymentReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *CreateStandalonePaymentCancelRequest) 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 *CreateStandalonePaymentCancelRequest) 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 *CreateStandalonePaymentCancelRequest) 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 *CreateStandalonePaymentCancelRequest) SetReference(v string) { - o.Reference = &v -} - -func (o CreateStandalonePaymentCancelRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateStandalonePaymentCancelRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentReference"] = o.PaymentReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - return toSerialize, nil -} - -type NullableCreateStandalonePaymentCancelRequest struct { - value *CreateStandalonePaymentCancelRequest - isSet bool -} - -func (v NullableCreateStandalonePaymentCancelRequest) Get() *CreateStandalonePaymentCancelRequest { - return v.value -} - -func (v *NullableCreateStandalonePaymentCancelRequest) Set(val *CreateStandalonePaymentCancelRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateStandalonePaymentCancelRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateStandalonePaymentCancelRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateStandalonePaymentCancelRequest(val *CreateStandalonePaymentCancelRequest) *NullableCreateStandalonePaymentCancelRequest { - return &NullableCreateStandalonePaymentCancelRequest{value: val, isSet: true} -} - -func (v NullableCreateStandalonePaymentCancelRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateStandalonePaymentCancelRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_delivery_address.go b/src/checkout/model_delivery_address.go new file mode 100644 index 000000000..d62f616dd --- /dev/null +++ b/src/checkout/model_delivery_address.go @@ -0,0 +1,337 @@ +/* +Adyen Checkout API + +API version: 70 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the DeliveryAddress type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &DeliveryAddress{} + +// DeliveryAddress struct for DeliveryAddress +type DeliveryAddress struct { + // The name of the city. Maximum length: 3000 characters. + City string `json:"city"` + // The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. + Country string `json:"country"` + FirstName *string `json:"firstName,omitempty"` + // The number or name of the house. Maximum length: 3000 characters. + HouseNumberOrName string `json:"houseNumberOrName"` + LastName *string `json:"lastName,omitempty"` + // A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. + PostalCode string `json:"postalCode"` + // The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + StateOrProvince *string `json:"stateOrProvince,omitempty"` + // The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. + Street string `json:"street"` +} + +// NewDeliveryAddress instantiates a new DeliveryAddress 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 NewDeliveryAddress(city string, country string, houseNumberOrName string, postalCode string, street string) *DeliveryAddress { + this := DeliveryAddress{} + this.City = city + this.Country = country + this.HouseNumberOrName = houseNumberOrName + this.PostalCode = postalCode + this.Street = street + return &this +} + +// NewDeliveryAddressWithDefaults instantiates a new DeliveryAddress 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 NewDeliveryAddressWithDefaults() *DeliveryAddress { + this := DeliveryAddress{} + return &this +} + +// GetCity returns the City field value +func (o *DeliveryAddress) GetCity() string { + if o == nil { + var ret string + return ret + } + + return o.City +} + +// GetCityOk returns a tuple with the City field value +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetCityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.City, true +} + +// SetCity sets field value +func (o *DeliveryAddress) SetCity(v string) { + o.City = v +} + +// GetCountry returns the Country field value +func (o *DeliveryAddress) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *DeliveryAddress) SetCountry(v string) { + o.Country = v +} + +// GetFirstName returns the FirstName field value if set, zero value otherwise. +func (o *DeliveryAddress) GetFirstName() string { + if o == nil || common.IsNil(o.FirstName) { + var ret string + return ret + } + return *o.FirstName +} + +// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetFirstNameOk() (*string, bool) { + if o == nil || common.IsNil(o.FirstName) { + return nil, false + } + return o.FirstName, true +} + +// HasFirstName returns a boolean if a field has been set. +func (o *DeliveryAddress) HasFirstName() bool { + if o != nil && !common.IsNil(o.FirstName) { + return true + } + + return false +} + +// SetFirstName gets a reference to the given string and assigns it to the FirstName field. +func (o *DeliveryAddress) SetFirstName(v string) { + o.FirstName = &v +} + +// GetHouseNumberOrName returns the HouseNumberOrName field value +func (o *DeliveryAddress) GetHouseNumberOrName() string { + if o == nil { + var ret string + return ret + } + + return o.HouseNumberOrName +} + +// GetHouseNumberOrNameOk returns a tuple with the HouseNumberOrName field value +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetHouseNumberOrNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HouseNumberOrName, true +} + +// SetHouseNumberOrName sets field value +func (o *DeliveryAddress) SetHouseNumberOrName(v string) { + o.HouseNumberOrName = v +} + +// GetLastName returns the LastName field value if set, zero value otherwise. +func (o *DeliveryAddress) GetLastName() string { + if o == nil || common.IsNil(o.LastName) { + var ret string + return ret + } + return *o.LastName +} + +// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetLastNameOk() (*string, bool) { + if o == nil || common.IsNil(o.LastName) { + return nil, false + } + return o.LastName, true +} + +// HasLastName returns a boolean if a field has been set. +func (o *DeliveryAddress) HasLastName() bool { + if o != nil && !common.IsNil(o.LastName) { + return true + } + + return false +} + +// SetLastName gets a reference to the given string and assigns it to the LastName field. +func (o *DeliveryAddress) SetLastName(v string) { + o.LastName = &v +} + +// GetPostalCode returns the PostalCode field value +func (o *DeliveryAddress) GetPostalCode() string { + if o == nil { + var ret string + return ret + } + + return o.PostalCode +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetPostalCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PostalCode, true +} + +// SetPostalCode sets field value +func (o *DeliveryAddress) SetPostalCode(v string) { + o.PostalCode = v +} + +// GetStateOrProvince returns the StateOrProvince field value if set, zero value otherwise. +func (o *DeliveryAddress) GetStateOrProvince() string { + if o == nil || common.IsNil(o.StateOrProvince) { + var ret string + return ret + } + return *o.StateOrProvince +} + +// GetStateOrProvinceOk returns a tuple with the StateOrProvince field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetStateOrProvinceOk() (*string, bool) { + if o == nil || common.IsNil(o.StateOrProvince) { + return nil, false + } + return o.StateOrProvince, true +} + +// HasStateOrProvince returns a boolean if a field has been set. +func (o *DeliveryAddress) HasStateOrProvince() bool { + if o != nil && !common.IsNil(o.StateOrProvince) { + return true + } + + return false +} + +// SetStateOrProvince gets a reference to the given string and assigns it to the StateOrProvince field. +func (o *DeliveryAddress) SetStateOrProvince(v string) { + o.StateOrProvince = &v +} + +// GetStreet returns the Street field value +func (o *DeliveryAddress) GetStreet() string { + if o == nil { + var ret string + return ret + } + + return o.Street +} + +// GetStreetOk returns a tuple with the Street field value +// and a boolean to check if the value has been set. +func (o *DeliveryAddress) GetStreetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Street, true +} + +// SetStreet sets field value +func (o *DeliveryAddress) SetStreet(v string) { + o.Street = v +} + +func (o DeliveryAddress) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeliveryAddress) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["city"] = o.City + toSerialize["country"] = o.Country + if !common.IsNil(o.FirstName) { + toSerialize["firstName"] = o.FirstName + } + toSerialize["houseNumberOrName"] = o.HouseNumberOrName + if !common.IsNil(o.LastName) { + toSerialize["lastName"] = o.LastName + } + toSerialize["postalCode"] = o.PostalCode + if !common.IsNil(o.StateOrProvince) { + toSerialize["stateOrProvince"] = o.StateOrProvince + } + toSerialize["street"] = o.Street + return toSerialize, nil +} + +type NullableDeliveryAddress struct { + value *DeliveryAddress + isSet bool +} + +func (v NullableDeliveryAddress) Get() *DeliveryAddress { + return v.value +} + +func (v *NullableDeliveryAddress) Set(val *DeliveryAddress) { + v.value = val + v.isSet = true +} + +func (v NullableDeliveryAddress) IsSet() bool { + return v.isSet +} + +func (v *NullableDeliveryAddress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeliveryAddress(val *DeliveryAddress) *NullableDeliveryAddress { + return &NullableDeliveryAddress{value: val, isSet: true} +} + +func (v NullableDeliveryAddress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeliveryAddress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_details_request.go b/src/checkout/model_details_request.go deleted file mode 100644 index 01bb477bd..000000000 --- a/src/checkout/model_details_request.go +++ /dev/null @@ -1,229 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the DetailsRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &DetailsRequest{} - -// DetailsRequest struct for DetailsRequest -type DetailsRequest struct { - AuthenticationData *DetailsRequestAuthenticationData `json:"authenticationData,omitempty"` - Details PaymentCompletionDetails `json:"details"` - // The `paymentData` value from the `/payments` response. Required if the `/payments` response returns this value. - PaymentData *string `json:"paymentData,omitempty"` - // Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. - // Deprecated - ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` -} - -// NewDetailsRequest instantiates a new DetailsRequest 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 NewDetailsRequest(details PaymentCompletionDetails) *DetailsRequest { - this := DetailsRequest{} - this.Details = details - return &this -} - -// NewDetailsRequestWithDefaults instantiates a new DetailsRequest 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 NewDetailsRequestWithDefaults() *DetailsRequest { - this := DetailsRequest{} - return &this -} - -// GetAuthenticationData returns the AuthenticationData field value if set, zero value otherwise. -func (o *DetailsRequest) GetAuthenticationData() DetailsRequestAuthenticationData { - if o == nil || common.IsNil(o.AuthenticationData) { - var ret DetailsRequestAuthenticationData - return ret - } - return *o.AuthenticationData -} - -// GetAuthenticationDataOk returns a tuple with the AuthenticationData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DetailsRequest) GetAuthenticationDataOk() (*DetailsRequestAuthenticationData, bool) { - if o == nil || common.IsNil(o.AuthenticationData) { - return nil, false - } - return o.AuthenticationData, true -} - -// HasAuthenticationData returns a boolean if a field has been set. -func (o *DetailsRequest) HasAuthenticationData() bool { - if o != nil && !common.IsNil(o.AuthenticationData) { - return true - } - - return false -} - -// SetAuthenticationData gets a reference to the given DetailsRequestAuthenticationData and assigns it to the AuthenticationData field. -func (o *DetailsRequest) SetAuthenticationData(v DetailsRequestAuthenticationData) { - o.AuthenticationData = &v -} - -// GetDetails returns the Details field value -func (o *DetailsRequest) GetDetails() PaymentCompletionDetails { - if o == nil { - var ret PaymentCompletionDetails - return ret - } - - return o.Details -} - -// GetDetailsOk returns a tuple with the Details field value -// and a boolean to check if the value has been set. -func (o *DetailsRequest) GetDetailsOk() (*PaymentCompletionDetails, bool) { - if o == nil { - return nil, false - } - return &o.Details, true -} - -// SetDetails sets field value -func (o *DetailsRequest) SetDetails(v PaymentCompletionDetails) { - o.Details = v -} - -// GetPaymentData returns the PaymentData field value if set, zero value otherwise. -func (o *DetailsRequest) GetPaymentData() string { - if o == nil || common.IsNil(o.PaymentData) { - var ret string - return ret - } - return *o.PaymentData -} - -// GetPaymentDataOk returns a tuple with the PaymentData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DetailsRequest) GetPaymentDataOk() (*string, bool) { - if o == nil || common.IsNil(o.PaymentData) { - return nil, false - } - return o.PaymentData, true -} - -// HasPaymentData returns a boolean if a field has been set. -func (o *DetailsRequest) HasPaymentData() bool { - if o != nil && !common.IsNil(o.PaymentData) { - return true - } - - return false -} - -// SetPaymentData gets a reference to the given string and assigns it to the PaymentData field. -func (o *DetailsRequest) SetPaymentData(v string) { - o.PaymentData = &v -} - -// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. -// Deprecated -func (o *DetailsRequest) GetThreeDSAuthenticationOnly() bool { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - var ret bool - return ret - } - return *o.ThreeDSAuthenticationOnly -} - -// GetThreeDSAuthenticationOnlyOk returns a tuple with the ThreeDSAuthenticationOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *DetailsRequest) GetThreeDSAuthenticationOnlyOk() (*bool, bool) { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - return nil, false - } - return o.ThreeDSAuthenticationOnly, true -} - -// HasThreeDSAuthenticationOnly returns a boolean if a field has been set. -func (o *DetailsRequest) HasThreeDSAuthenticationOnly() bool { - if o != nil && !common.IsNil(o.ThreeDSAuthenticationOnly) { - return true - } - - return false -} - -// SetThreeDSAuthenticationOnly gets a reference to the given bool and assigns it to the ThreeDSAuthenticationOnly field. -// Deprecated -func (o *DetailsRequest) SetThreeDSAuthenticationOnly(v bool) { - o.ThreeDSAuthenticationOnly = &v -} - -func (o DetailsRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DetailsRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AuthenticationData) { - toSerialize["authenticationData"] = o.AuthenticationData - } - toSerialize["details"] = o.Details - if !common.IsNil(o.PaymentData) { - toSerialize["paymentData"] = o.PaymentData - } - if !common.IsNil(o.ThreeDSAuthenticationOnly) { - toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly - } - return toSerialize, nil -} - -type NullableDetailsRequest struct { - value *DetailsRequest - isSet bool -} - -func (v NullableDetailsRequest) Get() *DetailsRequest { - return v.value -} - -func (v *NullableDetailsRequest) Set(val *DetailsRequest) { - v.value = val - v.isSet = true -} - -func (v NullableDetailsRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableDetailsRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDetailsRequest(val *DetailsRequest) *NullableDetailsRequest { - return &NullableDetailsRequest{value: val, isSet: true} -} - -func (v NullableDetailsRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDetailsRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_doku_details.go b/src/checkout/model_doku_details.go index 022b590c4..3e13a484e 100644 --- a/src/checkout/model_doku_details.go +++ b/src/checkout/model_doku_details.go @@ -237,7 +237,7 @@ func (v *NullableDokuDetails) UnmarshalJSON(src []byte) error { } func (o *DokuDetails) isValidType() bool { - var allowedEnumValues = []string{"doku_mandiri_va", "doku_cimb_va", "doku_danamon_va", "doku_bni_va", "doku_permata_lite_atm", "doku_bri_va", "doku_bca_va", "doku_alfamart", "doku_indomaret"} + var allowedEnumValues = []string{"doku_mandiri_va", "doku_cimb_va", "doku_danamon_va", "doku_bni_va", "doku_permata_lite_atm", "doku_bri_va", "doku_bca_va", "doku_alfamart", "doku_indomaret", "doku_wallet", "doku_ovo"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_donation_payment_method.go b/src/checkout/model_donation_payment_method.go new file mode 100644 index 000000000..1924132aa --- /dev/null +++ b/src/checkout/model_donation_payment_method.go @@ -0,0 +1,233 @@ +/* +Adyen Checkout API + +API version: 70 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + "fmt" +) + +// DonationPaymentMethod - The type and required details of a payment method to use. +type DonationPaymentMethod struct { + ApplePayDetails *ApplePayDetails + CardDetails *CardDetails + GooglePayDetails *GooglePayDetails + IdealDetails *IdealDetails + PayWithGoogleDetails *PayWithGoogleDetails +} + +// ApplePayDetailsAsDonationPaymentMethod is a convenience function that returns ApplePayDetails wrapped in DonationPaymentMethod +func ApplePayDetailsAsDonationPaymentMethod(v *ApplePayDetails) DonationPaymentMethod { + return DonationPaymentMethod{ + ApplePayDetails: v, + } +} + +// CardDetailsAsDonationPaymentMethod is a convenience function that returns CardDetails wrapped in DonationPaymentMethod +func CardDetailsAsDonationPaymentMethod(v *CardDetails) DonationPaymentMethod { + return DonationPaymentMethod{ + CardDetails: v, + } +} + +// GooglePayDetailsAsDonationPaymentMethod is a convenience function that returns GooglePayDetails wrapped in DonationPaymentMethod +func GooglePayDetailsAsDonationPaymentMethod(v *GooglePayDetails) DonationPaymentMethod { + return DonationPaymentMethod{ + GooglePayDetails: v, + } +} + +// IdealDetailsAsDonationPaymentMethod is a convenience function that returns IdealDetails wrapped in DonationPaymentMethod +func IdealDetailsAsDonationPaymentMethod(v *IdealDetails) DonationPaymentMethod { + return DonationPaymentMethod{ + IdealDetails: v, + } +} + +// PayWithGoogleDetailsAsDonationPaymentMethod is a convenience function that returns PayWithGoogleDetails wrapped in DonationPaymentMethod +func PayWithGoogleDetailsAsDonationPaymentMethod(v *PayWithGoogleDetails) DonationPaymentMethod { + return DonationPaymentMethod{ + PayWithGoogleDetails: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DonationPaymentMethod) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ApplePayDetails + err = json.Unmarshal(data, &dst.ApplePayDetails) + if err == nil { + jsonApplePayDetails, _ := json.Marshal(dst.ApplePayDetails) + if string(jsonApplePayDetails) == "{}" || !dst.ApplePayDetails.isValidType() { // empty struct + dst.ApplePayDetails = nil + } else { + match++ + } + } else { + dst.ApplePayDetails = nil + } + + // try to unmarshal data into CardDetails + err = json.Unmarshal(data, &dst.CardDetails) + if err == nil { + jsonCardDetails, _ := json.Marshal(dst.CardDetails) + if string(jsonCardDetails) == "{}" || !dst.CardDetails.isValidType() { // empty struct + dst.CardDetails = nil + } else { + match++ + } + } else { + dst.CardDetails = nil + } + + // try to unmarshal data into GooglePayDetails + err = json.Unmarshal(data, &dst.GooglePayDetails) + if err == nil { + jsonGooglePayDetails, _ := json.Marshal(dst.GooglePayDetails) + if string(jsonGooglePayDetails) == "{}" || !dst.GooglePayDetails.isValidType() { // empty struct + dst.GooglePayDetails = nil + } else { + match++ + } + } else { + dst.GooglePayDetails = nil + } + + // try to unmarshal data into IdealDetails + err = json.Unmarshal(data, &dst.IdealDetails) + if err == nil { + jsonIdealDetails, _ := json.Marshal(dst.IdealDetails) + if string(jsonIdealDetails) == "{}" || !dst.IdealDetails.isValidType() { // empty struct + dst.IdealDetails = nil + } else { + match++ + } + } else { + dst.IdealDetails = nil + } + + // try to unmarshal data into PayWithGoogleDetails + err = json.Unmarshal(data, &dst.PayWithGoogleDetails) + if err == nil { + jsonPayWithGoogleDetails, _ := json.Marshal(dst.PayWithGoogleDetails) + if string(jsonPayWithGoogleDetails) == "{}" || !dst.PayWithGoogleDetails.isValidType() { // empty struct + dst.PayWithGoogleDetails = nil + } else { + match++ + } + } else { + dst.PayWithGoogleDetails = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ApplePayDetails = nil + dst.CardDetails = nil + dst.GooglePayDetails = nil + dst.IdealDetails = nil + dst.PayWithGoogleDetails = nil + + return fmt.Errorf("data matches more than one schema in oneOf(DonationPaymentMethod)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(DonationPaymentMethod)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DonationPaymentMethod) MarshalJSON() ([]byte, error) { + if src.ApplePayDetails != nil { + return json.Marshal(&src.ApplePayDetails) + } + + if src.CardDetails != nil { + return json.Marshal(&src.CardDetails) + } + + if src.GooglePayDetails != nil { + return json.Marshal(&src.GooglePayDetails) + } + + if src.IdealDetails != nil { + return json.Marshal(&src.IdealDetails) + } + + if src.PayWithGoogleDetails != nil { + return json.Marshal(&src.PayWithGoogleDetails) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DonationPaymentMethod) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ApplePayDetails != nil { + return obj.ApplePayDetails + } + + if obj.CardDetails != nil { + return obj.CardDetails + } + + if obj.GooglePayDetails != nil { + return obj.GooglePayDetails + } + + if obj.IdealDetails != nil { + return obj.IdealDetails + } + + if obj.PayWithGoogleDetails != nil { + return obj.PayWithGoogleDetails + } + + // all schemas are nil + return nil +} + +type NullableDonationPaymentMethod struct { + value *DonationPaymentMethod + isSet bool +} + +func (v NullableDonationPaymentMethod) Get() *DonationPaymentMethod { + return v.value +} + +func (v *NullableDonationPaymentMethod) Set(val *DonationPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableDonationPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableDonationPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDonationPaymentMethod(val *DonationPaymentMethod) *NullableDonationPaymentMethod { + return &NullableDonationPaymentMethod{value: val, isSet: true} +} + +func (v NullableDonationPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDonationPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_donation_payment_request.go b/src/checkout/model_donation_payment_request.go index 9899abb1f..d6e27b80c 100644 --- a/src/checkout/model_donation_payment_request.go +++ b/src/checkout/model_donation_payment_request.go @@ -23,12 +23,16 @@ type DonationPaymentRequest struct { AccountInfo *AccountInfo `json:"accountInfo,omitempty"` AdditionalAmount *Amount `json:"additionalAmount,omitempty"` // This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - AdditionalData *map[string]string `json:"additionalData,omitempty"` - Amount Amount `json:"amount"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` - AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` - BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` + AdditionalData *map[string]string `json:"additionalData,omitempty"` + // List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` + AllowedPaymentMethods []string `json:"allowedPaymentMethods,omitempty"` + Amount Amount `json:"amount"` + ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` + AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` + BillingAddress *BillingAddress `json:"billingAddress,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\",\"giropay\"]` + BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` + BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` // The delay between the authorisation and scheduled auto-capture, specified in hours. CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` // The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web @@ -45,10 +49,9 @@ type DonationPaymentRequest struct { DateOfBirth *time.Time `json:"dateOfBirth,omitempty"` DccQuote *ForexQuote `json:"dccQuote,omitempty"` // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - DeliverAt *time.Time `json:"deliverAt,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` + DeliverAt *time.Time `json:"deliverAt,omitempty"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - // Deprecated DeliveryDate *time.Time `json:"deliveryDate,omitempty"` // A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). DeviceFingerprint *string `json:"deviceFingerprint,omitempty"` @@ -70,12 +73,14 @@ type DonationPaymentRequest struct { FraudOffset *int32 `json:"fraudOffset,omitempty"` FundOrigin *FundOrigin `json:"fundOrigin,omitempty"` FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` + // The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. + FundingSource *string `json:"fundingSource,omitempty"` // 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, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + // 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"` 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. @@ -92,9 +97,9 @@ type DonationPaymentRequest struct { // 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. - Origin *string `json:"origin,omitempty"` - PaymentMethod DonationPaymentRequestPaymentMethod `json:"paymentMethod"` - PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` + Origin *string `json:"origin,omitempty"` + PaymentMethod DonationPaymentMethod `json:"paymentMethod"` + PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // Date after which no further authorisations shall be performed. Only for 3D Secure 2. RecurringExpiry *string `json:"recurringExpiry,omitempty"` // Minimum number of days between authorisations. Only for 3D Secure 2. @@ -110,6 +115,8 @@ type DonationPaymentRequest struct { // 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` ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` + // 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 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. @@ -147,7 +154,7 @@ type DonationPaymentRequest 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 NewDonationPaymentRequest(amount Amount, donationAccount string, merchantAccount string, paymentMethod DonationPaymentRequestPaymentMethod, reference string, returnUrl string) *DonationPaymentRequest { +func NewDonationPaymentRequest(amount Amount, donationAccount string, merchantAccount string, paymentMethod DonationPaymentMethod, reference string, returnUrl string) *DonationPaymentRequest { this := DonationPaymentRequest{} this.Amount = amount this.DonationAccount = donationAccount @@ -266,6 +273,38 @@ func (o *DonationPaymentRequest) SetAdditionalData(v map[string]string) { o.AdditionalData = &v } +// GetAllowedPaymentMethods returns the AllowedPaymentMethods field value if set, zero value otherwise. +func (o *DonationPaymentRequest) GetAllowedPaymentMethods() []string { + if o == nil || common.IsNil(o.AllowedPaymentMethods) { + var ret []string + return ret + } + return o.AllowedPaymentMethods +} + +// GetAllowedPaymentMethodsOk returns a tuple with the AllowedPaymentMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DonationPaymentRequest) GetAllowedPaymentMethodsOk() ([]string, bool) { + if o == nil || common.IsNil(o.AllowedPaymentMethods) { + return nil, false + } + return o.AllowedPaymentMethods, true +} + +// HasAllowedPaymentMethods returns a boolean if a field has been set. +func (o *DonationPaymentRequest) HasAllowedPaymentMethods() bool { + if o != nil && !common.IsNil(o.AllowedPaymentMethods) { + return true + } + + return false +} + +// SetAllowedPaymentMethods gets a reference to the given []string and assigns it to the AllowedPaymentMethods field. +func (o *DonationPaymentRequest) SetAllowedPaymentMethods(v []string) { + o.AllowedPaymentMethods = v +} + // GetAmount returns the Amount field value func (o *DonationPaymentRequest) GetAmount() Amount { if o == nil { @@ -355,9 +394,9 @@ func (o *DonationPaymentRequest) SetAuthenticationData(v AuthenticationData) { } // GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *DonationPaymentRequest) GetBillingAddress() Address { +func (o *DonationPaymentRequest) GetBillingAddress() BillingAddress { if o == nil || common.IsNil(o.BillingAddress) { - var ret Address + var ret BillingAddress return ret } return *o.BillingAddress @@ -365,7 +404,7 @@ func (o *DonationPaymentRequest) GetBillingAddress() Address { // GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DonationPaymentRequest) GetBillingAddressOk() (*Address, bool) { +func (o *DonationPaymentRequest) GetBillingAddressOk() (*BillingAddress, bool) { if o == nil || common.IsNil(o.BillingAddress) { return nil, false } @@ -381,11 +420,43 @@ func (o *DonationPaymentRequest) HasBillingAddress() bool { return false } -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *DonationPaymentRequest) SetBillingAddress(v Address) { +// SetBillingAddress gets a reference to the given BillingAddress and assigns it to the BillingAddress field. +func (o *DonationPaymentRequest) SetBillingAddress(v BillingAddress) { o.BillingAddress = &v } +// GetBlockedPaymentMethods returns the BlockedPaymentMethods field value if set, zero value otherwise. +func (o *DonationPaymentRequest) GetBlockedPaymentMethods() []string { + if o == nil || common.IsNil(o.BlockedPaymentMethods) { + var ret []string + return ret + } + return o.BlockedPaymentMethods +} + +// GetBlockedPaymentMethodsOk returns a tuple with the BlockedPaymentMethods field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DonationPaymentRequest) GetBlockedPaymentMethodsOk() ([]string, bool) { + if o == nil || common.IsNil(o.BlockedPaymentMethods) { + return nil, false + } + return o.BlockedPaymentMethods, true +} + +// HasBlockedPaymentMethods returns a boolean if a field has been set. +func (o *DonationPaymentRequest) HasBlockedPaymentMethods() bool { + if o != nil && !common.IsNil(o.BlockedPaymentMethods) { + return true + } + + return false +} + +// SetBlockedPaymentMethods gets a reference to the given []string and assigns it to the BlockedPaymentMethods field. +func (o *DonationPaymentRequest) SetBlockedPaymentMethods(v []string) { + o.BlockedPaymentMethods = v +} + // GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. func (o *DonationPaymentRequest) GetBrowserInfo() BrowserInfo { if o == nil || common.IsNil(o.BrowserInfo) { @@ -710,9 +781,9 @@ func (o *DonationPaymentRequest) SetDeliverAt(v time.Time) { } // GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *DonationPaymentRequest) GetDeliveryAddress() Address { +func (o *DonationPaymentRequest) GetDeliveryAddress() DeliveryAddress { if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address + var ret DeliveryAddress return ret } return *o.DeliveryAddress @@ -720,7 +791,7 @@ func (o *DonationPaymentRequest) GetDeliveryAddress() Address { // GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *DonationPaymentRequest) GetDeliveryAddressOk() (*Address, bool) { +func (o *DonationPaymentRequest) GetDeliveryAddressOk() (*DeliveryAddress, bool) { if o == nil || common.IsNil(o.DeliveryAddress) { return nil, false } @@ -736,13 +807,12 @@ func (o *DonationPaymentRequest) HasDeliveryAddress() bool { return false } -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *DonationPaymentRequest) SetDeliveryAddress(v Address) { +// SetDeliveryAddress gets a reference to the given DeliveryAddress and assigns it to the DeliveryAddress field. +func (o *DonationPaymentRequest) SetDeliveryAddress(v DeliveryAddress) { o.DeliveryAddress = &v } // GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. -// Deprecated func (o *DonationPaymentRequest) GetDeliveryDate() time.Time { if o == nil || common.IsNil(o.DeliveryDate) { var ret time.Time @@ -753,7 +823,6 @@ func (o *DonationPaymentRequest) GetDeliveryDate() time.Time { // GetDeliveryDateOk returns a tuple with the DeliveryDate field value if set, nil otherwise // and a boolean to check if the value has been set. -// Deprecated func (o *DonationPaymentRequest) GetDeliveryDateOk() (*time.Time, bool) { if o == nil || common.IsNil(o.DeliveryDate) { return nil, false @@ -771,7 +840,6 @@ func (o *DonationPaymentRequest) HasDeliveryDate() bool { } // SetDeliveryDate gets a reference to the given time.Time and assigns it to the DeliveryDate field. -// Deprecated func (o *DonationPaymentRequest) SetDeliveryDate(v time.Time) { o.DeliveryDate = &v } @@ -1120,6 +1188,38 @@ func (o *DonationPaymentRequest) SetFundRecipient(v FundRecipient) { o.FundRecipient = &v } +// GetFundingSource returns the FundingSource field value if set, zero value otherwise. +func (o *DonationPaymentRequest) GetFundingSource() string { + if o == nil || common.IsNil(o.FundingSource) { + var ret string + return ret + } + return *o.FundingSource +} + +// GetFundingSourceOk returns a tuple with the FundingSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DonationPaymentRequest) GetFundingSourceOk() (*string, bool) { + if o == nil || common.IsNil(o.FundingSource) { + return nil, false + } + return o.FundingSource, true +} + +// HasFundingSource returns a boolean if a field has been set. +func (o *DonationPaymentRequest) HasFundingSource() bool { + if o != nil && !common.IsNil(o.FundingSource) { + return true + } + + return false +} + +// SetFundingSource gets a reference to the given string and assigns it to the FundingSource field. +func (o *DonationPaymentRequest) SetFundingSource(v string) { + o.FundingSource = &v +} + // GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. func (o *DonationPaymentRequest) GetIndustryUsage() string { if o == nil || common.IsNil(o.IndustryUsage) { @@ -1561,9 +1661,9 @@ func (o *DonationPaymentRequest) SetOrigin(v string) { } // GetPaymentMethod returns the PaymentMethod field value -func (o *DonationPaymentRequest) GetPaymentMethod() DonationPaymentRequestPaymentMethod { +func (o *DonationPaymentRequest) GetPaymentMethod() DonationPaymentMethod { if o == nil { - var ret DonationPaymentRequestPaymentMethod + var ret DonationPaymentMethod return ret } @@ -1572,7 +1672,7 @@ func (o *DonationPaymentRequest) GetPaymentMethod() DonationPaymentRequestPaymen // GetPaymentMethodOk returns a tuple with the PaymentMethod field value // and a boolean to check if the value has been set. -func (o *DonationPaymentRequest) GetPaymentMethodOk() (*DonationPaymentRequestPaymentMethod, bool) { +func (o *DonationPaymentRequest) GetPaymentMethodOk() (*DonationPaymentMethod, bool) { if o == nil { return nil, false } @@ -1580,7 +1680,7 @@ func (o *DonationPaymentRequest) GetPaymentMethodOk() (*DonationPaymentRequestPa } // SetPaymentMethod sets field value -func (o *DonationPaymentRequest) SetPaymentMethod(v DonationPaymentRequestPaymentMethod) { +func (o *DonationPaymentRequest) SetPaymentMethod(v DonationPaymentMethod) { o.PaymentMethod = v } @@ -1856,6 +1956,38 @@ func (o *DonationPaymentRequest) SetRiskData(v RiskData) { o.RiskData = &v } +// GetSelectedRecurringDetailReference returns the SelectedRecurringDetailReference field value if set, zero value otherwise. +func (o *DonationPaymentRequest) GetSelectedRecurringDetailReference() string { + if o == nil || common.IsNil(o.SelectedRecurringDetailReference) { + var ret string + return ret + } + return *o.SelectedRecurringDetailReference +} + +// GetSelectedRecurringDetailReferenceOk returns a tuple with the SelectedRecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DonationPaymentRequest) GetSelectedRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.SelectedRecurringDetailReference) { + return nil, false + } + return o.SelectedRecurringDetailReference, true +} + +// HasSelectedRecurringDetailReference returns a boolean if a field has been set. +func (o *DonationPaymentRequest) HasSelectedRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.SelectedRecurringDetailReference) { + return true + } + + return false +} + +// SetSelectedRecurringDetailReference gets a reference to the given string and assigns it to the SelectedRecurringDetailReference field. +func (o *DonationPaymentRequest) SetSelectedRecurringDetailReference(v string) { + o.SelectedRecurringDetailReference = &v +} + // GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. func (o *DonationPaymentRequest) GetSessionValidity() string { if o == nil || common.IsNil(o.SessionValidity) { @@ -2390,6 +2522,9 @@ func (o DonationPaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AdditionalData) { toSerialize["additionalData"] = o.AdditionalData } + if !common.IsNil(o.AllowedPaymentMethods) { + toSerialize["allowedPaymentMethods"] = o.AllowedPaymentMethods + } toSerialize["amount"] = o.Amount if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo @@ -2400,6 +2535,9 @@ func (o DonationPaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BillingAddress) { toSerialize["billingAddress"] = o.BillingAddress } + if !common.IsNil(o.BlockedPaymentMethods) { + toSerialize["blockedPaymentMethods"] = o.BlockedPaymentMethods + } if !common.IsNil(o.BrowserInfo) { toSerialize["browserInfo"] = o.BrowserInfo } @@ -2467,6 +2605,9 @@ func (o DonationPaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.FundRecipient) { toSerialize["fundRecipient"] = o.FundRecipient } + if !common.IsNil(o.FundingSource) { + toSerialize["fundingSource"] = o.FundingSource + } if !common.IsNil(o.IndustryUsage) { toSerialize["industryUsage"] = o.IndustryUsage } @@ -2531,6 +2672,9 @@ func (o DonationPaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.RiskData) { toSerialize["riskData"] = o.RiskData } + if !common.IsNil(o.SelectedRecurringDetailReference) { + toSerialize["selectedRecurringDetailReference"] = o.SelectedRecurringDetailReference + } if !common.IsNil(o.SessionValidity) { toSerialize["sessionValidity"] = o.SessionValidity } @@ -2636,6 +2780,15 @@ func (o *DonationPaymentRequest) isValidEntityType() bool { } return false } +func (o *DonationPaymentRequest) isValidFundingSource() bool { + var allowedEnumValues = []string{"debit"} + for _, allowed := range allowedEnumValues { + if o.GetFundingSource() == allowed { + return true + } + } + return false +} func (o *DonationPaymentRequest) isValidIndustryUsage() bool { var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} for _, allowed := range allowedEnumValues { diff --git a/src/checkout/model_donation_payment_request_payment_method.go b/src/checkout/model_donation_payment_request_payment_method.go deleted file mode 100644 index 40545737d..000000000 --- a/src/checkout/model_donation_payment_request_payment_method.go +++ /dev/null @@ -1,1253 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - "fmt" -) - -// DonationPaymentRequestPaymentMethod - The type and required details of a payment method to use. -type DonationPaymentRequestPaymentMethod struct { - AchDetails *AchDetails - AfterpayDetails *AfterpayDetails - AmazonPayDetails *AmazonPayDetails - AndroidPayDetails *AndroidPayDetails - ApplePayDetails *ApplePayDetails - BacsDirectDebitDetails *BacsDirectDebitDetails - BillDeskDetails *BillDeskDetails - BlikDetails *BlikDetails - CardDetails *CardDetails - CellulantDetails *CellulantDetails - DokuDetails *DokuDetails - DotpayDetails *DotpayDetails - DragonpayDetails *DragonpayDetails - EcontextVoucherDetails *EcontextVoucherDetails - GenericIssuerPaymentMethodDetails *GenericIssuerPaymentMethodDetails - GiropayDetails *GiropayDetails - GooglePayDetails *GooglePayDetails - IdealDetails *IdealDetails - KlarnaDetails *KlarnaDetails - MasterpassDetails *MasterpassDetails - MbwayDetails *MbwayDetails - MobilePayDetails *MobilePayDetails - MolPayDetails *MolPayDetails - OpenInvoiceDetails *OpenInvoiceDetails - PayPalDetails *PayPalDetails - PayUUpiDetails *PayUUpiDetails - PayWithGoogleDetails *PayWithGoogleDetails - PaymentDetails *PaymentDetails - RatepayDetails *RatepayDetails - SamsungPayDetails *SamsungPayDetails - SepaDirectDebitDetails *SepaDirectDebitDetails - StoredPaymentMethodDetails *StoredPaymentMethodDetails - UpiCollectDetails *UpiCollectDetails - UpiIntentDetails *UpiIntentDetails - VippsDetails *VippsDetails - VisaCheckoutDetails *VisaCheckoutDetails - WeChatPayDetails *WeChatPayDetails - WeChatPayMiniProgramDetails *WeChatPayMiniProgramDetails - ZipDetails *ZipDetails -} - -// AchDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns AchDetails wrapped in DonationPaymentRequestPaymentMethod -func AchDetailsAsDonationPaymentRequestPaymentMethod(v *AchDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - AchDetails: v, - } -} - -// AfterpayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns AfterpayDetails wrapped in DonationPaymentRequestPaymentMethod -func AfterpayDetailsAsDonationPaymentRequestPaymentMethod(v *AfterpayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - AfterpayDetails: v, - } -} - -// AmazonPayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns AmazonPayDetails wrapped in DonationPaymentRequestPaymentMethod -func AmazonPayDetailsAsDonationPaymentRequestPaymentMethod(v *AmazonPayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - AmazonPayDetails: v, - } -} - -// AndroidPayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns AndroidPayDetails wrapped in DonationPaymentRequestPaymentMethod -func AndroidPayDetailsAsDonationPaymentRequestPaymentMethod(v *AndroidPayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - AndroidPayDetails: v, - } -} - -// ApplePayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns ApplePayDetails wrapped in DonationPaymentRequestPaymentMethod -func ApplePayDetailsAsDonationPaymentRequestPaymentMethod(v *ApplePayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - ApplePayDetails: v, - } -} - -// BacsDirectDebitDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns BacsDirectDebitDetails wrapped in DonationPaymentRequestPaymentMethod -func BacsDirectDebitDetailsAsDonationPaymentRequestPaymentMethod(v *BacsDirectDebitDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - BacsDirectDebitDetails: v, - } -} - -// BillDeskDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns BillDeskDetails wrapped in DonationPaymentRequestPaymentMethod -func BillDeskDetailsAsDonationPaymentRequestPaymentMethod(v *BillDeskDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - BillDeskDetails: v, - } -} - -// BlikDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns BlikDetails wrapped in DonationPaymentRequestPaymentMethod -func BlikDetailsAsDonationPaymentRequestPaymentMethod(v *BlikDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - BlikDetails: v, - } -} - -// CardDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns CardDetails wrapped in DonationPaymentRequestPaymentMethod -func CardDetailsAsDonationPaymentRequestPaymentMethod(v *CardDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - CardDetails: v, - } -} - -// CellulantDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns CellulantDetails wrapped in DonationPaymentRequestPaymentMethod -func CellulantDetailsAsDonationPaymentRequestPaymentMethod(v *CellulantDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - CellulantDetails: v, - } -} - -// DokuDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns DokuDetails wrapped in DonationPaymentRequestPaymentMethod -func DokuDetailsAsDonationPaymentRequestPaymentMethod(v *DokuDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - DokuDetails: v, - } -} - -// DotpayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns DotpayDetails wrapped in DonationPaymentRequestPaymentMethod -func DotpayDetailsAsDonationPaymentRequestPaymentMethod(v *DotpayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - DotpayDetails: v, - } -} - -// DragonpayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns DragonpayDetails wrapped in DonationPaymentRequestPaymentMethod -func DragonpayDetailsAsDonationPaymentRequestPaymentMethod(v *DragonpayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - DragonpayDetails: v, - } -} - -// EcontextVoucherDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns EcontextVoucherDetails wrapped in DonationPaymentRequestPaymentMethod -func EcontextVoucherDetailsAsDonationPaymentRequestPaymentMethod(v *EcontextVoucherDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - EcontextVoucherDetails: v, - } -} - -// GenericIssuerPaymentMethodDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns GenericIssuerPaymentMethodDetails wrapped in DonationPaymentRequestPaymentMethod -func GenericIssuerPaymentMethodDetailsAsDonationPaymentRequestPaymentMethod(v *GenericIssuerPaymentMethodDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - GenericIssuerPaymentMethodDetails: v, - } -} - -// GiropayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns GiropayDetails wrapped in DonationPaymentRequestPaymentMethod -func GiropayDetailsAsDonationPaymentRequestPaymentMethod(v *GiropayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - GiropayDetails: v, - } -} - -// GooglePayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns GooglePayDetails wrapped in DonationPaymentRequestPaymentMethod -func GooglePayDetailsAsDonationPaymentRequestPaymentMethod(v *GooglePayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - GooglePayDetails: v, - } -} - -// IdealDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns IdealDetails wrapped in DonationPaymentRequestPaymentMethod -func IdealDetailsAsDonationPaymentRequestPaymentMethod(v *IdealDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - IdealDetails: v, - } -} - -// KlarnaDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns KlarnaDetails wrapped in DonationPaymentRequestPaymentMethod -func KlarnaDetailsAsDonationPaymentRequestPaymentMethod(v *KlarnaDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - KlarnaDetails: v, - } -} - -// MasterpassDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns MasterpassDetails wrapped in DonationPaymentRequestPaymentMethod -func MasterpassDetailsAsDonationPaymentRequestPaymentMethod(v *MasterpassDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - MasterpassDetails: v, - } -} - -// MbwayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns MbwayDetails wrapped in DonationPaymentRequestPaymentMethod -func MbwayDetailsAsDonationPaymentRequestPaymentMethod(v *MbwayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - MbwayDetails: v, - } -} - -// MobilePayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns MobilePayDetails wrapped in DonationPaymentRequestPaymentMethod -func MobilePayDetailsAsDonationPaymentRequestPaymentMethod(v *MobilePayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - MobilePayDetails: v, - } -} - -// MolPayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns MolPayDetails wrapped in DonationPaymentRequestPaymentMethod -func MolPayDetailsAsDonationPaymentRequestPaymentMethod(v *MolPayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - MolPayDetails: v, - } -} - -// OpenInvoiceDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns OpenInvoiceDetails wrapped in DonationPaymentRequestPaymentMethod -func OpenInvoiceDetailsAsDonationPaymentRequestPaymentMethod(v *OpenInvoiceDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - OpenInvoiceDetails: v, - } -} - -// PayPalDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns PayPalDetails wrapped in DonationPaymentRequestPaymentMethod -func PayPalDetailsAsDonationPaymentRequestPaymentMethod(v *PayPalDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - PayPalDetails: v, - } -} - -// PayUUpiDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns PayUUpiDetails wrapped in DonationPaymentRequestPaymentMethod -func PayUUpiDetailsAsDonationPaymentRequestPaymentMethod(v *PayUUpiDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - PayUUpiDetails: v, - } -} - -// PayWithGoogleDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns PayWithGoogleDetails wrapped in DonationPaymentRequestPaymentMethod -func PayWithGoogleDetailsAsDonationPaymentRequestPaymentMethod(v *PayWithGoogleDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - PayWithGoogleDetails: v, - } -} - -// PaymentDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns PaymentDetails wrapped in DonationPaymentRequestPaymentMethod -func PaymentDetailsAsDonationPaymentRequestPaymentMethod(v *PaymentDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - PaymentDetails: v, - } -} - -// RatepayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns RatepayDetails wrapped in DonationPaymentRequestPaymentMethod -func RatepayDetailsAsDonationPaymentRequestPaymentMethod(v *RatepayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - RatepayDetails: v, - } -} - -// SamsungPayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns SamsungPayDetails wrapped in DonationPaymentRequestPaymentMethod -func SamsungPayDetailsAsDonationPaymentRequestPaymentMethod(v *SamsungPayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - SamsungPayDetails: v, - } -} - -// SepaDirectDebitDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns SepaDirectDebitDetails wrapped in DonationPaymentRequestPaymentMethod -func SepaDirectDebitDetailsAsDonationPaymentRequestPaymentMethod(v *SepaDirectDebitDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - SepaDirectDebitDetails: v, - } -} - -// StoredPaymentMethodDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns StoredPaymentMethodDetails wrapped in DonationPaymentRequestPaymentMethod -func StoredPaymentMethodDetailsAsDonationPaymentRequestPaymentMethod(v *StoredPaymentMethodDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - StoredPaymentMethodDetails: v, - } -} - -// UpiCollectDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns UpiCollectDetails wrapped in DonationPaymentRequestPaymentMethod -func UpiCollectDetailsAsDonationPaymentRequestPaymentMethod(v *UpiCollectDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - UpiCollectDetails: v, - } -} - -// UpiIntentDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns UpiIntentDetails wrapped in DonationPaymentRequestPaymentMethod -func UpiIntentDetailsAsDonationPaymentRequestPaymentMethod(v *UpiIntentDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - UpiIntentDetails: v, - } -} - -// VippsDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns VippsDetails wrapped in DonationPaymentRequestPaymentMethod -func VippsDetailsAsDonationPaymentRequestPaymentMethod(v *VippsDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - VippsDetails: v, - } -} - -// VisaCheckoutDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns VisaCheckoutDetails wrapped in DonationPaymentRequestPaymentMethod -func VisaCheckoutDetailsAsDonationPaymentRequestPaymentMethod(v *VisaCheckoutDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - VisaCheckoutDetails: v, - } -} - -// WeChatPayDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns WeChatPayDetails wrapped in DonationPaymentRequestPaymentMethod -func WeChatPayDetailsAsDonationPaymentRequestPaymentMethod(v *WeChatPayDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - WeChatPayDetails: v, - } -} - -// WeChatPayMiniProgramDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns WeChatPayMiniProgramDetails wrapped in DonationPaymentRequestPaymentMethod -func WeChatPayMiniProgramDetailsAsDonationPaymentRequestPaymentMethod(v *WeChatPayMiniProgramDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - WeChatPayMiniProgramDetails: v, - } -} - -// ZipDetailsAsDonationPaymentRequestPaymentMethod is a convenience function that returns ZipDetails wrapped in DonationPaymentRequestPaymentMethod -func ZipDetailsAsDonationPaymentRequestPaymentMethod(v *ZipDetails) DonationPaymentRequestPaymentMethod { - return DonationPaymentRequestPaymentMethod{ - ZipDetails: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *DonationPaymentRequestPaymentMethod) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into AchDetails - err = json.Unmarshal(data, &dst.AchDetails) - if err == nil { - jsonAchDetails, _ := json.Marshal(dst.AchDetails) - if string(jsonAchDetails) == "{}" || !dst.AchDetails.isValidType() { // empty struct - dst.AchDetails = nil - } else { - match++ - } - } else { - dst.AchDetails = nil - } - - // try to unmarshal data into AfterpayDetails - err = json.Unmarshal(data, &dst.AfterpayDetails) - if err == nil { - jsonAfterpayDetails, _ := json.Marshal(dst.AfterpayDetails) - if string(jsonAfterpayDetails) == "{}" || !dst.AfterpayDetails.isValidType() { // empty struct - dst.AfterpayDetails = nil - } else { - match++ - } - } else { - dst.AfterpayDetails = nil - } - - // try to unmarshal data into AmazonPayDetails - err = json.Unmarshal(data, &dst.AmazonPayDetails) - if err == nil { - jsonAmazonPayDetails, _ := json.Marshal(dst.AmazonPayDetails) - if string(jsonAmazonPayDetails) == "{}" || !dst.AmazonPayDetails.isValidType() { // empty struct - dst.AmazonPayDetails = nil - } else { - match++ - } - } else { - dst.AmazonPayDetails = nil - } - - // try to unmarshal data into AndroidPayDetails - err = json.Unmarshal(data, &dst.AndroidPayDetails) - if err == nil { - jsonAndroidPayDetails, _ := json.Marshal(dst.AndroidPayDetails) - if string(jsonAndroidPayDetails) == "{}" || !dst.AndroidPayDetails.isValidType() { // empty struct - dst.AndroidPayDetails = nil - } else { - match++ - } - } else { - dst.AndroidPayDetails = nil - } - - // try to unmarshal data into ApplePayDetails - err = json.Unmarshal(data, &dst.ApplePayDetails) - if err == nil { - jsonApplePayDetails, _ := json.Marshal(dst.ApplePayDetails) - if string(jsonApplePayDetails) == "{}" || !dst.ApplePayDetails.isValidType() { // empty struct - dst.ApplePayDetails = nil - } else { - match++ - } - } else { - dst.ApplePayDetails = nil - } - - // try to unmarshal data into BacsDirectDebitDetails - err = json.Unmarshal(data, &dst.BacsDirectDebitDetails) - if err == nil { - jsonBacsDirectDebitDetails, _ := json.Marshal(dst.BacsDirectDebitDetails) - if string(jsonBacsDirectDebitDetails) == "{}" || !dst.BacsDirectDebitDetails.isValidType() { // empty struct - dst.BacsDirectDebitDetails = nil - } else { - match++ - } - } else { - dst.BacsDirectDebitDetails = nil - } - - // try to unmarshal data into BillDeskDetails - err = json.Unmarshal(data, &dst.BillDeskDetails) - if err == nil { - jsonBillDeskDetails, _ := json.Marshal(dst.BillDeskDetails) - if string(jsonBillDeskDetails) == "{}" || !dst.BillDeskDetails.isValidType() { // empty struct - dst.BillDeskDetails = nil - } else { - match++ - } - } else { - dst.BillDeskDetails = nil - } - - // try to unmarshal data into BlikDetails - err = json.Unmarshal(data, &dst.BlikDetails) - if err == nil { - jsonBlikDetails, _ := json.Marshal(dst.BlikDetails) - if string(jsonBlikDetails) == "{}" || !dst.BlikDetails.isValidType() { // empty struct - dst.BlikDetails = nil - } else { - match++ - } - } else { - dst.BlikDetails = nil - } - - // try to unmarshal data into CardDetails - err = json.Unmarshal(data, &dst.CardDetails) - if err == nil { - jsonCardDetails, _ := json.Marshal(dst.CardDetails) - if string(jsonCardDetails) == "{}" || !dst.CardDetails.isValidType() { // empty struct - dst.CardDetails = nil - } else { - match++ - } - } else { - dst.CardDetails = nil - } - - // try to unmarshal data into CellulantDetails - err = json.Unmarshal(data, &dst.CellulantDetails) - if err == nil { - jsonCellulantDetails, _ := json.Marshal(dst.CellulantDetails) - if string(jsonCellulantDetails) == "{}" || !dst.CellulantDetails.isValidType() { // empty struct - dst.CellulantDetails = nil - } else { - match++ - } - } else { - dst.CellulantDetails = nil - } - - // try to unmarshal data into DokuDetails - err = json.Unmarshal(data, &dst.DokuDetails) - if err == nil { - jsonDokuDetails, _ := json.Marshal(dst.DokuDetails) - if string(jsonDokuDetails) == "{}" || !dst.DokuDetails.isValidType() { // empty struct - dst.DokuDetails = nil - } else { - match++ - } - } else { - dst.DokuDetails = nil - } - - // try to unmarshal data into DotpayDetails - err = json.Unmarshal(data, &dst.DotpayDetails) - if err == nil { - jsonDotpayDetails, _ := json.Marshal(dst.DotpayDetails) - if string(jsonDotpayDetails) == "{}" || !dst.DotpayDetails.isValidType() { // empty struct - dst.DotpayDetails = nil - } else { - match++ - } - } else { - dst.DotpayDetails = nil - } - - // try to unmarshal data into DragonpayDetails - err = json.Unmarshal(data, &dst.DragonpayDetails) - if err == nil { - jsonDragonpayDetails, _ := json.Marshal(dst.DragonpayDetails) - if string(jsonDragonpayDetails) == "{}" || !dst.DragonpayDetails.isValidType() { // empty struct - dst.DragonpayDetails = nil - } else { - match++ - } - } else { - dst.DragonpayDetails = nil - } - - // try to unmarshal data into EcontextVoucherDetails - err = json.Unmarshal(data, &dst.EcontextVoucherDetails) - if err == nil { - jsonEcontextVoucherDetails, _ := json.Marshal(dst.EcontextVoucherDetails) - if string(jsonEcontextVoucherDetails) == "{}" || !dst.EcontextVoucherDetails.isValidType() { // empty struct - dst.EcontextVoucherDetails = nil - } else { - match++ - } - } else { - dst.EcontextVoucherDetails = nil - } - - // try to unmarshal data into GenericIssuerPaymentMethodDetails - err = json.Unmarshal(data, &dst.GenericIssuerPaymentMethodDetails) - if err == nil { - jsonGenericIssuerPaymentMethodDetails, _ := json.Marshal(dst.GenericIssuerPaymentMethodDetails) - if string(jsonGenericIssuerPaymentMethodDetails) == "{}" || !dst.GenericIssuerPaymentMethodDetails.isValidType() { // empty struct - dst.GenericIssuerPaymentMethodDetails = nil - } else { - match++ - } - } else { - dst.GenericIssuerPaymentMethodDetails = nil - } - - // try to unmarshal data into GiropayDetails - err = json.Unmarshal(data, &dst.GiropayDetails) - if err == nil { - jsonGiropayDetails, _ := json.Marshal(dst.GiropayDetails) - if string(jsonGiropayDetails) == "{}" || !dst.GiropayDetails.isValidType() { // empty struct - dst.GiropayDetails = nil - } else { - match++ - } - } else { - dst.GiropayDetails = nil - } - - // try to unmarshal data into GooglePayDetails - err = json.Unmarshal(data, &dst.GooglePayDetails) - if err == nil { - jsonGooglePayDetails, _ := json.Marshal(dst.GooglePayDetails) - if string(jsonGooglePayDetails) == "{}" || !dst.GooglePayDetails.isValidType() { // empty struct - dst.GooglePayDetails = nil - } else { - match++ - } - } else { - dst.GooglePayDetails = nil - } - - // try to unmarshal data into IdealDetails - err = json.Unmarshal(data, &dst.IdealDetails) - if err == nil { - jsonIdealDetails, _ := json.Marshal(dst.IdealDetails) - if string(jsonIdealDetails) == "{}" || !dst.IdealDetails.isValidType() { // empty struct - dst.IdealDetails = nil - } else { - match++ - } - } else { - dst.IdealDetails = nil - } - - // try to unmarshal data into KlarnaDetails - err = json.Unmarshal(data, &dst.KlarnaDetails) - if err == nil { - jsonKlarnaDetails, _ := json.Marshal(dst.KlarnaDetails) - if string(jsonKlarnaDetails) == "{}" || !dst.KlarnaDetails.isValidType() { // empty struct - dst.KlarnaDetails = nil - } else { - match++ - } - } else { - dst.KlarnaDetails = nil - } - - // try to unmarshal data into MasterpassDetails - err = json.Unmarshal(data, &dst.MasterpassDetails) - if err == nil { - jsonMasterpassDetails, _ := json.Marshal(dst.MasterpassDetails) - if string(jsonMasterpassDetails) == "{}" || !dst.MasterpassDetails.isValidType() { // empty struct - dst.MasterpassDetails = nil - } else { - match++ - } - } else { - dst.MasterpassDetails = nil - } - - // try to unmarshal data into MbwayDetails - err = json.Unmarshal(data, &dst.MbwayDetails) - if err == nil { - jsonMbwayDetails, _ := json.Marshal(dst.MbwayDetails) - if string(jsonMbwayDetails) == "{}" || !dst.MbwayDetails.isValidType() { // empty struct - dst.MbwayDetails = nil - } else { - match++ - } - } else { - dst.MbwayDetails = nil - } - - // try to unmarshal data into MobilePayDetails - err = json.Unmarshal(data, &dst.MobilePayDetails) - if err == nil { - jsonMobilePayDetails, _ := json.Marshal(dst.MobilePayDetails) - if string(jsonMobilePayDetails) == "{}" || !dst.MobilePayDetails.isValidType() { // empty struct - dst.MobilePayDetails = nil - } else { - match++ - } - } else { - dst.MobilePayDetails = nil - } - - // try to unmarshal data into MolPayDetails - err = json.Unmarshal(data, &dst.MolPayDetails) - if err == nil { - jsonMolPayDetails, _ := json.Marshal(dst.MolPayDetails) - if string(jsonMolPayDetails) == "{}" || !dst.MolPayDetails.isValidType() { // empty struct - dst.MolPayDetails = nil - } else { - match++ - } - } else { - dst.MolPayDetails = nil - } - - // try to unmarshal data into OpenInvoiceDetails - err = json.Unmarshal(data, &dst.OpenInvoiceDetails) - if err == nil { - jsonOpenInvoiceDetails, _ := json.Marshal(dst.OpenInvoiceDetails) - if string(jsonOpenInvoiceDetails) == "{}" || !dst.OpenInvoiceDetails.isValidType() { // empty struct - dst.OpenInvoiceDetails = nil - } else { - match++ - } - } else { - dst.OpenInvoiceDetails = nil - } - - // try to unmarshal data into PayPalDetails - err = json.Unmarshal(data, &dst.PayPalDetails) - if err == nil { - jsonPayPalDetails, _ := json.Marshal(dst.PayPalDetails) - if string(jsonPayPalDetails) == "{}" || !dst.PayPalDetails.isValidType() { // empty struct - dst.PayPalDetails = nil - } else { - match++ - } - } else { - dst.PayPalDetails = nil - } - - // try to unmarshal data into PayUUpiDetails - err = json.Unmarshal(data, &dst.PayUUpiDetails) - if err == nil { - jsonPayUUpiDetails, _ := json.Marshal(dst.PayUUpiDetails) - if string(jsonPayUUpiDetails) == "{}" || !dst.PayUUpiDetails.isValidType() { // empty struct - dst.PayUUpiDetails = nil - } else { - match++ - } - } else { - dst.PayUUpiDetails = nil - } - - // try to unmarshal data into PayWithGoogleDetails - err = json.Unmarshal(data, &dst.PayWithGoogleDetails) - if err == nil { - jsonPayWithGoogleDetails, _ := json.Marshal(dst.PayWithGoogleDetails) - if string(jsonPayWithGoogleDetails) == "{}" || !dst.PayWithGoogleDetails.isValidType() { // empty struct - dst.PayWithGoogleDetails = nil - } else { - match++ - } - } else { - dst.PayWithGoogleDetails = nil - } - - // try to unmarshal data into PaymentDetails - err = json.Unmarshal(data, &dst.PaymentDetails) - if err == nil { - jsonPaymentDetails, _ := json.Marshal(dst.PaymentDetails) - if string(jsonPaymentDetails) == "{}" || !dst.PaymentDetails.isValidType() { // empty struct - dst.PaymentDetails = nil - } else { - match++ - } - } else { - dst.PaymentDetails = nil - } - - // try to unmarshal data into RatepayDetails - err = json.Unmarshal(data, &dst.RatepayDetails) - if err == nil { - jsonRatepayDetails, _ := json.Marshal(dst.RatepayDetails) - if string(jsonRatepayDetails) == "{}" || !dst.RatepayDetails.isValidType() { // empty struct - dst.RatepayDetails = nil - } else { - match++ - } - } else { - dst.RatepayDetails = nil - } - - // try to unmarshal data into SamsungPayDetails - err = json.Unmarshal(data, &dst.SamsungPayDetails) - if err == nil { - jsonSamsungPayDetails, _ := json.Marshal(dst.SamsungPayDetails) - if string(jsonSamsungPayDetails) == "{}" || !dst.SamsungPayDetails.isValidType() { // empty struct - dst.SamsungPayDetails = nil - } else { - match++ - } - } else { - dst.SamsungPayDetails = nil - } - - // try to unmarshal data into SepaDirectDebitDetails - err = json.Unmarshal(data, &dst.SepaDirectDebitDetails) - if err == nil { - jsonSepaDirectDebitDetails, _ := json.Marshal(dst.SepaDirectDebitDetails) - if string(jsonSepaDirectDebitDetails) == "{}" || !dst.SepaDirectDebitDetails.isValidType() { // empty struct - dst.SepaDirectDebitDetails = nil - } else { - match++ - } - } else { - dst.SepaDirectDebitDetails = nil - } - - // try to unmarshal data into StoredPaymentMethodDetails - err = json.Unmarshal(data, &dst.StoredPaymentMethodDetails) - if err == nil { - jsonStoredPaymentMethodDetails, _ := json.Marshal(dst.StoredPaymentMethodDetails) - if string(jsonStoredPaymentMethodDetails) == "{}" || !dst.StoredPaymentMethodDetails.isValidType() { // empty struct - dst.StoredPaymentMethodDetails = nil - } else { - match++ - } - } else { - dst.StoredPaymentMethodDetails = nil - } - - // try to unmarshal data into UpiCollectDetails - err = json.Unmarshal(data, &dst.UpiCollectDetails) - if err == nil { - jsonUpiCollectDetails, _ := json.Marshal(dst.UpiCollectDetails) - if string(jsonUpiCollectDetails) == "{}" || !dst.UpiCollectDetails.isValidType() { // empty struct - dst.UpiCollectDetails = nil - } else { - match++ - } - } else { - dst.UpiCollectDetails = nil - } - - // try to unmarshal data into UpiIntentDetails - err = json.Unmarshal(data, &dst.UpiIntentDetails) - if err == nil { - jsonUpiIntentDetails, _ := json.Marshal(dst.UpiIntentDetails) - if string(jsonUpiIntentDetails) == "{}" || !dst.UpiIntentDetails.isValidType() { // empty struct - dst.UpiIntentDetails = nil - } else { - match++ - } - } else { - dst.UpiIntentDetails = nil - } - - // try to unmarshal data into VippsDetails - err = json.Unmarshal(data, &dst.VippsDetails) - if err == nil { - jsonVippsDetails, _ := json.Marshal(dst.VippsDetails) - if string(jsonVippsDetails) == "{}" || !dst.VippsDetails.isValidType() { // empty struct - dst.VippsDetails = nil - } else { - match++ - } - } else { - dst.VippsDetails = nil - } - - // try to unmarshal data into VisaCheckoutDetails - err = json.Unmarshal(data, &dst.VisaCheckoutDetails) - if err == nil { - jsonVisaCheckoutDetails, _ := json.Marshal(dst.VisaCheckoutDetails) - if string(jsonVisaCheckoutDetails) == "{}" || !dst.VisaCheckoutDetails.isValidType() { // empty struct - dst.VisaCheckoutDetails = nil - } else { - match++ - } - } else { - dst.VisaCheckoutDetails = nil - } - - // try to unmarshal data into WeChatPayDetails - err = json.Unmarshal(data, &dst.WeChatPayDetails) - if err == nil { - jsonWeChatPayDetails, _ := json.Marshal(dst.WeChatPayDetails) - if string(jsonWeChatPayDetails) == "{}" || !dst.WeChatPayDetails.isValidType() { // empty struct - dst.WeChatPayDetails = nil - } else { - match++ - } - } else { - dst.WeChatPayDetails = nil - } - - // try to unmarshal data into WeChatPayMiniProgramDetails - err = json.Unmarshal(data, &dst.WeChatPayMiniProgramDetails) - if err == nil { - jsonWeChatPayMiniProgramDetails, _ := json.Marshal(dst.WeChatPayMiniProgramDetails) - if string(jsonWeChatPayMiniProgramDetails) == "{}" || !dst.WeChatPayMiniProgramDetails.isValidType() { // empty struct - dst.WeChatPayMiniProgramDetails = nil - } else { - match++ - } - } else { - dst.WeChatPayMiniProgramDetails = nil - } - - // try to unmarshal data into ZipDetails - err = json.Unmarshal(data, &dst.ZipDetails) - if err == nil { - jsonZipDetails, _ := json.Marshal(dst.ZipDetails) - if string(jsonZipDetails) == "{}" || !dst.ZipDetails.isValidType() { // empty struct - dst.ZipDetails = nil - } else { - match++ - } - } else { - dst.ZipDetails = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.AchDetails = nil - dst.AfterpayDetails = nil - dst.AmazonPayDetails = nil - dst.AndroidPayDetails = nil - dst.ApplePayDetails = nil - dst.BacsDirectDebitDetails = nil - dst.BillDeskDetails = nil - dst.BlikDetails = nil - dst.CardDetails = nil - dst.CellulantDetails = nil - dst.DokuDetails = nil - dst.DotpayDetails = nil - dst.DragonpayDetails = nil - dst.EcontextVoucherDetails = nil - dst.GenericIssuerPaymentMethodDetails = nil - dst.GiropayDetails = nil - dst.GooglePayDetails = nil - dst.IdealDetails = nil - dst.KlarnaDetails = nil - dst.MasterpassDetails = nil - dst.MbwayDetails = nil - dst.MobilePayDetails = nil - dst.MolPayDetails = nil - dst.OpenInvoiceDetails = nil - dst.PayPalDetails = nil - dst.PayUUpiDetails = nil - dst.PayWithGoogleDetails = nil - dst.PaymentDetails = nil - dst.RatepayDetails = nil - dst.SamsungPayDetails = nil - dst.SepaDirectDebitDetails = nil - dst.StoredPaymentMethodDetails = nil - dst.UpiCollectDetails = nil - dst.UpiIntentDetails = nil - dst.VippsDetails = nil - dst.VisaCheckoutDetails = nil - dst.WeChatPayDetails = nil - dst.WeChatPayMiniProgramDetails = nil - dst.ZipDetails = nil - - return fmt.Errorf("data matches more than one schema in oneOf(DonationPaymentRequestPaymentMethod)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(DonationPaymentRequestPaymentMethod)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src DonationPaymentRequestPaymentMethod) MarshalJSON() ([]byte, error) { - if src.AchDetails != nil { - return json.Marshal(&src.AchDetails) - } - - if src.AfterpayDetails != nil { - return json.Marshal(&src.AfterpayDetails) - } - - if src.AmazonPayDetails != nil { - return json.Marshal(&src.AmazonPayDetails) - } - - if src.AndroidPayDetails != nil { - return json.Marshal(&src.AndroidPayDetails) - } - - if src.ApplePayDetails != nil { - return json.Marshal(&src.ApplePayDetails) - } - - if src.BacsDirectDebitDetails != nil { - return json.Marshal(&src.BacsDirectDebitDetails) - } - - if src.BillDeskDetails != nil { - return json.Marshal(&src.BillDeskDetails) - } - - if src.BlikDetails != nil { - return json.Marshal(&src.BlikDetails) - } - - if src.CardDetails != nil { - return json.Marshal(&src.CardDetails) - } - - if src.CellulantDetails != nil { - return json.Marshal(&src.CellulantDetails) - } - - if src.DokuDetails != nil { - return json.Marshal(&src.DokuDetails) - } - - if src.DotpayDetails != nil { - return json.Marshal(&src.DotpayDetails) - } - - if src.DragonpayDetails != nil { - return json.Marshal(&src.DragonpayDetails) - } - - if src.EcontextVoucherDetails != nil { - return json.Marshal(&src.EcontextVoucherDetails) - } - - if src.GenericIssuerPaymentMethodDetails != nil { - return json.Marshal(&src.GenericIssuerPaymentMethodDetails) - } - - if src.GiropayDetails != nil { - return json.Marshal(&src.GiropayDetails) - } - - if src.GooglePayDetails != nil { - return json.Marshal(&src.GooglePayDetails) - } - - if src.IdealDetails != nil { - return json.Marshal(&src.IdealDetails) - } - - if src.KlarnaDetails != nil { - return json.Marshal(&src.KlarnaDetails) - } - - if src.MasterpassDetails != nil { - return json.Marshal(&src.MasterpassDetails) - } - - if src.MbwayDetails != nil { - return json.Marshal(&src.MbwayDetails) - } - - if src.MobilePayDetails != nil { - return json.Marshal(&src.MobilePayDetails) - } - - if src.MolPayDetails != nil { - return json.Marshal(&src.MolPayDetails) - } - - if src.OpenInvoiceDetails != nil { - return json.Marshal(&src.OpenInvoiceDetails) - } - - if src.PayPalDetails != nil { - return json.Marshal(&src.PayPalDetails) - } - - if src.PayUUpiDetails != nil { - return json.Marshal(&src.PayUUpiDetails) - } - - if src.PayWithGoogleDetails != nil { - return json.Marshal(&src.PayWithGoogleDetails) - } - - if src.PaymentDetails != nil { - return json.Marshal(&src.PaymentDetails) - } - - if src.RatepayDetails != nil { - return json.Marshal(&src.RatepayDetails) - } - - if src.SamsungPayDetails != nil { - return json.Marshal(&src.SamsungPayDetails) - } - - if src.SepaDirectDebitDetails != nil { - return json.Marshal(&src.SepaDirectDebitDetails) - } - - if src.StoredPaymentMethodDetails != nil { - return json.Marshal(&src.StoredPaymentMethodDetails) - } - - if src.UpiCollectDetails != nil { - return json.Marshal(&src.UpiCollectDetails) - } - - if src.UpiIntentDetails != nil { - return json.Marshal(&src.UpiIntentDetails) - } - - if src.VippsDetails != nil { - return json.Marshal(&src.VippsDetails) - } - - if src.VisaCheckoutDetails != nil { - return json.Marshal(&src.VisaCheckoutDetails) - } - - if src.WeChatPayDetails != nil { - return json.Marshal(&src.WeChatPayDetails) - } - - if src.WeChatPayMiniProgramDetails != nil { - return json.Marshal(&src.WeChatPayMiniProgramDetails) - } - - if src.ZipDetails != nil { - return json.Marshal(&src.ZipDetails) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *DonationPaymentRequestPaymentMethod) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.AchDetails != nil { - return obj.AchDetails - } - - if obj.AfterpayDetails != nil { - return obj.AfterpayDetails - } - - if obj.AmazonPayDetails != nil { - return obj.AmazonPayDetails - } - - if obj.AndroidPayDetails != nil { - return obj.AndroidPayDetails - } - - if obj.ApplePayDetails != nil { - return obj.ApplePayDetails - } - - if obj.BacsDirectDebitDetails != nil { - return obj.BacsDirectDebitDetails - } - - if obj.BillDeskDetails != nil { - return obj.BillDeskDetails - } - - if obj.BlikDetails != nil { - return obj.BlikDetails - } - - if obj.CardDetails != nil { - return obj.CardDetails - } - - if obj.CellulantDetails != nil { - return obj.CellulantDetails - } - - if obj.DokuDetails != nil { - return obj.DokuDetails - } - - if obj.DotpayDetails != nil { - return obj.DotpayDetails - } - - if obj.DragonpayDetails != nil { - return obj.DragonpayDetails - } - - if obj.EcontextVoucherDetails != nil { - return obj.EcontextVoucherDetails - } - - if obj.GenericIssuerPaymentMethodDetails != nil { - return obj.GenericIssuerPaymentMethodDetails - } - - if obj.GiropayDetails != nil { - return obj.GiropayDetails - } - - if obj.GooglePayDetails != nil { - return obj.GooglePayDetails - } - - if obj.IdealDetails != nil { - return obj.IdealDetails - } - - if obj.KlarnaDetails != nil { - return obj.KlarnaDetails - } - - if obj.MasterpassDetails != nil { - return obj.MasterpassDetails - } - - if obj.MbwayDetails != nil { - return obj.MbwayDetails - } - - if obj.MobilePayDetails != nil { - return obj.MobilePayDetails - } - - if obj.MolPayDetails != nil { - return obj.MolPayDetails - } - - if obj.OpenInvoiceDetails != nil { - return obj.OpenInvoiceDetails - } - - if obj.PayPalDetails != nil { - return obj.PayPalDetails - } - - if obj.PayUUpiDetails != nil { - return obj.PayUUpiDetails - } - - if obj.PayWithGoogleDetails != nil { - return obj.PayWithGoogleDetails - } - - if obj.PaymentDetails != nil { - return obj.PaymentDetails - } - - if obj.RatepayDetails != nil { - return obj.RatepayDetails - } - - if obj.SamsungPayDetails != nil { - return obj.SamsungPayDetails - } - - if obj.SepaDirectDebitDetails != nil { - return obj.SepaDirectDebitDetails - } - - if obj.StoredPaymentMethodDetails != nil { - return obj.StoredPaymentMethodDetails - } - - if obj.UpiCollectDetails != nil { - return obj.UpiCollectDetails - } - - if obj.UpiIntentDetails != nil { - return obj.UpiIntentDetails - } - - if obj.VippsDetails != nil { - return obj.VippsDetails - } - - if obj.VisaCheckoutDetails != nil { - return obj.VisaCheckoutDetails - } - - if obj.WeChatPayDetails != nil { - return obj.WeChatPayDetails - } - - if obj.WeChatPayMiniProgramDetails != nil { - return obj.WeChatPayMiniProgramDetails - } - - if obj.ZipDetails != nil { - return obj.ZipDetails - } - - // all schemas are nil - return nil -} - -type NullableDonationPaymentRequestPaymentMethod struct { - value *DonationPaymentRequestPaymentMethod - isSet bool -} - -func (v NullableDonationPaymentRequestPaymentMethod) Get() *DonationPaymentRequestPaymentMethod { - return v.value -} - -func (v *NullableDonationPaymentRequestPaymentMethod) Set(val *DonationPaymentRequestPaymentMethod) { - v.value = val - v.isSet = true -} - -func (v NullableDonationPaymentRequestPaymentMethod) IsSet() bool { - return v.isSet -} - -func (v *NullableDonationPaymentRequestPaymentMethod) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDonationPaymentRequestPaymentMethod(val *DonationPaymentRequestPaymentMethod) *NullableDonationPaymentRequestPaymentMethod { - return &NullableDonationPaymentRequestPaymentMethod{value: val, isSet: true} -} - -func (v NullableDonationPaymentRequestPaymentMethod) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDonationPaymentRequestPaymentMethod) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_donation_response.go b/src/checkout/model_donation_response.go deleted file mode 100644 index 9fa8f6a4e..000000000 --- a/src/checkout/model_donation_response.go +++ /dev/null @@ -1,355 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the DonationResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &DonationResponse{} - -// DonationResponse struct for DonationResponse -type DonationResponse struct { - Amount *Amount `json:"amount,omitempty"` - // The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding). - DonationAccount *string `json:"donationAccount,omitempty"` - // Your unique resource identifier. - Id *string `json:"id,omitempty"` - // The merchant account identifier, with which you want to process the transaction. - MerchantAccount *string `json:"merchantAccount,omitempty"` - Payment *PaymentResponse `json:"payment,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,omitempty"` - // The status of the donation transaction. Possible values: * **completed** * **pending** * **refused** - Status *string `json:"status,omitempty"` -} - -// NewDonationResponse instantiates a new DonationResponse 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 NewDonationResponse() *DonationResponse { - this := DonationResponse{} - return &this -} - -// NewDonationResponseWithDefaults instantiates a new DonationResponse 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 NewDonationResponseWithDefaults() *DonationResponse { - this := DonationResponse{} - return &this -} - -// GetAmount returns the Amount field value if set, zero value otherwise. -func (o *DonationResponse) 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 *DonationResponse) 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 *DonationResponse) 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 *DonationResponse) SetAmount(v Amount) { - o.Amount = &v -} - -// GetDonationAccount returns the DonationAccount field value if set, zero value otherwise. -func (o *DonationResponse) GetDonationAccount() string { - if o == nil || common.IsNil(o.DonationAccount) { - var ret string - return ret - } - return *o.DonationAccount -} - -// GetDonationAccountOk returns a tuple with the DonationAccount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DonationResponse) GetDonationAccountOk() (*string, bool) { - if o == nil || common.IsNil(o.DonationAccount) { - return nil, false - } - return o.DonationAccount, true -} - -// HasDonationAccount returns a boolean if a field has been set. -func (o *DonationResponse) HasDonationAccount() bool { - if o != nil && !common.IsNil(o.DonationAccount) { - return true - } - - return false -} - -// SetDonationAccount gets a reference to the given string and assigns it to the DonationAccount field. -func (o *DonationResponse) SetDonationAccount(v string) { - o.DonationAccount = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *DonationResponse) GetId() string { - if o == nil || common.IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DonationResponse) GetIdOk() (*string, bool) { - if o == nil || common.IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *DonationResponse) HasId() bool { - if o != nil && !common.IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *DonationResponse) SetId(v string) { - o.Id = &v -} - -// GetMerchantAccount returns the MerchantAccount field value if set, zero value otherwise. -func (o *DonationResponse) GetMerchantAccount() string { - if o == nil || common.IsNil(o.MerchantAccount) { - var ret string - return ret - } - return *o.MerchantAccount -} - -// GetMerchantAccountOk returns a tuple with the MerchantAccount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DonationResponse) GetMerchantAccountOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantAccount) { - return nil, false - } - return o.MerchantAccount, true -} - -// HasMerchantAccount returns a boolean if a field has been set. -func (o *DonationResponse) HasMerchantAccount() bool { - if o != nil && !common.IsNil(o.MerchantAccount) { - return true - } - - return false -} - -// SetMerchantAccount gets a reference to the given string and assigns it to the MerchantAccount field. -func (o *DonationResponse) SetMerchantAccount(v string) { - o.MerchantAccount = &v -} - -// GetPayment returns the Payment field value if set, zero value otherwise. -func (o *DonationResponse) GetPayment() PaymentResponse { - if o == nil || common.IsNil(o.Payment) { - var ret PaymentResponse - return ret - } - return *o.Payment -} - -// GetPaymentOk returns a tuple with the Payment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DonationResponse) GetPaymentOk() (*PaymentResponse, bool) { - if o == nil || common.IsNil(o.Payment) { - return nil, false - } - return o.Payment, true -} - -// HasPayment returns a boolean if a field has been set. -func (o *DonationResponse) HasPayment() bool { - if o != nil && !common.IsNil(o.Payment) { - return true - } - - return false -} - -// SetPayment gets a reference to the given PaymentResponse and assigns it to the Payment field. -func (o *DonationResponse) SetPayment(v PaymentResponse) { - o.Payment = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *DonationResponse) 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 *DonationResponse) 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 *DonationResponse) 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 *DonationResponse) SetReference(v string) { - o.Reference = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *DonationResponse) GetStatus() string { - if o == nil || common.IsNil(o.Status) { - var ret string - 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 *DonationResponse) GetStatusOk() (*string, 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 *DonationResponse) HasStatus() bool { - if o != nil && !common.IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *DonationResponse) SetStatus(v string) { - o.Status = &v -} - -func (o DonationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DonationResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } - if !common.IsNil(o.DonationAccount) { - toSerialize["donationAccount"] = o.DonationAccount - } - if !common.IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !common.IsNil(o.MerchantAccount) { - toSerialize["merchantAccount"] = o.MerchantAccount - } - if !common.IsNil(o.Payment) { - toSerialize["payment"] = o.Payment - } - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableDonationResponse struct { - value *DonationResponse - isSet bool -} - -func (v NullableDonationResponse) Get() *DonationResponse { - return v.value -} - -func (v *NullableDonationResponse) Set(val *DonationResponse) { - v.value = val - v.isSet = true -} - -func (v NullableDonationResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableDonationResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDonationResponse(val *DonationResponse) *NullableDonationResponse { - return &NullableDonationResponse{value: val, isSet: true} -} - -func (v NullableDonationResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDonationResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *DonationResponse) isValidStatus() bool { - var allowedEnumValues = []string{"completed", "pending", "refused"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_klarna_details.go b/src/checkout/model_klarna_details.go index 812a846b2..9195e2ae1 100644 --- a/src/checkout/model_klarna_details.go +++ b/src/checkout/model_klarna_details.go @@ -32,6 +32,8 @@ type KlarnaDetails 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 type of flow to initiate. + Subtype *string `json:"subtype,omitempty"` // **klarna** Type string `json:"type"` } @@ -251,6 +253,38 @@ func (o *KlarnaDetails) SetStoredPaymentMethodId(v string) { o.StoredPaymentMethodId = &v } +// GetSubtype returns the Subtype field value if set, zero value otherwise. +func (o *KlarnaDetails) 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 *KlarnaDetails) 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 *KlarnaDetails) 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 *KlarnaDetails) SetSubtype(v string) { + o.Subtype = &v +} + // GetType returns the Type field value func (o *KlarnaDetails) GetType() string { if o == nil { @@ -303,6 +337,9 @@ func (o KlarnaDetails) 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 } diff --git a/src/checkout/model_line_item.go b/src/checkout/model_line_item.go index 01fe7e087..a4fcb0dd5 100644 --- a/src/checkout/model_line_item.go +++ b/src/checkout/model_line_item.go @@ -33,7 +33,7 @@ type LineItem struct { Id *string `json:"id,omitempty"` // Link to the picture of the purchased item. ImageUrl *string `json:"imageUrl,omitempty"` - // Item category, used by the RatePay payment method. + // Item category, used by the payment methods PayPal and Ratepay. ItemCategory *string `json:"itemCategory,omitempty"` // Manufacturer of the item. Manufacturer *string `json:"manufacturer,omitempty"` diff --git a/src/checkout/model_pay_pal_details.go b/src/checkout/model_pay_pal_details.go index b430bfc3e..e8e6b0f66 100644 --- a/src/checkout/model_pay_pal_details.go +++ b/src/checkout/model_pay_pal_details.go @@ -23,8 +23,12 @@ type PayPalDetails struct { CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` // The unique ID associated with the order. OrderID *string `json:"orderID,omitempty"` + // IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED + PayeePreferred *string `json:"payeePreferred,omitempty"` // The unique ID associated with the payer. PayerID *string `json:"payerID,omitempty"` + // PAYPAL or PAYPAL_CREDIT + PayerSelected *string `json:"payerSelected,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. // Deprecated RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` @@ -120,6 +124,38 @@ func (o *PayPalDetails) SetOrderID(v string) { o.OrderID = &v } +// GetPayeePreferred returns the PayeePreferred field value if set, zero value otherwise. +func (o *PayPalDetails) GetPayeePreferred() string { + if o == nil || common.IsNil(o.PayeePreferred) { + var ret string + return ret + } + return *o.PayeePreferred +} + +// GetPayeePreferredOk returns a tuple with the PayeePreferred field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayPalDetails) GetPayeePreferredOk() (*string, bool) { + if o == nil || common.IsNil(o.PayeePreferred) { + return nil, false + } + return o.PayeePreferred, true +} + +// HasPayeePreferred returns a boolean if a field has been set. +func (o *PayPalDetails) HasPayeePreferred() bool { + if o != nil && !common.IsNil(o.PayeePreferred) { + return true + } + + return false +} + +// SetPayeePreferred gets a reference to the given string and assigns it to the PayeePreferred field. +func (o *PayPalDetails) SetPayeePreferred(v string) { + o.PayeePreferred = &v +} + // GetPayerID returns the PayerID field value if set, zero value otherwise. func (o *PayPalDetails) GetPayerID() string { if o == nil || common.IsNil(o.PayerID) { @@ -152,6 +188,38 @@ func (o *PayPalDetails) SetPayerID(v string) { o.PayerID = &v } +// GetPayerSelected returns the PayerSelected field value if set, zero value otherwise. +func (o *PayPalDetails) GetPayerSelected() string { + if o == nil || common.IsNil(o.PayerSelected) { + var ret string + return ret + } + return *o.PayerSelected +} + +// GetPayerSelectedOk returns a tuple with the PayerSelected field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayPalDetails) GetPayerSelectedOk() (*string, bool) { + if o == nil || common.IsNil(o.PayerSelected) { + return nil, false + } + return o.PayerSelected, true +} + +// HasPayerSelected returns a boolean if a field has been set. +func (o *PayPalDetails) HasPayerSelected() bool { + if o != nil && !common.IsNil(o.PayerSelected) { + return true + } + + return false +} + +// SetPayerSelected gets a reference to the given string and assigns it to the PayerSelected field. +func (o *PayPalDetails) SetPayerSelected(v string) { + o.PayerSelected = &v +} + // GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. // Deprecated func (o *PayPalDetails) GetRecurringDetailReference() string { @@ -291,9 +359,15 @@ func (o PayPalDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.OrderID) { toSerialize["orderID"] = o.OrderID } + if !common.IsNil(o.PayeePreferred) { + toSerialize["payeePreferred"] = o.PayeePreferred + } if !common.IsNil(o.PayerID) { toSerialize["payerID"] = o.PayerID } + if !common.IsNil(o.PayerSelected) { + toSerialize["payerSelected"] = o.PayerSelected + } if !common.IsNil(o.RecurringDetailReference) { toSerialize["recurringDetailReference"] = o.RecurringDetailReference } diff --git a/src/checkout/model_payment_amount_update_resource.go b/src/checkout/model_payment_amount_update_resource.go deleted file mode 100644 index 9983f9682..000000000 --- a/src/checkout/model_payment_amount_update_resource.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentAmountUpdateResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentAmountUpdateResource{} - -// PaymentAmountUpdateResource struct for PaymentAmountUpdateResource -type PaymentAmountUpdateResource struct { - Amount Amount `json:"amount"` - // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - IndustryUsage *string `json:"industryUsage,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. - PaymentPspReference string `json:"paymentPspReference"` - // Adyen's 16-character reference associated with the amount update request. - PspReference string `json:"pspReference"` - // Your reference for the amount update request. Maximum length: 80 characters. - Reference string `json:"reference"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewPaymentAmountUpdateResource instantiates a new PaymentAmountUpdateResource 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 NewPaymentAmountUpdateResource(amount Amount, merchantAccount string, paymentPspReference string, pspReference string, reference string, status string) *PaymentAmountUpdateResource { - this := PaymentAmountUpdateResource{} - this.Amount = amount - this.MerchantAccount = merchantAccount - this.PaymentPspReference = paymentPspReference - this.PspReference = pspReference - this.Reference = reference - this.Status = status - return &this -} - -// NewPaymentAmountUpdateResourceWithDefaults instantiates a new PaymentAmountUpdateResource 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 NewPaymentAmountUpdateResourceWithDefaults() *PaymentAmountUpdateResource { - this := PaymentAmountUpdateResource{} - return &this -} - -// GetAmount returns the Amount field value -func (o *PaymentAmountUpdateResource) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *PaymentAmountUpdateResource) SetAmount(v Amount) { - o.Amount = v -} - -// GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. -func (o *PaymentAmountUpdateResource) GetIndustryUsage() string { - if o == nil || common.IsNil(o.IndustryUsage) { - var ret string - return ret - } - return *o.IndustryUsage -} - -// GetIndustryUsageOk returns a tuple with the IndustryUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetIndustryUsageOk() (*string, bool) { - if o == nil || common.IsNil(o.IndustryUsage) { - return nil, false - } - return o.IndustryUsage, true -} - -// HasIndustryUsage returns a boolean if a field has been set. -func (o *PaymentAmountUpdateResource) HasIndustryUsage() bool { - if o != nil && !common.IsNil(o.IndustryUsage) { - return true - } - - return false -} - -// SetIndustryUsage gets a reference to the given string and assigns it to the IndustryUsage field. -func (o *PaymentAmountUpdateResource) SetIndustryUsage(v string) { - o.IndustryUsage = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentAmountUpdateResource) 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 *PaymentAmountUpdateResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentAmountUpdateResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentPspReference returns the PaymentPspReference field value -func (o *PaymentAmountUpdateResource) GetPaymentPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentPspReference -} - -// GetPaymentPspReferenceOk returns a tuple with the PaymentPspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetPaymentPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentPspReference, true -} - -// SetPaymentPspReference sets field value -func (o *PaymentAmountUpdateResource) SetPaymentPspReference(v string) { - o.PaymentPspReference = v -} - -// GetPspReference returns the PspReference field value -func (o *PaymentAmountUpdateResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *PaymentAmountUpdateResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value -func (o *PaymentAmountUpdateResource) GetReference() string { - if o == nil { - var ret string - return ret - } - - return o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *PaymentAmountUpdateResource) SetReference(v string) { - o.Reference = v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *PaymentAmountUpdateResource) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *PaymentAmountUpdateResource) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *PaymentAmountUpdateResource) SetSplits(v []Split) { - o.Splits = v -} - -// GetStatus returns the Status field value -func (o *PaymentAmountUpdateResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *PaymentAmountUpdateResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *PaymentAmountUpdateResource) SetStatus(v string) { - o.Status = v -} - -func (o PaymentAmountUpdateResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentAmountUpdateResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.IndustryUsage) { - toSerialize["industryUsage"] = o.IndustryUsage - } - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentPspReference"] = o.PaymentPspReference - toSerialize["pspReference"] = o.PspReference - toSerialize["reference"] = o.Reference - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullablePaymentAmountUpdateResource struct { - value *PaymentAmountUpdateResource - isSet bool -} - -func (v NullablePaymentAmountUpdateResource) Get() *PaymentAmountUpdateResource { - return v.value -} - -func (v *NullablePaymentAmountUpdateResource) Set(val *PaymentAmountUpdateResource) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentAmountUpdateResource) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentAmountUpdateResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentAmountUpdateResource(val *PaymentAmountUpdateResource) *NullablePaymentAmountUpdateResource { - return &NullablePaymentAmountUpdateResource{value: val, isSet: true} -} - -func (v NullablePaymentAmountUpdateResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentAmountUpdateResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentAmountUpdateResource) isValidIndustryUsage() bool { - var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} - for _, allowed := range allowedEnumValues { - if o.GetIndustryUsage() == allowed { - return true - } - } - return false -} -func (o *PaymentAmountUpdateResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_cancel_resource.go b/src/checkout/model_payment_cancel_resource.go deleted file mode 100644 index cf4bd9a18..000000000 --- a/src/checkout/model_payment_cancel_resource.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentCancelResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentCancelResource{} - -// PaymentCancelResource struct for PaymentCancelResource -type PaymentCancelResource 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. - PaymentPspReference string `json:"paymentPspReference"` - // Adyen's 16-character reference associated with the cancel request. - PspReference string `json:"pspReference"` - // Your reference for the cancel request. - Reference *string `json:"reference,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewPaymentCancelResource instantiates a new PaymentCancelResource 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 NewPaymentCancelResource(merchantAccount string, paymentPspReference string, pspReference string, status string) *PaymentCancelResource { - this := PaymentCancelResource{} - this.MerchantAccount = merchantAccount - this.PaymentPspReference = paymentPspReference - this.PspReference = pspReference - this.Status = status - return &this -} - -// NewPaymentCancelResourceWithDefaults instantiates a new PaymentCancelResource 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 NewPaymentCancelResourceWithDefaults() *PaymentCancelResource { - this := PaymentCancelResource{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentCancelResource) 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 *PaymentCancelResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentCancelResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentPspReference returns the PaymentPspReference field value -func (o *PaymentCancelResource) GetPaymentPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentPspReference -} - -// GetPaymentPspReferenceOk returns a tuple with the PaymentPspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentCancelResource) GetPaymentPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentPspReference, true -} - -// SetPaymentPspReference sets field value -func (o *PaymentCancelResource) SetPaymentPspReference(v string) { - o.PaymentPspReference = v -} - -// GetPspReference returns the PspReference field value -func (o *PaymentCancelResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentCancelResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *PaymentCancelResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *PaymentCancelResource) 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 *PaymentCancelResource) 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 *PaymentCancelResource) 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 *PaymentCancelResource) SetReference(v string) { - o.Reference = &v -} - -// GetStatus returns the Status field value -func (o *PaymentCancelResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *PaymentCancelResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *PaymentCancelResource) SetStatus(v string) { - o.Status = v -} - -func (o PaymentCancelResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentCancelResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentPspReference"] = o.PaymentPspReference - toSerialize["pspReference"] = o.PspReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullablePaymentCancelResource struct { - value *PaymentCancelResource - isSet bool -} - -func (v NullablePaymentCancelResource) Get() *PaymentCancelResource { - return v.value -} - -func (v *NullablePaymentCancelResource) Set(val *PaymentCancelResource) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentCancelResource) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentCancelResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentCancelResource(val *PaymentCancelResource) *NullablePaymentCancelResource { - return &NullablePaymentCancelResource{value: val, isSet: true} -} - -func (v NullablePaymentCancelResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentCancelResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentCancelResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_capture_request.go b/src/checkout/model_payment_capture_request.go index 8fb270a06..80f2de18f 100644 --- a/src/checkout/model_payment_capture_request.go +++ b/src/checkout/model_payment_capture_request.go @@ -30,7 +30,7 @@ type PaymentCaptureRequest struct { // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). Splits []Split `json:"splits,omitempty"` // A List of sub-merchants. - SubMerchants []SubMerchant2 `json:"subMerchants,omitempty"` + SubMerchants []SubMerchantInfo `json:"subMerchants,omitempty"` } // NewPaymentCaptureRequest instantiates a new PaymentCaptureRequest object @@ -229,9 +229,9 @@ func (o *PaymentCaptureRequest) SetSplits(v []Split) { } // GetSubMerchants returns the SubMerchants field value if set, zero value otherwise. -func (o *PaymentCaptureRequest) GetSubMerchants() []SubMerchant2 { +func (o *PaymentCaptureRequest) GetSubMerchants() []SubMerchantInfo { if o == nil || common.IsNil(o.SubMerchants) { - var ret []SubMerchant2 + var ret []SubMerchantInfo return ret } return o.SubMerchants @@ -239,7 +239,7 @@ func (o *PaymentCaptureRequest) GetSubMerchants() []SubMerchant2 { // GetSubMerchantsOk returns a tuple with the SubMerchants field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentCaptureRequest) GetSubMerchantsOk() ([]SubMerchant2, bool) { +func (o *PaymentCaptureRequest) GetSubMerchantsOk() ([]SubMerchantInfo, bool) { if o == nil || common.IsNil(o.SubMerchants) { return nil, false } @@ -255,8 +255,8 @@ func (o *PaymentCaptureRequest) HasSubMerchants() bool { return false } -// SetSubMerchants gets a reference to the given []SubMerchant2 and assigns it to the SubMerchants field. -func (o *PaymentCaptureRequest) SetSubMerchants(v []SubMerchant2) { +// SetSubMerchants gets a reference to the given []SubMerchantInfo and assigns it to the SubMerchants field. +func (o *PaymentCaptureRequest) SetSubMerchants(v []SubMerchantInfo) { o.SubMerchants = v } diff --git a/src/checkout/model_payment_capture_resource.go b/src/checkout/model_payment_capture_resource.go deleted file mode 100644 index 4259343d5..000000000 --- a/src/checkout/model_payment_capture_resource.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentCaptureResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentCaptureResource{} - -// PaymentCaptureResource struct for PaymentCaptureResource -type PaymentCaptureResource struct { - Amount Amount `json:"amount"` - // 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. - MerchantAccount string `json:"merchantAccount"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. - PaymentPspReference string `json:"paymentPspReference"` - // Adyen's 16-character reference associated with the capture request. - PspReference string `json:"pspReference"` - // Your reference for the capture request. - Reference *string `json:"reference,omitempty"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewPaymentCaptureResource instantiates a new PaymentCaptureResource 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 NewPaymentCaptureResource(amount Amount, merchantAccount string, paymentPspReference string, pspReference string, status string) *PaymentCaptureResource { - this := PaymentCaptureResource{} - this.Amount = amount - this.MerchantAccount = merchantAccount - this.PaymentPspReference = paymentPspReference - this.PspReference = pspReference - this.Status = status - return &this -} - -// NewPaymentCaptureResourceWithDefaults instantiates a new PaymentCaptureResource 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 NewPaymentCaptureResourceWithDefaults() *PaymentCaptureResource { - this := PaymentCaptureResource{} - return &this -} - -// GetAmount returns the Amount field value -func (o *PaymentCaptureResource) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *PaymentCaptureResource) SetAmount(v Amount) { - o.Amount = v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *PaymentCaptureResource) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *PaymentCaptureResource) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *PaymentCaptureResource) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentCaptureResource) 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 *PaymentCaptureResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentCaptureResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentPspReference returns the PaymentPspReference field value -func (o *PaymentCaptureResource) GetPaymentPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentPspReference -} - -// GetPaymentPspReferenceOk returns a tuple with the PaymentPspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetPaymentPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentPspReference, true -} - -// SetPaymentPspReference sets field value -func (o *PaymentCaptureResource) SetPaymentPspReference(v string) { - o.PaymentPspReference = v -} - -// GetPspReference returns the PspReference field value -func (o *PaymentCaptureResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *PaymentCaptureResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *PaymentCaptureResource) 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 *PaymentCaptureResource) 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 *PaymentCaptureResource) 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 *PaymentCaptureResource) SetReference(v string) { - o.Reference = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *PaymentCaptureResource) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *PaymentCaptureResource) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *PaymentCaptureResource) SetSplits(v []Split) { - o.Splits = v -} - -// GetStatus returns the Status field value -func (o *PaymentCaptureResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *PaymentCaptureResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *PaymentCaptureResource) SetStatus(v string) { - o.Status = v -} - -func (o PaymentCaptureResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentCaptureResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentPspReference"] = o.PaymentPspReference - toSerialize["pspReference"] = o.PspReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullablePaymentCaptureResource struct { - value *PaymentCaptureResource - isSet bool -} - -func (v NullablePaymentCaptureResource) Get() *PaymentCaptureResource { - return v.value -} - -func (v *NullablePaymentCaptureResource) Set(val *PaymentCaptureResource) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentCaptureResource) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentCaptureResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentCaptureResource(val *PaymentCaptureResource) *NullablePaymentCaptureResource { - return &NullablePaymentCaptureResource{value: val, isSet: true} -} - -func (v NullablePaymentCaptureResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentCaptureResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentCaptureResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_capture_response.go b/src/checkout/model_payment_capture_response.go index 19cb39c4f..9fd22ca2c 100644 --- a/src/checkout/model_payment_capture_response.go +++ b/src/checkout/model_payment_capture_response.go @@ -36,7 +36,7 @@ type PaymentCaptureResponse struct { // The status of your request. This will always have the value **received**. Status string `json:"status"` // List of sub-merchants. - SubMerchants []SubMerchant2 `json:"subMerchants,omitempty"` + SubMerchants []SubMerchantInfo `json:"subMerchants,omitempty"` } // NewPaymentCaptureResponse instantiates a new PaymentCaptureResponse object @@ -310,9 +310,9 @@ func (o *PaymentCaptureResponse) SetStatus(v string) { } // GetSubMerchants returns the SubMerchants field value if set, zero value otherwise. -func (o *PaymentCaptureResponse) GetSubMerchants() []SubMerchant2 { +func (o *PaymentCaptureResponse) GetSubMerchants() []SubMerchantInfo { if o == nil || common.IsNil(o.SubMerchants) { - var ret []SubMerchant2 + var ret []SubMerchantInfo return ret } return o.SubMerchants @@ -320,7 +320,7 @@ func (o *PaymentCaptureResponse) GetSubMerchants() []SubMerchant2 { // GetSubMerchantsOk returns a tuple with the SubMerchants field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentCaptureResponse) GetSubMerchantsOk() ([]SubMerchant2, bool) { +func (o *PaymentCaptureResponse) GetSubMerchantsOk() ([]SubMerchantInfo, bool) { if o == nil || common.IsNil(o.SubMerchants) { return nil, false } @@ -336,8 +336,8 @@ func (o *PaymentCaptureResponse) HasSubMerchants() bool { return false } -// SetSubMerchants gets a reference to the given []SubMerchant2 and assigns it to the SubMerchants field. -func (o *PaymentCaptureResponse) SetSubMerchants(v []SubMerchant2) { +// SetSubMerchants gets a reference to the given []SubMerchantInfo and assigns it to the SubMerchants field. +func (o *PaymentCaptureResponse) SetSubMerchants(v []SubMerchantInfo) { o.SubMerchants = v } diff --git a/src/checkout/model_payment_completion_details.go b/src/checkout/model_payment_completion_details.go index 3d85e18a7..3b411e676 100644 --- a/src/checkout/model_payment_completion_details.go +++ b/src/checkout/model_payment_completion_details.go @@ -24,7 +24,8 @@ type PaymentCompletionDetails struct { // (3D) Payment Authentication Request data for the card issuer. PaReq *string `json:"PaReq,omitempty"` // (3D) Payment Authentication Response data by the card issuer. - PaRes *string `json:"PaRes,omitempty"` + PaRes *string `json:"PaRes,omitempty"` + AuthorizationToken *string `json:"authorization_token,omitempty"` // PayPal-generated token for recurring payments. BillingToken *string `json:"billingToken,omitempty"` // The SMS verification code collected from the shopper. @@ -168,6 +169,38 @@ func (o *PaymentCompletionDetails) SetPaRes(v string) { o.PaRes = &v } +// GetAuthorizationToken returns the AuthorizationToken field value if set, zero value otherwise. +func (o *PaymentCompletionDetails) GetAuthorizationToken() string { + if o == nil || common.IsNil(o.AuthorizationToken) { + var ret string + return ret + } + return *o.AuthorizationToken +} + +// GetAuthorizationTokenOk returns a tuple with the AuthorizationToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentCompletionDetails) GetAuthorizationTokenOk() (*string, bool) { + if o == nil || common.IsNil(o.AuthorizationToken) { + return nil, false + } + return o.AuthorizationToken, true +} + +// HasAuthorizationToken returns a boolean if a field has been set. +func (o *PaymentCompletionDetails) HasAuthorizationToken() bool { + if o != nil && !common.IsNil(o.AuthorizationToken) { + return true + } + + return false +} + +// SetAuthorizationToken gets a reference to the given string and assigns it to the AuthorizationToken field. +func (o *PaymentCompletionDetails) SetAuthorizationToken(v string) { + o.AuthorizationToken = &v +} + // GetBillingToken returns the BillingToken field value if set, zero value otherwise. func (o *PaymentCompletionDetails) GetBillingToken() string { if o == nil || common.IsNil(o.BillingToken) { @@ -635,6 +668,9 @@ func (o PaymentCompletionDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PaRes) { toSerialize["PaRes"] = o.PaRes } + if !common.IsNil(o.AuthorizationToken) { + toSerialize["authorization_token"] = o.AuthorizationToken + } if !common.IsNil(o.BillingToken) { toSerialize["billingToken"] = o.BillingToken } diff --git a/src/checkout/model_payment_details.go b/src/checkout/model_payment_details.go index 296da25b7..428554319 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", "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", "paybybank", "ebanking_FI", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "walley", "walley_b2b", "pix", "bizum", "alma", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "dana", "paysafecard", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "poli", "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", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} + var allowedEnumValues = []string{"alipay", "multibanco", "bankTransfer_IBAN", "paybright", "paynow", "affirm", "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", "paybybank", "ebanking_FI", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "pix", "walley", "walley_b2b", "alma", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "paysafecard", "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 b4ddd7b75..dc8c4ae87 100644 --- a/src/checkout/model_payment_details_response.go +++ b/src/checkout/model_payment_details_response.go @@ -35,7 +35,7 @@ type PaymentDetailsResponse struct { RefusalReason *string `json:"refusalReason,omitempty"` // Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). RefusalReasonCode *string `json:"refusalReasonCode,omitempty"` - // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. ResultCode *string `json:"resultCode,omitempty"` // The shopperLocale. ShopperLocale *string `json:"shopperLocale,omitempty"` @@ -637,7 +637,7 @@ func (v *NullablePaymentDetailsResponse) UnmarshalJSON(src []byte) error { } func (o *PaymentDetailsResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} + var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "PartiallyAuthorised", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} for _, allowed := range allowedEnumValues { if o.GetResultCode() == allowed { return true diff --git a/src/checkout/model_payment_donation_request.go b/src/checkout/model_payment_donation_request.go deleted file mode 100644 index a17e2ea20..000000000 --- a/src/checkout/model_payment_donation_request.go +++ /dev/null @@ -1,2552 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - "time" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentDonationRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentDonationRequest{} - -// PaymentDonationRequest struct for PaymentDonationRequest -type PaymentDonationRequest struct { - AccountInfo *AccountInfo `json:"accountInfo,omitempty"` - AdditionalAmount *Amount `json:"additionalAmount,omitempty"` - // This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - AdditionalData *map[string]string `json:"additionalData,omitempty"` - Amount Amount `json:"amount"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` - AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` - BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` - // The delay between the authorisation and scheduled auto-capture, specified in hours. - CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` - // The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - Channel *string `json:"channel,omitempty"` - // Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` - Company *Company `json:"company,omitempty"` - // Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - // Deprecated - ConversionId *string `json:"conversionId,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 shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` - DccQuote *ForexQuote `json:"dccQuote,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` - // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - DeliveryDate *time.Time `json:"deliveryDate,omitempty"` - // A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - DeviceFingerprint *string `json:"deviceFingerprint,omitempty"` - // Donation account to which the transaction is credited. - DonationAccount string `json:"donationAccount"` - // PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided. - DonationOriginalPspReference *string `json:"donationOriginalPspReference,omitempty"` - // Donation token received in the `/payments` call. - DonationToken *string `json:"donationToken,omitempty"` - // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. - EnableOneClick *bool `json:"enableOneClick,omitempty"` - // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - EnablePayOut *bool `json:"enablePayOut,omitempty"` - // When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. - EnableRecurring *bool `json:"enableRecurring,omitempty"` - // The type of the entity the payment is processed for. - EntityType *string `json:"entityType,omitempty"` - // An integer value that is added to the normal fraud score. The value can be either positive or negative. - FraudOffset *int32 `json:"fraudOffset,omitempty"` - // 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 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"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. - LocalizedShopperStatement *map[string]string `json:"localizedShopperStatement,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. - Mcc *string `json:"mcc,omitempty"` - // The merchant account identifier, with which you want to process the transaction. - MerchantAccount string `json:"merchantAccount"` - // This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - MerchantOrderReference *string `json:"merchantOrderReference,omitempty"` - MerchantRiskIndicator *MerchantRiskIndicator `json:"merchantRiskIndicator,omitempty"` - // 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"` - 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. - Origin *string `json:"origin,omitempty"` - PaymentMethod CheckoutPaymentMethod `json:"paymentMethod"` - PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` - // Date after which no further authorisations shall be performed. Only for 3D Secure 2. - RecurringExpiry *string `json:"recurringExpiry,omitempty"` - // Minimum number of days between authorisations. Only for 3D Secure 2. - RecurringFrequency *string `json:"recurringFrequency,omitempty"` - // 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. - RecurringProcessingModel *string `json:"recurringProcessingModel,omitempty"` - // Specifies the redirect method (GET or POST) when redirecting back from the issuer. - RedirectFromIssuerMethod *string `json:"redirectFromIssuerMethod,omitempty"` - // Specifies the redirect method (GET or POST) when redirecting to the issuer. - 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` - ReturnUrl string `json:"returnUrl"` - RiskData *RiskData `json:"riskData,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"` - // 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. - 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). - 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"` - // 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 **. , ' _ - ? + * /_**. - ShopperStatement *string `json:"shopperStatement,omitempty"` - // The shopper's social security number. - SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. - Store *string `json:"store,omitempty"` - // When true and `shopperReference` is provided, the payment details will be stored. - StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` - // The shopper's telephone number. - 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. - // Deprecated - ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` - // Set to true if the payment should be routed to a trusted MID. - TrustedShopper *bool `json:"trustedShopper,omitempty"` -} - -// NewPaymentDonationRequest instantiates a new PaymentDonationRequest 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 NewPaymentDonationRequest(amount Amount, donationAccount string, merchantAccount string, paymentMethod CheckoutPaymentMethod, reference string, returnUrl string) *PaymentDonationRequest { - this := PaymentDonationRequest{} - this.Amount = amount - this.DonationAccount = donationAccount - this.MerchantAccount = merchantAccount - this.PaymentMethod = paymentMethod - this.Reference = reference - this.ReturnUrl = returnUrl - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// NewPaymentDonationRequestWithDefaults instantiates a new PaymentDonationRequest 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 NewPaymentDonationRequestWithDefaults() *PaymentDonationRequest { - this := PaymentDonationRequest{} - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// GetAccountInfo returns the AccountInfo field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetAccountInfo() AccountInfo { - if o == nil || common.IsNil(o.AccountInfo) { - var ret AccountInfo - return ret - } - return *o.AccountInfo -} - -// GetAccountInfoOk returns a tuple with the AccountInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetAccountInfoOk() (*AccountInfo, bool) { - if o == nil || common.IsNil(o.AccountInfo) { - return nil, false - } - return o.AccountInfo, true -} - -// HasAccountInfo returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasAccountInfo() bool { - if o != nil && !common.IsNil(o.AccountInfo) { - return true - } - - return false -} - -// SetAccountInfo gets a reference to the given AccountInfo and assigns it to the AccountInfo field. -func (o *PaymentDonationRequest) SetAccountInfo(v AccountInfo) { - o.AccountInfo = &v -} - -// GetAdditionalAmount returns the AdditionalAmount field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetAdditionalAmount() Amount { - if o == nil || common.IsNil(o.AdditionalAmount) { - var ret Amount - return ret - } - return *o.AdditionalAmount -} - -// GetAdditionalAmountOk returns a tuple with the AdditionalAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetAdditionalAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.AdditionalAmount) { - return nil, false - } - return o.AdditionalAmount, true -} - -// HasAdditionalAmount returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasAdditionalAmount() bool { - if o != nil && !common.IsNil(o.AdditionalAmount) { - return true - } - - return false -} - -// SetAdditionalAmount gets a reference to the given Amount and assigns it to the AdditionalAmount field. -func (o *PaymentDonationRequest) SetAdditionalAmount(v Amount) { - o.AdditionalAmount = &v -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetAmount returns the Amount field value -func (o *PaymentDonationRequest) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *PaymentDonationRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetApplicationInfo() ApplicationInfo { - if o == nil || common.IsNil(o.ApplicationInfo) { - var ret ApplicationInfo - return ret - } - return *o.ApplicationInfo -} - -// GetApplicationInfoOk returns a tuple with the ApplicationInfo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetApplicationInfoOk() (*ApplicationInfo, bool) { - if o == nil || common.IsNil(o.ApplicationInfo) { - return nil, false - } - return o.ApplicationInfo, true -} - -// HasApplicationInfo returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasApplicationInfo() bool { - if o != nil && !common.IsNil(o.ApplicationInfo) { - return true - } - - return false -} - -// SetApplicationInfo gets a reference to the given ApplicationInfo and assigns it to the ApplicationInfo field. -func (o *PaymentDonationRequest) SetApplicationInfo(v ApplicationInfo) { - o.ApplicationInfo = &v -} - -// GetAuthenticationData returns the AuthenticationData field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetAuthenticationData() AuthenticationData { - if o == nil || common.IsNil(o.AuthenticationData) { - var ret AuthenticationData - return ret - } - return *o.AuthenticationData -} - -// GetAuthenticationDataOk returns a tuple with the AuthenticationData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetAuthenticationDataOk() (*AuthenticationData, bool) { - if o == nil || common.IsNil(o.AuthenticationData) { - return nil, false - } - return o.AuthenticationData, true -} - -// HasAuthenticationData returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasAuthenticationData() bool { - if o != nil && !common.IsNil(o.AuthenticationData) { - return true - } - - return false -} - -// SetAuthenticationData gets a reference to the given AuthenticationData and assigns it to the AuthenticationData field. -func (o *PaymentDonationRequest) SetAuthenticationData(v AuthenticationData) { - o.AuthenticationData = &v -} - -// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetBillingAddress() Address { - if o == nil || common.IsNil(o.BillingAddress) { - var ret Address - return ret - } - return *o.BillingAddress -} - -// GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetBillingAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.BillingAddress) { - return nil, false - } - return o.BillingAddress, true -} - -// HasBillingAddress returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasBillingAddress() bool { - if o != nil && !common.IsNil(o.BillingAddress) { - return true - } - - return false -} - -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *PaymentDonationRequest) SetBillingAddress(v Address) { - o.BillingAddress = &v -} - -// GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetBrowserInfo(v BrowserInfo) { - o.BrowserInfo = &v -} - -// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetCaptureDelayHours() int32 { - if o == nil || common.IsNil(o.CaptureDelayHours) { - var ret int32 - return ret - } - return *o.CaptureDelayHours -} - -// GetCaptureDelayHoursOk returns a tuple with the CaptureDelayHours field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetCaptureDelayHoursOk() (*int32, bool) { - if o == nil || common.IsNil(o.CaptureDelayHours) { - return nil, false - } - return o.CaptureDelayHours, true -} - -// HasCaptureDelayHours returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasCaptureDelayHours() bool { - if o != nil && !common.IsNil(o.CaptureDelayHours) { - return true - } - - return false -} - -// SetCaptureDelayHours gets a reference to the given int32 and assigns it to the CaptureDelayHours field. -func (o *PaymentDonationRequest) SetCaptureDelayHours(v int32) { - o.CaptureDelayHours = &v -} - -// GetChannel returns the Channel field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetChannel() string { - if o == nil || common.IsNil(o.Channel) { - var ret string - return ret - } - return *o.Channel -} - -// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetChannelOk() (*string, bool) { - if o == nil || common.IsNil(o.Channel) { - return nil, false - } - return o.Channel, true -} - -// HasChannel returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasChannel() bool { - if o != nil && !common.IsNil(o.Channel) { - return true - } - - return false -} - -// SetChannel gets a reference to the given string and assigns it to the Channel field. -func (o *PaymentDonationRequest) SetChannel(v string) { - o.Channel = &v -} - -// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetCheckoutAttemptId(v string) { - o.CheckoutAttemptId = &v -} - -// GetCompany returns the Company field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetCompany() Company { - if o == nil || common.IsNil(o.Company) { - var ret Company - return ret - } - return *o.Company -} - -// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetCompanyOk() (*Company, bool) { - if o == nil || common.IsNil(o.Company) { - return nil, false - } - return o.Company, true -} - -// HasCompany returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasCompany() bool { - if o != nil && !common.IsNil(o.Company) { - return true - } - - return false -} - -// SetCompany gets a reference to the given Company and assigns it to the Company field. -func (o *PaymentDonationRequest) SetCompany(v Company) { - o.Company = &v -} - -// GetConversionId returns the ConversionId field value if set, zero value otherwise. -// Deprecated -func (o *PaymentDonationRequest) GetConversionId() string { - if o == nil || common.IsNil(o.ConversionId) { - var ret string - return ret - } - return *o.ConversionId -} - -// GetConversionIdOk returns a tuple with the ConversionId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *PaymentDonationRequest) GetConversionIdOk() (*string, bool) { - if o == nil || common.IsNil(o.ConversionId) { - return nil, false - } - return o.ConversionId, true -} - -// HasConversionId returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasConversionId() bool { - if o != nil && !common.IsNil(o.ConversionId) { - return true - } - - return false -} - -// SetConversionId gets a reference to the given string and assigns it to the ConversionId field. -// Deprecated -func (o *PaymentDonationRequest) SetConversionId(v string) { - o.ConversionId = &v -} - -// GetCountryCode returns the CountryCode field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetCountryCode() string { - if o == nil || common.IsNil(o.CountryCode) { - var ret string - return ret - } - return *o.CountryCode -} - -// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetCountryCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.CountryCode) { - return nil, false - } - return o.CountryCode, true -} - -// HasCountryCode returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasCountryCode() bool { - if o != nil && !common.IsNil(o.CountryCode) { - return true - } - - return false -} - -// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field. -func (o *PaymentDonationRequest) SetCountryCode(v string) { - o.CountryCode = &v -} - -// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDateOfBirth() string { - if o == nil || common.IsNil(o.DateOfBirth) { - var ret string - return ret - } - return *o.DateOfBirth -} - -// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDateOfBirthOk() (*string, bool) { - if o == nil || common.IsNil(o.DateOfBirth) { - return nil, false - } - return o.DateOfBirth, true -} - -// HasDateOfBirth returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDateOfBirth() bool { - if o != nil && !common.IsNil(o.DateOfBirth) { - return true - } - - return false -} - -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *PaymentDonationRequest) SetDateOfBirth(v string) { - o.DateOfBirth = &v -} - -// GetDccQuote returns the DccQuote field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDccQuote() ForexQuote { - if o == nil || common.IsNil(o.DccQuote) { - var ret ForexQuote - return ret - } - return *o.DccQuote -} - -// GetDccQuoteOk returns a tuple with the DccQuote field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDccQuoteOk() (*ForexQuote, bool) { - if o == nil || common.IsNil(o.DccQuote) { - return nil, false - } - return o.DccQuote, true -} - -// HasDccQuote returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDccQuote() bool { - if o != nil && !common.IsNil(o.DccQuote) { - return true - } - - return false -} - -// SetDccQuote gets a reference to the given ForexQuote and assigns it to the DccQuote field. -func (o *PaymentDonationRequest) SetDccQuote(v ForexQuote) { - o.DccQuote = &v -} - -// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDeliveryAddress() Address { - if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address - return ret - } - return *o.DeliveryAddress -} - -// GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDeliveryAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.DeliveryAddress) { - return nil, false - } - return o.DeliveryAddress, true -} - -// HasDeliveryAddress returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDeliveryAddress() bool { - if o != nil && !common.IsNil(o.DeliveryAddress) { - return true - } - - return false -} - -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *PaymentDonationRequest) SetDeliveryAddress(v Address) { - o.DeliveryAddress = &v -} - -// GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDeliveryDate() time.Time { - if o == nil || common.IsNil(o.DeliveryDate) { - var ret time.Time - return ret - } - return *o.DeliveryDate -} - -// GetDeliveryDateOk returns a tuple with the DeliveryDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDeliveryDateOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.DeliveryDate) { - return nil, false - } - return o.DeliveryDate, true -} - -// HasDeliveryDate returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDeliveryDate() bool { - if o != nil && !common.IsNil(o.DeliveryDate) { - return true - } - - return false -} - -// SetDeliveryDate gets a reference to the given time.Time and assigns it to the DeliveryDate field. -func (o *PaymentDonationRequest) SetDeliveryDate(v time.Time) { - o.DeliveryDate = &v -} - -// GetDeviceFingerprint returns the DeviceFingerprint field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDeviceFingerprint() string { - if o == nil || common.IsNil(o.DeviceFingerprint) { - var ret string - return ret - } - return *o.DeviceFingerprint -} - -// GetDeviceFingerprintOk returns a tuple with the DeviceFingerprint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDeviceFingerprintOk() (*string, bool) { - if o == nil || common.IsNil(o.DeviceFingerprint) { - return nil, false - } - return o.DeviceFingerprint, true -} - -// HasDeviceFingerprint returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDeviceFingerprint() bool { - if o != nil && !common.IsNil(o.DeviceFingerprint) { - return true - } - - return false -} - -// SetDeviceFingerprint gets a reference to the given string and assigns it to the DeviceFingerprint field. -func (o *PaymentDonationRequest) SetDeviceFingerprint(v string) { - o.DeviceFingerprint = &v -} - -// GetDonationAccount returns the DonationAccount field value -func (o *PaymentDonationRequest) GetDonationAccount() string { - if o == nil { - var ret string - return ret - } - - return o.DonationAccount -} - -// GetDonationAccountOk returns a tuple with the DonationAccount field value -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDonationAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DonationAccount, true -} - -// SetDonationAccount sets field value -func (o *PaymentDonationRequest) SetDonationAccount(v string) { - o.DonationAccount = v -} - -// GetDonationOriginalPspReference returns the DonationOriginalPspReference field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDonationOriginalPspReference() string { - if o == nil || common.IsNil(o.DonationOriginalPspReference) { - var ret string - return ret - } - return *o.DonationOriginalPspReference -} - -// GetDonationOriginalPspReferenceOk returns a tuple with the DonationOriginalPspReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDonationOriginalPspReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.DonationOriginalPspReference) { - return nil, false - } - return o.DonationOriginalPspReference, true -} - -// HasDonationOriginalPspReference returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDonationOriginalPspReference() bool { - if o != nil && !common.IsNil(o.DonationOriginalPspReference) { - return true - } - - return false -} - -// SetDonationOriginalPspReference gets a reference to the given string and assigns it to the DonationOriginalPspReference field. -func (o *PaymentDonationRequest) SetDonationOriginalPspReference(v string) { - o.DonationOriginalPspReference = &v -} - -// GetDonationToken returns the DonationToken field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetDonationToken() string { - if o == nil || common.IsNil(o.DonationToken) { - var ret string - return ret - } - return *o.DonationToken -} - -// GetDonationTokenOk returns a tuple with the DonationToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetDonationTokenOk() (*string, bool) { - if o == nil || common.IsNil(o.DonationToken) { - return nil, false - } - return o.DonationToken, true -} - -// HasDonationToken returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasDonationToken() bool { - if o != nil && !common.IsNil(o.DonationToken) { - return true - } - - return false -} - -// SetDonationToken gets a reference to the given string and assigns it to the DonationToken field. -func (o *PaymentDonationRequest) SetDonationToken(v string) { - o.DonationToken = &v -} - -// GetEnableOneClick returns the EnableOneClick field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetEnableOneClick() bool { - if o == nil || common.IsNil(o.EnableOneClick) { - var ret bool - return ret - } - return *o.EnableOneClick -} - -// GetEnableOneClickOk returns a tuple with the EnableOneClick field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetEnableOneClickOk() (*bool, bool) { - if o == nil || common.IsNil(o.EnableOneClick) { - return nil, false - } - return o.EnableOneClick, true -} - -// HasEnableOneClick returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasEnableOneClick() bool { - if o != nil && !common.IsNil(o.EnableOneClick) { - return true - } - - return false -} - -// SetEnableOneClick gets a reference to the given bool and assigns it to the EnableOneClick field. -func (o *PaymentDonationRequest) SetEnableOneClick(v bool) { - o.EnableOneClick = &v -} - -// GetEnablePayOut returns the EnablePayOut field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetEnablePayOut() bool { - if o == nil || common.IsNil(o.EnablePayOut) { - var ret bool - return ret - } - return *o.EnablePayOut -} - -// GetEnablePayOutOk returns a tuple with the EnablePayOut field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetEnablePayOutOk() (*bool, bool) { - if o == nil || common.IsNil(o.EnablePayOut) { - return nil, false - } - return o.EnablePayOut, true -} - -// HasEnablePayOut returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasEnablePayOut() bool { - if o != nil && !common.IsNil(o.EnablePayOut) { - return true - } - - return false -} - -// SetEnablePayOut gets a reference to the given bool and assigns it to the EnablePayOut field. -func (o *PaymentDonationRequest) SetEnablePayOut(v bool) { - o.EnablePayOut = &v -} - -// GetEnableRecurring returns the EnableRecurring field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetEnableRecurring() bool { - if o == nil || common.IsNil(o.EnableRecurring) { - var ret bool - return ret - } - return *o.EnableRecurring -} - -// GetEnableRecurringOk returns a tuple with the EnableRecurring field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetEnableRecurringOk() (*bool, bool) { - if o == nil || common.IsNil(o.EnableRecurring) { - return nil, false - } - return o.EnableRecurring, true -} - -// HasEnableRecurring returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasEnableRecurring() bool { - if o != nil && !common.IsNil(o.EnableRecurring) { - return true - } - - return false -} - -// SetEnableRecurring gets a reference to the given bool and assigns it to the EnableRecurring field. -func (o *PaymentDonationRequest) SetEnableRecurring(v bool) { - o.EnableRecurring = &v -} - -// GetEntityType returns the EntityType field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetEntityType() string { - if o == nil || common.IsNil(o.EntityType) { - var ret string - return ret - } - return *o.EntityType -} - -// GetEntityTypeOk returns a tuple with the EntityType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetEntityTypeOk() (*string, bool) { - if o == nil || common.IsNil(o.EntityType) { - return nil, false - } - return o.EntityType, true -} - -// HasEntityType returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasEntityType() bool { - if o != nil && !common.IsNil(o.EntityType) { - return true - } - - return false -} - -// SetEntityType gets a reference to the given string and assigns it to the EntityType field. -func (o *PaymentDonationRequest) SetEntityType(v string) { - o.EntityType = &v -} - -// GetFraudOffset returns the FraudOffset field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetFraudOffset() int32 { - if o == nil || common.IsNil(o.FraudOffset) { - var ret int32 - return ret - } - return *o.FraudOffset -} - -// GetFraudOffsetOk returns a tuple with the FraudOffset field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetFraudOffsetOk() (*int32, bool) { - if o == nil || common.IsNil(o.FraudOffset) { - return nil, false - } - return o.FraudOffset, true -} - -// HasFraudOffset returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasFraudOffset() bool { - if o != nil && !common.IsNil(o.FraudOffset) { - return true - } - - return false -} - -// SetFraudOffset gets a reference to the given int32 and assigns it to the FraudOffset field. -func (o *PaymentDonationRequest) SetFraudOffset(v int32) { - o.FraudOffset = &v -} - -// GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetIndustryUsage() string { - if o == nil || common.IsNil(o.IndustryUsage) { - var ret string - return ret - } - return *o.IndustryUsage -} - -// GetIndustryUsageOk returns a tuple with the IndustryUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetIndustryUsageOk() (*string, bool) { - if o == nil || common.IsNil(o.IndustryUsage) { - return nil, false - } - return o.IndustryUsage, true -} - -// HasIndustryUsage returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasIndustryUsage() bool { - if o != nil && !common.IsNil(o.IndustryUsage) { - return true - } - - return false -} - -// SetIndustryUsage gets a reference to the given string and assigns it to the IndustryUsage field. -func (o *PaymentDonationRequest) SetIndustryUsage(v string) { - o.IndustryUsage = &v -} - -// GetInstallments returns the Installments field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetInstallments() Installments { - if o == nil || common.IsNil(o.Installments) { - var ret Installments - return ret - } - return *o.Installments -} - -// GetInstallmentsOk returns a tuple with the Installments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetInstallmentsOk() (*Installments, bool) { - if o == nil || common.IsNil(o.Installments) { - return nil, false - } - return o.Installments, true -} - -// HasInstallments returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasInstallments() bool { - if o != nil && !common.IsNil(o.Installments) { - return true - } - - return false -} - -// SetInstallments gets a reference to the given Installments and assigns it to the Installments field. -func (o *PaymentDonationRequest) SetInstallments(v Installments) { - o.Installments = &v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *PaymentDonationRequest) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetLocalizedShopperStatement returns the LocalizedShopperStatement field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetLocalizedShopperStatement() map[string]string { - if o == nil || common.IsNil(o.LocalizedShopperStatement) { - var ret map[string]string - return ret - } - return *o.LocalizedShopperStatement -} - -// GetLocalizedShopperStatementOk returns a tuple with the LocalizedShopperStatement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetLocalizedShopperStatementOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.LocalizedShopperStatement) { - return nil, false - } - return o.LocalizedShopperStatement, true -} - -// HasLocalizedShopperStatement returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasLocalizedShopperStatement() bool { - if o != nil && !common.IsNil(o.LocalizedShopperStatement) { - return true - } - - return false -} - -// SetLocalizedShopperStatement gets a reference to the given map[string]string and assigns it to the LocalizedShopperStatement field. -func (o *PaymentDonationRequest) SetLocalizedShopperStatement(v map[string]string) { - o.LocalizedShopperStatement = &v -} - -// GetMandate returns the Mandate field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMandate() Mandate { - if o == nil || common.IsNil(o.Mandate) { - var ret Mandate - return ret - } - return *o.Mandate -} - -// GetMandateOk returns a tuple with the Mandate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMandateOk() (*Mandate, bool) { - if o == nil || common.IsNil(o.Mandate) { - return nil, false - } - return o.Mandate, true -} - -// HasMandate returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMandate() bool { - if o != nil && !common.IsNil(o.Mandate) { - return true - } - - return false -} - -// SetMandate gets a reference to the given Mandate and assigns it to the Mandate field. -func (o *PaymentDonationRequest) SetMandate(v Mandate) { - o.Mandate = &v -} - -// GetMcc returns the Mcc field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMcc() string { - if o == nil || common.IsNil(o.Mcc) { - var ret string - return ret - } - return *o.Mcc -} - -// GetMccOk returns a tuple with the Mcc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMccOk() (*string, bool) { - if o == nil || common.IsNil(o.Mcc) { - return nil, false - } - return o.Mcc, true -} - -// HasMcc returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMcc() bool { - if o != nil && !common.IsNil(o.Mcc) { - return true - } - - return false -} - -// SetMcc gets a reference to the given string and assigns it to the Mcc field. -func (o *PaymentDonationRequest) SetMcc(v string) { - o.Mcc = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentDonationRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMerchantOrderReference() string { - if o == nil || common.IsNil(o.MerchantOrderReference) { - var ret string - return ret - } - return *o.MerchantOrderReference -} - -// GetMerchantOrderReferenceOk returns a tuple with the MerchantOrderReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMerchantOrderReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantOrderReference) { - return nil, false - } - return o.MerchantOrderReference, true -} - -// HasMerchantOrderReference returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMerchantOrderReference() bool { - if o != nil && !common.IsNil(o.MerchantOrderReference) { - return true - } - - return false -} - -// SetMerchantOrderReference gets a reference to the given string and assigns it to the MerchantOrderReference field. -func (o *PaymentDonationRequest) SetMerchantOrderReference(v string) { - o.MerchantOrderReference = &v -} - -// GetMerchantRiskIndicator returns the MerchantRiskIndicator field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMerchantRiskIndicator() MerchantRiskIndicator { - if o == nil || common.IsNil(o.MerchantRiskIndicator) { - var ret MerchantRiskIndicator - return ret - } - return *o.MerchantRiskIndicator -} - -// GetMerchantRiskIndicatorOk returns a tuple with the MerchantRiskIndicator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMerchantRiskIndicatorOk() (*MerchantRiskIndicator, bool) { - if o == nil || common.IsNil(o.MerchantRiskIndicator) { - return nil, false - } - return o.MerchantRiskIndicator, true -} - -// HasMerchantRiskIndicator returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMerchantRiskIndicator() bool { - if o != nil && !common.IsNil(o.MerchantRiskIndicator) { - return true - } - - return false -} - -// SetMerchantRiskIndicator gets a reference to the given MerchantRiskIndicator and assigns it to the MerchantRiskIndicator field. -func (o *PaymentDonationRequest) SetMerchantRiskIndicator(v MerchantRiskIndicator) { - o.MerchantRiskIndicator = &v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMetadata() map[string]string { - if o == nil || common.IsNil(o.Metadata) { - var ret map[string]string - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMetadataOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.Metadata) { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMetadata() bool { - if o != nil && !common.IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. -func (o *PaymentDonationRequest) SetMetadata(v map[string]string) { - o.Metadata = &v -} - -// GetMpiData returns the MpiData field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetMpiData() ThreeDSecureData { - if o == nil || common.IsNil(o.MpiData) { - var ret ThreeDSecureData - return ret - } - return *o.MpiData -} - -// GetMpiDataOk returns a tuple with the MpiData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetMpiDataOk() (*ThreeDSecureData, bool) { - if o == nil || common.IsNil(o.MpiData) { - return nil, false - } - return o.MpiData, true -} - -// HasMpiData returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasMpiData() bool { - if o != nil && !common.IsNil(o.MpiData) { - return true - } - - return false -} - -// SetMpiData gets a reference to the given ThreeDSecureData and assigns it to the MpiData field. -func (o *PaymentDonationRequest) SetMpiData(v ThreeDSecureData) { - o.MpiData = &v -} - -// GetOrder returns the Order field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetOrder() EncryptedOrderData { - if o == nil || common.IsNil(o.Order) { - var ret EncryptedOrderData - return ret - } - return *o.Order -} - -// GetOrderOk returns a tuple with the Order field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetOrderOk() (*EncryptedOrderData, bool) { - if o == nil || common.IsNil(o.Order) { - return nil, false - } - return o.Order, true -} - -// HasOrder returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasOrder() bool { - if o != nil && !common.IsNil(o.Order) { - return true - } - - return false -} - -// SetOrder gets a reference to the given EncryptedOrderData and assigns it to the Order field. -func (o *PaymentDonationRequest) SetOrder(v EncryptedOrderData) { - o.Order = &v -} - -// GetOrderReference returns the OrderReference field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetOrderReference() string { - if o == nil || common.IsNil(o.OrderReference) { - var ret string - return ret - } - return *o.OrderReference -} - -// GetOrderReferenceOk returns a tuple with the OrderReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetOrderReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.OrderReference) { - return nil, false - } - return o.OrderReference, true -} - -// HasOrderReference returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasOrderReference() bool { - if o != nil && !common.IsNil(o.OrderReference) { - return true - } - - return false -} - -// SetOrderReference gets a reference to the given string and assigns it to the OrderReference field. -func (o *PaymentDonationRequest) SetOrderReference(v string) { - o.OrderReference = &v -} - -// GetOrigin returns the Origin field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetOrigin() string { - if o == nil || common.IsNil(o.Origin) { - var ret string - return ret - } - return *o.Origin -} - -// GetOriginOk returns a tuple with the Origin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetOriginOk() (*string, bool) { - if o == nil || common.IsNil(o.Origin) { - return nil, false - } - return o.Origin, true -} - -// HasOrigin returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasOrigin() bool { - if o != nil && !common.IsNil(o.Origin) { - return true - } - - return false -} - -// SetOrigin gets a reference to the given string and assigns it to the Origin field. -func (o *PaymentDonationRequest) SetOrigin(v string) { - o.Origin = &v -} - -// GetPaymentMethod returns the PaymentMethod field value -func (o *PaymentDonationRequest) GetPaymentMethod() CheckoutPaymentMethod { - if o == nil { - var ret CheckoutPaymentMethod - 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 *PaymentDonationRequest) GetPaymentMethodOk() (*CheckoutPaymentMethod, bool) { - if o == nil { - return nil, false - } - return &o.PaymentMethod, true -} - -// SetPaymentMethod sets field value -func (o *PaymentDonationRequest) SetPaymentMethod(v CheckoutPaymentMethod) { - o.PaymentMethod = v -} - -// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetPlatformChargebackLogic() PlatformChargebackLogic { - if o == nil || common.IsNil(o.PlatformChargebackLogic) { - var ret PlatformChargebackLogic - return ret - } - return *o.PlatformChargebackLogic -} - -// GetPlatformChargebackLogicOk returns a tuple with the PlatformChargebackLogic field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetPlatformChargebackLogicOk() (*PlatformChargebackLogic, bool) { - if o == nil || common.IsNil(o.PlatformChargebackLogic) { - return nil, false - } - return o.PlatformChargebackLogic, true -} - -// HasPlatformChargebackLogic returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasPlatformChargebackLogic() bool { - if o != nil && !common.IsNil(o.PlatformChargebackLogic) { - return true - } - - return false -} - -// SetPlatformChargebackLogic gets a reference to the given PlatformChargebackLogic and assigns it to the PlatformChargebackLogic field. -func (o *PaymentDonationRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { - o.PlatformChargebackLogic = &v -} - -// GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRecurringExpiry() string { - if o == nil || common.IsNil(o.RecurringExpiry) { - var ret string - return ret - } - return *o.RecurringExpiry -} - -// GetRecurringExpiryOk returns a tuple with the RecurringExpiry field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRecurringExpiryOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringExpiry) { - return nil, false - } - return o.RecurringExpiry, true -} - -// HasRecurringExpiry returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRecurringExpiry() bool { - if o != nil && !common.IsNil(o.RecurringExpiry) { - return true - } - - return false -} - -// SetRecurringExpiry gets a reference to the given string and assigns it to the RecurringExpiry field. -func (o *PaymentDonationRequest) SetRecurringExpiry(v string) { - o.RecurringExpiry = &v -} - -// GetRecurringFrequency returns the RecurringFrequency field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRecurringFrequency() string { - if o == nil || common.IsNil(o.RecurringFrequency) { - var ret string - return ret - } - return *o.RecurringFrequency -} - -// GetRecurringFrequencyOk returns a tuple with the RecurringFrequency field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRecurringFrequencyOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringFrequency) { - return nil, false - } - return o.RecurringFrequency, true -} - -// HasRecurringFrequency returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRecurringFrequency() bool { - if o != nil && !common.IsNil(o.RecurringFrequency) { - return true - } - - return false -} - -// SetRecurringFrequency gets a reference to the given string and assigns it to the RecurringFrequency field. -func (o *PaymentDonationRequest) SetRecurringFrequency(v string) { - o.RecurringFrequency = &v -} - -// GetRecurringProcessingModel returns the RecurringProcessingModel field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRecurringProcessingModel() string { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - var ret string - return ret - } - return *o.RecurringProcessingModel -} - -// GetRecurringProcessingModelOk returns a tuple with the RecurringProcessingModel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRecurringProcessingModelOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringProcessingModel) { - return nil, false - } - return o.RecurringProcessingModel, true -} - -// HasRecurringProcessingModel returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRecurringProcessingModel() bool { - if o != nil && !common.IsNil(o.RecurringProcessingModel) { - return true - } - - return false -} - -// SetRecurringProcessingModel gets a reference to the given string and assigns it to the RecurringProcessingModel field. -func (o *PaymentDonationRequest) SetRecurringProcessingModel(v string) { - o.RecurringProcessingModel = &v -} - -// GetRedirectFromIssuerMethod returns the RedirectFromIssuerMethod field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRedirectFromIssuerMethod() string { - if o == nil || common.IsNil(o.RedirectFromIssuerMethod) { - var ret string - return ret - } - return *o.RedirectFromIssuerMethod -} - -// GetRedirectFromIssuerMethodOk returns a tuple with the RedirectFromIssuerMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRedirectFromIssuerMethodOk() (*string, bool) { - if o == nil || common.IsNil(o.RedirectFromIssuerMethod) { - return nil, false - } - return o.RedirectFromIssuerMethod, true -} - -// HasRedirectFromIssuerMethod returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRedirectFromIssuerMethod() bool { - if o != nil && !common.IsNil(o.RedirectFromIssuerMethod) { - return true - } - - return false -} - -// SetRedirectFromIssuerMethod gets a reference to the given string and assigns it to the RedirectFromIssuerMethod field. -func (o *PaymentDonationRequest) SetRedirectFromIssuerMethod(v string) { - o.RedirectFromIssuerMethod = &v -} - -// GetRedirectToIssuerMethod returns the RedirectToIssuerMethod field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRedirectToIssuerMethod() string { - if o == nil || common.IsNil(o.RedirectToIssuerMethod) { - var ret string - return ret - } - return *o.RedirectToIssuerMethod -} - -// GetRedirectToIssuerMethodOk returns a tuple with the RedirectToIssuerMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRedirectToIssuerMethodOk() (*string, bool) { - if o == nil || common.IsNil(o.RedirectToIssuerMethod) { - return nil, false - } - return o.RedirectToIssuerMethod, true -} - -// HasRedirectToIssuerMethod returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRedirectToIssuerMethod() bool { - if o != nil && !common.IsNil(o.RedirectToIssuerMethod) { - return true - } - - return false -} - -// SetRedirectToIssuerMethod gets a reference to the given string and assigns it to the RedirectToIssuerMethod field. -func (o *PaymentDonationRequest) SetRedirectToIssuerMethod(v string) { - o.RedirectToIssuerMethod = &v -} - -// GetReference returns the Reference field value -func (o *PaymentDonationRequest) GetReference() string { - if o == nil { - var ret string - return ret - } - - return o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *PaymentDonationRequest) SetReference(v string) { - o.Reference = v -} - -// GetReturnUrl returns the ReturnUrl field value -func (o *PaymentDonationRequest) GetReturnUrl() string { - if o == nil { - var ret string - return ret - } - - return o.ReturnUrl -} - -// GetReturnUrlOk returns a tuple with the ReturnUrl field value -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetReturnUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ReturnUrl, true -} - -// SetReturnUrl sets field value -func (o *PaymentDonationRequest) SetReturnUrl(v string) { - o.ReturnUrl = v -} - -// GetRiskData returns the RiskData field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetRiskData() RiskData { - if o == nil || common.IsNil(o.RiskData) { - var ret RiskData - return ret - } - return *o.RiskData -} - -// GetRiskDataOk returns a tuple with the RiskData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetRiskDataOk() (*RiskData, bool) { - if o == nil || common.IsNil(o.RiskData) { - return nil, false - } - return o.RiskData, true -} - -// HasRiskData returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasRiskData() bool { - if o != nil && !common.IsNil(o.RiskData) { - return true - } - - return false -} - -// SetRiskData gets a reference to the given RiskData and assigns it to the RiskData field. -func (o *PaymentDonationRequest) SetRiskData(v RiskData) { - o.RiskData = &v -} - -// GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetSessionValidity() string { - if o == nil || common.IsNil(o.SessionValidity) { - var ret string - return ret - } - return *o.SessionValidity -} - -// GetSessionValidityOk returns a tuple with the SessionValidity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetSessionValidityOk() (*string, bool) { - if o == nil || common.IsNil(o.SessionValidity) { - return nil, false - } - return o.SessionValidity, true -} - -// HasSessionValidity returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasSessionValidity() bool { - if o != nil && !common.IsNil(o.SessionValidity) { - return true - } - - return false -} - -// SetSessionValidity gets a reference to the given string and assigns it to the SessionValidity field. -func (o *PaymentDonationRequest) SetSessionValidity(v string) { - o.SessionValidity = &v -} - -// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetShopperEmail(v string) { - o.ShopperEmail = &v -} - -// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetShopperIP(v string) { - o.ShopperIP = &v -} - -// GetShopperInteraction returns the ShopperInteraction field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetShopperInteraction() string { - if o == nil || common.IsNil(o.ShopperInteraction) { - var ret string - return ret - } - return *o.ShopperInteraction -} - -// GetShopperInteractionOk returns a tuple with the ShopperInteraction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetShopperInteractionOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperInteraction) { - return nil, false - } - return o.ShopperInteraction, true -} - -// HasShopperInteraction returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasShopperInteraction() bool { - if o != nil && !common.IsNil(o.ShopperInteraction) { - return true - } - - return false -} - -// SetShopperInteraction gets a reference to the given string and assigns it to the ShopperInteraction field. -func (o *PaymentDonationRequest) SetShopperInteraction(v string) { - o.ShopperInteraction = &v -} - -// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetShopperLocale() string { - if o == nil || common.IsNil(o.ShopperLocale) { - var ret string - return ret - } - return *o.ShopperLocale -} - -// GetShopperLocaleOk returns a tuple with the ShopperLocale field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetShopperLocaleOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperLocale) { - return nil, false - } - return o.ShopperLocale, true -} - -// HasShopperLocale returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasShopperLocale() bool { - if o != nil && !common.IsNil(o.ShopperLocale) { - return true - } - - return false -} - -// SetShopperLocale gets a reference to the given string and assigns it to the ShopperLocale field. -func (o *PaymentDonationRequest) SetShopperLocale(v string) { - o.ShopperLocale = &v -} - -// GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetShopperName() Name { - if o == nil || common.IsNil(o.ShopperName) { - var ret Name - return ret - } - return *o.ShopperName -} - -// 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 *PaymentDonationRequest) GetShopperNameOk() (*Name, bool) { - if o == nil || common.IsNil(o.ShopperName) { - return nil, false - } - return o.ShopperName, true -} - -// HasShopperName returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasShopperName() bool { - if o != nil && !common.IsNil(o.ShopperName) { - return true - } - - return false -} - -// SetShopperName gets a reference to the given Name and assigns it to the ShopperName field. -func (o *PaymentDonationRequest) SetShopperName(v Name) { - o.ShopperName = &v -} - -// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetShopperReference(v string) { - o.ShopperReference = &v -} - -// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetShopperStatement() string { - if o == nil || common.IsNil(o.ShopperStatement) { - var ret string - return ret - } - return *o.ShopperStatement -} - -// GetShopperStatementOk returns a tuple with the ShopperStatement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetShopperStatementOk() (*string, bool) { - if o == nil || common.IsNil(o.ShopperStatement) { - return nil, false - } - return o.ShopperStatement, true -} - -// HasShopperStatement returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasShopperStatement() bool { - if o != nil && !common.IsNil(o.ShopperStatement) { - return true - } - - return false -} - -// SetShopperStatement gets a reference to the given string and assigns it to the ShopperStatement field. -func (o *PaymentDonationRequest) SetShopperStatement(v string) { - o.ShopperStatement = &v -} - -// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetSocialSecurityNumber() string { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - var ret string - return ret - } - return *o.SocialSecurityNumber -} - -// GetSocialSecurityNumberOk returns a tuple with the SocialSecurityNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetSocialSecurityNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.SocialSecurityNumber) { - return nil, false - } - return o.SocialSecurityNumber, true -} - -// HasSocialSecurityNumber returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasSocialSecurityNumber() bool { - if o != nil && !common.IsNil(o.SocialSecurityNumber) { - return true - } - - return false -} - -// SetSocialSecurityNumber gets a reference to the given string and assigns it to the SocialSecurityNumber field. -func (o *PaymentDonationRequest) SetSocialSecurityNumber(v string) { - o.SocialSecurityNumber = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *PaymentDonationRequest) SetSplits(v []Split) { - o.Splits = v -} - -// GetStore returns the Store field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetStore() string { - if o == nil || common.IsNil(o.Store) { - var ret string - return ret - } - return *o.Store -} - -// GetStoreOk returns a tuple with the Store field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetStoreOk() (*string, bool) { - if o == nil || common.IsNil(o.Store) { - return nil, false - } - return o.Store, true -} - -// HasStore returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasStore() bool { - if o != nil && !common.IsNil(o.Store) { - return true - } - - return false -} - -// SetStore gets a reference to the given string and assigns it to the Store field. -func (o *PaymentDonationRequest) SetStore(v string) { - o.Store = &v -} - -// GetStorePaymentMethod returns the StorePaymentMethod field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetStorePaymentMethod() bool { - if o == nil || common.IsNil(o.StorePaymentMethod) { - var ret bool - return ret - } - return *o.StorePaymentMethod -} - -// GetStorePaymentMethodOk returns a tuple with the StorePaymentMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetStorePaymentMethodOk() (*bool, bool) { - if o == nil || common.IsNil(o.StorePaymentMethod) { - return nil, false - } - return o.StorePaymentMethod, true -} - -// HasStorePaymentMethod returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasStorePaymentMethod() bool { - if o != nil && !common.IsNil(o.StorePaymentMethod) { - return true - } - - return false -} - -// SetStorePaymentMethod gets a reference to the given bool and assigns it to the StorePaymentMethod field. -func (o *PaymentDonationRequest) SetStorePaymentMethod(v bool) { - o.StorePaymentMethod = &v -} - -// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. -func (o *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) 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 *PaymentDonationRequest) SetTelephoneNumber(v string) { - o.TelephoneNumber = &v -} - -// GetThreeDS2RequestData returns the ThreeDS2RequestData field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetThreeDS2RequestData() ThreeDS2RequestData { - if o == nil || common.IsNil(o.ThreeDS2RequestData) { - var ret ThreeDS2RequestData - return ret - } - return *o.ThreeDS2RequestData -} - -// GetThreeDS2RequestDataOk returns a tuple with the ThreeDS2RequestData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData, bool) { - if o == nil || common.IsNil(o.ThreeDS2RequestData) { - return nil, false - } - return o.ThreeDS2RequestData, true -} - -// HasThreeDS2RequestData returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasThreeDS2RequestData() bool { - if o != nil && !common.IsNil(o.ThreeDS2RequestData) { - return true - } - - return false -} - -// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData and assigns it to the ThreeDS2RequestData field. -func (o *PaymentDonationRequest) SetThreeDS2RequestData(v ThreeDS2RequestData) { - o.ThreeDS2RequestData = &v -} - -// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. -// Deprecated -func (o *PaymentDonationRequest) GetThreeDSAuthenticationOnly() bool { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - var ret bool - return ret - } - return *o.ThreeDSAuthenticationOnly -} - -// GetThreeDSAuthenticationOnlyOk returns a tuple with the ThreeDSAuthenticationOnly field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *PaymentDonationRequest) GetThreeDSAuthenticationOnlyOk() (*bool, bool) { - if o == nil || common.IsNil(o.ThreeDSAuthenticationOnly) { - return nil, false - } - return o.ThreeDSAuthenticationOnly, true -} - -// HasThreeDSAuthenticationOnly returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasThreeDSAuthenticationOnly() bool { - if o != nil && !common.IsNil(o.ThreeDSAuthenticationOnly) { - return true - } - - return false -} - -// SetThreeDSAuthenticationOnly gets a reference to the given bool and assigns it to the ThreeDSAuthenticationOnly field. -// Deprecated -func (o *PaymentDonationRequest) SetThreeDSAuthenticationOnly(v bool) { - o.ThreeDSAuthenticationOnly = &v -} - -// GetTrustedShopper returns the TrustedShopper field value if set, zero value otherwise. -func (o *PaymentDonationRequest) GetTrustedShopper() bool { - if o == nil || common.IsNil(o.TrustedShopper) { - var ret bool - return ret - } - return *o.TrustedShopper -} - -// GetTrustedShopperOk returns a tuple with the TrustedShopper field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentDonationRequest) GetTrustedShopperOk() (*bool, bool) { - if o == nil || common.IsNil(o.TrustedShopper) { - return nil, false - } - return o.TrustedShopper, true -} - -// HasTrustedShopper returns a boolean if a field has been set. -func (o *PaymentDonationRequest) HasTrustedShopper() bool { - if o != nil && !common.IsNil(o.TrustedShopper) { - return true - } - - return false -} - -// SetTrustedShopper gets a reference to the given bool and assigns it to the TrustedShopper field. -func (o *PaymentDonationRequest) SetTrustedShopper(v bool) { - o.TrustedShopper = &v -} - -func (o PaymentDonationRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentDonationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AccountInfo) { - toSerialize["accountInfo"] = o.AccountInfo - } - if !common.IsNil(o.AdditionalAmount) { - toSerialize["additionalAmount"] = o.AdditionalAmount - } - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - toSerialize["amount"] = o.Amount - if !common.IsNil(o.ApplicationInfo) { - toSerialize["applicationInfo"] = o.ApplicationInfo - } - if !common.IsNil(o.AuthenticationData) { - toSerialize["authenticationData"] = o.AuthenticationData - } - if !common.IsNil(o.BillingAddress) { - toSerialize["billingAddress"] = o.BillingAddress - } - if !common.IsNil(o.BrowserInfo) { - toSerialize["browserInfo"] = o.BrowserInfo - } - if !common.IsNil(o.CaptureDelayHours) { - toSerialize["captureDelayHours"] = o.CaptureDelayHours - } - if !common.IsNil(o.Channel) { - toSerialize["channel"] = o.Channel - } - if !common.IsNil(o.CheckoutAttemptId) { - toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId - } - if !common.IsNil(o.Company) { - toSerialize["company"] = o.Company - } - if !common.IsNil(o.ConversionId) { - toSerialize["conversionId"] = o.ConversionId - } - if !common.IsNil(o.CountryCode) { - toSerialize["countryCode"] = o.CountryCode - } - if !common.IsNil(o.DateOfBirth) { - toSerialize["dateOfBirth"] = o.DateOfBirth - } - if !common.IsNil(o.DccQuote) { - toSerialize["dccQuote"] = o.DccQuote - } - if !common.IsNil(o.DeliveryAddress) { - toSerialize["deliveryAddress"] = o.DeliveryAddress - } - if !common.IsNil(o.DeliveryDate) { - toSerialize["deliveryDate"] = o.DeliveryDate - } - if !common.IsNil(o.DeviceFingerprint) { - toSerialize["deviceFingerprint"] = o.DeviceFingerprint - } - toSerialize["donationAccount"] = o.DonationAccount - if !common.IsNil(o.DonationOriginalPspReference) { - toSerialize["donationOriginalPspReference"] = o.DonationOriginalPspReference - } - if !common.IsNil(o.DonationToken) { - toSerialize["donationToken"] = o.DonationToken - } - if !common.IsNil(o.EnableOneClick) { - toSerialize["enableOneClick"] = o.EnableOneClick - } - if !common.IsNil(o.EnablePayOut) { - toSerialize["enablePayOut"] = o.EnablePayOut - } - if !common.IsNil(o.EnableRecurring) { - toSerialize["enableRecurring"] = o.EnableRecurring - } - if !common.IsNil(o.EntityType) { - toSerialize["entityType"] = o.EntityType - } - if !common.IsNil(o.FraudOffset) { - toSerialize["fraudOffset"] = o.FraudOffset - } - if !common.IsNil(o.IndustryUsage) { - toSerialize["industryUsage"] = o.IndustryUsage - } - if !common.IsNil(o.Installments) { - toSerialize["installments"] = o.Installments - } - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - if !common.IsNil(o.LocalizedShopperStatement) { - toSerialize["localizedShopperStatement"] = o.LocalizedShopperStatement - } - if !common.IsNil(o.Mandate) { - toSerialize["mandate"] = o.Mandate - } - if !common.IsNil(o.Mcc) { - toSerialize["mcc"] = o.Mcc - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.MerchantOrderReference) { - toSerialize["merchantOrderReference"] = o.MerchantOrderReference - } - if !common.IsNil(o.MerchantRiskIndicator) { - toSerialize["merchantRiskIndicator"] = o.MerchantRiskIndicator - } - if !common.IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !common.IsNil(o.MpiData) { - toSerialize["mpiData"] = o.MpiData - } - if !common.IsNil(o.Order) { - toSerialize["order"] = o.Order - } - if !common.IsNil(o.OrderReference) { - toSerialize["orderReference"] = o.OrderReference - } - if !common.IsNil(o.Origin) { - toSerialize["origin"] = o.Origin - } - toSerialize["paymentMethod"] = o.PaymentMethod - if !common.IsNil(o.PlatformChargebackLogic) { - toSerialize["platformChargebackLogic"] = o.PlatformChargebackLogic - } - if !common.IsNil(o.RecurringExpiry) { - toSerialize["recurringExpiry"] = o.RecurringExpiry - } - if !common.IsNil(o.RecurringFrequency) { - toSerialize["recurringFrequency"] = o.RecurringFrequency - } - if !common.IsNil(o.RecurringProcessingModel) { - toSerialize["recurringProcessingModel"] = o.RecurringProcessingModel - } - if !common.IsNil(o.RedirectFromIssuerMethod) { - toSerialize["redirectFromIssuerMethod"] = o.RedirectFromIssuerMethod - } - if !common.IsNil(o.RedirectToIssuerMethod) { - toSerialize["redirectToIssuerMethod"] = o.RedirectToIssuerMethod - } - toSerialize["reference"] = o.Reference - toSerialize["returnUrl"] = o.ReturnUrl - if !common.IsNil(o.RiskData) { - toSerialize["riskData"] = o.RiskData - } - if !common.IsNil(o.SessionValidity) { - toSerialize["sessionValidity"] = o.SessionValidity - } - if !common.IsNil(o.ShopperEmail) { - toSerialize["shopperEmail"] = o.ShopperEmail - } - if !common.IsNil(o.ShopperIP) { - toSerialize["shopperIP"] = o.ShopperIP - } - if !common.IsNil(o.ShopperInteraction) { - toSerialize["shopperInteraction"] = o.ShopperInteraction - } - if !common.IsNil(o.ShopperLocale) { - toSerialize["shopperLocale"] = o.ShopperLocale - } - if !common.IsNil(o.ShopperName) { - toSerialize["shopperName"] = o.ShopperName - } - if !common.IsNil(o.ShopperReference) { - toSerialize["shopperReference"] = o.ShopperReference - } - if !common.IsNil(o.ShopperStatement) { - toSerialize["shopperStatement"] = o.ShopperStatement - } - if !common.IsNil(o.SocialSecurityNumber) { - toSerialize["socialSecurityNumber"] = o.SocialSecurityNumber - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - if !common.IsNil(o.Store) { - toSerialize["store"] = o.Store - } - if !common.IsNil(o.StorePaymentMethod) { - toSerialize["storePaymentMethod"] = o.StorePaymentMethod - } - if !common.IsNil(o.TelephoneNumber) { - toSerialize["telephoneNumber"] = o.TelephoneNumber - } - if !common.IsNil(o.ThreeDS2RequestData) { - toSerialize["threeDS2RequestData"] = o.ThreeDS2RequestData - } - if !common.IsNil(o.ThreeDSAuthenticationOnly) { - toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly - } - if !common.IsNil(o.TrustedShopper) { - toSerialize["trustedShopper"] = o.TrustedShopper - } - return toSerialize, nil -} - -type NullablePaymentDonationRequest struct { - value *PaymentDonationRequest - isSet bool -} - -func (v NullablePaymentDonationRequest) Get() *PaymentDonationRequest { - return v.value -} - -func (v *NullablePaymentDonationRequest) Set(val *PaymentDonationRequest) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentDonationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentDonationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentDonationRequest(val *PaymentDonationRequest) *NullablePaymentDonationRequest { - return &NullablePaymentDonationRequest{value: val, isSet: true} -} - -func (v NullablePaymentDonationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentDonationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentDonationRequest) isValidChannel() bool { - var allowedEnumValues = []string{"iOS", "Android", "Web"} - for _, allowed := range allowedEnumValues { - if o.GetChannel() == allowed { - return true - } - } - return false -} -func (o *PaymentDonationRequest) isValidEntityType() bool { - var allowedEnumValues = []string{"NaturalPerson", "CompanyName"} - for _, allowed := range allowedEnumValues { - if o.GetEntityType() == allowed { - return true - } - } - return false -} -func (o *PaymentDonationRequest) isValidIndustryUsage() bool { - var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} - for _, allowed := range allowedEnumValues { - if o.GetIndustryUsage() == allowed { - return true - } - } - return false -} -func (o *PaymentDonationRequest) isValidRecurringProcessingModel() bool { - var allowedEnumValues = []string{"CardOnFile", "Subscription", "UnscheduledCardOnFile"} - for _, allowed := range allowedEnumValues { - if o.GetRecurringProcessingModel() == allowed { - return true - } - } - return false -} -func (o *PaymentDonationRequest) isValidShopperInteraction() bool { - var allowedEnumValues = []string{"Ecommerce", "ContAuth", "Moto", "POS"} - for _, allowed := range allowedEnumValues { - if o.GetShopperInteraction() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_link_response.go b/src/checkout/model_payment_link_response.go index 4881565a1..f947f87b9 100644 --- a/src/checkout/model_payment_link_response.go +++ b/src/checkout/model_payment_link_response.go @@ -38,7 +38,7 @@ type PaymentLinkResponse struct { DeliveryAddress *Address `json:"deliveryAddress,omitempty"` // A short description visible on the payment page. Maximum length: 280 characters. Description *string `json:"description,omitempty"` - // The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. + // The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone designator **Z**: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30Z**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. ExpiresAt *string `json:"expiresAt,omitempty"` // A unique identifier of the payment link. Id string `json:"id"` @@ -56,7 +56,7 @@ type PaymentLinkResponse struct { MerchantOrderReference *string `json:"merchantOrderReference,omitempty"` // Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. Metadata *map[string]string `json:"metadata,omitempty"` - // Defines a recurring payment type. Required when creating a token to store payment details. Possible 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 has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. + // Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible 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 has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. RecurringProcessingModel *string `json:"recurringProcessingModel,omitempty"` // A reference that is used to uniquely identify the payment in future communications about the payment status. Reference string `json:"reference"` @@ -82,13 +82,13 @@ type PaymentLinkResponse struct { SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` // Boolean value indicating whether the card payment method should be split into separate debit and credit options. SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` - // An array of objects specifying how the payment should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). + // An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). Splits []Split `json:"splits,omitempty"` // Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. Status string `json:"status"` // The physical store, for which this payment is processed. 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. + // 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. TelephoneNumber *string `json:"telephoneNumber,omitempty"` diff --git a/src/checkout/model_payment_methods_request.go b/src/checkout/model_payment_methods_request.go index 13fefd243..0a9db2091 100644 --- a/src/checkout/model_payment_methods_request.go +++ b/src/checkout/model_payment_methods_request.go @@ -39,7 +39,7 @@ type PaymentMethodsRequest struct { ShopperReference *string `json:"shopperReference,omitempty"` // Boolean value indicating whether the card payment method should be split into separate debit and credit options. SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + // The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). Store *string `json:"store,omitempty"` } diff --git a/src/checkout/model_payment_refund_resource.go b/src/checkout/model_payment_refund_resource.go deleted file mode 100644 index 5142f32f4..000000000 --- a/src/checkout/model_payment_refund_resource.go +++ /dev/null @@ -1,394 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentRefundResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentRefundResource{} - -// PaymentRefundResource struct for PaymentRefundResource -type PaymentRefundResource struct { - Amount Amount `json:"amount"` - // 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. - MerchantAccount string `json:"merchantAccount"` - // Your reason for the refund request. - MerchantRefundReason *string `json:"merchantRefundReason,omitempty"` - // The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. - PaymentPspReference string `json:"paymentPspReference"` - // Adyen's 16-character reference associated with the refund request. - PspReference string `json:"pspReference"` - // Your reference for the refund request. - Reference *string `json:"reference,omitempty"` - // An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For details, refer to [Providing split information](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information). - Splits []Split `json:"splits,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewPaymentRefundResource instantiates a new PaymentRefundResource 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 NewPaymentRefundResource(amount Amount, merchantAccount string, paymentPspReference string, pspReference string, status string) *PaymentRefundResource { - this := PaymentRefundResource{} - this.Amount = amount - this.MerchantAccount = merchantAccount - this.PaymentPspReference = paymentPspReference - this.PspReference = pspReference - this.Status = status - return &this -} - -// NewPaymentRefundResourceWithDefaults instantiates a new PaymentRefundResource 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 NewPaymentRefundResourceWithDefaults() *PaymentRefundResource { - this := PaymentRefundResource{} - return &this -} - -// GetAmount returns the Amount field value -func (o *PaymentRefundResource) GetAmount() Amount { - if o == nil { - var ret Amount - return ret - } - - return o.Amount -} - -// GetAmountOk returns a tuple with the Amount field value -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *PaymentRefundResource) SetAmount(v Amount) { - o.Amount = v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *PaymentRefundResource) GetLineItems() []LineItem { - if o == nil || common.IsNil(o.LineItems) { - var ret []LineItem - return ret - } - return o.LineItems -} - -// GetLineItemsOk returns a tuple with the LineItems field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetLineItemsOk() ([]LineItem, bool) { - if o == nil || common.IsNil(o.LineItems) { - return nil, false - } - return o.LineItems, true -} - -// HasLineItems returns a boolean if a field has been set. -func (o *PaymentRefundResource) HasLineItems() bool { - if o != nil && !common.IsNil(o.LineItems) { - return true - } - - return false -} - -// SetLineItems gets a reference to the given []LineItem and assigns it to the LineItems field. -func (o *PaymentRefundResource) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentRefundResource) 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 *PaymentRefundResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentRefundResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantRefundReason returns the MerchantRefundReason field value if set, zero value otherwise. -func (o *PaymentRefundResource) GetMerchantRefundReason() string { - if o == nil || common.IsNil(o.MerchantRefundReason) { - var ret string - return ret - } - return *o.MerchantRefundReason -} - -// GetMerchantRefundReasonOk returns a tuple with the MerchantRefundReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetMerchantRefundReasonOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantRefundReason) { - return nil, false - } - return o.MerchantRefundReason, true -} - -// HasMerchantRefundReason returns a boolean if a field has been set. -func (o *PaymentRefundResource) HasMerchantRefundReason() bool { - if o != nil && !common.IsNil(o.MerchantRefundReason) { - return true - } - - return false -} - -// SetMerchantRefundReason gets a reference to the given string and assigns it to the MerchantRefundReason field. -func (o *PaymentRefundResource) SetMerchantRefundReason(v string) { - o.MerchantRefundReason = &v -} - -// GetPaymentPspReference returns the PaymentPspReference field value -func (o *PaymentRefundResource) GetPaymentPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentPspReference -} - -// GetPaymentPspReferenceOk returns a tuple with the PaymentPspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetPaymentPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentPspReference, true -} - -// SetPaymentPspReference sets field value -func (o *PaymentRefundResource) SetPaymentPspReference(v string) { - o.PaymentPspReference = v -} - -// GetPspReference returns the PspReference field value -func (o *PaymentRefundResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *PaymentRefundResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *PaymentRefundResource) 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 *PaymentRefundResource) 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 *PaymentRefundResource) 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 *PaymentRefundResource) SetReference(v string) { - o.Reference = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *PaymentRefundResource) GetSplits() []Split { - if o == nil || common.IsNil(o.Splits) { - var ret []Split - return ret - } - return o.Splits -} - -// GetSplitsOk returns a tuple with the Splits field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetSplitsOk() ([]Split, bool) { - if o == nil || common.IsNil(o.Splits) { - return nil, false - } - return o.Splits, true -} - -// HasSplits returns a boolean if a field has been set. -func (o *PaymentRefundResource) HasSplits() bool { - if o != nil && !common.IsNil(o.Splits) { - return true - } - - return false -} - -// SetSplits gets a reference to the given []Split and assigns it to the Splits field. -func (o *PaymentRefundResource) SetSplits(v []Split) { - o.Splits = v -} - -// GetStatus returns the Status field value -func (o *PaymentRefundResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *PaymentRefundResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *PaymentRefundResource) SetStatus(v string) { - o.Status = v -} - -func (o PaymentRefundResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentRefundResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["amount"] = o.Amount - if !common.IsNil(o.LineItems) { - toSerialize["lineItems"] = o.LineItems - } - toSerialize["merchantAccount"] = o.MerchantAccount - if !common.IsNil(o.MerchantRefundReason) { - toSerialize["merchantRefundReason"] = o.MerchantRefundReason - } - toSerialize["paymentPspReference"] = o.PaymentPspReference - toSerialize["pspReference"] = o.PspReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Splits) { - toSerialize["splits"] = o.Splits - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullablePaymentRefundResource struct { - value *PaymentRefundResource - isSet bool -} - -func (v NullablePaymentRefundResource) Get() *PaymentRefundResource { - return v.value -} - -func (v *NullablePaymentRefundResource) Set(val *PaymentRefundResource) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentRefundResource) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentRefundResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentRefundResource(val *PaymentRefundResource) *NullablePaymentRefundResource { - return &NullablePaymentRefundResource{value: val, isSet: true} -} - -func (v NullablePaymentRefundResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentRefundResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentRefundResource) isValidMerchantRefundReason() bool { - var allowedEnumValues = []string{"FRAUD", "CUSTOMER REQUEST", "RETURN", "DUPLICATE", "OTHER"} - for _, allowed := range allowedEnumValues { - if o.GetMerchantRefundReason() == allowed { - return true - } - } - return false -} -func (o *PaymentRefundResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_request.go b/src/checkout/model_payment_request.go index eeccf097a..f6157c2b0 100644 --- a/src/checkout/model_payment_request.go +++ b/src/checkout/model_payment_request.go @@ -27,7 +27,7 @@ type PaymentRequest struct { Amount Amount `json:"amount"` ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` AuthenticationData *AuthenticationData `json:"authenticationData,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` + BillingAddress *BillingAddress `json:"billingAddress,omitempty"` BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` // The delay between the authorisation and scheduled auto-capture, specified in hours. CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` @@ -42,10 +42,13 @@ type PaymentRequest struct { // 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 shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` - DccQuote *ForexQuote `json:"dccQuote,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` + DateOfBirth *time.Time `json:"dateOfBirth,omitempty"` + DccQuote *ForexQuote `json:"dccQuote,omitempty"` // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + DeliverAt *time.Time `json:"deliverAt,omitempty"` + DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` + // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 + // Deprecated DeliveryDate *time.Time `json:"deliveryDate,omitempty"` // A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). DeviceFingerprint *string `json:"deviceFingerprint,omitempty"` @@ -58,13 +61,15 @@ type PaymentRequest struct { // The type of the entity the payment is processed for. EntityType *string `json:"entityType,omitempty"` // An integer value that is added to the normal fraud score. The value can be either positive or negative. - FraudOffset *int32 `json:"fraudOffset,omitempty"` + FraudOffset *int32 `json:"fraudOffset,omitempty"` + FundOrigin *FundOrigin `json:"fundOrigin,omitempty"` + FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` // 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 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. + // 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 Zip. LineItems []LineItem `json:"lineItems,omitempty"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + // 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"` 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. @@ -116,15 +121,15 @@ type PaymentRequest struct { ShopperStatement *string `json:"shopperStatement,omitempty"` // The shopper's social security number. SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). + // An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + // The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). Store *string `json:"store,omitempty"` // When true and `shopperReference` is provided, the payment details will be stored. StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // The shopper's telephone number. - TelephoneNumber *string `json:"telephoneNumber,omitempty"` - ThreeDS2RequestData *ThreeDS2RequestData `json:"threeDS2RequestData,omitempty"` + TelephoneNumber *string `json:"telephoneNumber,omitempty"` + ThreeDS2RequestData *ThreeDS2RequestData2 `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. // Deprecated ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -343,9 +348,9 @@ func (o *PaymentRequest) SetAuthenticationData(v AuthenticationData) { } // GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *PaymentRequest) GetBillingAddress() Address { +func (o *PaymentRequest) GetBillingAddress() BillingAddress { if o == nil || common.IsNil(o.BillingAddress) { - var ret Address + var ret BillingAddress return ret } return *o.BillingAddress @@ -353,7 +358,7 @@ func (o *PaymentRequest) GetBillingAddress() Address { // GetBillingAddressOk returns a tuple with the BillingAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentRequest) GetBillingAddressOk() (*Address, bool) { +func (o *PaymentRequest) GetBillingAddressOk() (*BillingAddress, bool) { if o == nil || common.IsNil(o.BillingAddress) { return nil, false } @@ -369,8 +374,8 @@ func (o *PaymentRequest) HasBillingAddress() bool { return false } -// SetBillingAddress gets a reference to the given Address and assigns it to the BillingAddress field. -func (o *PaymentRequest) SetBillingAddress(v Address) { +// SetBillingAddress gets a reference to the given BillingAddress and assigns it to the BillingAddress field. +func (o *PaymentRequest) SetBillingAddress(v BillingAddress) { o.BillingAddress = &v } @@ -602,9 +607,9 @@ func (o *PaymentRequest) SetCountryCode(v string) { } // GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *PaymentRequest) GetDateOfBirth() string { +func (o *PaymentRequest) GetDateOfBirth() time.Time { if o == nil || common.IsNil(o.DateOfBirth) { - var ret string + var ret time.Time return ret } return *o.DateOfBirth @@ -612,7 +617,7 @@ func (o *PaymentRequest) GetDateOfBirth() string { // GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentRequest) GetDateOfBirthOk() (*string, bool) { +func (o *PaymentRequest) GetDateOfBirthOk() (*time.Time, bool) { if o == nil || common.IsNil(o.DateOfBirth) { return nil, false } @@ -628,8 +633,8 @@ func (o *PaymentRequest) HasDateOfBirth() bool { return false } -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *PaymentRequest) SetDateOfBirth(v string) { +// SetDateOfBirth gets a reference to the given time.Time and assigns it to the DateOfBirth field. +func (o *PaymentRequest) SetDateOfBirth(v time.Time) { o.DateOfBirth = &v } @@ -665,10 +670,42 @@ func (o *PaymentRequest) SetDccQuote(v ForexQuote) { o.DccQuote = &v } +// GetDeliverAt returns the DeliverAt field value if set, zero value otherwise. +func (o *PaymentRequest) GetDeliverAt() time.Time { + if o == nil || common.IsNil(o.DeliverAt) { + var ret time.Time + return ret + } + return *o.DeliverAt +} + +// GetDeliverAtOk returns a tuple with the DeliverAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRequest) GetDeliverAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.DeliverAt) { + return nil, false + } + return o.DeliverAt, true +} + +// HasDeliverAt returns a boolean if a field has been set. +func (o *PaymentRequest) HasDeliverAt() bool { + if o != nil && !common.IsNil(o.DeliverAt) { + return true + } + + return false +} + +// SetDeliverAt gets a reference to the given time.Time and assigns it to the DeliverAt field. +func (o *PaymentRequest) SetDeliverAt(v time.Time) { + o.DeliverAt = &v +} + // GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *PaymentRequest) GetDeliveryAddress() Address { +func (o *PaymentRequest) GetDeliveryAddress() DeliveryAddress { if o == nil || common.IsNil(o.DeliveryAddress) { - var ret Address + var ret DeliveryAddress return ret } return *o.DeliveryAddress @@ -676,7 +713,7 @@ func (o *PaymentRequest) GetDeliveryAddress() Address { // GetDeliveryAddressOk returns a tuple with the DeliveryAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentRequest) GetDeliveryAddressOk() (*Address, bool) { +func (o *PaymentRequest) GetDeliveryAddressOk() (*DeliveryAddress, bool) { if o == nil || common.IsNil(o.DeliveryAddress) { return nil, false } @@ -692,12 +729,13 @@ func (o *PaymentRequest) HasDeliveryAddress() bool { return false } -// SetDeliveryAddress gets a reference to the given Address and assigns it to the DeliveryAddress field. -func (o *PaymentRequest) SetDeliveryAddress(v Address) { +// SetDeliveryAddress gets a reference to the given DeliveryAddress and assigns it to the DeliveryAddress field. +func (o *PaymentRequest) SetDeliveryAddress(v DeliveryAddress) { o.DeliveryAddress = &v } // GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. +// Deprecated func (o *PaymentRequest) GetDeliveryDate() time.Time { if o == nil || common.IsNil(o.DeliveryDate) { var ret time.Time @@ -708,6 +746,7 @@ func (o *PaymentRequest) GetDeliveryDate() time.Time { // GetDeliveryDateOk returns a tuple with the DeliveryDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated func (o *PaymentRequest) GetDeliveryDateOk() (*time.Time, bool) { if o == nil || common.IsNil(o.DeliveryDate) { return nil, false @@ -725,6 +764,7 @@ func (o *PaymentRequest) HasDeliveryDate() bool { } // SetDeliveryDate gets a reference to the given time.Time and assigns it to the DeliveryDate field. +// Deprecated func (o *PaymentRequest) SetDeliveryDate(v time.Time) { o.DeliveryDate = &v } @@ -921,6 +961,70 @@ func (o *PaymentRequest) SetFraudOffset(v int32) { o.FraudOffset = &v } +// GetFundOrigin returns the FundOrigin field value if set, zero value otherwise. +func (o *PaymentRequest) GetFundOrigin() FundOrigin { + if o == nil || common.IsNil(o.FundOrigin) { + var ret FundOrigin + return ret + } + return *o.FundOrigin +} + +// GetFundOriginOk returns a tuple with the FundOrigin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRequest) GetFundOriginOk() (*FundOrigin, bool) { + if o == nil || common.IsNil(o.FundOrigin) { + return nil, false + } + return o.FundOrigin, true +} + +// HasFundOrigin returns a boolean if a field has been set. +func (o *PaymentRequest) HasFundOrigin() bool { + if o != nil && !common.IsNil(o.FundOrigin) { + return true + } + + return false +} + +// SetFundOrigin gets a reference to the given FundOrigin and assigns it to the FundOrigin field. +func (o *PaymentRequest) SetFundOrigin(v FundOrigin) { + o.FundOrigin = &v +} + +// GetFundRecipient returns the FundRecipient field value if set, zero value otherwise. +func (o *PaymentRequest) GetFundRecipient() FundRecipient { + if o == nil || common.IsNil(o.FundRecipient) { + var ret FundRecipient + return ret + } + return *o.FundRecipient +} + +// GetFundRecipientOk returns a tuple with the FundRecipient field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRequest) GetFundRecipientOk() (*FundRecipient, bool) { + if o == nil || common.IsNil(o.FundRecipient) { + return nil, false + } + return o.FundRecipient, true +} + +// HasFundRecipient returns a boolean if a field has been set. +func (o *PaymentRequest) HasFundRecipient() bool { + if o != nil && !common.IsNil(o.FundRecipient) { + return true + } + + return false +} + +// SetFundRecipient gets a reference to the given FundRecipient and assigns it to the FundRecipient field. +func (o *PaymentRequest) SetFundRecipient(v FundRecipient) { + o.FundRecipient = &v +} + // GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. func (o *PaymentRequest) GetIndustryUsage() string { if o == nil || common.IsNil(o.IndustryUsage) { @@ -2074,9 +2178,9 @@ func (o *PaymentRequest) SetTelephoneNumber(v string) { } // GetThreeDS2RequestData returns the ThreeDS2RequestData field value if set, zero value otherwise. -func (o *PaymentRequest) GetThreeDS2RequestData() ThreeDS2RequestData { +func (o *PaymentRequest) GetThreeDS2RequestData() ThreeDS2RequestData2 { if o == nil || common.IsNil(o.ThreeDS2RequestData) { - var ret ThreeDS2RequestData + var ret ThreeDS2RequestData2 return ret } return *o.ThreeDS2RequestData @@ -2084,7 +2188,7 @@ func (o *PaymentRequest) GetThreeDS2RequestData() ThreeDS2RequestData { // GetThreeDS2RequestDataOk returns a tuple with the ThreeDS2RequestData field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData, bool) { +func (o *PaymentRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData2, bool) { if o == nil || common.IsNil(o.ThreeDS2RequestData) { return nil, false } @@ -2100,8 +2204,8 @@ func (o *PaymentRequest) HasThreeDS2RequestData() bool { return false } -// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData and assigns it to the ThreeDS2RequestData field. -func (o *PaymentRequest) SetThreeDS2RequestData(v ThreeDS2RequestData) { +// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData2 and assigns it to the ThreeDS2RequestData field. +func (o *PaymentRequest) SetThreeDS2RequestData(v ThreeDS2RequestData2) { o.ThreeDS2RequestData = &v } @@ -2228,6 +2332,9 @@ func (o PaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.DccQuote) { toSerialize["dccQuote"] = o.DccQuote } + if !common.IsNil(o.DeliverAt) { + toSerialize["deliverAt"] = o.DeliverAt + } if !common.IsNil(o.DeliveryAddress) { toSerialize["deliveryAddress"] = o.DeliveryAddress } @@ -2252,6 +2359,12 @@ func (o PaymentRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.FraudOffset) { toSerialize["fraudOffset"] = o.FraudOffset } + if !common.IsNil(o.FundOrigin) { + toSerialize["fundOrigin"] = o.FundOrigin + } + if !common.IsNil(o.FundRecipient) { + toSerialize["fundRecipient"] = o.FundRecipient + } if !common.IsNil(o.IndustryUsage) { toSerialize["industryUsage"] = o.IndustryUsage } diff --git a/src/checkout/model_payment_response.go b/src/checkout/model_payment_response.go index 5931f90a1..a17eec40a 100644 --- a/src/checkout/model_payment_response.go +++ b/src/checkout/model_payment_response.go @@ -36,7 +36,7 @@ type PaymentResponse struct { RefusalReason *string `json:"refusalReason,omitempty"` // Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). RefusalReasonCode *string `json:"refusalReasonCode,omitempty"` - // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. ResultCode *string `json:"resultCode,omitempty"` ThreeDS2ResponseData *ThreeDS2ResponseData `json:"threeDS2ResponseData,omitempty"` ThreeDS2Result *ThreeDS2Result `json:"threeDS2Result,omitempty"` @@ -636,7 +636,7 @@ func (v *NullablePaymentResponse) UnmarshalJSON(src []byte) error { } func (o *PaymentResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} + var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "PartiallyAuthorised", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} for _, allowed := range allowedEnumValues { if o.GetResultCode() == allowed { return true diff --git a/src/checkout/model_payment_response_action.go b/src/checkout/model_payment_response_action.go index 8f3f16605..be125e42c 100644 --- a/src/checkout/model_payment_response_action.go +++ b/src/checkout/model_payment_response_action.go @@ -15,13 +15,14 @@ import ( // PaymentResponseAction - Action to be taken for completing the payment. type PaymentResponseAction struct { - CheckoutAwaitAction *CheckoutAwaitAction - CheckoutNativeRedirectAction *CheckoutNativeRedirectAction - CheckoutQrCodeAction *CheckoutQrCodeAction - CheckoutRedirectAction *CheckoutRedirectAction - CheckoutSDKAction *CheckoutSDKAction - CheckoutThreeDS2Action *CheckoutThreeDS2Action - CheckoutVoucherAction *CheckoutVoucherAction + CheckoutAwaitAction *CheckoutAwaitAction + CheckoutDelegatedAuthenticationAction *CheckoutDelegatedAuthenticationAction + CheckoutNativeRedirectAction *CheckoutNativeRedirectAction + CheckoutQrCodeAction *CheckoutQrCodeAction + CheckoutRedirectAction *CheckoutRedirectAction + CheckoutSDKAction *CheckoutSDKAction + CheckoutThreeDS2Action *CheckoutThreeDS2Action + CheckoutVoucherAction *CheckoutVoucherAction } // CheckoutAwaitActionAsPaymentResponseAction is a convenience function that returns CheckoutAwaitAction wrapped in PaymentResponseAction @@ -31,6 +32,13 @@ func CheckoutAwaitActionAsPaymentResponseAction(v *CheckoutAwaitAction) PaymentR } } +// CheckoutDelegatedAuthenticationActionAsPaymentResponseAction is a convenience function that returns CheckoutDelegatedAuthenticationAction wrapped in PaymentResponseAction +func CheckoutDelegatedAuthenticationActionAsPaymentResponseAction(v *CheckoutDelegatedAuthenticationAction) PaymentResponseAction { + return PaymentResponseAction{ + CheckoutDelegatedAuthenticationAction: v, + } +} + // CheckoutNativeRedirectActionAsPaymentResponseAction is a convenience function that returns CheckoutNativeRedirectAction wrapped in PaymentResponseAction func CheckoutNativeRedirectActionAsPaymentResponseAction(v *CheckoutNativeRedirectAction) PaymentResponseAction { return PaymentResponseAction{ @@ -90,6 +98,19 @@ func (dst *PaymentResponseAction) UnmarshalJSON(data []byte) error { dst.CheckoutAwaitAction = nil } + // try to unmarshal data into CheckoutDelegatedAuthenticationAction + err = json.Unmarshal(data, &dst.CheckoutDelegatedAuthenticationAction) + if err == nil { + jsonCheckoutDelegatedAuthenticationAction, _ := json.Marshal(dst.CheckoutDelegatedAuthenticationAction) + if string(jsonCheckoutDelegatedAuthenticationAction) == "{}" || !dst.CheckoutDelegatedAuthenticationAction.isValidType() { // empty struct + dst.CheckoutDelegatedAuthenticationAction = nil + } else { + match++ + } + } else { + dst.CheckoutDelegatedAuthenticationAction = nil + } + // try to unmarshal data into CheckoutNativeRedirectAction err = json.Unmarshal(data, &dst.CheckoutNativeRedirectAction) if err == nil { @@ -171,6 +192,7 @@ func (dst *PaymentResponseAction) UnmarshalJSON(data []byte) error { if match > 1 { // more than 1 match // reset to nil dst.CheckoutAwaitAction = nil + dst.CheckoutDelegatedAuthenticationAction = nil dst.CheckoutNativeRedirectAction = nil dst.CheckoutQrCodeAction = nil dst.CheckoutRedirectAction = nil @@ -192,6 +214,10 @@ func (src PaymentResponseAction) MarshalJSON() ([]byte, error) { return json.Marshal(&src.CheckoutAwaitAction) } + if src.CheckoutDelegatedAuthenticationAction != nil { + return json.Marshal(&src.CheckoutDelegatedAuthenticationAction) + } + if src.CheckoutNativeRedirectAction != nil { return json.Marshal(&src.CheckoutNativeRedirectAction) } @@ -228,6 +254,10 @@ func (obj *PaymentResponseAction) GetActualInstance() interface{} { return obj.CheckoutAwaitAction } + if obj.CheckoutDelegatedAuthenticationAction != nil { + return obj.CheckoutDelegatedAuthenticationAction + } + if obj.CheckoutNativeRedirectAction != nil { return obj.CheckoutNativeRedirectAction } diff --git a/src/checkout/model_payment_reversal_resource.go b/src/checkout/model_payment_reversal_resource.go deleted file mode 100644 index 1021d1239..000000000 --- a/src/checkout/model_payment_reversal_resource.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the PaymentReversalResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentReversalResource{} - -// PaymentReversalResource struct for PaymentReversalResource -type PaymentReversalResource 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. - PaymentPspReference string `json:"paymentPspReference"` - // Adyen's 16-character reference associated with the reversal request. - PspReference string `json:"pspReference"` - // Your reference for the reversal request. - Reference *string `json:"reference,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewPaymentReversalResource instantiates a new PaymentReversalResource 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 NewPaymentReversalResource(merchantAccount string, paymentPspReference string, pspReference string, status string) *PaymentReversalResource { - this := PaymentReversalResource{} - this.MerchantAccount = merchantAccount - this.PaymentPspReference = paymentPspReference - this.PspReference = pspReference - this.Status = status - return &this -} - -// NewPaymentReversalResourceWithDefaults instantiates a new PaymentReversalResource 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 NewPaymentReversalResourceWithDefaults() *PaymentReversalResource { - this := PaymentReversalResource{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentReversalResource) 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 *PaymentReversalResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentReversalResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentPspReference returns the PaymentPspReference field value -func (o *PaymentReversalResource) GetPaymentPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentPspReference -} - -// GetPaymentPspReferenceOk returns a tuple with the PaymentPspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentReversalResource) GetPaymentPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentPspReference, true -} - -// SetPaymentPspReference sets field value -func (o *PaymentReversalResource) SetPaymentPspReference(v string) { - o.PaymentPspReference = v -} - -// GetPspReference returns the PspReference field value -func (o *PaymentReversalResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *PaymentReversalResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *PaymentReversalResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *PaymentReversalResource) 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 *PaymentReversalResource) 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 *PaymentReversalResource) 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 *PaymentReversalResource) SetReference(v string) { - o.Reference = &v -} - -// GetStatus returns the Status field value -func (o *PaymentReversalResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *PaymentReversalResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *PaymentReversalResource) SetStatus(v string) { - o.Status = v -} - -func (o PaymentReversalResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentReversalResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentPspReference"] = o.PaymentPspReference - toSerialize["pspReference"] = o.PspReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullablePaymentReversalResource struct { - value *PaymentReversalResource - isSet bool -} - -func (v NullablePaymentReversalResource) Get() *PaymentReversalResource { - return v.value -} - -func (v *NullablePaymentReversalResource) Set(val *PaymentReversalResource) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentReversalResource) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentReversalResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentReversalResource(val *PaymentReversalResource) *NullablePaymentReversalResource { - return &NullablePaymentReversalResource{value: val, isSet: true} -} - -func (v NullablePaymentReversalResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentReversalResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentReversalResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_setup_request.go b/src/checkout/model_payment_setup_request.go index d179f1b69..b1cdb784d 100644 --- a/src/checkout/model_payment_setup_request.go +++ b/src/checkout/model_payment_setup_request.go @@ -62,7 +62,7 @@ type PaymentSetupRequest struct { Installments *Installments `json:"installments,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"` - // This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + // 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"` 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. @@ -108,7 +108,7 @@ type PaymentSetupRequest struct { SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` // An array of objects specifying how the payment should be split when using [Adyen for Platforms](https://docs.adyen.com/marketplaces-and-platforms/processing-payments#providing-split-information) or [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). Splits []Split `json:"splits,omitempty"` - // The ecommerce or point-of-sale store that is processing the payment. Used in [partner model integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for Adyen for Platforms. + // The ecommerce or point-of-sale store that is processing the payment. Used in: * [Partner platform integrations](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#route-payments) for the [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic). * [Platform setup integrations](https://docs.adyen.com/marketplaces-and-platforms/additional-for-platform-setup/route-payment-to-store) for the [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms). Store *string `json:"store,omitempty"` // When true and `shopperReference` is provided, the payment details will be stored. StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` diff --git a/src/checkout/model_payment_verification_response.go b/src/checkout/model_payment_verification_response.go index 18a6a1c2a..5e39e03d2 100644 --- a/src/checkout/model_payment_verification_response.go +++ b/src/checkout/model_payment_verification_response.go @@ -31,7 +31,7 @@ type PaymentVerificationResponse struct { RefusalReason *string `json:"refusalReason,omitempty"` // Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). RefusalReasonCode *string `json:"refusalReasonCode,omitempty"` - // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. + // The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **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. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. ResultCode *string `json:"resultCode,omitempty"` ServiceError *ServiceError2 `json:"serviceError,omitempty"` // The shopperLocale value provided in the payment request. @@ -437,7 +437,7 @@ func (v *NullablePaymentVerificationResponse) UnmarshalJSON(src []byte) error { } func (o *PaymentVerificationResponse) isValidResultCode() bool { - var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} + var allowedEnumValues = []string{"AuthenticationFinished", "AuthenticationNotRequired", "Authorised", "Cancelled", "ChallengeShopper", "Error", "IdentifyShopper", "PartiallyAuthorised", "Pending", "PresentToShopper", "Received", "RedirectShopper", "Refused", "Success"} for _, allowed := range allowedEnumValues { if o.GetResultCode() == allowed { return true diff --git a/src/checkout/model_platform_chargeback_logic.go b/src/checkout/model_platform_chargeback_logic.go index 018218fc9..d1d848dd7 100644 --- a/src/checkout/model_platform_chargeback_logic.go +++ b/src/checkout/model_platform_chargeback_logic.go @@ -19,9 +19,12 @@ var _ common.MappedNullable = &PlatformChargebackLogic{} // PlatformChargebackLogic struct for PlatformChargebackLogic type PlatformChargebackLogic struct { - Behavior *string `json:"behavior,omitempty"` + // The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + Behavior *string `json:"behavior,omitempty"` + // The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. CostAllocationAccount *string `json:"costAllocationAccount,omitempty"` - TargetAccount *string `json:"targetAccount,omitempty"` + // The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. + TargetAccount *string `json:"targetAccount,omitempty"` } // NewPlatformChargebackLogic instantiates a new PlatformChargebackLogic object diff --git a/src/checkout/model_split.go b/src/checkout/model_split.go index 32e4f589f..b647c0201 100644 --- a/src/checkout/model_split.go +++ b/src/checkout/model_split.go @@ -254,7 +254,7 @@ func (v *NullableSplit) UnmarshalJSON(src []byte) error { } func (o *Split) isValidType() bool { - var allowedEnumValues = []string{"BalanceAccount", "Commission", "Default", "MarketPlace", "PaymentFee", "Remainder", "Surcharge", "Tip", "VAT", "Verification"} + var allowedEnumValues = []string{"BalanceAccount", "Commission", "Default", "MarketPlace", "PaymentFee", "Remainder", "Surcharge", "Tip", "VAT"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_standalone_payment_cancel_resource.go b/src/checkout/model_standalone_payment_cancel_resource.go deleted file mode 100644 index ac0efafbc..000000000 --- a/src/checkout/model_standalone_payment_cancel_resource.go +++ /dev/null @@ -1,247 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the StandalonePaymentCancelResource type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &StandalonePaymentCancelResource{} - -// StandalonePaymentCancelResource struct for StandalonePaymentCancelResource -type StandalonePaymentCancelResource struct { - // 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 to cancel. - PaymentReference string `json:"paymentReference"` - // Adyen's 16-character reference associated with the cancel request. - PspReference string `json:"pspReference"` - // Your reference for the cancel request. - Reference *string `json:"reference,omitempty"` - // The status of your request. This will always have the value **received**. - Status string `json:"status"` -} - -// NewStandalonePaymentCancelResource instantiates a new StandalonePaymentCancelResource 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 NewStandalonePaymentCancelResource(merchantAccount string, paymentReference string, pspReference string, status string) *StandalonePaymentCancelResource { - this := StandalonePaymentCancelResource{} - this.MerchantAccount = merchantAccount - this.PaymentReference = paymentReference - this.PspReference = pspReference - this.Status = status - return &this -} - -// NewStandalonePaymentCancelResourceWithDefaults instantiates a new StandalonePaymentCancelResource 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 NewStandalonePaymentCancelResourceWithDefaults() *StandalonePaymentCancelResource { - this := StandalonePaymentCancelResource{} - return &this -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *StandalonePaymentCancelResource) 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 *StandalonePaymentCancelResource) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *StandalonePaymentCancelResource) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetPaymentReference returns the PaymentReference field value -func (o *StandalonePaymentCancelResource) GetPaymentReference() string { - if o == nil { - var ret string - return ret - } - - return o.PaymentReference -} - -// GetPaymentReferenceOk returns a tuple with the PaymentReference field value -// and a boolean to check if the value has been set. -func (o *StandalonePaymentCancelResource) GetPaymentReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PaymentReference, true -} - -// SetPaymentReference sets field value -func (o *StandalonePaymentCancelResource) SetPaymentReference(v string) { - o.PaymentReference = v -} - -// GetPspReference returns the PspReference field value -func (o *StandalonePaymentCancelResource) GetPspReference() string { - if o == nil { - var ret string - return ret - } - - return o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value -// and a boolean to check if the value has been set. -func (o *StandalonePaymentCancelResource) GetPspReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PspReference, true -} - -// SetPspReference sets field value -func (o *StandalonePaymentCancelResource) SetPspReference(v string) { - o.PspReference = v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *StandalonePaymentCancelResource) 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 *StandalonePaymentCancelResource) 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 *StandalonePaymentCancelResource) 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 *StandalonePaymentCancelResource) SetReference(v string) { - o.Reference = &v -} - -// GetStatus returns the Status field value -func (o *StandalonePaymentCancelResource) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *StandalonePaymentCancelResource) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *StandalonePaymentCancelResource) SetStatus(v string) { - o.Status = v -} - -func (o StandalonePaymentCancelResource) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StandalonePaymentCancelResource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["merchantAccount"] = o.MerchantAccount - toSerialize["paymentReference"] = o.PaymentReference - toSerialize["pspReference"] = o.PspReference - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullableStandalonePaymentCancelResource struct { - value *StandalonePaymentCancelResource - isSet bool -} - -func (v NullableStandalonePaymentCancelResource) Get() *StandalonePaymentCancelResource { - return v.value -} - -func (v *NullableStandalonePaymentCancelResource) Set(val *StandalonePaymentCancelResource) { - v.value = val - v.isSet = true -} - -func (v NullableStandalonePaymentCancelResource) IsSet() bool { - return v.isSet -} - -func (v *NullableStandalonePaymentCancelResource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStandalonePaymentCancelResource(val *StandalonePaymentCancelResource) *NullableStandalonePaymentCancelResource { - return &NullableStandalonePaymentCancelResource{value: val, isSet: true} -} - -func (v NullableStandalonePaymentCancelResource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStandalonePaymentCancelResource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *StandalonePaymentCancelResource) isValidStatus() bool { - var allowedEnumValues = []string{"received"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_stored_payment_method_details.go b/src/checkout/model_stored_payment_method_details.go index 911f8d674..ddbc4a426 100644 --- a/src/checkout/model_stored_payment_method_details.go +++ b/src/checkout/model_stored_payment_method_details.go @@ -240,7 +240,7 @@ func (v *NullableStoredPaymentMethodDetails) UnmarshalJSON(src []byte) error { } func (o *StoredPaymentMethodDetails) isValidType() bool { - var allowedEnumValues = []string{"bcmc_mobile", "bcmc_mobile_QR", "bcmc_mobile_app", "momo_wallet", "momo_wallet_app", "twint", "paymaya_wallet", "grabpay_SG", "grabpay_MY", "grabpay_TH", "grabpay_ID", "grabpay_VN", "grabpay_PH", "oxxo", "gcash", "kakaopay", "truemoney", "twint_pos"} + var allowedEnumValues = []string{"bcmc_mobile", "bcmc_mobile_QR", "bcmc_mobile_app", "momo_wallet", "momo_wallet_app", "twint", "paymaya_wallet", "grabpay_SG", "grabpay_MY", "grabpay_TH", "grabpay_ID", "grabpay_VN", "grabpay_PH", "oxxo", "gcash", "dana", "kakaopay", "truemoney"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_sub_merchant_2.go b/src/checkout/model_sub_merchant_2.go deleted file mode 100644 index 2f7194621..000000000 --- a/src/checkout/model_sub_merchant_2.go +++ /dev/null @@ -1,268 +0,0 @@ -/* -Adyen Checkout API - -API version: 70 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v8/src/common" -) - -// checks if the SubMerchant2 type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &SubMerchant2{} - -// SubMerchant2 struct for SubMerchant2 -type SubMerchant2 struct { - Address *Address `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Mcc *string `json:"mcc,omitempty"` - Name *string `json:"name,omitempty"` - TaxId *string `json:"taxId,omitempty"` -} - -// NewSubMerchant2 instantiates a new SubMerchant2 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 NewSubMerchant2() *SubMerchant2 { - this := SubMerchant2{} - return &this -} - -// NewSubMerchant2WithDefaults instantiates a new SubMerchant2 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 NewSubMerchant2WithDefaults() *SubMerchant2 { - this := SubMerchant2{} - return &this -} - -// GetAddress returns the Address field value if set, zero value otherwise. -func (o *SubMerchant2) GetAddress() Address { - if o == nil || common.IsNil(o.Address) { - var ret Address - return ret - } - return *o.Address -} - -// GetAddressOk returns a tuple with the Address field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubMerchant2) GetAddressOk() (*Address, bool) { - if o == nil || common.IsNil(o.Address) { - return nil, false - } - return o.Address, true -} - -// HasAddress returns a boolean if a field has been set. -func (o *SubMerchant2) HasAddress() bool { - if o != nil && !common.IsNil(o.Address) { - return true - } - - return false -} - -// SetAddress gets a reference to the given Address and assigns it to the Address field. -func (o *SubMerchant2) SetAddress(v Address) { - o.Address = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SubMerchant2) GetId() string { - if o == nil || common.IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubMerchant2) GetIdOk() (*string, bool) { - if o == nil || common.IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SubMerchant2) HasId() bool { - if o != nil && !common.IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *SubMerchant2) SetId(v string) { - o.Id = &v -} - -// GetMcc returns the Mcc field value if set, zero value otherwise. -func (o *SubMerchant2) GetMcc() string { - if o == nil || common.IsNil(o.Mcc) { - var ret string - return ret - } - return *o.Mcc -} - -// GetMccOk returns a tuple with the Mcc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubMerchant2) GetMccOk() (*string, bool) { - if o == nil || common.IsNil(o.Mcc) { - return nil, false - } - return o.Mcc, true -} - -// HasMcc returns a boolean if a field has been set. -func (o *SubMerchant2) HasMcc() bool { - if o != nil && !common.IsNil(o.Mcc) { - return true - } - - return false -} - -// SetMcc gets a reference to the given string and assigns it to the Mcc field. -func (o *SubMerchant2) SetMcc(v string) { - o.Mcc = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *SubMerchant2) GetName() string { - if o == nil || common.IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubMerchant2) GetNameOk() (*string, bool) { - if o == nil || common.IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *SubMerchant2) HasName() bool { - if o != nil && !common.IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *SubMerchant2) SetName(v string) { - o.Name = &v -} - -// GetTaxId returns the TaxId field value if set, zero value otherwise. -func (o *SubMerchant2) GetTaxId() string { - if o == nil || common.IsNil(o.TaxId) { - var ret string - return ret - } - return *o.TaxId -} - -// GetTaxIdOk returns a tuple with the TaxId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubMerchant2) GetTaxIdOk() (*string, bool) { - if o == nil || common.IsNil(o.TaxId) { - return nil, false - } - return o.TaxId, true -} - -// HasTaxId returns a boolean if a field has been set. -func (o *SubMerchant2) HasTaxId() bool { - if o != nil && !common.IsNil(o.TaxId) { - return true - } - - return false -} - -// SetTaxId gets a reference to the given string and assigns it to the TaxId field. -func (o *SubMerchant2) SetTaxId(v string) { - o.TaxId = &v -} - -func (o SubMerchant2) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SubMerchant2) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Address) { - toSerialize["address"] = o.Address - } - if !common.IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !common.IsNil(o.Mcc) { - toSerialize["mcc"] = o.Mcc - } - if !common.IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !common.IsNil(o.TaxId) { - toSerialize["taxId"] = o.TaxId - } - return toSerialize, nil -} - -type NullableSubMerchant2 struct { - value *SubMerchant2 - isSet bool -} - -func (v NullableSubMerchant2) Get() *SubMerchant2 { - return v.value -} - -func (v *NullableSubMerchant2) Set(val *SubMerchant2) { - v.value = val - v.isSet = true -} - -func (v NullableSubMerchant2) IsSet() bool { - return v.isSet -} - -func (v *NullableSubMerchant2) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSubMerchant2(val *SubMerchant2) *NullableSubMerchant2 { - return &NullableSubMerchant2{value: val, isSet: true} -} - -func (v NullableSubMerchant2) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSubMerchant2) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_sub_merchant_info.go b/src/checkout/model_sub_merchant_info.go index 3ce6bf070..91b80c990 100644 --- a/src/checkout/model_sub_merchant_info.go +++ b/src/checkout/model_sub_merchant_info.go @@ -19,11 +19,11 @@ var _ common.MappedNullable = &SubMerchantInfo{} // SubMerchantInfo struct for SubMerchantInfo type SubMerchantInfo struct { - Address *Address `json:"address,omitempty"` - Id *string `json:"id,omitempty"` - Mcc *string `json:"mcc,omitempty"` - Name *string `json:"name,omitempty"` - TaxId *string `json:"taxId,omitempty"` + Address *BillingAddress `json:"address,omitempty"` + Id *string `json:"id,omitempty"` + Mcc *string `json:"mcc,omitempty"` + Name *string `json:"name,omitempty"` + TaxId *string `json:"taxId,omitempty"` } // NewSubMerchantInfo instantiates a new SubMerchantInfo object @@ -44,9 +44,9 @@ func NewSubMerchantInfoWithDefaults() *SubMerchantInfo { } // GetAddress returns the Address field value if set, zero value otherwise. -func (o *SubMerchantInfo) GetAddress() Address { +func (o *SubMerchantInfo) GetAddress() BillingAddress { if o == nil || common.IsNil(o.Address) { - var ret Address + var ret BillingAddress return ret } return *o.Address @@ -54,7 +54,7 @@ func (o *SubMerchantInfo) GetAddress() Address { // GetAddressOk returns a tuple with the Address field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SubMerchantInfo) GetAddressOk() (*Address, bool) { +func (o *SubMerchantInfo) GetAddressOk() (*BillingAddress, bool) { if o == nil || common.IsNil(o.Address) { return nil, false } @@ -70,8 +70,8 @@ func (o *SubMerchantInfo) HasAddress() bool { return false } -// SetAddress gets a reference to the given Address and assigns it to the Address field. -func (o *SubMerchantInfo) SetAddress(v Address) { +// SetAddress gets a reference to the given BillingAddress and assigns it to the Address field. +func (o *SubMerchantInfo) SetAddress(v BillingAddress) { o.Address = &v } diff --git a/src/checkout/model_three_ds2_request_data.go b/src/checkout/model_three_ds2_request_data.go index cf99196ea..82eac06c7 100644 --- a/src/checkout/model_three_ds2_request_data.go +++ b/src/checkout/model_three_ds2_request_data.go @@ -102,8 +102,6 @@ func NewThreeDS2RequestData(deviceChannel string) *ThreeDS2RequestData { var authenticationOnly bool = false this.AuthenticationOnly = &authenticationOnly this.DeviceChannel = deviceChannel - var messageVersion string = "2.1.0" - this.MessageVersion = &messageVersion var sdkMaxTimeout int32 = 60 this.SdkMaxTimeout = &sdkMaxTimeout return &this @@ -116,8 +114,6 @@ func NewThreeDS2RequestDataWithDefaults() *ThreeDS2RequestData { this := ThreeDS2RequestData{} var authenticationOnly bool = false this.AuthenticationOnly = &authenticationOnly - var messageVersion string = "2.1.0" - this.MessageVersion = &messageVersion var sdkMaxTimeout int32 = 60 this.SdkMaxTimeout = &sdkMaxTimeout return &this diff --git a/src/checkout/model_three_ds2_result.go b/src/checkout/model_three_ds2_result.go index 84ab7677d..3d62b699b 100644 --- a/src/checkout/model_three_ds2_result.go +++ b/src/checkout/model_three_ds2_result.go @@ -25,8 +25,6 @@ type ThreeDS2Result struct { CavvAlgorithm *string `json:"cavvAlgorithm,omitempty"` // Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). ChallengeCancel *string `json:"challengeCancel,omitempty"` - // Specifies a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - ChallengeIndicator *string `json:"challengeIndicator,omitempty"` // The `dsTransID` value as defined in the 3D Secure 2 specification. DsTransID *string `json:"dsTransID,omitempty"` // The `eci` value as defined in the 3D Secure 2 specification. @@ -37,6 +35,8 @@ type ThreeDS2Result struct { MessageVersion *string `json:"messageVersion,omitempty"` // Risk score calculated by Cartes Bancaires Directory Server (DS). RiskScore *string `json:"riskScore,omitempty"` + // Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only + ThreeDSRequestorChallengeInd *string `json:"threeDSRequestorChallengeInd,omitempty"` // The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. ThreeDSServerTransID *string `json:"threeDSServerTransID,omitempty"` // The `timestamp` value of the 3D Secure 2 authentication. @@ -162,38 +162,6 @@ func (o *ThreeDS2Result) SetChallengeCancel(v string) { o.ChallengeCancel = &v } -// GetChallengeIndicator returns the ChallengeIndicator field value if set, zero value otherwise. -func (o *ThreeDS2Result) GetChallengeIndicator() string { - if o == nil || common.IsNil(o.ChallengeIndicator) { - var ret string - return ret - } - return *o.ChallengeIndicator -} - -// GetChallengeIndicatorOk returns a tuple with the ChallengeIndicator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ThreeDS2Result) GetChallengeIndicatorOk() (*string, bool) { - if o == nil || common.IsNil(o.ChallengeIndicator) { - return nil, false - } - return o.ChallengeIndicator, true -} - -// HasChallengeIndicator returns a boolean if a field has been set. -func (o *ThreeDS2Result) HasChallengeIndicator() bool { - if o != nil && !common.IsNil(o.ChallengeIndicator) { - return true - } - - return false -} - -// SetChallengeIndicator gets a reference to the given string and assigns it to the ChallengeIndicator field. -func (o *ThreeDS2Result) SetChallengeIndicator(v string) { - o.ChallengeIndicator = &v -} - // GetDsTransID returns the DsTransID field value if set, zero value otherwise. func (o *ThreeDS2Result) GetDsTransID() string { if o == nil || common.IsNil(o.DsTransID) { @@ -354,6 +322,38 @@ func (o *ThreeDS2Result) SetRiskScore(v string) { o.RiskScore = &v } +// GetThreeDSRequestorChallengeInd returns the ThreeDSRequestorChallengeInd field value if set, zero value otherwise. +func (o *ThreeDS2Result) GetThreeDSRequestorChallengeInd() string { + if o == nil || common.IsNil(o.ThreeDSRequestorChallengeInd) { + var ret string + return ret + } + return *o.ThreeDSRequestorChallengeInd +} + +// GetThreeDSRequestorChallengeIndOk returns a tuple with the ThreeDSRequestorChallengeInd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2Result) GetThreeDSRequestorChallengeIndOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorChallengeInd) { + return nil, false + } + return o.ThreeDSRequestorChallengeInd, true +} + +// HasThreeDSRequestorChallengeInd returns a boolean if a field has been set. +func (o *ThreeDS2Result) HasThreeDSRequestorChallengeInd() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorChallengeInd) { + return true + } + + return false +} + +// SetThreeDSRequestorChallengeInd gets a reference to the given string and assigns it to the ThreeDSRequestorChallengeInd field. +func (o *ThreeDS2Result) SetThreeDSRequestorChallengeInd(v string) { + o.ThreeDSRequestorChallengeInd = &v +} + // GetThreeDSServerTransID returns the ThreeDSServerTransID field value if set, zero value otherwise. func (o *ThreeDS2Result) GetThreeDSServerTransID() string { if o == nil || common.IsNil(o.ThreeDSServerTransID) { @@ -533,9 +533,6 @@ func (o ThreeDS2Result) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ChallengeCancel) { toSerialize["challengeCancel"] = o.ChallengeCancel } - if !common.IsNil(o.ChallengeIndicator) { - toSerialize["challengeIndicator"] = o.ChallengeIndicator - } if !common.IsNil(o.DsTransID) { toSerialize["dsTransID"] = o.DsTransID } @@ -551,6 +548,9 @@ func (o ThreeDS2Result) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.RiskScore) { toSerialize["riskScore"] = o.RiskScore } + if !common.IsNil(o.ThreeDSRequestorChallengeInd) { + toSerialize["threeDSRequestorChallengeInd"] = o.ThreeDSRequestorChallengeInd + } if !common.IsNil(o.ThreeDSServerTransID) { toSerialize["threeDSServerTransID"] = o.ThreeDSServerTransID } @@ -614,19 +614,19 @@ func (o *ThreeDS2Result) isValidChallengeCancel() bool { } return false } -func (o *ThreeDS2Result) isValidChallengeIndicator() bool { - var allowedEnumValues = []string{"noPreference", "requestNoChallenge", "requestChallenge", "requestChallengeAsMandate"} +func (o *ThreeDS2Result) isValidExemptionIndicator() bool { + var allowedEnumValues = []string{"lowValue", "secureCorporate", "trustedBeneficiary", "transactionRiskAnalysis"} for _, allowed := range allowedEnumValues { - if o.GetChallengeIndicator() == allowed { + if o.GetExemptionIndicator() == allowed { return true } } return false } -func (o *ThreeDS2Result) isValidExemptionIndicator() bool { - var allowedEnumValues = []string{"lowValue", "secureCorporate", "trustedBeneficiary", "transactionRiskAnalysis"} +func (o *ThreeDS2Result) isValidThreeDSRequestorChallengeInd() bool { + var allowedEnumValues = []string{"01", "02", "03", "04", "05", "06"} for _, allowed := range allowedEnumValues { - if o.GetExemptionIndicator() == allowed { + if o.GetThreeDSRequestorChallengeInd() == allowed { return true } } diff --git a/templates/custom/api.mustache b/templates/custom/api.mustache index f8366ce5d..1a9fd1e80 100644 --- a/templates/custom/api.mustache +++ b/templates/custom/api.mustache @@ -109,13 +109,15 @@ func (a *{{{classname}}}) {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecas headerParams, ) - if httpRes == nil { +{{#hasRestServiceError}} +{{#responses}} + {{#-first}} + if httpRes == nil { return {{#returnType}}*res, {{/returnType}}httpRes, err } -{{#hasRestServiceError}} -{{#responses}} - {{#-first}}var serviceError common.RestServiceError{{/-first}} + var serviceError common.RestServiceError + {{/-first}} {{#dataType}} {{^is1xx}} {{^is2xx}} diff --git a/tests/api_modifications_test.go b/tests/api_modifications_test.go index aecd1a469..b9f2afc27 100644 --- a/tests/api_modifications_test.go +++ b/tests/api_modifications_test.go @@ -30,7 +30,7 @@ func Test_API_Modifications(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { pspReference := "psp0001" req := service.ModificationsApi.CaptureAuthorisedPaymentInput(pspReference) - req = req.CreatePaymentCaptureRequest(checkout.CreatePaymentCaptureRequest{ + req = req.PaymentCaptureRequest(checkout.PaymentCaptureRequest{ MerchantAccount: MerchantAccount, Amount: checkout.Amount{ Value: 1250, @@ -50,7 +50,7 @@ func Test_API_Modifications(t *testing.T) { t.Run("API Modifications - Cancels", func(t *testing.T) { t.Run("Create an API request that should pass", func(t *testing.T) { req := service.ModificationsApi.CancelAuthorisedPaymentInput() - req = req.CreateStandalonePaymentCancelRequest(checkout.CreateStandalonePaymentCancelRequest{ + req = req.StandalonePaymentCancelRequest(checkout.StandalonePaymentCancelRequest{ MerchantAccount: MerchantAccount, PaymentReference: "paymentReference01", Reference: common.PtrString("reference01"), @@ -66,7 +66,7 @@ func Test_API_Modifications(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { req := service.ModificationsApi.CancelAuthorisedPaymentInput() - req = req.CreateStandalonePaymentCancelRequest(checkout.CreateStandalonePaymentCancelRequest{ + req = req.StandalonePaymentCancelRequest(checkout.StandalonePaymentCancelRequest{ MerchantAccount: MerchantAccount, PaymentReference: "", Reference: common.PtrString("reference01"), @@ -83,7 +83,7 @@ func Test_API_Modifications(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { pspReference := "psp0001" req := service.ModificationsApi.RefundCapturedPaymentInput(pspReference) - req = req.CreatePaymentRefundRequest(checkout.CreatePaymentRefundRequest{ + req = req.PaymentRefundRequest(checkout.PaymentRefundRequest{ MerchantAccount: MerchantAccount, Reference: common.PtrString("reference01"), Amount: checkout.Amount{ @@ -103,7 +103,7 @@ func Test_API_Modifications(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { pspReference := "psp0001" req := service.ModificationsApi.RefundOrCancelPaymentInput(pspReference) - req = req.CreatePaymentReversalRequest(checkout.CreatePaymentReversalRequest{ + req = req.PaymentReversalRequest(checkout.PaymentReversalRequest{ MerchantAccount: MerchantAccount, Reference: common.PtrString("reference01"), }) diff --git a/tests/checkout_test.go b/tests/checkout_test.go index 07ff0d5f5..5d1808f0c 100644 --- a/tests/checkout_test.go +++ b/tests/checkout_test.go @@ -180,7 +180,7 @@ func Test_Checkout(t *testing.T) { t.Run("PaymentDetails", func(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { req := service.PaymentsApi.PaymentsDetailsInput() - req = req.DetailsRequest(checkout.DetailsRequest{ + req = req.PaymentDetailsRequest(checkout.PaymentDetailsRequest{ PaymentData: common.PtrString("1234"), Details: checkout.PaymentCompletionDetails{ MD: common.PtrString("Ab02b4c0!BQABAgCW5sxB4e/=="), @@ -201,7 +201,7 @@ func Test_Checkout(t *testing.T) { t.Run("PaymentLinks", func(t *testing.T) { createPaymentLink := func() (checkout.PaymentLinkResponse, *_nethttp.Response, error) { req := service.PaymentLinksApi.PaymentLinksInput() - req = req.CreatePaymentLinkRequest(checkout.CreatePaymentLinkRequest{ + req = req.PaymentLinkRequest(checkout.PaymentLinkRequest{ Reference: "123456781235", Amount: checkout.Amount{ Value: 1250, @@ -226,7 +226,7 @@ func Test_Checkout(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { req := service.PaymentLinksApi.PaymentLinksInput() - req = req.CreatePaymentLinkRequest(checkout.CreatePaymentLinkRequest{ + req = req.PaymentLinkRequest(checkout.PaymentLinkRequest{ Amount: checkout.Amount{ Value: 1250, Currency: "EUR", @@ -356,7 +356,7 @@ func Test_Checkout(t *testing.T) { t.Run("Get origin keys", func(t *testing.T) { domain := "https://adyen.com" req := service.UtilityApi.OriginKeysInput() - req = req.CheckoutUtilityRequest(checkout.CheckoutUtilityRequest{ + req = req.UtilityRequest(checkout.UtilityRequest{ OriginDomains: []string{ domain, }, @@ -378,7 +378,7 @@ func Test_Checkout(t *testing.T) { // @TODO review this test/config t.Skip("Payment method not correctly configured in the backoffice") req := service.OrdersApi.GetBalanceOfGiftCardInput() - req = req.CheckoutBalanceCheckRequest(checkout.CheckoutBalanceCheckRequest{ + req = req.BalanceCheckRequest(checkout.BalanceCheckRequest{ MerchantAccount: MerchantAccount, PaymentMethod: map[string]string{ "type": "giftcard", @@ -399,7 +399,7 @@ func Test_Checkout(t *testing.T) { t.Run("Create order", func(t *testing.T) { req := service.OrdersApi.OrdersInput() - req = req.CheckoutCreateOrderRequest(checkout.CheckoutCreateOrderRequest{ + req = req.CreateOrderRequest(checkout.CreateOrderRequest{ Amount: checkout.Amount{ Currency: "EUR", Value: 1000, @@ -418,7 +418,7 @@ func Test_Checkout(t *testing.T) { t.Run("Cancel order", func(t *testing.T) { req := service.OrdersApi.OrdersInput() - req = req.CheckoutCreateOrderRequest(checkout.CheckoutCreateOrderRequest{ + req = req.CreateOrderRequest(checkout.CreateOrderRequest{ Amount: checkout.Amount{ Currency: "EUR", Value: 1000, @@ -429,7 +429,7 @@ func Test_Checkout(t *testing.T) { order, _, _ := service.OrdersApi.Orders(context.Background(), req) cancelReq := service.OrdersApi.CancelOrderInput() - cancelReq = cancelReq.CheckoutCancelOrderRequest(checkout.CheckoutCancelOrderRequest{ + cancelReq = cancelReq.CancelOrderRequest(checkout.CancelOrderRequest{ MerchantAccount: MerchantAccount, Order: checkout.EncryptedOrderData{ OrderData: order.OrderData, @@ -448,7 +448,7 @@ func Test_Checkout(t *testing.T) { t.Run("Create an API request that should fail", func(t *testing.T) { req := service.OrdersApi.OrdersInput() // missing required "reference" field - req = req.CheckoutCreateOrderRequest(checkout.CheckoutCreateOrderRequest{ + req = req.CreateOrderRequest(checkout.CreateOrderRequest{ Amount: checkout.Amount{ Currency: "EUR", Value: 1000,