From d9ebfc831a4bb6b2d3cbf26f021bd830fa5ccad2 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Fri, 21 Jul 2023 15:37:52 +0000 Subject: [PATCH] [create-pull-request] automated change --- src/checkout/api_payments.go | 76 +- src/checkout/api_recurring.go | 16 +- .../model_additional_data_car_rental.go | 4 +- src/checkout/model_additional_data_level23.go | 2 +- src/checkout/model_additional_data_lodging.go | 4 +- .../model_checkout_balance_check_request.go | 37 +- ...heckout_delegated_authentication_action.go | 311 ++ ...model_checkout_donation_payment_request.go | 2665 +++++++++++++++++ ...donation_payment_request_payment_method.go | 1253 ++++++++ .../model_checkout_payment_request.go | 2563 ++++++++++++++++ src/checkout/model_checkout_voucher_action.go | 37 + .../model_create_checkout_session_request.go | 44 +- .../model_create_checkout_session_response.go | 58 +- ...el_create_payment_amount_update_request.go | 37 + .../model_create_payment_capture_request.go | 75 +- .../model_create_payment_link_request.go | 8 +- src/checkout/model_line_item.go | 2 +- src/checkout/model_pay_pal_details.go | 74 + .../model_payment_capture_resource.go | 75 +- .../model_payment_completion_details.go | 38 +- src/checkout/model_payment_details.go | 2 +- .../model_payment_details_response.go | 4 +- src/checkout/model_payment_link_response.go | 8 +- src/checkout/model_payment_methods_request.go | 2 +- src/checkout/model_payment_response.go | 4 +- src/checkout/model_payment_response_action.go | 44 +- src/checkout/model_payment_setup_request.go | 2 +- .../model_payment_verification_response.go | 4 +- .../model_platform_chargeback_logic.go | 7 +- src/checkout/model_session_result_response.go | 172 ++ src/checkout/model_split.go | 2 +- .../model_stored_payment_method_details.go | 2 +- src/checkout/model_sub_merchant_2.go | 268 ++ src/checkout/model_three_ds2_request_data.go | 4 - .../model_three_ds2_request_data_2.go | 1483 +++++++++ src/checkout/model_three_ds2_result.go | 86 +- src/checkout/model_three_ds_request_data.go | 2 +- src/legalentity/api_business_lines.go | 4 + src/legalentity/api_documents.go | 8 +- src/legalentity/api_hosted_onboarding.go | 12 +- src/legalentity/api_legal_entities.go | 2 + src/legalentity/api_terms_of_service.go | 45 + .../model_accept_terms_of_service_request.go | 35 +- src/legalentity/model_address.go | 2 +- src/legalentity/model_bank_account_info.go | 37 + ...ank_account_info_account_identification.go | 30 + src/legalentity/model_business_line.go | 13 +- src/legalentity/model_business_line_info.go | 13 +- .../model_business_line_info_update.go | 11 +- ...culate_terms_of_service_status_response.go | 125 + .../model_capability_problem_entity.go | 2 +- ...del_capability_problem_entity_recursive.go | 2 +- src/legalentity/model_document.go | 4 +- src/legalentity/model_document_page.go | 206 ++ src/legalentity/model_document_reference.go | 37 + src/legalentity/model_identification_data.go | 4 +- src/legalentity/model_legal_entity.go | 37 + .../model_legal_entity_association.go | 4 +- src/legalentity/model_onboarding_link_info.go | 2 +- src/legalentity/model_organization.go | 2 +- .../model_sg_local_account_identification.go | 195 ++ .../model_transfer_instrument_reference.go | 2 +- .../model_verification_deadline.go | 145 + src/legalentity/model_verification_error.go | 2 +- .../model_verification_error_recursive.go | 2 +- .../api_split_configuration_merchant_level.go | 941 ++++++ .../api_terminal_actions_company_level.go | 42 +- .../api_terminals_terminal_level.go | 12 +- src/management/client.go | 3 + src/management/model_additional_commission.go | 199 ++ src/management/model_afterpay_touch_info.go | 116 + src/management/model_android_app.go | 4 +- src/management/model_clearpay_info.go | 116 + src/management/model_commission.go | 162 + src/management/model_company_user.go | 66 +- ...l_create_company_api_credential_request.go | 2 +- .../model_create_company_user_request.go | 39 +- .../model_create_company_user_response.go | 66 +- .../model_create_company_webhook_request.go | 4 +- ..._create_merchant_api_credential_request.go | 2 +- .../model_create_merchant_user_request.go | 39 +- .../model_create_merchant_webhook_request.go | 4 +- src/management/model_create_user_response.go | 36 +- src/management/model_currency.go | 21 +- src/management/model_hardware.go | 37 + src/management/model_invalid_field_wrapper.go | 124 + src/management/model_json_object.go | 14 +- src/management/model_json_path_wrapper.go | 124 + .../model_list_terminals_response.go | 94 +- src/management/model_nexo.go | 38 +- src/management/model_notification.go | 125 + src/management/model_payment_method.go | 108 + .../model_payment_method_response.go | 12 +- .../model_payment_method_setup_info.go | 114 +- .../model_payment_method_wrapper.go | 124 + src/management/model_rest_service_error.go | 12 +- src/management/model_split_configuration.go | 218 ++ .../model_split_configuration_list.go | 125 + .../model_split_configuration_logic.go | 410 +++ .../model_split_configuration_rule.go | 292 ++ .../model_store_creation_request.go | 6 +- ...ore_creation_with_merchant_code_request.go | 6 +- .../model_terminal_order_request.go | 37 + .../model_terminal_product_price.go | 21 +- src/management/model_twint_info.go | 116 + ...l_update_company_api_credential_request.go | 2 +- .../model_update_company_user_request.go | 74 - .../model_update_company_webhook_request.go | 4 +- ..._update_merchant_api_credential_request.go | 2 +- .../model_update_merchant_user_request.go | 74 - .../model_update_merchant_webhook_request.go | 4 +- .../model_update_payment_method_info.go | 147 +- ...pdate_split_configuration_logic_request.go | 410 +++ ...odel_update_split_configuration_request.go | 116 + ...update_split_configuration_rule_request.go | 209 ++ src/management/model_user.go | 36 +- src/management/model_vipps_info.go | 2 +- src/management/model_webhook.go | 4 +- src/payments/model_additional_data_airline.go | 56 +- .../model_additional_data_car_rental.go | 46 +- src/payments/model_additional_data_level23.go | 34 +- src/payments/model_additional_data_lodging.go | 65 +- ...odel_additional_data_temporary_services.go | 18 +- src/payments/model_payment_request.go | 2 +- src/payments/model_payment_request3d.go | 2 +- src/payments/model_payment_request3ds2.go | 2 +- .../model_platform_chargeback_logic.go | 7 +- src/payments/model_split.go | 2 +- src/payments/model_three_ds2_request_data.go | 4 - src/payout/model_payout_response.go | 4 +- src/transfers/api_capital.go | 334 +++ src/transfers/client.go | 3 + ..._bank_account_v3_account_identification.go | 30 + src/transfers/model_capital_balance.go | 200 ++ src/transfers/model_capital_grant.go | 381 +++ src/transfers/model_capital_grant_info.go | 180 ++ src/transfers/model_capital_grants.go | 116 + src/transfers/model_counterparty_2.go | 199 ++ src/transfers/model_fee.go | 115 + .../model_nz_local_account_identification.go | 212 ++ src/transfers/model_party_identification_2.go | 4 +- src/transfers/model_repayment.go | 188 ++ src/transfers/model_repayment_term.go | 153 + src/transfers/model_threshold_repayment.go | 115 + src/transfers/model_transaction.go | 4 +- src/transfers/model_transfer.go | 40 +- src/transfers/model_transfer_info.go | 2 +- .../model_ultimate_party_identification.go | 4 +- ..._bank_account_v3_account_identification.go | 30 + .../model_nz_local_account_identification.go | 212 ++ .../model_party_identification.go | 4 +- src/transferwebhook/model_transfer_data.go | 1438 +++++++++ src/transferwebhook/model_transfer_event.go | 2 +- .../model_transfer_notification_request.go | 12 +- 154 files changed, 18974 insertions(+), 819 deletions(-) create mode 100644 src/checkout/model_checkout_delegated_authentication_action.go create mode 100644 src/checkout/model_checkout_donation_payment_request.go create mode 100644 src/checkout/model_checkout_donation_payment_request_payment_method.go create mode 100644 src/checkout/model_checkout_payment_request.go create mode 100644 src/checkout/model_session_result_response.go create mode 100644 src/checkout/model_sub_merchant_2.go create mode 100644 src/checkout/model_three_ds2_request_data_2.go create mode 100644 src/legalentity/model_calculate_terms_of_service_status_response.go create mode 100644 src/legalentity/model_document_page.go create mode 100644 src/legalentity/model_sg_local_account_identification.go create mode 100644 src/legalentity/model_verification_deadline.go create mode 100644 src/management/api_split_configuration_merchant_level.go create mode 100644 src/management/model_additional_commission.go create mode 100644 src/management/model_afterpay_touch_info.go create mode 100644 src/management/model_clearpay_info.go create mode 100644 src/management/model_commission.go create mode 100644 src/management/model_invalid_field_wrapper.go create mode 100644 src/management/model_json_path_wrapper.go create mode 100644 src/management/model_notification.go create mode 100644 src/management/model_payment_method_wrapper.go create mode 100644 src/management/model_split_configuration.go create mode 100644 src/management/model_split_configuration_list.go create mode 100644 src/management/model_split_configuration_logic.go create mode 100644 src/management/model_split_configuration_rule.go create mode 100644 src/management/model_twint_info.go create mode 100644 src/management/model_update_split_configuration_logic_request.go create mode 100644 src/management/model_update_split_configuration_request.go create mode 100644 src/management/model_update_split_configuration_rule_request.go create mode 100644 src/transfers/api_capital.go create mode 100644 src/transfers/model_capital_balance.go create mode 100644 src/transfers/model_capital_grant.go create mode 100644 src/transfers/model_capital_grant_info.go create mode 100644 src/transfers/model_capital_grants.go create mode 100644 src/transfers/model_counterparty_2.go create mode 100644 src/transfers/model_fee.go create mode 100644 src/transfers/model_nz_local_account_identification.go create mode 100644 src/transfers/model_repayment.go create mode 100644 src/transfers/model_repayment_term.go create mode 100644 src/transfers/model_threshold_repayment.go create mode 100644 src/transferwebhook/model_nz_local_account_identification.go create mode 100644 src/transferwebhook/model_transfer_data.go diff --git a/src/checkout/api_payments.go b/src/checkout/api_payments.go index df2cc88c3..22f058def 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/v7/src/common" ) @@ -82,8 +83,8 @@ func (a *PaymentsApi) CardDetails(ctx context.Context, r PaymentsApiCardDetailsI // All parameters accepted by PaymentsApi.Donations type PaymentsApiDonationsInput struct { - idempotencyKey *string - paymentDonationRequest *PaymentDonationRequest + idempotencyKey *string + checkoutDonationPaymentRequest *CheckoutDonationPaymentRequest } // 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) CheckoutDonationPaymentRequest(checkoutDonationPaymentRequest CheckoutDonationPaymentRequest) PaymentsApiDonationsInput { + r.checkoutDonationPaymentRequest = &checkoutDonationPaymentRequest return r } @@ -128,7 +129,7 @@ func (a *PaymentsApi) Donations(ctx context.Context, r PaymentsApiDonationsInput httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.paymentDonationRequest, + r.checkoutDonationPaymentRequest, 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 @@ -200,8 +256,8 @@ func (a *PaymentsApi) PaymentMethods(ctx context.Context, r PaymentsApiPaymentMe // All parameters accepted by PaymentsApi.Payments type PaymentsApiPaymentsInput struct { - idempotencyKey *string - paymentRequest *PaymentRequest + idempotencyKey *string + checkoutPaymentRequest *CheckoutPaymentRequest } // A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). @@ -210,8 +266,8 @@ func (r PaymentsApiPaymentsInput) IdempotencyKey(idempotencyKey string) Payments return r } -func (r PaymentsApiPaymentsInput) PaymentRequest(paymentRequest PaymentRequest) PaymentsApiPaymentsInput { - r.paymentRequest = &paymentRequest +func (r PaymentsApiPaymentsInput) CheckoutPaymentRequest(checkoutPaymentRequest CheckoutPaymentRequest) PaymentsApiPaymentsInput { + r.checkoutPaymentRequest = &checkoutPaymentRequest return r } @@ -247,7 +303,7 @@ func (a *PaymentsApi) Payments(ctx context.Context, r PaymentsApiPaymentsInput) httpRes, err := common.SendAPIRequest( ctx, a.Client, - r.paymentRequest, + r.checkoutPaymentRequest, res, http.MethodPost, a.BasePath()+path, diff --git a/src/checkout/api_recurring.go b/src/checkout/api_recurring.go index 2245a3e74..1717f1840 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, } } @@ -61,8 +61,8 @@ Deletes the token identified in the path. The token can no longer be used with p */ 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) + 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 { diff --git a/src/checkout/model_additional_data_car_rental.go b/src/checkout/model_additional_data_car_rental.go index 0cc091848..a81a2f6b1 100644 --- a/src/checkout/model_additional_data_car_rental.go +++ b/src/checkout/model_additional_data_car_rental.go @@ -23,7 +23,7 @@ type AdditionalDataCarRental struct { 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 - 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"` @@ -61,7 +61,7 @@ type AdditionalDataCarRental struct { 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 ffb4b270c..b4d3d56f9 100644 --- a/src/checkout/model_additional_data_level23.go +++ b/src/checkout/model_additional_data_level23.go @@ -19,7 +19,7 @@ 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 EnhancedSchemeDataDestinationCountryCode *string `json:"enhancedSchemeData.destinationCountryCode,omitempty"` diff --git a/src/checkout/model_additional_data_lodging.go b/src/checkout/model_additional_data_lodging.go index 25199929c..2aeca268e 100644 --- a/src/checkout/model_additional_data_lodging.go +++ b/src/checkout/model_additional_data_lodging.go @@ -39,7 +39,7 @@ type AdditionalDataLodging struct { 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 - 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_checkout_balance_check_request.go b/src/checkout/model_checkout_balance_check_request.go index 3841354c8..dea018f75 100644 --- a/src/checkout/model_checkout_balance_check_request.go +++ b/src/checkout/model_checkout_balance_check_request.go @@ -24,7 +24,7 @@ type CheckoutBalanceCheckRequest struct { 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"` + Amount Amount `json:"amount"` ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` BillingAddress *Address `json:"billingAddress,omitempty"` BrowserInfo *BrowserInfo `json:"browserInfo,omitempty"` @@ -84,7 +84,7 @@ type CheckoutBalanceCheckRequest 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"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` @@ -102,8 +102,9 @@ type CheckoutBalanceCheckRequest 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 NewCheckoutBalanceCheckRequest(merchantAccount string, paymentMethod map[string]string) *CheckoutBalanceCheckRequest { +func NewCheckoutBalanceCheckRequest(amount Amount, merchantAccount string, paymentMethod map[string]string) *CheckoutBalanceCheckRequest { this := CheckoutBalanceCheckRequest{} + this.Amount = amount this.MerchantAccount = merchantAccount this.PaymentMethod = paymentMethod var threeDSAuthenticationOnly bool = false @@ -217,36 +218,28 @@ func (o *CheckoutBalanceCheckRequest) SetAdditionalData(v map[string]string) { o.AdditionalData = &v } -// GetAmount returns the Amount field value if set, zero value otherwise. +// GetAmount returns the Amount field value func (o *CheckoutBalanceCheckRequest) GetAmount() Amount { - if o == nil || common.IsNil(o.Amount) { + if o == nil { var ret Amount return ret } - return *o.Amount + + return o.Amount } -// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise +// GetAmountOk returns a tuple with the Amount field value // and a boolean to check if the value has been set. func (o *CheckoutBalanceCheckRequest) GetAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.Amount) { + if o == nil { 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 + return &o.Amount, true } -// SetAmount gets a reference to the given Amount and assigns it to the Amount field. +// SetAmount sets field value func (o *CheckoutBalanceCheckRequest) SetAmount(v Amount) { - o.Amount = &v + o.Amount = v } // GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. @@ -1535,9 +1528,7 @@ func (o CheckoutBalanceCheckRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AdditionalData) { toSerialize["additionalData"] = o.AdditionalData } - if !common.IsNil(o.Amount) { - toSerialize["amount"] = o.Amount - } + toSerialize["amount"] = o.Amount if !common.IsNil(o.ApplicationInfo) { toSerialize["applicationInfo"] = o.ApplicationInfo } diff --git a/src/checkout/model_checkout_delegated_authentication_action.go b/src/checkout/model_checkout_delegated_authentication_action.go new file mode 100644 index 000000000..26202281c --- /dev/null +++ b/src/checkout/model_checkout_delegated_authentication_action.go @@ -0,0 +1,311 @@ +/* +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/v7/src/common" +) + +// checks if the CheckoutDelegatedAuthenticationAction type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CheckoutDelegatedAuthenticationAction{} + +// CheckoutDelegatedAuthenticationAction struct for CheckoutDelegatedAuthenticationAction +type CheckoutDelegatedAuthenticationAction struct { + // A token needed to authorise a payment. + AuthorisationToken *string `json:"authorisationToken,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. + PaymentMethodType *string `json:"paymentMethodType,omitempty"` + // A token to pass to the delegatedAuthentication component. + Token *string `json:"token,omitempty"` + // **delegatedAuthentication** + Type string `json:"type"` + // Specifies the URL to redirect to. + Url *string `json:"url,omitempty"` +} + +// NewCheckoutDelegatedAuthenticationAction instantiates a new CheckoutDelegatedAuthenticationAction 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 NewCheckoutDelegatedAuthenticationAction(type_ string) *CheckoutDelegatedAuthenticationAction { + this := CheckoutDelegatedAuthenticationAction{} + this.Type = type_ + return &this +} + +// NewCheckoutDelegatedAuthenticationActionWithDefaults instantiates a new CheckoutDelegatedAuthenticationAction 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 NewCheckoutDelegatedAuthenticationActionWithDefaults() *CheckoutDelegatedAuthenticationAction { + this := CheckoutDelegatedAuthenticationAction{} + return &this +} + +// GetAuthorisationToken returns the AuthorisationToken field value if set, zero value otherwise. +func (o *CheckoutDelegatedAuthenticationAction) GetAuthorisationToken() string { + if o == nil || common.IsNil(o.AuthorisationToken) { + var ret string + return ret + } + return *o.AuthorisationToken +} + +// GetAuthorisationTokenOk returns a tuple with the AuthorisationToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckoutDelegatedAuthenticationAction) GetAuthorisationTokenOk() (*string, bool) { + if o == nil || common.IsNil(o.AuthorisationToken) { + return nil, false + } + return o.AuthorisationToken, true +} + +// HasAuthorisationToken returns a boolean if a field has been set. +func (o *CheckoutDelegatedAuthenticationAction) HasAuthorisationToken() bool { + if o != nil && !common.IsNil(o.AuthorisationToken) { + return true + } + + return false +} + +// SetAuthorisationToken gets a reference to the given string and assigns it to the AuthorisationToken field. +func (o *CheckoutDelegatedAuthenticationAction) SetAuthorisationToken(v string) { + o.AuthorisationToken = &v +} + +// GetPaymentData returns the PaymentData field value if set, zero value otherwise. +func (o *CheckoutDelegatedAuthenticationAction) 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 *CheckoutDelegatedAuthenticationAction) 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 *CheckoutDelegatedAuthenticationAction) 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 *CheckoutDelegatedAuthenticationAction) SetPaymentData(v string) { + o.PaymentData = &v +} + +// GetPaymentMethodType returns the PaymentMethodType field value if set, zero value otherwise. +func (o *CheckoutDelegatedAuthenticationAction) GetPaymentMethodType() string { + if o == nil || common.IsNil(o.PaymentMethodType) { + var ret string + return ret + } + return *o.PaymentMethodType +} + +// GetPaymentMethodTypeOk returns a tuple with the PaymentMethodType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckoutDelegatedAuthenticationAction) GetPaymentMethodTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.PaymentMethodType) { + return nil, false + } + return o.PaymentMethodType, true +} + +// HasPaymentMethodType returns a boolean if a field has been set. +func (o *CheckoutDelegatedAuthenticationAction) HasPaymentMethodType() bool { + if o != nil && !common.IsNil(o.PaymentMethodType) { + return true + } + + return false +} + +// SetPaymentMethodType gets a reference to the given string and assigns it to the PaymentMethodType field. +func (o *CheckoutDelegatedAuthenticationAction) SetPaymentMethodType(v string) { + o.PaymentMethodType = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *CheckoutDelegatedAuthenticationAction) GetToken() string { + if o == nil || common.IsNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// GetTokenOk returns a tuple with the Token field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckoutDelegatedAuthenticationAction) GetTokenOk() (*string, bool) { + if o == nil || common.IsNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *CheckoutDelegatedAuthenticationAction) HasToken() bool { + if o != nil && !common.IsNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *CheckoutDelegatedAuthenticationAction) SetToken(v string) { + o.Token = &v +} + +// GetType returns the Type field value +func (o *CheckoutDelegatedAuthenticationAction) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CheckoutDelegatedAuthenticationAction) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CheckoutDelegatedAuthenticationAction) SetType(v string) { + o.Type = v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *CheckoutDelegatedAuthenticationAction) GetUrl() string { + if o == nil || common.IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckoutDelegatedAuthenticationAction) GetUrlOk() (*string, bool) { + if o == nil || common.IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *CheckoutDelegatedAuthenticationAction) HasUrl() bool { + if o != nil && !common.IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *CheckoutDelegatedAuthenticationAction) SetUrl(v string) { + o.Url = &v +} + +func (o CheckoutDelegatedAuthenticationAction) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CheckoutDelegatedAuthenticationAction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AuthorisationToken) { + toSerialize["authorisationToken"] = o.AuthorisationToken + } + if !common.IsNil(o.PaymentData) { + toSerialize["paymentData"] = o.PaymentData + } + if !common.IsNil(o.PaymentMethodType) { + toSerialize["paymentMethodType"] = o.PaymentMethodType + } + if !common.IsNil(o.Token) { + toSerialize["token"] = o.Token + } + toSerialize["type"] = o.Type + if !common.IsNil(o.Url) { + toSerialize["url"] = o.Url + } + return toSerialize, nil +} + +type NullableCheckoutDelegatedAuthenticationAction struct { + value *CheckoutDelegatedAuthenticationAction + isSet bool +} + +func (v NullableCheckoutDelegatedAuthenticationAction) Get() *CheckoutDelegatedAuthenticationAction { + return v.value +} + +func (v *NullableCheckoutDelegatedAuthenticationAction) Set(val *CheckoutDelegatedAuthenticationAction) { + v.value = val + v.isSet = true +} + +func (v NullableCheckoutDelegatedAuthenticationAction) IsSet() bool { + return v.isSet +} + +func (v *NullableCheckoutDelegatedAuthenticationAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCheckoutDelegatedAuthenticationAction(val *CheckoutDelegatedAuthenticationAction) *NullableCheckoutDelegatedAuthenticationAction { + return &NullableCheckoutDelegatedAuthenticationAction{value: val, isSet: true} +} + +func (v NullableCheckoutDelegatedAuthenticationAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCheckoutDelegatedAuthenticationAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *CheckoutDelegatedAuthenticationAction) isValidType() bool { + var allowedEnumValues = []string{"delegatedAuthentication"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_checkout_donation_payment_request.go b/src/checkout/model_checkout_donation_payment_request.go new file mode 100644 index 000000000..1badb4bb5 --- /dev/null +++ b/src/checkout/model_checkout_donation_payment_request.go @@ -0,0 +1,2665 @@ +/* +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/v7/src/common" +) + +// checks if the CheckoutDonationPaymentRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CheckoutDonationPaymentRequest{} + +// CheckoutDonationPaymentRequest struct for CheckoutDonationPaymentRequest +type CheckoutDonationPaymentRequest 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 *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"` + // 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"` + // 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"` + 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 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. + 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 CheckoutDonationPaymentRequestPaymentMethod `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 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 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 *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"` + // Set to true if the payment should be routed to a trusted MID. + TrustedShopper *bool `json:"trustedShopper,omitempty"` +} + +// NewCheckoutDonationPaymentRequest instantiates a new CheckoutDonationPaymentRequest 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 NewCheckoutDonationPaymentRequest(amount Amount, donationAccount string, merchantAccount string, paymentMethod CheckoutDonationPaymentRequestPaymentMethod, reference string, returnUrl string) *CheckoutDonationPaymentRequest { + this := CheckoutDonationPaymentRequest{} + 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 +} + +// NewCheckoutDonationPaymentRequestWithDefaults instantiates a new CheckoutDonationPaymentRequest 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 NewCheckoutDonationPaymentRequestWithDefaults() *CheckoutDonationPaymentRequest { + this := CheckoutDonationPaymentRequest{} + var threeDSAuthenticationOnly bool = false + this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly + return &this +} + +// GetAccountInfo returns the AccountInfo field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetAccountInfo(v AccountInfo) { + o.AccountInfo = &v +} + +// GetAdditionalAmount returns the AdditionalAmount field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetAdditionalAmount(v Amount) { + o.AdditionalAmount = &v +} + +// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetAdditionalData(v map[string]string) { + o.AdditionalData = &v +} + +// GetAmount returns the Amount field value +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *CheckoutDonationPaymentRequest) SetAmount(v Amount) { + o.Amount = v +} + +// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetApplicationInfo(v ApplicationInfo) { + o.ApplicationInfo = &v +} + +// GetAuthenticationData returns the AuthenticationData field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetAuthenticationData(v AuthenticationData) { + o.AuthenticationData = &v +} + +// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetBillingAddress(v Address) { + o.BillingAddress = &v +} + +// GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetBrowserInfo(v BrowserInfo) { + o.BrowserInfo = &v +} + +// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetCaptureDelayHours(v int32) { + o.CaptureDelayHours = &v +} + +// GetChannel returns the Channel field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetChannel(v string) { + o.Channel = &v +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetCompany(v Company) { + o.Company = &v +} + +// GetConversionId returns the ConversionId field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetConversionId(v string) { + o.ConversionId = &v +} + +// GetCountryCode returns the CountryCode field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetCountryCode(v string) { + o.CountryCode = &v +} + +// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) GetDateOfBirth() time.Time { + if o == nil || common.IsNil(o.DateOfBirth) { + var ret time.Time + 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 *CheckoutDonationPaymentRequest) GetDateOfBirthOk() (*time.Time, 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 *CheckoutDonationPaymentRequest) HasDateOfBirth() bool { + if o != nil && !common.IsNil(o.DateOfBirth) { + return true + } + + return false +} + +// SetDateOfBirth gets a reference to the given time.Time and assigns it to the DateOfBirth field. +func (o *CheckoutDonationPaymentRequest) SetDateOfBirth(v time.Time) { + o.DateOfBirth = &v +} + +// GetDccQuote returns the DccQuote field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDccQuote(v ForexQuote) { + o.DccQuote = &v +} + +// GetDeliverAt returns the DeliverAt field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDeliverAt(v time.Time) { + o.DeliverAt = &v +} + +// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDeliveryAddress(v Address) { + o.DeliveryAddress = &v +} + +// GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutDonationPaymentRequest) 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. +// Deprecated +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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. +// Deprecated +func (o *CheckoutDonationPaymentRequest) SetDeliveryDate(v time.Time) { + o.DeliveryDate = &v +} + +// GetDeviceFingerprint returns the DeviceFingerprint field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDeviceFingerprint(v string) { + o.DeviceFingerprint = &v +} + +// GetDonationAccount returns the DonationAccount field value +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) GetDonationAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DonationAccount, true +} + +// SetDonationAccount sets field value +func (o *CheckoutDonationPaymentRequest) SetDonationAccount(v string) { + o.DonationAccount = v +} + +// GetDonationOriginalPspReference returns the DonationOriginalPspReference field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDonationOriginalPspReference(v string) { + o.DonationOriginalPspReference = &v +} + +// GetDonationToken returns the DonationToken field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetDonationToken(v string) { + o.DonationToken = &v +} + +// GetEnableOneClick returns the EnableOneClick field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetEnableOneClick(v bool) { + o.EnableOneClick = &v +} + +// GetEnablePayOut returns the EnablePayOut field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetEnablePayOut(v bool) { + o.EnablePayOut = &v +} + +// GetEnableRecurring returns the EnableRecurring field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetEnableRecurring(v bool) { + o.EnableRecurring = &v +} + +// GetEntityType returns the EntityType field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetEntityType(v string) { + o.EntityType = &v +} + +// GetFraudOffset returns the FraudOffset field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetFraudOffset(v int32) { + o.FraudOffset = &v +} + +// GetFundOrigin returns the FundOrigin field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetFundOrigin(v FundOrigin) { + o.FundOrigin = &v +} + +// GetFundRecipient returns the FundRecipient field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetFundRecipient(v FundRecipient) { + o.FundRecipient = &v +} + +// GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetIndustryUsage(v string) { + o.IndustryUsage = &v +} + +// GetInstallments returns the Installments field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetInstallments(v Installments) { + o.Installments = &v +} + +// GetLineItems returns the LineItems field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetLineItems(v []LineItem) { + o.LineItems = v +} + +// GetLocalizedShopperStatement returns the LocalizedShopperStatement field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetLocalizedShopperStatement(v map[string]string) { + o.LocalizedShopperStatement = &v +} + +// GetMandate returns the Mandate field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMandate(v Mandate) { + o.Mandate = &v +} + +// GetMcc returns the Mcc field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMcc(v string) { + o.Mcc = &v +} + +// GetMerchantAccount returns the MerchantAccount field value +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) GetMerchantAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MerchantAccount, true +} + +// SetMerchantAccount sets field value +func (o *CheckoutDonationPaymentRequest) SetMerchantAccount(v string) { + o.MerchantAccount = v +} + +// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMerchantOrderReference(v string) { + o.MerchantOrderReference = &v +} + +// GetMerchantRiskIndicator returns the MerchantRiskIndicator field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMerchantRiskIndicator(v MerchantRiskIndicator) { + o.MerchantRiskIndicator = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMetadata(v map[string]string) { + o.Metadata = &v +} + +// GetMpiData returns the MpiData field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetMpiData(v ThreeDSecureData) { + o.MpiData = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetOrder(v EncryptedOrderData) { + o.Order = &v +} + +// GetOrderReference returns the OrderReference field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetOrderReference(v string) { + o.OrderReference = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetOrigin(v string) { + o.Origin = &v +} + +// GetPaymentMethod returns the PaymentMethod field value +func (o *CheckoutDonationPaymentRequest) GetPaymentMethod() CheckoutDonationPaymentRequestPaymentMethod { + if o == nil { + var ret CheckoutDonationPaymentRequestPaymentMethod + 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 *CheckoutDonationPaymentRequest) GetPaymentMethodOk() (*CheckoutDonationPaymentRequestPaymentMethod, bool) { + if o == nil { + return nil, false + } + return &o.PaymentMethod, true +} + +// SetPaymentMethod sets field value +func (o *CheckoutDonationPaymentRequest) SetPaymentMethod(v CheckoutDonationPaymentRequestPaymentMethod) { + o.PaymentMethod = v +} + +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + +// GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRecurringExpiry(v string) { + o.RecurringExpiry = &v +} + +// GetRecurringFrequency returns the RecurringFrequency field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRecurringFrequency(v string) { + o.RecurringFrequency = &v +} + +// GetRecurringProcessingModel returns the RecurringProcessingModel field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRecurringProcessingModel(v string) { + o.RecurringProcessingModel = &v +} + +// GetRedirectFromIssuerMethod returns the RedirectFromIssuerMethod field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRedirectFromIssuerMethod(v string) { + o.RedirectFromIssuerMethod = &v +} + +// GetRedirectToIssuerMethod returns the RedirectToIssuerMethod field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRedirectToIssuerMethod(v string) { + o.RedirectToIssuerMethod = &v +} + +// GetReference returns the Reference field value +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) GetReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reference, true +} + +// SetReference sets field value +func (o *CheckoutDonationPaymentRequest) SetReference(v string) { + o.Reference = v +} + +// GetReturnUrl returns the ReturnUrl field value +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) GetReturnUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReturnUrl, true +} + +// SetReturnUrl sets field value +func (o *CheckoutDonationPaymentRequest) SetReturnUrl(v string) { + o.ReturnUrl = v +} + +// GetRiskData returns the RiskData field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetRiskData(v RiskData) { + o.RiskData = &v +} + +// GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetSessionValidity(v string) { + o.SessionValidity = &v +} + +// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperEmail(v string) { + o.ShopperEmail = &v +} + +// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperIP(v string) { + o.ShopperIP = &v +} + +// GetShopperInteraction returns the ShopperInteraction field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperInteraction(v string) { + o.ShopperInteraction = &v +} + +// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperLocale(v string) { + o.ShopperLocale = &v +} + +// GetShopperName returns the ShopperName field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperName(v Name) { + o.ShopperName = &v +} + +// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperReference(v string) { + o.ShopperReference = &v +} + +// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetShopperStatement(v string) { + o.ShopperStatement = &v +} + +// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetSocialSecurityNumber(v string) { + o.SocialSecurityNumber = &v +} + +// GetSplits returns the Splits field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetSplits(v []Split) { + o.Splits = v +} + +// GetStore returns the Store field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetStore(v string) { + o.Store = &v +} + +// GetStorePaymentMethod returns the StorePaymentMethod field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetStorePaymentMethod(v bool) { + o.StorePaymentMethod = &v +} + +// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetTelephoneNumber(v string) { + o.TelephoneNumber = &v +} + +// GetThreeDS2RequestData returns the ThreeDS2RequestData field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) GetThreeDS2RequestData() ThreeDS2RequestData2 { + if o == nil || common.IsNil(o.ThreeDS2RequestData) { + var ret ThreeDS2RequestData2 + 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 *CheckoutDonationPaymentRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData2, 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 *CheckoutDonationPaymentRequest) HasThreeDS2RequestData() bool { + if o != nil && !common.IsNil(o.ThreeDS2RequestData) { + return true + } + + return false +} + +// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData2 and assigns it to the ThreeDS2RequestData field. +func (o *CheckoutDonationPaymentRequest) SetThreeDS2RequestData(v ThreeDS2RequestData2) { + o.ThreeDS2RequestData = &v +} + +// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetThreeDSAuthenticationOnly(v bool) { + o.ThreeDSAuthenticationOnly = &v +} + +// GetTrustedShopper returns the TrustedShopper field value if set, zero value otherwise. +func (o *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) 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 *CheckoutDonationPaymentRequest) SetTrustedShopper(v bool) { + o.TrustedShopper = &v +} + +func (o CheckoutDonationPaymentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CheckoutDonationPaymentRequest) 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.DeliverAt) { + toSerialize["deliverAt"] = o.DeliverAt + } + 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.FundOrigin) { + toSerialize["fundOrigin"] = o.FundOrigin + } + if !common.IsNil(o.FundRecipient) { + toSerialize["fundRecipient"] = o.FundRecipient + } + 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 NullableCheckoutDonationPaymentRequest struct { + value *CheckoutDonationPaymentRequest + isSet bool +} + +func (v NullableCheckoutDonationPaymentRequest) Get() *CheckoutDonationPaymentRequest { + return v.value +} + +func (v *NullableCheckoutDonationPaymentRequest) Set(val *CheckoutDonationPaymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCheckoutDonationPaymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCheckoutDonationPaymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCheckoutDonationPaymentRequest(val *CheckoutDonationPaymentRequest) *NullableCheckoutDonationPaymentRequest { + return &NullableCheckoutDonationPaymentRequest{value: val, isSet: true} +} + +func (v NullableCheckoutDonationPaymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCheckoutDonationPaymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *CheckoutDonationPaymentRequest) isValidChannel() bool { + var allowedEnumValues = []string{"iOS", "Android", "Web"} + for _, allowed := range allowedEnumValues { + if o.GetChannel() == allowed { + return true + } + } + return false +} +func (o *CheckoutDonationPaymentRequest) isValidEntityType() bool { + var allowedEnumValues = []string{"NaturalPerson", "CompanyName"} + for _, allowed := range allowedEnumValues { + if o.GetEntityType() == allowed { + return true + } + } + return false +} +func (o *CheckoutDonationPaymentRequest) isValidIndustryUsage() bool { + var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} + for _, allowed := range allowedEnumValues { + if o.GetIndustryUsage() == allowed { + return true + } + } + return false +} +func (o *CheckoutDonationPaymentRequest) isValidRecurringProcessingModel() bool { + var allowedEnumValues = []string{"CardOnFile", "Subscription", "UnscheduledCardOnFile"} + for _, allowed := range allowedEnumValues { + if o.GetRecurringProcessingModel() == allowed { + return true + } + } + return false +} +func (o *CheckoutDonationPaymentRequest) 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_donation_payment_request_payment_method.go b/src/checkout/model_checkout_donation_payment_request_payment_method.go new file mode 100644 index 000000000..5b7ba336e --- /dev/null +++ b/src/checkout/model_checkout_donation_payment_request_payment_method.go @@ -0,0 +1,1253 @@ +/* +Adyen Checkout API + +API version: 70 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + "fmt" +) + +// CheckoutDonationPaymentRequestPaymentMethod - The type and required details of a payment method to use. +type CheckoutDonationPaymentRequestPaymentMethod 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 +} + +// AchDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns AchDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func AchDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *AchDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + AchDetails: v, + } +} + +// AfterpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns AfterpayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func AfterpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *AfterpayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + AfterpayDetails: v, + } +} + +// AmazonPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns AmazonPayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func AmazonPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *AmazonPayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + AmazonPayDetails: v, + } +} + +// AndroidPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns AndroidPayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func AndroidPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *AndroidPayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + AndroidPayDetails: v, + } +} + +// ApplePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns ApplePayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func ApplePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *ApplePayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + ApplePayDetails: v, + } +} + +// BacsDirectDebitDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns BacsDirectDebitDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func BacsDirectDebitDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *BacsDirectDebitDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + BacsDirectDebitDetails: v, + } +} + +// BillDeskDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns BillDeskDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func BillDeskDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *BillDeskDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + BillDeskDetails: v, + } +} + +// BlikDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns BlikDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func BlikDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *BlikDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + BlikDetails: v, + } +} + +// CardDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns CardDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func CardDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *CardDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + CardDetails: v, + } +} + +// CellulantDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns CellulantDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func CellulantDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *CellulantDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + CellulantDetails: v, + } +} + +// DokuDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns DokuDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func DokuDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *DokuDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + DokuDetails: v, + } +} + +// DotpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns DotpayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func DotpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *DotpayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + DotpayDetails: v, + } +} + +// DragonpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns DragonpayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func DragonpayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *DragonpayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + DragonpayDetails: v, + } +} + +// EcontextVoucherDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns EcontextVoucherDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func EcontextVoucherDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *EcontextVoucherDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + EcontextVoucherDetails: v, + } +} + +// GenericIssuerPaymentMethodDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns GenericIssuerPaymentMethodDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func GenericIssuerPaymentMethodDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *GenericIssuerPaymentMethodDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + GenericIssuerPaymentMethodDetails: v, + } +} + +// GiropayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns GiropayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func GiropayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *GiropayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + GiropayDetails: v, + } +} + +// GooglePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns GooglePayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func GooglePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *GooglePayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + GooglePayDetails: v, + } +} + +// IdealDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns IdealDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func IdealDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *IdealDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + IdealDetails: v, + } +} + +// KlarnaDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns KlarnaDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func KlarnaDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *KlarnaDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + KlarnaDetails: v, + } +} + +// MasterpassDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns MasterpassDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func MasterpassDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *MasterpassDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + MasterpassDetails: v, + } +} + +// MbwayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns MbwayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func MbwayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *MbwayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + MbwayDetails: v, + } +} + +// MobilePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns MobilePayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func MobilePayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *MobilePayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + MobilePayDetails: v, + } +} + +// MolPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns MolPayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func MolPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *MolPayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + MolPayDetails: v, + } +} + +// OpenInvoiceDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns OpenInvoiceDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func OpenInvoiceDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *OpenInvoiceDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + OpenInvoiceDetails: v, + } +} + +// PayPalDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns PayPalDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func PayPalDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *PayPalDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + PayPalDetails: v, + } +} + +// PayUUpiDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns PayUUpiDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func PayUUpiDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *PayUUpiDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + PayUUpiDetails: v, + } +} + +// PayWithGoogleDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns PayWithGoogleDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func PayWithGoogleDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *PayWithGoogleDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + PayWithGoogleDetails: v, + } +} + +// PaymentDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns PaymentDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func PaymentDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *PaymentDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + PaymentDetails: v, + } +} + +// RatepayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns RatepayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func RatepayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *RatepayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + RatepayDetails: v, + } +} + +// SamsungPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns SamsungPayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func SamsungPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *SamsungPayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + SamsungPayDetails: v, + } +} + +// SepaDirectDebitDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns SepaDirectDebitDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func SepaDirectDebitDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *SepaDirectDebitDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + SepaDirectDebitDetails: v, + } +} + +// StoredPaymentMethodDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns StoredPaymentMethodDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func StoredPaymentMethodDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *StoredPaymentMethodDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + StoredPaymentMethodDetails: v, + } +} + +// UpiCollectDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns UpiCollectDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func UpiCollectDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *UpiCollectDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + UpiCollectDetails: v, + } +} + +// UpiIntentDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns UpiIntentDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func UpiIntentDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *UpiIntentDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + UpiIntentDetails: v, + } +} + +// VippsDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns VippsDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func VippsDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *VippsDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + VippsDetails: v, + } +} + +// VisaCheckoutDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns VisaCheckoutDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func VisaCheckoutDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *VisaCheckoutDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + VisaCheckoutDetails: v, + } +} + +// WeChatPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns WeChatPayDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func WeChatPayDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *WeChatPayDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + WeChatPayDetails: v, + } +} + +// WeChatPayMiniProgramDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns WeChatPayMiniProgramDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func WeChatPayMiniProgramDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *WeChatPayMiniProgramDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + WeChatPayMiniProgramDetails: v, + } +} + +// ZipDetailsAsCheckoutDonationPaymentRequestPaymentMethod is a convenience function that returns ZipDetails wrapped in CheckoutDonationPaymentRequestPaymentMethod +func ZipDetailsAsCheckoutDonationPaymentRequestPaymentMethod(v *ZipDetails) CheckoutDonationPaymentRequestPaymentMethod { + return CheckoutDonationPaymentRequestPaymentMethod{ + ZipDetails: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CheckoutDonationPaymentRequestPaymentMethod) 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(CheckoutDonationPaymentRequestPaymentMethod)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CheckoutDonationPaymentRequestPaymentMethod)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CheckoutDonationPaymentRequestPaymentMethod) 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 *CheckoutDonationPaymentRequestPaymentMethod) 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 NullableCheckoutDonationPaymentRequestPaymentMethod struct { + value *CheckoutDonationPaymentRequestPaymentMethod + isSet bool +} + +func (v NullableCheckoutDonationPaymentRequestPaymentMethod) Get() *CheckoutDonationPaymentRequestPaymentMethod { + return v.value +} + +func (v *NullableCheckoutDonationPaymentRequestPaymentMethod) Set(val *CheckoutDonationPaymentRequestPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableCheckoutDonationPaymentRequestPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableCheckoutDonationPaymentRequestPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCheckoutDonationPaymentRequestPaymentMethod(val *CheckoutDonationPaymentRequestPaymentMethod) *NullableCheckoutDonationPaymentRequestPaymentMethod { + return &NullableCheckoutDonationPaymentRequestPaymentMethod{value: val, isSet: true} +} + +func (v NullableCheckoutDonationPaymentRequestPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCheckoutDonationPaymentRequestPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_checkout_payment_request.go b/src/checkout/model_checkout_payment_request.go new file mode 100644 index 000000000..ecd92828b --- /dev/null +++ b/src/checkout/model_checkout_payment_request.go @@ -0,0 +1,2563 @@ +/* +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/v7/src/common" +) + +// checks if the CheckoutPaymentRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CheckoutPaymentRequest{} + +// CheckoutPaymentRequest struct for CheckoutPaymentRequest +type CheckoutPaymentRequest 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 *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"` + // 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"` + // 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"` + 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 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. + 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 CheckoutDonationPaymentRequestPaymentMethod `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 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 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 *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"` + // Set to true if the payment should be routed to a trusted MID. + TrustedShopper *bool `json:"trustedShopper,omitempty"` +} + +// NewCheckoutPaymentRequest instantiates a new CheckoutPaymentRequest 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 NewCheckoutPaymentRequest(amount Amount, merchantAccount string, paymentMethod CheckoutDonationPaymentRequestPaymentMethod, reference string, returnUrl string) *CheckoutPaymentRequest { + this := CheckoutPaymentRequest{} + this.Amount = amount + this.MerchantAccount = merchantAccount + this.PaymentMethod = paymentMethod + this.Reference = reference + this.ReturnUrl = returnUrl + var threeDSAuthenticationOnly bool = false + this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly + return &this +} + +// NewCheckoutPaymentRequestWithDefaults instantiates a new CheckoutPaymentRequest 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 NewCheckoutPaymentRequestWithDefaults() *CheckoutPaymentRequest { + this := CheckoutPaymentRequest{} + var threeDSAuthenticationOnly bool = false + this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly + return &this +} + +// GetAccountInfo returns the AccountInfo field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetAccountInfo(v AccountInfo) { + o.AccountInfo = &v +} + +// GetAdditionalAmount returns the AdditionalAmount field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetAdditionalAmount(v Amount) { + o.AdditionalAmount = &v +} + +// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetAdditionalData(v map[string]string) { + o.AdditionalData = &v +} + +// GetAmount returns the Amount field value +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *CheckoutPaymentRequest) SetAmount(v Amount) { + o.Amount = v +} + +// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetApplicationInfo(v ApplicationInfo) { + o.ApplicationInfo = &v +} + +// GetAuthenticationData returns the AuthenticationData field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetAuthenticationData(v AuthenticationData) { + o.AuthenticationData = &v +} + +// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetBillingAddress(v Address) { + o.BillingAddress = &v +} + +// GetBrowserInfo returns the BrowserInfo field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetBrowserInfo(v BrowserInfo) { + o.BrowserInfo = &v +} + +// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetCaptureDelayHours(v int32) { + o.CaptureDelayHours = &v +} + +// GetChannel returns the Channel field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetChannel(v string) { + o.Channel = &v +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetCompany(v Company) { + o.Company = &v +} + +// GetConversionId returns the ConversionId field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetConversionId(v string) { + o.ConversionId = &v +} + +// GetCountryCode returns the CountryCode field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetCountryCode(v string) { + o.CountryCode = &v +} + +// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) GetDateOfBirth() time.Time { + if o == nil || common.IsNil(o.DateOfBirth) { + var ret time.Time + 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 *CheckoutPaymentRequest) GetDateOfBirthOk() (*time.Time, 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 *CheckoutPaymentRequest) HasDateOfBirth() bool { + if o != nil && !common.IsNil(o.DateOfBirth) { + return true + } + + return false +} + +// SetDateOfBirth gets a reference to the given time.Time and assigns it to the DateOfBirth field. +func (o *CheckoutPaymentRequest) SetDateOfBirth(v time.Time) { + o.DateOfBirth = &v +} + +// GetDccQuote returns the DccQuote field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetDccQuote(v ForexQuote) { + o.DccQuote = &v +} + +// GetDeliverAt returns the DeliverAt field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetDeliverAt(v time.Time) { + o.DeliverAt = &v +} + +// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetDeliveryAddress(v Address) { + o.DeliveryAddress = &v +} + +// GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutPaymentRequest) 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. +// Deprecated +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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. +// Deprecated +func (o *CheckoutPaymentRequest) SetDeliveryDate(v time.Time) { + o.DeliveryDate = &v +} + +// GetDeviceFingerprint returns the DeviceFingerprint field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetDeviceFingerprint(v string) { + o.DeviceFingerprint = &v +} + +// GetEnableOneClick returns the EnableOneClick field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetEnableOneClick(v bool) { + o.EnableOneClick = &v +} + +// GetEnablePayOut returns the EnablePayOut field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetEnablePayOut(v bool) { + o.EnablePayOut = &v +} + +// GetEnableRecurring returns the EnableRecurring field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetEnableRecurring(v bool) { + o.EnableRecurring = &v +} + +// GetEntityType returns the EntityType field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetEntityType(v string) { + o.EntityType = &v +} + +// GetFraudOffset returns the FraudOffset field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetFraudOffset(v int32) { + o.FraudOffset = &v +} + +// GetFundOrigin returns the FundOrigin field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetFundOrigin(v FundOrigin) { + o.FundOrigin = &v +} + +// GetFundRecipient returns the FundRecipient field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetFundRecipient(v FundRecipient) { + o.FundRecipient = &v +} + +// GetIndustryUsage returns the IndustryUsage field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetIndustryUsage(v string) { + o.IndustryUsage = &v +} + +// GetInstallments returns the Installments field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetInstallments(v Installments) { + o.Installments = &v +} + +// GetLineItems returns the LineItems field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetLineItems(v []LineItem) { + o.LineItems = v +} + +// GetLocalizedShopperStatement returns the LocalizedShopperStatement field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetLocalizedShopperStatement(v map[string]string) { + o.LocalizedShopperStatement = &v +} + +// GetMandate returns the Mandate field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMandate(v Mandate) { + o.Mandate = &v +} + +// GetMcc returns the Mcc field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMcc(v string) { + o.Mcc = &v +} + +// GetMerchantAccount returns the MerchantAccount field value +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) GetMerchantAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MerchantAccount, true +} + +// SetMerchantAccount sets field value +func (o *CheckoutPaymentRequest) SetMerchantAccount(v string) { + o.MerchantAccount = v +} + +// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMerchantOrderReference(v string) { + o.MerchantOrderReference = &v +} + +// GetMerchantRiskIndicator returns the MerchantRiskIndicator field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMerchantRiskIndicator(v MerchantRiskIndicator) { + o.MerchantRiskIndicator = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMetadata(v map[string]string) { + o.Metadata = &v +} + +// GetMpiData returns the MpiData field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetMpiData(v ThreeDSecureData) { + o.MpiData = &v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetOrder(v EncryptedOrderData) { + o.Order = &v +} + +// GetOrderReference returns the OrderReference field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetOrderReference(v string) { + o.OrderReference = &v +} + +// GetOrigin returns the Origin field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetOrigin(v string) { + o.Origin = &v +} + +// GetPaymentMethod returns the PaymentMethod field value +func (o *CheckoutPaymentRequest) GetPaymentMethod() CheckoutDonationPaymentRequestPaymentMethod { + if o == nil { + var ret CheckoutDonationPaymentRequestPaymentMethod + 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 *CheckoutPaymentRequest) GetPaymentMethodOk() (*CheckoutDonationPaymentRequestPaymentMethod, bool) { + if o == nil { + return nil, false + } + return &o.PaymentMethod, true +} + +// SetPaymentMethod sets field value +func (o *CheckoutPaymentRequest) SetPaymentMethod(v CheckoutDonationPaymentRequestPaymentMethod) { + o.PaymentMethod = v +} + +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + +// GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRecurringExpiry(v string) { + o.RecurringExpiry = &v +} + +// GetRecurringFrequency returns the RecurringFrequency field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRecurringFrequency(v string) { + o.RecurringFrequency = &v +} + +// GetRecurringProcessingModel returns the RecurringProcessingModel field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRecurringProcessingModel(v string) { + o.RecurringProcessingModel = &v +} + +// GetRedirectFromIssuerMethod returns the RedirectFromIssuerMethod field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRedirectFromIssuerMethod(v string) { + o.RedirectFromIssuerMethod = &v +} + +// GetRedirectToIssuerMethod returns the RedirectToIssuerMethod field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRedirectToIssuerMethod(v string) { + o.RedirectToIssuerMethod = &v +} + +// GetReference returns the Reference field value +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) GetReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reference, true +} + +// SetReference sets field value +func (o *CheckoutPaymentRequest) SetReference(v string) { + o.Reference = v +} + +// GetReturnUrl returns the ReturnUrl field value +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) GetReturnUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ReturnUrl, true +} + +// SetReturnUrl sets field value +func (o *CheckoutPaymentRequest) SetReturnUrl(v string) { + o.ReturnUrl = v +} + +// GetRiskData returns the RiskData field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetRiskData(v RiskData) { + o.RiskData = &v +} + +// GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetSessionValidity(v string) { + o.SessionValidity = &v +} + +// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperEmail(v string) { + o.ShopperEmail = &v +} + +// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperIP(v string) { + o.ShopperIP = &v +} + +// GetShopperInteraction returns the ShopperInteraction field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperInteraction(v string) { + o.ShopperInteraction = &v +} + +// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperLocale(v string) { + o.ShopperLocale = &v +} + +// GetShopperName returns the ShopperName field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperName(v Name) { + o.ShopperName = &v +} + +// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperReference(v string) { + o.ShopperReference = &v +} + +// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetShopperStatement(v string) { + o.ShopperStatement = &v +} + +// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetSocialSecurityNumber(v string) { + o.SocialSecurityNumber = &v +} + +// GetSplits returns the Splits field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetSplits(v []Split) { + o.Splits = v +} + +// GetStore returns the Store field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetStore(v string) { + o.Store = &v +} + +// GetStorePaymentMethod returns the StorePaymentMethod field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetStorePaymentMethod(v bool) { + o.StorePaymentMethod = &v +} + +// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetTelephoneNumber(v string) { + o.TelephoneNumber = &v +} + +// GetThreeDS2RequestData returns the ThreeDS2RequestData field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) GetThreeDS2RequestData() ThreeDS2RequestData2 { + if o == nil || common.IsNil(o.ThreeDS2RequestData) { + var ret ThreeDS2RequestData2 + 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 *CheckoutPaymentRequest) GetThreeDS2RequestDataOk() (*ThreeDS2RequestData2, 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 *CheckoutPaymentRequest) HasThreeDS2RequestData() bool { + if o != nil && !common.IsNil(o.ThreeDS2RequestData) { + return true + } + + return false +} + +// SetThreeDS2RequestData gets a reference to the given ThreeDS2RequestData2 and assigns it to the ThreeDS2RequestData field. +func (o *CheckoutPaymentRequest) SetThreeDS2RequestData(v ThreeDS2RequestData2) { + o.ThreeDS2RequestData = &v +} + +// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. +// Deprecated +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetThreeDSAuthenticationOnly(v bool) { + o.ThreeDSAuthenticationOnly = &v +} + +// GetTrustedShopper returns the TrustedShopper field value if set, zero value otherwise. +func (o *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) 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 *CheckoutPaymentRequest) SetTrustedShopper(v bool) { + o.TrustedShopper = &v +} + +func (o CheckoutPaymentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CheckoutPaymentRequest) 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.DeliverAt) { + toSerialize["deliverAt"] = o.DeliverAt + } + 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.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.FundOrigin) { + toSerialize["fundOrigin"] = o.FundOrigin + } + if !common.IsNil(o.FundRecipient) { + toSerialize["fundRecipient"] = o.FundRecipient + } + 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 NullableCheckoutPaymentRequest struct { + value *CheckoutPaymentRequest + isSet bool +} + +func (v NullableCheckoutPaymentRequest) Get() *CheckoutPaymentRequest { + return v.value +} + +func (v *NullableCheckoutPaymentRequest) Set(val *CheckoutPaymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCheckoutPaymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCheckoutPaymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCheckoutPaymentRequest(val *CheckoutPaymentRequest) *NullableCheckoutPaymentRequest { + return &NullableCheckoutPaymentRequest{value: val, isSet: true} +} + +func (v NullableCheckoutPaymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCheckoutPaymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *CheckoutPaymentRequest) isValidChannel() bool { + var allowedEnumValues = []string{"iOS", "Android", "Web"} + for _, allowed := range allowedEnumValues { + if o.GetChannel() == allowed { + return true + } + } + return false +} +func (o *CheckoutPaymentRequest) isValidEntityType() bool { + var allowedEnumValues = []string{"NaturalPerson", "CompanyName"} + for _, allowed := range allowedEnumValues { + if o.GetEntityType() == allowed { + return true + } + } + return false +} +func (o *CheckoutPaymentRequest) isValidIndustryUsage() bool { + var allowedEnumValues = []string{"delayedCharge", "installment", "noShow"} + for _, allowed := range allowedEnumValues { + if o.GetIndustryUsage() == allowed { + return true + } + } + return false +} +func (o *CheckoutPaymentRequest) isValidRecurringProcessingModel() bool { + var allowedEnumValues = []string{"CardOnFile", "Subscription", "UnscheduledCardOnFile"} + for _, allowed := range allowedEnumValues { + if o.GetRecurringProcessingModel() == allowed { + return true + } + } + return false +} +func (o *CheckoutPaymentRequest) 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_voucher_action.go b/src/checkout/model_checkout_voucher_action.go index 42f41bf4c..04a4b6e5f 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_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index 282f80bb2..e79552b91 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -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"` @@ -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 9912d678e..88c12cbac 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -39,8 +39,8 @@ 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"` @@ -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"` @@ -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 } @@ -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 index c7befc20f..a26ee0cdb 100644 --- a/src/checkout/model_create_payment_amount_update_request.go +++ b/src/checkout/model_create_payment_amount_update_request.go @@ -22,6 +22,8 @@ type CreatePaymentAmountUpdateRequest struct { Amount Amount `json:"amount"` // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** IndustryUsage *string `json:"industryUsage,omitempty"` + // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. + LineItems []LineItem `json:"lineItems,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. @@ -105,6 +107,38 @@ func (o *CreatePaymentAmountUpdateRequest) SetIndustryUsage(v string) { o.IndustryUsage = &v } +// GetLineItems returns the LineItems field value if set, zero value otherwise. +func (o *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) 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 *CreatePaymentAmountUpdateRequest) SetLineItems(v []LineItem) { + o.LineItems = v +} + // GetMerchantAccount returns the MerchantAccount field value func (o *CreatePaymentAmountUpdateRequest) GetMerchantAccount() string { if o == nil { @@ -207,6 +241,9 @@ func (o CreatePaymentAmountUpdateRequest) ToMap() (map[string]interface{}, error if !common.IsNil(o.IndustryUsage) { toSerialize["industryUsage"] = o.IndustryUsage } + if !common.IsNil(o.LineItems) { + toSerialize["lineItems"] = o.LineItems + } toSerialize["merchantAccount"] = o.MerchantAccount if !common.IsNil(o.Reference) { toSerialize["reference"] = o.Reference diff --git a/src/checkout/model_create_payment_capture_request.go b/src/checkout/model_create_payment_capture_request.go index 8bac4ec56..19a84875d 100644 --- a/src/checkout/model_create_payment_capture_request.go +++ b/src/checkout/model_create_payment_capture_request.go @@ -23,11 +23,14 @@ type CreatePaymentCaptureRequest struct { // 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"` + MerchantAccount string `json:"merchantAccount"` + PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // 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"` + // A List of sub-merchants. + SubMerchants []SubMerchant2 `json:"subMerchants,omitempty"` } // NewCreatePaymentCaptureRequest instantiates a new CreatePaymentCaptureRequest object @@ -129,6 +132,38 @@ func (o *CreatePaymentCaptureRequest) SetMerchantAccount(v string) { o.MerchantAccount = v } +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) 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 *CreatePaymentCaptureRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + // GetReference returns the Reference field value if set, zero value otherwise. func (o *CreatePaymentCaptureRequest) GetReference() string { if o == nil || common.IsNil(o.Reference) { @@ -193,6 +228,38 @@ func (o *CreatePaymentCaptureRequest) SetSplits(v []Split) { o.Splits = v } +// GetSubMerchants returns the SubMerchants field value if set, zero value otherwise. +func (o *CreatePaymentCaptureRequest) GetSubMerchants() []SubMerchant2 { + if o == nil || common.IsNil(o.SubMerchants) { + var ret []SubMerchant2 + return ret + } + return o.SubMerchants +} + +// 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 *CreatePaymentCaptureRequest) GetSubMerchantsOk() ([]SubMerchant2, bool) { + if o == nil || common.IsNil(o.SubMerchants) { + return nil, false + } + return o.SubMerchants, true +} + +// HasSubMerchants returns a boolean if a field has been set. +func (o *CreatePaymentCaptureRequest) HasSubMerchants() bool { + if o != nil && !common.IsNil(o.SubMerchants) { + return true + } + + return false +} + +// SetSubMerchants gets a reference to the given []SubMerchant2 and assigns it to the SubMerchants field. +func (o *CreatePaymentCaptureRequest) SetSubMerchants(v []SubMerchant2) { + o.SubMerchants = v +} + func (o CreatePaymentCaptureRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -208,12 +275,18 @@ func (o CreatePaymentCaptureRequest) ToMap() (map[string]interface{}, error) { toSerialize["lineItems"] = o.LineItems } toSerialize["merchantAccount"] = o.MerchantAccount + if !common.IsNil(o.PlatformChargebackLogic) { + toSerialize["platformChargebackLogic"] = o.PlatformChargebackLogic + } if !common.IsNil(o.Reference) { toSerialize["reference"] = o.Reference } if !common.IsNil(o.Splits) { toSerialize["splits"] = o.Splits } + if !common.IsNil(o.SubMerchants) { + toSerialize["subMerchants"] = o.SubMerchants + } return toSerialize, nil } diff --git a/src/checkout/model_create_payment_link_request.go b/src/checkout/model_create_payment_link_request.go index 61e19230e..875c9578e 100644 --- a/src/checkout/model_create_payment_link_request.go +++ b/src/checkout/model_create_payment_link_request.go @@ -38,7 +38,7 @@ type CreatePaymentLinkRequest 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 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"` @@ -54,7 +54,7 @@ type CreatePaymentLinkRequest 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"` @@ -80,11 +80,11 @@ type CreatePaymentLinkRequest 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"` // 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_line_item.go b/src/checkout/model_line_item.go index 1d789cdb4..2562dae7c 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 79debca03..1813cf75e 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_capture_resource.go b/src/checkout/model_payment_capture_resource.go index 91f3a88d5..aa1f434c1 100644 --- a/src/checkout/model_payment_capture_resource.go +++ b/src/checkout/model_payment_capture_resource.go @@ -25,7 +25,8 @@ type PaymentCaptureResource 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 capture. - PaymentPspReference string `json:"paymentPspReference"` + PaymentPspReference string `json:"paymentPspReference"` + PlatformChargebackLogic *PlatformChargebackLogic `json:"platformChargebackLogic,omitempty"` // Adyen's 16-character reference associated with the capture request. PspReference string `json:"pspReference"` // Your reference for the capture request. @@ -34,6 +35,8 @@ type PaymentCaptureResource struct { Splits []Split `json:"splits,omitempty"` // 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"` } // NewPaymentCaptureResource instantiates a new PaymentCaptureResource object @@ -162,6 +165,38 @@ func (o *PaymentCaptureResource) SetPaymentPspReference(v string) { o.PaymentPspReference = v } +// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. +func (o *PaymentCaptureResource) 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 *PaymentCaptureResource) 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 *PaymentCaptureResource) 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 *PaymentCaptureResource) SetPlatformChargebackLogic(v PlatformChargebackLogic) { + o.PlatformChargebackLogic = &v +} + // GetPspReference returns the PspReference field value func (o *PaymentCaptureResource) GetPspReference() string { if o == nil { @@ -274,6 +309,38 @@ func (o *PaymentCaptureResource) SetStatus(v string) { o.Status = v } +// GetSubMerchants returns the SubMerchants field value if set, zero value otherwise. +func (o *PaymentCaptureResource) GetSubMerchants() []SubMerchant2 { + if o == nil || common.IsNil(o.SubMerchants) { + var ret []SubMerchant2 + return ret + } + return o.SubMerchants +} + +// 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 *PaymentCaptureResource) GetSubMerchantsOk() ([]SubMerchant2, bool) { + if o == nil || common.IsNil(o.SubMerchants) { + return nil, false + } + return o.SubMerchants, true +} + +// HasSubMerchants returns a boolean if a field has been set. +func (o *PaymentCaptureResource) HasSubMerchants() bool { + if o != nil && !common.IsNil(o.SubMerchants) { + return true + } + + return false +} + +// SetSubMerchants gets a reference to the given []SubMerchant2 and assigns it to the SubMerchants field. +func (o *PaymentCaptureResource) SetSubMerchants(v []SubMerchant2) { + o.SubMerchants = v +} + func (o PaymentCaptureResource) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -290,6 +357,9 @@ func (o PaymentCaptureResource) ToMap() (map[string]interface{}, error) { } toSerialize["merchantAccount"] = o.MerchantAccount toSerialize["paymentPspReference"] = o.PaymentPspReference + if !common.IsNil(o.PlatformChargebackLogic) { + toSerialize["platformChargebackLogic"] = o.PlatformChargebackLogic + } toSerialize["pspReference"] = o.PspReference if !common.IsNil(o.Reference) { toSerialize["reference"] = o.Reference @@ -298,6 +368,9 @@ func (o PaymentCaptureResource) ToMap() (map[string]interface{}, error) { toSerialize["splits"] = o.Splits } toSerialize["status"] = o.Status + if !common.IsNil(o.SubMerchants) { + toSerialize["subMerchants"] = o.SubMerchants + } return toSerialize, nil } diff --git a/src/checkout/model_payment_completion_details.go b/src/checkout/model_payment_completion_details.go index 8572ba719..c4daac3b4 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 1509cb1fe..bb1e2d22e 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", "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", "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 b333d6719..a7b2e11c3 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_link_response.go b/src/checkout/model_payment_link_response.go index 701d56cc7..ede4d2082 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 2259128b1..3d32f63d6 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_response.go b/src/checkout/model_payment_response.go index 4b2daf2d6..3c7889a44 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_setup_request.go b/src/checkout/model_payment_setup_request.go index bad324c51..d4aeee6f2 100644 --- a/src/checkout/model_payment_setup_request.go +++ b/src/checkout/model_payment_setup_request.go @@ -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 348ea2f74..1127e3bcb 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 204ad64da..63e8d7590 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_session_result_response.go b/src/checkout/model_session_result_response.go new file mode 100644 index 000000000..99ca87469 --- /dev/null +++ b/src/checkout/model_session_result_response.go @@ -0,0 +1,172 @@ +/* +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/v7/src/common" +) + +// checks if the SessionResultResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SessionResultResponse{} + +// SessionResultResponse struct for SessionResultResponse +type SessionResultResponse struct { + // A unique identifier of the session. + Id *string `json:"id,omitempty"` + // The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed** – The shopper completed the payment. This means that the payment was authorized. * **paymentPending** – The shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow. * **refused** – The session has been refused, due to too many refused payment attempts. Shoppers can no longer complete the payment with this session. * **canceled** – The shopper canceled the payment. * **active** – The session is still active and can be paid. * **expired** – The session expired (default: 1 hour after session creation). Shoppers can no longer complete the payment with this session. + Status *string `json:"status,omitempty"` +} + +// NewSessionResultResponse instantiates a new SessionResultResponse 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 NewSessionResultResponse() *SessionResultResponse { + this := SessionResultResponse{} + return &this +} + +// NewSessionResultResponseWithDefaults instantiates a new SessionResultResponse 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 NewSessionResultResponseWithDefaults() *SessionResultResponse { + this := SessionResultResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SessionResultResponse) 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 *SessionResultResponse) 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 *SessionResultResponse) 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 *SessionResultResponse) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SessionResultResponse) 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 *SessionResultResponse) 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 *SessionResultResponse) 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 *SessionResultResponse) SetStatus(v string) { + o.Status = &v +} + +func (o SessionResultResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionResultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableSessionResultResponse struct { + value *SessionResultResponse + isSet bool +} + +func (v NullableSessionResultResponse) Get() *SessionResultResponse { + return v.value +} + +func (v *NullableSessionResultResponse) Set(val *SessionResultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSessionResultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionResultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionResultResponse(val *SessionResultResponse) *NullableSessionResultResponse { + return &NullableSessionResultResponse{value: val, isSet: true} +} + +func (v NullableSessionResultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionResultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *SessionResultResponse) isValidStatus() bool { + var allowedEnumValues = []string{"active", "canceled", "completed", "expired", "paymentPending", "refused"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_split.go b/src/checkout/model_split.go index 7e29feb1c..40705396c 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", "PaymentFeeAcquiring", "PaymentFeeAdyen", "PaymentFeeAdyenCommission", "PaymentFeeAdyenMarkup", "PaymentFeeInterchange", "PaymentFeeSchemeFee", "Remainder", "Surcharge", "Tip", "VAT", "Verification"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_stored_payment_method_details.go b/src/checkout/model_stored_payment_method_details.go index 5b70e5053..84a205eec 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 new file mode 100644 index 000000000..d44c6526b --- /dev/null +++ b/src/checkout/model_sub_merchant_2.go @@ -0,0 +1,268 @@ +/* +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/v7/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_three_ds2_request_data.go b/src/checkout/model_three_ds2_request_data.go index dec46ff98..c6abb06ae 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_request_data_2.go b/src/checkout/model_three_ds2_request_data_2.go new file mode 100644 index 000000000..40406d794 --- /dev/null +++ b/src/checkout/model_three_ds2_request_data_2.go @@ -0,0 +1,1483 @@ +/* +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/v7/src/common" +) + +// checks if the ThreeDS2RequestData2 type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ThreeDS2RequestData2{} + +// ThreeDS2RequestData2 struct for ThreeDS2RequestData2 +type ThreeDS2RequestData2 struct { + AcctInfo *AcctInfo `json:"acctInfo,omitempty"` + // Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit + AcctType *string `json:"acctType,omitempty"` + // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + AcquirerBIN *string `json:"acquirerBIN,omitempty"` + // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. + AcquirerMerchantID *string `json:"acquirerMerchantID,omitempty"` + // Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. + AddrMatch *string `json:"addrMatch,omitempty"` + // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. + // Deprecated + AuthenticationOnly *bool `json:"authenticationOnly,omitempty"` + // Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` + // Deprecated + ChallengeIndicator *string `json:"challengeIndicator,omitempty"` + DeviceRenderOptions *DeviceRenderOptions `json:"deviceRenderOptions,omitempty"` + HomePhone *Phone `json:"homePhone,omitempty"` + // Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. + Mcc *string `json:"mcc,omitempty"` + // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. + MerchantName *string `json:"merchantName,omitempty"` + // The `messageVersion` value indicating the 3D Secure 2 protocol version. + MessageVersion *string `json:"messageVersion,omitempty"` + MobilePhone *Phone `json:"mobilePhone,omitempty"` + // URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. + NotificationURL *string `json:"notificationURL,omitempty"` + // Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. + PayTokenInd *bool `json:"payTokenInd,omitempty"` + // Indicates the type of payment for which an authentication is requested (message extension) + PaymentAuthenticationUseCase *string `json:"paymentAuthenticationUseCase,omitempty"` + // Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. + PurchaseInstalData *string `json:"purchaseInstalData,omitempty"` + // Date after which no further authorisations shall be performed. Format: YYYYMMDD + RecurringExpiry *string `json:"recurringExpiry,omitempty"` + // Indicates the minimum number of days between authorisations. Maximum length: 4 characters. + RecurringFrequency *string `json:"recurringFrequency,omitempty"` + // The `sdkAppID` value as received from the 3D Secure 2 SDK. + SdkAppID *string `json:"sdkAppID,omitempty"` + SdkEphemPubKey *SDKEphemPubKey `json:"sdkEphemPubKey,omitempty"` + // The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. + SdkMaxTimeout *int32 `json:"sdkMaxTimeout,omitempty"` + // The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. + SdkReferenceNumber *string `json:"sdkReferenceNumber,omitempty"` + // The `sdkTransID` value as received from the 3D Secure 2 SDK. + SdkTransID *string `json:"sdkTransID,omitempty"` + // Completion indicator for the device fingerprinting. + ThreeDSCompInd *string `json:"threeDSCompInd,omitempty"` + // Indicates the type of Authentication request. + ThreeDSRequestorAuthenticationInd *string `json:"threeDSRequestorAuthenticationInd,omitempty"` + ThreeDSRequestorAuthenticationInfo *ThreeDSRequestorAuthenticationInfo `json:"threeDSRequestorAuthenticationInfo,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"` + // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. + ThreeDSRequestorID *string `json:"threeDSRequestorID,omitempty"` + // Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. + ThreeDSRequestorName *string `json:"threeDSRequestorName,omitempty"` + ThreeDSRequestorPriorAuthenticationInfo *ThreeDSRequestorPriorAuthenticationInfo `json:"threeDSRequestorPriorAuthenticationInfo,omitempty"` + // URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. + ThreeDSRequestorURL *string `json:"threeDSRequestorURL,omitempty"` + // Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load + TransType *string `json:"transType,omitempty"` + // Identify the type of the transaction being authenticated. + TransactionType *string `json:"transactionType,omitempty"` + // The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. + WhiteListStatus *string `json:"whiteListStatus,omitempty"` + WorkPhone *Phone `json:"workPhone,omitempty"` +} + +// NewThreeDS2RequestData2 instantiates a new ThreeDS2RequestData2 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 NewThreeDS2RequestData2() *ThreeDS2RequestData2 { + this := ThreeDS2RequestData2{} + var authenticationOnly bool = false + this.AuthenticationOnly = &authenticationOnly + var sdkMaxTimeout int32 = 60 + this.SdkMaxTimeout = &sdkMaxTimeout + return &this +} + +// NewThreeDS2RequestData2WithDefaults instantiates a new ThreeDS2RequestData2 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 NewThreeDS2RequestData2WithDefaults() *ThreeDS2RequestData2 { + this := ThreeDS2RequestData2{} + var authenticationOnly bool = false + this.AuthenticationOnly = &authenticationOnly + var sdkMaxTimeout int32 = 60 + this.SdkMaxTimeout = &sdkMaxTimeout + return &this +} + +// GetAcctInfo returns the AcctInfo field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetAcctInfo() AcctInfo { + if o == nil || common.IsNil(o.AcctInfo) { + var ret AcctInfo + return ret + } + return *o.AcctInfo +} + +// GetAcctInfoOk returns a tuple with the AcctInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetAcctInfoOk() (*AcctInfo, bool) { + if o == nil || common.IsNil(o.AcctInfo) { + return nil, false + } + return o.AcctInfo, true +} + +// HasAcctInfo returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAcctInfo() bool { + if o != nil && !common.IsNil(o.AcctInfo) { + return true + } + + return false +} + +// SetAcctInfo gets a reference to the given AcctInfo and assigns it to the AcctInfo field. +func (o *ThreeDS2RequestData2) SetAcctInfo(v AcctInfo) { + o.AcctInfo = &v +} + +// GetAcctType returns the AcctType field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetAcctType() string { + if o == nil || common.IsNil(o.AcctType) { + var ret string + return ret + } + return *o.AcctType +} + +// GetAcctTypeOk returns a tuple with the AcctType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetAcctTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.AcctType) { + return nil, false + } + return o.AcctType, true +} + +// HasAcctType returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAcctType() bool { + if o != nil && !common.IsNil(o.AcctType) { + return true + } + + return false +} + +// SetAcctType gets a reference to the given string and assigns it to the AcctType field. +func (o *ThreeDS2RequestData2) SetAcctType(v string) { + o.AcctType = &v +} + +// GetAcquirerBIN returns the AcquirerBIN field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetAcquirerBIN() string { + if o == nil || common.IsNil(o.AcquirerBIN) { + var ret string + return ret + } + return *o.AcquirerBIN +} + +// GetAcquirerBINOk returns a tuple with the AcquirerBIN field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetAcquirerBINOk() (*string, bool) { + if o == nil || common.IsNil(o.AcquirerBIN) { + return nil, false + } + return o.AcquirerBIN, true +} + +// HasAcquirerBIN returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAcquirerBIN() bool { + if o != nil && !common.IsNil(o.AcquirerBIN) { + return true + } + + return false +} + +// SetAcquirerBIN gets a reference to the given string and assigns it to the AcquirerBIN field. +func (o *ThreeDS2RequestData2) SetAcquirerBIN(v string) { + o.AcquirerBIN = &v +} + +// GetAcquirerMerchantID returns the AcquirerMerchantID field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetAcquirerMerchantID() string { + if o == nil || common.IsNil(o.AcquirerMerchantID) { + var ret string + return ret + } + return *o.AcquirerMerchantID +} + +// GetAcquirerMerchantIDOk returns a tuple with the AcquirerMerchantID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetAcquirerMerchantIDOk() (*string, bool) { + if o == nil || common.IsNil(o.AcquirerMerchantID) { + return nil, false + } + return o.AcquirerMerchantID, true +} + +// HasAcquirerMerchantID returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAcquirerMerchantID() bool { + if o != nil && !common.IsNil(o.AcquirerMerchantID) { + return true + } + + return false +} + +// SetAcquirerMerchantID gets a reference to the given string and assigns it to the AcquirerMerchantID field. +func (o *ThreeDS2RequestData2) SetAcquirerMerchantID(v string) { + o.AcquirerMerchantID = &v +} + +// GetAddrMatch returns the AddrMatch field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetAddrMatch() string { + if o == nil || common.IsNil(o.AddrMatch) { + var ret string + return ret + } + return *o.AddrMatch +} + +// GetAddrMatchOk returns a tuple with the AddrMatch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetAddrMatchOk() (*string, bool) { + if o == nil || common.IsNil(o.AddrMatch) { + return nil, false + } + return o.AddrMatch, true +} + +// HasAddrMatch returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAddrMatch() bool { + if o != nil && !common.IsNil(o.AddrMatch) { + return true + } + + return false +} + +// SetAddrMatch gets a reference to the given string and assigns it to the AddrMatch field. +func (o *ThreeDS2RequestData2) SetAddrMatch(v string) { + o.AddrMatch = &v +} + +// GetAuthenticationOnly returns the AuthenticationOnly field value if set, zero value otherwise. +// Deprecated +func (o *ThreeDS2RequestData2) GetAuthenticationOnly() bool { + if o == nil || common.IsNil(o.AuthenticationOnly) { + var ret bool + return ret + } + return *o.AuthenticationOnly +} + +// GetAuthenticationOnlyOk returns a tuple with the AuthenticationOnly field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *ThreeDS2RequestData2) GetAuthenticationOnlyOk() (*bool, bool) { + if o == nil || common.IsNil(o.AuthenticationOnly) { + return nil, false + } + return o.AuthenticationOnly, true +} + +// HasAuthenticationOnly returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasAuthenticationOnly() bool { + if o != nil && !common.IsNil(o.AuthenticationOnly) { + return true + } + + return false +} + +// SetAuthenticationOnly gets a reference to the given bool and assigns it to the AuthenticationOnly field. +// Deprecated +func (o *ThreeDS2RequestData2) SetAuthenticationOnly(v bool) { + o.AuthenticationOnly = &v +} + +// GetChallengeIndicator returns the ChallengeIndicator field value if set, zero value otherwise. +// Deprecated +func (o *ThreeDS2RequestData2) 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. +// Deprecated +func (o *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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. +// Deprecated +func (o *ThreeDS2RequestData2) SetChallengeIndicator(v string) { + o.ChallengeIndicator = &v +} + +// GetDeviceRenderOptions returns the DeviceRenderOptions field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetDeviceRenderOptions() DeviceRenderOptions { + if o == nil || common.IsNil(o.DeviceRenderOptions) { + var ret DeviceRenderOptions + return ret + } + return *o.DeviceRenderOptions +} + +// GetDeviceRenderOptionsOk returns a tuple with the DeviceRenderOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetDeviceRenderOptionsOk() (*DeviceRenderOptions, bool) { + if o == nil || common.IsNil(o.DeviceRenderOptions) { + return nil, false + } + return o.DeviceRenderOptions, true +} + +// HasDeviceRenderOptions returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasDeviceRenderOptions() bool { + if o != nil && !common.IsNil(o.DeviceRenderOptions) { + return true + } + + return false +} + +// SetDeviceRenderOptions gets a reference to the given DeviceRenderOptions and assigns it to the DeviceRenderOptions field. +func (o *ThreeDS2RequestData2) SetDeviceRenderOptions(v DeviceRenderOptions) { + o.DeviceRenderOptions = &v +} + +// GetHomePhone returns the HomePhone field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetHomePhone() Phone { + if o == nil || common.IsNil(o.HomePhone) { + var ret Phone + return ret + } + return *o.HomePhone +} + +// GetHomePhoneOk returns a tuple with the HomePhone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetHomePhoneOk() (*Phone, bool) { + if o == nil || common.IsNil(o.HomePhone) { + return nil, false + } + return o.HomePhone, true +} + +// HasHomePhone returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasHomePhone() bool { + if o != nil && !common.IsNil(o.HomePhone) { + return true + } + + return false +} + +// SetHomePhone gets a reference to the given Phone and assigns it to the HomePhone field. +func (o *ThreeDS2RequestData2) SetHomePhone(v Phone) { + o.HomePhone = &v +} + +// GetMcc returns the Mcc field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) SetMcc(v string) { + o.Mcc = &v +} + +// GetMerchantName returns the MerchantName field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetMerchantName() string { + if o == nil || common.IsNil(o.MerchantName) { + var ret string + return ret + } + return *o.MerchantName +} + +// GetMerchantNameOk returns a tuple with the MerchantName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetMerchantNameOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantName) { + return nil, false + } + return o.MerchantName, true +} + +// HasMerchantName returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasMerchantName() bool { + if o != nil && !common.IsNil(o.MerchantName) { + return true + } + + return false +} + +// SetMerchantName gets a reference to the given string and assigns it to the MerchantName field. +func (o *ThreeDS2RequestData2) SetMerchantName(v string) { + o.MerchantName = &v +} + +// GetMessageVersion returns the MessageVersion field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetMessageVersion() string { + if o == nil || common.IsNil(o.MessageVersion) { + var ret string + return ret + } + return *o.MessageVersion +} + +// GetMessageVersionOk returns a tuple with the MessageVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetMessageVersionOk() (*string, bool) { + if o == nil || common.IsNil(o.MessageVersion) { + return nil, false + } + return o.MessageVersion, true +} + +// HasMessageVersion returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasMessageVersion() bool { + if o != nil && !common.IsNil(o.MessageVersion) { + return true + } + + return false +} + +// SetMessageVersion gets a reference to the given string and assigns it to the MessageVersion field. +func (o *ThreeDS2RequestData2) SetMessageVersion(v string) { + o.MessageVersion = &v +} + +// GetMobilePhone returns the MobilePhone field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetMobilePhone() Phone { + if o == nil || common.IsNil(o.MobilePhone) { + var ret Phone + return ret + } + return *o.MobilePhone +} + +// GetMobilePhoneOk returns a tuple with the MobilePhone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetMobilePhoneOk() (*Phone, bool) { + if o == nil || common.IsNil(o.MobilePhone) { + return nil, false + } + return o.MobilePhone, true +} + +// HasMobilePhone returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasMobilePhone() bool { + if o != nil && !common.IsNil(o.MobilePhone) { + return true + } + + return false +} + +// SetMobilePhone gets a reference to the given Phone and assigns it to the MobilePhone field. +func (o *ThreeDS2RequestData2) SetMobilePhone(v Phone) { + o.MobilePhone = &v +} + +// GetNotificationURL returns the NotificationURL field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetNotificationURL() string { + if o == nil || common.IsNil(o.NotificationURL) { + var ret string + return ret + } + return *o.NotificationURL +} + +// GetNotificationURLOk returns a tuple with the NotificationURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetNotificationURLOk() (*string, bool) { + if o == nil || common.IsNil(o.NotificationURL) { + return nil, false + } + return o.NotificationURL, true +} + +// HasNotificationURL returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasNotificationURL() bool { + if o != nil && !common.IsNil(o.NotificationURL) { + return true + } + + return false +} + +// SetNotificationURL gets a reference to the given string and assigns it to the NotificationURL field. +func (o *ThreeDS2RequestData2) SetNotificationURL(v string) { + o.NotificationURL = &v +} + +// GetPayTokenInd returns the PayTokenInd field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetPayTokenInd() bool { + if o == nil || common.IsNil(o.PayTokenInd) { + var ret bool + return ret + } + return *o.PayTokenInd +} + +// GetPayTokenIndOk returns a tuple with the PayTokenInd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetPayTokenIndOk() (*bool, bool) { + if o == nil || common.IsNil(o.PayTokenInd) { + return nil, false + } + return o.PayTokenInd, true +} + +// HasPayTokenInd returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasPayTokenInd() bool { + if o != nil && !common.IsNil(o.PayTokenInd) { + return true + } + + return false +} + +// SetPayTokenInd gets a reference to the given bool and assigns it to the PayTokenInd field. +func (o *ThreeDS2RequestData2) SetPayTokenInd(v bool) { + o.PayTokenInd = &v +} + +// GetPaymentAuthenticationUseCase returns the PaymentAuthenticationUseCase field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetPaymentAuthenticationUseCase() string { + if o == nil || common.IsNil(o.PaymentAuthenticationUseCase) { + var ret string + return ret + } + return *o.PaymentAuthenticationUseCase +} + +// GetPaymentAuthenticationUseCaseOk returns a tuple with the PaymentAuthenticationUseCase field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetPaymentAuthenticationUseCaseOk() (*string, bool) { + if o == nil || common.IsNil(o.PaymentAuthenticationUseCase) { + return nil, false + } + return o.PaymentAuthenticationUseCase, true +} + +// HasPaymentAuthenticationUseCase returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasPaymentAuthenticationUseCase() bool { + if o != nil && !common.IsNil(o.PaymentAuthenticationUseCase) { + return true + } + + return false +} + +// SetPaymentAuthenticationUseCase gets a reference to the given string and assigns it to the PaymentAuthenticationUseCase field. +func (o *ThreeDS2RequestData2) SetPaymentAuthenticationUseCase(v string) { + o.PaymentAuthenticationUseCase = &v +} + +// GetPurchaseInstalData returns the PurchaseInstalData field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetPurchaseInstalData() string { + if o == nil || common.IsNil(o.PurchaseInstalData) { + var ret string + return ret + } + return *o.PurchaseInstalData +} + +// GetPurchaseInstalDataOk returns a tuple with the PurchaseInstalData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetPurchaseInstalDataOk() (*string, bool) { + if o == nil || common.IsNil(o.PurchaseInstalData) { + return nil, false + } + return o.PurchaseInstalData, true +} + +// HasPurchaseInstalData returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasPurchaseInstalData() bool { + if o != nil && !common.IsNil(o.PurchaseInstalData) { + return true + } + + return false +} + +// SetPurchaseInstalData gets a reference to the given string and assigns it to the PurchaseInstalData field. +func (o *ThreeDS2RequestData2) SetPurchaseInstalData(v string) { + o.PurchaseInstalData = &v +} + +// GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) SetRecurringExpiry(v string) { + o.RecurringExpiry = &v +} + +// GetRecurringFrequency returns the RecurringFrequency field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) SetRecurringFrequency(v string) { + o.RecurringFrequency = &v +} + +// GetSdkAppID returns the SdkAppID field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetSdkAppID() string { + if o == nil || common.IsNil(o.SdkAppID) { + var ret string + return ret + } + return *o.SdkAppID +} + +// GetSdkAppIDOk returns a tuple with the SdkAppID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetSdkAppIDOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkAppID) { + return nil, false + } + return o.SdkAppID, true +} + +// HasSdkAppID returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasSdkAppID() bool { + if o != nil && !common.IsNil(o.SdkAppID) { + return true + } + + return false +} + +// SetSdkAppID gets a reference to the given string and assigns it to the SdkAppID field. +func (o *ThreeDS2RequestData2) SetSdkAppID(v string) { + o.SdkAppID = &v +} + +// GetSdkEphemPubKey returns the SdkEphemPubKey field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetSdkEphemPubKey() SDKEphemPubKey { + if o == nil || common.IsNil(o.SdkEphemPubKey) { + var ret SDKEphemPubKey + return ret + } + return *o.SdkEphemPubKey +} + +// GetSdkEphemPubKeyOk returns a tuple with the SdkEphemPubKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetSdkEphemPubKeyOk() (*SDKEphemPubKey, bool) { + if o == nil || common.IsNil(o.SdkEphemPubKey) { + return nil, false + } + return o.SdkEphemPubKey, true +} + +// HasSdkEphemPubKey returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasSdkEphemPubKey() bool { + if o != nil && !common.IsNil(o.SdkEphemPubKey) { + return true + } + + return false +} + +// SetSdkEphemPubKey gets a reference to the given SDKEphemPubKey and assigns it to the SdkEphemPubKey field. +func (o *ThreeDS2RequestData2) SetSdkEphemPubKey(v SDKEphemPubKey) { + o.SdkEphemPubKey = &v +} + +// GetSdkMaxTimeout returns the SdkMaxTimeout field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetSdkMaxTimeout() int32 { + if o == nil || common.IsNil(o.SdkMaxTimeout) { + var ret int32 + return ret + } + return *o.SdkMaxTimeout +} + +// GetSdkMaxTimeoutOk returns a tuple with the SdkMaxTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetSdkMaxTimeoutOk() (*int32, bool) { + if o == nil || common.IsNil(o.SdkMaxTimeout) { + return nil, false + } + return o.SdkMaxTimeout, true +} + +// HasSdkMaxTimeout returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasSdkMaxTimeout() bool { + if o != nil && !common.IsNil(o.SdkMaxTimeout) { + return true + } + + return false +} + +// SetSdkMaxTimeout gets a reference to the given int32 and assigns it to the SdkMaxTimeout field. +func (o *ThreeDS2RequestData2) SetSdkMaxTimeout(v int32) { + o.SdkMaxTimeout = &v +} + +// GetSdkReferenceNumber returns the SdkReferenceNumber field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetSdkReferenceNumber() string { + if o == nil || common.IsNil(o.SdkReferenceNumber) { + var ret string + return ret + } + return *o.SdkReferenceNumber +} + +// GetSdkReferenceNumberOk returns a tuple with the SdkReferenceNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetSdkReferenceNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkReferenceNumber) { + return nil, false + } + return o.SdkReferenceNumber, true +} + +// HasSdkReferenceNumber returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasSdkReferenceNumber() bool { + if o != nil && !common.IsNil(o.SdkReferenceNumber) { + return true + } + + return false +} + +// SetSdkReferenceNumber gets a reference to the given string and assigns it to the SdkReferenceNumber field. +func (o *ThreeDS2RequestData2) SetSdkReferenceNumber(v string) { + o.SdkReferenceNumber = &v +} + +// GetSdkTransID returns the SdkTransID field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetSdkTransID() string { + if o == nil || common.IsNil(o.SdkTransID) { + var ret string + return ret + } + return *o.SdkTransID +} + +// GetSdkTransIDOk returns a tuple with the SdkTransID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetSdkTransIDOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkTransID) { + return nil, false + } + return o.SdkTransID, true +} + +// HasSdkTransID returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasSdkTransID() bool { + if o != nil && !common.IsNil(o.SdkTransID) { + return true + } + + return false +} + +// SetSdkTransID gets a reference to the given string and assigns it to the SdkTransID field. +func (o *ThreeDS2RequestData2) SetSdkTransID(v string) { + o.SdkTransID = &v +} + +// GetThreeDSCompInd returns the ThreeDSCompInd field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSCompInd() string { + if o == nil || common.IsNil(o.ThreeDSCompInd) { + var ret string + return ret + } + return *o.ThreeDSCompInd +} + +// GetThreeDSCompIndOk returns a tuple with the ThreeDSCompInd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSCompIndOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSCompInd) { + return nil, false + } + return o.ThreeDSCompInd, true +} + +// HasThreeDSCompInd returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSCompInd() bool { + if o != nil && !common.IsNil(o.ThreeDSCompInd) { + return true + } + + return false +} + +// SetThreeDSCompInd gets a reference to the given string and assigns it to the ThreeDSCompInd field. +func (o *ThreeDS2RequestData2) SetThreeDSCompInd(v string) { + o.ThreeDSCompInd = &v +} + +// GetThreeDSRequestorAuthenticationInd returns the ThreeDSRequestorAuthenticationInd field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorAuthenticationInd() string { + if o == nil || common.IsNil(o.ThreeDSRequestorAuthenticationInd) { + var ret string + return ret + } + return *o.ThreeDSRequestorAuthenticationInd +} + +// GetThreeDSRequestorAuthenticationIndOk returns a tuple with the ThreeDSRequestorAuthenticationInd field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorAuthenticationIndOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorAuthenticationInd) { + return nil, false + } + return o.ThreeDSRequestorAuthenticationInd, true +} + +// HasThreeDSRequestorAuthenticationInd returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorAuthenticationInd() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorAuthenticationInd) { + return true + } + + return false +} + +// SetThreeDSRequestorAuthenticationInd gets a reference to the given string and assigns it to the ThreeDSRequestorAuthenticationInd field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorAuthenticationInd(v string) { + o.ThreeDSRequestorAuthenticationInd = &v +} + +// GetThreeDSRequestorAuthenticationInfo returns the ThreeDSRequestorAuthenticationInfo field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorAuthenticationInfo() ThreeDSRequestorAuthenticationInfo { + if o == nil || common.IsNil(o.ThreeDSRequestorAuthenticationInfo) { + var ret ThreeDSRequestorAuthenticationInfo + return ret + } + return *o.ThreeDSRequestorAuthenticationInfo +} + +// GetThreeDSRequestorAuthenticationInfoOk returns a tuple with the ThreeDSRequestorAuthenticationInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorAuthenticationInfoOk() (*ThreeDSRequestorAuthenticationInfo, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorAuthenticationInfo) { + return nil, false + } + return o.ThreeDSRequestorAuthenticationInfo, true +} + +// HasThreeDSRequestorAuthenticationInfo returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorAuthenticationInfo() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorAuthenticationInfo) { + return true + } + + return false +} + +// SetThreeDSRequestorAuthenticationInfo gets a reference to the given ThreeDSRequestorAuthenticationInfo and assigns it to the ThreeDSRequestorAuthenticationInfo field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorAuthenticationInfo(v ThreeDSRequestorAuthenticationInfo) { + o.ThreeDSRequestorAuthenticationInfo = &v +} + +// GetThreeDSRequestorChallengeInd returns the ThreeDSRequestorChallengeInd field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) 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 *ThreeDS2RequestData2) SetThreeDSRequestorChallengeInd(v string) { + o.ThreeDSRequestorChallengeInd = &v +} + +// GetThreeDSRequestorID returns the ThreeDSRequestorID field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorID() string { + if o == nil || common.IsNil(o.ThreeDSRequestorID) { + var ret string + return ret + } + return *o.ThreeDSRequestorID +} + +// GetThreeDSRequestorIDOk returns a tuple with the ThreeDSRequestorID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorIDOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorID) { + return nil, false + } + return o.ThreeDSRequestorID, true +} + +// HasThreeDSRequestorID returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorID() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorID) { + return true + } + + return false +} + +// SetThreeDSRequestorID gets a reference to the given string and assigns it to the ThreeDSRequestorID field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorID(v string) { + o.ThreeDSRequestorID = &v +} + +// GetThreeDSRequestorName returns the ThreeDSRequestorName field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorName() string { + if o == nil || common.IsNil(o.ThreeDSRequestorName) { + var ret string + return ret + } + return *o.ThreeDSRequestorName +} + +// GetThreeDSRequestorNameOk returns a tuple with the ThreeDSRequestorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorNameOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorName) { + return nil, false + } + return o.ThreeDSRequestorName, true +} + +// HasThreeDSRequestorName returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorName() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorName) { + return true + } + + return false +} + +// SetThreeDSRequestorName gets a reference to the given string and assigns it to the ThreeDSRequestorName field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorName(v string) { + o.ThreeDSRequestorName = &v +} + +// GetThreeDSRequestorPriorAuthenticationInfo returns the ThreeDSRequestorPriorAuthenticationInfo field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorPriorAuthenticationInfo() ThreeDSRequestorPriorAuthenticationInfo { + if o == nil || common.IsNil(o.ThreeDSRequestorPriorAuthenticationInfo) { + var ret ThreeDSRequestorPriorAuthenticationInfo + return ret + } + return *o.ThreeDSRequestorPriorAuthenticationInfo +} + +// GetThreeDSRequestorPriorAuthenticationInfoOk returns a tuple with the ThreeDSRequestorPriorAuthenticationInfo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorPriorAuthenticationInfoOk() (*ThreeDSRequestorPriorAuthenticationInfo, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorPriorAuthenticationInfo) { + return nil, false + } + return o.ThreeDSRequestorPriorAuthenticationInfo, true +} + +// HasThreeDSRequestorPriorAuthenticationInfo returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorPriorAuthenticationInfo() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorPriorAuthenticationInfo) { + return true + } + + return false +} + +// SetThreeDSRequestorPriorAuthenticationInfo gets a reference to the given ThreeDSRequestorPriorAuthenticationInfo and assigns it to the ThreeDSRequestorPriorAuthenticationInfo field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorPriorAuthenticationInfo(v ThreeDSRequestorPriorAuthenticationInfo) { + o.ThreeDSRequestorPriorAuthenticationInfo = &v +} + +// GetThreeDSRequestorURL returns the ThreeDSRequestorURL field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorURL() string { + if o == nil || common.IsNil(o.ThreeDSRequestorURL) { + var ret string + return ret + } + return *o.ThreeDSRequestorURL +} + +// GetThreeDSRequestorURLOk returns a tuple with the ThreeDSRequestorURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetThreeDSRequestorURLOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorURL) { + return nil, false + } + return o.ThreeDSRequestorURL, true +} + +// HasThreeDSRequestorURL returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasThreeDSRequestorURL() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorURL) { + return true + } + + return false +} + +// SetThreeDSRequestorURL gets a reference to the given string and assigns it to the ThreeDSRequestorURL field. +func (o *ThreeDS2RequestData2) SetThreeDSRequestorURL(v string) { + o.ThreeDSRequestorURL = &v +} + +// GetTransType returns the TransType field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetTransType() string { + if o == nil || common.IsNil(o.TransType) { + var ret string + return ret + } + return *o.TransType +} + +// GetTransTypeOk returns a tuple with the TransType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetTransTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.TransType) { + return nil, false + } + return o.TransType, true +} + +// HasTransType returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasTransType() bool { + if o != nil && !common.IsNil(o.TransType) { + return true + } + + return false +} + +// SetTransType gets a reference to the given string and assigns it to the TransType field. +func (o *ThreeDS2RequestData2) SetTransType(v string) { + o.TransType = &v +} + +// GetTransactionType returns the TransactionType field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetTransactionType() string { + if o == nil || common.IsNil(o.TransactionType) { + var ret string + return ret + } + return *o.TransactionType +} + +// GetTransactionTypeOk returns a tuple with the TransactionType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetTransactionTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.TransactionType) { + return nil, false + } + return o.TransactionType, true +} + +// HasTransactionType returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasTransactionType() bool { + if o != nil && !common.IsNil(o.TransactionType) { + return true + } + + return false +} + +// SetTransactionType gets a reference to the given string and assigns it to the TransactionType field. +func (o *ThreeDS2RequestData2) SetTransactionType(v string) { + o.TransactionType = &v +} + +// GetWhiteListStatus returns the WhiteListStatus field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetWhiteListStatus() string { + if o == nil || common.IsNil(o.WhiteListStatus) { + var ret string + return ret + } + return *o.WhiteListStatus +} + +// GetWhiteListStatusOk returns a tuple with the WhiteListStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetWhiteListStatusOk() (*string, bool) { + if o == nil || common.IsNil(o.WhiteListStatus) { + return nil, false + } + return o.WhiteListStatus, true +} + +// HasWhiteListStatus returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasWhiteListStatus() bool { + if o != nil && !common.IsNil(o.WhiteListStatus) { + return true + } + + return false +} + +// SetWhiteListStatus gets a reference to the given string and assigns it to the WhiteListStatus field. +func (o *ThreeDS2RequestData2) SetWhiteListStatus(v string) { + o.WhiteListStatus = &v +} + +// GetWorkPhone returns the WorkPhone field value if set, zero value otherwise. +func (o *ThreeDS2RequestData2) GetWorkPhone() Phone { + if o == nil || common.IsNil(o.WorkPhone) { + var ret Phone + return ret + } + return *o.WorkPhone +} + +// GetWorkPhoneOk returns a tuple with the WorkPhone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDS2RequestData2) GetWorkPhoneOk() (*Phone, bool) { + if o == nil || common.IsNil(o.WorkPhone) { + return nil, false + } + return o.WorkPhone, true +} + +// HasWorkPhone returns a boolean if a field has been set. +func (o *ThreeDS2RequestData2) HasWorkPhone() bool { + if o != nil && !common.IsNil(o.WorkPhone) { + return true + } + + return false +} + +// SetWorkPhone gets a reference to the given Phone and assigns it to the WorkPhone field. +func (o *ThreeDS2RequestData2) SetWorkPhone(v Phone) { + o.WorkPhone = &v +} + +func (o ThreeDS2RequestData2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreeDS2RequestData2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcctInfo) { + toSerialize["acctInfo"] = o.AcctInfo + } + if !common.IsNil(o.AcctType) { + toSerialize["acctType"] = o.AcctType + } + if !common.IsNil(o.AcquirerBIN) { + toSerialize["acquirerBIN"] = o.AcquirerBIN + } + if !common.IsNil(o.AcquirerMerchantID) { + toSerialize["acquirerMerchantID"] = o.AcquirerMerchantID + } + if !common.IsNil(o.AddrMatch) { + toSerialize["addrMatch"] = o.AddrMatch + } + if !common.IsNil(o.AuthenticationOnly) { + toSerialize["authenticationOnly"] = o.AuthenticationOnly + } + if !common.IsNil(o.ChallengeIndicator) { + toSerialize["challengeIndicator"] = o.ChallengeIndicator + } + if !common.IsNil(o.DeviceRenderOptions) { + toSerialize["deviceRenderOptions"] = o.DeviceRenderOptions + } + if !common.IsNil(o.HomePhone) { + toSerialize["homePhone"] = o.HomePhone + } + if !common.IsNil(o.Mcc) { + toSerialize["mcc"] = o.Mcc + } + if !common.IsNil(o.MerchantName) { + toSerialize["merchantName"] = o.MerchantName + } + if !common.IsNil(o.MessageVersion) { + toSerialize["messageVersion"] = o.MessageVersion + } + if !common.IsNil(o.MobilePhone) { + toSerialize["mobilePhone"] = o.MobilePhone + } + if !common.IsNil(o.NotificationURL) { + toSerialize["notificationURL"] = o.NotificationURL + } + if !common.IsNil(o.PayTokenInd) { + toSerialize["payTokenInd"] = o.PayTokenInd + } + if !common.IsNil(o.PaymentAuthenticationUseCase) { + toSerialize["paymentAuthenticationUseCase"] = o.PaymentAuthenticationUseCase + } + if !common.IsNil(o.PurchaseInstalData) { + toSerialize["purchaseInstalData"] = o.PurchaseInstalData + } + if !common.IsNil(o.RecurringExpiry) { + toSerialize["recurringExpiry"] = o.RecurringExpiry + } + if !common.IsNil(o.RecurringFrequency) { + toSerialize["recurringFrequency"] = o.RecurringFrequency + } + if !common.IsNil(o.SdkAppID) { + toSerialize["sdkAppID"] = o.SdkAppID + } + if !common.IsNil(o.SdkEphemPubKey) { + toSerialize["sdkEphemPubKey"] = o.SdkEphemPubKey + } + if !common.IsNil(o.SdkMaxTimeout) { + toSerialize["sdkMaxTimeout"] = o.SdkMaxTimeout + } + if !common.IsNil(o.SdkReferenceNumber) { + toSerialize["sdkReferenceNumber"] = o.SdkReferenceNumber + } + if !common.IsNil(o.SdkTransID) { + toSerialize["sdkTransID"] = o.SdkTransID + } + if !common.IsNil(o.ThreeDSCompInd) { + toSerialize["threeDSCompInd"] = o.ThreeDSCompInd + } + if !common.IsNil(o.ThreeDSRequestorAuthenticationInd) { + toSerialize["threeDSRequestorAuthenticationInd"] = o.ThreeDSRequestorAuthenticationInd + } + if !common.IsNil(o.ThreeDSRequestorAuthenticationInfo) { + toSerialize["threeDSRequestorAuthenticationInfo"] = o.ThreeDSRequestorAuthenticationInfo + } + if !common.IsNil(o.ThreeDSRequestorChallengeInd) { + toSerialize["threeDSRequestorChallengeInd"] = o.ThreeDSRequestorChallengeInd + } + if !common.IsNil(o.ThreeDSRequestorID) { + toSerialize["threeDSRequestorID"] = o.ThreeDSRequestorID + } + if !common.IsNil(o.ThreeDSRequestorName) { + toSerialize["threeDSRequestorName"] = o.ThreeDSRequestorName + } + if !common.IsNil(o.ThreeDSRequestorPriorAuthenticationInfo) { + toSerialize["threeDSRequestorPriorAuthenticationInfo"] = o.ThreeDSRequestorPriorAuthenticationInfo + } + if !common.IsNil(o.ThreeDSRequestorURL) { + toSerialize["threeDSRequestorURL"] = o.ThreeDSRequestorURL + } + if !common.IsNil(o.TransType) { + toSerialize["transType"] = o.TransType + } + if !common.IsNil(o.TransactionType) { + toSerialize["transactionType"] = o.TransactionType + } + if !common.IsNil(o.WhiteListStatus) { + toSerialize["whiteListStatus"] = o.WhiteListStatus + } + if !common.IsNil(o.WorkPhone) { + toSerialize["workPhone"] = o.WorkPhone + } + return toSerialize, nil +} + +type NullableThreeDS2RequestData2 struct { + value *ThreeDS2RequestData2 + isSet bool +} + +func (v NullableThreeDS2RequestData2) Get() *ThreeDS2RequestData2 { + return v.value +} + +func (v *NullableThreeDS2RequestData2) Set(val *ThreeDS2RequestData2) { + v.value = val + v.isSet = true +} + +func (v NullableThreeDS2RequestData2) IsSet() bool { + return v.isSet +} + +func (v *NullableThreeDS2RequestData2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreeDS2RequestData2(val *ThreeDS2RequestData2) *NullableThreeDS2RequestData2 { + return &NullableThreeDS2RequestData2{value: val, isSet: true} +} + +func (v NullableThreeDS2RequestData2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreeDS2RequestData2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *ThreeDS2RequestData2) isValidAcctType() bool { + var allowedEnumValues = []string{"01", "02", "03"} + for _, allowed := range allowedEnumValues { + if o.GetAcctType() == allowed { + return true + } + } + return false +} +func (o *ThreeDS2RequestData2) isValidAddrMatch() bool { + var allowedEnumValues = []string{"Y", "N"} + for _, allowed := range allowedEnumValues { + if o.GetAddrMatch() == allowed { + return true + } + } + return false +} +func (o *ThreeDS2RequestData2) isValidChallengeIndicator() bool { + var allowedEnumValues = []string{"noPreference", "requestNoChallenge", "requestChallenge", "requestChallengeAsMandate"} + for _, allowed := range allowedEnumValues { + if o.GetChallengeIndicator() == allowed { + return true + } + } + return false +} +func (o *ThreeDS2RequestData2) isValidThreeDSRequestorChallengeInd() bool { + var allowedEnumValues = []string{"01", "02", "03", "04", "05", "06"} + for _, allowed := range allowedEnumValues { + if o.GetThreeDSRequestorChallengeInd() == allowed { + return true + } + } + return false +} +func (o *ThreeDS2RequestData2) isValidTransType() bool { + var allowedEnumValues = []string{"01", "03", "10", "11", "28"} + for _, allowed := range allowedEnumValues { + if o.GetTransType() == allowed { + return true + } + } + return false +} +func (o *ThreeDS2RequestData2) isValidTransactionType() bool { + var allowedEnumValues = []string{"goodsOrServicePurchase", "checkAcceptance", "accountFunding", "quasiCashTransaction", "prepaidActivationAndLoad"} + for _, allowed := range allowedEnumValues { + if o.GetTransactionType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_three_ds2_result.go b/src/checkout/model_three_ds2_result.go index 44a3c84aa..44492d087 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/src/checkout/model_three_ds_request_data.go b/src/checkout/model_three_ds_request_data.go index f4c66e239..948b26068 100644 --- a/src/checkout/model_three_ds_request_data.go +++ b/src/checkout/model_three_ds_request_data.go @@ -263,7 +263,7 @@ func (o *ThreeDSRequestData) isValidNativeThreeDS() bool { return false } func (o *ThreeDSRequestData) isValidThreeDSVersion() bool { - var allowedEnumValues = []string{"2.1.0", "2.2.0"} + var allowedEnumValues = []string{"V_2_1_0", "V_2_2_0"} for _, allowed := range allowedEnumValues { if o.GetThreeDSVersion() == allowed { return true diff --git a/src/legalentity/api_business_lines.go b/src/legalentity/api_business_lines.go index 1b3bdbe46..286e51e02 100644 --- a/src/legalentity/api_business_lines.go +++ b/src/legalentity/api_business_lines.go @@ -46,6 +46,10 @@ Creates a business line. This resource contains information about your user's line of business, including their industry and their source of funds. Adyen uses this information to verify your users as required by payment industry regulations. Adyen informs you of the verification results through webhooks or API responses. +>If you are using hosted onboarding, [only use v2](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-01-legal-entity-management-api-3) for your API requests. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r BusinessLinesApiCreateBusinessLineInput - Request parameters, see CreateBusinessLineInput @return BusinessLine, *http.Response, error diff --git a/src/legalentity/api_documents.go b/src/legalentity/api_documents.go index b66f35240..522a6f66f 100644 --- a/src/legalentity/api_documents.go +++ b/src/legalentity/api_documents.go @@ -43,10 +43,10 @@ Deletes a document. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r DocumentsApiDeleteDocumentInput - Request parameters, see DeleteDocumentInput -@return map[string]interface{}, *http.Response, error +@return , *http.Response, error */ -func (a *DocumentsApi) DeleteDocument(ctx context.Context, r DocumentsApiDeleteDocumentInput) (map[string]interface{}, *http.Response, error) { - res := &map[string]interface{}{} +func (a *DocumentsApi) DeleteDocument(ctx context.Context, r DocumentsApiDeleteDocumentInput) (*http.Response, error) { + var res interface{} path := "/documents/{id}" path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) queryParams := url.Values{} @@ -62,7 +62,7 @@ func (a *DocumentsApi) DeleteDocument(ctx context.Context, r DocumentsApiDeleteD headerParams, ) - return *res, httpRes, err + return httpRes, err } // All parameters accepted by DocumentsApi.GetDocument diff --git a/src/legalentity/api_hosted_onboarding.go b/src/legalentity/api_hosted_onboarding.go index 8c939a3be..d62843581 100644 --- a/src/legalentity/api_hosted_onboarding.go +++ b/src/legalentity/api_hosted_onboarding.go @@ -47,6 +47,10 @@ GetLinkToAdyenhostedOnboardingPage Get a link to an Adyen-hosted onboarding page Returns a link to an Adyen-hosted onboarding page where you need to redirect your user. +>If you are using hosted onboarding, [only use v2](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-01-legal-entity-management-api-3) for your API requests. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r HostedOnboardingApiGetLinkToAdyenhostedOnboardingPageInput - Request parameters, see GetLinkToAdyenhostedOnboardingPageInput @return OnboardingLink, *http.Response, error @@ -90,7 +94,9 @@ func (a *HostedOnboardingApi) GetOnboardingLinkThemeInput(id string) HostedOnboa /* GetOnboardingLinkTheme Get an onboarding link theme -Returns the details of the theme identified in the path. +Returns the details of the theme identified in the path.>If you are using hosted onboarding, [only use v2](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-01-legal-entity-management-api-3) for your API requests. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r HostedOnboardingApiGetOnboardingLinkThemeInput - Request parameters, see GetOnboardingLinkThemeInput @@ -134,6 +140,10 @@ ListHostedOnboardingPageThemes Get a list of hosted onboarding page themes Returns a list of hosted onboarding page themes. +>If you are using hosted onboarding, [only use v2](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-01-legal-entity-management-api-3) for your API requests. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r HostedOnboardingApiListHostedOnboardingPageThemesInput - Request parameters, see ListHostedOnboardingPageThemesInput @return OnboardingThemes, *http.Response, error diff --git a/src/legalentity/api_legal_entities.go b/src/legalentity/api_legal_entities.go index 7854dcb13..60db0f6a8 100644 --- a/src/legalentity/api_legal_entities.go +++ b/src/legalentity/api_legal_entities.go @@ -91,6 +91,8 @@ Creates a legal entity. This resource contains information about the user that will be onboarded in your platform. Adyen uses this information to perform verification checks as required by payment industry regulations. Adyen informs you of the verification results through webhooks or API responses. +>If you are using hosted onboarding, [only use v2](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-01-legal-entity-management-api-3) for your API requests. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/src/legalentity/api_terms_of_service.go b/src/legalentity/api_terms_of_service.go index a325f3d35..8b9737f89 100644 --- a/src/legalentity/api_terms_of_service.go +++ b/src/legalentity/api_terms_of_service.go @@ -169,3 +169,48 @@ func (a *TermsOfServiceApi) GetTermsOfServiceInformationForLegalEntity(ctx conte return *res, httpRes, err } + +// All parameters accepted by TermsOfServiceApi.GetTermsOfServiceStatus +type TermsOfServiceApiGetTermsOfServiceStatusInput struct { + id string +} + +/* +Prepare a request for GetTermsOfServiceStatus +@param id The unique identifier of the legal entity. +@return TermsOfServiceApiGetTermsOfServiceStatusInput +*/ +func (a *TermsOfServiceApi) GetTermsOfServiceStatusInput(id string) TermsOfServiceApiGetTermsOfServiceStatusInput { + return TermsOfServiceApiGetTermsOfServiceStatusInput{ + id: id, + } +} + +/* +GetTermsOfServiceStatus Get Terms of Service status + +Returns the required types of Terms of Service that need to be accepted by a legal entity. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TermsOfServiceApiGetTermsOfServiceStatusInput - Request parameters, see GetTermsOfServiceStatusInput +@return CalculateTermsOfServiceStatusResponse, *http.Response, error +*/ +func (a *TermsOfServiceApi) GetTermsOfServiceStatus(ctx context.Context, r TermsOfServiceApiGetTermsOfServiceStatusInput) (CalculateTermsOfServiceStatusResponse, *http.Response, error) { + res := &CalculateTermsOfServiceStatusResponse{} + path := "/legalEntities/{id}/termsOfServiceStatus" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} diff --git a/src/legalentity/model_accept_terms_of_service_request.go b/src/legalentity/model_accept_terms_of_service_request.go index 88e6adc14..ba6cfa706 100644 --- a/src/legalentity/model_accept_terms_of_service_request.go +++ b/src/legalentity/model_accept_terms_of_service_request.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &AcceptTermsOfServiceRequest{} // AcceptTermsOfServiceRequest struct for AcceptTermsOfServiceRequest type AcceptTermsOfServiceRequest struct { // The unique identifier of the user accepting the Terms of Service. - AcceptedBy *string `json:"acceptedBy,omitempty"` + AcceptedBy string `json:"acceptedBy"` // The IP address of the user accepting the Terms of Service. IpAddress *string `json:"ipAddress,omitempty"` } @@ -29,8 +29,9 @@ type AcceptTermsOfServiceRequest 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 NewAcceptTermsOfServiceRequest() *AcceptTermsOfServiceRequest { +func NewAcceptTermsOfServiceRequest(acceptedBy string) *AcceptTermsOfServiceRequest { this := AcceptTermsOfServiceRequest{} + this.AcceptedBy = acceptedBy return &this } @@ -42,36 +43,28 @@ func NewAcceptTermsOfServiceRequestWithDefaults() *AcceptTermsOfServiceRequest { return &this } -// GetAcceptedBy returns the AcceptedBy field value if set, zero value otherwise. +// GetAcceptedBy returns the AcceptedBy field value func (o *AcceptTermsOfServiceRequest) GetAcceptedBy() string { - if o == nil || common.IsNil(o.AcceptedBy) { + if o == nil { var ret string return ret } - return *o.AcceptedBy + + return o.AcceptedBy } -// GetAcceptedByOk returns a tuple with the AcceptedBy field value if set, nil otherwise +// GetAcceptedByOk returns a tuple with the AcceptedBy field value // and a boolean to check if the value has been set. func (o *AcceptTermsOfServiceRequest) GetAcceptedByOk() (*string, bool) { - if o == nil || common.IsNil(o.AcceptedBy) { + if o == nil { return nil, false } - return o.AcceptedBy, true -} - -// HasAcceptedBy returns a boolean if a field has been set. -func (o *AcceptTermsOfServiceRequest) HasAcceptedBy() bool { - if o != nil && !common.IsNil(o.AcceptedBy) { - return true - } - - return false + return &o.AcceptedBy, true } -// SetAcceptedBy gets a reference to the given string and assigns it to the AcceptedBy field. +// SetAcceptedBy sets field value func (o *AcceptTermsOfServiceRequest) SetAcceptedBy(v string) { - o.AcceptedBy = &v + o.AcceptedBy = v } // GetIpAddress returns the IpAddress field value if set, zero value otherwise. @@ -116,9 +109,7 @@ func (o AcceptTermsOfServiceRequest) MarshalJSON() ([]byte, error) { func (o AcceptTermsOfServiceRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !common.IsNil(o.AcceptedBy) { - toSerialize["acceptedBy"] = o.AcceptedBy - } + toSerialize["acceptedBy"] = o.AcceptedBy if !common.IsNil(o.IpAddress) { toSerialize["ipAddress"] = o.IpAddress } diff --git a/src/legalentity/model_address.go b/src/legalentity/model_address.go index 4c80ac8a6..21a88378e 100644 --- a/src/legalentity/model_address.go +++ b/src/legalentity/model_address.go @@ -25,7 +25,7 @@ type Address struct { Country string `json:"country"` // Postal code. Required if `stateOrProvince` and/or `city` is provided. PostalCode *string `json:"postalCode,omitempty"` - // The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. + // The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. StateOrProvince *string `json:"stateOrProvince,omitempty"` // The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided. Street *string `json:"street,omitempty"` diff --git a/src/legalentity/model_bank_account_info.go b/src/legalentity/model_bank_account_info.go index e31faa7a1..b043aaa67 100644 --- a/src/legalentity/model_bank_account_info.go +++ b/src/legalentity/model_bank_account_info.go @@ -25,6 +25,8 @@ type BankAccountInfo struct { AccountType *string `json:"accountType,omitempty"` // The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the bank account is registered. For example, **NL**. CountryCode *string `json:"countryCode,omitempty"` + // Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). + TrustedSource *bool `json:"trustedSource,omitempty"` } // NewBankAccountInfo instantiates a new BankAccountInfo object @@ -143,6 +145,38 @@ func (o *BankAccountInfo) SetCountryCode(v string) { o.CountryCode = &v } +// GetTrustedSource returns the TrustedSource field value if set, zero value otherwise. +func (o *BankAccountInfo) GetTrustedSource() bool { + if o == nil || common.IsNil(o.TrustedSource) { + var ret bool + return ret + } + return *o.TrustedSource +} + +// GetTrustedSourceOk returns a tuple with the TrustedSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankAccountInfo) GetTrustedSourceOk() (*bool, bool) { + if o == nil || common.IsNil(o.TrustedSource) { + return nil, false + } + return o.TrustedSource, true +} + +// HasTrustedSource returns a boolean if a field has been set. +func (o *BankAccountInfo) HasTrustedSource() bool { + if o != nil && !common.IsNil(o.TrustedSource) { + return true + } + + return false +} + +// SetTrustedSource gets a reference to the given bool and assigns it to the TrustedSource field. +func (o *BankAccountInfo) SetTrustedSource(v bool) { + o.TrustedSource = &v +} + func (o BankAccountInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -162,6 +196,9 @@ func (o BankAccountInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CountryCode) { toSerialize["countryCode"] = o.CountryCode } + if !common.IsNil(o.TrustedSource) { + toSerialize["trustedSource"] = o.TrustedSource + } return toSerialize, nil } diff --git a/src/legalentity/model_bank_account_info_account_identification.go b/src/legalentity/model_bank_account_info_account_identification.go index 4f5a1b9fb..ae093e621 100644 --- a/src/legalentity/model_bank_account_info_account_identification.go +++ b/src/legalentity/model_bank_account_info_account_identification.go @@ -25,6 +25,7 @@ type BankAccountInfoAccountIdentification struct { NumberAndBicAccountIdentification *NumberAndBicAccountIdentification PLLocalAccountIdentification *PLLocalAccountIdentification SELocalAccountIdentification *SELocalAccountIdentification + SGLocalAccountIdentification *SGLocalAccountIdentification UKLocalAccountIdentification *UKLocalAccountIdentification USLocalAccountIdentification *USLocalAccountIdentification } @@ -99,6 +100,13 @@ func SELocalAccountIdentificationAsBankAccountInfoAccountIdentification(v *SELoc } } +// SGLocalAccountIdentificationAsBankAccountInfoAccountIdentification is a convenience function that returns SGLocalAccountIdentification wrapped in BankAccountInfoAccountIdentification +func SGLocalAccountIdentificationAsBankAccountInfoAccountIdentification(v *SGLocalAccountIdentification) BankAccountInfoAccountIdentification { + return BankAccountInfoAccountIdentification{ + SGLocalAccountIdentification: v, + } +} + // UKLocalAccountIdentificationAsBankAccountInfoAccountIdentification is a convenience function that returns UKLocalAccountIdentification wrapped in BankAccountInfoAccountIdentification func UKLocalAccountIdentificationAsBankAccountInfoAccountIdentification(v *UKLocalAccountIdentification) BankAccountInfoAccountIdentification { return BankAccountInfoAccountIdentification{ @@ -247,6 +255,19 @@ func (dst *BankAccountInfoAccountIdentification) UnmarshalJSON(data []byte) erro dst.SELocalAccountIdentification = nil } + // try to unmarshal data into SGLocalAccountIdentification + err = json.Unmarshal(data, &dst.SGLocalAccountIdentification) + if err == nil { + jsonSGLocalAccountIdentification, _ := json.Marshal(dst.SGLocalAccountIdentification) + if string(jsonSGLocalAccountIdentification) == "{}" || !dst.SGLocalAccountIdentification.isValidType() { // empty struct + dst.SGLocalAccountIdentification = nil + } else { + match++ + } + } else { + dst.SGLocalAccountIdentification = nil + } + // try to unmarshal data into UKLocalAccountIdentification err = json.Unmarshal(data, &dst.UKLocalAccountIdentification) if err == nil { @@ -285,6 +306,7 @@ func (dst *BankAccountInfoAccountIdentification) UnmarshalJSON(data []byte) erro dst.NumberAndBicAccountIdentification = nil dst.PLLocalAccountIdentification = nil dst.SELocalAccountIdentification = nil + dst.SGLocalAccountIdentification = nil dst.UKLocalAccountIdentification = nil dst.USLocalAccountIdentification = nil @@ -338,6 +360,10 @@ func (src BankAccountInfoAccountIdentification) MarshalJSON() ([]byte, error) { return json.Marshal(&src.SELocalAccountIdentification) } + if src.SGLocalAccountIdentification != nil { + return json.Marshal(&src.SGLocalAccountIdentification) + } + if src.UKLocalAccountIdentification != nil { return json.Marshal(&src.UKLocalAccountIdentification) } @@ -394,6 +420,10 @@ func (obj *BankAccountInfoAccountIdentification) GetActualInstance() interface{} return obj.SELocalAccountIdentification } + if obj.SGLocalAccountIdentification != nil { + return obj.SGLocalAccountIdentification + } + if obj.UKLocalAccountIdentification != nil { return obj.UKLocalAccountIdentification } diff --git a/src/legalentity/model_business_line.go b/src/legalentity/model_business_line.go index 2ce48036b..bab73178f 100644 --- a/src/legalentity/model_business_line.go +++ b/src/legalentity/model_business_line.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BusinessLine{} // BusinessLine struct for BusinessLine type BusinessLine struct { - // The capability for which you are creating the business line. For example, **receivePayments**. + // The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** // Deprecated Capability *string `json:"capability,omitempty"` // The unique identifier of the business line. @@ -32,7 +32,7 @@ type BusinessLine struct { Problems []CapabilityProblem `json:"problems,omitempty"` // A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. SalesChannels []string `json:"salesChannels,omitempty"` - // The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + // The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** Service string `json:"service"` SourceOfFunds *SourceOfFunds `json:"sourceOfFunds,omitempty"` // List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. @@ -423,6 +423,15 @@ func (v *NullableBusinessLine) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *BusinessLine) isValidCapability() bool { + var allowedEnumValues = []string{"receivePayments", "receiveFromPlatformPayments", "issueBankAccount"} + for _, allowed := range allowedEnumValues { + if o.GetCapability() == allowed { + return true + } + } + return false +} func (o *BusinessLine) isValidService() bool { var allowedEnumValues = []string{"paymentProcessing", "issuing", "banking"} for _, allowed := range allowedEnumValues { diff --git a/src/legalentity/model_business_line_info.go b/src/legalentity/model_business_line_info.go index dbcb331fa..2472905c6 100644 --- a/src/legalentity/model_business_line_info.go +++ b/src/legalentity/model_business_line_info.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BusinessLineInfo{} // BusinessLineInfo struct for BusinessLineInfo type BusinessLineInfo struct { - // The capability for which you are creating the business line. For example, **receivePayments**. + // The capability for which you are creating the business line. Possible values: **receivePayments**, **receiveFromPlatformPayments**, **issueBankAccount** // Deprecated Capability *string `json:"capability,omitempty"` // A code that represents the industry of the legal entity. For example, **4431A** for computer software stores. @@ -28,7 +28,7 @@ type BusinessLineInfo struct { LegalEntityId string `json:"legalEntityId"` // A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. SalesChannels []string `json:"salesChannels,omitempty"` - // The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + // The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** Service string `json:"service"` SourceOfFunds *SourceOfFunds `json:"sourceOfFunds,omitempty"` // List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. @@ -358,6 +358,15 @@ func (v *NullableBusinessLineInfo) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *BusinessLineInfo) isValidCapability() bool { + var allowedEnumValues = []string{"receivePayments", "receiveFromPlatformPayments", "issueBankAccount"} + for _, allowed := range allowedEnumValues { + if o.GetCapability() == allowed { + return true + } + } + return false +} func (o *BusinessLineInfo) isValidService() bool { var allowedEnumValues = []string{"paymentProcessing", "issuing", "banking"} for _, allowed := range allowedEnumValues { diff --git a/src/legalentity/model_business_line_info_update.go b/src/legalentity/model_business_line_info_update.go index 46a441cec..8f9fd891d 100644 --- a/src/legalentity/model_business_line_info_update.go +++ b/src/legalentity/model_business_line_info_update.go @@ -28,7 +28,7 @@ type BusinessLineInfoUpdate struct { LegalEntityId *string `json:"legalEntityId,omitempty"` // A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. SalesChannels []string `json:"salesChannels,omitempty"` - // The service for which you are creating the business line. Possible values:**paymentProcessing**, **issuing**, **banking** + // The service for which you are creating the business line. Possible values: **paymentProcessing**, **issuing**, **banking** Service string `json:"service"` SourceOfFunds *SourceOfFunds `json:"sourceOfFunds,omitempty"` // List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. @@ -376,6 +376,15 @@ func (v *NullableBusinessLineInfoUpdate) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *BusinessLineInfoUpdate) isValidCapability() bool { + var allowedEnumValues = []string{"receivePayments", "receiveFromPlatformPayments", "issueBankAccount"} + for _, allowed := range allowedEnumValues { + if o.GetCapability() == allowed { + return true + } + } + return false +} func (o *BusinessLineInfoUpdate) isValidService() bool { var allowedEnumValues = []string{"paymentProcessing", "issuing", "banking"} for _, allowed := range allowedEnumValues { diff --git a/src/legalentity/model_calculate_terms_of_service_status_response.go b/src/legalentity/model_calculate_terms_of_service_status_response.go new file mode 100644 index 000000000..0ca10c956 --- /dev/null +++ b/src/legalentity/model_calculate_terms_of_service_status_response.go @@ -0,0 +1,125 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the CalculateTermsOfServiceStatusResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CalculateTermsOfServiceStatusResponse{} + +// CalculateTermsOfServiceStatusResponse struct for CalculateTermsOfServiceStatusResponse +type CalculateTermsOfServiceStatusResponse struct { + // The type of Terms of Service that the legal entity needs to accept. If empty, no Terms of Service needs to be accepted. + TermsOfServiceTypes []string `json:"termsOfServiceTypes,omitempty"` +} + +// NewCalculateTermsOfServiceStatusResponse instantiates a new CalculateTermsOfServiceStatusResponse 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 NewCalculateTermsOfServiceStatusResponse() *CalculateTermsOfServiceStatusResponse { + this := CalculateTermsOfServiceStatusResponse{} + return &this +} + +// NewCalculateTermsOfServiceStatusResponseWithDefaults instantiates a new CalculateTermsOfServiceStatusResponse 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 NewCalculateTermsOfServiceStatusResponseWithDefaults() *CalculateTermsOfServiceStatusResponse { + this := CalculateTermsOfServiceStatusResponse{} + return &this +} + +// GetTermsOfServiceTypes returns the TermsOfServiceTypes field value if set, zero value otherwise. +func (o *CalculateTermsOfServiceStatusResponse) GetTermsOfServiceTypes() []string { + if o == nil || common.IsNil(o.TermsOfServiceTypes) { + var ret []string + return ret + } + return o.TermsOfServiceTypes +} + +// GetTermsOfServiceTypesOk returns a tuple with the TermsOfServiceTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CalculateTermsOfServiceStatusResponse) GetTermsOfServiceTypesOk() ([]string, bool) { + if o == nil || common.IsNil(o.TermsOfServiceTypes) { + return nil, false + } + return o.TermsOfServiceTypes, true +} + +// HasTermsOfServiceTypes returns a boolean if a field has been set. +func (o *CalculateTermsOfServiceStatusResponse) HasTermsOfServiceTypes() bool { + if o != nil && !common.IsNil(o.TermsOfServiceTypes) { + return true + } + + return false +} + +// SetTermsOfServiceTypes gets a reference to the given []string and assigns it to the TermsOfServiceTypes field. +func (o *CalculateTermsOfServiceStatusResponse) SetTermsOfServiceTypes(v []string) { + o.TermsOfServiceTypes = v +} + +func (o CalculateTermsOfServiceStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CalculateTermsOfServiceStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.TermsOfServiceTypes) { + toSerialize["termsOfServiceTypes"] = o.TermsOfServiceTypes + } + return toSerialize, nil +} + +type NullableCalculateTermsOfServiceStatusResponse struct { + value *CalculateTermsOfServiceStatusResponse + isSet bool +} + +func (v NullableCalculateTermsOfServiceStatusResponse) Get() *CalculateTermsOfServiceStatusResponse { + return v.value +} + +func (v *NullableCalculateTermsOfServiceStatusResponse) Set(val *CalculateTermsOfServiceStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCalculateTermsOfServiceStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCalculateTermsOfServiceStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCalculateTermsOfServiceStatusResponse(val *CalculateTermsOfServiceStatusResponse) *NullableCalculateTermsOfServiceStatusResponse { + return &NullableCalculateTermsOfServiceStatusResponse{value: val, isSet: true} +} + +func (v NullableCalculateTermsOfServiceStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCalculateTermsOfServiceStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/model_capability_problem_entity.go b/src/legalentity/model_capability_problem_entity.go index 212161a75..536f7cabd 100644 --- a/src/legalentity/model_capability_problem_entity.go +++ b/src/legalentity/model_capability_problem_entity.go @@ -233,7 +233,7 @@ func (v *NullableCapabilityProblemEntity) UnmarshalJSON(src []byte) error { } func (o *CapabilityProblemEntity) isValidType() bool { - var allowedEnumValues = []string{"BankAccount", "Document", "LegalEntity"} + var allowedEnumValues = []string{"BankAccount", "Document", "LegalEntity", "product"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_capability_problem_entity_recursive.go b/src/legalentity/model_capability_problem_entity_recursive.go index 794c23f03..efef2899f 100644 --- a/src/legalentity/model_capability_problem_entity_recursive.go +++ b/src/legalentity/model_capability_problem_entity_recursive.go @@ -197,7 +197,7 @@ func (v *NullableCapabilityProblemEntityRecursive) UnmarshalJSON(src []byte) err } func (o *CapabilityProblemEntityRecursive) isValidType() bool { - var allowedEnumValues = []string{"BankAccount", "Document", "LegalEntity"} + var allowedEnumValues = []string{"BankAccount", "Document", "LegalEntity", "product"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_document.go b/src/legalentity/model_document.go index 0213c28dd..8980ecbf6 100644 --- a/src/legalentity/model_document.go +++ b/src/legalentity/model_document.go @@ -45,7 +45,7 @@ type Document struct { // The number in the document. Number *string `json:"number,omitempty"` Owner OwnerEntity `json:"owner"` - // Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + // Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). Type string `json:"type"` } @@ -544,7 +544,7 @@ func (v *NullableDocument) UnmarshalJSON(src []byte) error { } func (o *Document) isValidType() bool { - var allowedEnumValues = []string{"bankStatement", "driversLicense", "identityCard", "nationalIdNumber", "passport", "proofOfAddress", "proofOfNationalIdNumber", "proofOfResidency", "registrationDocument", "vatDocument", "proofOfOrganizationTaxInfo", "proofOfIndustry", "constitutionalDocument"} + var allowedEnumValues = []string{"bankStatement", "driversLicense", "identityCard", "nationalIdNumber", "passport", "proofOfAddress", "proofOfNationalIdNumber", "proofOfResidency", "registrationDocument", "vatDocument", "proofOfOrganizationTaxInfo", "proofOfIndustry", "constitutionalDocument", "proofOfFundingOrWealthSource"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_document_page.go b/src/legalentity/model_document_page.go new file mode 100644 index 000000000..cbeed0042 --- /dev/null +++ b/src/legalentity/model_document_page.go @@ -0,0 +1,206 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the DocumentPage type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &DocumentPage{} + +// DocumentPage struct for DocumentPage +type DocumentPage struct { + PageName *string `json:"pageName,omitempty"` + PageNumber *int32 `json:"pageNumber,omitempty"` + Type *string `json:"type,omitempty"` +} + +// NewDocumentPage instantiates a new DocumentPage 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 NewDocumentPage() *DocumentPage { + this := DocumentPage{} + return &this +} + +// NewDocumentPageWithDefaults instantiates a new DocumentPage 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 NewDocumentPageWithDefaults() *DocumentPage { + this := DocumentPage{} + return &this +} + +// GetPageName returns the PageName field value if set, zero value otherwise. +func (o *DocumentPage) GetPageName() string { + if o == nil || common.IsNil(o.PageName) { + var ret string + return ret + } + return *o.PageName +} + +// GetPageNameOk returns a tuple with the PageName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentPage) GetPageNameOk() (*string, bool) { + if o == nil || common.IsNil(o.PageName) { + return nil, false + } + return o.PageName, true +} + +// HasPageName returns a boolean if a field has been set. +func (o *DocumentPage) HasPageName() bool { + if o != nil && !common.IsNil(o.PageName) { + return true + } + + return false +} + +// SetPageName gets a reference to the given string and assigns it to the PageName field. +func (o *DocumentPage) SetPageName(v string) { + o.PageName = &v +} + +// GetPageNumber returns the PageNumber field value if set, zero value otherwise. +func (o *DocumentPage) GetPageNumber() int32 { + if o == nil || common.IsNil(o.PageNumber) { + var ret int32 + return ret + } + return *o.PageNumber +} + +// GetPageNumberOk returns a tuple with the PageNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentPage) GetPageNumberOk() (*int32, bool) { + if o == nil || common.IsNil(o.PageNumber) { + return nil, false + } + return o.PageNumber, true +} + +// HasPageNumber returns a boolean if a field has been set. +func (o *DocumentPage) HasPageNumber() bool { + if o != nil && !common.IsNil(o.PageNumber) { + return true + } + + return false +} + +// SetPageNumber gets a reference to the given int32 and assigns it to the PageNumber field. +func (o *DocumentPage) SetPageNumber(v int32) { + o.PageNumber = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DocumentPage) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentPage) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DocumentPage) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DocumentPage) SetType(v string) { + o.Type = &v +} + +func (o DocumentPage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DocumentPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.PageName) { + toSerialize["pageName"] = o.PageName + } + if !common.IsNil(o.PageNumber) { + toSerialize["pageNumber"] = o.PageNumber + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableDocumentPage struct { + value *DocumentPage + isSet bool +} + +func (v NullableDocumentPage) Get() *DocumentPage { + return v.value +} + +func (v *NullableDocumentPage) Set(val *DocumentPage) { + v.value = val + v.isSet = true +} + +func (v NullableDocumentPage) IsSet() bool { + return v.isSet +} + +func (v *NullableDocumentPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDocumentPage(val *DocumentPage) *NullableDocumentPage { + return &NullableDocumentPage{value: val, isSet: true} +} + +func (v NullableDocumentPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDocumentPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *DocumentPage) isValidType() bool { + var allowedEnumValues = []string{"BACK", "FRONT", "UNDEFINED"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/legalentity/model_document_reference.go b/src/legalentity/model_document_reference.go index d4267d3cf..12c23d00c 100644 --- a/src/legalentity/model_document_reference.go +++ b/src/legalentity/model_document_reference.go @@ -30,6 +30,8 @@ type DocumentReference struct { Id *string `json:"id,omitempty"` // The modification date of the document. ModificationDate *time.Time `json:"modificationDate,omitempty"` + // List of document pages + Pages []DocumentPage `json:"pages,omitempty"` // Type of document, used when providing an ID number or uploading a document. Type *string `json:"type,omitempty"` } @@ -211,6 +213,38 @@ func (o *DocumentReference) SetModificationDate(v time.Time) { o.ModificationDate = &v } +// GetPages returns the Pages field value if set, zero value otherwise. +func (o *DocumentReference) GetPages() []DocumentPage { + if o == nil || common.IsNil(o.Pages) { + var ret []DocumentPage + return ret + } + return o.Pages +} + +// GetPagesOk returns a tuple with the Pages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentReference) GetPagesOk() ([]DocumentPage, bool) { + if o == nil || common.IsNil(o.Pages) { + return nil, false + } + return o.Pages, true +} + +// HasPages returns a boolean if a field has been set. +func (o *DocumentReference) HasPages() bool { + if o != nil && !common.IsNil(o.Pages) { + return true + } + + return false +} + +// SetPages gets a reference to the given []DocumentPage and assigns it to the Pages field. +func (o *DocumentReference) SetPages(v []DocumentPage) { + o.Pages = v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *DocumentReference) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -268,6 +302,9 @@ func (o DocumentReference) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ModificationDate) { toSerialize["modificationDate"] = o.ModificationDate } + if !common.IsNil(o.Pages) { + toSerialize["pages"] = o.Pages + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/legalentity/model_identification_data.go b/src/legalentity/model_identification_data.go index df446c9d7..b77ccc581 100644 --- a/src/legalentity/model_identification_data.go +++ b/src/legalentity/model_identification_data.go @@ -33,7 +33,7 @@ type IdentificationData struct { NationalIdExempt *bool `json:"nationalIdExempt,omitempty"` // The number in the document. Number *string `json:"number,omitempty"` - // Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. When providing ID numbers: * For **individual**, the `type` values can be **driversLicense**, **identityCard**, **nationalIdNumber**, or **passport**. When uploading photo IDs: * For **individual**, the `type` values can be **identityCard**, **driversLicense**, or **passport**. When uploading other documents: * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, or **proofOfIndustry**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, or **proofOfIndividualTaxId**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + // Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). Type string `json:"type"` } @@ -346,7 +346,7 @@ func (v *NullableIdentificationData) UnmarshalJSON(src []byte) error { } func (o *IdentificationData) isValidType() bool { - var allowedEnumValues = []string{"bankStatement", "driversLicense", "identityCard", "nationalIdNumber", "passport", "proofOfAddress", "proofOfNationalIdNumber", "proofOfResidency", "registrationDocument", "vatDocument", "proofOfOrganizationTaxInfo", "proofOfIndustry", "constitutionalDocument"} + var allowedEnumValues = []string{"bankStatement", "driversLicense", "identityCard", "nationalIdNumber", "passport", "proofOfAddress", "proofOfNationalIdNumber", "proofOfResidency", "registrationDocument", "vatDocument", "proofOfOrganizationTaxInfo", "proofOfIndustry", "constitutionalDocument", "proofOfFundingOrWealthSource"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_legal_entity.go b/src/legalentity/model_legal_entity.go index cec1febf4..0d2bf6ef6 100644 --- a/src/legalentity/model_legal_entity.go +++ b/src/legalentity/model_legal_entity.go @@ -41,6 +41,8 @@ type LegalEntity struct { TransferInstruments []TransferInstrumentReference `json:"transferInstruments,omitempty"` // The type of legal entity. Possible values: **individual**, **organization**, or **soleProprietorship**. Type *string `json:"type,omitempty"` + // List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. + VerificationDeadlines []VerificationDeadline `json:"verificationDeadlines,omitempty"` } // NewLegalEntity instantiates a new LegalEntity object @@ -440,6 +442,38 @@ func (o *LegalEntity) SetType(v string) { o.Type = &v } +// GetVerificationDeadlines returns the VerificationDeadlines field value if set, zero value otherwise. +func (o *LegalEntity) GetVerificationDeadlines() []VerificationDeadline { + if o == nil || common.IsNil(o.VerificationDeadlines) { + var ret []VerificationDeadline + return ret + } + return o.VerificationDeadlines +} + +// GetVerificationDeadlinesOk returns a tuple with the VerificationDeadlines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegalEntity) GetVerificationDeadlinesOk() ([]VerificationDeadline, bool) { + if o == nil || common.IsNil(o.VerificationDeadlines) { + return nil, false + } + return o.VerificationDeadlines, true +} + +// HasVerificationDeadlines returns a boolean if a field has been set. +func (o *LegalEntity) HasVerificationDeadlines() bool { + if o != nil && !common.IsNil(o.VerificationDeadlines) { + return true + } + + return false +} + +// SetVerificationDeadlines gets a reference to the given []VerificationDeadline and assigns it to the VerificationDeadlines field. +func (o *LegalEntity) SetVerificationDeadlines(v []VerificationDeadline) { + o.VerificationDeadlines = v +} + func (o LegalEntity) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -484,6 +518,9 @@ func (o LegalEntity) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.VerificationDeadlines) { + toSerialize["verificationDeadlines"] = o.VerificationDeadlines + } return toSerialize, nil } diff --git a/src/legalentity/model_legal_entity_association.go b/src/legalentity/model_legal_entity_association.go index c9c069657..c9eb1cc31 100644 --- a/src/legalentity/model_legal_entity_association.go +++ b/src/legalentity/model_legal_entity_association.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &LegalEntityAssociation{} type LegalEntityAssociation struct { // The unique identifier of another legal entity with which the `legalEntityId` is associated. When the `legalEntityId` is associated to legal entities other than the current one, the response returns all the associations. AssociatorId *string `json:"associatorId,omitempty"` - // The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. + // The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. EntityType *string `json:"entityType,omitempty"` // The individual's job title if the `type` is **uboThroughControl** or **signatory**. JobTitle *string `json:"jobTitle,omitempty"` @@ -29,7 +29,7 @@ type LegalEntityAssociation struct { LegalEntityId string `json:"legalEntityId"` // The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`. Name *string `json:"name,omitempty"` - // Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. + // Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Type string `json:"type"` } diff --git a/src/legalentity/model_onboarding_link_info.go b/src/legalentity/model_onboarding_link_info.go index f3371d8fa..67faf48b6 100644 --- a/src/legalentity/model_onboarding_link_info.go +++ b/src/legalentity/model_onboarding_link_info.go @@ -23,7 +23,7 @@ type OnboardingLinkInfo struct { Locale *string `json:"locale,omitempty"` // The URL where the user is redirected after they complete hosted onboarding. RedirectUrl *string `json:"redirectUrl,omitempty"` - // Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. By default, the values are set to **true**. Set to **false** to not allow the action. Possible keys: - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. + // Boolean key-value pairs indicating the settings for the hosted onboarding page. The keys are the settings. Possible keys: By default, these values are set to **true**. Set to **false** to not allow the action. - **changeLegalEntityType**: The user can change their legal entity type. - **editPrefilledCountry**: The user can change the country of their legal entity's address, for example the registered address of an organization. By default, this value is set to **false**. Set to **true** to allow the action. - **allowIntraRegionCrossBorderPayout**: The user can select a payout account in a different EU/EEA country than the country of their legal entity. Settings *map[string]bool `json:"settings,omitempty"` // The unique identifier of the hosted onboarding theme. ThemeId *string `json:"themeId,omitempty"` diff --git a/src/legalentity/model_organization.go b/src/legalentity/model_organization.go index 33bf7f581..bedd070de 100644 --- a/src/legalentity/model_organization.go +++ b/src/legalentity/model_organization.go @@ -38,7 +38,7 @@ type Organization struct { // The tax information of the organization. TaxInformation []TaxInformation `json:"taxInformation,omitempty"` TaxReportingClassification *TaxReportingClassification `json:"taxReportingClassification,omitempty"` - // Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. + // Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. Type *string `json:"type,omitempty"` // The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. VatAbsenceReason *string `json:"vatAbsenceReason,omitempty"` diff --git a/src/legalentity/model_sg_local_account_identification.go b/src/legalentity/model_sg_local_account_identification.go new file mode 100644 index 000000000..30edf4c08 --- /dev/null +++ b/src/legalentity/model_sg_local_account_identification.go @@ -0,0 +1,195 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the SGLocalAccountIdentification type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SGLocalAccountIdentification{} + +// SGLocalAccountIdentification struct for SGLocalAccountIdentification +type SGLocalAccountIdentification struct { + // The 4- to 19-digit bank account number, without separators or whitespace. + AccountNumber string `json:"accountNumber"` + // The bank's 8- or 11-character BIC or SWIFT code. + Bic string `json:"bic"` + // **sgLocal** + Type *string `json:"type,omitempty"` +} + +// NewSGLocalAccountIdentification instantiates a new SGLocalAccountIdentification 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 NewSGLocalAccountIdentification(accountNumber string, bic string) *SGLocalAccountIdentification { + this := SGLocalAccountIdentification{} + this.AccountNumber = accountNumber + this.Bic = bic + var type_ string = "sgLocal" + this.Type = &type_ + return &this +} + +// NewSGLocalAccountIdentificationWithDefaults instantiates a new SGLocalAccountIdentification 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 NewSGLocalAccountIdentificationWithDefaults() *SGLocalAccountIdentification { + this := SGLocalAccountIdentification{} + var type_ string = "sgLocal" + this.Type = &type_ + return &this +} + +// GetAccountNumber returns the AccountNumber field value +func (o *SGLocalAccountIdentification) GetAccountNumber() string { + if o == nil { + var ret string + return ret + } + + return o.AccountNumber +} + +// GetAccountNumberOk returns a tuple with the AccountNumber field value +// and a boolean to check if the value has been set. +func (o *SGLocalAccountIdentification) GetAccountNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountNumber, true +} + +// SetAccountNumber sets field value +func (o *SGLocalAccountIdentification) SetAccountNumber(v string) { + o.AccountNumber = v +} + +// GetBic returns the Bic field value +func (o *SGLocalAccountIdentification) GetBic() string { + if o == nil { + var ret string + return ret + } + + return o.Bic +} + +// GetBicOk returns a tuple with the Bic field value +// and a boolean to check if the value has been set. +func (o *SGLocalAccountIdentification) GetBicOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Bic, true +} + +// SetBic sets field value +func (o *SGLocalAccountIdentification) SetBic(v string) { + o.Bic = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *SGLocalAccountIdentification) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SGLocalAccountIdentification) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *SGLocalAccountIdentification) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *SGLocalAccountIdentification) SetType(v string) { + o.Type = &v +} + +func (o SGLocalAccountIdentification) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SGLocalAccountIdentification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["accountNumber"] = o.AccountNumber + toSerialize["bic"] = o.Bic + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableSGLocalAccountIdentification struct { + value *SGLocalAccountIdentification + isSet bool +} + +func (v NullableSGLocalAccountIdentification) Get() *SGLocalAccountIdentification { + return v.value +} + +func (v *NullableSGLocalAccountIdentification) Set(val *SGLocalAccountIdentification) { + v.value = val + v.isSet = true +} + +func (v NullableSGLocalAccountIdentification) IsSet() bool { + return v.isSet +} + +func (v *NullableSGLocalAccountIdentification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSGLocalAccountIdentification(val *SGLocalAccountIdentification) *NullableSGLocalAccountIdentification { + return &NullableSGLocalAccountIdentification{value: val, isSet: true} +} + +func (v NullableSGLocalAccountIdentification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSGLocalAccountIdentification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *SGLocalAccountIdentification) isValidType() bool { + var allowedEnumValues = []string{"sgLocal"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/legalentity/model_transfer_instrument_reference.go b/src/legalentity/model_transfer_instrument_reference.go index d77bb108e..2e9c15a29 100644 --- a/src/legalentity/model_transfer_instrument_reference.go +++ b/src/legalentity/model_transfer_instrument_reference.go @@ -25,7 +25,7 @@ type TransferInstrumentReference struct { Id string `json:"id"` // Four last digits of the bank account number. RealLastFour *string `json:"realLastFour,omitempty"` - // Identifies if the TI was created from a trusted source. + // Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). TrustedSource *bool `json:"trustedSource,omitempty"` } diff --git a/src/legalentity/model_verification_deadline.go b/src/legalentity/model_verification_deadline.go new file mode 100644 index 000000000..009afa7ac --- /dev/null +++ b/src/legalentity/model_verification_deadline.go @@ -0,0 +1,145 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the VerificationDeadline type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &VerificationDeadline{} + +// VerificationDeadline struct for VerificationDeadline +type VerificationDeadline struct { + // The names of the capabilities to be disallowed. + Capabilities []string `json:"capabilities"` + // The date that verification is due by before capabilities are disallowed. + ExpiresAt time.Time `json:"expiresAt"` +} + +// NewVerificationDeadline instantiates a new VerificationDeadline 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 NewVerificationDeadline(capabilities []string, expiresAt time.Time) *VerificationDeadline { + this := VerificationDeadline{} + this.Capabilities = capabilities + this.ExpiresAt = expiresAt + return &this +} + +// NewVerificationDeadlineWithDefaults instantiates a new VerificationDeadline 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 NewVerificationDeadlineWithDefaults() *VerificationDeadline { + this := VerificationDeadline{} + return &this +} + +// GetCapabilities returns the Capabilities field value +func (o *VerificationDeadline) GetCapabilities() []string { + if o == nil { + var ret []string + return ret + } + + return o.Capabilities +} + +// GetCapabilitiesOk returns a tuple with the Capabilities field value +// and a boolean to check if the value has been set. +func (o *VerificationDeadline) GetCapabilitiesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Capabilities, true +} + +// SetCapabilities sets field value +func (o *VerificationDeadline) SetCapabilities(v []string) { + o.Capabilities = v +} + +// GetExpiresAt returns the ExpiresAt field value +func (o *VerificationDeadline) GetExpiresAt() time.Time { + if o == nil { + var ret time.Time + 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 *VerificationDeadline) GetExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.ExpiresAt, true +} + +// SetExpiresAt sets field value +func (o *VerificationDeadline) SetExpiresAt(v time.Time) { + o.ExpiresAt = v +} + +func (o VerificationDeadline) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerificationDeadline) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["capabilities"] = o.Capabilities + toSerialize["expiresAt"] = o.ExpiresAt + return toSerialize, nil +} + +type NullableVerificationDeadline struct { + value *VerificationDeadline + isSet bool +} + +func (v NullableVerificationDeadline) Get() *VerificationDeadline { + return v.value +} + +func (v *NullableVerificationDeadline) Set(val *VerificationDeadline) { + v.value = val + v.isSet = true +} + +func (v NullableVerificationDeadline) IsSet() bool { + return v.isSet +} + +func (v *NullableVerificationDeadline) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerificationDeadline(val *VerificationDeadline) *NullableVerificationDeadline { + return &NullableVerificationDeadline{value: val, isSet: true} +} + +func (v NullableVerificationDeadline) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerificationDeadline) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/model_verification_error.go b/src/legalentity/model_verification_error.go index a05deebe8..c5d14878f 100644 --- a/src/legalentity/model_verification_error.go +++ b/src/legalentity/model_verification_error.go @@ -310,7 +310,7 @@ func (v *NullableVerificationError) UnmarshalJSON(src []byte) error { } func (o *VerificationError) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus", "rejected"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_verification_error_recursive.go b/src/legalentity/model_verification_error_recursive.go index 7c2b96a1a..8f2f15844 100644 --- a/src/legalentity/model_verification_error_recursive.go +++ b/src/legalentity/model_verification_error_recursive.go @@ -273,7 +273,7 @@ func (v *NullableVerificationErrorRecursive) UnmarshalJSON(src []byte) error { } func (o *VerificationErrorRecursive) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus", "rejected"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/management/api_split_configuration_merchant_level.go b/src/management/api_split_configuration_merchant_level.go new file mode 100644 index 000000000..22787f5a2 --- /dev/null +++ b/src/management/api_split_configuration_merchant_level.go @@ -0,0 +1,941 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "context" + "encoding/json" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// SplitConfigurationMerchantLevelApi service +type SplitConfigurationMerchantLevelApi common.Service + +// All parameters accepted by SplitConfigurationMerchantLevelApi.CreateRule +type SplitConfigurationMerchantLevelApiCreateRuleInput struct { + merchantId string + splitConfigurationId string + splitConfigurationRule *SplitConfigurationRule +} + +func (r SplitConfigurationMerchantLevelApiCreateRuleInput) SplitConfigurationRule(splitConfigurationRule SplitConfigurationRule) SplitConfigurationMerchantLevelApiCreateRuleInput { + r.splitConfigurationRule = &splitConfigurationRule + return r +} + +/* +Prepare a request for CreateRule +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration. +@return SplitConfigurationMerchantLevelApiCreateRuleInput +*/ +func (a *SplitConfigurationMerchantLevelApi) CreateRuleInput(merchantId string, splitConfigurationId string) SplitConfigurationMerchantLevelApiCreateRuleInput { + return SplitConfigurationMerchantLevelApiCreateRuleInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + } +} + +/* +CreateRule Create a rule + +Creates a rule in the split configuration specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiCreateRuleInput - Request parameters, see CreateRuleInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) CreateRule(ctx context.Context, r SplitConfigurationMerchantLevelApiCreateRuleInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.splitConfigurationRule, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.CreateSplitConfiguration +type SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput struct { + merchantId string + splitConfiguration *SplitConfiguration +} + +func (r SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput) SplitConfiguration(splitConfiguration SplitConfiguration) SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput { + r.splitConfiguration = &splitConfiguration + return r +} + +/* +Prepare a request for CreateSplitConfiguration +@param merchantId The unique identifier of the merchant account. +@return SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput +*/ +func (a *SplitConfigurationMerchantLevelApi) CreateSplitConfigurationInput(merchantId string) SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput { + return SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput{ + merchantId: merchantId, + } +} + +/* +CreateSplitConfiguration Create a split configuration + +Creates a split configuration for the merchant account specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput - Request parameters, see CreateSplitConfigurationInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) CreateSplitConfiguration(ctx context.Context, r SplitConfigurationMerchantLevelApiCreateSplitConfigurationInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.splitConfiguration, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.DeleteSplitConfiguration +type SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput struct { + merchantId string + splitConfigurationId string +} + +/* +Prepare a request for DeleteSplitConfiguration +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration. +@return SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput +*/ +func (a *SplitConfigurationMerchantLevelApi) DeleteSplitConfigurationInput(merchantId string, splitConfigurationId string) SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput { + return SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + } +} + +/* +DeleteSplitConfiguration Delete a split configuration + +Deletes the split configuration specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput - Request parameters, see DeleteSplitConfigurationInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) DeleteSplitConfiguration(ctx context.Context, r SplitConfigurationMerchantLevelApiDeleteSplitConfigurationInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.DeleteSplitConfigurationRule +type SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput struct { + merchantId string + splitConfigurationId string + ruleId string +} + +/* +Prepare a request for DeleteSplitConfigurationRule +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration.@param ruleId +@return SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput +*/ +func (a *SplitConfigurationMerchantLevelApi) DeleteSplitConfigurationRuleInput(merchantId string, splitConfigurationId string, ruleId string) SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput { + return SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + ruleId: ruleId, + } +} + +/* +DeleteSplitConfigurationRule Delete a split configuration rule + +Deletes the split configuration rule specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput - Request parameters, see DeleteSplitConfigurationRuleInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) DeleteSplitConfigurationRule(ctx context.Context, r SplitConfigurationMerchantLevelApiDeleteSplitConfigurationRuleInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + path = strings.Replace(path, "{"+"ruleId"+"}", url.PathEscape(common.ParameterValueToString(r.ruleId, "ruleId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.GetSplitConfiguration +type SplitConfigurationMerchantLevelApiGetSplitConfigurationInput struct { + merchantId string + splitConfigurationId string +} + +/* +Prepare a request for GetSplitConfiguration +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration. +@return SplitConfigurationMerchantLevelApiGetSplitConfigurationInput +*/ +func (a *SplitConfigurationMerchantLevelApi) GetSplitConfigurationInput(merchantId string, splitConfigurationId string) SplitConfigurationMerchantLevelApiGetSplitConfigurationInput { + return SplitConfigurationMerchantLevelApiGetSplitConfigurationInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + } +} + +/* +GetSplitConfiguration Get a split configuration + +Returns the split configuration specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiGetSplitConfigurationInput - Request parameters, see GetSplitConfigurationInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) GetSplitConfiguration(ctx context.Context, r SplitConfigurationMerchantLevelApiGetSplitConfigurationInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.ListSplitConfigurations +type SplitConfigurationMerchantLevelApiListSplitConfigurationsInput struct { + merchantId string +} + +/* +Prepare a request for ListSplitConfigurations +@param merchantId The unique identifier of the merchant account. +@return SplitConfigurationMerchantLevelApiListSplitConfigurationsInput +*/ +func (a *SplitConfigurationMerchantLevelApi) ListSplitConfigurationsInput(merchantId string) SplitConfigurationMerchantLevelApiListSplitConfigurationsInput { + return SplitConfigurationMerchantLevelApiListSplitConfigurationsInput{ + merchantId: merchantId, + } +} + +/* +ListSplitConfigurations Get a list of split configurations + +Returns the list of split configurations for the merchant account. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiListSplitConfigurationsInput - Request parameters, see ListSplitConfigurationsInput +@return SplitConfigurationList, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) ListSplitConfigurations(ctx context.Context, r SplitConfigurationMerchantLevelApiListSplitConfigurationsInput) (SplitConfigurationList, *http.Response, error) { + res := &SplitConfigurationList{} + path := "/merchants/{merchantId}/splitConfigurations" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.UpdateSplitConditions +type SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput struct { + merchantId string + splitConfigurationId string + ruleId string + updateSplitConfigurationRuleRequest *UpdateSplitConfigurationRuleRequest +} + +func (r SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput) UpdateSplitConfigurationRuleRequest(updateSplitConfigurationRuleRequest UpdateSplitConfigurationRuleRequest) SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput { + r.updateSplitConfigurationRuleRequest = &updateSplitConfigurationRuleRequest + return r +} + +/* +Prepare a request for UpdateSplitConditions +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The identifier of the split configuration.@param ruleId The unique identifier of the split configuration rule. +@return SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitConditionsInput(merchantId string, splitConfigurationId string, ruleId string) SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput { + return SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + ruleId: ruleId, + } +} + +/* +UpdateSplitConditions Update split conditions + +Changes the conditions of the split configuration rule specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput - Request parameters, see UpdateSplitConditionsInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitConditions(ctx context.Context, r SplitConfigurationMerchantLevelApiUpdateSplitConditionsInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + path = strings.Replace(path, "{"+"ruleId"+"}", url.PathEscape(common.ParameterValueToString(r.ruleId, "ruleId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.updateSplitConfigurationRuleRequest, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.UpdateSplitConfigurationDescription +type SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput struct { + merchantId string + splitConfigurationId string + updateSplitConfigurationRequest *UpdateSplitConfigurationRequest +} + +func (r SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput) UpdateSplitConfigurationRequest(updateSplitConfigurationRequest UpdateSplitConfigurationRequest) SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput { + r.updateSplitConfigurationRequest = &updateSplitConfigurationRequest + return r +} + +/* +Prepare a request for UpdateSplitConfigurationDescription +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration. +@return SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitConfigurationDescriptionInput(merchantId string, splitConfigurationId string) SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput { + return SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + } +} + +/* +UpdateSplitConfigurationDescription Update split configuration description + +Changes the description of the split configuration specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput - Request parameters, see UpdateSplitConfigurationDescriptionInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitConfigurationDescription(ctx context.Context, r SplitConfigurationMerchantLevelApiUpdateSplitConfigurationDescriptionInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.updateSplitConfigurationRequest, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SplitConfigurationMerchantLevelApi.UpdateSplitLogic +type SplitConfigurationMerchantLevelApiUpdateSplitLogicInput struct { + merchantId string + splitConfigurationId string + ruleId string + splitLogicId string + updateSplitConfigurationLogicRequest *UpdateSplitConfigurationLogicRequest +} + +func (r SplitConfigurationMerchantLevelApiUpdateSplitLogicInput) UpdateSplitConfigurationLogicRequest(updateSplitConfigurationLogicRequest UpdateSplitConfigurationLogicRequest) SplitConfigurationMerchantLevelApiUpdateSplitLogicInput { + r.updateSplitConfigurationLogicRequest = &updateSplitConfigurationLogicRequest + return r +} + +/* +Prepare a request for UpdateSplitLogic +@param merchantId The unique identifier of the merchant account.@param splitConfigurationId The unique identifier of the split configuration.@param ruleId The unique identifier of the split configuration rule.@param splitLogicId The unique identifier of the split configuration split. +@return SplitConfigurationMerchantLevelApiUpdateSplitLogicInput +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitLogicInput(merchantId string, splitConfigurationId string, ruleId string, splitLogicId string) SplitConfigurationMerchantLevelApiUpdateSplitLogicInput { + return SplitConfigurationMerchantLevelApiUpdateSplitLogicInput{ + merchantId: merchantId, + splitConfigurationId: splitConfigurationId, + ruleId: ruleId, + splitLogicId: splitLogicId, + } +} + +/* +UpdateSplitLogic Update the split logic + +Changes the split logic specified in the path. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API - SplitConfiguration read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SplitConfigurationMerchantLevelApiUpdateSplitLogicInput - Request parameters, see UpdateSplitLogicInput +@return SplitConfiguration, *http.Response, error +*/ +func (a *SplitConfigurationMerchantLevelApi) UpdateSplitLogic(ctx context.Context, r SplitConfigurationMerchantLevelApiUpdateSplitLogicInput) (SplitConfiguration, *http.Response, error) { + res := &SplitConfiguration{} + path := "/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}" + path = strings.Replace(path, "{"+"merchantId"+"}", url.PathEscape(common.ParameterValueToString(r.merchantId, "merchantId")), -1) + path = strings.Replace(path, "{"+"splitConfigurationId"+"}", url.PathEscape(common.ParameterValueToString(r.splitConfigurationId, "splitConfigurationId")), -1) + path = strings.Replace(path, "{"+"ruleId"+"}", url.PathEscape(common.ParameterValueToString(r.ruleId, "ruleId")), -1) + path = strings.Replace(path, "{"+"splitLogicId"+"}", url.PathEscape(common.ParameterValueToString(r.splitLogicId, "splitLogicId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.updateSplitConfigurationLogicRequest, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/management/api_terminal_actions_company_level.go b/src/management/api_terminal_actions_company_level.go index 96d297d11..ebb4949a9 100644 --- a/src/management/api_terminal_actions_company_level.go +++ b/src/management/api_terminal_actions_company_level.go @@ -122,9 +122,11 @@ func (a *TerminalActionsCompanyLevelApi) GetTerminalAction(ctx context.Context, // All parameters accepted by TerminalActionsCompanyLevelApi.ListAndroidApps type TerminalActionsCompanyLevelApiListAndroidAppsInput struct { - companyId string - pageNumber *int32 - pageSize *int32 + companyId string + pageNumber *int32 + pageSize *int32 + packageName *string + versionCode *int32 } // The number of the page to fetch. @@ -139,6 +141,18 @@ func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) PageSize(pageSize in return r } +// The package name that uniquely identifies the Android app. +func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) PackageName(packageName string) TerminalActionsCompanyLevelApiListAndroidAppsInput { + r.packageName = &packageName + return r +} + +// The version number of the app. +func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) VersionCode(versionCode int32) TerminalActionsCompanyLevelApiListAndroidAppsInput { + r.versionCode = &versionCode + return r +} + /* Prepare a request for ListAndroidApps @param companyId The unique identifier of the company account. @@ -176,6 +190,12 @@ func (a *TerminalActionsCompanyLevelApi) ListAndroidApps(ctx context.Context, r if r.pageSize != nil { common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") } + if r.packageName != nil { + common.ParameterAddToQuery(queryParams, "packageName", r.packageName, "") + } + if r.versionCode != nil { + common.ParameterAddToQuery(queryParams, "versionCode", r.versionCode, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, @@ -239,9 +259,10 @@ func (a *TerminalActionsCompanyLevelApi) ListAndroidApps(ctx context.Context, r // All parameters accepted by TerminalActionsCompanyLevelApi.ListAndroidCertificates type TerminalActionsCompanyLevelApiListAndroidCertificatesInput struct { - companyId string - pageNumber *int32 - pageSize *int32 + companyId string + pageNumber *int32 + pageSize *int32 + certificateName *string } // The number of the page to fetch. @@ -256,6 +277,12 @@ func (r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) PageSize(pag return r } +// The name of the certificate. +func (r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) CertificateName(certificateName string) TerminalActionsCompanyLevelApiListAndroidCertificatesInput { + r.certificateName = &certificateName + return r +} + /* Prepare a request for ListAndroidCertificates @param companyId The unique identifier of the company account. @@ -293,6 +320,9 @@ func (a *TerminalActionsCompanyLevelApi) ListAndroidCertificates(ctx context.Con if r.pageSize != nil { common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") } + if r.certificateName != nil { + common.ParameterAddToQuery(queryParams, "certificateName", r.certificateName, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, diff --git a/src/management/api_terminals_terminal_level.go b/src/management/api_terminals_terminal_level.go index 4c3e48add..d41f23f32 100644 --- a/src/management/api_terminals_terminal_level.go +++ b/src/management/api_terminals_terminal_level.go @@ -24,6 +24,7 @@ type TerminalsTerminalLevelApi common.Service // All parameters accepted by TerminalsTerminalLevelApi.ListTerminals type TerminalsTerminalLevelApiListTerminalsInput struct { searchQuery *string + otpQuery *string countries *string merchantIds *string storeIds *string @@ -38,6 +39,12 @@ func (r TerminalsTerminalLevelApiListTerminalsInput) SearchQuery(searchQuery str return r } +// Returns one or more terminals associated with the one-time passwords specified in the request. If this query parameter is used, other query parameters are ignored. +func (r TerminalsTerminalLevelApiListTerminalsInput) OtpQuery(otpQuery string) TerminalsTerminalLevelApiListTerminalsInput { + r.otpQuery = &otpQuery + return r +} + // Returns terminals located in the countries specified by their [two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). func (r TerminalsTerminalLevelApiListTerminalsInput) Countries(countries string) TerminalsTerminalLevelApiListTerminalsInput { r.countries = &countries @@ -87,8 +94,6 @@ func (a *TerminalsTerminalLevelApi) ListTerminalsInput() TerminalsTerminalLevelA ListTerminals Get a list of terminals Returns the payment terminals that the API credential has access to and that match the query parameters. -When using `searchQuery`, other query parameters are ignored. - To make this request, your API credential must have the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API — Terminal actions read @@ -104,6 +109,9 @@ func (a *TerminalsTerminalLevelApi) ListTerminals(ctx context.Context, r Termina if r.searchQuery != nil { common.ParameterAddToQuery(queryParams, "searchQuery", r.searchQuery, "") } + if r.otpQuery != nil { + common.ParameterAddToQuery(queryParams, "otpQuery", r.otpQuery, "") + } if r.countries != nil { common.ParameterAddToQuery(queryParams, "countries", r.countries, "") } diff --git a/src/management/client.go b/src/management/client.go index 7dc3eeac5..7463855c3 100644 --- a/src/management/client.go +++ b/src/management/client.go @@ -47,6 +47,8 @@ type APIClient struct { PayoutSettingsMerchantLevelApi *PayoutSettingsMerchantLevelApi + SplitConfigurationMerchantLevelApi *SplitConfigurationMerchantLevelApi + TerminalActionsCompanyLevelApi *TerminalActionsCompanyLevelApi TerminalActionsTerminalLevelApi *TerminalActionsTerminalLevelApi @@ -97,6 +99,7 @@ func NewAPIClient(client *common.Client) *APIClient { c.MyAPICredentialApi = (*MyAPICredentialApi)(&c.common) c.PaymentMethodsMerchantLevelApi = (*PaymentMethodsMerchantLevelApi)(&c.common) c.PayoutSettingsMerchantLevelApi = (*PayoutSettingsMerchantLevelApi)(&c.common) + c.SplitConfigurationMerchantLevelApi = (*SplitConfigurationMerchantLevelApi)(&c.common) c.TerminalActionsCompanyLevelApi = (*TerminalActionsCompanyLevelApi)(&c.common) c.TerminalActionsTerminalLevelApi = (*TerminalActionsTerminalLevelApi)(&c.common) c.TerminalOrdersCompanyLevelApi = (*TerminalOrdersCompanyLevelApi)(&c.common) diff --git a/src/management/model_additional_commission.go b/src/management/model_additional_commission.go new file mode 100644 index 000000000..296fefc6a --- /dev/null +++ b/src/management/model_additional_commission.go @@ -0,0 +1,199 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the AdditionalCommission type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AdditionalCommission{} + +// AdditionalCommission struct for AdditionalCommission +type AdditionalCommission struct { + // Unique identifier of the balance account to which the additional commission is booked. + BalanceAccountId *string `json:"balanceAccountId,omitempty"` + // A fixed commission fee, in minor units. + FixedAmount *int64 `json:"fixedAmount,omitempty"` + // A variable commission fee, in basis points. + VariablePercentage *int64 `json:"variablePercentage,omitempty"` +} + +// NewAdditionalCommission instantiates a new AdditionalCommission 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 NewAdditionalCommission() *AdditionalCommission { + this := AdditionalCommission{} + return &this +} + +// NewAdditionalCommissionWithDefaults instantiates a new AdditionalCommission 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 NewAdditionalCommissionWithDefaults() *AdditionalCommission { + this := AdditionalCommission{} + return &this +} + +// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. +func (o *AdditionalCommission) GetBalanceAccountId() string { + if o == nil || common.IsNil(o.BalanceAccountId) { + var ret string + return ret + } + return *o.BalanceAccountId +} + +// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalCommission) GetBalanceAccountIdOk() (*string, bool) { + if o == nil || common.IsNil(o.BalanceAccountId) { + return nil, false + } + return o.BalanceAccountId, true +} + +// HasBalanceAccountId returns a boolean if a field has been set. +func (o *AdditionalCommission) HasBalanceAccountId() bool { + if o != nil && !common.IsNil(o.BalanceAccountId) { + return true + } + + return false +} + +// SetBalanceAccountId gets a reference to the given string and assigns it to the BalanceAccountId field. +func (o *AdditionalCommission) SetBalanceAccountId(v string) { + o.BalanceAccountId = &v +} + +// GetFixedAmount returns the FixedAmount field value if set, zero value otherwise. +func (o *AdditionalCommission) GetFixedAmount() int64 { + if o == nil || common.IsNil(o.FixedAmount) { + var ret int64 + return ret + } + return *o.FixedAmount +} + +// GetFixedAmountOk returns a tuple with the FixedAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalCommission) GetFixedAmountOk() (*int64, bool) { + if o == nil || common.IsNil(o.FixedAmount) { + return nil, false + } + return o.FixedAmount, true +} + +// HasFixedAmount returns a boolean if a field has been set. +func (o *AdditionalCommission) HasFixedAmount() bool { + if o != nil && !common.IsNil(o.FixedAmount) { + return true + } + + return false +} + +// SetFixedAmount gets a reference to the given int64 and assigns it to the FixedAmount field. +func (o *AdditionalCommission) SetFixedAmount(v int64) { + o.FixedAmount = &v +} + +// GetVariablePercentage returns the VariablePercentage field value if set, zero value otherwise. +func (o *AdditionalCommission) GetVariablePercentage() int64 { + if o == nil || common.IsNil(o.VariablePercentage) { + var ret int64 + return ret + } + return *o.VariablePercentage +} + +// GetVariablePercentageOk returns a tuple with the VariablePercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalCommission) GetVariablePercentageOk() (*int64, bool) { + if o == nil || common.IsNil(o.VariablePercentage) { + return nil, false + } + return o.VariablePercentage, true +} + +// HasVariablePercentage returns a boolean if a field has been set. +func (o *AdditionalCommission) HasVariablePercentage() bool { + if o != nil && !common.IsNil(o.VariablePercentage) { + return true + } + + return false +} + +// SetVariablePercentage gets a reference to the given int64 and assigns it to the VariablePercentage field. +func (o *AdditionalCommission) SetVariablePercentage(v int64) { + o.VariablePercentage = &v +} + +func (o AdditionalCommission) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AdditionalCommission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.BalanceAccountId) { + toSerialize["balanceAccountId"] = o.BalanceAccountId + } + if !common.IsNil(o.FixedAmount) { + toSerialize["fixedAmount"] = o.FixedAmount + } + if !common.IsNil(o.VariablePercentage) { + toSerialize["variablePercentage"] = o.VariablePercentage + } + return toSerialize, nil +} + +type NullableAdditionalCommission struct { + value *AdditionalCommission + isSet bool +} + +func (v NullableAdditionalCommission) Get() *AdditionalCommission { + return v.value +} + +func (v *NullableAdditionalCommission) Set(val *AdditionalCommission) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalCommission) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalCommission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalCommission(val *AdditionalCommission) *NullableAdditionalCommission { + return &NullableAdditionalCommission{value: val, isSet: true} +} + +func (v NullableAdditionalCommission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAdditionalCommission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_afterpay_touch_info.go b/src/management/model_afterpay_touch_info.go new file mode 100644 index 000000000..8f2251aa4 --- /dev/null +++ b/src/management/model_afterpay_touch_info.go @@ -0,0 +1,116 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the AfterpayTouchInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AfterpayTouchInfo{} + +// AfterpayTouchInfo struct for AfterpayTouchInfo +type AfterpayTouchInfo struct { + // Support Url + SupportUrl string `json:"supportUrl"` +} + +// NewAfterpayTouchInfo instantiates a new AfterpayTouchInfo 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 NewAfterpayTouchInfo(supportUrl string) *AfterpayTouchInfo { + this := AfterpayTouchInfo{} + this.SupportUrl = supportUrl + return &this +} + +// NewAfterpayTouchInfoWithDefaults instantiates a new AfterpayTouchInfo 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 NewAfterpayTouchInfoWithDefaults() *AfterpayTouchInfo { + this := AfterpayTouchInfo{} + return &this +} + +// GetSupportUrl returns the SupportUrl field value +func (o *AfterpayTouchInfo) GetSupportUrl() string { + if o == nil { + var ret string + return ret + } + + return o.SupportUrl +} + +// GetSupportUrlOk returns a tuple with the SupportUrl field value +// and a boolean to check if the value has been set. +func (o *AfterpayTouchInfo) GetSupportUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SupportUrl, true +} + +// SetSupportUrl sets field value +func (o *AfterpayTouchInfo) SetSupportUrl(v string) { + o.SupportUrl = v +} + +func (o AfterpayTouchInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AfterpayTouchInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["supportUrl"] = o.SupportUrl + return toSerialize, nil +} + +type NullableAfterpayTouchInfo struct { + value *AfterpayTouchInfo + isSet bool +} + +func (v NullableAfterpayTouchInfo) Get() *AfterpayTouchInfo { + return v.value +} + +func (v *NullableAfterpayTouchInfo) Set(val *AfterpayTouchInfo) { + v.value = val + v.isSet = true +} + +func (v NullableAfterpayTouchInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableAfterpayTouchInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAfterpayTouchInfo(val *AfterpayTouchInfo) *NullableAfterpayTouchInfo { + return &NullableAfterpayTouchInfo{value: val, isSet: true} +} + +func (v NullableAfterpayTouchInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAfterpayTouchInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_android_app.go b/src/management/model_android_app.go index 1e3891950..67f84b5b7 100644 --- a/src/management/model_android_app.go +++ b/src/management/model_android_app.go @@ -25,11 +25,11 @@ type AndroidApp struct { Id string `json:"id"` // The app name that is shown on the terminal. Label *string `json:"label,omitempty"` - // The package name of the app. + // The package name that uniquely identifies the Android app. PackageName *string `json:"packageName,omitempty"` // The status of the app. Possible values: * `processing`: The app is being signed and converted to a format that the terminal can handle. * `error`: Something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: There is something wrong with the APK file of the app. * `ready`: The app has been signed and converted. * `archived`: The app is no longer available. Status string `json:"status"` - // The internal version number of the app. + // The version number of the app. VersionCode *int32 `json:"versionCode,omitempty"` // The app version number that is shown on the terminal. VersionName *string `json:"versionName,omitempty"` diff --git a/src/management/model_clearpay_info.go b/src/management/model_clearpay_info.go new file mode 100644 index 000000000..14458f49d --- /dev/null +++ b/src/management/model_clearpay_info.go @@ -0,0 +1,116 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the ClearpayInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ClearpayInfo{} + +// ClearpayInfo struct for ClearpayInfo +type ClearpayInfo struct { + // Support Url + SupportUrl string `json:"supportUrl"` +} + +// NewClearpayInfo instantiates a new ClearpayInfo 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 NewClearpayInfo(supportUrl string) *ClearpayInfo { + this := ClearpayInfo{} + this.SupportUrl = supportUrl + return &this +} + +// NewClearpayInfoWithDefaults instantiates a new ClearpayInfo 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 NewClearpayInfoWithDefaults() *ClearpayInfo { + this := ClearpayInfo{} + return &this +} + +// GetSupportUrl returns the SupportUrl field value +func (o *ClearpayInfo) GetSupportUrl() string { + if o == nil { + var ret string + return ret + } + + return o.SupportUrl +} + +// GetSupportUrlOk returns a tuple with the SupportUrl field value +// and a boolean to check if the value has been set. +func (o *ClearpayInfo) GetSupportUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SupportUrl, true +} + +// SetSupportUrl sets field value +func (o *ClearpayInfo) SetSupportUrl(v string) { + o.SupportUrl = v +} + +func (o ClearpayInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClearpayInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["supportUrl"] = o.SupportUrl + return toSerialize, nil +} + +type NullableClearpayInfo struct { + value *ClearpayInfo + isSet bool +} + +func (v NullableClearpayInfo) Get() *ClearpayInfo { + return v.value +} + +func (v *NullableClearpayInfo) Set(val *ClearpayInfo) { + v.value = val + v.isSet = true +} + +func (v NullableClearpayInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableClearpayInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClearpayInfo(val *ClearpayInfo) *NullableClearpayInfo { + return &NullableClearpayInfo{value: val, isSet: true} +} + +func (v NullableClearpayInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClearpayInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_commission.go b/src/management/model_commission.go new file mode 100644 index 000000000..09034fc95 --- /dev/null +++ b/src/management/model_commission.go @@ -0,0 +1,162 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Commission type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Commission{} + +// Commission struct for Commission +type Commission struct { + // A fixed commission fee, in minor units. + FixedAmount *int64 `json:"fixedAmount,omitempty"` + // A variable commission fee, in basis points. + VariablePercentage *int64 `json:"variablePercentage,omitempty"` +} + +// NewCommission instantiates a new Commission 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 NewCommission() *Commission { + this := Commission{} + return &this +} + +// NewCommissionWithDefaults instantiates a new Commission 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 NewCommissionWithDefaults() *Commission { + this := Commission{} + return &this +} + +// GetFixedAmount returns the FixedAmount field value if set, zero value otherwise. +func (o *Commission) GetFixedAmount() int64 { + if o == nil || common.IsNil(o.FixedAmount) { + var ret int64 + return ret + } + return *o.FixedAmount +} + +// GetFixedAmountOk returns a tuple with the FixedAmount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commission) GetFixedAmountOk() (*int64, bool) { + if o == nil || common.IsNil(o.FixedAmount) { + return nil, false + } + return o.FixedAmount, true +} + +// HasFixedAmount returns a boolean if a field has been set. +func (o *Commission) HasFixedAmount() bool { + if o != nil && !common.IsNil(o.FixedAmount) { + return true + } + + return false +} + +// SetFixedAmount gets a reference to the given int64 and assigns it to the FixedAmount field. +func (o *Commission) SetFixedAmount(v int64) { + o.FixedAmount = &v +} + +// GetVariablePercentage returns the VariablePercentage field value if set, zero value otherwise. +func (o *Commission) GetVariablePercentage() int64 { + if o == nil || common.IsNil(o.VariablePercentage) { + var ret int64 + return ret + } + return *o.VariablePercentage +} + +// GetVariablePercentageOk returns a tuple with the VariablePercentage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Commission) GetVariablePercentageOk() (*int64, bool) { + if o == nil || common.IsNil(o.VariablePercentage) { + return nil, false + } + return o.VariablePercentage, true +} + +// HasVariablePercentage returns a boolean if a field has been set. +func (o *Commission) HasVariablePercentage() bool { + if o != nil && !common.IsNil(o.VariablePercentage) { + return true + } + + return false +} + +// SetVariablePercentage gets a reference to the given int64 and assigns it to the VariablePercentage field. +func (o *Commission) SetVariablePercentage(v int64) { + o.VariablePercentage = &v +} + +func (o Commission) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Commission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.FixedAmount) { + toSerialize["fixedAmount"] = o.FixedAmount + } + if !common.IsNil(o.VariablePercentage) { + toSerialize["variablePercentage"] = o.VariablePercentage + } + return toSerialize, nil +} + +type NullableCommission struct { + value *Commission + isSet bool +} + +func (v NullableCommission) Get() *Commission { + return v.value +} + +func (v *NullableCommission) Set(val *Commission) { + v.value = val + v.isSet = true +} + +func (v NullableCommission) IsSet() bool { + return v.isSet +} + +func (v *NullableCommission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCommission(val *Commission) *NullableCommission { + return &NullableCommission{value: val, isSet: true} +} + +func (v NullableCommission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCommission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_company_user.go b/src/management/model_company_user.go index 6056d464e..ec6dc78f8 100644 --- a/src/management/model_company_user.go +++ b/src/management/model_company_user.go @@ -24,10 +24,10 @@ type CompanyUser struct { AccountGroups []string `json:"accountGroups,omitempty"` // Indicates whether this user is active. Active *bool `json:"active,omitempty"` + // Set of apps available to this user + Apps []string `json:"apps,omitempty"` // The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` - // Set of authn apps available to this user - AuthnApps []string `json:"authnApps,omitempty"` // The email address of the user. Email string `json:"email"` // The unique identifier of the user. @@ -159,68 +159,68 @@ func (o *CompanyUser) SetActive(v bool) { o.Active = &v } -// GetAssociatedMerchantAccounts returns the AssociatedMerchantAccounts field value if set, zero value otherwise. -func (o *CompanyUser) GetAssociatedMerchantAccounts() []string { - if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { +// GetApps returns the Apps field value if set, zero value otherwise. +func (o *CompanyUser) GetApps() []string { + if o == nil || common.IsNil(o.Apps) { var ret []string return ret } - return o.AssociatedMerchantAccounts + return o.Apps } -// GetAssociatedMerchantAccountsOk returns a tuple with the AssociatedMerchantAccounts field value if set, nil otherwise +// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CompanyUser) GetAssociatedMerchantAccountsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { +func (o *CompanyUser) GetAppsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Apps) { return nil, false } - return o.AssociatedMerchantAccounts, true + return o.Apps, true } -// HasAssociatedMerchantAccounts returns a boolean if a field has been set. -func (o *CompanyUser) HasAssociatedMerchantAccounts() bool { - if o != nil && !common.IsNil(o.AssociatedMerchantAccounts) { +// HasApps returns a boolean if a field has been set. +func (o *CompanyUser) HasApps() bool { + if o != nil && !common.IsNil(o.Apps) { return true } return false } -// SetAssociatedMerchantAccounts gets a reference to the given []string and assigns it to the AssociatedMerchantAccounts field. -func (o *CompanyUser) SetAssociatedMerchantAccounts(v []string) { - o.AssociatedMerchantAccounts = v +// SetApps gets a reference to the given []string and assigns it to the Apps field. +func (o *CompanyUser) SetApps(v []string) { + o.Apps = v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *CompanyUser) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { +// GetAssociatedMerchantAccounts returns the AssociatedMerchantAccounts field value if set, zero value otherwise. +func (o *CompanyUser) GetAssociatedMerchantAccounts() []string { + if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { var ret []string return ret } - return o.AuthnApps + return o.AssociatedMerchantAccounts } -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise +// GetAssociatedMerchantAccountsOk returns a tuple with the AssociatedMerchantAccounts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CompanyUser) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { +func (o *CompanyUser) GetAssociatedMerchantAccountsOk() ([]string, bool) { + if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { return nil, false } - return o.AuthnApps, true + return o.AssociatedMerchantAccounts, true } -// HasAuthnApps returns a boolean if a field has been set. -func (o *CompanyUser) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { +// HasAssociatedMerchantAccounts returns a boolean if a field has been set. +func (o *CompanyUser) HasAssociatedMerchantAccounts() bool { + if o != nil && !common.IsNil(o.AssociatedMerchantAccounts) { return true } return false } -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *CompanyUser) SetAuthnApps(v []string) { - o.AuthnApps = v +// SetAssociatedMerchantAccounts gets a reference to the given []string and assigns it to the AssociatedMerchantAccounts field. +func (o *CompanyUser) SetAssociatedMerchantAccounts(v []string) { + o.AssociatedMerchantAccounts = v } // GetEmail returns the Email field value @@ -394,12 +394,12 @@ func (o CompanyUser) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Active) { toSerialize["active"] = o.Active } + if !common.IsNil(o.Apps) { + toSerialize["apps"] = o.Apps + } if !common.IsNil(o.AssociatedMerchantAccounts) { toSerialize["associatedMerchantAccounts"] = o.AssociatedMerchantAccounts } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps - } toSerialize["email"] = o.Email toSerialize["id"] = o.Id if !common.IsNil(o.Name) { diff --git a/src/management/model_create_company_api_credential_request.go b/src/management/model_create_company_api_credential_request.go index 1b4b43309..59601dd11 100644 --- a/src/management/model_create_company_api_credential_request.go +++ b/src/management/model_create_company_api_credential_request.go @@ -25,7 +25,7 @@ type CreateCompanyApiCredentialRequest struct { AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` // Description of the API credential. Description *string `json:"description,omitempty"` - // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. Roles []string `json:"roles,omitempty"` } diff --git a/src/management/model_create_company_user_request.go b/src/management/model_create_company_user_request.go index 0be11d5e9..ceb030748 100644 --- a/src/management/model_create_company_user_request.go +++ b/src/management/model_create_company_user_request.go @@ -23,8 +23,6 @@ type CreateCompanyUserRequest struct { AccountGroups []string `json:"accountGroups,omitempty"` // The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` - // Set of authn apps to add to this user - AuthnApps []string `json:"authnApps,omitempty"` // The email address of the user. Email string `json:"email"` Name Name `json:"name"` @@ -32,7 +30,7 @@ type CreateCompanyUserRequest struct { Roles []string `json:"roles,omitempty"` // The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. TimeZoneCode *string `json:"timeZoneCode,omitempty"` - // The username for this user. Allowed length: 255 alphanumeric characters. + // The user's email address that will be their username. Must be the same as the one in the `email` field. Username string `json:"username"` } @@ -120,38 +118,6 @@ func (o *CreateCompanyUserRequest) SetAssociatedMerchantAccounts(v []string) { o.AssociatedMerchantAccounts = v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *CreateCompanyUserRequest) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { - var ret []string - return ret - } - return o.AuthnApps -} - -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCompanyUserRequest) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { - return nil, false - } - return o.AuthnApps, true -} - -// HasAuthnApps returns a boolean if a field has been set. -func (o *CreateCompanyUserRequest) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { - return true - } - - return false -} - -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *CreateCompanyUserRequest) SetAuthnApps(v []string) { - o.AuthnApps = v -} - // GetEmail returns the Email field value func (o *CreateCompanyUserRequest) GetEmail() string { if o == nil { @@ -304,9 +270,6 @@ func (o CreateCompanyUserRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AssociatedMerchantAccounts) { toSerialize["associatedMerchantAccounts"] = o.AssociatedMerchantAccounts } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps - } toSerialize["email"] = o.Email toSerialize["name"] = o.Name if !common.IsNil(o.Roles) { diff --git a/src/management/model_create_company_user_response.go b/src/management/model_create_company_user_response.go index dcfea7bc1..c8a66ea88 100644 --- a/src/management/model_create_company_user_response.go +++ b/src/management/model_create_company_user_response.go @@ -24,10 +24,10 @@ type CreateCompanyUserResponse struct { AccountGroups []string `json:"accountGroups,omitempty"` // Indicates whether this user is active. Active *bool `json:"active,omitempty"` + // Set of apps available to this user + Apps []string `json:"apps,omitempty"` // The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` - // Set of authn apps available to this user - AuthnApps []string `json:"authnApps,omitempty"` // The email address of the user. Email string `json:"email"` // The unique identifier of the user. @@ -159,68 +159,68 @@ func (o *CreateCompanyUserResponse) SetActive(v bool) { o.Active = &v } -// GetAssociatedMerchantAccounts returns the AssociatedMerchantAccounts field value if set, zero value otherwise. -func (o *CreateCompanyUserResponse) GetAssociatedMerchantAccounts() []string { - if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { +// GetApps returns the Apps field value if set, zero value otherwise. +func (o *CreateCompanyUserResponse) GetApps() []string { + if o == nil || common.IsNil(o.Apps) { var ret []string return ret } - return o.AssociatedMerchantAccounts + return o.Apps } -// GetAssociatedMerchantAccountsOk returns a tuple with the AssociatedMerchantAccounts field value if set, nil otherwise +// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCompanyUserResponse) GetAssociatedMerchantAccountsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { +func (o *CreateCompanyUserResponse) GetAppsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Apps) { return nil, false } - return o.AssociatedMerchantAccounts, true + return o.Apps, true } -// HasAssociatedMerchantAccounts returns a boolean if a field has been set. -func (o *CreateCompanyUserResponse) HasAssociatedMerchantAccounts() bool { - if o != nil && !common.IsNil(o.AssociatedMerchantAccounts) { +// HasApps returns a boolean if a field has been set. +func (o *CreateCompanyUserResponse) HasApps() bool { + if o != nil && !common.IsNil(o.Apps) { return true } return false } -// SetAssociatedMerchantAccounts gets a reference to the given []string and assigns it to the AssociatedMerchantAccounts field. -func (o *CreateCompanyUserResponse) SetAssociatedMerchantAccounts(v []string) { - o.AssociatedMerchantAccounts = v +// SetApps gets a reference to the given []string and assigns it to the Apps field. +func (o *CreateCompanyUserResponse) SetApps(v []string) { + o.Apps = v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *CreateCompanyUserResponse) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { +// GetAssociatedMerchantAccounts returns the AssociatedMerchantAccounts field value if set, zero value otherwise. +func (o *CreateCompanyUserResponse) GetAssociatedMerchantAccounts() []string { + if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { var ret []string return ret } - return o.AuthnApps + return o.AssociatedMerchantAccounts } -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise +// GetAssociatedMerchantAccountsOk returns a tuple with the AssociatedMerchantAccounts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCompanyUserResponse) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { +func (o *CreateCompanyUserResponse) GetAssociatedMerchantAccountsOk() ([]string, bool) { + if o == nil || common.IsNil(o.AssociatedMerchantAccounts) { return nil, false } - return o.AuthnApps, true + return o.AssociatedMerchantAccounts, true } -// HasAuthnApps returns a boolean if a field has been set. -func (o *CreateCompanyUserResponse) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { +// HasAssociatedMerchantAccounts returns a boolean if a field has been set. +func (o *CreateCompanyUserResponse) HasAssociatedMerchantAccounts() bool { + if o != nil && !common.IsNil(o.AssociatedMerchantAccounts) { return true } return false } -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *CreateCompanyUserResponse) SetAuthnApps(v []string) { - o.AuthnApps = v +// SetAssociatedMerchantAccounts gets a reference to the given []string and assigns it to the AssociatedMerchantAccounts field. +func (o *CreateCompanyUserResponse) SetAssociatedMerchantAccounts(v []string) { + o.AssociatedMerchantAccounts = v } // GetEmail returns the Email field value @@ -394,12 +394,12 @@ func (o CreateCompanyUserResponse) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Active) { toSerialize["active"] = o.Active } + if !common.IsNil(o.Apps) { + toSerialize["apps"] = o.Apps + } if !common.IsNil(o.AssociatedMerchantAccounts) { toSerialize["associatedMerchantAccounts"] = o.AssociatedMerchantAccounts } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps - } toSerialize["email"] = o.Email toSerialize["id"] = o.Id if !common.IsNil(o.Name) { diff --git a/src/management/model_create_company_webhook_request.go b/src/management/model_create_company_webhook_request.go index e9932f5e6..58d6b2eab 100644 --- a/src/management/model_create_company_webhook_request.go +++ b/src/management/model_create_company_webhook_request.go @@ -643,7 +643,7 @@ func (o *CreateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { return false } func (o *CreateCompanyWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"LOCAL", "PUBLIC"} + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { if o.GetNetworkType() == allowed { return true @@ -652,7 +652,7 @@ func (o *CreateCompanyWebhookRequest) isValidNetworkType() bool { return false } func (o *CreateCompanyWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "SSL", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"} + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { if o.GetSslVersion() == allowed { return true diff --git a/src/management/model_create_merchant_api_credential_request.go b/src/management/model_create_merchant_api_credential_request.go index d2def3d61..f6979342f 100644 --- a/src/management/model_create_merchant_api_credential_request.go +++ b/src/management/model_create_merchant_api_credential_request.go @@ -23,7 +23,7 @@ type CreateMerchantApiCredentialRequest struct { AllowedOrigins []string `json:"allowedOrigins,omitempty"` // Description of the API credential. Description *string `json:"description,omitempty"` - // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. Roles []string `json:"roles,omitempty"` } diff --git a/src/management/model_create_merchant_user_request.go b/src/management/model_create_merchant_user_request.go index 4169b5fe2..4c4e5c9a9 100644 --- a/src/management/model_create_merchant_user_request.go +++ b/src/management/model_create_merchant_user_request.go @@ -21,8 +21,6 @@ var _ common.MappedNullable = &CreateMerchantUserRequest{} type CreateMerchantUserRequest struct { // The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. AccountGroups []string `json:"accountGroups,omitempty"` - // Set of authn apps to add to this user - AuthnApps []string `json:"authnApps,omitempty"` // The email address of the user. Email string `json:"email"` Name Name `json:"name"` @@ -30,7 +28,7 @@ type CreateMerchantUserRequest struct { Roles []string `json:"roles,omitempty"` // The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. TimeZoneCode *string `json:"timeZoneCode,omitempty"` - // The username for this user. Allowed length: 255 alphanumeric characters. + // The user's email address that will be their username. Must be the same as the one in the `email` field. Username string `json:"username"` } @@ -86,38 +84,6 @@ func (o *CreateMerchantUserRequest) SetAccountGroups(v []string) { o.AccountGroups = v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *CreateMerchantUserRequest) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { - var ret []string - return ret - } - return o.AuthnApps -} - -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateMerchantUserRequest) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { - return nil, false - } - return o.AuthnApps, true -} - -// HasAuthnApps returns a boolean if a field has been set. -func (o *CreateMerchantUserRequest) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { - return true - } - - return false -} - -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *CreateMerchantUserRequest) SetAuthnApps(v []string) { - o.AuthnApps = v -} - // GetEmail returns the Email field value func (o *CreateMerchantUserRequest) GetEmail() string { if o == nil { @@ -267,9 +233,6 @@ func (o CreateMerchantUserRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AccountGroups) { toSerialize["accountGroups"] = o.AccountGroups } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps - } toSerialize["email"] = o.Email toSerialize["name"] = o.Name if !common.IsNil(o.Roles) { diff --git a/src/management/model_create_merchant_webhook_request.go b/src/management/model_create_merchant_webhook_request.go index e4cedcb61..e07ec5633 100644 --- a/src/management/model_create_merchant_webhook_request.go +++ b/src/management/model_create_merchant_webhook_request.go @@ -578,7 +578,7 @@ func (o *CreateMerchantWebhookRequest) isValidCommunicationFormat() bool { return false } func (o *CreateMerchantWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"LOCAL", "PUBLIC"} + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { if o.GetNetworkType() == allowed { return true @@ -587,7 +587,7 @@ func (o *CreateMerchantWebhookRequest) isValidNetworkType() bool { return false } func (o *CreateMerchantWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "SSL", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"} + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { if o.GetSslVersion() == allowed { return true diff --git a/src/management/model_create_user_response.go b/src/management/model_create_user_response.go index 88ad51dbe..7da1a31f3 100644 --- a/src/management/model_create_user_response.go +++ b/src/management/model_create_user_response.go @@ -24,8 +24,8 @@ type CreateUserResponse struct { AccountGroups []string `json:"accountGroups,omitempty"` // Indicates whether this user is active. Active *bool `json:"active,omitempty"` - // Set of authn apps available to this user - AuthnApps []string `json:"authnApps,omitempty"` + // Set of apps available to this user + Apps []string `json:"apps,omitempty"` // The email address of the user. Email string `json:"email"` // The unique identifier of the user. @@ -157,36 +157,36 @@ func (o *CreateUserResponse) SetActive(v bool) { o.Active = &v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *CreateUserResponse) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { +// GetApps returns the Apps field value if set, zero value otherwise. +func (o *CreateUserResponse) GetApps() []string { + if o == nil || common.IsNil(o.Apps) { var ret []string return ret } - return o.AuthnApps + return o.Apps } -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise +// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateUserResponse) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { +func (o *CreateUserResponse) GetAppsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Apps) { return nil, false } - return o.AuthnApps, true + return o.Apps, true } -// HasAuthnApps returns a boolean if a field has been set. -func (o *CreateUserResponse) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { +// HasApps returns a boolean if a field has been set. +func (o *CreateUserResponse) HasApps() bool { + if o != nil && !common.IsNil(o.Apps) { return true } return false } -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *CreateUserResponse) SetAuthnApps(v []string) { - o.AuthnApps = v +// SetApps gets a reference to the given []string and assigns it to the Apps field. +func (o *CreateUserResponse) SetApps(v []string) { + o.Apps = v } // GetEmail returns the Email field value @@ -360,8 +360,8 @@ func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Active) { toSerialize["active"] = o.Active } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps + if !common.IsNil(o.Apps) { + toSerialize["apps"] = o.Apps } toSerialize["email"] = o.Email toSerialize["id"] = o.Id diff --git a/src/management/model_currency.go b/src/management/model_currency.go index 077fb0003..fab2e0ef9 100644 --- a/src/management/model_currency.go +++ b/src/management/model_currency.go @@ -22,8 +22,9 @@ type Currency struct { // Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). Amount *int32 `json:"amount,omitempty"` // Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**. - CurrencyCode string `json:"currencyCode"` - Percentage map[string]interface{} `json:"percentage,omitempty"` + CurrencyCode string `json:"currencyCode"` + // Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. + Percentage *float64 `json:"percentage,omitempty"` } // NewCurrency instantiates a new Currency object @@ -101,19 +102,19 @@ func (o *Currency) SetCurrencyCode(v string) { } // GetPercentage returns the Percentage field value if set, zero value otherwise. -func (o *Currency) GetPercentage() map[string]interface{} { +func (o *Currency) GetPercentage() float64 { if o == nil || common.IsNil(o.Percentage) { - var ret map[string]interface{} + var ret float64 return ret } - return o.Percentage + return *o.Percentage } // GetPercentageOk returns a tuple with the Percentage field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Currency) GetPercentageOk() (map[string]interface{}, bool) { +func (o *Currency) GetPercentageOk() (*float64, bool) { if o == nil || common.IsNil(o.Percentage) { - return map[string]interface{}{}, false + return nil, false } return o.Percentage, true } @@ -127,9 +128,9 @@ func (o *Currency) HasPercentage() bool { return false } -// SetPercentage gets a reference to the given map[string]interface{} and assigns it to the Percentage field. -func (o *Currency) SetPercentage(v map[string]interface{}) { - o.Percentage = v +// SetPercentage gets a reference to the given float64 and assigns it to the Percentage field. +func (o *Currency) SetPercentage(v float64) { + o.Percentage = &v } func (o Currency) MarshalJSON() ([]byte, error) { diff --git a/src/management/model_hardware.go b/src/management/model_hardware.go index b0d96b0c4..63aed16b6 100644 --- a/src/management/model_hardware.go +++ b/src/management/model_hardware.go @@ -21,6 +21,8 @@ var _ common.MappedNullable = &Hardware{} type Hardware struct { // The brightness of the display when the terminal is being used, expressed as a percentage. DisplayMaximumBackLight *int32 `json:"displayMaximumBackLight,omitempty"` + // The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device + RestartHour *int32 `json:"restartHour,omitempty"` } // NewHardware instantiates a new Hardware object @@ -72,6 +74,38 @@ func (o *Hardware) SetDisplayMaximumBackLight(v int32) { o.DisplayMaximumBackLight = &v } +// GetRestartHour returns the RestartHour field value if set, zero value otherwise. +func (o *Hardware) GetRestartHour() int32 { + if o == nil || common.IsNil(o.RestartHour) { + var ret int32 + return ret + } + return *o.RestartHour +} + +// GetRestartHourOk returns a tuple with the RestartHour field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hardware) GetRestartHourOk() (*int32, bool) { + if o == nil || common.IsNil(o.RestartHour) { + return nil, false + } + return o.RestartHour, true +} + +// HasRestartHour returns a boolean if a field has been set. +func (o *Hardware) HasRestartHour() bool { + if o != nil && !common.IsNil(o.RestartHour) { + return true + } + + return false +} + +// SetRestartHour gets a reference to the given int32 and assigns it to the RestartHour field. +func (o *Hardware) SetRestartHour(v int32) { + o.RestartHour = &v +} + func (o Hardware) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -85,6 +119,9 @@ func (o Hardware) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.DisplayMaximumBackLight) { toSerialize["displayMaximumBackLight"] = o.DisplayMaximumBackLight } + if !common.IsNil(o.RestartHour) { + toSerialize["restartHour"] = o.RestartHour + } return toSerialize, nil } diff --git a/src/management/model_invalid_field_wrapper.go b/src/management/model_invalid_field_wrapper.go new file mode 100644 index 000000000..2362504b2 --- /dev/null +++ b/src/management/model_invalid_field_wrapper.go @@ -0,0 +1,124 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the InvalidFieldWrapper type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &InvalidFieldWrapper{} + +// InvalidFieldWrapper struct for InvalidFieldWrapper +type InvalidFieldWrapper struct { + InvalidField *InvalidField `json:"InvalidField,omitempty"` +} + +// NewInvalidFieldWrapper instantiates a new InvalidFieldWrapper 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 NewInvalidFieldWrapper() *InvalidFieldWrapper { + this := InvalidFieldWrapper{} + return &this +} + +// NewInvalidFieldWrapperWithDefaults instantiates a new InvalidFieldWrapper 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 NewInvalidFieldWrapperWithDefaults() *InvalidFieldWrapper { + this := InvalidFieldWrapper{} + return &this +} + +// GetInvalidField returns the InvalidField field value if set, zero value otherwise. +func (o *InvalidFieldWrapper) GetInvalidField() InvalidField { + if o == nil || common.IsNil(o.InvalidField) { + var ret InvalidField + return ret + } + return *o.InvalidField +} + +// GetInvalidFieldOk returns a tuple with the InvalidField field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InvalidFieldWrapper) GetInvalidFieldOk() (*InvalidField, bool) { + if o == nil || common.IsNil(o.InvalidField) { + return nil, false + } + return o.InvalidField, true +} + +// HasInvalidField returns a boolean if a field has been set. +func (o *InvalidFieldWrapper) HasInvalidField() bool { + if o != nil && !common.IsNil(o.InvalidField) { + return true + } + + return false +} + +// SetInvalidField gets a reference to the given InvalidField and assigns it to the InvalidField field. +func (o *InvalidFieldWrapper) SetInvalidField(v InvalidField) { + o.InvalidField = &v +} + +func (o InvalidFieldWrapper) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvalidFieldWrapper) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.InvalidField) { + toSerialize["InvalidField"] = o.InvalidField + } + return toSerialize, nil +} + +type NullableInvalidFieldWrapper struct { + value *InvalidFieldWrapper + isSet bool +} + +func (v NullableInvalidFieldWrapper) Get() *InvalidFieldWrapper { + return v.value +} + +func (v *NullableInvalidFieldWrapper) Set(val *InvalidFieldWrapper) { + v.value = val + v.isSet = true +} + +func (v NullableInvalidFieldWrapper) IsSet() bool { + return v.isSet +} + +func (v *NullableInvalidFieldWrapper) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvalidFieldWrapper(val *InvalidFieldWrapper) *NullableInvalidFieldWrapper { + return &NullableInvalidFieldWrapper{value: val, isSet: true} +} + +func (v NullableInvalidFieldWrapper) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvalidFieldWrapper) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_json_object.go b/src/management/model_json_object.go index dcc26620a..6a9c9f870 100644 --- a/src/management/model_json_object.go +++ b/src/management/model_json_object.go @@ -19,8 +19,8 @@ var _ common.MappedNullable = &JSONObject{} // JSONObject struct for JSONObject type JSONObject struct { - Paths []JSONPath `json:"paths,omitempty"` - RootPath *JSONPath `json:"rootPath,omitempty"` + Paths []JSONPathWrapper `json:"paths,omitempty"` + RootPath *JSONPath `json:"rootPath,omitempty"` } // NewJSONObject instantiates a new JSONObject object @@ -41,9 +41,9 @@ func NewJSONObjectWithDefaults() *JSONObject { } // GetPaths returns the Paths field value if set, zero value otherwise. -func (o *JSONObject) GetPaths() []JSONPath { +func (o *JSONObject) GetPaths() []JSONPathWrapper { if o == nil || common.IsNil(o.Paths) { - var ret []JSONPath + var ret []JSONPathWrapper return ret } return o.Paths @@ -51,7 +51,7 @@ func (o *JSONObject) GetPaths() []JSONPath { // GetPathsOk returns a tuple with the Paths field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONObject) GetPathsOk() ([]JSONPath, bool) { +func (o *JSONObject) GetPathsOk() ([]JSONPathWrapper, bool) { if o == nil || common.IsNil(o.Paths) { return nil, false } @@ -67,8 +67,8 @@ func (o *JSONObject) HasPaths() bool { return false } -// SetPaths gets a reference to the given []JSONPath and assigns it to the Paths field. -func (o *JSONObject) SetPaths(v []JSONPath) { +// SetPaths gets a reference to the given []JSONPathWrapper and assigns it to the Paths field. +func (o *JSONObject) SetPaths(v []JSONPathWrapper) { o.Paths = v } diff --git a/src/management/model_json_path_wrapper.go b/src/management/model_json_path_wrapper.go new file mode 100644 index 000000000..cf529b6cf --- /dev/null +++ b/src/management/model_json_path_wrapper.go @@ -0,0 +1,124 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the JSONPathWrapper type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &JSONPathWrapper{} + +// JSONPathWrapper struct for JSONPathWrapper +type JSONPathWrapper struct { + JSONPath *JSONPath `json:"JSONPath,omitempty"` +} + +// NewJSONPathWrapper instantiates a new JSONPathWrapper 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 NewJSONPathWrapper() *JSONPathWrapper { + this := JSONPathWrapper{} + return &this +} + +// NewJSONPathWrapperWithDefaults instantiates a new JSONPathWrapper 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 NewJSONPathWrapperWithDefaults() *JSONPathWrapper { + this := JSONPathWrapper{} + return &this +} + +// GetJSONPath returns the JSONPath field value if set, zero value otherwise. +func (o *JSONPathWrapper) GetJSONPath() JSONPath { + if o == nil || common.IsNil(o.JSONPath) { + var ret JSONPath + return ret + } + return *o.JSONPath +} + +// GetJSONPathOk returns a tuple with the JSONPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONPathWrapper) GetJSONPathOk() (*JSONPath, bool) { + if o == nil || common.IsNil(o.JSONPath) { + return nil, false + } + return o.JSONPath, true +} + +// HasJSONPath returns a boolean if a field has been set. +func (o *JSONPathWrapper) HasJSONPath() bool { + if o != nil && !common.IsNil(o.JSONPath) { + return true + } + + return false +} + +// SetJSONPath gets a reference to the given JSONPath and assigns it to the JSONPath field. +func (o *JSONPathWrapper) SetJSONPath(v JSONPath) { + o.JSONPath = &v +} + +func (o JSONPathWrapper) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JSONPathWrapper) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.JSONPath) { + toSerialize["JSONPath"] = o.JSONPath + } + return toSerialize, nil +} + +type NullableJSONPathWrapper struct { + value *JSONPathWrapper + isSet bool +} + +func (v NullableJSONPathWrapper) Get() *JSONPathWrapper { + return v.value +} + +func (v *NullableJSONPathWrapper) Set(val *JSONPathWrapper) { + v.value = val + v.isSet = true +} + +func (v NullableJSONPathWrapper) IsSet() bool { + return v.isSet +} + +func (v *NullableJSONPathWrapper) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJSONPathWrapper(val *JSONPathWrapper) *NullableJSONPathWrapper { + return &NullableJSONPathWrapper{value: val, isSet: true} +} + +func (v NullableJSONPathWrapper) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJSONPathWrapper) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_list_terminals_response.go b/src/management/model_list_terminals_response.go index 67906bbf3..316933217 100644 --- a/src/management/model_list_terminals_response.go +++ b/src/management/model_list_terminals_response.go @@ -19,16 +19,23 @@ var _ common.MappedNullable = &ListTerminalsResponse{} // ListTerminalsResponse struct for ListTerminalsResponse type ListTerminalsResponse struct { + Links *PaginationLinks `json:"_links,omitempty"` // The list of terminals. Data []Terminal `json:"data,omitempty"` + // Total number of items. + ItemsTotal int32 `json:"itemsTotal"` + // Total number of pages. + PagesTotal int32 `json:"pagesTotal"` } // NewListTerminalsResponse instantiates a new ListTerminalsResponse 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 NewListTerminalsResponse() *ListTerminalsResponse { +func NewListTerminalsResponse(itemsTotal int32, pagesTotal int32) *ListTerminalsResponse { this := ListTerminalsResponse{} + this.ItemsTotal = itemsTotal + this.PagesTotal = pagesTotal return &this } @@ -40,6 +47,38 @@ func NewListTerminalsResponseWithDefaults() *ListTerminalsResponse { return &this } +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *ListTerminalsResponse) GetLinks() PaginationLinks { + if o == nil || common.IsNil(o.Links) { + var ret PaginationLinks + return ret + } + return *o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListTerminalsResponse) GetLinksOk() (*PaginationLinks, bool) { + if o == nil || common.IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *ListTerminalsResponse) HasLinks() bool { + if o != nil && !common.IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given PaginationLinks and assigns it to the Links field. +func (o *ListTerminalsResponse) SetLinks(v PaginationLinks) { + o.Links = &v +} + // GetData returns the Data field value if set, zero value otherwise. func (o *ListTerminalsResponse) GetData() []Terminal { if o == nil || common.IsNil(o.Data) { @@ -72,6 +111,54 @@ func (o *ListTerminalsResponse) SetData(v []Terminal) { o.Data = v } +// GetItemsTotal returns the ItemsTotal field value +func (o *ListTerminalsResponse) GetItemsTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ItemsTotal +} + +// GetItemsTotalOk returns a tuple with the ItemsTotal field value +// and a boolean to check if the value has been set. +func (o *ListTerminalsResponse) GetItemsTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ItemsTotal, true +} + +// SetItemsTotal sets field value +func (o *ListTerminalsResponse) SetItemsTotal(v int32) { + o.ItemsTotal = v +} + +// GetPagesTotal returns the PagesTotal field value +func (o *ListTerminalsResponse) GetPagesTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PagesTotal +} + +// GetPagesTotalOk returns a tuple with the PagesTotal field value +// and a boolean to check if the value has been set. +func (o *ListTerminalsResponse) GetPagesTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PagesTotal, true +} + +// SetPagesTotal sets field value +func (o *ListTerminalsResponse) SetPagesTotal(v int32) { + o.PagesTotal = v +} + func (o ListTerminalsResponse) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -82,9 +169,14 @@ func (o ListTerminalsResponse) MarshalJSON() ([]byte, error) { func (o ListTerminalsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.Links) { + toSerialize["_links"] = o.Links + } if !common.IsNil(o.Data) { toSerialize["data"] = o.Data } + toSerialize["itemsTotal"] = o.ItemsTotal + toSerialize["pagesTotal"] = o.PagesTotal return toSerialize, nil } diff --git a/src/management/model_nexo.go b/src/management/model_nexo.go index 90c65f871..87bff3534 100644 --- a/src/management/model_nexo.go +++ b/src/management/model_nexo.go @@ -24,7 +24,8 @@ type Nexo struct { EventUrls *EventUrl `json:"eventUrls,omitempty"` // One or more URLs to send event messages to when using Terminal API. // Deprecated - NexoEventUrls []string `json:"nexoEventUrls,omitempty"` + NexoEventUrls []string `json:"nexoEventUrls,omitempty"` + Notification *Notification `json:"notification,omitempty"` } // NewNexo instantiates a new Nexo object @@ -175,6 +176,38 @@ func (o *Nexo) SetNexoEventUrls(v []string) { o.NexoEventUrls = v } +// GetNotification returns the Notification field value if set, zero value otherwise. +func (o *Nexo) GetNotification() Notification { + if o == nil || common.IsNil(o.Notification) { + var ret Notification + return ret + } + return *o.Notification +} + +// GetNotificationOk returns a tuple with the Notification field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Nexo) GetNotificationOk() (*Notification, bool) { + if o == nil || common.IsNil(o.Notification) { + return nil, false + } + return o.Notification, true +} + +// HasNotification returns a boolean if a field has been set. +func (o *Nexo) HasNotification() bool { + if o != nil && !common.IsNil(o.Notification) { + return true + } + + return false +} + +// SetNotification gets a reference to the given Notification and assigns it to the Notification field. +func (o *Nexo) SetNotification(v Notification) { + o.Notification = &v +} + func (o Nexo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -197,6 +230,9 @@ func (o Nexo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.NexoEventUrls) { toSerialize["nexoEventUrls"] = o.NexoEventUrls } + if !common.IsNil(o.Notification) { + toSerialize["notification"] = o.Notification + } return toSerialize, nil } diff --git a/src/management/model_notification.go b/src/management/model_notification.go new file mode 100644 index 000000000..f1ecccc48 --- /dev/null +++ b/src/management/model_notification.go @@ -0,0 +1,125 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Notification type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Notification{} + +// Notification struct for Notification +type Notification struct { + // Toggle to show or hide Notification button on the terminal + ShowButton *bool `json:"showButton,omitempty"` +} + +// NewNotification instantiates a new Notification 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 NewNotification() *Notification { + this := Notification{} + return &this +} + +// NewNotificationWithDefaults instantiates a new Notification 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 NewNotificationWithDefaults() *Notification { + this := Notification{} + return &this +} + +// GetShowButton returns the ShowButton field value if set, zero value otherwise. +func (o *Notification) GetShowButton() bool { + if o == nil || common.IsNil(o.ShowButton) { + var ret bool + return ret + } + return *o.ShowButton +} + +// GetShowButtonOk returns a tuple with the ShowButton field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Notification) GetShowButtonOk() (*bool, bool) { + if o == nil || common.IsNil(o.ShowButton) { + return nil, false + } + return o.ShowButton, true +} + +// HasShowButton returns a boolean if a field has been set. +func (o *Notification) HasShowButton() bool { + if o != nil && !common.IsNil(o.ShowButton) { + return true + } + + return false +} + +// SetShowButton gets a reference to the given bool and assigns it to the ShowButton field. +func (o *Notification) SetShowButton(v bool) { + o.ShowButton = &v +} + +func (o Notification) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Notification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ShowButton) { + toSerialize["showButton"] = o.ShowButton + } + return toSerialize, nil +} + +type NullableNotification struct { + value *Notification + isSet bool +} + +func (v NullableNotification) Get() *Notification { + return v.value +} + +func (v *NullableNotification) Set(val *Notification) { + v.value = val + v.isSet = true +} + +func (v NullableNotification) IsSet() bool { + return v.isSet +} + +func (v *NullableNotification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotification(val *Notification) *NullableNotification { + return &NullableNotification{value: val, isSet: true} +} + +func (v NullableNotification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_payment_method.go b/src/management/model_payment_method.go index a5cc4453a..b179f45c4 100644 --- a/src/management/model_payment_method.go +++ b/src/management/model_payment_method.go @@ -19,6 +19,7 @@ var _ common.MappedNullable = &PaymentMethod{} // PaymentMethod struct for PaymentMethod type PaymentMethod struct { + AfterpayTouch *AfterpayTouchInfo `json:"afterpayTouch,omitempty"` // Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. Allowed *bool `json:"allowed,omitempty"` ApplePay *ApplePayInfo `json:"applePay,omitempty"` @@ -26,6 +27,7 @@ type PaymentMethod struct { // The unique identifier of the business line. BusinessLineId *string `json:"businessLineId,omitempty"` CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` + Clearpay *ClearpayInfo `json:"clearpay,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. Countries []string `json:"countries,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. @@ -49,6 +51,7 @@ type PaymentMethod struct { // The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. StoreId *string `json:"storeId,omitempty"` Swish *SwishInfo `json:"swish,omitempty"` + Twint *TwintInfo `json:"twint,omitempty"` // Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). Type *string `json:"type,omitempty"` // Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** @@ -74,6 +77,38 @@ func NewPaymentMethodWithDefaults() *PaymentMethod { return &this } +// GetAfterpayTouch returns the AfterpayTouch field value if set, zero value otherwise. +func (o *PaymentMethod) GetAfterpayTouch() AfterpayTouchInfo { + if o == nil || common.IsNil(o.AfterpayTouch) { + var ret AfterpayTouchInfo + return ret + } + return *o.AfterpayTouch +} + +// GetAfterpayTouchOk returns a tuple with the AfterpayTouch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetAfterpayTouchOk() (*AfterpayTouchInfo, bool) { + if o == nil || common.IsNil(o.AfterpayTouch) { + return nil, false + } + return o.AfterpayTouch, true +} + +// HasAfterpayTouch returns a boolean if a field has been set. +func (o *PaymentMethod) HasAfterpayTouch() bool { + if o != nil && !common.IsNil(o.AfterpayTouch) { + return true + } + + return false +} + +// SetAfterpayTouch gets a reference to the given AfterpayTouchInfo and assigns it to the AfterpayTouch field. +func (o *PaymentMethod) SetAfterpayTouch(v AfterpayTouchInfo) { + o.AfterpayTouch = &v +} + // GetAllowed returns the Allowed field value if set, zero value otherwise. func (o *PaymentMethod) GetAllowed() bool { if o == nil || common.IsNil(o.Allowed) { @@ -234,6 +269,38 @@ func (o *PaymentMethod) SetCartesBancaires(v CartesBancairesInfo) { o.CartesBancaires = &v } +// GetClearpay returns the Clearpay field value if set, zero value otherwise. +func (o *PaymentMethod) GetClearpay() ClearpayInfo { + if o == nil || common.IsNil(o.Clearpay) { + var ret ClearpayInfo + return ret + } + return *o.Clearpay +} + +// GetClearpayOk returns a tuple with the Clearpay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetClearpayOk() (*ClearpayInfo, bool) { + if o == nil || common.IsNil(o.Clearpay) { + return nil, false + } + return o.Clearpay, true +} + +// HasClearpay returns a boolean if a field has been set. +func (o *PaymentMethod) HasClearpay() bool { + if o != nil && !common.IsNil(o.Clearpay) { + return true + } + + return false +} + +// SetClearpay gets a reference to the given ClearpayInfo and assigns it to the Clearpay field. +func (o *PaymentMethod) SetClearpay(v ClearpayInfo) { + o.Clearpay = &v +} + // GetCountries returns the Countries field value if set, zero value otherwise. func (o *PaymentMethod) GetCountries() []string { if o == nil || common.IsNil(o.Countries) { @@ -706,6 +773,38 @@ func (o *PaymentMethod) SetSwish(v SwishInfo) { o.Swish = &v } +// GetTwint returns the Twint field value if set, zero value otherwise. +func (o *PaymentMethod) GetTwint() TwintInfo { + if o == nil || common.IsNil(o.Twint) { + var ret TwintInfo + return ret + } + return *o.Twint +} + +// GetTwintOk returns a tuple with the Twint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetTwintOk() (*TwintInfo, bool) { + if o == nil || common.IsNil(o.Twint) { + return nil, false + } + return o.Twint, true +} + +// HasTwint returns a boolean if a field has been set. +func (o *PaymentMethod) HasTwint() bool { + if o != nil && !common.IsNil(o.Twint) { + return true + } + + return false +} + +// SetTwint gets a reference to the given TwintInfo and assigns it to the Twint field. +func (o *PaymentMethod) SetTwint(v TwintInfo) { + o.Twint = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *PaymentMethod) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -812,6 +911,9 @@ func (o PaymentMethod) MarshalJSON() ([]byte, error) { func (o PaymentMethod) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AfterpayTouch) { + toSerialize["afterpayTouch"] = o.AfterpayTouch + } if !common.IsNil(o.Allowed) { toSerialize["allowed"] = o.Allowed } @@ -827,6 +929,9 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CartesBancaires) { toSerialize["cartesBancaires"] = o.CartesBancaires } + if !common.IsNil(o.Clearpay) { + toSerialize["clearpay"] = o.Clearpay + } if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } @@ -870,6 +975,9 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Swish) { toSerialize["swish"] = o.Swish } + if !common.IsNil(o.Twint) { + toSerialize["twint"] = o.Twint + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/management/model_payment_method_response.go b/src/management/model_payment_method_response.go index 52e33ff41..499a26822 100644 --- a/src/management/model_payment_method_response.go +++ b/src/management/model_payment_method_response.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &PaymentMethodResponse{} type PaymentMethodResponse struct { Links *PaginationLinks `json:"_links,omitempty"` // Payment methods details. - Data []PaymentMethod `json:"data,omitempty"` + Data []PaymentMethodWrapper `json:"data,omitempty"` // Total number of items. ItemsTotal int32 `json:"itemsTotal"` // Total number of pages. @@ -82,9 +82,9 @@ func (o *PaymentMethodResponse) SetLinks(v PaginationLinks) { } // GetData returns the Data field value if set, zero value otherwise. -func (o *PaymentMethodResponse) GetData() []PaymentMethod { +func (o *PaymentMethodResponse) GetData() []PaymentMethodWrapper { if o == nil || common.IsNil(o.Data) { - var ret []PaymentMethod + var ret []PaymentMethodWrapper return ret } return o.Data @@ -92,7 +92,7 @@ func (o *PaymentMethodResponse) GetData() []PaymentMethod { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodResponse) GetDataOk() ([]PaymentMethod, bool) { +func (o *PaymentMethodResponse) GetDataOk() ([]PaymentMethodWrapper, bool) { if o == nil || common.IsNil(o.Data) { return nil, false } @@ -108,8 +108,8 @@ func (o *PaymentMethodResponse) HasData() bool { return false } -// SetData gets a reference to the given []PaymentMethod and assigns it to the Data field. -func (o *PaymentMethodResponse) SetData(v []PaymentMethod) { +// SetData gets a reference to the given []PaymentMethodWrapper and assigns it to the Data field. +func (o *PaymentMethodResponse) SetData(v []PaymentMethodWrapper) { o.Data = v } diff --git a/src/management/model_payment_method_setup_info.go b/src/management/model_payment_method_setup_info.go index 3d5da8280..9f9d3e443 100644 --- a/src/management/model_payment_method_setup_info.go +++ b/src/management/model_payment_method_setup_info.go @@ -19,11 +19,13 @@ var _ common.MappedNullable = &PaymentMethodSetupInfo{} // PaymentMethodSetupInfo struct for PaymentMethodSetupInfo type PaymentMethodSetupInfo struct { - ApplePay *ApplePayInfo `json:"applePay,omitempty"` - Bcmc *BcmcInfo `json:"bcmc,omitempty"` + AfterpayTouch *AfterpayTouchInfo `json:"afterpayTouch,omitempty"` + ApplePay *ApplePayInfo `json:"applePay,omitempty"` + Bcmc *BcmcInfo `json:"bcmc,omitempty"` // The unique identifier of the business line. BusinessLineId *string `json:"businessLineId,omitempty"` CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` + Clearpay *ClearpayInfo `json:"clearpay,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. Countries []string `json:"countries,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. @@ -43,6 +45,7 @@ type PaymentMethodSetupInfo struct { // The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. StoreId *string `json:"storeId,omitempty"` Swish *SwishInfo `json:"swish,omitempty"` + Twint *TwintInfo `json:"twint,omitempty"` // Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). Type *string `json:"type,omitempty"` Vipps *VippsInfo `json:"vipps,omitempty"` @@ -65,6 +68,38 @@ func NewPaymentMethodSetupInfoWithDefaults() *PaymentMethodSetupInfo { return &this } +// GetAfterpayTouch returns the AfterpayTouch field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetAfterpayTouch() AfterpayTouchInfo { + if o == nil || common.IsNil(o.AfterpayTouch) { + var ret AfterpayTouchInfo + return ret + } + return *o.AfterpayTouch +} + +// GetAfterpayTouchOk returns a tuple with the AfterpayTouch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetAfterpayTouchOk() (*AfterpayTouchInfo, bool) { + if o == nil || common.IsNil(o.AfterpayTouch) { + return nil, false + } + return o.AfterpayTouch, true +} + +// HasAfterpayTouch returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasAfterpayTouch() bool { + if o != nil && !common.IsNil(o.AfterpayTouch) { + return true + } + + return false +} + +// SetAfterpayTouch gets a reference to the given AfterpayTouchInfo and assigns it to the AfterpayTouch field. +func (o *PaymentMethodSetupInfo) SetAfterpayTouch(v AfterpayTouchInfo) { + o.AfterpayTouch = &v +} + // GetApplePay returns the ApplePay field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetApplePay() ApplePayInfo { if o == nil || common.IsNil(o.ApplePay) { @@ -193,6 +228,38 @@ func (o *PaymentMethodSetupInfo) SetCartesBancaires(v CartesBancairesInfo) { o.CartesBancaires = &v } +// GetClearpay returns the Clearpay field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetClearpay() ClearpayInfo { + if o == nil || common.IsNil(o.Clearpay) { + var ret ClearpayInfo + return ret + } + return *o.Clearpay +} + +// GetClearpayOk returns a tuple with the Clearpay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetClearpayOk() (*ClearpayInfo, bool) { + if o == nil || common.IsNil(o.Clearpay) { + return nil, false + } + return o.Clearpay, true +} + +// HasClearpay returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasClearpay() bool { + if o != nil && !common.IsNil(o.Clearpay) { + return true + } + + return false +} + +// SetClearpay gets a reference to the given ClearpayInfo and assigns it to the Clearpay field. +func (o *PaymentMethodSetupInfo) SetClearpay(v ClearpayInfo) { + o.Clearpay = &v +} + // GetCountries returns the Countries field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetCountries() []string { if o == nil || common.IsNil(o.Countries) { @@ -609,6 +676,38 @@ func (o *PaymentMethodSetupInfo) SetSwish(v SwishInfo) { o.Swish = &v } +// GetTwint returns the Twint field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetTwint() TwintInfo { + if o == nil || common.IsNil(o.Twint) { + var ret TwintInfo + return ret + } + return *o.Twint +} + +// GetTwintOk returns a tuple with the Twint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetTwintOk() (*TwintInfo, bool) { + if o == nil || common.IsNil(o.Twint) { + return nil, false + } + return o.Twint, true +} + +// HasTwint returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasTwint() bool { + if o != nil && !common.IsNil(o.Twint) { + return true + } + + return false +} + +// SetTwint gets a reference to the given TwintInfo and assigns it to the Twint field. +func (o *PaymentMethodSetupInfo) SetTwint(v TwintInfo) { + o.Twint = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -683,6 +782,9 @@ func (o PaymentMethodSetupInfo) MarshalJSON() ([]byte, error) { func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AfterpayTouch) { + toSerialize["afterpayTouch"] = o.AfterpayTouch + } if !common.IsNil(o.ApplePay) { toSerialize["applePay"] = o.ApplePay } @@ -695,6 +797,9 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CartesBancaires) { toSerialize["cartesBancaires"] = o.CartesBancaires } + if !common.IsNil(o.Clearpay) { + toSerialize["clearpay"] = o.Clearpay + } if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } @@ -734,6 +839,9 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Swish) { toSerialize["swish"] = o.Swish } + if !common.IsNil(o.Twint) { + toSerialize["twint"] = o.Twint + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } @@ -789,7 +897,7 @@ func (o *PaymentMethodSetupInfo) isValidShopperInteraction() bool { return false } func (o *PaymentMethodSetupInfo) isValidType() bool { - var allowedEnumValues = []string{"afterpaytouch", "alipay", "alipay_hk", "amex", "applepay", "bcmc", "blik", "cartebancaire", "clearpay", "cup", "diners", "directEbanking", "directdebit_GB", "discover", "ebanking_FI", "eftpos_australia", "elo", "elocredit", "elodebit", "girocard", "giropay", "googlepay", "hiper", "hipercard", "ideal", "interac_card", "jcb", "klarna", "klarna_account", "klarna_paynow", "maestro", "mbway", "mc", "mcdebit", "mealVoucher_FR", "mobilepay", "multibanco", "onlineBanking_PL", "paypal", "payshop", "swish", "trustly", "vipps", "visa", "visadebit", "vpay", "wechatpay", "wechatpay_pos"} + var allowedEnumValues = []string{"afterpaytouch", "alipay", "alipay_hk", "amex", "applepay", "bcmc", "blik", "cartebancaire", "clearpay", "cup", "diners", "directEbanking", "directdebit_GB", "discover", "ebanking_FI", "eftpos_australia", "elo", "elocredit", "elodebit", "girocard", "googlepay", "hiper", "hipercard", "ideal", "interac_card", "jcb", "klarna", "klarna_account", "klarna_paynow", "maestro", "mbway", "mc", "mcdebit", "mealVoucher_FR", "mobilepay", "multibanco", "onlineBanking_PL", "paybybank", "paypal", "payshop", "swish", "trustly", "twint", "twint_pos", "vipps", "visa", "visadebit", "vpay", "wechatpay", "wechatpay_pos"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/management/model_payment_method_wrapper.go b/src/management/model_payment_method_wrapper.go new file mode 100644 index 000000000..e3b3361ba --- /dev/null +++ b/src/management/model_payment_method_wrapper.go @@ -0,0 +1,124 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the PaymentMethodWrapper type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PaymentMethodWrapper{} + +// PaymentMethodWrapper struct for PaymentMethodWrapper +type PaymentMethodWrapper struct { + PaymentMethod *PaymentMethod `json:"PaymentMethod,omitempty"` +} + +// NewPaymentMethodWrapper instantiates a new PaymentMethodWrapper 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 NewPaymentMethodWrapper() *PaymentMethodWrapper { + this := PaymentMethodWrapper{} + return &this +} + +// NewPaymentMethodWrapperWithDefaults instantiates a new PaymentMethodWrapper 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 NewPaymentMethodWrapperWithDefaults() *PaymentMethodWrapper { + this := PaymentMethodWrapper{} + return &this +} + +// GetPaymentMethod returns the PaymentMethod field value if set, zero value otherwise. +func (o *PaymentMethodWrapper) GetPaymentMethod() PaymentMethod { + if o == nil || common.IsNil(o.PaymentMethod) { + var ret PaymentMethod + return ret + } + return *o.PaymentMethod +} + +// GetPaymentMethodOk returns a tuple with the PaymentMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodWrapper) GetPaymentMethodOk() (*PaymentMethod, bool) { + if o == nil || common.IsNil(o.PaymentMethod) { + return nil, false + } + return o.PaymentMethod, true +} + +// HasPaymentMethod returns a boolean if a field has been set. +func (o *PaymentMethodWrapper) HasPaymentMethod() bool { + if o != nil && !common.IsNil(o.PaymentMethod) { + return true + } + + return false +} + +// SetPaymentMethod gets a reference to the given PaymentMethod and assigns it to the PaymentMethod field. +func (o *PaymentMethodWrapper) SetPaymentMethod(v PaymentMethod) { + o.PaymentMethod = &v +} + +func (o PaymentMethodWrapper) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethodWrapper) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.PaymentMethod) { + toSerialize["PaymentMethod"] = o.PaymentMethod + } + return toSerialize, nil +} + +type NullablePaymentMethodWrapper struct { + value *PaymentMethodWrapper + isSet bool +} + +func (v NullablePaymentMethodWrapper) Get() *PaymentMethodWrapper { + return v.value +} + +func (v *NullablePaymentMethodWrapper) Set(val *PaymentMethodWrapper) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentMethodWrapper) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentMethodWrapper) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentMethodWrapper(val *PaymentMethodWrapper) *NullablePaymentMethodWrapper { + return &NullablePaymentMethodWrapper{value: val, isSet: true} +} + +func (v NullablePaymentMethodWrapper) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentMethodWrapper) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_rest_service_error.go b/src/management/model_rest_service_error.go index 6e456c1a8..645860fff 100644 --- a/src/management/model_rest_service_error.go +++ b/src/management/model_rest_service_error.go @@ -26,7 +26,7 @@ type RestServiceError struct { // A unique URI that identifies the specific occurrence of the problem. Instance *string `json:"instance,omitempty"` // Detailed explanation of each validation error, when applicable. - InvalidFields []InvalidField `json:"invalidFields,omitempty"` + InvalidFields []InvalidFieldWrapper `json:"invalidFields,omitempty"` // A unique reference for the request, essentially the same as `pspReference`. RequestId *string `json:"requestId,omitempty"` Response *JSONObject `json:"response,omitempty"` @@ -141,9 +141,9 @@ func (o *RestServiceError) SetInstance(v string) { } // GetInvalidFields returns the InvalidFields field value if set, zero value otherwise. -func (o *RestServiceError) GetInvalidFields() []InvalidField { +func (o *RestServiceError) GetInvalidFields() []InvalidFieldWrapper { if o == nil || common.IsNil(o.InvalidFields) { - var ret []InvalidField + var ret []InvalidFieldWrapper return ret } return o.InvalidFields @@ -151,7 +151,7 @@ func (o *RestServiceError) GetInvalidFields() []InvalidField { // GetInvalidFieldsOk returns a tuple with the InvalidFields field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RestServiceError) GetInvalidFieldsOk() ([]InvalidField, bool) { +func (o *RestServiceError) GetInvalidFieldsOk() ([]InvalidFieldWrapper, bool) { if o == nil || common.IsNil(o.InvalidFields) { return nil, false } @@ -167,8 +167,8 @@ func (o *RestServiceError) HasInvalidFields() bool { return false } -// SetInvalidFields gets a reference to the given []InvalidField and assigns it to the InvalidFields field. -func (o *RestServiceError) SetInvalidFields(v []InvalidField) { +// SetInvalidFields gets a reference to the given []InvalidFieldWrapper and assigns it to the InvalidFields field. +func (o *RestServiceError) SetInvalidFields(v []InvalidFieldWrapper) { o.InvalidFields = v } diff --git a/src/management/model_split_configuration.go b/src/management/model_split_configuration.go new file mode 100644 index 000000000..b625b7d35 --- /dev/null +++ b/src/management/model_split_configuration.go @@ -0,0 +1,218 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the SplitConfiguration type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SplitConfiguration{} + +// SplitConfiguration struct for SplitConfiguration +type SplitConfiguration struct { + // Your description for the split configuration. + Description string `json:"description"` + // Array of rules that define the split configuration behavior. + Rules []SplitConfigurationRule `json:"rules"` + // Unique identifier of the split configuration. + SplitConfigurationId *string `json:"splitConfigurationId,omitempty"` + // List of stores to which the split configuration applies. + Stores []string `json:"stores,omitempty"` +} + +// NewSplitConfiguration instantiates a new SplitConfiguration 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 NewSplitConfiguration(description string, rules []SplitConfigurationRule) *SplitConfiguration { + this := SplitConfiguration{} + this.Description = description + this.Rules = rules + return &this +} + +// NewSplitConfigurationWithDefaults instantiates a new SplitConfiguration 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 NewSplitConfigurationWithDefaults() *SplitConfiguration { + this := SplitConfiguration{} + return &this +} + +// GetDescription returns the Description field value +func (o *SplitConfiguration) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *SplitConfiguration) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *SplitConfiguration) SetDescription(v string) { + o.Description = v +} + +// GetRules returns the Rules field value +func (o *SplitConfiguration) GetRules() []SplitConfigurationRule { + if o == nil { + var ret []SplitConfigurationRule + return ret + } + + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value +// and a boolean to check if the value has been set. +func (o *SplitConfiguration) GetRulesOk() ([]SplitConfigurationRule, bool) { + if o == nil { + return nil, false + } + return o.Rules, true +} + +// SetRules sets field value +func (o *SplitConfiguration) SetRules(v []SplitConfigurationRule) { + o.Rules = v +} + +// GetSplitConfigurationId returns the SplitConfigurationId field value if set, zero value otherwise. +func (o *SplitConfiguration) GetSplitConfigurationId() string { + if o == nil || common.IsNil(o.SplitConfigurationId) { + var ret string + return ret + } + return *o.SplitConfigurationId +} + +// GetSplitConfigurationIdOk returns a tuple with the SplitConfigurationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfiguration) GetSplitConfigurationIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SplitConfigurationId) { + return nil, false + } + return o.SplitConfigurationId, true +} + +// HasSplitConfigurationId returns a boolean if a field has been set. +func (o *SplitConfiguration) HasSplitConfigurationId() bool { + if o != nil && !common.IsNil(o.SplitConfigurationId) { + return true + } + + return false +} + +// SetSplitConfigurationId gets a reference to the given string and assigns it to the SplitConfigurationId field. +func (o *SplitConfiguration) SetSplitConfigurationId(v string) { + o.SplitConfigurationId = &v +} + +// GetStores returns the Stores field value if set, zero value otherwise. +func (o *SplitConfiguration) GetStores() []string { + if o == nil || common.IsNil(o.Stores) { + var ret []string + return ret + } + return o.Stores +} + +// GetStoresOk returns a tuple with the Stores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfiguration) GetStoresOk() ([]string, bool) { + if o == nil || common.IsNil(o.Stores) { + return nil, false + } + return o.Stores, true +} + +// HasStores returns a boolean if a field has been set. +func (o *SplitConfiguration) HasStores() bool { + if o != nil && !common.IsNil(o.Stores) { + return true + } + + return false +} + +// SetStores gets a reference to the given []string and assigns it to the Stores field. +func (o *SplitConfiguration) SetStores(v []string) { + o.Stores = v +} + +func (o SplitConfiguration) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitConfiguration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["rules"] = o.Rules + if !common.IsNil(o.SplitConfigurationId) { + toSerialize["splitConfigurationId"] = o.SplitConfigurationId + } + if !common.IsNil(o.Stores) { + toSerialize["stores"] = o.Stores + } + return toSerialize, nil +} + +type NullableSplitConfiguration struct { + value *SplitConfiguration + isSet bool +} + +func (v NullableSplitConfiguration) Get() *SplitConfiguration { + return v.value +} + +func (v *NullableSplitConfiguration) Set(val *SplitConfiguration) { + v.value = val + v.isSet = true +} + +func (v NullableSplitConfiguration) IsSet() bool { + return v.isSet +} + +func (v *NullableSplitConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplitConfiguration(val *SplitConfiguration) *NullableSplitConfiguration { + return &NullableSplitConfiguration{value: val, isSet: true} +} + +func (v NullableSplitConfiguration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplitConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_split_configuration_list.go b/src/management/model_split_configuration_list.go new file mode 100644 index 000000000..221be2af4 --- /dev/null +++ b/src/management/model_split_configuration_list.go @@ -0,0 +1,125 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the SplitConfigurationList type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SplitConfigurationList{} + +// SplitConfigurationList struct for SplitConfigurationList +type SplitConfigurationList struct { + // List of split configurations applied to the stores under the merchant account. + Data []SplitConfiguration `json:"data,omitempty"` +} + +// NewSplitConfigurationList instantiates a new SplitConfigurationList 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 NewSplitConfigurationList() *SplitConfigurationList { + this := SplitConfigurationList{} + return &this +} + +// NewSplitConfigurationListWithDefaults instantiates a new SplitConfigurationList 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 NewSplitConfigurationListWithDefaults() *SplitConfigurationList { + this := SplitConfigurationList{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *SplitConfigurationList) GetData() []SplitConfiguration { + if o == nil || common.IsNil(o.Data) { + var ret []SplitConfiguration + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationList) GetDataOk() ([]SplitConfiguration, bool) { + if o == nil || common.IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *SplitConfigurationList) HasData() bool { + if o != nil && !common.IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []SplitConfiguration and assigns it to the Data field. +func (o *SplitConfigurationList) SetData(v []SplitConfiguration) { + o.Data = v +} + +func (o SplitConfigurationList) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitConfigurationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableSplitConfigurationList struct { + value *SplitConfigurationList + isSet bool +} + +func (v NullableSplitConfigurationList) Get() *SplitConfigurationList { + return v.value +} + +func (v *NullableSplitConfigurationList) Set(val *SplitConfigurationList) { + v.value = val + v.isSet = true +} + +func (v NullableSplitConfigurationList) IsSet() bool { + return v.isSet +} + +func (v *NullableSplitConfigurationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplitConfigurationList(val *SplitConfigurationList) *NullableSplitConfigurationList { + return &NullableSplitConfigurationList{value: val, isSet: true} +} + +func (v NullableSplitConfigurationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplitConfigurationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_split_configuration_logic.go b/src/management/model_split_configuration_logic.go new file mode 100644 index 000000000..6b153010c --- /dev/null +++ b/src/management/model_split_configuration_logic.go @@ -0,0 +1,410 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the SplitConfigurationLogic type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SplitConfigurationLogic{} + +// SplitConfigurationLogic struct for SplitConfigurationLogic +type SplitConfigurationLogic struct { + AdditionalCommission *AdditionalCommission `json:"additionalCommission,omitempty"` + // Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + Chargeback *string `json:"chargeback,omitempty"` + Commission Commission `json:"commission"` + // Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + PaymentFee string `json:"paymentFee"` + // Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + Remainder *string `json:"remainder,omitempty"` + // Unique identifier of the split logic that is applied when the split configuration conditions are met. + SplitLogicId *string `json:"splitLogicId,omitempty"` + // Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + Surcharge *string `json:"surcharge,omitempty"` + // Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + Tip *string `json:"tip,omitempty"` +} + +// NewSplitConfigurationLogic instantiates a new SplitConfigurationLogic 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 NewSplitConfigurationLogic(commission Commission, paymentFee string) *SplitConfigurationLogic { + this := SplitConfigurationLogic{} + this.Commission = commission + this.PaymentFee = paymentFee + return &this +} + +// NewSplitConfigurationLogicWithDefaults instantiates a new SplitConfigurationLogic 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 NewSplitConfigurationLogicWithDefaults() *SplitConfigurationLogic { + this := SplitConfigurationLogic{} + return &this +} + +// GetAdditionalCommission returns the AdditionalCommission field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetAdditionalCommission() AdditionalCommission { + if o == nil || common.IsNil(o.AdditionalCommission) { + var ret AdditionalCommission + return ret + } + return *o.AdditionalCommission +} + +// GetAdditionalCommissionOk returns a tuple with the AdditionalCommission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetAdditionalCommissionOk() (*AdditionalCommission, bool) { + if o == nil || common.IsNil(o.AdditionalCommission) { + return nil, false + } + return o.AdditionalCommission, true +} + +// HasAdditionalCommission returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasAdditionalCommission() bool { + if o != nil && !common.IsNil(o.AdditionalCommission) { + return true + } + + return false +} + +// SetAdditionalCommission gets a reference to the given AdditionalCommission and assigns it to the AdditionalCommission field. +func (o *SplitConfigurationLogic) SetAdditionalCommission(v AdditionalCommission) { + o.AdditionalCommission = &v +} + +// GetChargeback returns the Chargeback field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetChargeback() string { + if o == nil || common.IsNil(o.Chargeback) { + var ret string + return ret + } + return *o.Chargeback +} + +// GetChargebackOk returns a tuple with the Chargeback field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetChargebackOk() (*string, bool) { + if o == nil || common.IsNil(o.Chargeback) { + return nil, false + } + return o.Chargeback, true +} + +// HasChargeback returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasChargeback() bool { + if o != nil && !common.IsNil(o.Chargeback) { + return true + } + + return false +} + +// SetChargeback gets a reference to the given string and assigns it to the Chargeback field. +func (o *SplitConfigurationLogic) SetChargeback(v string) { + o.Chargeback = &v +} + +// GetCommission returns the Commission field value +func (o *SplitConfigurationLogic) GetCommission() Commission { + if o == nil { + var ret Commission + return ret + } + + return o.Commission +} + +// GetCommissionOk returns a tuple with the Commission field value +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetCommissionOk() (*Commission, bool) { + if o == nil { + return nil, false + } + return &o.Commission, true +} + +// SetCommission sets field value +func (o *SplitConfigurationLogic) SetCommission(v Commission) { + o.Commission = v +} + +// GetPaymentFee returns the PaymentFee field value +func (o *SplitConfigurationLogic) GetPaymentFee() string { + if o == nil { + var ret string + return ret + } + + return o.PaymentFee +} + +// GetPaymentFeeOk returns a tuple with the PaymentFee field value +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetPaymentFeeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentFee, true +} + +// SetPaymentFee sets field value +func (o *SplitConfigurationLogic) SetPaymentFee(v string) { + o.PaymentFee = v +} + +// GetRemainder returns the Remainder field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetRemainder() string { + if o == nil || common.IsNil(o.Remainder) { + var ret string + return ret + } + return *o.Remainder +} + +// GetRemainderOk returns a tuple with the Remainder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetRemainderOk() (*string, bool) { + if o == nil || common.IsNil(o.Remainder) { + return nil, false + } + return o.Remainder, true +} + +// HasRemainder returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasRemainder() bool { + if o != nil && !common.IsNil(o.Remainder) { + return true + } + + return false +} + +// SetRemainder gets a reference to the given string and assigns it to the Remainder field. +func (o *SplitConfigurationLogic) SetRemainder(v string) { + o.Remainder = &v +} + +// GetSplitLogicId returns the SplitLogicId field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetSplitLogicId() string { + if o == nil || common.IsNil(o.SplitLogicId) { + var ret string + return ret + } + return *o.SplitLogicId +} + +// GetSplitLogicIdOk returns a tuple with the SplitLogicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetSplitLogicIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SplitLogicId) { + return nil, false + } + return o.SplitLogicId, true +} + +// HasSplitLogicId returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasSplitLogicId() bool { + if o != nil && !common.IsNil(o.SplitLogicId) { + return true + } + + return false +} + +// SetSplitLogicId gets a reference to the given string and assigns it to the SplitLogicId field. +func (o *SplitConfigurationLogic) SetSplitLogicId(v string) { + o.SplitLogicId = &v +} + +// GetSurcharge returns the Surcharge field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetSurcharge() string { + if o == nil || common.IsNil(o.Surcharge) { + var ret string + return ret + } + return *o.Surcharge +} + +// GetSurchargeOk returns a tuple with the Surcharge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetSurchargeOk() (*string, bool) { + if o == nil || common.IsNil(o.Surcharge) { + return nil, false + } + return o.Surcharge, true +} + +// HasSurcharge returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasSurcharge() bool { + if o != nil && !common.IsNil(o.Surcharge) { + return true + } + + return false +} + +// SetSurcharge gets a reference to the given string and assigns it to the Surcharge field. +func (o *SplitConfigurationLogic) SetSurcharge(v string) { + o.Surcharge = &v +} + +// GetTip returns the Tip field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetTip() string { + if o == nil || common.IsNil(o.Tip) { + var ret string + return ret + } + return *o.Tip +} + +// GetTipOk returns a tuple with the Tip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetTipOk() (*string, bool) { + if o == nil || common.IsNil(o.Tip) { + return nil, false + } + return o.Tip, true +} + +// HasTip returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasTip() bool { + if o != nil && !common.IsNil(o.Tip) { + return true + } + + return false +} + +// SetTip gets a reference to the given string and assigns it to the Tip field. +func (o *SplitConfigurationLogic) SetTip(v string) { + o.Tip = &v +} + +func (o SplitConfigurationLogic) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitConfigurationLogic) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AdditionalCommission) { + toSerialize["additionalCommission"] = o.AdditionalCommission + } + if !common.IsNil(o.Chargeback) { + toSerialize["chargeback"] = o.Chargeback + } + toSerialize["commission"] = o.Commission + toSerialize["paymentFee"] = o.PaymentFee + if !common.IsNil(o.Remainder) { + toSerialize["remainder"] = o.Remainder + } + if !common.IsNil(o.SplitLogicId) { + toSerialize["splitLogicId"] = o.SplitLogicId + } + if !common.IsNil(o.Surcharge) { + toSerialize["surcharge"] = o.Surcharge + } + if !common.IsNil(o.Tip) { + toSerialize["tip"] = o.Tip + } + return toSerialize, nil +} + +type NullableSplitConfigurationLogic struct { + value *SplitConfigurationLogic + isSet bool +} + +func (v NullableSplitConfigurationLogic) Get() *SplitConfigurationLogic { + return v.value +} + +func (v *NullableSplitConfigurationLogic) Set(val *SplitConfigurationLogic) { + v.value = val + v.isSet = true +} + +func (v NullableSplitConfigurationLogic) IsSet() bool { + return v.isSet +} + +func (v *NullableSplitConfigurationLogic) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplitConfigurationLogic(val *SplitConfigurationLogic) *NullableSplitConfigurationLogic { + return &NullableSplitConfigurationLogic{value: val, isSet: true} +} + +func (v NullableSplitConfigurationLogic) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplitConfigurationLogic) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *SplitConfigurationLogic) isValidChargeback() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount", "deductAccordingToSplitRatio"} + for _, allowed := range allowedEnumValues { + if o.GetChargeback() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidPaymentFee() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetPaymentFee() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidRemainder() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetRemainder() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidSurcharge() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetSurcharge() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidTip() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetTip() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_split_configuration_rule.go b/src/management/model_split_configuration_rule.go new file mode 100644 index 000000000..9870c95c7 --- /dev/null +++ b/src/management/model_split_configuration_rule.go @@ -0,0 +1,292 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the SplitConfigurationRule type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SplitConfigurationRule{} + +// SplitConfigurationRule struct for SplitConfigurationRule +type SplitConfigurationRule struct { + // The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + Currency string `json:"currency"` + // The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + FundingSource *string `json:"fundingSource,omitempty"` + // The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. + PaymentMethod string `json:"paymentMethod"` + // The unique identifier of the split configuration rule. + RuleId *string `json:"ruleId,omitempty"` + // The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + ShopperInteraction string `json:"shopperInteraction"` + SplitLogic SplitConfigurationLogic `json:"splitLogic"` +} + +// NewSplitConfigurationRule instantiates a new SplitConfigurationRule 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 NewSplitConfigurationRule(currency string, paymentMethod string, shopperInteraction string, splitLogic SplitConfigurationLogic) *SplitConfigurationRule { + this := SplitConfigurationRule{} + this.Currency = currency + this.PaymentMethod = paymentMethod + this.ShopperInteraction = shopperInteraction + this.SplitLogic = splitLogic + return &this +} + +// NewSplitConfigurationRuleWithDefaults instantiates a new SplitConfigurationRule 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 NewSplitConfigurationRuleWithDefaults() *SplitConfigurationRule { + this := SplitConfigurationRule{} + return &this +} + +// GetCurrency returns the Currency field value +func (o *SplitConfigurationRule) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *SplitConfigurationRule) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *SplitConfigurationRule) SetCurrency(v string) { + o.Currency = v +} + +// GetFundingSource returns the FundingSource field value if set, zero value otherwise. +func (o *SplitConfigurationRule) 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 *SplitConfigurationRule) 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 *SplitConfigurationRule) 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 *SplitConfigurationRule) SetFundingSource(v string) { + o.FundingSource = &v +} + +// GetPaymentMethod returns the PaymentMethod field value +func (o *SplitConfigurationRule) GetPaymentMethod() string { + if o == nil { + var ret 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 *SplitConfigurationRule) GetPaymentMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentMethod, true +} + +// SetPaymentMethod sets field value +func (o *SplitConfigurationRule) SetPaymentMethod(v string) { + o.PaymentMethod = v +} + +// GetRuleId returns the RuleId field value if set, zero value otherwise. +func (o *SplitConfigurationRule) GetRuleId() string { + if o == nil || common.IsNil(o.RuleId) { + var ret string + return ret + } + return *o.RuleId +} + +// GetRuleIdOk returns a tuple with the RuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationRule) GetRuleIdOk() (*string, bool) { + if o == nil || common.IsNil(o.RuleId) { + return nil, false + } + return o.RuleId, true +} + +// HasRuleId returns a boolean if a field has been set. +func (o *SplitConfigurationRule) HasRuleId() bool { + if o != nil && !common.IsNil(o.RuleId) { + return true + } + + return false +} + +// SetRuleId gets a reference to the given string and assigns it to the RuleId field. +func (o *SplitConfigurationRule) SetRuleId(v string) { + o.RuleId = &v +} + +// GetShopperInteraction returns the ShopperInteraction field value +func (o *SplitConfigurationRule) GetShopperInteraction() string { + if o == nil { + var ret string + return ret + } + + return o.ShopperInteraction +} + +// GetShopperInteractionOk returns a tuple with the ShopperInteraction field value +// and a boolean to check if the value has been set. +func (o *SplitConfigurationRule) GetShopperInteractionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ShopperInteraction, true +} + +// SetShopperInteraction sets field value +func (o *SplitConfigurationRule) SetShopperInteraction(v string) { + o.ShopperInteraction = v +} + +// GetSplitLogic returns the SplitLogic field value +func (o *SplitConfigurationRule) GetSplitLogic() SplitConfigurationLogic { + if o == nil { + var ret SplitConfigurationLogic + return ret + } + + return o.SplitLogic +} + +// GetSplitLogicOk returns a tuple with the SplitLogic field value +// and a boolean to check if the value has been set. +func (o *SplitConfigurationRule) GetSplitLogicOk() (*SplitConfigurationLogic, bool) { + if o == nil { + return nil, false + } + return &o.SplitLogic, true +} + +// SetSplitLogic sets field value +func (o *SplitConfigurationRule) SetSplitLogic(v SplitConfigurationLogic) { + o.SplitLogic = v +} + +func (o SplitConfigurationRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplitConfigurationRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["currency"] = o.Currency + if !common.IsNil(o.FundingSource) { + toSerialize["fundingSource"] = o.FundingSource + } + toSerialize["paymentMethod"] = o.PaymentMethod + if !common.IsNil(o.RuleId) { + toSerialize["ruleId"] = o.RuleId + } + toSerialize["shopperInteraction"] = o.ShopperInteraction + toSerialize["splitLogic"] = o.SplitLogic + return toSerialize, nil +} + +type NullableSplitConfigurationRule struct { + value *SplitConfigurationRule + isSet bool +} + +func (v NullableSplitConfigurationRule) Get() *SplitConfigurationRule { + return v.value +} + +func (v *NullableSplitConfigurationRule) Set(val *SplitConfigurationRule) { + v.value = val + v.isSet = true +} + +func (v NullableSplitConfigurationRule) IsSet() bool { + return v.isSet +} + +func (v *NullableSplitConfigurationRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplitConfigurationRule(val *SplitConfigurationRule) *NullableSplitConfigurationRule { + return &NullableSplitConfigurationRule{value: val, isSet: true} +} + +func (v NullableSplitConfigurationRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplitConfigurationRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *SplitConfigurationRule) isValidFundingSource() bool { + var allowedEnumValues = []string{"credit", "debit", "ANY"} + for _, allowed := range allowedEnumValues { + if o.GetFundingSource() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationRule) isValidShopperInteraction() bool { + var allowedEnumValues = []string{"Ecommerce", "ContAuth", "Moto", "POS", "ANY"} + for _, allowed := range allowedEnumValues { + if o.GetShopperInteraction() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_store_creation_request.go b/src/management/model_store_creation_request.go index c0c04f23a..b3cc54c44 100644 --- a/src/management/model_store_creation_request.go +++ b/src/management/model_store_creation_request.go @@ -20,15 +20,15 @@ var _ common.MappedNullable = &StoreCreationRequest{} // StoreCreationRequest struct for StoreCreationRequest type StoreCreationRequest struct { Address StoreLocation `json:"address"` - // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. BusinessLineIds []string `json:"businessLineIds,omitempty"` // Your description of the store. Description string `json:"description"` - // When using the Zip payment method: The location ID that Zip has assigned to your store. + // Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. ExternalReferenceId *string `json:"externalReferenceId,omitempty"` // The phone number of the store, including '+' and country code. PhoneNumber string `json:"phoneNumber"` - // Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + // Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). Reference *string `json:"reference,omitempty"` // The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. ShopperStatement string `json:"shopperStatement"` diff --git a/src/management/model_store_creation_with_merchant_code_request.go b/src/management/model_store_creation_with_merchant_code_request.go index ba1f86da4..52d42346c 100644 --- a/src/management/model_store_creation_with_merchant_code_request.go +++ b/src/management/model_store_creation_with_merchant_code_request.go @@ -20,17 +20,17 @@ var _ common.MappedNullable = &StoreCreationWithMerchantCodeRequest{} // StoreCreationWithMerchantCodeRequest struct for StoreCreationWithMerchantCodeRequest type StoreCreationWithMerchantCodeRequest struct { Address StoreLocation `json:"address"` - // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. + // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. BusinessLineIds []string `json:"businessLineIds,omitempty"` // Your description of the store. Description string `json:"description"` - // When using the Zip payment method: The location ID that Zip has assigned to your store. + // Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. ExternalReferenceId *string `json:"externalReferenceId,omitempty"` // The unique identifier of the merchant account that the store belongs to. MerchantId string `json:"merchantId"` // The phone number of the store, including '+' and country code. PhoneNumber string `json:"phoneNumber"` - // Your reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). + // Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). Reference *string `json:"reference,omitempty"` // The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. ShopperStatement string `json:"shopperStatement"` diff --git a/src/management/model_terminal_order_request.go b/src/management/model_terminal_order_request.go index a18b16214..623b37687 100644 --- a/src/management/model_terminal_order_request.go +++ b/src/management/model_terminal_order_request.go @@ -25,6 +25,8 @@ type TerminalOrderRequest struct { CustomerOrderReference *string `json:"customerOrderReference,omitempty"` // The products included in the order. Items []OrderItem `json:"items,omitempty"` + // Type of order + OrderType *string `json:"orderType,omitempty"` // The identification of the shipping location to use for the order. ShippingLocationId *string `json:"shippingLocationId,omitempty"` // The tax number of the billing entity. @@ -144,6 +146,38 @@ func (o *TerminalOrderRequest) SetItems(v []OrderItem) { o.Items = v } +// GetOrderType returns the OrderType field value if set, zero value otherwise. +func (o *TerminalOrderRequest) GetOrderType() string { + if o == nil || common.IsNil(o.OrderType) { + var ret string + return ret + } + return *o.OrderType +} + +// GetOrderTypeOk returns a tuple with the OrderType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalOrderRequest) GetOrderTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.OrderType) { + return nil, false + } + return o.OrderType, true +} + +// HasOrderType returns a boolean if a field has been set. +func (o *TerminalOrderRequest) HasOrderType() bool { + if o != nil && !common.IsNil(o.OrderType) { + return true + } + + return false +} + +// SetOrderType gets a reference to the given string and assigns it to the OrderType field. +func (o *TerminalOrderRequest) SetOrderType(v string) { + o.OrderType = &v +} + // GetShippingLocationId returns the ShippingLocationId field value if set, zero value otherwise. func (o *TerminalOrderRequest) GetShippingLocationId() string { if o == nil || common.IsNil(o.ShippingLocationId) { @@ -227,6 +261,9 @@ func (o TerminalOrderRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Items) { toSerialize["items"] = o.Items } + if !common.IsNil(o.OrderType) { + toSerialize["orderType"] = o.OrderType + } if !common.IsNil(o.ShippingLocationId) { toSerialize["shippingLocationId"] = o.ShippingLocationId } diff --git a/src/management/model_terminal_product_price.go b/src/management/model_terminal_product_price.go index 21898f570..9b5ddd74b 100644 --- a/src/management/model_terminal_product_price.go +++ b/src/management/model_terminal_product_price.go @@ -20,8 +20,9 @@ var _ common.MappedNullable = &TerminalProductPrice{} // TerminalProductPrice struct for TerminalProductPrice type TerminalProductPrice struct { // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - Currency *string `json:"currency,omitempty"` - Value map[string]interface{} `json:"value,omitempty"` + Currency *string `json:"currency,omitempty"` + // The price of the item. + Value *float64 `json:"value,omitempty"` } // NewTerminalProductPrice instantiates a new TerminalProductPrice object @@ -74,19 +75,19 @@ func (o *TerminalProductPrice) SetCurrency(v string) { } // GetValue returns the Value field value if set, zero value otherwise. -func (o *TerminalProductPrice) GetValue() map[string]interface{} { +func (o *TerminalProductPrice) GetValue() float64 { if o == nil || common.IsNil(o.Value) { - var ret map[string]interface{} + var ret float64 return ret } - return o.Value + return *o.Value } // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TerminalProductPrice) GetValueOk() (map[string]interface{}, bool) { +func (o *TerminalProductPrice) GetValueOk() (*float64, bool) { if o == nil || common.IsNil(o.Value) { - return map[string]interface{}{}, false + return nil, false } return o.Value, true } @@ -100,9 +101,9 @@ func (o *TerminalProductPrice) HasValue() bool { return false } -// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. -func (o *TerminalProductPrice) SetValue(v map[string]interface{}) { - o.Value = v +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *TerminalProductPrice) SetValue(v float64) { + o.Value = &v } func (o TerminalProductPrice) MarshalJSON() ([]byte, error) { diff --git a/src/management/model_twint_info.go b/src/management/model_twint_info.go new file mode 100644 index 000000000..d1723dcf7 --- /dev/null +++ b/src/management/model_twint_info.go @@ -0,0 +1,116 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TwintInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TwintInfo{} + +// TwintInfo struct for TwintInfo +type TwintInfo struct { + // Twint logo. Format: Base64-encoded string. + Logo string `json:"logo"` +} + +// NewTwintInfo instantiates a new TwintInfo 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 NewTwintInfo(logo string) *TwintInfo { + this := TwintInfo{} + this.Logo = logo + return &this +} + +// NewTwintInfoWithDefaults instantiates a new TwintInfo 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 NewTwintInfoWithDefaults() *TwintInfo { + this := TwintInfo{} + return &this +} + +// GetLogo returns the Logo field value +func (o *TwintInfo) GetLogo() string { + if o == nil { + var ret string + return ret + } + + return o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value +// and a boolean to check if the value has been set. +func (o *TwintInfo) GetLogoOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Logo, true +} + +// SetLogo sets field value +func (o *TwintInfo) SetLogo(v string) { + o.Logo = v +} + +func (o TwintInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TwintInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["logo"] = o.Logo + return toSerialize, nil +} + +type NullableTwintInfo struct { + value *TwintInfo + isSet bool +} + +func (v NullableTwintInfo) Get() *TwintInfo { + return v.value +} + +func (v *NullableTwintInfo) Set(val *TwintInfo) { + v.value = val + v.isSet = true +} + +func (v NullableTwintInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableTwintInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTwintInfo(val *TwintInfo) *NullableTwintInfo { + return &NullableTwintInfo{value: val, isSet: true} +} + +func (v NullableTwintInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTwintInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_update_company_api_credential_request.go b/src/management/model_update_company_api_credential_request.go index 57efd91d9..3f993f5a6 100644 --- a/src/management/model_update_company_api_credential_request.go +++ b/src/management/model_update_company_api_credential_request.go @@ -27,7 +27,7 @@ type UpdateCompanyApiCredentialRequest struct { AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` // Description of the API credential. Description *string `json:"description,omitempty"` - // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) of the API credential. + // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. Roles []string `json:"roles,omitempty"` } diff --git a/src/management/model_update_company_user_request.go b/src/management/model_update_company_user_request.go index 74a7371ca..e21f18988 100644 --- a/src/management/model_update_company_user_request.go +++ b/src/management/model_update_company_user_request.go @@ -25,10 +25,6 @@ type UpdateCompanyUserRequest struct { Active *bool `json:"active,omitempty"` // The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with. AssociatedMerchantAccounts []string `json:"associatedMerchantAccounts,omitempty"` - // Set of authn apps to add to this user - AuthnAppsToAdd []string `json:"authnAppsToAdd,omitempty"` - // Set of authn apps to remove from this user - AuthnAppsToRemove []string `json:"authnAppsToRemove,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` Name *Name2 `json:"name,omitempty"` @@ -151,70 +147,6 @@ func (o *UpdateCompanyUserRequest) SetAssociatedMerchantAccounts(v []string) { o.AssociatedMerchantAccounts = v } -// GetAuthnAppsToAdd returns the AuthnAppsToAdd field value if set, zero value otherwise. -func (o *UpdateCompanyUserRequest) GetAuthnAppsToAdd() []string { - if o == nil || common.IsNil(o.AuthnAppsToAdd) { - var ret []string - return ret - } - return o.AuthnAppsToAdd -} - -// GetAuthnAppsToAddOk returns a tuple with the AuthnAppsToAdd field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCompanyUserRequest) GetAuthnAppsToAddOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnAppsToAdd) { - return nil, false - } - return o.AuthnAppsToAdd, true -} - -// HasAuthnAppsToAdd returns a boolean if a field has been set. -func (o *UpdateCompanyUserRequest) HasAuthnAppsToAdd() bool { - if o != nil && !common.IsNil(o.AuthnAppsToAdd) { - return true - } - - return false -} - -// SetAuthnAppsToAdd gets a reference to the given []string and assigns it to the AuthnAppsToAdd field. -func (o *UpdateCompanyUserRequest) SetAuthnAppsToAdd(v []string) { - o.AuthnAppsToAdd = v -} - -// GetAuthnAppsToRemove returns the AuthnAppsToRemove field value if set, zero value otherwise. -func (o *UpdateCompanyUserRequest) GetAuthnAppsToRemove() []string { - if o == nil || common.IsNil(o.AuthnAppsToRemove) { - var ret []string - return ret - } - return o.AuthnAppsToRemove -} - -// GetAuthnAppsToRemoveOk returns a tuple with the AuthnAppsToRemove field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCompanyUserRequest) GetAuthnAppsToRemoveOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnAppsToRemove) { - return nil, false - } - return o.AuthnAppsToRemove, true -} - -// HasAuthnAppsToRemove returns a boolean if a field has been set. -func (o *UpdateCompanyUserRequest) HasAuthnAppsToRemove() bool { - if o != nil && !common.IsNil(o.AuthnAppsToRemove) { - return true - } - - return false -} - -// SetAuthnAppsToRemove gets a reference to the given []string and assigns it to the AuthnAppsToRemove field. -func (o *UpdateCompanyUserRequest) SetAuthnAppsToRemove(v []string) { - o.AuthnAppsToRemove = v -} - // GetEmail returns the Email field value if set, zero value otherwise. func (o *UpdateCompanyUserRequest) GetEmail() string { if o == nil || common.IsNil(o.Email) { @@ -362,12 +294,6 @@ func (o UpdateCompanyUserRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AssociatedMerchantAccounts) { toSerialize["associatedMerchantAccounts"] = o.AssociatedMerchantAccounts } - if !common.IsNil(o.AuthnAppsToAdd) { - toSerialize["authnAppsToAdd"] = o.AuthnAppsToAdd - } - if !common.IsNil(o.AuthnAppsToRemove) { - toSerialize["authnAppsToRemove"] = o.AuthnAppsToRemove - } if !common.IsNil(o.Email) { toSerialize["email"] = o.Email } diff --git a/src/management/model_update_company_webhook_request.go b/src/management/model_update_company_webhook_request.go index 8ee047a6f..f93a5ad8d 100644 --- a/src/management/model_update_company_webhook_request.go +++ b/src/management/model_update_company_webhook_request.go @@ -660,7 +660,7 @@ func (o *UpdateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { return false } func (o *UpdateCompanyWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"LOCAL", "PUBLIC"} + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { if o.GetNetworkType() == allowed { return true @@ -669,7 +669,7 @@ func (o *UpdateCompanyWebhookRequest) isValidNetworkType() bool { return false } func (o *UpdateCompanyWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "SSL", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"} + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { if o.GetSslVersion() == allowed { return true diff --git a/src/management/model_update_merchant_api_credential_request.go b/src/management/model_update_merchant_api_credential_request.go index 2380b4c38..3cd282de8 100644 --- a/src/management/model_update_merchant_api_credential_request.go +++ b/src/management/model_update_merchant_api_credential_request.go @@ -25,7 +25,7 @@ type UpdateMerchantApiCredentialRequest struct { AllowedOrigins []string `json:"allowedOrigins,omitempty"` // Description of the API credential. Description *string `json:"description,omitempty"` - // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. + // List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.' can be assigned to other API credentials. Roles []string `json:"roles,omitempty"` } diff --git a/src/management/model_update_merchant_user_request.go b/src/management/model_update_merchant_user_request.go index 1eeff729e..e160c42a5 100644 --- a/src/management/model_update_merchant_user_request.go +++ b/src/management/model_update_merchant_user_request.go @@ -23,10 +23,6 @@ type UpdateMerchantUserRequest struct { AccountGroups []string `json:"accountGroups,omitempty"` // Sets the status of the user to active (**true**) or inactive (**false**). Active *bool `json:"active,omitempty"` - // Set of authn apps to add to this user - AuthnAppsToAdd []string `json:"authnAppsToAdd,omitempty"` - // Set of authn apps to remove from this user - AuthnAppsToRemove []string `json:"authnAppsToRemove,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` Name *Name2 `json:"name,omitempty"` @@ -117,70 +113,6 @@ func (o *UpdateMerchantUserRequest) SetActive(v bool) { o.Active = &v } -// GetAuthnAppsToAdd returns the AuthnAppsToAdd field value if set, zero value otherwise. -func (o *UpdateMerchantUserRequest) GetAuthnAppsToAdd() []string { - if o == nil || common.IsNil(o.AuthnAppsToAdd) { - var ret []string - return ret - } - return o.AuthnAppsToAdd -} - -// GetAuthnAppsToAddOk returns a tuple with the AuthnAppsToAdd field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateMerchantUserRequest) GetAuthnAppsToAddOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnAppsToAdd) { - return nil, false - } - return o.AuthnAppsToAdd, true -} - -// HasAuthnAppsToAdd returns a boolean if a field has been set. -func (o *UpdateMerchantUserRequest) HasAuthnAppsToAdd() bool { - if o != nil && !common.IsNil(o.AuthnAppsToAdd) { - return true - } - - return false -} - -// SetAuthnAppsToAdd gets a reference to the given []string and assigns it to the AuthnAppsToAdd field. -func (o *UpdateMerchantUserRequest) SetAuthnAppsToAdd(v []string) { - o.AuthnAppsToAdd = v -} - -// GetAuthnAppsToRemove returns the AuthnAppsToRemove field value if set, zero value otherwise. -func (o *UpdateMerchantUserRequest) GetAuthnAppsToRemove() []string { - if o == nil || common.IsNil(o.AuthnAppsToRemove) { - var ret []string - return ret - } - return o.AuthnAppsToRemove -} - -// GetAuthnAppsToRemoveOk returns a tuple with the AuthnAppsToRemove field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateMerchantUserRequest) GetAuthnAppsToRemoveOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnAppsToRemove) { - return nil, false - } - return o.AuthnAppsToRemove, true -} - -// HasAuthnAppsToRemove returns a boolean if a field has been set. -func (o *UpdateMerchantUserRequest) HasAuthnAppsToRemove() bool { - if o != nil && !common.IsNil(o.AuthnAppsToRemove) { - return true - } - - return false -} - -// SetAuthnAppsToRemove gets a reference to the given []string and assigns it to the AuthnAppsToRemove field. -func (o *UpdateMerchantUserRequest) SetAuthnAppsToRemove(v []string) { - o.AuthnAppsToRemove = v -} - // GetEmail returns the Email field value if set, zero value otherwise. func (o *UpdateMerchantUserRequest) GetEmail() string { if o == nil || common.IsNil(o.Email) { @@ -325,12 +257,6 @@ func (o UpdateMerchantUserRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Active) { toSerialize["active"] = o.Active } - if !common.IsNil(o.AuthnAppsToAdd) { - toSerialize["authnAppsToAdd"] = o.AuthnAppsToAdd - } - if !common.IsNil(o.AuthnAppsToRemove) { - toSerialize["authnAppsToRemove"] = o.AuthnAppsToRemove - } if !common.IsNil(o.Email) { toSerialize["email"] = o.Email } diff --git a/src/management/model_update_merchant_webhook_request.go b/src/management/model_update_merchant_webhook_request.go index ea6f780c6..f2f023a39 100644 --- a/src/management/model_update_merchant_webhook_request.go +++ b/src/management/model_update_merchant_webhook_request.go @@ -577,7 +577,7 @@ func (o *UpdateMerchantWebhookRequest) isValidCommunicationFormat() bool { return false } func (o *UpdateMerchantWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"LOCAL", "PUBLIC"} + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { if o.GetNetworkType() == allowed { return true @@ -586,7 +586,7 @@ func (o *UpdateMerchantWebhookRequest) isValidNetworkType() bool { return false } func (o *UpdateMerchantWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "SSL", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"} + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { if o.GetSslVersion() == allowed { return true diff --git a/src/management/model_update_payment_method_info.go b/src/management/model_update_payment_method_info.go index 2a316ef47..86cbe8377 100644 --- a/src/management/model_update_payment_method_info.go +++ b/src/management/model_update_payment_method_info.go @@ -19,15 +19,14 @@ var _ common.MappedNullable = &UpdatePaymentMethodInfo{} // UpdatePaymentMethodInfo struct for UpdatePaymentMethodInfo type UpdatePaymentMethodInfo struct { + Bcmc *BcmcInfo `json:"bcmc,omitempty"` + CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. Countries []string `json:"countries,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. Currencies []string `json:"currencies,omitempty"` - // Custom routing flags for acquirer routing. - CustomRoutingFlags []string `json:"customRoutingFlags,omitempty"` // Indicates whether the payment method is enabled (**true**) or disabled (**false**). - Enabled *bool `json:"enabled,omitempty"` - ShopperStatement *ShopperStatement `json:"shopperStatement,omitempty"` + Enabled *bool `json:"enabled,omitempty"` // The list of stores for this payment method StoreIds []string `json:"storeIds,omitempty"` } @@ -49,6 +48,70 @@ func NewUpdatePaymentMethodInfoWithDefaults() *UpdatePaymentMethodInfo { return &this } +// GetBcmc returns the Bcmc field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetBcmc() BcmcInfo { + if o == nil || common.IsNil(o.Bcmc) { + var ret BcmcInfo + return ret + } + return *o.Bcmc +} + +// GetBcmcOk returns a tuple with the Bcmc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetBcmcOk() (*BcmcInfo, bool) { + if o == nil || common.IsNil(o.Bcmc) { + return nil, false + } + return o.Bcmc, true +} + +// HasBcmc returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasBcmc() bool { + if o != nil && !common.IsNil(o.Bcmc) { + return true + } + + return false +} + +// SetBcmc gets a reference to the given BcmcInfo and assigns it to the Bcmc field. +func (o *UpdatePaymentMethodInfo) SetBcmc(v BcmcInfo) { + o.Bcmc = &v +} + +// GetCartesBancaires returns the CartesBancaires field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetCartesBancaires() CartesBancairesInfo { + if o == nil || common.IsNil(o.CartesBancaires) { + var ret CartesBancairesInfo + return ret + } + return *o.CartesBancaires +} + +// GetCartesBancairesOk returns a tuple with the CartesBancaires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetCartesBancairesOk() (*CartesBancairesInfo, bool) { + if o == nil || common.IsNil(o.CartesBancaires) { + return nil, false + } + return o.CartesBancaires, true +} + +// HasCartesBancaires returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasCartesBancaires() bool { + if o != nil && !common.IsNil(o.CartesBancaires) { + return true + } + + return false +} + +// SetCartesBancaires gets a reference to the given CartesBancairesInfo and assigns it to the CartesBancaires field. +func (o *UpdatePaymentMethodInfo) SetCartesBancaires(v CartesBancairesInfo) { + o.CartesBancaires = &v +} + // GetCountries returns the Countries field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetCountries() []string { if o == nil || common.IsNil(o.Countries) { @@ -113,38 +176,6 @@ func (o *UpdatePaymentMethodInfo) SetCurrencies(v []string) { o.Currencies = v } -// GetCustomRoutingFlags returns the CustomRoutingFlags field value if set, zero value otherwise. -func (o *UpdatePaymentMethodInfo) GetCustomRoutingFlags() []string { - if o == nil || common.IsNil(o.CustomRoutingFlags) { - var ret []string - return ret - } - return o.CustomRoutingFlags -} - -// GetCustomRoutingFlagsOk returns a tuple with the CustomRoutingFlags field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePaymentMethodInfo) GetCustomRoutingFlagsOk() ([]string, bool) { - if o == nil || common.IsNil(o.CustomRoutingFlags) { - return nil, false - } - return o.CustomRoutingFlags, true -} - -// HasCustomRoutingFlags returns a boolean if a field has been set. -func (o *UpdatePaymentMethodInfo) HasCustomRoutingFlags() bool { - if o != nil && !common.IsNil(o.CustomRoutingFlags) { - return true - } - - return false -} - -// SetCustomRoutingFlags gets a reference to the given []string and assigns it to the CustomRoutingFlags field. -func (o *UpdatePaymentMethodInfo) SetCustomRoutingFlags(v []string) { - o.CustomRoutingFlags = v -} - // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetEnabled() bool { if o == nil || common.IsNil(o.Enabled) { @@ -177,38 +208,6 @@ func (o *UpdatePaymentMethodInfo) SetEnabled(v bool) { o.Enabled = &v } -// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. -func (o *UpdatePaymentMethodInfo) GetShopperStatement() ShopperStatement { - if o == nil || common.IsNil(o.ShopperStatement) { - var ret ShopperStatement - 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 *UpdatePaymentMethodInfo) GetShopperStatementOk() (*ShopperStatement, 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 *UpdatePaymentMethodInfo) HasShopperStatement() bool { - if o != nil && !common.IsNil(o.ShopperStatement) { - return true - } - - return false -} - -// SetShopperStatement gets a reference to the given ShopperStatement and assigns it to the ShopperStatement field. -func (o *UpdatePaymentMethodInfo) SetShopperStatement(v ShopperStatement) { - o.ShopperStatement = &v -} - // GetStoreIds returns the StoreIds field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetStoreIds() []string { if o == nil || common.IsNil(o.StoreIds) { @@ -251,21 +250,21 @@ func (o UpdatePaymentMethodInfo) MarshalJSON() ([]byte, error) { func (o UpdatePaymentMethodInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.Bcmc) { + toSerialize["bcmc"] = o.Bcmc + } + if !common.IsNil(o.CartesBancaires) { + toSerialize["cartesBancaires"] = o.CartesBancaires + } if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } if !common.IsNil(o.Currencies) { toSerialize["currencies"] = o.Currencies } - if !common.IsNil(o.CustomRoutingFlags) { - toSerialize["customRoutingFlags"] = o.CustomRoutingFlags - } if !common.IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if !common.IsNil(o.ShopperStatement) { - toSerialize["shopperStatement"] = o.ShopperStatement - } if !common.IsNil(o.StoreIds) { toSerialize["storeIds"] = o.StoreIds } diff --git a/src/management/model_update_split_configuration_logic_request.go b/src/management/model_update_split_configuration_logic_request.go new file mode 100644 index 000000000..14b39b581 --- /dev/null +++ b/src/management/model_update_split_configuration_logic_request.go @@ -0,0 +1,410 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the UpdateSplitConfigurationLogicRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UpdateSplitConfigurationLogicRequest{} + +// UpdateSplitConfigurationLogicRequest struct for UpdateSplitConfigurationLogicRequest +type UpdateSplitConfigurationLogicRequest struct { + AdditionalCommission *AdditionalCommission `json:"additionalCommission,omitempty"` + // Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. + Chargeback *string `json:"chargeback,omitempty"` + Commission Commission `json:"commission"` + // Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + PaymentFee string `json:"paymentFee"` + // Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + Remainder *string `json:"remainder,omitempty"` + // Unique identifier of the split logic that is applied when the split configuration conditions are met. + SplitLogicId *string `json:"splitLogicId,omitempty"` + // Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** + Surcharge *string `json:"surcharge,omitempty"` + // Specifies the logic to apply when booking tips (gratuity). Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. + Tip *string `json:"tip,omitempty"` +} + +// NewUpdateSplitConfigurationLogicRequest instantiates a new UpdateSplitConfigurationLogicRequest 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 NewUpdateSplitConfigurationLogicRequest(commission Commission, paymentFee string) *UpdateSplitConfigurationLogicRequest { + this := UpdateSplitConfigurationLogicRequest{} + this.Commission = commission + this.PaymentFee = paymentFee + return &this +} + +// NewUpdateSplitConfigurationLogicRequestWithDefaults instantiates a new UpdateSplitConfigurationLogicRequest 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 NewUpdateSplitConfigurationLogicRequestWithDefaults() *UpdateSplitConfigurationLogicRequest { + this := UpdateSplitConfigurationLogicRequest{} + return &this +} + +// GetAdditionalCommission returns the AdditionalCommission field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetAdditionalCommission() AdditionalCommission { + if o == nil || common.IsNil(o.AdditionalCommission) { + var ret AdditionalCommission + return ret + } + return *o.AdditionalCommission +} + +// GetAdditionalCommissionOk returns a tuple with the AdditionalCommission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetAdditionalCommissionOk() (*AdditionalCommission, bool) { + if o == nil || common.IsNil(o.AdditionalCommission) { + return nil, false + } + return o.AdditionalCommission, true +} + +// HasAdditionalCommission returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasAdditionalCommission() bool { + if o != nil && !common.IsNil(o.AdditionalCommission) { + return true + } + + return false +} + +// SetAdditionalCommission gets a reference to the given AdditionalCommission and assigns it to the AdditionalCommission field. +func (o *UpdateSplitConfigurationLogicRequest) SetAdditionalCommission(v AdditionalCommission) { + o.AdditionalCommission = &v +} + +// GetChargeback returns the Chargeback field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetChargeback() string { + if o == nil || common.IsNil(o.Chargeback) { + var ret string + return ret + } + return *o.Chargeback +} + +// GetChargebackOk returns a tuple with the Chargeback field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetChargebackOk() (*string, bool) { + if o == nil || common.IsNil(o.Chargeback) { + return nil, false + } + return o.Chargeback, true +} + +// HasChargeback returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasChargeback() bool { + if o != nil && !common.IsNil(o.Chargeback) { + return true + } + + return false +} + +// SetChargeback gets a reference to the given string and assigns it to the Chargeback field. +func (o *UpdateSplitConfigurationLogicRequest) SetChargeback(v string) { + o.Chargeback = &v +} + +// GetCommission returns the Commission field value +func (o *UpdateSplitConfigurationLogicRequest) GetCommission() Commission { + if o == nil { + var ret Commission + return ret + } + + return o.Commission +} + +// GetCommissionOk returns a tuple with the Commission field value +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetCommissionOk() (*Commission, bool) { + if o == nil { + return nil, false + } + return &o.Commission, true +} + +// SetCommission sets field value +func (o *UpdateSplitConfigurationLogicRequest) SetCommission(v Commission) { + o.Commission = v +} + +// GetPaymentFee returns the PaymentFee field value +func (o *UpdateSplitConfigurationLogicRequest) GetPaymentFee() string { + if o == nil { + var ret string + return ret + } + + return o.PaymentFee +} + +// GetPaymentFeeOk returns a tuple with the PaymentFee field value +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetPaymentFeeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentFee, true +} + +// SetPaymentFee sets field value +func (o *UpdateSplitConfigurationLogicRequest) SetPaymentFee(v string) { + o.PaymentFee = v +} + +// GetRemainder returns the Remainder field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetRemainder() string { + if o == nil || common.IsNil(o.Remainder) { + var ret string + return ret + } + return *o.Remainder +} + +// GetRemainderOk returns a tuple with the Remainder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetRemainderOk() (*string, bool) { + if o == nil || common.IsNil(o.Remainder) { + return nil, false + } + return o.Remainder, true +} + +// HasRemainder returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasRemainder() bool { + if o != nil && !common.IsNil(o.Remainder) { + return true + } + + return false +} + +// SetRemainder gets a reference to the given string and assigns it to the Remainder field. +func (o *UpdateSplitConfigurationLogicRequest) SetRemainder(v string) { + o.Remainder = &v +} + +// GetSplitLogicId returns the SplitLogicId field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetSplitLogicId() string { + if o == nil || common.IsNil(o.SplitLogicId) { + var ret string + return ret + } + return *o.SplitLogicId +} + +// GetSplitLogicIdOk returns a tuple with the SplitLogicId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetSplitLogicIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SplitLogicId) { + return nil, false + } + return o.SplitLogicId, true +} + +// HasSplitLogicId returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasSplitLogicId() bool { + if o != nil && !common.IsNil(o.SplitLogicId) { + return true + } + + return false +} + +// SetSplitLogicId gets a reference to the given string and assigns it to the SplitLogicId field. +func (o *UpdateSplitConfigurationLogicRequest) SetSplitLogicId(v string) { + o.SplitLogicId = &v +} + +// GetSurcharge returns the Surcharge field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetSurcharge() string { + if o == nil || common.IsNil(o.Surcharge) { + var ret string + return ret + } + return *o.Surcharge +} + +// GetSurchargeOk returns a tuple with the Surcharge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetSurchargeOk() (*string, bool) { + if o == nil || common.IsNil(o.Surcharge) { + return nil, false + } + return o.Surcharge, true +} + +// HasSurcharge returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasSurcharge() bool { + if o != nil && !common.IsNil(o.Surcharge) { + return true + } + + return false +} + +// SetSurcharge gets a reference to the given string and assigns it to the Surcharge field. +func (o *UpdateSplitConfigurationLogicRequest) SetSurcharge(v string) { + o.Surcharge = &v +} + +// GetTip returns the Tip field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetTip() string { + if o == nil || common.IsNil(o.Tip) { + var ret string + return ret + } + return *o.Tip +} + +// GetTipOk returns a tuple with the Tip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetTipOk() (*string, bool) { + if o == nil || common.IsNil(o.Tip) { + return nil, false + } + return o.Tip, true +} + +// HasTip returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasTip() bool { + if o != nil && !common.IsNil(o.Tip) { + return true + } + + return false +} + +// SetTip gets a reference to the given string and assigns it to the Tip field. +func (o *UpdateSplitConfigurationLogicRequest) SetTip(v string) { + o.Tip = &v +} + +func (o UpdateSplitConfigurationLogicRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSplitConfigurationLogicRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AdditionalCommission) { + toSerialize["additionalCommission"] = o.AdditionalCommission + } + if !common.IsNil(o.Chargeback) { + toSerialize["chargeback"] = o.Chargeback + } + toSerialize["commission"] = o.Commission + toSerialize["paymentFee"] = o.PaymentFee + if !common.IsNil(o.Remainder) { + toSerialize["remainder"] = o.Remainder + } + if !common.IsNil(o.SplitLogicId) { + toSerialize["splitLogicId"] = o.SplitLogicId + } + if !common.IsNil(o.Surcharge) { + toSerialize["surcharge"] = o.Surcharge + } + if !common.IsNil(o.Tip) { + toSerialize["tip"] = o.Tip + } + return toSerialize, nil +} + +type NullableUpdateSplitConfigurationLogicRequest struct { + value *UpdateSplitConfigurationLogicRequest + isSet bool +} + +func (v NullableUpdateSplitConfigurationLogicRequest) Get() *UpdateSplitConfigurationLogicRequest { + return v.value +} + +func (v *NullableUpdateSplitConfigurationLogicRequest) Set(val *UpdateSplitConfigurationLogicRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateSplitConfigurationLogicRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateSplitConfigurationLogicRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateSplitConfigurationLogicRequest(val *UpdateSplitConfigurationLogicRequest) *NullableUpdateSplitConfigurationLogicRequest { + return &NullableUpdateSplitConfigurationLogicRequest{value: val, isSet: true} +} + +func (v NullableUpdateSplitConfigurationLogicRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateSplitConfigurationLogicRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *UpdateSplitConfigurationLogicRequest) isValidChargeback() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount", "deductAccordingToSplitRatio"} + for _, allowed := range allowedEnumValues { + if o.GetChargeback() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidPaymentFee() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetPaymentFee() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidRemainder() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetRemainder() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidSurcharge() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetSurcharge() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidTip() bool { + var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetTip() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_update_split_configuration_request.go b/src/management/model_update_split_configuration_request.go new file mode 100644 index 000000000..a6a56cb79 --- /dev/null +++ b/src/management/model_update_split_configuration_request.go @@ -0,0 +1,116 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the UpdateSplitConfigurationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UpdateSplitConfigurationRequest{} + +// UpdateSplitConfigurationRequest struct for UpdateSplitConfigurationRequest +type UpdateSplitConfigurationRequest struct { + // Your description for the split configuration. + Description string `json:"description"` +} + +// NewUpdateSplitConfigurationRequest instantiates a new UpdateSplitConfigurationRequest 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 NewUpdateSplitConfigurationRequest(description string) *UpdateSplitConfigurationRequest { + this := UpdateSplitConfigurationRequest{} + this.Description = description + return &this +} + +// NewUpdateSplitConfigurationRequestWithDefaults instantiates a new UpdateSplitConfigurationRequest 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 NewUpdateSplitConfigurationRequestWithDefaults() *UpdateSplitConfigurationRequest { + this := UpdateSplitConfigurationRequest{} + return &this +} + +// GetDescription returns the Description field value +func (o *UpdateSplitConfigurationRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *UpdateSplitConfigurationRequest) SetDescription(v string) { + o.Description = v +} + +func (o UpdateSplitConfigurationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSplitConfigurationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + return toSerialize, nil +} + +type NullableUpdateSplitConfigurationRequest struct { + value *UpdateSplitConfigurationRequest + isSet bool +} + +func (v NullableUpdateSplitConfigurationRequest) Get() *UpdateSplitConfigurationRequest { + return v.value +} + +func (v *NullableUpdateSplitConfigurationRequest) Set(val *UpdateSplitConfigurationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateSplitConfigurationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateSplitConfigurationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateSplitConfigurationRequest(val *UpdateSplitConfigurationRequest) *NullableUpdateSplitConfigurationRequest { + return &NullableUpdateSplitConfigurationRequest{value: val, isSet: true} +} + +func (v NullableUpdateSplitConfigurationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateSplitConfigurationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_update_split_configuration_rule_request.go b/src/management/model_update_split_configuration_rule_request.go new file mode 100644 index 000000000..458911a33 --- /dev/null +++ b/src/management/model_update_split_configuration_rule_request.go @@ -0,0 +1,209 @@ +/* +Management API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the UpdateSplitConfigurationRuleRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UpdateSplitConfigurationRuleRequest{} + +// UpdateSplitConfigurationRuleRequest struct for UpdateSplitConfigurationRuleRequest +type UpdateSplitConfigurationRuleRequest struct { + // The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). + Currency string `json:"currency"` + // The funding source condition of the payment method (only for cards). Possible values: **credit**, **debit**, or **ANY**. + FundingSource *string `json:"fundingSource,omitempty"` + // The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. + PaymentMethod string `json:"paymentMethod"` + // The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. + ShopperInteraction string `json:"shopperInteraction"` +} + +// NewUpdateSplitConfigurationRuleRequest instantiates a new UpdateSplitConfigurationRuleRequest 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 NewUpdateSplitConfigurationRuleRequest(currency string, paymentMethod string, shopperInteraction string) *UpdateSplitConfigurationRuleRequest { + this := UpdateSplitConfigurationRuleRequest{} + this.Currency = currency + this.PaymentMethod = paymentMethod + this.ShopperInteraction = shopperInteraction + return &this +} + +// NewUpdateSplitConfigurationRuleRequestWithDefaults instantiates a new UpdateSplitConfigurationRuleRequest 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 NewUpdateSplitConfigurationRuleRequestWithDefaults() *UpdateSplitConfigurationRuleRequest { + this := UpdateSplitConfigurationRuleRequest{} + return &this +} + +// GetCurrency returns the Currency field value +func (o *UpdateSplitConfigurationRuleRequest) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationRuleRequest) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *UpdateSplitConfigurationRuleRequest) SetCurrency(v string) { + o.Currency = v +} + +// GetFundingSource returns the FundingSource field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationRuleRequest) 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 *UpdateSplitConfigurationRuleRequest) 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 *UpdateSplitConfigurationRuleRequest) 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 *UpdateSplitConfigurationRuleRequest) SetFundingSource(v string) { + o.FundingSource = &v +} + +// GetPaymentMethod returns the PaymentMethod field value +func (o *UpdateSplitConfigurationRuleRequest) GetPaymentMethod() string { + if o == nil { + var ret 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 *UpdateSplitConfigurationRuleRequest) GetPaymentMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentMethod, true +} + +// SetPaymentMethod sets field value +func (o *UpdateSplitConfigurationRuleRequest) SetPaymentMethod(v string) { + o.PaymentMethod = v +} + +// GetShopperInteraction returns the ShopperInteraction field value +func (o *UpdateSplitConfigurationRuleRequest) GetShopperInteraction() string { + if o == nil { + var ret string + return ret + } + + return o.ShopperInteraction +} + +// GetShopperInteractionOk returns a tuple with the ShopperInteraction field value +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationRuleRequest) GetShopperInteractionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ShopperInteraction, true +} + +// SetShopperInteraction sets field value +func (o *UpdateSplitConfigurationRuleRequest) SetShopperInteraction(v string) { + o.ShopperInteraction = v +} + +func (o UpdateSplitConfigurationRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSplitConfigurationRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["currency"] = o.Currency + if !common.IsNil(o.FundingSource) { + toSerialize["fundingSource"] = o.FundingSource + } + toSerialize["paymentMethod"] = o.PaymentMethod + toSerialize["shopperInteraction"] = o.ShopperInteraction + return toSerialize, nil +} + +type NullableUpdateSplitConfigurationRuleRequest struct { + value *UpdateSplitConfigurationRuleRequest + isSet bool +} + +func (v NullableUpdateSplitConfigurationRuleRequest) Get() *UpdateSplitConfigurationRuleRequest { + return v.value +} + +func (v *NullableUpdateSplitConfigurationRuleRequest) Set(val *UpdateSplitConfigurationRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateSplitConfigurationRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateSplitConfigurationRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateSplitConfigurationRuleRequest(val *UpdateSplitConfigurationRuleRequest) *NullableUpdateSplitConfigurationRuleRequest { + return &NullableUpdateSplitConfigurationRuleRequest{value: val, isSet: true} +} + +func (v NullableUpdateSplitConfigurationRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateSplitConfigurationRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_user.go b/src/management/model_user.go index d92d78af0..22820866f 100644 --- a/src/management/model_user.go +++ b/src/management/model_user.go @@ -24,8 +24,8 @@ type User struct { AccountGroups []string `json:"accountGroups,omitempty"` // Indicates whether this user is active. Active *bool `json:"active,omitempty"` - // Set of authn apps available to this user - AuthnApps []string `json:"authnApps,omitempty"` + // Set of apps available to this user + Apps []string `json:"apps,omitempty"` // The email address of the user. Email string `json:"email"` // The unique identifier of the user. @@ -157,36 +157,36 @@ func (o *User) SetActive(v bool) { o.Active = &v } -// GetAuthnApps returns the AuthnApps field value if set, zero value otherwise. -func (o *User) GetAuthnApps() []string { - if o == nil || common.IsNil(o.AuthnApps) { +// GetApps returns the Apps field value if set, zero value otherwise. +func (o *User) GetApps() []string { + if o == nil || common.IsNil(o.Apps) { var ret []string return ret } - return o.AuthnApps + return o.Apps } -// GetAuthnAppsOk returns a tuple with the AuthnApps field value if set, nil otherwise +// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetAuthnAppsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AuthnApps) { +func (o *User) GetAppsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Apps) { return nil, false } - return o.AuthnApps, true + return o.Apps, true } -// HasAuthnApps returns a boolean if a field has been set. -func (o *User) HasAuthnApps() bool { - if o != nil && !common.IsNil(o.AuthnApps) { +// HasApps returns a boolean if a field has been set. +func (o *User) HasApps() bool { + if o != nil && !common.IsNil(o.Apps) { return true } return false } -// SetAuthnApps gets a reference to the given []string and assigns it to the AuthnApps field. -func (o *User) SetAuthnApps(v []string) { - o.AuthnApps = v +// SetApps gets a reference to the given []string and assigns it to the Apps field. +func (o *User) SetApps(v []string) { + o.Apps = v } // GetEmail returns the Email field value @@ -360,8 +360,8 @@ func (o User) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Active) { toSerialize["active"] = o.Active } - if !common.IsNil(o.AuthnApps) { - toSerialize["authnApps"] = o.AuthnApps + if !common.IsNil(o.Apps) { + toSerialize["apps"] = o.Apps } toSerialize["email"] = o.Email toSerialize["id"] = o.Id diff --git a/src/management/model_vipps_info.go b/src/management/model_vipps_info.go index afa2e7f54..5128091b7 100644 --- a/src/management/model_vipps_info.go +++ b/src/management/model_vipps_info.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &VippsInfo{} type VippsInfo struct { // Vipps logo. Format: Base64-encoded string. Logo string `json:"logo"` - // Vipps subscription cancel url + // Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)) SubscriptionCancelUrl *string `json:"subscriptionCancelUrl,omitempty"` } diff --git a/src/management/model_webhook.go b/src/management/model_webhook.go index ad784ddf3..f5b08b5b3 100644 --- a/src/management/model_webhook.go +++ b/src/management/model_webhook.go @@ -882,7 +882,7 @@ func (o *Webhook) isValidFilterMerchantAccountType() bool { return false } func (o *Webhook) isValidNetworkType() bool { - var allowedEnumValues = []string{"LOCAL", "PUBLIC"} + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { if o.GetNetworkType() == allowed { return true @@ -891,7 +891,7 @@ func (o *Webhook) isValidNetworkType() bool { return false } func (o *Webhook) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "SSL", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"} + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { if o.GetSslVersion() == allowed { return true diff --git a/src/payments/model_additional_data_airline.go b/src/payments/model_additional_data_airline.go index 5c558051e..b8dc7786b 100644 --- a/src/payments/model_additional_data_airline.go +++ b/src/payments/model_additional_data_airline.go @@ -19,61 +19,61 @@ var _ common.MappedNullable = &AdditionalDataAirline{} // AdditionalDataAirline struct for AdditionalDataAirline type AdditionalDataAirline struct { - // Reference number for the invoice, issued by the agency. * minLength: 1 * maxLength: 6 + // The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters AirlineAgencyInvoiceNumber *string `json:"airline.agency_invoice_number,omitempty"` - // 2-letter agency plan identifier; alphabetical. * minLength: 2 * maxLength: 2 + // The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters AirlineAgencyPlanName *string `json:"airline.agency_plan_name,omitempty"` - // [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX); numeric. It identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 * maxLength: 3 + // 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"` - // [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + // 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"` - // Chargeable amount for boarding the plane. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 18 + // 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"` - // The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Format: alphanumeric. * minLength: 4 * maxLength: 4 + // The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters AirlineComputerizedReservationSystem *string `json:"airline.computerized_reservation_system,omitempty"` - // Reference number; alphanumeric. * minLength: 0 * maxLength: 20 + // The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces AirlineCustomerReferenceNumber *string `json:"airline.customer_reference_number,omitempty"` - // Optional 2-digit code; alphanumeric. It identifies the type of product of the transaction. The description of the code may appear on credit card statements. * Format: 2-digit code * Example: Passenger ticket = 01 * minLength: 2 * maxLength: 2 + // A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters AirlineDocumentType *string `json:"airline.document_type,omitempty"` - // 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 * maxLength: 16 + // 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"` - // [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX); alphabetical. It identifies the carrier. This field is required/mandatory if the airline data includes leg details. * Format: IATA 2-letter airline code * Example: KLM = KL * minLength: 2 * maxLength: 2 + // 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"` - // 1-letter travel class identifier; alphabetical. There is no standard; however, the following codes are used rather consistently: * F: first class * J: business class * Y: economy class * W: premium economy Limitations: * minLength: 1 * maxLength: 1 + // 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. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-compliant. * Format: `yyyy-MM-dd HH:mm` * minLength: 16 * maxLength: 16 + // 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"` - // Alphabetical identifier of the departure airport. This field is required if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + // 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"` - // [Departure tax](https://en.wikipedia.org/wiki/Departure_tax). Amount charged by a country to an individual upon their leaving. The transaction amount needs to be represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). * minLength: 1 * maxLength: 12 + // 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"` - // Alphabetical identifier of the destination/arrival airport. This field is required/mandatory if the airline data includes leg details. * Format: [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code. * Example: Amsterdam = AMS * minLength: 3 * maxLength: 3 + // 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"` - // [Fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code); alphanumeric. * minLength: 1 * maxLength: 7 + // 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 * maxLength: 5 + // 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"` - // 1-letter code that indicates whether the passenger is entitled to make a stopover. Only two types of characters are allowed: * O: Stopover allowed * X: Stopover not allowed Limitations: * minLength: 1 * maxLength: 1 + // 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"` - // Date of birth of the passenger. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 + // The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 AirlinePassengerDateOfBirth *string `json:"airline.passenger.date_of_birth,omitempty"` - // Passenger first name/given name. > This field is required/mandatory if the airline data includes passenger details or leg details. + // The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII AirlinePassengerFirstName *string `json:"airline.passenger.first_name,omitempty"` - // Passenger last name/family name. > This field is required/mandatory if the airline data includes passenger details or leg details. + // The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII AirlinePassengerLastName *string `json:"airline.passenger.last_name,omitempty"` - // Telephone number of the passenger, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * minLength: 3 * maxLength: 30 + // The passenger's telephone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters AirlinePassengerTelephoneNumber *string `json:"airline.passenger.telephone_number,omitempty"` - // Passenger type code (PTC). IATA PTC values are 3-letter alphabetical. Example: ADT, SRC, CNN, INS. However, several carriers use non-standard codes that can be up to 5 alphanumeric characters. * minLength: 3 * maxLength: 6 + // The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters AirlinePassengerTravellerType *string `json:"airline.passenger.traveller_type,omitempty"` - // Passenger name, initials, and a title. * Format: last name + first name or initials + title. * Example: *FLYER / MARY MS*. * minLength: 1 * maxLength: 49 + // 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"` - // Address of the place/agency that issued the ticket. * minLength: 0 * maxLength: 16 + // 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 * maxLength: 150 + // 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"` - // IATA number, also ARC number or ARC/IATA number. Unique identifier number for travel agencies. * minLength: 1 * maxLength: 8 + // 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. * minLength: 1 * maxLength: 25 + // 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/payments/model_additional_data_car_rental.go b/src/payments/model_additional_data_car_rental.go index 448965667..93ccfe920 100644 --- a/src/payments/model_additional_data_car_rental.go +++ b/src/payments/model_additional_data_car_rental.go @@ -19,51 +19,51 @@ var _ common.MappedNullable = &AdditionalDataCarRental{} // AdditionalDataCarRental struct for AdditionalDataCarRental type AdditionalDataCarRental struct { - // Pick-up date. * Date format: `yyyyMMdd` + // 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 + // 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 - CarRentalCustomerServiceTollFreeNumber *string `json:"carRental.customerServiceTollFreeNumber,omitempty"` - // Number of days for which the car is being rented. * Format: Numeric * maxLength: 19 + // Number of days for which the car is being rented. * Format: Numeric * maxLength: 2 * Must not be all spaces CarRentalDaysRented *string `json:"carRental.daysRented,omitempty"` - // Any fuel charges associated with the rental. * Format: Numeric * maxLength: 12 + // 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. * Format: Numeric * maxLength: 12 + // 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 from which the car is rented. * Format: Alphanumeric * maxLength: 18 + // 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 from which the car is rented. * Format: Alphanumeric * maxLength: 2 + // 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 from where the car is rented. * Format: Alphanumeric * maxLength: 3 + // 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 was a \"no-show\" (neither keeps nor cancels their booking). * Y - Customer was a no show. * N - Not applicable. + // 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"` - // Charge associated with not returning a vehicle to the original rental location. + // The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 CarRentalOneWayDropOffCharges *string `json:"carRental.oneWayDropOffCharges,omitempty"` - // Daily rental rate. * Format: Alphanumeric * maxLength: 12 + // The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 CarRentalRate *string `json:"carRental.rate,omitempty"` - // Specifies whether the given rate is applied daily or weekly. * D - Daily rate. * W - Weekly rate. + // 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 associated with this car rental. * Format: Alphanumeric * maxLength: 9 + // 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"` - // Daily rental rate. * Format: Alphanumeric * maxLength: 12 + // 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 + // 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 + // 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. * Format: Alphanumeric * maxLength: 2 + // 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` + // The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 CarRentalReturnDate *string `json:"carRental.returnDate,omitempty"` - // Agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 + // 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 + // 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 whether the goods or services were tax-exempt, or tax was not collected. Values: * Y - Goods or services were tax exempt * N - Tax was not collected + // 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 nights. 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: 2 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 + // 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/payments/model_additional_data_level23.go b/src/payments/model_additional_data_level23.go index 51ab32e61..0adbe17a2 100644 --- a/src/payments/model_additional_data_level23.go +++ b/src/payments/model_additional_data_level23.go @@ -19,39 +19,39 @@ var _ common.MappedNullable = &AdditionalDataLevel23{} // AdditionalDataLevel23 struct for AdditionalDataLevel23 type AdditionalDataLevel23 struct { - // Customer code, if supplied by a customer. Encoding: ASCII. Max length: 25 characters. > Required for Level 2 and Level 3 data. + // 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 EnhancedSchemeDataCustomerReference *string `json:"enhancedSchemeData.customerReference,omitempty"` - // Destination country code. Encoding: ASCII. Max 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 a destination address. Encoding: ASCII. Max length: 10 characters. > Required for American Express. + // 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. + // Destination state or province code. Encoding: ASCII Max length: 3 characters Must not start with a space EnhancedSchemeDataDestinationStateProvinceCode *string `json:"enhancedSchemeData.destinationStateProvinceCode,omitempty"` - // Duty amount, in minor units. For example, 2000 means USD 20.00. 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"` - // Shipping amount, in minor units. For example, 2000 means USD 20.00. 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"` - // Item commodity code. Encoding: ASCII. Max length: 12 characters. + // 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"` - // Item description. Encoding: ASCII. Max length: 26 characters. + // 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"` - // Discount amount, in minor units. For example, 2000 means USD 20.00. 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"` - // Product code. Encoding: ASCII. Max length: 12 characters. + // 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"` - // Quantity, specified as an integer value. Value must be greater than 0. Max length: 12 characters. + // 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"` - // Total amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. + // 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"` - // Item unit of measurement. Encoding: ASCII. Max length: 3 characters. + // 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"` - // Unit price, specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). 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 EnhancedSchemeDataItemDetailLineItemNrUnitPrice *string `json:"enhancedSchemeData.itemDetailLine[itemNr].unitPrice,omitempty"` - // 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 a \"ship-from\" address. Encoding: ASCII. Max length: 10 characters. + // 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"` - // Total tax amount, in minor units. For example, 2000 means USD 20.00. Max length: 12 characters. > Required for Level 2 and Level 3 data. + // 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 EnhancedSchemeDataTotalTaxAmount *string `json:"enhancedSchemeData.totalTaxAmount,omitempty"` } diff --git a/src/payments/model_additional_data_lodging.go b/src/payments/model_additional_data_lodging.go index 1f909e30b..737136c6b 100644 --- a/src/payments/model_additional_data_lodging.go +++ b/src/payments/model_additional_data_lodging.go @@ -23,35 +23,33 @@ 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: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + // 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 - LodgingCustomerServiceTollFreeNumber *string `json:"lodging.customerServiceTollFreeNumber,omitempty"` - // Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Values can be: 'Y' or 'N'. * Format: alphabetic. * Max length: 1 character. + // 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. * Format: numeric. * Max length: 12 characters. + // 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. * Format: alphanumeric. * Max length: 25 characters. + // 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"` - // The additional charges for food and beverages associated with the booking. * Format: numeric. * Max length: 12 characters. + // 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"` - // Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in. **N**: the customer checked in. + // Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in LodgingNoShowIndicator *string `json:"lodging.noShowIndicator,omitempty"` - // The prepaid expenses for the booking. * Format: numeric. * Max length: 12 characters. + // The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters LodgingPrepaidExpenses *string `json:"lodging.prepaidExpenses,omitempty"` - // Identifies the location of the lodging by its local phone number. * Format: alphanumeric. * Max length: 17 characters. * For US numbers: must start with 3 digits and be at least 10 characters in length. Otherwise, the capture can fail. + // 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 - LodgingPropertyPhoneNumber *string `json:"lodging.propertyPhoneNumber,omitempty"` - // The total number of nights the room is booked for. * Format: numeric. * Max length: 4 characters. + // The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 2 characters LodgingRoom1NumberOfNights *string `json:"lodging.room1.numberOfNights,omitempty"` - // The rate of the room. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + // 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"` - // The total amount of tax to be paid. * Format: numeric. * Max length: 12 chracters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). - LodgingRoom1Tax *string `json:"lodging.room1.tax,omitempty"` - // The total room tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + // The total room 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 LodgingTotalRoomTax *string `json:"lodging.totalRoomTax,omitempty"` - // The total tax amount. * Format: numeric. * Max length: 12 characters. * Must be in [minor units](https://docs.adyen.com/development-resources/currency-codes). + // 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: 2 characters TravelEntertainmentAuthDataDuration *string `json:"travelEntertainmentAuthData.duration,omitempty"` - // Indicates what market-specific dataset will be submitted or is being submitted. Value should be \"H\" for Hotel. This should be included in the auth message. * Format: alphanumeric. * Max length: 1 character. + // 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"` } @@ -456,38 +454,6 @@ func (o *AdditionalDataLodging) SetLodgingRoom1Rate(v string) { o.LodgingRoom1Rate = &v } -// GetLodgingRoom1Tax returns the LodgingRoom1Tax field value if set, zero value otherwise. -func (o *AdditionalDataLodging) GetLodgingRoom1Tax() string { - if o == nil || common.IsNil(o.LodgingRoom1Tax) { - var ret string - return ret - } - return *o.LodgingRoom1Tax -} - -// GetLodgingRoom1TaxOk returns a tuple with the LodgingRoom1Tax field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AdditionalDataLodging) GetLodgingRoom1TaxOk() (*string, bool) { - if o == nil || common.IsNil(o.LodgingRoom1Tax) { - return nil, false - } - return o.LodgingRoom1Tax, true -} - -// HasLodgingRoom1Tax returns a boolean if a field has been set. -func (o *AdditionalDataLodging) HasLodgingRoom1Tax() bool { - if o != nil && !common.IsNil(o.LodgingRoom1Tax) { - return true - } - - return false -} - -// SetLodgingRoom1Tax gets a reference to the given string and assigns it to the LodgingRoom1Tax field. -func (o *AdditionalDataLodging) SetLodgingRoom1Tax(v string) { - o.LodgingRoom1Tax = &v -} - // GetLodgingTotalRoomTax returns the LodgingTotalRoomTax field value if set, zero value otherwise. func (o *AdditionalDataLodging) GetLodgingTotalRoomTax() string { if o == nil || common.IsNil(o.LodgingTotalRoomTax) { @@ -662,9 +628,6 @@ func (o AdditionalDataLodging) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.LodgingRoom1Rate) { toSerialize["lodging.room1.rate"] = o.LodgingRoom1Rate } - if !common.IsNil(o.LodgingRoom1Tax) { - toSerialize["lodging.room1.tax"] = o.LodgingRoom1Tax - } if !common.IsNil(o.LodgingTotalRoomTax) { toSerialize["lodging.totalRoomTax"] = o.LodgingTotalRoomTax } diff --git a/src/payments/model_additional_data_temporary_services.go b/src/payments/model_additional_data_temporary_services.go index 645e12f08..c1e109c21 100644 --- a/src/payments/model_additional_data_temporary_services.go +++ b/src/payments/model_additional_data_temporary_services.go @@ -19,23 +19,23 @@ var _ common.MappedNullable = &AdditionalDataTemporaryServices{} // AdditionalDataTemporaryServices struct for AdditionalDataTemporaryServices type AdditionalDataTemporaryServices struct { - // Customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 + // The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 EnhancedSchemeDataCustomerReference *string `json:"enhancedSchemeData.customerReference,omitempty"` - // Name or ID associated with the individual working in a temporary capacity. * maxLength: 40 + // The name or ID of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces EnhancedSchemeDataEmployeeName *string `json:"enhancedSchemeData.employeeName,omitempty"` - // Description of the job or task of the individual working in a temporary capacity. * maxLength: 40 + // The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all zeros * Must not be all spaces EnhancedSchemeDataJobDescription *string `json:"enhancedSchemeData.jobDescription,omitempty"` - // Amount paid per regular hours worked, minor units. * maxLength: 7 + // 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"` - // Amount of time worked during a normal operation for the task or job. * maxLength: 7 + // The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros EnhancedSchemeDataRegularHoursWorked *string `json:"enhancedSchemeData.regularHoursWorked,omitempty"` - // Name of the individual requesting temporary services. * maxLength: 40 + // The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces EnhancedSchemeDataRequestName *string `json:"enhancedSchemeData.requestName,omitempty"` - // Date for the beginning of the pay period. * Format: ddMMyy * maxLength: 6 + // The billing period start date. * Format: ddMMyy * maxLength: 6 EnhancedSchemeDataTempStartDate *string `json:"enhancedSchemeData.tempStartDate,omitempty"` - // Date of the end of the billing cycle. * Format: ddMMyy * maxLength: 6 + // The billing period end date. * Format: ddMMyy * maxLength: 6 EnhancedSchemeDataTempWeekEnding *string `json:"enhancedSchemeData.tempWeekEnding,omitempty"` - // Total tax amount, in minor units. For example, 2000 means USD 20.00 * maxLength: 12 + // The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 EnhancedSchemeDataTotalTaxAmount *string `json:"enhancedSchemeData.totalTaxAmount,omitempty"` } diff --git a/src/payments/model_payment_request.go b/src/payments/model_payment_request.go index 8e4e1fec7..306436988 100644 --- a/src/payments/model_payment_request.go +++ b/src/payments/model_payment_request.go @@ -95,7 +95,7 @@ type PaymentRequest 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"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` diff --git a/src/payments/model_payment_request3d.go b/src/payments/model_payment_request3d.go index 2d80908a3..7e3ffaf83 100644 --- a/src/payments/model_payment_request3d.go +++ b/src/payments/model_payment_request3d.go @@ -86,7 +86,7 @@ type PaymentRequest3d 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"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` diff --git a/src/payments/model_payment_request3ds2.go b/src/payments/model_payment_request3ds2.go index deac4c3c8..794e119fc 100644 --- a/src/payments/model_payment_request3ds2.go +++ b/src/payments/model_payment_request3ds2.go @@ -82,7 +82,7 @@ type PaymentRequest3ds2 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"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` diff --git a/src/payments/model_platform_chargeback_logic.go b/src/payments/model_platform_chargeback_logic.go index 513009e58..9b4f5cc0d 100644 --- a/src/payments/model_platform_chargeback_logic.go +++ b/src/payments/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/payments/model_split.go b/src/payments/model_split.go index 4e53eaa34..102f462e2 100644 --- a/src/payments/model_split.go +++ b/src/payments/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", "PaymentFeeAcquiring", "PaymentFeeAdyen", "PaymentFeeAdyenCommission", "PaymentFeeAdyenMarkup", "PaymentFeeInterchange", "PaymentFeeSchemeFee", "Remainder", "Surcharge", "Tip", "VAT", "Verification"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/payments/model_three_ds2_request_data.go b/src/payments/model_three_ds2_request_data.go index bbd2afa34..477cefe78 100644 --- a/src/payments/model_three_ds2_request_data.go +++ b/src/payments/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/payout/model_payout_response.go b/src/payout/model_payout_response.go index df1059350..531f5a3d7 100644 --- a/src/payout/model_payout_response.go +++ b/src/payout/model_payout_response.go @@ -37,7 +37,7 @@ type PayoutResponse struct { 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 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"` } @@ -493,7 +493,7 @@ func (v *NullablePayoutResponse) UnmarshalJSON(src []byte) error { } func (o *PayoutResponse) 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/transfers/api_capital.go b/src/transfers/api_capital.go new file mode 100644 index 000000000..613fc7e70 --- /dev/null +++ b/src/transfers/api_capital.go @@ -0,0 +1,334 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "context" + "encoding/json" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// CapitalApi service +type CapitalApi common.Service + +// All parameters accepted by CapitalApi.GetCapitalAccount +type CapitalApiGetCapitalAccountInput struct { + counterpartyAccountHolderId *string +} + +// The counterparty account holder id. +func (r CapitalApiGetCapitalAccountInput) CounterpartyAccountHolderId(counterpartyAccountHolderId string) CapitalApiGetCapitalAccountInput { + r.counterpartyAccountHolderId = &counterpartyAccountHolderId + return r +} + +/* +Prepare a request for GetCapitalAccount + +@return CapitalApiGetCapitalAccountInput +*/ +func (a *CapitalApi) GetCapitalAccountInput() CapitalApiGetCapitalAccountInput { + return CapitalApiGetCapitalAccountInput{} +} + +/* +GetCapitalAccount Get a capital account + +Returns a list of grants with status and outstanding balances. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r CapitalApiGetCapitalAccountInput - Request parameters, see GetCapitalAccountInput +@return CapitalGrants, *http.Response, error +*/ +func (a *CapitalApi) GetCapitalAccount(ctx context.Context, r CapitalApiGetCapitalAccountInput) (CapitalGrants, *http.Response, error) { + res := &CapitalGrants{} + path := "/grants" + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.counterpartyAccountHolderId != nil { + common.ParameterAddToQuery(queryParams, "counterpartyAccountHolderId", r.counterpartyAccountHolderId, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by CapitalApi.GetGrantReferenceDetails +type CapitalApiGetGrantReferenceDetailsInput struct { + id string +} + +/* +Prepare a request for GetGrantReferenceDetails +@param id The unique identifier of the grant. +@return CapitalApiGetGrantReferenceDetailsInput +*/ +func (a *CapitalApi) GetGrantReferenceDetailsInput(id string) CapitalApiGetGrantReferenceDetailsInput { + return CapitalApiGetGrantReferenceDetailsInput{ + id: id, + } +} + +/* +GetGrantReferenceDetails Get grant reference details + +Returns the details of a capital account specified in the path. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r CapitalApiGetGrantReferenceDetailsInput - Request parameters, see GetGrantReferenceDetailsInput +@return CapitalGrant, *http.Response, error +*/ +func (a *CapitalApi) GetGrantReferenceDetails(ctx context.Context, r CapitalApiGetGrantReferenceDetailsInput) (CapitalGrant, *http.Response, error) { + res := &CapitalGrant{} + path := "/grants/{id}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by CapitalApi.RequestGrantPayout +type CapitalApiRequestGrantPayoutInput struct { + capitalGrantInfo *CapitalGrantInfo +} + +func (r CapitalApiRequestGrantPayoutInput) CapitalGrantInfo(capitalGrantInfo CapitalGrantInfo) CapitalApiRequestGrantPayoutInput { + r.capitalGrantInfo = &capitalGrantInfo + return r +} + +/* +Prepare a request for RequestGrantPayout + +@return CapitalApiRequestGrantPayoutInput +*/ +func (a *CapitalApi) RequestGrantPayoutInput() CapitalApiRequestGrantPayoutInput { + return CapitalApiRequestGrantPayoutInput{} +} + +/* +RequestGrantPayout Request a grant payout + +Requests the payout of the selected grant offer. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r CapitalApiRequestGrantPayoutInput - Request parameters, see RequestGrantPayoutInput +@return CapitalGrant, *http.Response, error +*/ +func (a *CapitalApi) RequestGrantPayout(ctx context.Context, r CapitalApiRequestGrantPayoutInput) (CapitalGrant, *http.Response, error) { + res := &CapitalGrant{} + path := "/grants" + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.capitalGrantInfo, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/transfers/client.go b/src/transfers/client.go index fc976797c..3ff2e6ec9 100644 --- a/src/transfers/client.go +++ b/src/transfers/client.go @@ -19,6 +19,8 @@ type APIClient struct { // API Services + CapitalApi *CapitalApi + TransactionsApi *TransactionsApi TransfersApi *TransfersApi @@ -33,6 +35,7 @@ func NewAPIClient(client *common.Client) *APIClient { } // API Services + c.CapitalApi = (*CapitalApi)(&c.common) c.TransactionsApi = (*TransactionsApi)(&c.common) c.TransfersApi = (*TransfersApi)(&c.common) diff --git a/src/transfers/model_bank_account_v3_account_identification.go b/src/transfers/model_bank_account_v3_account_identification.go index cfee83349..3505a2e9c 100644 --- a/src/transfers/model_bank_account_v3_account_identification.go +++ b/src/transfers/model_bank_account_v3_account_identification.go @@ -23,6 +23,7 @@ type BankAccountV3AccountIdentification struct { HULocalAccountIdentification *HULocalAccountIdentification IbanAccountIdentification *IbanAccountIdentification NOLocalAccountIdentification *NOLocalAccountIdentification + NZLocalAccountIdentification *NZLocalAccountIdentification NumberAndBicAccountIdentification *NumberAndBicAccountIdentification PLLocalAccountIdentification *PLLocalAccountIdentification SELocalAccountIdentification *SELocalAccountIdentification @@ -87,6 +88,13 @@ func NOLocalAccountIdentificationAsBankAccountV3AccountIdentification(v *NOLocal } } +// NZLocalAccountIdentificationAsBankAccountV3AccountIdentification is a convenience function that returns NZLocalAccountIdentification wrapped in BankAccountV3AccountIdentification +func NZLocalAccountIdentificationAsBankAccountV3AccountIdentification(v *NZLocalAccountIdentification) BankAccountV3AccountIdentification { + return BankAccountV3AccountIdentification{ + NZLocalAccountIdentification: v, + } +} + // NumberAndBicAccountIdentificationAsBankAccountV3AccountIdentification is a convenience function that returns NumberAndBicAccountIdentification wrapped in BankAccountV3AccountIdentification func NumberAndBicAccountIdentificationAsBankAccountV3AccountIdentification(v *NumberAndBicAccountIdentification) BankAccountV3AccountIdentification { return BankAccountV3AccountIdentification{ @@ -237,6 +245,19 @@ func (dst *BankAccountV3AccountIdentification) UnmarshalJSON(data []byte) error dst.NOLocalAccountIdentification = nil } + // try to unmarshal data into NZLocalAccountIdentification + err = json.Unmarshal(data, &dst.NZLocalAccountIdentification) + if err == nil { + jsonNZLocalAccountIdentification, _ := json.Marshal(dst.NZLocalAccountIdentification) + if string(jsonNZLocalAccountIdentification) == "{}" || !dst.NZLocalAccountIdentification.isValidType() { // empty struct + dst.NZLocalAccountIdentification = nil + } else { + match++ + } + } else { + dst.NZLocalAccountIdentification = nil + } + // try to unmarshal data into NumberAndBicAccountIdentification err = json.Unmarshal(data, &dst.NumberAndBicAccountIdentification) if err == nil { @@ -325,6 +346,7 @@ func (dst *BankAccountV3AccountIdentification) UnmarshalJSON(data []byte) error dst.HULocalAccountIdentification = nil dst.IbanAccountIdentification = nil dst.NOLocalAccountIdentification = nil + dst.NZLocalAccountIdentification = nil dst.NumberAndBicAccountIdentification = nil dst.PLLocalAccountIdentification = nil dst.SELocalAccountIdentification = nil @@ -374,6 +396,10 @@ func (src BankAccountV3AccountIdentification) MarshalJSON() ([]byte, error) { return json.Marshal(&src.NOLocalAccountIdentification) } + if src.NZLocalAccountIdentification != nil { + return json.Marshal(&src.NZLocalAccountIdentification) + } + if src.NumberAndBicAccountIdentification != nil { return json.Marshal(&src.NumberAndBicAccountIdentification) } @@ -438,6 +464,10 @@ func (obj *BankAccountV3AccountIdentification) GetActualInstance() interface{} { return obj.NOLocalAccountIdentification } + if obj.NZLocalAccountIdentification != nil { + return obj.NZLocalAccountIdentification + } + if obj.NumberAndBicAccountIdentification != nil { return obj.NumberAndBicAccountIdentification } diff --git a/src/transfers/model_capital_balance.go b/src/transfers/model_capital_balance.go new file mode 100644 index 000000000..166aa5cbe --- /dev/null +++ b/src/transfers/model_capital_balance.go @@ -0,0 +1,200 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the CapitalBalance type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CapitalBalance{} + +// CapitalBalance struct for CapitalBalance +type CapitalBalance struct { + // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + Currency string `json:"currency"` + // Fee amount. + Fee int64 `json:"fee"` + // Principal amount. + Principal int64 `json:"principal"` + // Total amount. A sum of principal amount and fee amount. + Total int64 `json:"total"` +} + +// NewCapitalBalance instantiates a new CapitalBalance 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 NewCapitalBalance(currency string, fee int64, principal int64, total int64) *CapitalBalance { + this := CapitalBalance{} + this.Currency = currency + this.Fee = fee + this.Principal = principal + this.Total = total + return &this +} + +// NewCapitalBalanceWithDefaults instantiates a new CapitalBalance 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 NewCapitalBalanceWithDefaults() *CapitalBalance { + this := CapitalBalance{} + return &this +} + +// GetCurrency returns the Currency field value +func (o *CapitalBalance) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *CapitalBalance) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *CapitalBalance) SetCurrency(v string) { + o.Currency = v +} + +// GetFee returns the Fee field value +func (o *CapitalBalance) GetFee() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Fee +} + +// GetFeeOk returns a tuple with the Fee field value +// and a boolean to check if the value has been set. +func (o *CapitalBalance) GetFeeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Fee, true +} + +// SetFee sets field value +func (o *CapitalBalance) SetFee(v int64) { + o.Fee = v +} + +// GetPrincipal returns the Principal field value +func (o *CapitalBalance) GetPrincipal() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Principal +} + +// GetPrincipalOk returns a tuple with the Principal field value +// and a boolean to check if the value has been set. +func (o *CapitalBalance) GetPrincipalOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Principal, true +} + +// SetPrincipal sets field value +func (o *CapitalBalance) SetPrincipal(v int64) { + o.Principal = v +} + +// GetTotal returns the Total field value +func (o *CapitalBalance) GetTotal() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Total +} + +// GetTotalOk returns a tuple with the Total field value +// and a boolean to check if the value has been set. +func (o *CapitalBalance) GetTotalOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Total, true +} + +// SetTotal sets field value +func (o *CapitalBalance) SetTotal(v int64) { + o.Total = v +} + +func (o CapitalBalance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CapitalBalance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["currency"] = o.Currency + toSerialize["fee"] = o.Fee + toSerialize["principal"] = o.Principal + toSerialize["total"] = o.Total + return toSerialize, nil +} + +type NullableCapitalBalance struct { + value *CapitalBalance + isSet bool +} + +func (v NullableCapitalBalance) Get() *CapitalBalance { + return v.value +} + +func (v *NullableCapitalBalance) Set(val *CapitalBalance) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalBalance) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalBalance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalBalance(val *CapitalBalance) *NullableCapitalBalance { + return &NullableCapitalBalance{value: val, isSet: true} +} + +func (v NullableCapitalBalance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCapitalBalance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_capital_grant.go b/src/transfers/model_capital_grant.go new file mode 100644 index 000000000..c1ab268e2 --- /dev/null +++ b/src/transfers/model_capital_grant.go @@ -0,0 +1,381 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the CapitalGrant type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CapitalGrant{} + +// CapitalGrant struct for CapitalGrant +type CapitalGrant struct { + Amount *Amount `json:"amount,omitempty"` + Balances CapitalBalance `json:"balances"` + Counterparty *Counterparty2 `json:"counterparty,omitempty"` + Fee *Fee `json:"fee,omitempty"` + // The identifier of the grant account used for the grant. + GrantAccountId string `json:"grantAccountId"` + // The identifier of the grant offer that has been selected and from which the grant details will be used. + GrantOfferId string `json:"grantOfferId"` + // The identifier of the grant reference. + Id string `json:"id"` + Repayment *Repayment `json:"repayment,omitempty"` + // The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**. + Status string `json:"status"` +} + +// NewCapitalGrant instantiates a new CapitalGrant 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 NewCapitalGrant(balances CapitalBalance, grantAccountId string, grantOfferId string, id string, status string) *CapitalGrant { + this := CapitalGrant{} + this.Balances = balances + this.GrantAccountId = grantAccountId + this.GrantOfferId = grantOfferId + this.Id = id + this.Status = status + return &this +} + +// NewCapitalGrantWithDefaults instantiates a new CapitalGrant 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 NewCapitalGrantWithDefaults() *CapitalGrant { + this := CapitalGrant{} + return &this +} + +// GetAmount returns the Amount field value if set, zero value otherwise. +func (o *CapitalGrant) 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 *CapitalGrant) 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 *CapitalGrant) 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 *CapitalGrant) SetAmount(v Amount) { + o.Amount = &v +} + +// GetBalances returns the Balances field value +func (o *CapitalGrant) GetBalances() CapitalBalance { + if o == nil { + var ret CapitalBalance + return ret + } + + return o.Balances +} + +// GetBalancesOk returns a tuple with the Balances field value +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetBalancesOk() (*CapitalBalance, bool) { + if o == nil { + return nil, false + } + return &o.Balances, true +} + +// SetBalances sets field value +func (o *CapitalGrant) SetBalances(v CapitalBalance) { + o.Balances = v +} + +// GetCounterparty returns the Counterparty field value if set, zero value otherwise. +func (o *CapitalGrant) GetCounterparty() Counterparty2 { + if o == nil || common.IsNil(o.Counterparty) { + var ret Counterparty2 + return ret + } + return *o.Counterparty +} + +// GetCounterpartyOk returns a tuple with the Counterparty field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetCounterpartyOk() (*Counterparty2, bool) { + if o == nil || common.IsNil(o.Counterparty) { + return nil, false + } + return o.Counterparty, true +} + +// HasCounterparty returns a boolean if a field has been set. +func (o *CapitalGrant) HasCounterparty() bool { + if o != nil && !common.IsNil(o.Counterparty) { + return true + } + + return false +} + +// SetCounterparty gets a reference to the given Counterparty2 and assigns it to the Counterparty field. +func (o *CapitalGrant) SetCounterparty(v Counterparty2) { + o.Counterparty = &v +} + +// GetFee returns the Fee field value if set, zero value otherwise. +func (o *CapitalGrant) GetFee() Fee { + if o == nil || common.IsNil(o.Fee) { + var ret Fee + return ret + } + return *o.Fee +} + +// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetFeeOk() (*Fee, bool) { + if o == nil || common.IsNil(o.Fee) { + return nil, false + } + return o.Fee, true +} + +// HasFee returns a boolean if a field has been set. +func (o *CapitalGrant) HasFee() bool { + if o != nil && !common.IsNil(o.Fee) { + return true + } + + return false +} + +// SetFee gets a reference to the given Fee and assigns it to the Fee field. +func (o *CapitalGrant) SetFee(v Fee) { + o.Fee = &v +} + +// GetGrantAccountId returns the GrantAccountId field value +func (o *CapitalGrant) GetGrantAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.GrantAccountId +} + +// GetGrantAccountIdOk returns a tuple with the GrantAccountId field value +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetGrantAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GrantAccountId, true +} + +// SetGrantAccountId sets field value +func (o *CapitalGrant) SetGrantAccountId(v string) { + o.GrantAccountId = v +} + +// GetGrantOfferId returns the GrantOfferId field value +func (o *CapitalGrant) GetGrantOfferId() string { + if o == nil { + var ret string + return ret + } + + return o.GrantOfferId +} + +// GetGrantOfferIdOk returns a tuple with the GrantOfferId field value +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetGrantOfferIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GrantOfferId, true +} + +// SetGrantOfferId sets field value +func (o *CapitalGrant) SetGrantOfferId(v string) { + o.GrantOfferId = v +} + +// GetId returns the Id field value +func (o *CapitalGrant) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CapitalGrant) SetId(v string) { + o.Id = v +} + +// GetRepayment returns the Repayment field value if set, zero value otherwise. +func (o *CapitalGrant) GetRepayment() Repayment { + if o == nil || common.IsNil(o.Repayment) { + var ret Repayment + return ret + } + return *o.Repayment +} + +// GetRepaymentOk returns a tuple with the Repayment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CapitalGrant) GetRepaymentOk() (*Repayment, bool) { + if o == nil || common.IsNil(o.Repayment) { + return nil, false + } + return o.Repayment, true +} + +// HasRepayment returns a boolean if a field has been set. +func (o *CapitalGrant) HasRepayment() bool { + if o != nil && !common.IsNil(o.Repayment) { + return true + } + + return false +} + +// SetRepayment gets a reference to the given Repayment and assigns it to the Repayment field. +func (o *CapitalGrant) SetRepayment(v Repayment) { + o.Repayment = &v +} + +// GetStatus returns the Status field value +func (o *CapitalGrant) 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 *CapitalGrant) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CapitalGrant) SetStatus(v string) { + o.Status = v +} + +func (o CapitalGrant) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CapitalGrant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Amount) { + toSerialize["amount"] = o.Amount + } + toSerialize["balances"] = o.Balances + if !common.IsNil(o.Counterparty) { + toSerialize["counterparty"] = o.Counterparty + } + if !common.IsNil(o.Fee) { + toSerialize["fee"] = o.Fee + } + toSerialize["grantAccountId"] = o.GrantAccountId + toSerialize["grantOfferId"] = o.GrantOfferId + toSerialize["id"] = o.Id + if !common.IsNil(o.Repayment) { + toSerialize["repayment"] = o.Repayment + } + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableCapitalGrant struct { + value *CapitalGrant + isSet bool +} + +func (v NullableCapitalGrant) Get() *CapitalGrant { + return v.value +} + +func (v *NullableCapitalGrant) Set(val *CapitalGrant) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalGrant(val *CapitalGrant) *NullableCapitalGrant { + return &NullableCapitalGrant{value: val, isSet: true} +} + +func (v NullableCapitalGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCapitalGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *CapitalGrant) isValidStatus() bool { + var allowedEnumValues = []string{"Pending", "Active", "Repaid"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_capital_grant_info.go b/src/transfers/model_capital_grant_info.go new file mode 100644 index 000000000..87391f035 --- /dev/null +++ b/src/transfers/model_capital_grant_info.go @@ -0,0 +1,180 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the CapitalGrantInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CapitalGrantInfo{} + +// CapitalGrantInfo struct for CapitalGrantInfo +type CapitalGrantInfo struct { + Counterparty *Counterparty2 `json:"counterparty,omitempty"` + // The identifier of the grant account used for the grant. + GrantAccountId string `json:"grantAccountId"` + // The identifier of the grant offer that has been selected and from which the grant details will be used. + GrantOfferId string `json:"grantOfferId"` +} + +// NewCapitalGrantInfo instantiates a new CapitalGrantInfo 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 NewCapitalGrantInfo(grantAccountId string, grantOfferId string) *CapitalGrantInfo { + this := CapitalGrantInfo{} + this.GrantAccountId = grantAccountId + this.GrantOfferId = grantOfferId + return &this +} + +// NewCapitalGrantInfoWithDefaults instantiates a new CapitalGrantInfo 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 NewCapitalGrantInfoWithDefaults() *CapitalGrantInfo { + this := CapitalGrantInfo{} + return &this +} + +// GetCounterparty returns the Counterparty field value if set, zero value otherwise. +func (o *CapitalGrantInfo) GetCounterparty() Counterparty2 { + if o == nil || common.IsNil(o.Counterparty) { + var ret Counterparty2 + return ret + } + return *o.Counterparty +} + +// GetCounterpartyOk returns a tuple with the Counterparty field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CapitalGrantInfo) GetCounterpartyOk() (*Counterparty2, bool) { + if o == nil || common.IsNil(o.Counterparty) { + return nil, false + } + return o.Counterparty, true +} + +// HasCounterparty returns a boolean if a field has been set. +func (o *CapitalGrantInfo) HasCounterparty() bool { + if o != nil && !common.IsNil(o.Counterparty) { + return true + } + + return false +} + +// SetCounterparty gets a reference to the given Counterparty2 and assigns it to the Counterparty field. +func (o *CapitalGrantInfo) SetCounterparty(v Counterparty2) { + o.Counterparty = &v +} + +// GetGrantAccountId returns the GrantAccountId field value +func (o *CapitalGrantInfo) GetGrantAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.GrantAccountId +} + +// GetGrantAccountIdOk returns a tuple with the GrantAccountId field value +// and a boolean to check if the value has been set. +func (o *CapitalGrantInfo) GetGrantAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GrantAccountId, true +} + +// SetGrantAccountId sets field value +func (o *CapitalGrantInfo) SetGrantAccountId(v string) { + o.GrantAccountId = v +} + +// GetGrantOfferId returns the GrantOfferId field value +func (o *CapitalGrantInfo) GetGrantOfferId() string { + if o == nil { + var ret string + return ret + } + + return o.GrantOfferId +} + +// GetGrantOfferIdOk returns a tuple with the GrantOfferId field value +// and a boolean to check if the value has been set. +func (o *CapitalGrantInfo) GetGrantOfferIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GrantOfferId, true +} + +// SetGrantOfferId sets field value +func (o *CapitalGrantInfo) SetGrantOfferId(v string) { + o.GrantOfferId = v +} + +func (o CapitalGrantInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CapitalGrantInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Counterparty) { + toSerialize["counterparty"] = o.Counterparty + } + toSerialize["grantAccountId"] = o.GrantAccountId + toSerialize["grantOfferId"] = o.GrantOfferId + return toSerialize, nil +} + +type NullableCapitalGrantInfo struct { + value *CapitalGrantInfo + isSet bool +} + +func (v NullableCapitalGrantInfo) Get() *CapitalGrantInfo { + return v.value +} + +func (v *NullableCapitalGrantInfo) Set(val *CapitalGrantInfo) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalGrantInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalGrantInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalGrantInfo(val *CapitalGrantInfo) *NullableCapitalGrantInfo { + return &NullableCapitalGrantInfo{value: val, isSet: true} +} + +func (v NullableCapitalGrantInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCapitalGrantInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_capital_grants.go b/src/transfers/model_capital_grants.go new file mode 100644 index 000000000..3ffabf4fb --- /dev/null +++ b/src/transfers/model_capital_grants.go @@ -0,0 +1,116 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the CapitalGrants type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CapitalGrants{} + +// CapitalGrants struct for CapitalGrants +type CapitalGrants struct { + // The unique identifier of the grant. + Grants []CapitalGrant `json:"grants"` +} + +// NewCapitalGrants instantiates a new CapitalGrants 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 NewCapitalGrants(grants []CapitalGrant) *CapitalGrants { + this := CapitalGrants{} + this.Grants = grants + return &this +} + +// NewCapitalGrantsWithDefaults instantiates a new CapitalGrants 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 NewCapitalGrantsWithDefaults() *CapitalGrants { + this := CapitalGrants{} + return &this +} + +// GetGrants returns the Grants field value +func (o *CapitalGrants) GetGrants() []CapitalGrant { + if o == nil { + var ret []CapitalGrant + return ret + } + + return o.Grants +} + +// GetGrantsOk returns a tuple with the Grants field value +// and a boolean to check if the value has been set. +func (o *CapitalGrants) GetGrantsOk() ([]CapitalGrant, bool) { + if o == nil { + return nil, false + } + return o.Grants, true +} + +// SetGrants sets field value +func (o *CapitalGrants) SetGrants(v []CapitalGrant) { + o.Grants = v +} + +func (o CapitalGrants) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CapitalGrants) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["grants"] = o.Grants + return toSerialize, nil +} + +type NullableCapitalGrants struct { + value *CapitalGrants + isSet bool +} + +func (v NullableCapitalGrants) Get() *CapitalGrants { + return v.value +} + +func (v *NullableCapitalGrants) Set(val *CapitalGrants) { + v.value = val + v.isSet = true +} + +func (v NullableCapitalGrants) IsSet() bool { + return v.isSet +} + +func (v *NullableCapitalGrants) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCapitalGrants(val *CapitalGrants) *NullableCapitalGrants { + return &NullableCapitalGrants{value: val, isSet: true} +} + +func (v NullableCapitalGrants) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCapitalGrants) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_counterparty_2.go b/src/transfers/model_counterparty_2.go new file mode 100644 index 000000000..ae5dbb9af --- /dev/null +++ b/src/transfers/model_counterparty_2.go @@ -0,0 +1,199 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Counterparty2 type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Counterparty2{} + +// Counterparty2 struct for Counterparty2 +type Counterparty2 struct { + // The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided. + AccountHolderId *string `json:"accountHolderId,omitempty"` + // The identifier of the balance account that belongs to the receiving account holder. + BalanceAccountId *string `json:"balanceAccountId,omitempty"` + // The identifier of the transfer instrument that belongs to the legal entity of the account holder. + TransferInstrumentId *string `json:"transferInstrumentId,omitempty"` +} + +// NewCounterparty2 instantiates a new Counterparty2 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 NewCounterparty2() *Counterparty2 { + this := Counterparty2{} + return &this +} + +// NewCounterparty2WithDefaults instantiates a new Counterparty2 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 NewCounterparty2WithDefaults() *Counterparty2 { + this := Counterparty2{} + return &this +} + +// GetAccountHolderId returns the AccountHolderId field value if set, zero value otherwise. +func (o *Counterparty2) GetAccountHolderId() string { + if o == nil || common.IsNil(o.AccountHolderId) { + var ret string + return ret + } + return *o.AccountHolderId +} + +// GetAccountHolderIdOk returns a tuple with the AccountHolderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Counterparty2) GetAccountHolderIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AccountHolderId) { + return nil, false + } + return o.AccountHolderId, true +} + +// HasAccountHolderId returns a boolean if a field has been set. +func (o *Counterparty2) HasAccountHolderId() bool { + if o != nil && !common.IsNil(o.AccountHolderId) { + return true + } + + return false +} + +// SetAccountHolderId gets a reference to the given string and assigns it to the AccountHolderId field. +func (o *Counterparty2) SetAccountHolderId(v string) { + o.AccountHolderId = &v +} + +// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. +func (o *Counterparty2) GetBalanceAccountId() string { + if o == nil || common.IsNil(o.BalanceAccountId) { + var ret string + return ret + } + return *o.BalanceAccountId +} + +// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Counterparty2) GetBalanceAccountIdOk() (*string, bool) { + if o == nil || common.IsNil(o.BalanceAccountId) { + return nil, false + } + return o.BalanceAccountId, true +} + +// HasBalanceAccountId returns a boolean if a field has been set. +func (o *Counterparty2) HasBalanceAccountId() bool { + if o != nil && !common.IsNil(o.BalanceAccountId) { + return true + } + + return false +} + +// SetBalanceAccountId gets a reference to the given string and assigns it to the BalanceAccountId field. +func (o *Counterparty2) SetBalanceAccountId(v string) { + o.BalanceAccountId = &v +} + +// GetTransferInstrumentId returns the TransferInstrumentId field value if set, zero value otherwise. +func (o *Counterparty2) GetTransferInstrumentId() string { + if o == nil || common.IsNil(o.TransferInstrumentId) { + var ret string + return ret + } + return *o.TransferInstrumentId +} + +// GetTransferInstrumentIdOk returns a tuple with the TransferInstrumentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Counterparty2) GetTransferInstrumentIdOk() (*string, bool) { + if o == nil || common.IsNil(o.TransferInstrumentId) { + return nil, false + } + return o.TransferInstrumentId, true +} + +// HasTransferInstrumentId returns a boolean if a field has been set. +func (o *Counterparty2) HasTransferInstrumentId() bool { + if o != nil && !common.IsNil(o.TransferInstrumentId) { + return true + } + + return false +} + +// SetTransferInstrumentId gets a reference to the given string and assigns it to the TransferInstrumentId field. +func (o *Counterparty2) SetTransferInstrumentId(v string) { + o.TransferInstrumentId = &v +} + +func (o Counterparty2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Counterparty2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AccountHolderId) { + toSerialize["accountHolderId"] = o.AccountHolderId + } + if !common.IsNil(o.BalanceAccountId) { + toSerialize["balanceAccountId"] = o.BalanceAccountId + } + if !common.IsNil(o.TransferInstrumentId) { + toSerialize["transferInstrumentId"] = o.TransferInstrumentId + } + return toSerialize, nil +} + +type NullableCounterparty2 struct { + value *Counterparty2 + isSet bool +} + +func (v NullableCounterparty2) Get() *Counterparty2 { + return v.value +} + +func (v *NullableCounterparty2) Set(val *Counterparty2) { + v.value = val + v.isSet = true +} + +func (v NullableCounterparty2) IsSet() bool { + return v.isSet +} + +func (v *NullableCounterparty2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCounterparty2(val *Counterparty2) *NullableCounterparty2 { + return &NullableCounterparty2{value: val, isSet: true} +} + +func (v NullableCounterparty2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCounterparty2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_fee.go b/src/transfers/model_fee.go new file mode 100644 index 000000000..67d4c2932 --- /dev/null +++ b/src/transfers/model_fee.go @@ -0,0 +1,115 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Fee type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Fee{} + +// Fee struct for Fee +type Fee struct { + Amount Amount `json:"amount"` +} + +// NewFee instantiates a new Fee 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 NewFee(amount Amount) *Fee { + this := Fee{} + this.Amount = amount + return &this +} + +// NewFeeWithDefaults instantiates a new Fee 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 NewFeeWithDefaults() *Fee { + this := Fee{} + return &this +} + +// GetAmount returns the Amount field value +func (o *Fee) 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 *Fee) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *Fee) SetAmount(v Amount) { + o.Amount = v +} + +func (o Fee) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Fee) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +type NullableFee struct { + value *Fee + isSet bool +} + +func (v NullableFee) Get() *Fee { + return v.value +} + +func (v *NullableFee) Set(val *Fee) { + v.value = val + v.isSet = true +} + +func (v NullableFee) IsSet() bool { + return v.isSet +} + +func (v *NullableFee) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFee(val *Fee) *NullableFee { + return &NullableFee{value: val, isSet: true} +} + +func (v NullableFee) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFee) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_nz_local_account_identification.go b/src/transfers/model_nz_local_account_identification.go new file mode 100644 index 000000000..a31599b57 --- /dev/null +++ b/src/transfers/model_nz_local_account_identification.go @@ -0,0 +1,212 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the NZLocalAccountIdentification type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NZLocalAccountIdentification{} + +// NZLocalAccountIdentification struct for NZLocalAccountIdentification +type NZLocalAccountIdentification struct { + // The 7-digit bank account number, without separators or whitespace. + AccountNumber string `json:"accountNumber"` + // The 2- to 3-digit account suffix, without separators or whitespace. + AccountSuffix string `json:"accountSuffix"` + // The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + BankCode string `json:"bankCode"` + // **nzLocal** + Type string `json:"type"` +} + +// NewNZLocalAccountIdentification instantiates a new NZLocalAccountIdentification 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 NewNZLocalAccountIdentification(accountNumber string, accountSuffix string, bankCode string, type_ string) *NZLocalAccountIdentification { + this := NZLocalAccountIdentification{} + this.AccountNumber = accountNumber + this.AccountSuffix = accountSuffix + this.BankCode = bankCode + this.Type = type_ + return &this +} + +// NewNZLocalAccountIdentificationWithDefaults instantiates a new NZLocalAccountIdentification 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 NewNZLocalAccountIdentificationWithDefaults() *NZLocalAccountIdentification { + this := NZLocalAccountIdentification{} + var type_ string = "nzLocal" + this.Type = type_ + return &this +} + +// GetAccountNumber returns the AccountNumber field value +func (o *NZLocalAccountIdentification) GetAccountNumber() string { + if o == nil { + var ret string + return ret + } + + return o.AccountNumber +} + +// GetAccountNumberOk returns a tuple with the AccountNumber field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetAccountNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountNumber, true +} + +// SetAccountNumber sets field value +func (o *NZLocalAccountIdentification) SetAccountNumber(v string) { + o.AccountNumber = v +} + +// GetAccountSuffix returns the AccountSuffix field value +func (o *NZLocalAccountIdentification) GetAccountSuffix() string { + if o == nil { + var ret string + return ret + } + + return o.AccountSuffix +} + +// GetAccountSuffixOk returns a tuple with the AccountSuffix field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetAccountSuffixOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountSuffix, true +} + +// SetAccountSuffix sets field value +func (o *NZLocalAccountIdentification) SetAccountSuffix(v string) { + o.AccountSuffix = v +} + +// GetBankCode returns the BankCode field value +func (o *NZLocalAccountIdentification) GetBankCode() string { + if o == nil { + var ret string + return ret + } + + return o.BankCode +} + +// GetBankCodeOk returns a tuple with the BankCode field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetBankCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BankCode, true +} + +// SetBankCode sets field value +func (o *NZLocalAccountIdentification) SetBankCode(v string) { + o.BankCode = v +} + +// GetType returns the Type field value +func (o *NZLocalAccountIdentification) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NZLocalAccountIdentification) SetType(v string) { + o.Type = v +} + +func (o NZLocalAccountIdentification) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NZLocalAccountIdentification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["accountNumber"] = o.AccountNumber + toSerialize["accountSuffix"] = o.AccountSuffix + toSerialize["bankCode"] = o.BankCode + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableNZLocalAccountIdentification struct { + value *NZLocalAccountIdentification + isSet bool +} + +func (v NullableNZLocalAccountIdentification) Get() *NZLocalAccountIdentification { + return v.value +} + +func (v *NullableNZLocalAccountIdentification) Set(val *NZLocalAccountIdentification) { + v.value = val + v.isSet = true +} + +func (v NullableNZLocalAccountIdentification) IsSet() bool { + return v.isSet +} + +func (v *NullableNZLocalAccountIdentification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNZLocalAccountIdentification(val *NZLocalAccountIdentification) *NullableNZLocalAccountIdentification { + return &NullableNZLocalAccountIdentification{value: val, isSet: true} +} + +func (v NullableNZLocalAccountIdentification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNZLocalAccountIdentification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *NZLocalAccountIdentification) isValidType() bool { + var allowedEnumValues = []string{"nzLocal"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_party_identification_2.go b/src/transfers/model_party_identification_2.go index 1022ccbf3..fd7fc4591 100644 --- a/src/transfers/model_party_identification_2.go +++ b/src/transfers/model_party_identification_2.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &PartyIdentification2{} // PartyIdentification2 struct for PartyIdentification2 type PartyIdentification2 struct { Address *Address2 `json:"address,omitempty"` - // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` // First name of the individual. Allowed only when `type` is **individual**. FirstName *string `json:"firstName,omitempty"` @@ -28,7 +28,7 @@ type PartyIdentification2 struct { FullName string `json:"fullName"` // Last name of the individual. Allowed only when `type` is **individual**. LastName *string `json:"lastName,omitempty"` - // Your unique reference of the party. This should be consistent for all transfers initiated to/from the same party/counterparty. e.g Your client's unique wallet or payee ID + // A unique reference to identify the party or counterparty involved in transfers. This identifier ensures consistency and uniqueness throughout all transactions initiated to and from the same party. For example, your client's unique wallet or payee ID. Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account. Possible values: **individual**, **organization**, or **unknown**. Type *string `json:"type,omitempty"` diff --git a/src/transfers/model_repayment.go b/src/transfers/model_repayment.go new file mode 100644 index 000000000..da7e47e94 --- /dev/null +++ b/src/transfers/model_repayment.go @@ -0,0 +1,188 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Repayment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Repayment{} + +// Repayment struct for Repayment +type Repayment struct { + // The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + BasisPoints int32 `json:"basisPoints"` + Term *RepaymentTerm `json:"term,omitempty"` + Threshold *ThresholdRepayment `json:"threshold,omitempty"` +} + +// NewRepayment instantiates a new Repayment 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 NewRepayment(basisPoints int32) *Repayment { + this := Repayment{} + this.BasisPoints = basisPoints + return &this +} + +// NewRepaymentWithDefaults instantiates a new Repayment 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 NewRepaymentWithDefaults() *Repayment { + this := Repayment{} + return &this +} + +// GetBasisPoints returns the BasisPoints field value +func (o *Repayment) GetBasisPoints() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.BasisPoints +} + +// GetBasisPointsOk returns a tuple with the BasisPoints field value +// and a boolean to check if the value has been set. +func (o *Repayment) GetBasisPointsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.BasisPoints, true +} + +// SetBasisPoints sets field value +func (o *Repayment) SetBasisPoints(v int32) { + o.BasisPoints = v +} + +// GetTerm returns the Term field value if set, zero value otherwise. +func (o *Repayment) GetTerm() RepaymentTerm { + if o == nil || common.IsNil(o.Term) { + var ret RepaymentTerm + return ret + } + return *o.Term +} + +// GetTermOk returns a tuple with the Term field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Repayment) GetTermOk() (*RepaymentTerm, bool) { + if o == nil || common.IsNil(o.Term) { + return nil, false + } + return o.Term, true +} + +// HasTerm returns a boolean if a field has been set. +func (o *Repayment) HasTerm() bool { + if o != nil && !common.IsNil(o.Term) { + return true + } + + return false +} + +// SetTerm gets a reference to the given RepaymentTerm and assigns it to the Term field. +func (o *Repayment) SetTerm(v RepaymentTerm) { + o.Term = &v +} + +// GetThreshold returns the Threshold field value if set, zero value otherwise. +func (o *Repayment) GetThreshold() ThresholdRepayment { + if o == nil || common.IsNil(o.Threshold) { + var ret ThresholdRepayment + return ret + } + return *o.Threshold +} + +// GetThresholdOk returns a tuple with the Threshold field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Repayment) GetThresholdOk() (*ThresholdRepayment, bool) { + if o == nil || common.IsNil(o.Threshold) { + return nil, false + } + return o.Threshold, true +} + +// HasThreshold returns a boolean if a field has been set. +func (o *Repayment) HasThreshold() bool { + if o != nil && !common.IsNil(o.Threshold) { + return true + } + + return false +} + +// SetThreshold gets a reference to the given ThresholdRepayment and assigns it to the Threshold field. +func (o *Repayment) SetThreshold(v ThresholdRepayment) { + o.Threshold = &v +} + +func (o Repayment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Repayment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["basisPoints"] = o.BasisPoints + if !common.IsNil(o.Term) { + toSerialize["term"] = o.Term + } + if !common.IsNil(o.Threshold) { + toSerialize["threshold"] = o.Threshold + } + return toSerialize, nil +} + +type NullableRepayment struct { + value *Repayment + isSet bool +} + +func (v NullableRepayment) Get() *Repayment { + return v.value +} + +func (v *NullableRepayment) Set(val *Repayment) { + v.value = val + v.isSet = true +} + +func (v NullableRepayment) IsSet() bool { + return v.isSet +} + +func (v *NullableRepayment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepayment(val *Repayment) *NullableRepayment { + return &NullableRepayment{value: val, isSet: true} +} + +func (v NullableRepayment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepayment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_repayment_term.go b/src/transfers/model_repayment_term.go new file mode 100644 index 000000000..3eec8a274 --- /dev/null +++ b/src/transfers/model_repayment_term.go @@ -0,0 +1,153 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the RepaymentTerm type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RepaymentTerm{} + +// RepaymentTerm struct for RepaymentTerm +type RepaymentTerm struct { + // The estimated term for repaying the grant, in days. + EstimatedDays int32 `json:"estimatedDays"` + // The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. + MaximumDays *int32 `json:"maximumDays,omitempty"` +} + +// NewRepaymentTerm instantiates a new RepaymentTerm 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 NewRepaymentTerm(estimatedDays int32) *RepaymentTerm { + this := RepaymentTerm{} + this.EstimatedDays = estimatedDays + return &this +} + +// NewRepaymentTermWithDefaults instantiates a new RepaymentTerm 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 NewRepaymentTermWithDefaults() *RepaymentTerm { + this := RepaymentTerm{} + return &this +} + +// GetEstimatedDays returns the EstimatedDays field value +func (o *RepaymentTerm) GetEstimatedDays() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.EstimatedDays +} + +// GetEstimatedDaysOk returns a tuple with the EstimatedDays field value +// and a boolean to check if the value has been set. +func (o *RepaymentTerm) GetEstimatedDaysOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.EstimatedDays, true +} + +// SetEstimatedDays sets field value +func (o *RepaymentTerm) SetEstimatedDays(v int32) { + o.EstimatedDays = v +} + +// GetMaximumDays returns the MaximumDays field value if set, zero value otherwise. +func (o *RepaymentTerm) GetMaximumDays() int32 { + if o == nil || common.IsNil(o.MaximumDays) { + var ret int32 + return ret + } + return *o.MaximumDays +} + +// GetMaximumDaysOk returns a tuple with the MaximumDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepaymentTerm) GetMaximumDaysOk() (*int32, bool) { + if o == nil || common.IsNil(o.MaximumDays) { + return nil, false + } + return o.MaximumDays, true +} + +// HasMaximumDays returns a boolean if a field has been set. +func (o *RepaymentTerm) HasMaximumDays() bool { + if o != nil && !common.IsNil(o.MaximumDays) { + return true + } + + return false +} + +// SetMaximumDays gets a reference to the given int32 and assigns it to the MaximumDays field. +func (o *RepaymentTerm) SetMaximumDays(v int32) { + o.MaximumDays = &v +} + +func (o RepaymentTerm) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepaymentTerm) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["estimatedDays"] = o.EstimatedDays + if !common.IsNil(o.MaximumDays) { + toSerialize["maximumDays"] = o.MaximumDays + } + return toSerialize, nil +} + +type NullableRepaymentTerm struct { + value *RepaymentTerm + isSet bool +} + +func (v NullableRepaymentTerm) Get() *RepaymentTerm { + return v.value +} + +func (v *NullableRepaymentTerm) Set(val *RepaymentTerm) { + v.value = val + v.isSet = true +} + +func (v NullableRepaymentTerm) IsSet() bool { + return v.isSet +} + +func (v *NullableRepaymentTerm) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepaymentTerm(val *RepaymentTerm) *NullableRepaymentTerm { + return &NullableRepaymentTerm{value: val, isSet: true} +} + +func (v NullableRepaymentTerm) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepaymentTerm) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_threshold_repayment.go b/src/transfers/model_threshold_repayment.go new file mode 100644 index 000000000..1e5701091 --- /dev/null +++ b/src/transfers/model_threshold_repayment.go @@ -0,0 +1,115 @@ +/* +Transfers API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the ThresholdRepayment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ThresholdRepayment{} + +// ThresholdRepayment struct for ThresholdRepayment +type ThresholdRepayment struct { + Amount Amount `json:"amount"` +} + +// NewThresholdRepayment instantiates a new ThresholdRepayment 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 NewThresholdRepayment(amount Amount) *ThresholdRepayment { + this := ThresholdRepayment{} + this.Amount = amount + return &this +} + +// NewThresholdRepaymentWithDefaults instantiates a new ThresholdRepayment 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 NewThresholdRepaymentWithDefaults() *ThresholdRepayment { + this := ThresholdRepayment{} + return &this +} + +// GetAmount returns the Amount field value +func (o *ThresholdRepayment) 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 *ThresholdRepayment) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *ThresholdRepayment) SetAmount(v Amount) { + o.Amount = v +} + +func (o ThresholdRepayment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThresholdRepayment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +type NullableThresholdRepayment struct { + value *ThresholdRepayment + isSet bool +} + +func (v NullableThresholdRepayment) Get() *ThresholdRepayment { + return v.value +} + +func (v *NullableThresholdRepayment) Set(val *ThresholdRepayment) { + v.value = val + v.isSet = true +} + +func (v NullableThresholdRepayment) IsSet() bool { + return v.isSet +} + +func (v *NullableThresholdRepayment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThresholdRepayment(val *ThresholdRepayment) *NullableThresholdRepayment { + return &NullableThresholdRepayment{value: val, isSet: true} +} + +func (v NullableThresholdRepayment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThresholdRepayment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_transaction.go b/src/transfers/model_transaction.go index a1bfeb4b1..8120e7c2a 100644 --- a/src/transfers/model_transaction.go +++ b/src/transfers/model_transaction.go @@ -653,7 +653,7 @@ func (v *NullableTransaction) UnmarshalJSON(src []byte) error { } func (o *Transaction) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "grants", "internal", "issuedCard", "platformPayment"} + var allowedEnumValues = []string{"bank", "card", "grants", "internal", "issuedCard", "migration", "platformPayment"} for _, allowed := range allowedEnumValues { if o.GetCategory() == allowed { return true @@ -671,7 +671,7 @@ func (o *Transaction) isValidStatus() bool { return false } func (o *Transaction) isValidType() bool { - var allowedEnumValues = []string{"atmWithdrawal", "atmWithdrawalReversal", "balanceAdjustment", "balanceRollover", "bankTransfer", "capture", "captureReversal", "chargeback", "chargebackReversal", "depositCorrection", "fee", "grant", "installment", "installmentReversal", "internalTransfer", "invoiceDeduction", "leftover", "manualCorrection", "miscCost", "payment", "paymentCost", "refund", "refundReversal", "repayment", "reserveAdjustment", "secondChargeback"} + var allowedEnumValues = []string{"atmWithdrawal", "atmWithdrawalReversal", "balanceAdjustment", "balanceRollover", "bankTransfer", "capture", "captureReversal", "cardTransfer", "chargeback", "chargebackReversal", "depositCorrection", "fee", "grant", "installment", "installmentReversal", "internalTransfer", "invoiceDeduction", "leftover", "manualCorrection", "miscCost", "payment", "paymentCost", "refund", "refundReversal", "repayment", "reserveAdjustment", "secondChargeback"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/transfers/model_transfer.go b/src/transfers/model_transfer.go index 535e2076b..b1e3a1155 100644 --- a/src/transfers/model_transfer.go +++ b/src/transfers/model_transfer.go @@ -10,6 +10,7 @@ package transfers import ( "encoding/json" + "time" "github.com/adyen/adyen-go-api-library/v7/src/common" ) @@ -28,6 +29,8 @@ type Transfer struct { // The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. Category string `json:"category"` Counterparty CounterpartyV3 `json:"counterparty"` + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + CreationDate *time.Time `json:"creationDate,omitempty"` // Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** Description *string `json:"description,omitempty"` // The direction of the transfer. Possible values: **incoming**, **outgoing**. @@ -242,6 +245,38 @@ func (o *Transfer) SetCounterparty(v CounterpartyV3) { o.Counterparty = v } +// GetCreationDate returns the CreationDate field value if set, zero value otherwise. +func (o *Transfer) GetCreationDate() time.Time { + if o == nil || common.IsNil(o.CreationDate) { + var ret time.Time + return ret + } + return *o.CreationDate +} + +// GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Transfer) GetCreationDateOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreationDate) { + return nil, false + } + return o.CreationDate, true +} + +// HasCreationDate returns a boolean if a field has been set. +func (o *Transfer) HasCreationDate() bool { + if o != nil && !common.IsNil(o.CreationDate) { + return true + } + + return false +} + +// SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +func (o *Transfer) SetCreationDate(v time.Time) { + o.CreationDate = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *Transfer) GetDescription() string { if o == nil || common.IsNil(o.Description) { @@ -579,6 +614,9 @@ func (o Transfer) ToMap() (map[string]interface{}, error) { } toSerialize["category"] = o.Category toSerialize["counterparty"] = o.Counterparty + if !common.IsNil(o.CreationDate) { + toSerialize["creationDate"] = o.CreationDate + } if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } @@ -683,7 +721,7 @@ func (o *Transfer) isValidReason() bool { return false } func (o *Transfer) isValidStatus() bool { - var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "chargeback", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} + var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "capturedExternally", "chargeback", "chargebackExternally", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refundedExternally", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/transfers/model_transfer_info.go b/src/transfers/model_transfer_info.go index 0c40da45f..583e624ff 100644 --- a/src/transfers/model_transfer_info.go +++ b/src/transfers/model_transfer_info.go @@ -465,7 +465,7 @@ func (v *NullableTransferInfo) UnmarshalJSON(src []byte) error { } func (o *TransferInfo) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "internal", "issuedCard", "platformPayment"} + var allowedEnumValues = []string{"bank", "internal", "issuedCard", "platformPayment", "card"} for _, allowed := range allowedEnumValues { if o.GetCategory() == allowed { return true diff --git a/src/transfers/model_ultimate_party_identification.go b/src/transfers/model_ultimate_party_identification.go index d99346bab..fc895397a 100644 --- a/src/transfers/model_ultimate_party_identification.go +++ b/src/transfers/model_ultimate_party_identification.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &UltimatePartyIdentification{} // UltimatePartyIdentification struct for UltimatePartyIdentification type UltimatePartyIdentification struct { Address *Address2 `json:"address,omitempty"` - // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` // First name of the individual. Allowed only when `type` is **individual**. FirstName *string `json:"firstName,omitempty"` @@ -28,7 +28,7 @@ type UltimatePartyIdentification struct { FullName string `json:"fullName"` // Last name of the individual. Allowed only when `type` is **individual**. LastName *string `json:"lastName,omitempty"` - // Your unique reference of the party. This should be consistent for all transfers initiated to/from the same party/counterparty. e.g Your client's unique wallet or payee ID + // A unique reference to identify the party or counterparty involved in transfers. This identifier ensures consistency and uniqueness throughout all transactions initiated to and from the same party. For example, your client's unique wallet or payee ID. Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account. Possible values: **individual**, **organization**, or **unknown**. Type *string `json:"type,omitempty"` diff --git a/src/transferwebhook/model_bank_account_v3_account_identification.go b/src/transferwebhook/model_bank_account_v3_account_identification.go index 4f7773f43..9d163582d 100644 --- a/src/transferwebhook/model_bank_account_v3_account_identification.go +++ b/src/transferwebhook/model_bank_account_v3_account_identification.go @@ -23,6 +23,7 @@ type BankAccountV3AccountIdentification struct { HULocalAccountIdentification *HULocalAccountIdentification IbanAccountIdentification *IbanAccountIdentification NOLocalAccountIdentification *NOLocalAccountIdentification + NZLocalAccountIdentification *NZLocalAccountIdentification NumberAndBicAccountIdentification *NumberAndBicAccountIdentification PLLocalAccountIdentification *PLLocalAccountIdentification SELocalAccountIdentification *SELocalAccountIdentification @@ -87,6 +88,13 @@ func NOLocalAccountIdentificationAsBankAccountV3AccountIdentification(v *NOLocal } } +// NZLocalAccountIdentificationAsBankAccountV3AccountIdentification is a convenience function that returns NZLocalAccountIdentification wrapped in BankAccountV3AccountIdentification +func NZLocalAccountIdentificationAsBankAccountV3AccountIdentification(v *NZLocalAccountIdentification) BankAccountV3AccountIdentification { + return BankAccountV3AccountIdentification{ + NZLocalAccountIdentification: v, + } +} + // NumberAndBicAccountIdentificationAsBankAccountV3AccountIdentification is a convenience function that returns NumberAndBicAccountIdentification wrapped in BankAccountV3AccountIdentification func NumberAndBicAccountIdentificationAsBankAccountV3AccountIdentification(v *NumberAndBicAccountIdentification) BankAccountV3AccountIdentification { return BankAccountV3AccountIdentification{ @@ -237,6 +245,19 @@ func (dst *BankAccountV3AccountIdentification) UnmarshalJSON(data []byte) error dst.NOLocalAccountIdentification = nil } + // try to unmarshal data into NZLocalAccountIdentification + err = json.Unmarshal(data, &dst.NZLocalAccountIdentification) + if err == nil { + jsonNZLocalAccountIdentification, _ := json.Marshal(dst.NZLocalAccountIdentification) + if string(jsonNZLocalAccountIdentification) == "{}" || !dst.NZLocalAccountIdentification.isValidType() { // empty struct + dst.NZLocalAccountIdentification = nil + } else { + match++ + } + } else { + dst.NZLocalAccountIdentification = nil + } + // try to unmarshal data into NumberAndBicAccountIdentification err = json.Unmarshal(data, &dst.NumberAndBicAccountIdentification) if err == nil { @@ -325,6 +346,7 @@ func (dst *BankAccountV3AccountIdentification) UnmarshalJSON(data []byte) error dst.HULocalAccountIdentification = nil dst.IbanAccountIdentification = nil dst.NOLocalAccountIdentification = nil + dst.NZLocalAccountIdentification = nil dst.NumberAndBicAccountIdentification = nil dst.PLLocalAccountIdentification = nil dst.SELocalAccountIdentification = nil @@ -374,6 +396,10 @@ func (src BankAccountV3AccountIdentification) MarshalJSON() ([]byte, error) { return json.Marshal(&src.NOLocalAccountIdentification) } + if src.NZLocalAccountIdentification != nil { + return json.Marshal(&src.NZLocalAccountIdentification) + } + if src.NumberAndBicAccountIdentification != nil { return json.Marshal(&src.NumberAndBicAccountIdentification) } @@ -438,6 +464,10 @@ func (obj *BankAccountV3AccountIdentification) GetActualInstance() interface{} { return obj.NOLocalAccountIdentification } + if obj.NZLocalAccountIdentification != nil { + return obj.NZLocalAccountIdentification + } + if obj.NumberAndBicAccountIdentification != nil { return obj.NumberAndBicAccountIdentification } diff --git a/src/transferwebhook/model_nz_local_account_identification.go b/src/transferwebhook/model_nz_local_account_identification.go new file mode 100644 index 000000000..275cea1be --- /dev/null +++ b/src/transferwebhook/model_nz_local_account_identification.go @@ -0,0 +1,212 @@ +/* +Transfer webhooks + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transferwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the NZLocalAccountIdentification type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NZLocalAccountIdentification{} + +// NZLocalAccountIdentification struct for NZLocalAccountIdentification +type NZLocalAccountIdentification struct { + // The 7-digit bank account number, without separators or whitespace. + AccountNumber string `json:"accountNumber"` + // The 2- to 3-digit account suffix, without separators or whitespace. + AccountSuffix string `json:"accountSuffix"` + // The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. + BankCode string `json:"bankCode"` + // **nzLocal** + Type string `json:"type"` +} + +// NewNZLocalAccountIdentification instantiates a new NZLocalAccountIdentification 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 NewNZLocalAccountIdentification(accountNumber string, accountSuffix string, bankCode string, type_ string) *NZLocalAccountIdentification { + this := NZLocalAccountIdentification{} + this.AccountNumber = accountNumber + this.AccountSuffix = accountSuffix + this.BankCode = bankCode + this.Type = type_ + return &this +} + +// NewNZLocalAccountIdentificationWithDefaults instantiates a new NZLocalAccountIdentification 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 NewNZLocalAccountIdentificationWithDefaults() *NZLocalAccountIdentification { + this := NZLocalAccountIdentification{} + var type_ string = "nzLocal" + this.Type = type_ + return &this +} + +// GetAccountNumber returns the AccountNumber field value +func (o *NZLocalAccountIdentification) GetAccountNumber() string { + if o == nil { + var ret string + return ret + } + + return o.AccountNumber +} + +// GetAccountNumberOk returns a tuple with the AccountNumber field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetAccountNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountNumber, true +} + +// SetAccountNumber sets field value +func (o *NZLocalAccountIdentification) SetAccountNumber(v string) { + o.AccountNumber = v +} + +// GetAccountSuffix returns the AccountSuffix field value +func (o *NZLocalAccountIdentification) GetAccountSuffix() string { + if o == nil { + var ret string + return ret + } + + return o.AccountSuffix +} + +// GetAccountSuffixOk returns a tuple with the AccountSuffix field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetAccountSuffixOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountSuffix, true +} + +// SetAccountSuffix sets field value +func (o *NZLocalAccountIdentification) SetAccountSuffix(v string) { + o.AccountSuffix = v +} + +// GetBankCode returns the BankCode field value +func (o *NZLocalAccountIdentification) GetBankCode() string { + if o == nil { + var ret string + return ret + } + + return o.BankCode +} + +// GetBankCodeOk returns a tuple with the BankCode field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetBankCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BankCode, true +} + +// SetBankCode sets field value +func (o *NZLocalAccountIdentification) SetBankCode(v string) { + o.BankCode = v +} + +// GetType returns the Type field value +func (o *NZLocalAccountIdentification) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NZLocalAccountIdentification) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NZLocalAccountIdentification) SetType(v string) { + o.Type = v +} + +func (o NZLocalAccountIdentification) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NZLocalAccountIdentification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["accountNumber"] = o.AccountNumber + toSerialize["accountSuffix"] = o.AccountSuffix + toSerialize["bankCode"] = o.BankCode + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableNZLocalAccountIdentification struct { + value *NZLocalAccountIdentification + isSet bool +} + +func (v NullableNZLocalAccountIdentification) Get() *NZLocalAccountIdentification { + return v.value +} + +func (v *NullableNZLocalAccountIdentification) Set(val *NZLocalAccountIdentification) { + v.value = val + v.isSet = true +} + +func (v NullableNZLocalAccountIdentification) IsSet() bool { + return v.isSet +} + +func (v *NullableNZLocalAccountIdentification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNZLocalAccountIdentification(val *NZLocalAccountIdentification) *NullableNZLocalAccountIdentification { + return &NullableNZLocalAccountIdentification{value: val, isSet: true} +} + +func (v NullableNZLocalAccountIdentification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNZLocalAccountIdentification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *NZLocalAccountIdentification) isValidType() bool { + var allowedEnumValues = []string{"nzLocal"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transferwebhook/model_party_identification.go b/src/transferwebhook/model_party_identification.go index 7cca4a29b..676a4b04b 100644 --- a/src/transferwebhook/model_party_identification.go +++ b/src/transferwebhook/model_party_identification.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &PartyIdentification{} // PartyIdentification struct for PartyIdentification type PartyIdentification struct { Address *Address `json:"address,omitempty"` - // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. + // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` // First name of the individual. Allowed only when `type` is **individual**. FirstName *string `json:"firstName,omitempty"` @@ -28,7 +28,7 @@ type PartyIdentification struct { FullName string `json:"fullName"` // Last name of the individual. Allowed only when `type` is **individual**. LastName *string `json:"lastName,omitempty"` - // Your unique reference of the party. This should be consistent for all transfers initiated to/from the same party/counterparty. e.g Your client's unique wallet or payee ID + // A unique reference to identify the party or counterparty involved in transfers. This identifier ensures consistency and uniqueness throughout all transactions initiated to and from the same party. For example, your client's unique wallet or payee ID. Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account. Possible values: **individual**, **organization**, or **unknown**. Type *string `json:"type,omitempty"` diff --git a/src/transferwebhook/model_transfer_data.go b/src/transferwebhook/model_transfer_data.go new file mode 100644 index 000000000..5819ac26a --- /dev/null +++ b/src/transferwebhook/model_transfer_data.go @@ -0,0 +1,1438 @@ +/* +Transfer webhooks + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transferwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TransferData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferData{} + +// TransferData struct for TransferData +type TransferData struct { + AccountHolder *ResourceReference `json:"accountHolder,omitempty"` + Amount Amount `json:"amount"` + BalanceAccount *ResourceReference `json:"balanceAccount,omitempty"` + // The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). + // Deprecated + BalanceAccountId *string `json:"balanceAccountId,omitempty"` + // The unique identifier of the balance platform. + BalancePlatform *string `json:"balancePlatform,omitempty"` + // The list of the latest balance statuses in the transfer. + Balances []BalanceMutation `json:"balances,omitempty"` + // The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + Category string `json:"category"` + Counterparty *CounterpartyV3 `json:"counterparty,omitempty"` + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + CreationDate *time.Time `json:"creationDate,omitempty"` + // Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** + Description *string `json:"description,omitempty"` + // The direction of the transfer. Possible values: **incoming**, **outgoing**. + Direction *string `json:"direction,omitempty"` + // The list of events leading up to the current status of the transfer. + Events []TransferEvent `json:"events,omitempty"` + // The ID of the resource. + Id *string `json:"id,omitempty"` + // The capture's merchant reference included in the transfer. + // Deprecated + ModificationMerchantReference *string `json:"modificationMerchantReference,omitempty"` + // The capture reference included in the transfer. + // Deprecated + ModificationPspReference *string `json:"modificationPspReference,omitempty"` + // Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + // Deprecated + PanEntryMode *string `json:"panEntryMode,omitempty"` + PaymentInstrument *PaymentInstrument `json:"paymentInstrument,omitempty"` + // The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer. + // Deprecated + PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` + // The payment's merchant reference included in the transfer. + // Deprecated + PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` + // The type of the related split. + // Deprecated + PlatformPaymentType *string `json:"platformPaymentType,omitempty"` + // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + Priority *string `json:"priority,omitempty"` + // Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + // Deprecated + ProcessingType *string `json:"processingType,omitempty"` + // The payment reference included in the transfer. + // Deprecated + PspPaymentReference *string `json:"pspPaymentReference,omitempty"` + // Additional information about the status of the transfer. + Reason *string `json:"reason,omitempty"` + // Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. + Reference *string `json:"reference,omitempty"` + // A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. + ReferenceForBeneficiary *string `json:"referenceForBeneficiary,omitempty"` + RelayedAuthorisationData *RelayedAuthorisationData `json:"relayedAuthorisationData,omitempty"` + // The sequence number of the transfer notification. The numbers start from 1 and increase with each new notification for a specific transfer. It can help you restore the correct sequence of events even if they arrive out of order. + SequenceNumber *int32 `json:"sequenceNumber,omitempty"` + // The result of the transfer. For example, **authorised**, **refused**, or **error**. + Status string `json:"status"` + Tracking *TransferNotificationTransferTracking `json:"tracking,omitempty"` + // The ID of the transaction that is created based on the transfer. + // Deprecated + TransactionId *string `json:"transactionId,omitempty"` + TransactionRulesResult *TransactionRulesResult `json:"transactionRulesResult,omitempty"` + // The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. + Type *string `json:"type,omitempty"` + // The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + // Deprecated + ValidationFacts []TransferNotificationValidationFact `json:"validationFacts,omitempty"` +} + +// NewTransferData instantiates a new TransferData 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 NewTransferData(amount Amount, category string, status string) *TransferData { + this := TransferData{} + this.Amount = amount + this.Category = category + this.Status = status + return &this +} + +// NewTransferDataWithDefaults instantiates a new TransferData 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 NewTransferDataWithDefaults() *TransferData { + this := TransferData{} + return &this +} + +// GetAccountHolder returns the AccountHolder field value if set, zero value otherwise. +func (o *TransferData) GetAccountHolder() ResourceReference { + if o == nil || common.IsNil(o.AccountHolder) { + var ret ResourceReference + return ret + } + return *o.AccountHolder +} + +// GetAccountHolderOk returns a tuple with the AccountHolder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetAccountHolderOk() (*ResourceReference, bool) { + if o == nil || common.IsNil(o.AccountHolder) { + return nil, false + } + return o.AccountHolder, true +} + +// HasAccountHolder returns a boolean if a field has been set. +func (o *TransferData) HasAccountHolder() bool { + if o != nil && !common.IsNil(o.AccountHolder) { + return true + } + + return false +} + +// SetAccountHolder gets a reference to the given ResourceReference and assigns it to the AccountHolder field. +func (o *TransferData) SetAccountHolder(v ResourceReference) { + o.AccountHolder = &v +} + +// GetAmount returns the Amount field value +func (o *TransferData) 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 *TransferData) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *TransferData) SetAmount(v Amount) { + o.Amount = v +} + +// GetBalanceAccount returns the BalanceAccount field value if set, zero value otherwise. +func (o *TransferData) GetBalanceAccount() ResourceReference { + if o == nil || common.IsNil(o.BalanceAccount) { + var ret ResourceReference + return ret + } + return *o.BalanceAccount +} + +// GetBalanceAccountOk returns a tuple with the BalanceAccount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetBalanceAccountOk() (*ResourceReference, bool) { + if o == nil || common.IsNil(o.BalanceAccount) { + return nil, false + } + return o.BalanceAccount, true +} + +// HasBalanceAccount returns a boolean if a field has been set. +func (o *TransferData) HasBalanceAccount() bool { + if o != nil && !common.IsNil(o.BalanceAccount) { + return true + } + + return false +} + +// SetBalanceAccount gets a reference to the given ResourceReference and assigns it to the BalanceAccount field. +func (o *TransferData) SetBalanceAccount(v ResourceReference) { + o.BalanceAccount = &v +} + +// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetBalanceAccountId() string { + if o == nil || common.IsNil(o.BalanceAccountId) { + var ret string + return ret + } + return *o.BalanceAccountId +} + +// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetBalanceAccountIdOk() (*string, bool) { + if o == nil || common.IsNil(o.BalanceAccountId) { + return nil, false + } + return o.BalanceAccountId, true +} + +// HasBalanceAccountId returns a boolean if a field has been set. +func (o *TransferData) HasBalanceAccountId() bool { + if o != nil && !common.IsNil(o.BalanceAccountId) { + return true + } + + return false +} + +// SetBalanceAccountId gets a reference to the given string and assigns it to the BalanceAccountId field. +// Deprecated +func (o *TransferData) SetBalanceAccountId(v string) { + o.BalanceAccountId = &v +} + +// GetBalancePlatform returns the BalancePlatform field value if set, zero value otherwise. +func (o *TransferData) GetBalancePlatform() string { + if o == nil || common.IsNil(o.BalancePlatform) { + var ret string + return ret + } + return *o.BalancePlatform +} + +// GetBalancePlatformOk returns a tuple with the BalancePlatform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetBalancePlatformOk() (*string, bool) { + if o == nil || common.IsNil(o.BalancePlatform) { + return nil, false + } + return o.BalancePlatform, true +} + +// HasBalancePlatform returns a boolean if a field has been set. +func (o *TransferData) HasBalancePlatform() bool { + if o != nil && !common.IsNil(o.BalancePlatform) { + return true + } + + return false +} + +// SetBalancePlatform gets a reference to the given string and assigns it to the BalancePlatform field. +func (o *TransferData) SetBalancePlatform(v string) { + o.BalancePlatform = &v +} + +// GetBalances returns the Balances field value if set, zero value otherwise. +func (o *TransferData) GetBalances() []BalanceMutation { + if o == nil || common.IsNil(o.Balances) { + var ret []BalanceMutation + return ret + } + return o.Balances +} + +// GetBalancesOk returns a tuple with the Balances field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetBalancesOk() ([]BalanceMutation, bool) { + if o == nil || common.IsNil(o.Balances) { + return nil, false + } + return o.Balances, true +} + +// HasBalances returns a boolean if a field has been set. +func (o *TransferData) HasBalances() bool { + if o != nil && !common.IsNil(o.Balances) { + return true + } + + return false +} + +// SetBalances gets a reference to the given []BalanceMutation and assigns it to the Balances field. +func (o *TransferData) SetBalances(v []BalanceMutation) { + o.Balances = v +} + +// GetCategory returns the Category field value +func (o *TransferData) GetCategory() string { + if o == nil { + var ret string + return ret + } + + return o.Category +} + +// GetCategoryOk returns a tuple with the Category field value +// and a boolean to check if the value has been set. +func (o *TransferData) GetCategoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Category, true +} + +// SetCategory sets field value +func (o *TransferData) SetCategory(v string) { + o.Category = v +} + +// GetCounterparty returns the Counterparty field value if set, zero value otherwise. +func (o *TransferData) GetCounterparty() CounterpartyV3 { + if o == nil || common.IsNil(o.Counterparty) { + var ret CounterpartyV3 + return ret + } + return *o.Counterparty +} + +// GetCounterpartyOk returns a tuple with the Counterparty field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetCounterpartyOk() (*CounterpartyV3, bool) { + if o == nil || common.IsNil(o.Counterparty) { + return nil, false + } + return o.Counterparty, true +} + +// HasCounterparty returns a boolean if a field has been set. +func (o *TransferData) HasCounterparty() bool { + if o != nil && !common.IsNil(o.Counterparty) { + return true + } + + return false +} + +// SetCounterparty gets a reference to the given CounterpartyV3 and assigns it to the Counterparty field. +func (o *TransferData) SetCounterparty(v CounterpartyV3) { + o.Counterparty = &v +} + +// GetCreationDate returns the CreationDate field value if set, zero value otherwise. +func (o *TransferData) GetCreationDate() time.Time { + if o == nil || common.IsNil(o.CreationDate) { + var ret time.Time + return ret + } + return *o.CreationDate +} + +// GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetCreationDateOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreationDate) { + return nil, false + } + return o.CreationDate, true +} + +// HasCreationDate returns a boolean if a field has been set. +func (o *TransferData) HasCreationDate() bool { + if o != nil && !common.IsNil(o.CreationDate) { + return true + } + + return false +} + +// SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +func (o *TransferData) SetCreationDate(v time.Time) { + o.CreationDate = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TransferData) 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 *TransferData) 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 *TransferData) 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 *TransferData) SetDescription(v string) { + o.Description = &v +} + +// GetDirection returns the Direction field value if set, zero value otherwise. +func (o *TransferData) GetDirection() string { + if o == nil || common.IsNil(o.Direction) { + var ret string + return ret + } + return *o.Direction +} + +// GetDirectionOk returns a tuple with the Direction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetDirectionOk() (*string, bool) { + if o == nil || common.IsNil(o.Direction) { + return nil, false + } + return o.Direction, true +} + +// HasDirection returns a boolean if a field has been set. +func (o *TransferData) HasDirection() bool { + if o != nil && !common.IsNil(o.Direction) { + return true + } + + return false +} + +// SetDirection gets a reference to the given string and assigns it to the Direction field. +func (o *TransferData) SetDirection(v string) { + o.Direction = &v +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *TransferData) GetEvents() []TransferEvent { + if o == nil || common.IsNil(o.Events) { + var ret []TransferEvent + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetEventsOk() ([]TransferEvent, bool) { + if o == nil || common.IsNil(o.Events) { + return nil, false + } + return o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *TransferData) HasEvents() bool { + if o != nil && !common.IsNil(o.Events) { + return true + } + + return false +} + +// SetEvents gets a reference to the given []TransferEvent and assigns it to the Events field. +func (o *TransferData) SetEvents(v []TransferEvent) { + o.Events = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TransferData) 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 *TransferData) 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 *TransferData) 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 *TransferData) SetId(v string) { + o.Id = &v +} + +// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetModificationMerchantReference() string { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + var ret string + return ret + } + return *o.ModificationMerchantReference +} + +// GetModificationMerchantReferenceOk returns a tuple with the ModificationMerchantReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetModificationMerchantReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + return nil, false + } + return o.ModificationMerchantReference, true +} + +// HasModificationMerchantReference returns a boolean if a field has been set. +func (o *TransferData) HasModificationMerchantReference() bool { + if o != nil && !common.IsNil(o.ModificationMerchantReference) { + return true + } + + return false +} + +// SetModificationMerchantReference gets a reference to the given string and assigns it to the ModificationMerchantReference field. +// Deprecated +func (o *TransferData) SetModificationMerchantReference(v string) { + o.ModificationMerchantReference = &v +} + +// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetModificationPspReference() string { + if o == nil || common.IsNil(o.ModificationPspReference) { + var ret string + return ret + } + return *o.ModificationPspReference +} + +// GetModificationPspReferenceOk returns a tuple with the ModificationPspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetModificationPspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationPspReference) { + return nil, false + } + return o.ModificationPspReference, true +} + +// HasModificationPspReference returns a boolean if a field has been set. +func (o *TransferData) HasModificationPspReference() bool { + if o != nil && !common.IsNil(o.ModificationPspReference) { + return true + } + + return false +} + +// SetModificationPspReference gets a reference to the given string and assigns it to the ModificationPspReference field. +// Deprecated +func (o *TransferData) SetModificationPspReference(v string) { + o.ModificationPspReference = &v +} + +// GetPanEntryMode returns the PanEntryMode field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetPanEntryMode() string { + if o == nil || common.IsNil(o.PanEntryMode) { + var ret string + return ret + } + return *o.PanEntryMode +} + +// GetPanEntryModeOk returns a tuple with the PanEntryMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetPanEntryModeOk() (*string, bool) { + if o == nil || common.IsNil(o.PanEntryMode) { + return nil, false + } + return o.PanEntryMode, true +} + +// HasPanEntryMode returns a boolean if a field has been set. +func (o *TransferData) HasPanEntryMode() bool { + if o != nil && !common.IsNil(o.PanEntryMode) { + return true + } + + return false +} + +// SetPanEntryMode gets a reference to the given string and assigns it to the PanEntryMode field. +// Deprecated +func (o *TransferData) SetPanEntryMode(v string) { + o.PanEntryMode = &v +} + +// GetPaymentInstrument returns the PaymentInstrument field value if set, zero value otherwise. +func (o *TransferData) GetPaymentInstrument() PaymentInstrument { + if o == nil || common.IsNil(o.PaymentInstrument) { + var ret PaymentInstrument + return ret + } + return *o.PaymentInstrument +} + +// GetPaymentInstrumentOk returns a tuple with the PaymentInstrument field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetPaymentInstrumentOk() (*PaymentInstrument, bool) { + if o == nil || common.IsNil(o.PaymentInstrument) { + return nil, false + } + return o.PaymentInstrument, true +} + +// HasPaymentInstrument returns a boolean if a field has been set. +func (o *TransferData) HasPaymentInstrument() bool { + if o != nil && !common.IsNil(o.PaymentInstrument) { + return true + } + + return false +} + +// SetPaymentInstrument gets a reference to the given PaymentInstrument and assigns it to the PaymentInstrument field. +func (o *TransferData) SetPaymentInstrument(v PaymentInstrument) { + o.PaymentInstrument = &v +} + +// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetPaymentInstrumentId() string { + if o == nil || common.IsNil(o.PaymentInstrumentId) { + var ret string + return ret + } + return *o.PaymentInstrumentId +} + +// GetPaymentInstrumentIdOk returns a tuple with the PaymentInstrumentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetPaymentInstrumentIdOk() (*string, bool) { + if o == nil || common.IsNil(o.PaymentInstrumentId) { + return nil, false + } + return o.PaymentInstrumentId, true +} + +// HasPaymentInstrumentId returns a boolean if a field has been set. +func (o *TransferData) HasPaymentInstrumentId() bool { + if o != nil && !common.IsNil(o.PaymentInstrumentId) { + return true + } + + return false +} + +// SetPaymentInstrumentId gets a reference to the given string and assigns it to the PaymentInstrumentId field. +// Deprecated +func (o *TransferData) SetPaymentInstrumentId(v string) { + o.PaymentInstrumentId = &v +} + +// GetPaymentMerchantReference returns the PaymentMerchantReference field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetPaymentMerchantReference() string { + if o == nil || common.IsNil(o.PaymentMerchantReference) { + var ret string + return ret + } + return *o.PaymentMerchantReference +} + +// GetPaymentMerchantReferenceOk returns a tuple with the PaymentMerchantReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetPaymentMerchantReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PaymentMerchantReference) { + return nil, false + } + return o.PaymentMerchantReference, true +} + +// HasPaymentMerchantReference returns a boolean if a field has been set. +func (o *TransferData) HasPaymentMerchantReference() bool { + if o != nil && !common.IsNil(o.PaymentMerchantReference) { + return true + } + + return false +} + +// SetPaymentMerchantReference gets a reference to the given string and assigns it to the PaymentMerchantReference field. +// Deprecated +func (o *TransferData) SetPaymentMerchantReference(v string) { + o.PaymentMerchantReference = &v +} + +// GetPlatformPaymentType returns the PlatformPaymentType field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetPlatformPaymentType() string { + if o == nil || common.IsNil(o.PlatformPaymentType) { + var ret string + return ret + } + return *o.PlatformPaymentType +} + +// GetPlatformPaymentTypeOk returns a tuple with the PlatformPaymentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetPlatformPaymentTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.PlatformPaymentType) { + return nil, false + } + return o.PlatformPaymentType, true +} + +// HasPlatformPaymentType returns a boolean if a field has been set. +func (o *TransferData) HasPlatformPaymentType() bool { + if o != nil && !common.IsNil(o.PlatformPaymentType) { + return true + } + + return false +} + +// SetPlatformPaymentType gets a reference to the given string and assigns it to the PlatformPaymentType field. +// Deprecated +func (o *TransferData) SetPlatformPaymentType(v string) { + o.PlatformPaymentType = &v +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *TransferData) GetPriority() string { + if o == nil || common.IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetPriorityOk() (*string, bool) { + if o == nil || common.IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *TransferData) HasPriority() bool { + if o != nil && !common.IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *TransferData) SetPriority(v string) { + o.Priority = &v +} + +// GetProcessingType returns the ProcessingType field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetProcessingType() string { + if o == nil || common.IsNil(o.ProcessingType) { + var ret string + return ret + } + return *o.ProcessingType +} + +// GetProcessingTypeOk returns a tuple with the ProcessingType field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetProcessingTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.ProcessingType) { + return nil, false + } + return o.ProcessingType, true +} + +// HasProcessingType returns a boolean if a field has been set. +func (o *TransferData) HasProcessingType() bool { + if o != nil && !common.IsNil(o.ProcessingType) { + return true + } + + return false +} + +// SetProcessingType gets a reference to the given string and assigns it to the ProcessingType field. +// Deprecated +func (o *TransferData) SetProcessingType(v string) { + o.ProcessingType = &v +} + +// GetPspPaymentReference returns the PspPaymentReference field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetPspPaymentReference() string { + if o == nil || common.IsNil(o.PspPaymentReference) { + var ret string + return ret + } + return *o.PspPaymentReference +} + +// GetPspPaymentReferenceOk returns a tuple with the PspPaymentReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetPspPaymentReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PspPaymentReference) { + return nil, false + } + return o.PspPaymentReference, true +} + +// HasPspPaymentReference returns a boolean if a field has been set. +func (o *TransferData) HasPspPaymentReference() bool { + if o != nil && !common.IsNil(o.PspPaymentReference) { + return true + } + + return false +} + +// SetPspPaymentReference gets a reference to the given string and assigns it to the PspPaymentReference field. +// Deprecated +func (o *TransferData) SetPspPaymentReference(v string) { + o.PspPaymentReference = &v +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *TransferData) GetReason() string { + if o == nil || common.IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetReasonOk() (*string, bool) { + if o == nil || common.IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *TransferData) HasReason() bool { + if o != nil && !common.IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *TransferData) SetReason(v string) { + o.Reason = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *TransferData) 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 *TransferData) 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 *TransferData) 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 *TransferData) SetReference(v string) { + o.Reference = &v +} + +// GetReferenceForBeneficiary returns the ReferenceForBeneficiary field value if set, zero value otherwise. +func (o *TransferData) GetReferenceForBeneficiary() string { + if o == nil || common.IsNil(o.ReferenceForBeneficiary) { + var ret string + return ret + } + return *o.ReferenceForBeneficiary +} + +// GetReferenceForBeneficiaryOk returns a tuple with the ReferenceForBeneficiary field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetReferenceForBeneficiaryOk() (*string, bool) { + if o == nil || common.IsNil(o.ReferenceForBeneficiary) { + return nil, false + } + return o.ReferenceForBeneficiary, true +} + +// HasReferenceForBeneficiary returns a boolean if a field has been set. +func (o *TransferData) HasReferenceForBeneficiary() bool { + if o != nil && !common.IsNil(o.ReferenceForBeneficiary) { + return true + } + + return false +} + +// SetReferenceForBeneficiary gets a reference to the given string and assigns it to the ReferenceForBeneficiary field. +func (o *TransferData) SetReferenceForBeneficiary(v string) { + o.ReferenceForBeneficiary = &v +} + +// GetRelayedAuthorisationData returns the RelayedAuthorisationData field value if set, zero value otherwise. +func (o *TransferData) GetRelayedAuthorisationData() RelayedAuthorisationData { + if o == nil || common.IsNil(o.RelayedAuthorisationData) { + var ret RelayedAuthorisationData + return ret + } + return *o.RelayedAuthorisationData +} + +// GetRelayedAuthorisationDataOk returns a tuple with the RelayedAuthorisationData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetRelayedAuthorisationDataOk() (*RelayedAuthorisationData, bool) { + if o == nil || common.IsNil(o.RelayedAuthorisationData) { + return nil, false + } + return o.RelayedAuthorisationData, true +} + +// HasRelayedAuthorisationData returns a boolean if a field has been set. +func (o *TransferData) HasRelayedAuthorisationData() bool { + if o != nil && !common.IsNil(o.RelayedAuthorisationData) { + return true + } + + return false +} + +// SetRelayedAuthorisationData gets a reference to the given RelayedAuthorisationData and assigns it to the RelayedAuthorisationData field. +func (o *TransferData) SetRelayedAuthorisationData(v RelayedAuthorisationData) { + o.RelayedAuthorisationData = &v +} + +// GetSequenceNumber returns the SequenceNumber field value if set, zero value otherwise. +func (o *TransferData) GetSequenceNumber() int32 { + if o == nil || common.IsNil(o.SequenceNumber) { + var ret int32 + return ret + } + return *o.SequenceNumber +} + +// GetSequenceNumberOk returns a tuple with the SequenceNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetSequenceNumberOk() (*int32, bool) { + if o == nil || common.IsNil(o.SequenceNumber) { + return nil, false + } + return o.SequenceNumber, true +} + +// HasSequenceNumber returns a boolean if a field has been set. +func (o *TransferData) HasSequenceNumber() bool { + if o != nil && !common.IsNil(o.SequenceNumber) { + return true + } + + return false +} + +// SetSequenceNumber gets a reference to the given int32 and assigns it to the SequenceNumber field. +func (o *TransferData) SetSequenceNumber(v int32) { + o.SequenceNumber = &v +} + +// GetStatus returns the Status field value +func (o *TransferData) 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 *TransferData) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TransferData) SetStatus(v string) { + o.Status = v +} + +// GetTracking returns the Tracking field value if set, zero value otherwise. +func (o *TransferData) GetTracking() TransferNotificationTransferTracking { + if o == nil || common.IsNil(o.Tracking) { + var ret TransferNotificationTransferTracking + return ret + } + return *o.Tracking +} + +// GetTrackingOk returns a tuple with the Tracking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetTrackingOk() (*TransferNotificationTransferTracking, bool) { + if o == nil || common.IsNil(o.Tracking) { + return nil, false + } + return o.Tracking, true +} + +// HasTracking returns a boolean if a field has been set. +func (o *TransferData) HasTracking() bool { + if o != nil && !common.IsNil(o.Tracking) { + return true + } + + return false +} + +// SetTracking gets a reference to the given TransferNotificationTransferTracking and assigns it to the Tracking field. +func (o *TransferData) SetTracking(v TransferNotificationTransferTracking) { + o.Tracking = &v +} + +// GetTransactionId returns the TransactionId field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetTransactionId() string { + if o == nil || common.IsNil(o.TransactionId) { + var ret string + return ret + } + return *o.TransactionId +} + +// GetTransactionIdOk returns a tuple with the TransactionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetTransactionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.TransactionId) { + return nil, false + } + return o.TransactionId, true +} + +// HasTransactionId returns a boolean if a field has been set. +func (o *TransferData) HasTransactionId() bool { + if o != nil && !common.IsNil(o.TransactionId) { + return true + } + + return false +} + +// SetTransactionId gets a reference to the given string and assigns it to the TransactionId field. +// Deprecated +func (o *TransferData) SetTransactionId(v string) { + o.TransactionId = &v +} + +// GetTransactionRulesResult returns the TransactionRulesResult field value if set, zero value otherwise. +func (o *TransferData) GetTransactionRulesResult() TransactionRulesResult { + if o == nil || common.IsNil(o.TransactionRulesResult) { + var ret TransactionRulesResult + return ret + } + return *o.TransactionRulesResult +} + +// GetTransactionRulesResultOk returns a tuple with the TransactionRulesResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetTransactionRulesResultOk() (*TransactionRulesResult, bool) { + if o == nil || common.IsNil(o.TransactionRulesResult) { + return nil, false + } + return o.TransactionRulesResult, true +} + +// HasTransactionRulesResult returns a boolean if a field has been set. +func (o *TransferData) HasTransactionRulesResult() bool { + if o != nil && !common.IsNil(o.TransactionRulesResult) { + return true + } + + return false +} + +// SetTransactionRulesResult gets a reference to the given TransactionRulesResult and assigns it to the TransactionRulesResult field. +func (o *TransferData) SetTransactionRulesResult(v TransactionRulesResult) { + o.TransactionRulesResult = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransferData) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TransferData) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TransferData) SetType(v string) { + o.Type = &v +} + +// GetValidationFacts returns the ValidationFacts field value if set, zero value otherwise. +// Deprecated +func (o *TransferData) GetValidationFacts() []TransferNotificationValidationFact { + if o == nil || common.IsNil(o.ValidationFacts) { + var ret []TransferNotificationValidationFact + return ret + } + return o.ValidationFacts +} + +// GetValidationFactsOk returns a tuple with the ValidationFacts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *TransferData) GetValidationFactsOk() ([]TransferNotificationValidationFact, bool) { + if o == nil || common.IsNil(o.ValidationFacts) { + return nil, false + } + return o.ValidationFacts, true +} + +// HasValidationFacts returns a boolean if a field has been set. +func (o *TransferData) HasValidationFacts() bool { + if o != nil && !common.IsNil(o.ValidationFacts) { + return true + } + + return false +} + +// SetValidationFacts gets a reference to the given []TransferNotificationValidationFact and assigns it to the ValidationFacts field. +// Deprecated +func (o *TransferData) SetValidationFacts(v []TransferNotificationValidationFact) { + o.ValidationFacts = v +} + +func (o TransferData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AccountHolder) { + toSerialize["accountHolder"] = o.AccountHolder + } + toSerialize["amount"] = o.Amount + if !common.IsNil(o.BalanceAccount) { + toSerialize["balanceAccount"] = o.BalanceAccount + } + if !common.IsNil(o.BalanceAccountId) { + toSerialize["balanceAccountId"] = o.BalanceAccountId + } + if !common.IsNil(o.BalancePlatform) { + toSerialize["balancePlatform"] = o.BalancePlatform + } + if !common.IsNil(o.Balances) { + toSerialize["balances"] = o.Balances + } + toSerialize["category"] = o.Category + if !common.IsNil(o.Counterparty) { + toSerialize["counterparty"] = o.Counterparty + } + if !common.IsNil(o.CreationDate) { + toSerialize["creationDate"] = o.CreationDate + } + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !common.IsNil(o.Direction) { + toSerialize["direction"] = o.Direction + } + if !common.IsNil(o.Events) { + toSerialize["events"] = o.Events + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.ModificationMerchantReference) { + toSerialize["modificationMerchantReference"] = o.ModificationMerchantReference + } + if !common.IsNil(o.ModificationPspReference) { + toSerialize["modificationPspReference"] = o.ModificationPspReference + } + if !common.IsNil(o.PanEntryMode) { + toSerialize["panEntryMode"] = o.PanEntryMode + } + if !common.IsNil(o.PaymentInstrument) { + toSerialize["paymentInstrument"] = o.PaymentInstrument + } + if !common.IsNil(o.PaymentInstrumentId) { + toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId + } + if !common.IsNil(o.PaymentMerchantReference) { + toSerialize["paymentMerchantReference"] = o.PaymentMerchantReference + } + if !common.IsNil(o.PlatformPaymentType) { + toSerialize["platformPaymentType"] = o.PlatformPaymentType + } + if !common.IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !common.IsNil(o.ProcessingType) { + toSerialize["processingType"] = o.ProcessingType + } + if !common.IsNil(o.PspPaymentReference) { + toSerialize["pspPaymentReference"] = o.PspPaymentReference + } + if !common.IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.ReferenceForBeneficiary) { + toSerialize["referenceForBeneficiary"] = o.ReferenceForBeneficiary + } + if !common.IsNil(o.RelayedAuthorisationData) { + toSerialize["relayedAuthorisationData"] = o.RelayedAuthorisationData + } + if !common.IsNil(o.SequenceNumber) { + toSerialize["sequenceNumber"] = o.SequenceNumber + } + toSerialize["status"] = o.Status + if !common.IsNil(o.Tracking) { + toSerialize["tracking"] = o.Tracking + } + if !common.IsNil(o.TransactionId) { + toSerialize["transactionId"] = o.TransactionId + } + if !common.IsNil(o.TransactionRulesResult) { + toSerialize["transactionRulesResult"] = o.TransactionRulesResult + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !common.IsNil(o.ValidationFacts) { + toSerialize["validationFacts"] = o.ValidationFacts + } + return toSerialize, nil +} + +type NullableTransferData struct { + value *TransferData + isSet bool +} + +func (v NullableTransferData) Get() *TransferData { + return v.value +} + +func (v *NullableTransferData) Set(val *TransferData) { + v.value = val + v.isSet = true +} + +func (v NullableTransferData) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferData(val *TransferData) *NullableTransferData { + return &NullableTransferData{value: val, isSet: true} +} + +func (v NullableTransferData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TransferData) isValidCategory() bool { + var allowedEnumValues = []string{"bank", "internal", "issuedCard", "platformPayment"} + for _, allowed := range allowedEnumValues { + if o.GetCategory() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidDirection() bool { + var allowedEnumValues = []string{"incoming", "outgoing"} + for _, allowed := range allowedEnumValues { + if o.GetDirection() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidPanEntryMode() bool { + var allowedEnumValues = []string{"chip", "cof", "contactless", "ecommerce", "magstripe", "manual", "token"} + for _, allowed := range allowedEnumValues { + if o.GetPanEntryMode() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidPlatformPaymentType() bool { + var allowedEnumValues = []string{"BalanceAccount", "Commission", "Default", "PaymentFee", "VAT"} + for _, allowed := range allowedEnumValues { + if o.GetPlatformPaymentType() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidPriority() bool { + var allowedEnumValues = []string{"crossBorder", "directDebit", "fast", "instant", "internal", "regular", "wire"} + for _, allowed := range allowedEnumValues { + if o.GetPriority() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidProcessingType() bool { + var allowedEnumValues = []string{"atmWithdraw", "balanceInquiry", "ecommerce", "moto", "pos", "purchaseWithCashback", "recurring", "token"} + for _, allowed := range allowedEnumValues { + if o.GetProcessingType() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidReason() bool { + var allowedEnumValues = []string{"amountLimitExceeded", "approved", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "error", "notEnoughBalance", "refusedByCounterpartyBank", "routeNotFound", "unknown"} + for _, allowed := range allowedEnumValues { + if o.GetReason() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidStatus() bool { + var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "capturedExternally", "chargeback", "chargebackExternally", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refundedExternally", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} +func (o *TransferData) isValidType() bool { + var allowedEnumValues = []string{"atmWithdrawal", "atmWithdrawalReversal", "balanceAdjustment", "balanceRollover", "bankTransfer", "capture", "captureReversal", "cardTransfer", "chargeback", "chargebackReversal", "depositCorrection", "fee", "grant", "installment", "installmentReversal", "internalTransfer", "invoiceDeduction", "leftover", "manualCorrection", "miscCost", "payment", "paymentCost", "refund", "refundReversal", "repayment", "reserveAdjustment", "secondChargeback"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transferwebhook/model_transfer_event.go b/src/transferwebhook/model_transfer_event.go index 312ea41e1..c812611b3 100644 --- a/src/transferwebhook/model_transfer_event.go +++ b/src/transferwebhook/model_transfer_event.go @@ -577,7 +577,7 @@ func (o *TransferEvent) isValidReason() bool { return false } func (o *TransferEvent) isValidStatus() bool { - var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "chargeback", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} + var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "capturedExternally", "chargeback", "chargebackExternally", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refundedExternally", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/transferwebhook/model_transfer_notification_request.go b/src/transferwebhook/model_transfer_notification_request.go index 8a77c77fc..e0d4c3c31 100644 --- a/src/transferwebhook/model_transfer_notification_request.go +++ b/src/transferwebhook/model_transfer_notification_request.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &TransferNotificationRequest{} // TransferNotificationRequest struct for TransferNotificationRequest type TransferNotificationRequest struct { - Data TransferNotificationData `json:"data"` + Data TransferData `json:"data"` // The environment from which the webhook originated. Possible values: **test**, **live**. Environment string `json:"environment"` // The type of webhook. @@ -30,7 +30,7 @@ type TransferNotificationRequest 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 NewTransferNotificationRequest(data TransferNotificationData, environment string) *TransferNotificationRequest { +func NewTransferNotificationRequest(data TransferData, environment string) *TransferNotificationRequest { this := TransferNotificationRequest{} this.Data = data this.Environment = environment @@ -46,9 +46,9 @@ func NewTransferNotificationRequestWithDefaults() *TransferNotificationRequest { } // GetData returns the Data field value -func (o *TransferNotificationRequest) GetData() TransferNotificationData { +func (o *TransferNotificationRequest) GetData() TransferData { if o == nil { - var ret TransferNotificationData + var ret TransferData return ret } @@ -57,7 +57,7 @@ func (o *TransferNotificationRequest) GetData() TransferNotificationData { // GetDataOk returns a tuple with the Data field value // and a boolean to check if the value has been set. -func (o *TransferNotificationRequest) GetDataOk() (*TransferNotificationData, bool) { +func (o *TransferNotificationRequest) GetDataOk() (*TransferData, bool) { if o == nil { return nil, false } @@ -65,7 +65,7 @@ func (o *TransferNotificationRequest) GetDataOk() (*TransferNotificationData, bo } // SetData sets field value -func (o *TransferNotificationRequest) SetData(v TransferNotificationData) { +func (o *TransferNotificationRequest) SetData(v TransferData) { o.Data = v }