From 69a6a72ad4b90a3e6794686910409fa038795434 Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:05:01 +0100 Subject: [PATCH] Update all services (#375) * [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted --------- Co-authored-by: AdyenAutomationBot --- src/acswebhook/.openapi-generator-ignore | 4 - src/balancecontrol/.openapi-generator-ignore | 4 - src/balancecontrol/api_general.go | 1 + .../.openapi-generator/VERSION | 2 +- src/balanceplatform/api_account_holders.go | 2 + src/balanceplatform/api_manage_card_pin.go | 3 +- src/balanceplatform/api_manage_sca_devices.go | 2 + .../api_payment_instruments.go | 2 +- src/balanceplatform/api_pin_functionality.go | 291 --- src/balanceplatform/client.go | 10 +- src/balanceplatform/model_json_object.go | 160 -- src/balanceplatform/model_json_path.go | 124 - .../model_payment_instrument_bank_account.go | 173 -- .../model_transfer_route_requirements.go | 203 -- src/binlookup/.openapi-generator-ignore | 4 - src/binlookup/.openapi-generator/VERSION | 2 +- src/checkout/.openapi-generator/VERSION | 2 +- src/checkout/api_classic_checkout_sdk.go | 146 -- src/checkout/api_modifications.go | 2 +- src/checkout/api_payments.go | 4 + src/checkout/api_recurring.go | 2 + src/checkout/client.go | 13 +- src/checkout/model_avs.go | 172 -- src/checkout/model_bank_account.go | 421 ---- src/checkout/model_card.go | 384 --- src/checkout/model_checkout_payment_method.go | 90 + src/checkout/model_configuration.go | 243 -- .../model_e_banking_finland_details.go | 202 ++ src/checkout/model_fund_recipient.go | 8 +- src/checkout/model_installments_number.go | 116 - src/checkout/model_mandate.go | 2 +- ...el_pay_by_bank_ais_direct_debit_details.go | 247 ++ src/checkout/model_payment_details.go | 2 +- src/checkout/model_payment_setup_request.go | 2187 ----------------- src/checkout/model_payment_setup_response.go | 166 -- .../model_payment_verification_request.go | 116 - .../model_payment_verification_response.go | 447 ---- src/checkout/model_recurring_detail.go | 544 ---- .../model_response_additional_data_card.go | 47 + ...el_secure_remote_commerce_checkout_data.go | 320 --- src/checkout/model_service_error_details.go | 232 -- src/checkout/model_shopper_input.go | 227 -- src/checkout/model_stored_details.go | 197 -- .../model_stored_payment_method_details.go | 2 +- src/checkout/model_three_ds_request_data.go | 4 +- src/checkout/model_twint_details.go | 291 +++ src/common/model_rest_service_error.go | 2 +- .../.openapi-generator-ignore | 7 - .../.openapi-generator/VERSION | 2 +- .../model_account_holder.go | 6 +- .../model_account_holder_capability.go | 2 +- .../model_account_holder_notification_data.go | 2 +- ...del_account_holder_notification_request.go | 2 +- ...el_account_supporting_entity_capability.go | 2 +- src/configurationwebhook/model_address.go | 2 +- src/configurationwebhook/model_amount.go | 2 +- .../model_authentication.go | 2 +- src/configurationwebhook/model_balance.go | 2 +- .../model_balance_account.go | 45 +- ...model_balance_account_notification_data.go | 2 +- ...el_balance_account_notification_request.go | 2 +- ..._balance_platform_notification_response.go | 2 +- .../model_bank_account_details.go | 2 +- .../model_bulk_address.go | 2 +- .../model_capability_problem.go | 2 +- .../model_capability_problem_entity.go | 2 +- ...del_capability_problem_entity_recursive.go | 2 +- .../model_capability_settings.go | 2 +- src/configurationwebhook/model_card.go | 18 +- .../model_card_configuration.go | 2 +- .../model_card_order_item.go | 2 +- .../model_card_order_item_delivery_status.go | 2 +- .../model_card_order_notification_request.go | 2 +- src/configurationwebhook/model_contact.go | 343 --- .../model_contact_details.go | 2 +- .../model_cron_sweep_schedule.go | 163 -- src/configurationwebhook/model_expiry.go | 2 +- .../model_iban_account_identification.go | 2 +- src/configurationwebhook/model_name.go | 2 +- .../model_payment_instrument.go | 97 +- ...onal_bank_account_identifications_inner.go | 2 +- .../model_payment_instrument_bank_account.go | 173 -- ...el_payment_instrument_notification_data.go | 2 +- .../model_payment_instrument_reference.go | 116 - .../model_payment_notification_request.go | 2 +- .../model_personal_data.go | 199 -- src/configurationwebhook/model_phone.go | 4 +- .../model_phone_number.go | 2 +- .../model_platform_payment_configuration.go | 2 +- .../model_remediating_action.go | 2 +- src/configurationwebhook/model_resource.go | 2 +- .../model_sweep_configuration.go | 459 ---- ...l_sweep_configuration_notification_data.go | 2 +- ...weep_configuration_notification_request.go | 2 +- .../model_sweep_configuration_schedule.go | 143 -- .../model_sweep_configuration_v2.go | 85 +- .../model_sweep_counterparty.go | 2 +- .../model_sweep_schedule.go | 2 +- .../model_uk_local_account_identification.go | 236 -- .../model_us_local_account_identification.go | 286 --- .../model_verification_deadline.go | 2 +- .../model_verification_error.go | 2 +- .../model_verification_error_recursive.go | 2 +- src/dataprotection/.openapi-generator-ignore | 4 - src/disputes/.openapi-generator-ignore | 4 - src/disputes/.openapi-generator/VERSION | 2 +- src/legalentity/.openapi-generator/VERSION | 2 +- src/legalentity/api_business_lines.go | 4 +- src/legalentity/api_documents.go | 8 +- src/legalentity/api_hosted_onboarding.go | 4 + src/legalentity/api_legal_entities.go | 4 +- src/legalentity/api_terms_of_service.go | 58 + src/legalentity/client.go | 10 +- .../model_accept_terms_of_service_response.go | 4 +- ...pted_terms_of_service_document_response.go | 246 ++ ...l_get_terms_of_service_document_request.go | 4 +- ..._get_terms_of_service_document_response.go | 4 +- .../model_terms_of_service_acceptance_info.go | 4 +- .../api_android_files_company_level.go | 1 + .../api_payment_methods_merchant_level.go | 6 + .../api_terminal_orders_company_level.go | 3 +- .../api_terminal_orders_merchant_level.go | 3 +- src/management/api_users_company_level.go | 4 + src/management/api_users_merchant_level.go | 4 + src/management/client.go | 10 +- src/management/model_json_object.go | 160 -- src/management/model_json_path.go | 124 - .../.openapi-generator-ignore | 4 - .../model_notification_data_message.go | 200 -- src/payments/.openapi-generator/VERSION | 2 +- src/payments/api_modifications.go | 10 +- src/payments/client.go | 10 +- .../model_response_additional_data_card.go | 47 + src/payout/.openapi-generator/VERSION | 2 +- src/payout/api_initialization.go | 3 + src/payout/api_instant_payouts.go | 1 + src/payout/api_reviewing.go | 2 + src/payout/client.go | 10 +- .../.openapi-generator-ignore | 4 - .../.openapi-generator/VERSION | 2 +- src/recurring/.openapi-generator-ignore | 4 - src/recurring/.openapi-generator/VERSION | 2 +- src/reportwebhook/.openapi-generator-ignore | 7 - src/reportwebhook/.openapi-generator/VERSION | 2 +- src/storedvalue/.openapi-generator-ignore | 4 - src/storedvalue/.openapi-generator/VERSION | 2 +- src/storedvalue/api_general.go | 2 +- .../.openapi-generator-ignore | 7 - ..._balance_platform_notification_response.go | 2 +- .../model_bank_category_data.go | 185 ++ .../model_internal_category_data.go | 213 ++ src/transactionwebhook/model_issued_card.go | 415 ++++ .../model_payment_instrument.go | 236 ++ .../model_platform_payment.go | 333 +++ .../model_relayed_authorisation_data.go | 162 ++ src/transactionwebhook/model_transaction.go | 124 +- src/transactionwebhook/model_transfer_data.go | 153 -- ...l_transfer_notification_validation_fact.go | 162 ++ src/transactionwebhook/model_transfer_view.go | 189 ++ .../model_transfer_view_category_data.go | 203 ++ src/transfers/api_capital.go | 10 + src/transfers/api_transactions.go | 2 + src/transfers/api_transfers.go | 42 + src/transfers/client.go | 10 +- src/transfers/model_json_object.go | 160 -- src/transfers/model_json_path.go | 124 - ...transfer_notification_transfer_tracking.go | 173 -- src/transferwebhook/.openapi-generator-ignore | 7 - .../.openapi-generator/VERSION | 2 +- src/transferwebhook/client.go | 34 - .../model_transfer_notification_data.go | 1388 ----------- ...transfer_notification_transfer_tracking.go | 173 -- .../model_transfer_operation.go | 199 -- 173 files changed, 3856 insertions(+), 12134 deletions(-) delete mode 100644 src/acswebhook/.openapi-generator-ignore delete mode 100644 src/balancecontrol/.openapi-generator-ignore delete mode 100644 src/balanceplatform/api_pin_functionality.go delete mode 100644 src/balanceplatform/model_json_object.go delete mode 100644 src/balanceplatform/model_json_path.go delete mode 100644 src/balanceplatform/model_payment_instrument_bank_account.go delete mode 100644 src/balanceplatform/model_transfer_route_requirements.go delete mode 100644 src/binlookup/.openapi-generator-ignore delete mode 100644 src/checkout/api_classic_checkout_sdk.go delete mode 100644 src/checkout/model_avs.go delete mode 100644 src/checkout/model_bank_account.go delete mode 100644 src/checkout/model_card.go delete mode 100644 src/checkout/model_configuration.go create mode 100644 src/checkout/model_e_banking_finland_details.go delete mode 100644 src/checkout/model_installments_number.go create mode 100644 src/checkout/model_pay_by_bank_ais_direct_debit_details.go delete mode 100644 src/checkout/model_payment_setup_request.go delete mode 100644 src/checkout/model_payment_setup_response.go delete mode 100644 src/checkout/model_payment_verification_request.go delete mode 100644 src/checkout/model_payment_verification_response.go delete mode 100644 src/checkout/model_recurring_detail.go delete mode 100644 src/checkout/model_secure_remote_commerce_checkout_data.go delete mode 100644 src/checkout/model_service_error_details.go delete mode 100644 src/checkout/model_shopper_input.go delete mode 100644 src/checkout/model_stored_details.go create mode 100644 src/checkout/model_twint_details.go delete mode 100644 src/configurationwebhook/.openapi-generator-ignore delete mode 100644 src/configurationwebhook/model_contact.go delete mode 100644 src/configurationwebhook/model_cron_sweep_schedule.go delete mode 100644 src/configurationwebhook/model_payment_instrument_bank_account.go delete mode 100644 src/configurationwebhook/model_payment_instrument_reference.go delete mode 100644 src/configurationwebhook/model_personal_data.go delete mode 100644 src/configurationwebhook/model_sweep_configuration.go delete mode 100644 src/configurationwebhook/model_sweep_configuration_schedule.go delete mode 100644 src/configurationwebhook/model_uk_local_account_identification.go delete mode 100644 src/configurationwebhook/model_us_local_account_identification.go delete mode 100644 src/dataprotection/.openapi-generator-ignore delete mode 100644 src/disputes/.openapi-generator-ignore create mode 100644 src/legalentity/model_get_accepted_terms_of_service_document_response.go delete mode 100644 src/management/model_json_object.go delete mode 100644 src/management/model_json_path.go delete mode 100644 src/managementwebhook/.openapi-generator-ignore delete mode 100644 src/managementwebhook/model_notification_data_message.go delete mode 100644 src/posterminalmanagement/.openapi-generator-ignore delete mode 100644 src/recurring/.openapi-generator-ignore delete mode 100644 src/reportwebhook/.openapi-generator-ignore delete mode 100644 src/storedvalue/.openapi-generator-ignore delete mode 100644 src/transactionwebhook/.openapi-generator-ignore create mode 100644 src/transactionwebhook/model_bank_category_data.go create mode 100644 src/transactionwebhook/model_internal_category_data.go create mode 100644 src/transactionwebhook/model_issued_card.go create mode 100644 src/transactionwebhook/model_payment_instrument.go create mode 100644 src/transactionwebhook/model_platform_payment.go create mode 100644 src/transactionwebhook/model_relayed_authorisation_data.go delete mode 100644 src/transactionwebhook/model_transfer_data.go create mode 100644 src/transactionwebhook/model_transfer_notification_validation_fact.go create mode 100644 src/transactionwebhook/model_transfer_view.go create mode 100644 src/transactionwebhook/model_transfer_view_category_data.go delete mode 100644 src/transfers/model_json_object.go delete mode 100644 src/transfers/model_json_path.go delete mode 100644 src/transfers/model_transfer_notification_transfer_tracking.go delete mode 100644 src/transferwebhook/.openapi-generator-ignore delete mode 100644 src/transferwebhook/client.go delete mode 100644 src/transferwebhook/model_transfer_notification_data.go delete mode 100644 src/transferwebhook/model_transfer_notification_transfer_tracking.go delete mode 100644 src/transferwebhook/model_transfer_operation.go diff --git a/src/acswebhook/.openapi-generator-ignore b/src/acswebhook/.openapi-generator-ignore deleted file mode 100644 index f9ed3959e..000000000 --- a/src/acswebhook/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go diff --git a/src/balancecontrol/.openapi-generator-ignore b/src/balancecontrol/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/balancecontrol/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/balancecontrol/api_general.go b/src/balancecontrol/api_general.go index 313fe9c56..bbfaf9559 100644 --- a/src/balancecontrol/api_general.go +++ b/src/balancecontrol/api_general.go @@ -51,6 +51,7 @@ Starts a balance transfer request between merchant accounts. The following condi When sending multiple API requests with the same source and destination merchant accounts, send the requests sequentially and *not* in parallel. Some requests may not be processed if the requests are sent in parallel. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiBalanceTransferInput - Request parameters, see BalanceTransferInput @return BalanceTransferResponse, *http.Response, error diff --git a/src/balanceplatform/.openapi-generator/VERSION b/src/balanceplatform/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/balanceplatform/.openapi-generator/VERSION +++ b/src/balanceplatform/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/balanceplatform/api_account_holders.go b/src/balanceplatform/api_account_holders.go index ed8adb391..49379f671 100644 --- a/src/balanceplatform/api_account_holders.go +++ b/src/balanceplatform/api_account_holders.go @@ -46,6 +46,8 @@ CreateAccountHolder Create an account holder Creates an account holder linked to a [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r AccountHoldersApiCreateAccountHolderInput - Request parameters, see CreateAccountHolderInput @return AccountHolder, *http.Response, error diff --git a/src/balanceplatform/api_manage_card_pin.go b/src/balanceplatform/api_manage_card_pin.go index 1af3a32d9..42f215d24 100644 --- a/src/balanceplatform/api_manage_card_pin.go +++ b/src/balanceplatform/api_manage_card_pin.go @@ -141,8 +141,7 @@ PublicKey Get an RSA public key Get an [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) public key to encrypt or decrypt card data. - You need the RSA public key to generate the `encryptedKey` required to: - + You need the RSA public key to generate the `encryptedKey` required to: - [Change a PIN](https://docs.adyen.com/api-explorer/balanceplatform/2/post/pins/change). - [Reveal a PIN](https://docs.adyen.com/api-explorer/balanceplatform/2/post/pins/reveal). - [Reveal a PAN](https://docs.adyen.com/api-explorer/balanceplatform/2/post/paymentInstruments/reveal). diff --git a/src/balanceplatform/api_manage_sca_devices.go b/src/balanceplatform/api_manage_sca_devices.go index 735039eee..e26ff59cc 100644 --- a/src/balanceplatform/api_manage_sca_devices.go +++ b/src/balanceplatform/api_manage_sca_devices.go @@ -49,6 +49,8 @@ CompleteRegistrationOfScaDevice Complete the registration of an SCA device Completes the registration of an SCA device by validating the authentication data of the device. You can register SCA devices for [business accounts](https://docs.adyen.com/platforms/business-accounts/sca) or [Adyen-issued cards](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ManageSCADevicesApiCompleteRegistrationOfScaDeviceInput - Request parameters, see CompleteRegistrationOfScaDeviceInput @return RegisterSCAFinalResponse, *http.Response, error diff --git a/src/balanceplatform/api_payment_instruments.go b/src/balanceplatform/api_payment_instruments.go index 40a2df00f..74b46bbab 100644 --- a/src/balanceplatform/api_payment_instruments.go +++ b/src/balanceplatform/api_payment_instruments.go @@ -46,7 +46,7 @@ CreatePaymentInstrument Create a payment instrument Creates a payment instrument to issue a physical card, a virtual card, or a business account to your user. - For more information, refer to [Issue cards](https://docs.adyen.com/issuing/create-cards) or [Issue business accounts](https://docs.adyen.com/platforms/business-accounts). + For more information, refer to [Issue cards](https://docs.adyen.com/issuing/create-cards) or [Issue business accounts](https://docs.adyen.com/platforms/business-accounts). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentInstrumentsApiCreatePaymentInstrumentInput - Request parameters, see CreatePaymentInstrumentInput diff --git a/src/balanceplatform/api_pin_functionality.go b/src/balanceplatform/api_pin_functionality.go deleted file mode 100644 index ac9e690f2..000000000 --- a/src/balanceplatform/api_pin_functionality.go +++ /dev/null @@ -1,291 +0,0 @@ -/* -Configuration API - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package balanceplatform - -import ( - "context" - "encoding/json" - "io/ioutil" - "net/http" - "net/url" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// PINFunctionalityApi service -type PINFunctionalityApi common.Service - -// All parameters accepted by PINFunctionalityApi.ChangePin -type PINFunctionalityApiChangePinInput struct { - pinChangeRequest *PinChangeRequest -} - -func (r PINFunctionalityApiChangePinInput) PinChangeRequest(pinChangeRequest PinChangeRequest) PINFunctionalityApiChangePinInput { - r.pinChangeRequest = &pinChangeRequest - return r -} - -/* -Prepare a request for ChangePin - -@return PINFunctionalityApiChangePinInput -*/ -func (a *PINFunctionalityApi) ChangePinInput() PINFunctionalityApiChangePinInput { - return PINFunctionalityApiChangePinInput{} -} - -/* -ChangePin Change Pin - -Change Pin - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r PINFunctionalityApiChangePinInput - Request parameters, see ChangePinInput -@return PinChangeResponse, *http.Response, error -*/ -func (a *PINFunctionalityApi) ChangePin(ctx context.Context, r PINFunctionalityApiChangePinInput) (PinChangeResponse, *http.Response, error) { - res := &PinChangeResponse{} - path := "/pins/change" - queryParams := url.Values{} - headerParams := make(map[string]string) - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - r.pinChangeRequest, - res, - http.MethodPost, - a.BasePath()+path, - queryParams, - headerParams, - ) - - if httpRes == nil { - return *res, httpRes, err - } - - var serviceError common.RestServiceError - 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 PINFunctionalityApi.GetRsaPublickey -type PINFunctionalityApiGetRsaPublickeyInput struct { - purpose *string - format *string -} - -// Purpose of publicKey. -func (r PINFunctionalityApiGetRsaPublickeyInput) Purpose(purpose string) PINFunctionalityApiGetRsaPublickeyInput { - r.purpose = &purpose - return r -} - -// Format of publicKey. -func (r PINFunctionalityApiGetRsaPublickeyInput) Format(format string) PINFunctionalityApiGetRsaPublickeyInput { - r.format = &format - return r -} - -/* -Prepare a request for GetRsaPublickey - -@return PINFunctionalityApiGetRsaPublickeyInput -*/ -func (a *PINFunctionalityApi) GetRsaPublickeyInput() PINFunctionalityApiGetRsaPublickeyInput { - return PINFunctionalityApiGetRsaPublickeyInput{} -} - -/* -GetRsaPublickey Get RSA publicKey - -Get RSA publicKey - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r PINFunctionalityApiGetRsaPublickeyInput - Request parameters, see GetRsaPublickeyInput -@return PublicKeyResponse, *http.Response, error -*/ -func (a *PINFunctionalityApi) GetRsaPublickey(ctx context.Context, r PINFunctionalityApiGetRsaPublickeyInput) (PublicKeyResponse, *http.Response, error) { - res := &PublicKeyResponse{} - path := "/pins/publicKey" - queryParams := url.Values{} - headerParams := make(map[string]string) - if r.purpose != nil { - common.ParameterAddToQuery(queryParams, "purpose", r.purpose, "") - } - if r.format != nil { - common.ParameterAddToQuery(queryParams, "format", r.format, "") - } - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - nil, - res, - http.MethodGet, - a.BasePath()+path, - queryParams, - headerParams, - ) - - if httpRes == nil { - return *res, httpRes, err - } - - var serviceError common.RestServiceError - 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 PINFunctionalityApi.RevealPin -type PINFunctionalityApiRevealPinInput struct { - revealPinRequest *RevealPinRequest -} - -func (r PINFunctionalityApiRevealPinInput) RevealPinRequest(revealPinRequest RevealPinRequest) PINFunctionalityApiRevealPinInput { - r.revealPinRequest = &revealPinRequest - return r -} - -/* -Prepare a request for RevealPin - -@return PINFunctionalityApiRevealPinInput -*/ -func (a *PINFunctionalityApi) RevealPinInput() PINFunctionalityApiRevealPinInput { - return PINFunctionalityApiRevealPinInput{} -} - -/* -RevealPin Reveal Pin - -Reveal Pin - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r PINFunctionalityApiRevealPinInput - Request parameters, see RevealPinInput -@return RevealPinResponse, *http.Response, error -*/ -func (a *PINFunctionalityApi) RevealPin(ctx context.Context, r PINFunctionalityApiRevealPinInput) (RevealPinResponse, *http.Response, error) { - res := &RevealPinResponse{} - path := "/pins/reveal" - queryParams := url.Values{} - headerParams := make(map[string]string) - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - r.revealPinRequest, - res, - http.MethodPost, - a.BasePath()+path, - queryParams, - headerParams, - ) - - if httpRes == nil { - return *res, httpRes, err - } - - var serviceError common.RestServiceError - 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/balanceplatform/client.go b/src/balanceplatform/client.go index a82e24f54..421d90a25 100644 --- a/src/balanceplatform/client.go +++ b/src/balanceplatform/client.go @@ -9,7 +9,7 @@ API version: 2 package balanceplatform import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Configuration API API v2 @@ -51,10 +51,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.BalancePlatformEndpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.BalancePlatformEndpoint + } // API Services c.AccountHoldersApi = (*AccountHoldersApi)(&c.common) diff --git a/src/balanceplatform/model_json_object.go b/src/balanceplatform/model_json_object.go deleted file mode 100644 index 72a022846..000000000 --- a/src/balanceplatform/model_json_object.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Configuration API - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package balanceplatform - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONObject type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONObject{} - -// JSONObject struct for JSONObject -type JSONObject struct { - Paths []JSONPath `json:"paths,omitempty"` - RootPath *JSONPath `json:"rootPath,omitempty"` -} - -// NewJSONObject instantiates a new JSONObject 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 NewJSONObject() *JSONObject { - this := JSONObject{} - return &this -} - -// NewJSONObjectWithDefaults instantiates a new JSONObject 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 NewJSONObjectWithDefaults() *JSONObject { - this := JSONObject{} - return &this -} - -// GetPaths returns the Paths field value if set, zero value otherwise. -func (o *JSONObject) GetPaths() []JSONPath { - if o == nil || common.IsNil(o.Paths) { - var ret []JSONPath - return ret - } - return o.Paths -} - -// 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) { - if o == nil || common.IsNil(o.Paths) { - return nil, false - } - return o.Paths, true -} - -// HasPaths returns a boolean if a field has been set. -func (o *JSONObject) HasPaths() bool { - if o != nil && !common.IsNil(o.Paths) { - return true - } - - return false -} - -// SetPaths gets a reference to the given []JSONPath and assigns it to the Paths field. -func (o *JSONObject) SetPaths(v []JSONPath) { - o.Paths = v -} - -// GetRootPath returns the RootPath field value if set, zero value otherwise. -func (o *JSONObject) GetRootPath() JSONPath { - if o == nil || common.IsNil(o.RootPath) { - var ret JSONPath - return ret - } - return *o.RootPath -} - -// GetRootPathOk returns a tuple with the RootPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONObject) GetRootPathOk() (*JSONPath, bool) { - if o == nil || common.IsNil(o.RootPath) { - return nil, false - } - return o.RootPath, true -} - -// HasRootPath returns a boolean if a field has been set. -func (o *JSONObject) HasRootPath() bool { - if o != nil && !common.IsNil(o.RootPath) { - return true - } - - return false -} - -// SetRootPath gets a reference to the given JSONPath and assigns it to the RootPath field. -func (o *JSONObject) SetRootPath(v JSONPath) { - o.RootPath = &v -} - -func (o JSONObject) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONObject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Paths) { - toSerialize["paths"] = o.Paths - } - if !common.IsNil(o.RootPath) { - toSerialize["rootPath"] = o.RootPath - } - return toSerialize, nil -} - -type NullableJSONObject struct { - value *JSONObject - isSet bool -} - -func (v NullableJSONObject) Get() *JSONObject { - return v.value -} - -func (v *NullableJSONObject) Set(val *JSONObject) { - v.value = val - v.isSet = true -} - -func (v NullableJSONObject) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONObject(val *JSONObject) *NullableJSONObject { - return &NullableJSONObject{value: val, isSet: true} -} - -func (v NullableJSONObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONObject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/balanceplatform/model_json_path.go b/src/balanceplatform/model_json_path.go deleted file mode 100644 index acf4b7bd0..000000000 --- a/src/balanceplatform/model_json_path.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Configuration API - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package balanceplatform - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONPath type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONPath{} - -// JSONPath struct for JSONPath -type JSONPath struct { - Content []string `json:"content,omitempty"` -} - -// NewJSONPath instantiates a new JSONPath 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 NewJSONPath() *JSONPath { - this := JSONPath{} - return &this -} - -// NewJSONPathWithDefaults instantiates a new JSONPath 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 NewJSONPathWithDefaults() *JSONPath { - this := JSONPath{} - return &this -} - -// GetContent returns the Content field value if set, zero value otherwise. -func (o *JSONPath) GetContent() []string { - if o == nil || common.IsNil(o.Content) { - var ret []string - return ret - } - return o.Content -} - -// GetContentOk returns a tuple with the Content field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONPath) GetContentOk() ([]string, bool) { - if o == nil || common.IsNil(o.Content) { - return nil, false - } - return o.Content, true -} - -// HasContent returns a boolean if a field has been set. -func (o *JSONPath) HasContent() bool { - if o != nil && !common.IsNil(o.Content) { - return true - } - - return false -} - -// SetContent gets a reference to the given []string and assigns it to the Content field. -func (o *JSONPath) SetContent(v []string) { - o.Content = v -} - -func (o JSONPath) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONPath) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Content) { - toSerialize["content"] = o.Content - } - return toSerialize, nil -} - -type NullableJSONPath struct { - value *JSONPath - isSet bool -} - -func (v NullableJSONPath) Get() *JSONPath { - return v.value -} - -func (v *NullableJSONPath) Set(val *JSONPath) { - v.value = val - v.isSet = true -} - -func (v NullableJSONPath) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONPath) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONPath(val *JSONPath) *NullableJSONPath { - return &NullableJSONPath{value: val, isSet: true} -} - -func (v NullableJSONPath) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONPath) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/balanceplatform/model_payment_instrument_bank_account.go b/src/balanceplatform/model_payment_instrument_bank_account.go deleted file mode 100644 index c6b107f87..000000000 --- a/src/balanceplatform/model_payment_instrument_bank_account.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Configuration API - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package balanceplatform - -import ( - "encoding/json" - "fmt" -) - -// PaymentInstrumentBankAccount - Contains the business account details. Returned when you create a payment instrument with `type` **bankAccount**. -type PaymentInstrumentBankAccount struct { - IbanAccountIdentification *IbanAccountIdentification - UKLocalAccountIdentification *UKLocalAccountIdentification - USLocalAccountIdentification *USLocalAccountIdentification -} - -// IbanAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns IbanAccountIdentification wrapped in PaymentInstrumentBankAccount -func IbanAccountIdentificationAsPaymentInstrumentBankAccount(v *IbanAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - IbanAccountIdentification: v, - } -} - -// UKLocalAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns UKLocalAccountIdentification wrapped in PaymentInstrumentBankAccount -func UKLocalAccountIdentificationAsPaymentInstrumentBankAccount(v *UKLocalAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - UKLocalAccountIdentification: v, - } -} - -// USLocalAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns USLocalAccountIdentification wrapped in PaymentInstrumentBankAccount -func USLocalAccountIdentificationAsPaymentInstrumentBankAccount(v *USLocalAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - USLocalAccountIdentification: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *PaymentInstrumentBankAccount) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into IbanAccountIdentification - err = json.Unmarshal(data, &dst.IbanAccountIdentification) - if err == nil { - jsonIbanAccountIdentification, _ := json.Marshal(dst.IbanAccountIdentification) - if string(jsonIbanAccountIdentification) == "{}" || !dst.IbanAccountIdentification.isValidType() { // empty struct - dst.IbanAccountIdentification = nil - } else { - match++ - } - } else { - dst.IbanAccountIdentification = nil - } - - // try to unmarshal data into UKLocalAccountIdentification - err = json.Unmarshal(data, &dst.UKLocalAccountIdentification) - if err == nil { - jsonUKLocalAccountIdentification, _ := json.Marshal(dst.UKLocalAccountIdentification) - if string(jsonUKLocalAccountIdentification) == "{}" || !dst.UKLocalAccountIdentification.isValidType() { // empty struct - dst.UKLocalAccountIdentification = nil - } else { - match++ - } - } else { - dst.UKLocalAccountIdentification = nil - } - - // try to unmarshal data into USLocalAccountIdentification - err = json.Unmarshal(data, &dst.USLocalAccountIdentification) - if err == nil { - jsonUSLocalAccountIdentification, _ := json.Marshal(dst.USLocalAccountIdentification) - if string(jsonUSLocalAccountIdentification) == "{}" || !dst.USLocalAccountIdentification.isValidType() { // empty struct - dst.USLocalAccountIdentification = nil - } else { - match++ - } - } else { - dst.USLocalAccountIdentification = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.IbanAccountIdentification = nil - dst.UKLocalAccountIdentification = nil - dst.USLocalAccountIdentification = nil - - return fmt.Errorf("data matches more than one schema in oneOf(PaymentInstrumentBankAccount)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(PaymentInstrumentBankAccount)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PaymentInstrumentBankAccount) MarshalJSON() ([]byte, error) { - if src.IbanAccountIdentification != nil { - return json.Marshal(&src.IbanAccountIdentification) - } - - if src.UKLocalAccountIdentification != nil { - return json.Marshal(&src.UKLocalAccountIdentification) - } - - if src.USLocalAccountIdentification != nil { - return json.Marshal(&src.USLocalAccountIdentification) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *PaymentInstrumentBankAccount) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.IbanAccountIdentification != nil { - return obj.IbanAccountIdentification - } - - if obj.UKLocalAccountIdentification != nil { - return obj.UKLocalAccountIdentification - } - - if obj.USLocalAccountIdentification != nil { - return obj.USLocalAccountIdentification - } - - // all schemas are nil - return nil -} - -type NullablePaymentInstrumentBankAccount struct { - value *PaymentInstrumentBankAccount - isSet bool -} - -func (v NullablePaymentInstrumentBankAccount) Get() *PaymentInstrumentBankAccount { - return v.value -} - -func (v *NullablePaymentInstrumentBankAccount) Set(val *PaymentInstrumentBankAccount) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentInstrumentBankAccount) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentInstrumentBankAccount) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentInstrumentBankAccount(val *PaymentInstrumentBankAccount) *NullablePaymentInstrumentBankAccount { - return &NullablePaymentInstrumentBankAccount{value: val, isSet: true} -} - -func (v NullablePaymentInstrumentBankAccount) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentInstrumentBankAccount) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/balanceplatform/model_transfer_route_requirements.go b/src/balanceplatform/model_transfer_route_requirements.go deleted file mode 100644 index 052b22446..000000000 --- a/src/balanceplatform/model_transfer_route_requirements.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Configuration API - -API version: 2 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package balanceplatform - -import ( - "encoding/json" - "fmt" -) - -// TransferRouteRequirements - A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`. -type TransferRouteRequirements struct { - AddressRequirement *AddressRequirement - AmountMinMaxRequirement *AmountMinMaxRequirement - BankAccountIdentificationTypeRequirement *BankAccountIdentificationTypeRequirement - PaymentInstrumentRequirement *PaymentInstrumentRequirement -} - -// AddressRequirementAsTransferRouteRequirements is a convenience function that returns AddressRequirement wrapped in TransferRouteRequirements -func AddressRequirementAsTransferRouteRequirements(v *AddressRequirement) TransferRouteRequirements { - return TransferRouteRequirements{ - AddressRequirement: v, - } -} - -// AmountMinMaxRequirementAsTransferRouteRequirements is a convenience function that returns AmountMinMaxRequirement wrapped in TransferRouteRequirements -func AmountMinMaxRequirementAsTransferRouteRequirements(v *AmountMinMaxRequirement) TransferRouteRequirements { - return TransferRouteRequirements{ - AmountMinMaxRequirement: v, - } -} - -// BankAccountIdentificationTypeRequirementAsTransferRouteRequirements is a convenience function that returns BankAccountIdentificationTypeRequirement wrapped in TransferRouteRequirements -func BankAccountIdentificationTypeRequirementAsTransferRouteRequirements(v *BankAccountIdentificationTypeRequirement) TransferRouteRequirements { - return TransferRouteRequirements{ - BankAccountIdentificationTypeRequirement: v, - } -} - -// PaymentInstrumentRequirementAsTransferRouteRequirements is a convenience function that returns PaymentInstrumentRequirement wrapped in TransferRouteRequirements -func PaymentInstrumentRequirementAsTransferRouteRequirements(v *PaymentInstrumentRequirement) TransferRouteRequirements { - return TransferRouteRequirements{ - PaymentInstrumentRequirement: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *TransferRouteRequirements) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into AddressRequirement - err = json.Unmarshal(data, &dst.AddressRequirement) - if err == nil { - jsonAddressRequirement, _ := json.Marshal(dst.AddressRequirement) - if string(jsonAddressRequirement) == "{}" || !dst.AddressRequirement.isValidType() { // empty struct - dst.AddressRequirement = nil - } else { - match++ - } - } else { - dst.AddressRequirement = nil - } - - // try to unmarshal data into AmountMinMaxRequirement - err = json.Unmarshal(data, &dst.AmountMinMaxRequirement) - if err == nil { - jsonAmountMinMaxRequirement, _ := json.Marshal(dst.AmountMinMaxRequirement) - if string(jsonAmountMinMaxRequirement) == "{}" || !dst.AmountMinMaxRequirement.isValidType() { // empty struct - dst.AmountMinMaxRequirement = nil - } else { - match++ - } - } else { - dst.AmountMinMaxRequirement = nil - } - - // try to unmarshal data into BankAccountIdentificationTypeRequirement - err = json.Unmarshal(data, &dst.BankAccountIdentificationTypeRequirement) - if err == nil { - jsonBankAccountIdentificationTypeRequirement, _ := json.Marshal(dst.BankAccountIdentificationTypeRequirement) - if string(jsonBankAccountIdentificationTypeRequirement) == "{}" || !dst.BankAccountIdentificationTypeRequirement.isValidType() { // empty struct - dst.BankAccountIdentificationTypeRequirement = nil - } else { - match++ - } - } else { - dst.BankAccountIdentificationTypeRequirement = nil - } - - // try to unmarshal data into PaymentInstrumentRequirement - err = json.Unmarshal(data, &dst.PaymentInstrumentRequirement) - if err == nil { - jsonPaymentInstrumentRequirement, _ := json.Marshal(dst.PaymentInstrumentRequirement) - if string(jsonPaymentInstrumentRequirement) == "{}" || !dst.PaymentInstrumentRequirement.isValidType() { // empty struct - dst.PaymentInstrumentRequirement = nil - } else { - match++ - } - } else { - dst.PaymentInstrumentRequirement = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.AddressRequirement = nil - dst.AmountMinMaxRequirement = nil - dst.BankAccountIdentificationTypeRequirement = nil - dst.PaymentInstrumentRequirement = nil - - return fmt.Errorf("data matches more than one schema in oneOf(TransferRouteRequirements)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(TransferRouteRequirements)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src TransferRouteRequirements) MarshalJSON() ([]byte, error) { - if src.AddressRequirement != nil { - return json.Marshal(&src.AddressRequirement) - } - - if src.AmountMinMaxRequirement != nil { - return json.Marshal(&src.AmountMinMaxRequirement) - } - - if src.BankAccountIdentificationTypeRequirement != nil { - return json.Marshal(&src.BankAccountIdentificationTypeRequirement) - } - - if src.PaymentInstrumentRequirement != nil { - return json.Marshal(&src.PaymentInstrumentRequirement) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *TransferRouteRequirements) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.AddressRequirement != nil { - return obj.AddressRequirement - } - - if obj.AmountMinMaxRequirement != nil { - return obj.AmountMinMaxRequirement - } - - if obj.BankAccountIdentificationTypeRequirement != nil { - return obj.BankAccountIdentificationTypeRequirement - } - - if obj.PaymentInstrumentRequirement != nil { - return obj.PaymentInstrumentRequirement - } - - // all schemas are nil - return nil -} - -type NullableTransferRouteRequirements struct { - value *TransferRouteRequirements - isSet bool -} - -func (v NullableTransferRouteRequirements) Get() *TransferRouteRequirements { - return v.value -} - -func (v *NullableTransferRouteRequirements) Set(val *TransferRouteRequirements) { - v.value = val - v.isSet = true -} - -func (v NullableTransferRouteRequirements) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferRouteRequirements) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferRouteRequirements(val *TransferRouteRequirements) *NullableTransferRouteRequirements { - return &NullableTransferRouteRequirements{value: val, isSet: true} -} - -func (v NullableTransferRouteRequirements) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferRouteRequirements) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/binlookup/.openapi-generator-ignore b/src/binlookup/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/binlookup/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/binlookup/.openapi-generator/VERSION b/src/binlookup/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/binlookup/.openapi-generator/VERSION +++ b/src/binlookup/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/checkout/.openapi-generator/VERSION b/src/checkout/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/checkout/.openapi-generator/VERSION +++ b/src/checkout/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/checkout/api_classic_checkout_sdk.go b/src/checkout/api_classic_checkout_sdk.go deleted file mode 100644 index 03389d7be..000000000 --- a/src/checkout/api_classic_checkout_sdk.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "context" - "net/http" - "net/url" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// ClassicCheckoutSDKApi service -type ClassicCheckoutSDKApi common.Service - -// All parameters accepted by ClassicCheckoutSDKApi.PaymentSession -type ClassicCheckoutSDKApiPaymentSessionInput struct { - idempotencyKey *string - paymentSetupRequest *PaymentSetupRequest -} - -// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). -func (r ClassicCheckoutSDKApiPaymentSessionInput) IdempotencyKey(idempotencyKey string) ClassicCheckoutSDKApiPaymentSessionInput { - r.idempotencyKey = &idempotencyKey - return r -} - -func (r ClassicCheckoutSDKApiPaymentSessionInput) PaymentSetupRequest(paymentSetupRequest PaymentSetupRequest) ClassicCheckoutSDKApiPaymentSessionInput { - r.paymentSetupRequest = &paymentSetupRequest - return r -} - -/* -Prepare a request for PaymentSession - -@return ClassicCheckoutSDKApiPaymentSessionInput - -Deprecated since Adyen Checkout API v37 -*/ -func (a *ClassicCheckoutSDKApi) PaymentSessionInput() ClassicCheckoutSDKApiPaymentSessionInput { - return ClassicCheckoutSDKApiPaymentSessionInput{} -} - -/* -PaymentSession Create a payment session - -Provides the data object that can be used to start the Checkout SDK. To set up the payment, pass its amount, currency, and other required parameters. We use this to optimise the payment flow and perform better risk assessment of the transaction. - -For more information, refer to [How it works](https://docs.adyen.com/online-payments#howitworks). - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r ClassicCheckoutSDKApiPaymentSessionInput - Request parameters, see PaymentSessionInput -@return PaymentSetupResponse, *http.Response, error - -Deprecated since Adyen Checkout API v37 -*/ -func (a *ClassicCheckoutSDKApi) PaymentSession(ctx context.Context, r ClassicCheckoutSDKApiPaymentSessionInput) (PaymentSetupResponse, *http.Response, error) { - res := &PaymentSetupResponse{} - path := "/paymentSession" - queryParams := url.Values{} - headerParams := make(map[string]string) - if r.idempotencyKey != nil { - common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") - } - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - r.paymentSetupRequest, - res, - http.MethodPost, - a.BasePath()+path, - queryParams, - headerParams, - ) - - return *res, httpRes, err -} - -// All parameters accepted by ClassicCheckoutSDKApi.VerifyPaymentResult -type ClassicCheckoutSDKApiVerifyPaymentResultInput struct { - idempotencyKey *string - paymentVerificationRequest *PaymentVerificationRequest -} - -// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). -func (r ClassicCheckoutSDKApiVerifyPaymentResultInput) IdempotencyKey(idempotencyKey string) ClassicCheckoutSDKApiVerifyPaymentResultInput { - r.idempotencyKey = &idempotencyKey - return r -} - -func (r ClassicCheckoutSDKApiVerifyPaymentResultInput) PaymentVerificationRequest(paymentVerificationRequest PaymentVerificationRequest) ClassicCheckoutSDKApiVerifyPaymentResultInput { - r.paymentVerificationRequest = &paymentVerificationRequest - return r -} - -/* -Prepare a request for VerifyPaymentResult - -@return ClassicCheckoutSDKApiVerifyPaymentResultInput - -Deprecated since Adyen Checkout API v37 -*/ -func (a *ClassicCheckoutSDKApi) VerifyPaymentResultInput() ClassicCheckoutSDKApiVerifyPaymentResultInput { - return ClassicCheckoutSDKApiVerifyPaymentResultInput{} -} - -/* -VerifyPaymentResult Verify a payment result - -Verifies the payment result using the payload returned from the Checkout SDK. - -For more information, refer to [How it works](https://docs.adyen.com/online-payments#howitworks). - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r ClassicCheckoutSDKApiVerifyPaymentResultInput - Request parameters, see VerifyPaymentResultInput -@return PaymentVerificationResponse, *http.Response, error - -Deprecated since Adyen Checkout API v37 -*/ -func (a *ClassicCheckoutSDKApi) VerifyPaymentResult(ctx context.Context, r ClassicCheckoutSDKApiVerifyPaymentResultInput) (PaymentVerificationResponse, *http.Response, error) { - res := &PaymentVerificationResponse{} - path := "/payments/result" - queryParams := url.Values{} - headerParams := make(map[string]string) - if r.idempotencyKey != nil { - common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") - } - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - r.paymentVerificationRequest, - res, - http.MethodPost, - a.BasePath()+path, - queryParams, - headerParams, - ) - - return *res, httpRes, err -} diff --git a/src/checkout/api_modifications.go b/src/checkout/api_modifications.go index a0d7fee26..a656aaee4 100644 --- a/src/checkout/api_modifications.go +++ b/src/checkout/api_modifications.go @@ -182,7 +182,7 @@ func (a *ModificationsApi) CaptureAuthorisedPaymentInput(paymentPspReference str /* CaptureAuthorisedPayment Capture an authorised payment - Captures an authorised payment and returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**CAPTURE** webhook](https://docs.adyen.com/online-payments/capture#capture-notification). + Captures an authorised payment and returns a unique reference for this request. You get the outcome of the request asynchronously, in a [**CAPTURE** webhook](https://docs.adyen.com/online-payments/capture#capture-notification). You can capture either the full authorised amount or a part of the authorised amount. By default, any unclaimed amount after a partial capture gets cancelled. This does not apply if you enabled multiple partial captures on your account and the payment method supports multiple partial captures. diff --git a/src/checkout/api_payments.go b/src/checkout/api_payments.go index ce9d38d65..7e130c173 100644 --- a/src/checkout/api_payments.go +++ b/src/checkout/api_payments.go @@ -53,6 +53,8 @@ Send a request with at least the first 6 digits of the card number to get a resp If you have an API-only integration and collect card data, use this endpoint to find out if the shopper's card is co-branded. For co-branded cards, you must let the shopper choose the brand to pay with if you support both brands. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentsApiCardDetailsInput - Request parameters, see CardDetailsInput @return CardDetailsResponse, *http.Response, error @@ -284,6 +286,8 @@ PaymentsDetails Submit details for a payment Submits details for a payment created using `/payments`. This step is only needed when no final state has been reached on the `/payments` request, for example when the shopper was redirected to another page to complete the payment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentsApiPaymentsDetailsInput - Request parameters, see PaymentsDetailsInput @return PaymentDetailsResponse, *http.Response, error diff --git a/src/checkout/api_recurring.go b/src/checkout/api_recurring.go index 9ee44f6c7..bbc62e43c 100644 --- a/src/checkout/api_recurring.go +++ b/src/checkout/api_recurring.go @@ -117,6 +117,8 @@ GetTokensForStoredPaymentDetails Get tokens for stored payment details Lists the tokens for stored payment details for the shopper identified in the path, if there are any available. The token ID can be used with payment requests for the shopper's payment. A summary of the stored details is included. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r RecurringApiGetTokensForStoredPaymentDetailsInput - Request parameters, see GetTokensForStoredPaymentDetailsInput @return ListStoredPaymentMethodsResponse, *http.Response, error diff --git a/src/checkout/client.go b/src/checkout/client.go index 3fde0ab37..8b0e8eca5 100644 --- a/src/checkout/client.go +++ b/src/checkout/client.go @@ -9,7 +9,7 @@ API version: 71 package checkout import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Adyen Checkout API API v71 @@ -19,8 +19,6 @@ type APIClient struct { // API Services - ClassicCheckoutSDKApi *ClassicCheckoutSDKApi - DonationsApi *DonationsApi ModificationsApi *ModificationsApi @@ -39,13 +37,12 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.CheckoutEndpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.CheckoutEndpoint + } // API Services - c.ClassicCheckoutSDKApi = (*ClassicCheckoutSDKApi)(&c.common) c.DonationsApi = (*DonationsApi)(&c.common) c.ModificationsApi = (*ModificationsApi)(&c.common) c.OrdersApi = (*OrdersApi)(&c.common) diff --git a/src/checkout/model_avs.go b/src/checkout/model_avs.go deleted file mode 100644 index aa1ee6c5f..000000000 --- a/src/checkout/model_avs.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the Avs type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Avs{} - -// Avs struct for Avs -type Avs struct { - // Indicates whether the shopper is allowed to modify the billing address for the current payment request. - AddressEditable *bool `json:"addressEditable,omitempty"` - // Specifies whether the shopper should enter their billing address during checkout. Allowed values: * yes — Perform AVS checks for every card payment. * automatic — Perform AVS checks only when required to optimize the conversion rate. * no — Do not perform AVS checks. - Enabled *string `json:"enabled,omitempty"` -} - -// NewAvs instantiates a new Avs 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 NewAvs() *Avs { - this := Avs{} - return &this -} - -// NewAvsWithDefaults instantiates a new Avs 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 NewAvsWithDefaults() *Avs { - this := Avs{} - return &this -} - -// GetAddressEditable returns the AddressEditable field value if set, zero value otherwise. -func (o *Avs) GetAddressEditable() bool { - if o == nil || common.IsNil(o.AddressEditable) { - var ret bool - return ret - } - return *o.AddressEditable -} - -// GetAddressEditableOk returns a tuple with the AddressEditable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Avs) GetAddressEditableOk() (*bool, bool) { - if o == nil || common.IsNil(o.AddressEditable) { - return nil, false - } - return o.AddressEditable, true -} - -// HasAddressEditable returns a boolean if a field has been set. -func (o *Avs) HasAddressEditable() bool { - if o != nil && !common.IsNil(o.AddressEditable) { - return true - } - - return false -} - -// SetAddressEditable gets a reference to the given bool and assigns it to the AddressEditable field. -func (o *Avs) SetAddressEditable(v bool) { - o.AddressEditable = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *Avs) GetEnabled() string { - if o == nil || common.IsNil(o.Enabled) { - var ret string - return ret - } - return *o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Avs) GetEnabledOk() (*string, bool) { - if o == nil || common.IsNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *Avs) HasEnabled() bool { - if o != nil && !common.IsNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given string and assigns it to the Enabled field. -func (o *Avs) SetEnabled(v string) { - o.Enabled = &v -} - -func (o Avs) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Avs) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AddressEditable) { - toSerialize["addressEditable"] = o.AddressEditable - } - if !common.IsNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - return toSerialize, nil -} - -type NullableAvs struct { - value *Avs - isSet bool -} - -func (v NullableAvs) Get() *Avs { - return v.value -} - -func (v *NullableAvs) Set(val *Avs) { - v.value = val - v.isSet = true -} - -func (v NullableAvs) IsSet() bool { - return v.isSet -} - -func (v *NullableAvs) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAvs(val *Avs) *NullableAvs { - return &NullableAvs{value: val, isSet: true} -} - -func (v NullableAvs) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAvs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *Avs) isValidEnabled() bool { - var allowedEnumValues = []string{"yes", "no", "automatic"} - for _, allowed := range allowedEnumValues { - if o.GetEnabled() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_bank_account.go b/src/checkout/model_bank_account.go deleted file mode 100644 index efcdbff9f..000000000 --- a/src/checkout/model_bank_account.go +++ /dev/null @@ -1,421 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the BankAccount type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &BankAccount{} - -// BankAccount struct for BankAccount -type BankAccount struct { - // The bank account number (without separators). - BankAccountNumber *string `json:"bankAccountNumber,omitempty"` - // The bank city. - BankCity *string `json:"bankCity,omitempty"` - // The location id of the bank. The field value is `nil` in most cases. - BankLocationId *string `json:"bankLocationId,omitempty"` - // The name of the bank. - BankName *string `json:"bankName,omitempty"` - // The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - Bic *string `json:"bic,omitempty"` - // Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - CountryCode *string `json:"countryCode,omitempty"` - // The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - Iban *string `json:"iban,omitempty"` - // The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - OwnerName *string `json:"ownerName,omitempty"` - // The bank account holder's tax ID. - TaxId *string `json:"taxId,omitempty"` -} - -// NewBankAccount instantiates a new BankAccount 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 NewBankAccount() *BankAccount { - this := BankAccount{} - return &this -} - -// NewBankAccountWithDefaults instantiates a new BankAccount 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 NewBankAccountWithDefaults() *BankAccount { - this := BankAccount{} - return &this -} - -// GetBankAccountNumber returns the BankAccountNumber field value if set, zero value otherwise. -func (o *BankAccount) GetBankAccountNumber() string { - if o == nil || common.IsNil(o.BankAccountNumber) { - var ret string - return ret - } - return *o.BankAccountNumber -} - -// GetBankAccountNumberOk returns a tuple with the BankAccountNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetBankAccountNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.BankAccountNumber) { - return nil, false - } - return o.BankAccountNumber, true -} - -// HasBankAccountNumber returns a boolean if a field has been set. -func (o *BankAccount) HasBankAccountNumber() bool { - if o != nil && !common.IsNil(o.BankAccountNumber) { - return true - } - - return false -} - -// SetBankAccountNumber gets a reference to the given string and assigns it to the BankAccountNumber field. -func (o *BankAccount) SetBankAccountNumber(v string) { - o.BankAccountNumber = &v -} - -// GetBankCity returns the BankCity field value if set, zero value otherwise. -func (o *BankAccount) GetBankCity() string { - if o == nil || common.IsNil(o.BankCity) { - var ret string - return ret - } - return *o.BankCity -} - -// GetBankCityOk returns a tuple with the BankCity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetBankCityOk() (*string, bool) { - if o == nil || common.IsNil(o.BankCity) { - return nil, false - } - return o.BankCity, true -} - -// HasBankCity returns a boolean if a field has been set. -func (o *BankAccount) HasBankCity() bool { - if o != nil && !common.IsNil(o.BankCity) { - return true - } - - return false -} - -// SetBankCity gets a reference to the given string and assigns it to the BankCity field. -func (o *BankAccount) SetBankCity(v string) { - o.BankCity = &v -} - -// GetBankLocationId returns the BankLocationId field value if set, zero value otherwise. -func (o *BankAccount) GetBankLocationId() string { - if o == nil || common.IsNil(o.BankLocationId) { - var ret string - return ret - } - return *o.BankLocationId -} - -// GetBankLocationIdOk returns a tuple with the BankLocationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetBankLocationIdOk() (*string, bool) { - if o == nil || common.IsNil(o.BankLocationId) { - return nil, false - } - return o.BankLocationId, true -} - -// HasBankLocationId returns a boolean if a field has been set. -func (o *BankAccount) HasBankLocationId() bool { - if o != nil && !common.IsNil(o.BankLocationId) { - return true - } - - return false -} - -// SetBankLocationId gets a reference to the given string and assigns it to the BankLocationId field. -func (o *BankAccount) SetBankLocationId(v string) { - o.BankLocationId = &v -} - -// GetBankName returns the BankName field value if set, zero value otherwise. -func (o *BankAccount) GetBankName() string { - if o == nil || common.IsNil(o.BankName) { - var ret string - return ret - } - return *o.BankName -} - -// GetBankNameOk returns a tuple with the BankName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetBankNameOk() (*string, bool) { - if o == nil || common.IsNil(o.BankName) { - return nil, false - } - return o.BankName, true -} - -// HasBankName returns a boolean if a field has been set. -func (o *BankAccount) HasBankName() bool { - if o != nil && !common.IsNil(o.BankName) { - return true - } - - return false -} - -// SetBankName gets a reference to the given string and assigns it to the BankName field. -func (o *BankAccount) SetBankName(v string) { - o.BankName = &v -} - -// GetBic returns the Bic field value if set, zero value otherwise. -func (o *BankAccount) GetBic() string { - if o == nil || common.IsNil(o.Bic) { - var ret string - return ret - } - return *o.Bic -} - -// GetBicOk returns a tuple with the Bic field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetBicOk() (*string, bool) { - if o == nil || common.IsNil(o.Bic) { - return nil, false - } - return o.Bic, true -} - -// HasBic returns a boolean if a field has been set. -func (o *BankAccount) HasBic() bool { - if o != nil && !common.IsNil(o.Bic) { - return true - } - - return false -} - -// SetBic gets a reference to the given string and assigns it to the Bic field. -func (o *BankAccount) SetBic(v string) { - o.Bic = &v -} - -// GetCountryCode returns the CountryCode field value if set, zero value otherwise. -func (o *BankAccount) 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 *BankAccount) 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 *BankAccount) 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 *BankAccount) SetCountryCode(v string) { - o.CountryCode = &v -} - -// GetIban returns the Iban field value if set, zero value otherwise. -func (o *BankAccount) GetIban() string { - if o == nil || common.IsNil(o.Iban) { - var ret string - return ret - } - return *o.Iban -} - -// GetIbanOk returns a tuple with the Iban field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetIbanOk() (*string, bool) { - if o == nil || common.IsNil(o.Iban) { - return nil, false - } - return o.Iban, true -} - -// HasIban returns a boolean if a field has been set. -func (o *BankAccount) HasIban() bool { - if o != nil && !common.IsNil(o.Iban) { - return true - } - - return false -} - -// SetIban gets a reference to the given string and assigns it to the Iban field. -func (o *BankAccount) SetIban(v string) { - o.Iban = &v -} - -// GetOwnerName returns the OwnerName field value if set, zero value otherwise. -func (o *BankAccount) GetOwnerName() string { - if o == nil || common.IsNil(o.OwnerName) { - var ret string - return ret - } - return *o.OwnerName -} - -// GetOwnerNameOk returns a tuple with the OwnerName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BankAccount) GetOwnerNameOk() (*string, bool) { - if o == nil || common.IsNil(o.OwnerName) { - return nil, false - } - return o.OwnerName, true -} - -// HasOwnerName returns a boolean if a field has been set. -func (o *BankAccount) HasOwnerName() bool { - if o != nil && !common.IsNil(o.OwnerName) { - return true - } - - return false -} - -// SetOwnerName gets a reference to the given string and assigns it to the OwnerName field. -func (o *BankAccount) SetOwnerName(v string) { - o.OwnerName = &v -} - -// GetTaxId returns the TaxId field value if set, zero value otherwise. -func (o *BankAccount) 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 *BankAccount) 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 *BankAccount) 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 *BankAccount) SetTaxId(v string) { - o.TaxId = &v -} - -func (o BankAccount) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BankAccount) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.BankAccountNumber) { - toSerialize["bankAccountNumber"] = o.BankAccountNumber - } - if !common.IsNil(o.BankCity) { - toSerialize["bankCity"] = o.BankCity - } - if !common.IsNil(o.BankLocationId) { - toSerialize["bankLocationId"] = o.BankLocationId - } - if !common.IsNil(o.BankName) { - toSerialize["bankName"] = o.BankName - } - if !common.IsNil(o.Bic) { - toSerialize["bic"] = o.Bic - } - if !common.IsNil(o.CountryCode) { - toSerialize["countryCode"] = o.CountryCode - } - if !common.IsNil(o.Iban) { - toSerialize["iban"] = o.Iban - } - if !common.IsNil(o.OwnerName) { - toSerialize["ownerName"] = o.OwnerName - } - if !common.IsNil(o.TaxId) { - toSerialize["taxId"] = o.TaxId - } - return toSerialize, nil -} - -type NullableBankAccount struct { - value *BankAccount - isSet bool -} - -func (v NullableBankAccount) Get() *BankAccount { - return v.value -} - -func (v *NullableBankAccount) Set(val *BankAccount) { - v.value = val - v.isSet = true -} - -func (v NullableBankAccount) IsSet() bool { - return v.isSet -} - -func (v *NullableBankAccount) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBankAccount(val *BankAccount) *NullableBankAccount { - return &NullableBankAccount{value: val, isSet: true} -} - -func (v NullableBankAccount) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBankAccount) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_card.go b/src/checkout/model_card.go deleted file mode 100644 index 8d278017e..000000000 --- a/src/checkout/model_card.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the Card type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Card{} - -// Card struct for Card -type Card struct { - // The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - Cvc *string `json:"cvc,omitempty"` - // The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - ExpiryMonth *string `json:"expiryMonth,omitempty"` - // The card expiry year. Format: 4 digits. For example: 2020 - ExpiryYear *string `json:"expiryYear,omitempty"` - // The name of the cardholder, as printed on the card. - HolderName *string `json:"holderName,omitempty"` - // The issue number of the card (for some UK debit cards only). - IssueNumber *string `json:"issueNumber,omitempty"` - // The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - Number *string `json:"number,omitempty"` - // The month component of the start date (for some UK debit cards only). - StartMonth *string `json:"startMonth,omitempty"` - // The year component of the start date (for some UK debit cards only). - StartYear *string `json:"startYear,omitempty"` -} - -// NewCard instantiates a new Card 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 NewCard() *Card { - this := Card{} - return &this -} - -// NewCardWithDefaults instantiates a new Card 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 NewCardWithDefaults() *Card { - this := Card{} - return &this -} - -// GetCvc returns the Cvc field value if set, zero value otherwise. -func (o *Card) GetCvc() string { - if o == nil || common.IsNil(o.Cvc) { - var ret string - return ret - } - return *o.Cvc -} - -// GetCvcOk returns a tuple with the Cvc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetCvcOk() (*string, bool) { - if o == nil || common.IsNil(o.Cvc) { - return nil, false - } - return o.Cvc, true -} - -// HasCvc returns a boolean if a field has been set. -func (o *Card) HasCvc() bool { - if o != nil && !common.IsNil(o.Cvc) { - return true - } - - return false -} - -// SetCvc gets a reference to the given string and assigns it to the Cvc field. -func (o *Card) SetCvc(v string) { - o.Cvc = &v -} - -// GetExpiryMonth returns the ExpiryMonth field value if set, zero value otherwise. -func (o *Card) GetExpiryMonth() string { - if o == nil || common.IsNil(o.ExpiryMonth) { - var ret string - return ret - } - return *o.ExpiryMonth -} - -// GetExpiryMonthOk returns a tuple with the ExpiryMonth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetExpiryMonthOk() (*string, bool) { - if o == nil || common.IsNil(o.ExpiryMonth) { - return nil, false - } - return o.ExpiryMonth, true -} - -// HasExpiryMonth returns a boolean if a field has been set. -func (o *Card) HasExpiryMonth() bool { - if o != nil && !common.IsNil(o.ExpiryMonth) { - return true - } - - return false -} - -// SetExpiryMonth gets a reference to the given string and assigns it to the ExpiryMonth field. -func (o *Card) SetExpiryMonth(v string) { - o.ExpiryMonth = &v -} - -// GetExpiryYear returns the ExpiryYear field value if set, zero value otherwise. -func (o *Card) GetExpiryYear() string { - if o == nil || common.IsNil(o.ExpiryYear) { - var ret string - return ret - } - return *o.ExpiryYear -} - -// GetExpiryYearOk returns a tuple with the ExpiryYear field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetExpiryYearOk() (*string, bool) { - if o == nil || common.IsNil(o.ExpiryYear) { - return nil, false - } - return o.ExpiryYear, true -} - -// HasExpiryYear returns a boolean if a field has been set. -func (o *Card) HasExpiryYear() bool { - if o != nil && !common.IsNil(o.ExpiryYear) { - return true - } - - return false -} - -// SetExpiryYear gets a reference to the given string and assigns it to the ExpiryYear field. -func (o *Card) SetExpiryYear(v string) { - o.ExpiryYear = &v -} - -// GetHolderName returns the HolderName field value if set, zero value otherwise. -func (o *Card) GetHolderName() string { - if o == nil || common.IsNil(o.HolderName) { - var ret string - return ret - } - return *o.HolderName -} - -// GetHolderNameOk returns a tuple with the HolderName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetHolderNameOk() (*string, bool) { - if o == nil || common.IsNil(o.HolderName) { - return nil, false - } - return o.HolderName, true -} - -// HasHolderName returns a boolean if a field has been set. -func (o *Card) HasHolderName() bool { - if o != nil && !common.IsNil(o.HolderName) { - return true - } - - return false -} - -// SetHolderName gets a reference to the given string and assigns it to the HolderName field. -func (o *Card) SetHolderName(v string) { - o.HolderName = &v -} - -// GetIssueNumber returns the IssueNumber field value if set, zero value otherwise. -func (o *Card) GetIssueNumber() string { - if o == nil || common.IsNil(o.IssueNumber) { - var ret string - return ret - } - return *o.IssueNumber -} - -// GetIssueNumberOk returns a tuple with the IssueNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetIssueNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.IssueNumber) { - return nil, false - } - return o.IssueNumber, true -} - -// HasIssueNumber returns a boolean if a field has been set. -func (o *Card) HasIssueNumber() bool { - if o != nil && !common.IsNil(o.IssueNumber) { - return true - } - - return false -} - -// SetIssueNumber gets a reference to the given string and assigns it to the IssueNumber field. -func (o *Card) SetIssueNumber(v string) { - o.IssueNumber = &v -} - -// GetNumber returns the Number field value if set, zero value otherwise. -func (o *Card) GetNumber() string { - if o == nil || common.IsNil(o.Number) { - var ret string - return ret - } - return *o.Number -} - -// GetNumberOk returns a tuple with the Number field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.Number) { - return nil, false - } - return o.Number, true -} - -// HasNumber returns a boolean if a field has been set. -func (o *Card) HasNumber() bool { - if o != nil && !common.IsNil(o.Number) { - return true - } - - return false -} - -// SetNumber gets a reference to the given string and assigns it to the Number field. -func (o *Card) SetNumber(v string) { - o.Number = &v -} - -// GetStartMonth returns the StartMonth field value if set, zero value otherwise. -func (o *Card) GetStartMonth() string { - if o == nil || common.IsNil(o.StartMonth) { - var ret string - return ret - } - return *o.StartMonth -} - -// GetStartMonthOk returns a tuple with the StartMonth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetStartMonthOk() (*string, bool) { - if o == nil || common.IsNil(o.StartMonth) { - return nil, false - } - return o.StartMonth, true -} - -// HasStartMonth returns a boolean if a field has been set. -func (o *Card) HasStartMonth() bool { - if o != nil && !common.IsNil(o.StartMonth) { - return true - } - - return false -} - -// SetStartMonth gets a reference to the given string and assigns it to the StartMonth field. -func (o *Card) SetStartMonth(v string) { - o.StartMonth = &v -} - -// GetStartYear returns the StartYear field value if set, zero value otherwise. -func (o *Card) GetStartYear() string { - if o == nil || common.IsNil(o.StartYear) { - var ret string - return ret - } - return *o.StartYear -} - -// GetStartYearOk returns a tuple with the StartYear field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Card) GetStartYearOk() (*string, bool) { - if o == nil || common.IsNil(o.StartYear) { - return nil, false - } - return o.StartYear, true -} - -// HasStartYear returns a boolean if a field has been set. -func (o *Card) HasStartYear() bool { - if o != nil && !common.IsNil(o.StartYear) { - return true - } - - return false -} - -// SetStartYear gets a reference to the given string and assigns it to the StartYear field. -func (o *Card) SetStartYear(v string) { - o.StartYear = &v -} - -func (o Card) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Card) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Cvc) { - toSerialize["cvc"] = o.Cvc - } - if !common.IsNil(o.ExpiryMonth) { - toSerialize["expiryMonth"] = o.ExpiryMonth - } - if !common.IsNil(o.ExpiryYear) { - toSerialize["expiryYear"] = o.ExpiryYear - } - if !common.IsNil(o.HolderName) { - toSerialize["holderName"] = o.HolderName - } - if !common.IsNil(o.IssueNumber) { - toSerialize["issueNumber"] = o.IssueNumber - } - if !common.IsNil(o.Number) { - toSerialize["number"] = o.Number - } - if !common.IsNil(o.StartMonth) { - toSerialize["startMonth"] = o.StartMonth - } - if !common.IsNil(o.StartYear) { - toSerialize["startYear"] = o.StartYear - } - return toSerialize, nil -} - -type NullableCard struct { - value *Card - isSet bool -} - -func (v NullableCard) Get() *Card { - return v.value -} - -func (v *NullableCard) Set(val *Card) { - v.value = val - v.isSet = true -} - -func (v NullableCard) IsSet() bool { - return v.isSet -} - -func (v *NullableCard) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCard(val *Card) *NullableCard { - return &NullableCard{value: val, isSet: true} -} - -func (v NullableCard) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCard) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_checkout_payment_method.go b/src/checkout/model_checkout_payment_method.go index 5d66b8910..d1b061e38 100644 --- a/src/checkout/model_checkout_payment_method.go +++ b/src/checkout/model_checkout_payment_method.go @@ -30,6 +30,7 @@ type CheckoutPaymentMethod struct { DokuDetails *DokuDetails DotpayDetails *DotpayDetails DragonpayDetails *DragonpayDetails + EBankingFinlandDetails *EBankingFinlandDetails EcontextVoucherDetails *EcontextVoucherDetails EftDetails *EftDetails GenericIssuerPaymentMethodDetails *GenericIssuerPaymentMethodDetails @@ -42,6 +43,7 @@ type CheckoutPaymentMethod struct { MobilePayDetails *MobilePayDetails MolPayDetails *MolPayDetails OpenInvoiceDetails *OpenInvoiceDetails + PayByBankAISDirectDebitDetails *PayByBankAISDirectDebitDetails PayByBankDetails *PayByBankDetails PayPalDetails *PayPalDetails PayToDetails *PayToDetails @@ -52,6 +54,7 @@ type CheckoutPaymentMethod struct { SamsungPayDetails *SamsungPayDetails SepaDirectDebitDetails *SepaDirectDebitDetails StoredPaymentMethodDetails *StoredPaymentMethodDetails + TwintDetails *TwintDetails UpiCollectDetails *UpiCollectDetails UpiIntentDetails *UpiIntentDetails VippsDetails *VippsDetails @@ -166,6 +169,13 @@ func DragonpayDetailsAsCheckoutPaymentMethod(v *DragonpayDetails) CheckoutPaymen } } +// EBankingFinlandDetailsAsCheckoutPaymentMethod is a convenience function that returns EBankingFinlandDetails wrapped in CheckoutPaymentMethod +func EBankingFinlandDetailsAsCheckoutPaymentMethod(v *EBankingFinlandDetails) CheckoutPaymentMethod { + return CheckoutPaymentMethod{ + EBankingFinlandDetails: v, + } +} + // EcontextVoucherDetailsAsCheckoutPaymentMethod is a convenience function that returns EcontextVoucherDetails wrapped in CheckoutPaymentMethod func EcontextVoucherDetailsAsCheckoutPaymentMethod(v *EcontextVoucherDetails) CheckoutPaymentMethod { return CheckoutPaymentMethod{ @@ -250,6 +260,13 @@ func OpenInvoiceDetailsAsCheckoutPaymentMethod(v *OpenInvoiceDetails) CheckoutPa } } +// PayByBankAISDirectDebitDetailsAsCheckoutPaymentMethod is a convenience function that returns PayByBankAISDirectDebitDetails wrapped in CheckoutPaymentMethod +func PayByBankAISDirectDebitDetailsAsCheckoutPaymentMethod(v *PayByBankAISDirectDebitDetails) CheckoutPaymentMethod { + return CheckoutPaymentMethod{ + PayByBankAISDirectDebitDetails: v, + } +} + // PayByBankDetailsAsCheckoutPaymentMethod is a convenience function that returns PayByBankDetails wrapped in CheckoutPaymentMethod func PayByBankDetailsAsCheckoutPaymentMethod(v *PayByBankDetails) CheckoutPaymentMethod { return CheckoutPaymentMethod{ @@ -320,6 +337,13 @@ func StoredPaymentMethodDetailsAsCheckoutPaymentMethod(v *StoredPaymentMethodDet } } +// TwintDetailsAsCheckoutPaymentMethod is a convenience function that returns TwintDetails wrapped in CheckoutPaymentMethod +func TwintDetailsAsCheckoutPaymentMethod(v *TwintDetails) CheckoutPaymentMethod { + return CheckoutPaymentMethod{ + TwintDetails: v, + } +} + // UpiCollectDetailsAsCheckoutPaymentMethod is a convenience function that returns UpiCollectDetails wrapped in CheckoutPaymentMethod func UpiCollectDetailsAsCheckoutPaymentMethod(v *UpiCollectDetails) CheckoutPaymentMethod { return CheckoutPaymentMethod{ @@ -568,6 +592,19 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.DragonpayDetails = nil } + // try to unmarshal data into EBankingFinlandDetails + err = json.Unmarshal(data, &dst.EBankingFinlandDetails) + if err == nil { + jsonEBankingFinlandDetails, _ := json.Marshal(dst.EBankingFinlandDetails) + if string(jsonEBankingFinlandDetails) == "{}" || !dst.EBankingFinlandDetails.isValidType() { // empty struct + dst.EBankingFinlandDetails = nil + } else { + match++ + } + } else { + dst.EBankingFinlandDetails = nil + } + // try to unmarshal data into EcontextVoucherDetails err = json.Unmarshal(data, &dst.EcontextVoucherDetails) if err == nil { @@ -724,6 +761,19 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.OpenInvoiceDetails = nil } + // try to unmarshal data into PayByBankAISDirectDebitDetails + err = json.Unmarshal(data, &dst.PayByBankAISDirectDebitDetails) + if err == nil { + jsonPayByBankAISDirectDebitDetails, _ := json.Marshal(dst.PayByBankAISDirectDebitDetails) + if string(jsonPayByBankAISDirectDebitDetails) == "{}" || !dst.PayByBankAISDirectDebitDetails.isValidType() { // empty struct + dst.PayByBankAISDirectDebitDetails = nil + } else { + match++ + } + } else { + dst.PayByBankAISDirectDebitDetails = nil + } + // try to unmarshal data into PayByBankDetails err = json.Unmarshal(data, &dst.PayByBankDetails) if err == nil { @@ -854,6 +904,19 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.StoredPaymentMethodDetails = nil } + // try to unmarshal data into TwintDetails + err = json.Unmarshal(data, &dst.TwintDetails) + if err == nil { + jsonTwintDetails, _ := json.Marshal(dst.TwintDetails) + if string(jsonTwintDetails) == "{}" || !dst.TwintDetails.isValidType() { // empty struct + dst.TwintDetails = nil + } else { + match++ + } + } else { + dst.TwintDetails = nil + } + // try to unmarshal data into UpiCollectDetails err = json.Unmarshal(data, &dst.UpiCollectDetails) if err == nil { @@ -962,6 +1025,7 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.DokuDetails = nil dst.DotpayDetails = nil dst.DragonpayDetails = nil + dst.EBankingFinlandDetails = nil dst.EcontextVoucherDetails = nil dst.EftDetails = nil dst.GenericIssuerPaymentMethodDetails = nil @@ -974,6 +1038,7 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.MobilePayDetails = nil dst.MolPayDetails = nil dst.OpenInvoiceDetails = nil + dst.PayByBankAISDirectDebitDetails = nil dst.PayByBankDetails = nil dst.PayPalDetails = nil dst.PayToDetails = nil @@ -984,6 +1049,7 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.SamsungPayDetails = nil dst.SepaDirectDebitDetails = nil dst.StoredPaymentMethodDetails = nil + dst.TwintDetails = nil dst.UpiCollectDetails = nil dst.UpiIntentDetails = nil dst.VippsDetails = nil @@ -1062,6 +1128,10 @@ func (src CheckoutPaymentMethod) MarshalJSON() ([]byte, error) { return json.Marshal(&src.DragonpayDetails) } + if src.EBankingFinlandDetails != nil { + return json.Marshal(&src.EBankingFinlandDetails) + } + if src.EcontextVoucherDetails != nil { return json.Marshal(&src.EcontextVoucherDetails) } @@ -1110,6 +1180,10 @@ func (src CheckoutPaymentMethod) MarshalJSON() ([]byte, error) { return json.Marshal(&src.OpenInvoiceDetails) } + if src.PayByBankAISDirectDebitDetails != nil { + return json.Marshal(&src.PayByBankAISDirectDebitDetails) + } + if src.PayByBankDetails != nil { return json.Marshal(&src.PayByBankDetails) } @@ -1150,6 +1224,10 @@ func (src CheckoutPaymentMethod) MarshalJSON() ([]byte, error) { return json.Marshal(&src.StoredPaymentMethodDetails) } + if src.TwintDetails != nil { + return json.Marshal(&src.TwintDetails) + } + if src.UpiCollectDetails != nil { return json.Marshal(&src.UpiCollectDetails) } @@ -1246,6 +1324,10 @@ func (obj *CheckoutPaymentMethod) GetActualInstance() interface{} { return obj.DragonpayDetails } + if obj.EBankingFinlandDetails != nil { + return obj.EBankingFinlandDetails + } + if obj.EcontextVoucherDetails != nil { return obj.EcontextVoucherDetails } @@ -1294,6 +1376,10 @@ func (obj *CheckoutPaymentMethod) GetActualInstance() interface{} { return obj.OpenInvoiceDetails } + if obj.PayByBankAISDirectDebitDetails != nil { + return obj.PayByBankAISDirectDebitDetails + } + if obj.PayByBankDetails != nil { return obj.PayByBankDetails } @@ -1334,6 +1420,10 @@ func (obj *CheckoutPaymentMethod) GetActualInstance() interface{} { return obj.StoredPaymentMethodDetails } + if obj.TwintDetails != nil { + return obj.TwintDetails + } + if obj.UpiCollectDetails != nil { return obj.UpiCollectDetails } diff --git a/src/checkout/model_configuration.go b/src/checkout/model_configuration.go deleted file mode 100644 index 6c39898d2..000000000 --- a/src/checkout/model_configuration.go +++ /dev/null @@ -1,243 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the Configuration type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Configuration{} - -// Configuration struct for Configuration -type Configuration struct { - Avs *Avs `json:"avs,omitempty"` - // Determines whether the cardholder name should be provided or not. Permitted values: * NONE * OPTIONAL * REQUIRED - CardHolderName *string `json:"cardHolderName,omitempty"` - Installments *InstallmentsNumber `json:"installments,omitempty"` - ShopperInput *ShopperInput `json:"shopperInput,omitempty"` -} - -// NewConfiguration instantiates a new Configuration 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 NewConfiguration() *Configuration { - this := Configuration{} - return &this -} - -// NewConfigurationWithDefaults instantiates a new Configuration 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 NewConfigurationWithDefaults() *Configuration { - this := Configuration{} - return &this -} - -// GetAvs returns the Avs field value if set, zero value otherwise. -func (o *Configuration) GetAvs() Avs { - if o == nil || common.IsNil(o.Avs) { - var ret Avs - return ret - } - return *o.Avs -} - -// GetAvsOk returns a tuple with the Avs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Configuration) GetAvsOk() (*Avs, bool) { - if o == nil || common.IsNil(o.Avs) { - return nil, false - } - return o.Avs, true -} - -// HasAvs returns a boolean if a field has been set. -func (o *Configuration) HasAvs() bool { - if o != nil && !common.IsNil(o.Avs) { - return true - } - - return false -} - -// SetAvs gets a reference to the given Avs and assigns it to the Avs field. -func (o *Configuration) SetAvs(v Avs) { - o.Avs = &v -} - -// GetCardHolderName returns the CardHolderName field value if set, zero value otherwise. -func (o *Configuration) GetCardHolderName() string { - if o == nil || common.IsNil(o.CardHolderName) { - var ret string - return ret - } - return *o.CardHolderName -} - -// GetCardHolderNameOk returns a tuple with the CardHolderName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Configuration) GetCardHolderNameOk() (*string, bool) { - if o == nil || common.IsNil(o.CardHolderName) { - return nil, false - } - return o.CardHolderName, true -} - -// HasCardHolderName returns a boolean if a field has been set. -func (o *Configuration) HasCardHolderName() bool { - if o != nil && !common.IsNil(o.CardHolderName) { - return true - } - - return false -} - -// SetCardHolderName gets a reference to the given string and assigns it to the CardHolderName field. -func (o *Configuration) SetCardHolderName(v string) { - o.CardHolderName = &v -} - -// GetInstallments returns the Installments field value if set, zero value otherwise. -func (o *Configuration) GetInstallments() InstallmentsNumber { - if o == nil || common.IsNil(o.Installments) { - var ret InstallmentsNumber - 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 *Configuration) GetInstallmentsOk() (*InstallmentsNumber, 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 *Configuration) HasInstallments() bool { - if o != nil && !common.IsNil(o.Installments) { - return true - } - - return false -} - -// SetInstallments gets a reference to the given InstallmentsNumber and assigns it to the Installments field. -func (o *Configuration) SetInstallments(v InstallmentsNumber) { - o.Installments = &v -} - -// GetShopperInput returns the ShopperInput field value if set, zero value otherwise. -func (o *Configuration) GetShopperInput() ShopperInput { - if o == nil || common.IsNil(o.ShopperInput) { - var ret ShopperInput - return ret - } - return *o.ShopperInput -} - -// GetShopperInputOk returns a tuple with the ShopperInput field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Configuration) GetShopperInputOk() (*ShopperInput, bool) { - if o == nil || common.IsNil(o.ShopperInput) { - return nil, false - } - return o.ShopperInput, true -} - -// HasShopperInput returns a boolean if a field has been set. -func (o *Configuration) HasShopperInput() bool { - if o != nil && !common.IsNil(o.ShopperInput) { - return true - } - - return false -} - -// SetShopperInput gets a reference to the given ShopperInput and assigns it to the ShopperInput field. -func (o *Configuration) SetShopperInput(v ShopperInput) { - o.ShopperInput = &v -} - -func (o Configuration) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Configuration) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Avs) { - toSerialize["avs"] = o.Avs - } - if !common.IsNil(o.CardHolderName) { - toSerialize["cardHolderName"] = o.CardHolderName - } - if !common.IsNil(o.Installments) { - toSerialize["installments"] = o.Installments - } - if !common.IsNil(o.ShopperInput) { - toSerialize["shopperInput"] = o.ShopperInput - } - return toSerialize, nil -} - -type NullableConfiguration struct { - value *Configuration - isSet bool -} - -func (v NullableConfiguration) Get() *Configuration { - return v.value -} - -func (v *NullableConfiguration) Set(val *Configuration) { - v.value = val - v.isSet = true -} - -func (v NullableConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfiguration(val *Configuration) *NullableConfiguration { - return &NullableConfiguration{value: val, isSet: true} -} - -func (v NullableConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *Configuration) isValidCardHolderName() bool { - var allowedEnumValues = []string{"NONE", "OPTIONAL", "REQUIRED"} - for _, allowed := range allowedEnumValues { - if o.GetCardHolderName() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_e_banking_finland_details.go b/src/checkout/model_e_banking_finland_details.go new file mode 100644 index 000000000..3d1a6e283 --- /dev/null +++ b/src/checkout/model_e_banking_finland_details.go @@ -0,0 +1,202 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the EBankingFinlandDetails type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &EBankingFinlandDetails{} + +// EBankingFinlandDetails struct for EBankingFinlandDetails +type EBankingFinlandDetails struct { + // The checkout attempt identifier. + CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // The Ebanking Finland issuer value of the shopper's selected bank. + Issuer *string `json:"issuer,omitempty"` + // **ebanking_FI** + Type string `json:"type"` +} + +// NewEBankingFinlandDetails instantiates a new EBankingFinlandDetails 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 NewEBankingFinlandDetails(type_ string) *EBankingFinlandDetails { + this := EBankingFinlandDetails{} + this.Type = type_ + return &this +} + +// NewEBankingFinlandDetailsWithDefaults instantiates a new EBankingFinlandDetails 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 NewEBankingFinlandDetailsWithDefaults() *EBankingFinlandDetails { + this := EBankingFinlandDetails{} + var type_ string = "ebanking_FI" + this.Type = type_ + return &this +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *EBankingFinlandDetails) 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 *EBankingFinlandDetails) 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 *EBankingFinlandDetails) 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 *EBankingFinlandDetails) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise. +func (o *EBankingFinlandDetails) GetIssuer() string { + if o == nil || common.IsNil(o.Issuer) { + var ret string + return ret + } + return *o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EBankingFinlandDetails) GetIssuerOk() (*string, bool) { + if o == nil || common.IsNil(o.Issuer) { + return nil, false + } + return o.Issuer, true +} + +// HasIssuer returns a boolean if a field has been set. +func (o *EBankingFinlandDetails) HasIssuer() bool { + if o != nil && !common.IsNil(o.Issuer) { + return true + } + + return false +} + +// SetIssuer gets a reference to the given string and assigns it to the Issuer field. +func (o *EBankingFinlandDetails) SetIssuer(v string) { + o.Issuer = &v +} + +// GetType returns the Type field value +func (o *EBankingFinlandDetails) 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 *EBankingFinlandDetails) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *EBankingFinlandDetails) SetType(v string) { + o.Type = v +} + +func (o EBankingFinlandDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EBankingFinlandDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CheckoutAttemptId) { + toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId + } + if !common.IsNil(o.Issuer) { + toSerialize["issuer"] = o.Issuer + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableEBankingFinlandDetails struct { + value *EBankingFinlandDetails + isSet bool +} + +func (v NullableEBankingFinlandDetails) Get() *EBankingFinlandDetails { + return v.value +} + +func (v *NullableEBankingFinlandDetails) Set(val *EBankingFinlandDetails) { + v.value = val + v.isSet = true +} + +func (v NullableEBankingFinlandDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableEBankingFinlandDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEBankingFinlandDetails(val *EBankingFinlandDetails) *NullableEBankingFinlandDetails { + return &NullableEBankingFinlandDetails{value: val, isSet: true} +} + +func (v NullableEBankingFinlandDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEBankingFinlandDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *EBankingFinlandDetails) isValidType() bool { + var allowedEnumValues = []string{"ebanking_FI"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_fund_recipient.go b/src/checkout/model_fund_recipient.go index 14c2bcf9d..f55a8ac70 100644 --- a/src/checkout/model_fund_recipient.go +++ b/src/checkout/model_fund_recipient.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &FundRecipient{} // FundRecipient struct for FundRecipient type FundRecipient struct { - // Fund Recipient Iban for C2C payments + // The IBAN of the bank account where the funds are being transferred to. IBAN *string `json:"IBAN,omitempty"` BillingAddress *Address `json:"billingAddress,omitempty"` PaymentMethod *CardDetails `json:"paymentMethod,omitempty"` @@ -33,11 +33,11 @@ type FundRecipient struct { SubMerchant *SubMerchant `json:"subMerchant,omitempty"` // The telephone number of the shopper. TelephoneNumber *string `json:"telephoneNumber,omitempty"` - // Indicates where the money is going. + // The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. WalletIdentifier *string `json:"walletIdentifier,omitempty"` - // Indicates the tax identifier of the fund recipient + // The tax identifier of the person receiving the funds. WalletOwnerTaxId *string `json:"walletOwnerTaxId,omitempty"` - // The purpose of a digital wallet transaction + // The purpose of a digital wallet transaction. WalletPurpose *string `json:"walletPurpose,omitempty"` } diff --git a/src/checkout/model_installments_number.go b/src/checkout/model_installments_number.go deleted file mode 100644 index d30c7a1f7..000000000 --- a/src/checkout/model_installments_number.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the InstallmentsNumber type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &InstallmentsNumber{} - -// InstallmentsNumber struct for InstallmentsNumber -type InstallmentsNumber struct { - // Maximum number of installments - MaxNumberOfInstallments int32 `json:"maxNumberOfInstallments"` -} - -// NewInstallmentsNumber instantiates a new InstallmentsNumber 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 NewInstallmentsNumber(maxNumberOfInstallments int32) *InstallmentsNumber { - this := InstallmentsNumber{} - this.MaxNumberOfInstallments = maxNumberOfInstallments - return &this -} - -// NewInstallmentsNumberWithDefaults instantiates a new InstallmentsNumber 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 NewInstallmentsNumberWithDefaults() *InstallmentsNumber { - this := InstallmentsNumber{} - return &this -} - -// GetMaxNumberOfInstallments returns the MaxNumberOfInstallments field value -func (o *InstallmentsNumber) GetMaxNumberOfInstallments() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.MaxNumberOfInstallments -} - -// GetMaxNumberOfInstallmentsOk returns a tuple with the MaxNumberOfInstallments field value -// and a boolean to check if the value has been set. -func (o *InstallmentsNumber) GetMaxNumberOfInstallmentsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.MaxNumberOfInstallments, true -} - -// SetMaxNumberOfInstallments sets field value -func (o *InstallmentsNumber) SetMaxNumberOfInstallments(v int32) { - o.MaxNumberOfInstallments = v -} - -func (o InstallmentsNumber) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InstallmentsNumber) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["maxNumberOfInstallments"] = o.MaxNumberOfInstallments - return toSerialize, nil -} - -type NullableInstallmentsNumber struct { - value *InstallmentsNumber - isSet bool -} - -func (v NullableInstallmentsNumber) Get() *InstallmentsNumber { - return v.value -} - -func (v *NullableInstallmentsNumber) Set(val *InstallmentsNumber) { - v.value = val - v.isSet = true -} - -func (v NullableInstallmentsNumber) IsSet() bool { - return v.isSet -} - -func (v *NullableInstallmentsNumber) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInstallmentsNumber(val *InstallmentsNumber) *NullableInstallmentsNumber { - return &NullableInstallmentsNumber{value: val, isSet: true} -} - -func (v NullableInstallmentsNumber) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInstallmentsNumber) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_mandate.go b/src/checkout/model_mandate.go index c9baa7a2f..35da20e73 100644 --- a/src/checkout/model_mandate.go +++ b/src/checkout/model_mandate.go @@ -31,7 +31,7 @@ type Mandate struct { Count *string `json:"count,omitempty"` // End date of the billing plan, in YYYY-MM-DD format. EndsAt string `json:"endsAt"` - // The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. + // The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. Frequency string `json:"frequency"` // The message shown by UPI to the shopper on the approval screen. Remarks *string `json:"remarks,omitempty"` diff --git a/src/checkout/model_pay_by_bank_ais_direct_debit_details.go b/src/checkout/model_pay_by_bank_ais_direct_debit_details.go new file mode 100644 index 000000000..9ea9446ff --- /dev/null +++ b/src/checkout/model_pay_by_bank_ais_direct_debit_details.go @@ -0,0 +1,247 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the PayByBankAISDirectDebitDetails type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PayByBankAISDirectDebitDetails{} + +// PayByBankAISDirectDebitDetails struct for PayByBankAISDirectDebitDetails +type PayByBankAISDirectDebitDetails struct { + // The checkout attempt identifier. + CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + // Deprecated since Adyen Checkout API v49 + // Use `storedPaymentMethodId` instead. + RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` + // **paybybank_** + Type string `json:"type"` +} + +// NewPayByBankAISDirectDebitDetails instantiates a new PayByBankAISDirectDebitDetails 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 NewPayByBankAISDirectDebitDetails(type_ string) *PayByBankAISDirectDebitDetails { + this := PayByBankAISDirectDebitDetails{} + this.Type = type_ + return &this +} + +// NewPayByBankAISDirectDebitDetailsWithDefaults instantiates a new PayByBankAISDirectDebitDetails 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 NewPayByBankAISDirectDebitDetailsWithDefaults() *PayByBankAISDirectDebitDetails { + this := PayByBankAISDirectDebitDetails{} + var type_ string = "paybybank_AIS_DD" + this.Type = type_ + return &this +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *PayByBankAISDirectDebitDetails) 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 *PayByBankAISDirectDebitDetails) 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 *PayByBankAISDirectDebitDetails) 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 *PayByBankAISDirectDebitDetails) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *PayByBankAISDirectDebitDetails) GetRecurringDetailReference() string { + if o == nil || common.IsNil(o.RecurringDetailReference) { + var ret string + return ret + } + return *o.RecurringDetailReference +} + +// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *PayByBankAISDirectDebitDetails) GetRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.RecurringDetailReference) { + return nil, false + } + return o.RecurringDetailReference, true +} + +// HasRecurringDetailReference returns a boolean if a field has been set. +func (o *PayByBankAISDirectDebitDetails) HasRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.RecurringDetailReference) { + return true + } + + return false +} + +// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *PayByBankAISDirectDebitDetails) SetRecurringDetailReference(v string) { + o.RecurringDetailReference = &v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. +func (o *PayByBankAISDirectDebitDetails) GetStoredPaymentMethodId() string { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + var ret string + return ret + } + return *o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayByBankAISDirectDebitDetails) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + return nil, false + } + return o.StoredPaymentMethodId, true +} + +// HasStoredPaymentMethodId returns a boolean if a field has been set. +func (o *PayByBankAISDirectDebitDetails) HasStoredPaymentMethodId() bool { + if o != nil && !common.IsNil(o.StoredPaymentMethodId) { + return true + } + + return false +} + +// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field. +func (o *PayByBankAISDirectDebitDetails) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = &v +} + +// GetType returns the Type field value +func (o *PayByBankAISDirectDebitDetails) 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 *PayByBankAISDirectDebitDetails) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PayByBankAISDirectDebitDetails) SetType(v string) { + o.Type = v +} + +func (o PayByBankAISDirectDebitDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PayByBankAISDirectDebitDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CheckoutAttemptId) { + toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId + } + if !common.IsNil(o.RecurringDetailReference) { + toSerialize["recurringDetailReference"] = o.RecurringDetailReference + } + if !common.IsNil(o.StoredPaymentMethodId) { + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullablePayByBankAISDirectDebitDetails struct { + value *PayByBankAISDirectDebitDetails + isSet bool +} + +func (v NullablePayByBankAISDirectDebitDetails) Get() *PayByBankAISDirectDebitDetails { + return v.value +} + +func (v *NullablePayByBankAISDirectDebitDetails) Set(val *PayByBankAISDirectDebitDetails) { + v.value = val + v.isSet = true +} + +func (v NullablePayByBankAISDirectDebitDetails) IsSet() bool { + return v.isSet +} + +func (v *NullablePayByBankAISDirectDebitDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePayByBankAISDirectDebitDetails(val *PayByBankAISDirectDebitDetails) *NullablePayByBankAISDirectDebitDetails { + return &NullablePayByBankAISDirectDebitDetails{value: val, isSet: true} +} + +func (v NullablePayByBankAISDirectDebitDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePayByBankAISDirectDebitDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *PayByBankAISDirectDebitDetails) isValidType() bool { + var allowedEnumValues = []string{"paybybank_AIS_DD"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_payment_details.go b/src/checkout/model_payment_details.go index 76694b2be..90249cbde 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", "ebanking_FI", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "pix", "bizum", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "paysafecard", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} + 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", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "pix", "bizum", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "paysafecard", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_payment_setup_request.go b/src/checkout/model_payment_setup_request.go deleted file mode 100644 index 3da1a171a..000000000 --- a/src/checkout/model_payment_setup_request.go +++ /dev/null @@ -1,2187 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// 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/v14/src/common" -) - -// checks if the PaymentSetupRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentSetupRequest{} - -// PaymentSetupRequest struct for PaymentSetupRequest -type PaymentSetupRequest 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"` - // List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"giropay\"]` - AllowedPaymentMethods []string `json:"allowedPaymentMethods,omitempty"` - Amount Amount `json:"amount"` - ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"` - BillingAddress *Address `json:"billingAddress,omitempty"` - // List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"giropay\"]` - BlockedPaymentMethods []string `json:"blockedPaymentMethods,omitempty"` - // The delay between the authorisation and scheduled auto-capture, specified in hours. - CaptureDelayHours *int32 `json:"captureDelayHours,omitempty"` - // The 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"` - Configuration *Configuration `json:"configuration,omitempty"` - // Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - // Deprecated since Adyen Checkout API v68 - // Use `checkoutAttemptId` instead - 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"` - // The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - DateOfBirth *string `json:"dateOfBirth,omitempty"` - DccQuote *ForexQuote `json:"dccQuote,omitempty"` - DeliveryAddress *Address `json:"deliveryAddress,omitempty"` - // The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - DeliveryDate *time.Time `json:"deliveryDate,omitempty"` - // 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"` - Installments *Installments `json:"installments,omitempty"` - // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - LineItems []LineItem `json:"lineItems,omitempty"` - // The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. - LocalizedShopperStatement *map[string]string `json:"localizedShopperStatement,omitempty"` - Mandate *Mandate `json:"mandate,omitempty"` - // The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - 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"` - // Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - Metadata *map[string]string `json:"metadata,omitempty"` - // When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - OrderReference *string `json:"orderReference,omitempty"` - // Required for the Web integration. Set this parameter to the origin URL of the page that you are loading the SDK from. - Origin *string `json:"origin,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. - RecurringFrequency *string `json:"recurringFrequency,omitempty"` - // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. - ReturnUrl string `json:"returnUrl"` - RiskData *RiskData `json:"riskData,omitempty"` - // The version of the SDK you are using (for Web SDK integrations only). - SdkVersion *string `json:"sdkVersion,omitempty"` - SecureRemoteCommerceCheckoutData *SecureRemoteCommerceCheckoutData `json:"secureRemoteCommerceCheckoutData,omitempty"` - // The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 - SessionValidity *string `json:"sessionValidity,omitempty"` - // The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - ShopperEmail *string `json:"shopperEmail,omitempty"` - // The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - ShopperIP *string `json:"shopperIP,omitempty"` - // Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - ShopperInteraction *string `json:"shopperInteraction,omitempty"` - // The combination of a language code and a country code to specify the language to be used in the payment. - ShopperLocale *string `json:"shopperLocale,omitempty"` - ShopperName *Name `json:"shopperName,omitempty"` - // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - ShopperReference *string `json:"shopperReference,omitempty"` - // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - ShopperStatement *string `json:"shopperStatement,omitempty"` - // The shopper's social security number. - SocialSecurityNumber *string `json:"socialSecurityNumber,omitempty"` - // An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms]((https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - Splits []Split `json:"splits,omitempty"` - // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - Store *string `json:"store,omitempty"` - // 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"` - // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - // Deprecated since Adyen Checkout API v69 - // Use `authenticationData.authenticationOnly` instead. - ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` - // The token obtained when initializing the SDK. > This parameter is required for iOS and Android; not required for Web. - Token *string `json:"token,omitempty"` - // Set to true if the payment should be routed to a trusted MID. - TrustedShopper *bool `json:"trustedShopper,omitempty"` -} - -// NewPaymentSetupRequest instantiates a new PaymentSetupRequest 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 NewPaymentSetupRequest(amount Amount, countryCode string, merchantAccount string, reference string, returnUrl string) *PaymentSetupRequest { - this := PaymentSetupRequest{} - this.Amount = amount - this.CountryCode = countryCode - this.MerchantAccount = merchantAccount - this.Reference = reference - this.ReturnUrl = returnUrl - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// NewPaymentSetupRequestWithDefaults instantiates a new PaymentSetupRequest 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 NewPaymentSetupRequestWithDefaults() *PaymentSetupRequest { - this := PaymentSetupRequest{} - var threeDSAuthenticationOnly bool = false - this.ThreeDSAuthenticationOnly = &threeDSAuthenticationOnly - return &this -} - -// GetAdditionalAmount returns the AdditionalAmount field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetAdditionalAmount(v Amount) { - o.AdditionalAmount = &v -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetAllowedPaymentMethods returns the AllowedPaymentMethods field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetAllowedPaymentMethods() []string { - if o == nil || common.IsNil(o.AllowedPaymentMethods) { - var ret []string - return ret - } - return o.AllowedPaymentMethods -} - -// GetAllowedPaymentMethodsOk returns a tuple with the AllowedPaymentMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetAllowedPaymentMethodsOk() ([]string, bool) { - if o == nil || common.IsNil(o.AllowedPaymentMethods) { - return nil, false - } - return o.AllowedPaymentMethods, true -} - -// HasAllowedPaymentMethods returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasAllowedPaymentMethods() bool { - if o != nil && !common.IsNil(o.AllowedPaymentMethods) { - return true - } - - return false -} - -// SetAllowedPaymentMethods gets a reference to the given []string and assigns it to the AllowedPaymentMethods field. -func (o *PaymentSetupRequest) SetAllowedPaymentMethods(v []string) { - o.AllowedPaymentMethods = v -} - -// GetAmount returns the Amount field value -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *PaymentSetupRequest) SetAmount(v Amount) { - o.Amount = v -} - -// GetApplicationInfo returns the ApplicationInfo field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetApplicationInfo(v ApplicationInfo) { - o.ApplicationInfo = &v -} - -// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetBillingAddress(v Address) { - o.BillingAddress = &v -} - -// GetBlockedPaymentMethods returns the BlockedPaymentMethods field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetBlockedPaymentMethods() []string { - if o == nil || common.IsNil(o.BlockedPaymentMethods) { - var ret []string - return ret - } - return o.BlockedPaymentMethods -} - -// GetBlockedPaymentMethodsOk returns a tuple with the BlockedPaymentMethods field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetBlockedPaymentMethodsOk() ([]string, bool) { - if o == nil || common.IsNil(o.BlockedPaymentMethods) { - return nil, false - } - return o.BlockedPaymentMethods, true -} - -// HasBlockedPaymentMethods returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasBlockedPaymentMethods() bool { - if o != nil && !common.IsNil(o.BlockedPaymentMethods) { - return true - } - - return false -} - -// SetBlockedPaymentMethods gets a reference to the given []string and assigns it to the BlockedPaymentMethods field. -func (o *PaymentSetupRequest) SetBlockedPaymentMethods(v []string) { - o.BlockedPaymentMethods = v -} - -// GetCaptureDelayHours returns the CaptureDelayHours field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetCaptureDelayHours(v int32) { - o.CaptureDelayHours = &v -} - -// GetChannel returns the Channel field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetChannel(v string) { - o.Channel = &v -} - -// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetCheckoutAttemptId(v string) { - o.CheckoutAttemptId = &v -} - -// GetCompany returns the Company field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetCompany(v Company) { - o.Company = &v -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetConfiguration() Configuration { - if o == nil || common.IsNil(o.Configuration) { - var ret Configuration - return ret - } - return *o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetConfigurationOk() (*Configuration, bool) { - if o == nil || common.IsNil(o.Configuration) { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasConfiguration() bool { - if o != nil && !common.IsNil(o.Configuration) { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given Configuration and assigns it to the Configuration field. -func (o *PaymentSetupRequest) SetConfiguration(v Configuration) { - o.Configuration = &v -} - -// GetConversionId returns the ConversionId field value if set, zero value otherwise. -// Deprecated since Adyen Checkout API v68 -// Use `checkoutAttemptId` instead -func (o *PaymentSetupRequest) 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 since Adyen Checkout API v68 -// Use `checkoutAttemptId` instead -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 since Adyen Checkout API v68 -// Use `checkoutAttemptId` instead -func (o *PaymentSetupRequest) SetConversionId(v string) { - o.ConversionId = &v -} - -// GetCountryCode returns the CountryCode field value -func (o *PaymentSetupRequest) GetCountryCode() string { - if o == nil { - var ret string - return ret - } - - return o.CountryCode -} - -// GetCountryCodeOk returns a tuple with the CountryCode field value -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetCountryCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CountryCode, true -} - -// SetCountryCode sets field value -func (o *PaymentSetupRequest) SetCountryCode(v string) { - o.CountryCode = v -} - -// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetDateOfBirth() string { - if o == nil || common.IsNil(o.DateOfBirth) { - var ret string - return ret - } - return *o.DateOfBirth -} - -// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetDateOfBirthOk() (*string, bool) { - if o == nil || common.IsNil(o.DateOfBirth) { - return nil, false - } - return o.DateOfBirth, true -} - -// HasDateOfBirth returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasDateOfBirth() bool { - if o != nil && !common.IsNil(o.DateOfBirth) { - return true - } - - return false -} - -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *PaymentSetupRequest) SetDateOfBirth(v string) { - o.DateOfBirth = &v -} - -// GetDccQuote returns the DccQuote field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetDccQuote(v ForexQuote) { - o.DccQuote = &v -} - -// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetDeliveryAddress(v Address) { - o.DeliveryAddress = &v -} - -// GetDeliveryDate returns the DeliveryDate field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetDeliveryDate() time.Time { - if o == nil || common.IsNil(o.DeliveryDate) { - var ret time.Time - return ret - } - return *o.DeliveryDate -} - -// GetDeliveryDateOk returns a tuple with the DeliveryDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) HasDeliveryDate() bool { - if o != nil && !common.IsNil(o.DeliveryDate) { - return true - } - - return false -} - -// SetDeliveryDate gets a reference to the given time.Time and assigns it to the DeliveryDate field. -func (o *PaymentSetupRequest) SetDeliveryDate(v time.Time) { - o.DeliveryDate = &v -} - -// GetEnableOneClick returns the EnableOneClick field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetEnableOneClick(v bool) { - o.EnableOneClick = &v -} - -// GetEnablePayOut returns the EnablePayOut field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetEnablePayOut(v bool) { - o.EnablePayOut = &v -} - -// GetEnableRecurring returns the EnableRecurring field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetEnableRecurring(v bool) { - o.EnableRecurring = &v -} - -// GetEntityType returns the EntityType field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetEntityType(v string) { - o.EntityType = &v -} - -// GetFraudOffset returns the FraudOffset field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetFraudOffset(v int32) { - o.FraudOffset = &v -} - -// GetInstallments returns the Installments field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetInstallments(v Installments) { - o.Installments = &v -} - -// GetLineItems returns the LineItems field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetLineItems(v []LineItem) { - o.LineItems = v -} - -// GetLocalizedShopperStatement returns the LocalizedShopperStatement field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetLocalizedShopperStatement(v map[string]string) { - o.LocalizedShopperStatement = &v -} - -// GetMandate returns the Mandate field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetMandate(v Mandate) { - o.Mandate = &v -} - -// GetMcc returns the Mcc field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetMcc(v string) { - o.Mcc = &v -} - -// GetMerchantAccount returns the MerchantAccount field value -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) GetMerchantAccountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantAccount, true -} - -// SetMerchantAccount sets field value -func (o *PaymentSetupRequest) SetMerchantAccount(v string) { - o.MerchantAccount = v -} - -// GetMerchantOrderReference returns the MerchantOrderReference field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetMerchantOrderReference(v string) { - o.MerchantOrderReference = &v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetMetadata(v map[string]string) { - o.Metadata = &v -} - -// GetOrderReference returns the OrderReference field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetOrderReference(v string) { - o.OrderReference = &v -} - -// GetOrigin returns the Origin field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetOrigin(v string) { - o.Origin = &v -} - -// GetPlatformChargebackLogic returns the PlatformChargebackLogic field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetPlatformChargebackLogic(v PlatformChargebackLogic) { - o.PlatformChargebackLogic = &v -} - -// GetRecurringExpiry returns the RecurringExpiry field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetRecurringExpiry(v string) { - o.RecurringExpiry = &v -} - -// GetRecurringFrequency returns the RecurringFrequency field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetRecurringFrequency(v string) { - o.RecurringFrequency = &v -} - -// GetReference returns the Reference field value -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *PaymentSetupRequest) SetReference(v string) { - o.Reference = v -} - -// GetReturnUrl returns the ReturnUrl field value -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) GetReturnUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ReturnUrl, true -} - -// SetReturnUrl sets field value -func (o *PaymentSetupRequest) SetReturnUrl(v string) { - o.ReturnUrl = v -} - -// GetRiskData returns the RiskData field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetRiskData(v RiskData) { - o.RiskData = &v -} - -// GetSdkVersion returns the SdkVersion field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetSdkVersion() string { - if o == nil || common.IsNil(o.SdkVersion) { - var ret string - return ret - } - return *o.SdkVersion -} - -// GetSdkVersionOk returns a tuple with the SdkVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetSdkVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SdkVersion) { - return nil, false - } - return o.SdkVersion, true -} - -// HasSdkVersion returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasSdkVersion() bool { - if o != nil && !common.IsNil(o.SdkVersion) { - return true - } - - return false -} - -// SetSdkVersion gets a reference to the given string and assigns it to the SdkVersion field. -func (o *PaymentSetupRequest) SetSdkVersion(v string) { - o.SdkVersion = &v -} - -// GetSecureRemoteCommerceCheckoutData returns the SecureRemoteCommerceCheckoutData field value if set, zero value otherwise. -func (o *PaymentSetupRequest) GetSecureRemoteCommerceCheckoutData() SecureRemoteCommerceCheckoutData { - if o == nil || common.IsNil(o.SecureRemoteCommerceCheckoutData) { - var ret SecureRemoteCommerceCheckoutData - return ret - } - return *o.SecureRemoteCommerceCheckoutData -} - -// GetSecureRemoteCommerceCheckoutDataOk returns a tuple with the SecureRemoteCommerceCheckoutData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupRequest) GetSecureRemoteCommerceCheckoutDataOk() (*SecureRemoteCommerceCheckoutData, bool) { - if o == nil || common.IsNil(o.SecureRemoteCommerceCheckoutData) { - return nil, false - } - return o.SecureRemoteCommerceCheckoutData, true -} - -// HasSecureRemoteCommerceCheckoutData returns a boolean if a field has been set. -func (o *PaymentSetupRequest) HasSecureRemoteCommerceCheckoutData() bool { - if o != nil && !common.IsNil(o.SecureRemoteCommerceCheckoutData) { - return true - } - - return false -} - -// SetSecureRemoteCommerceCheckoutData gets a reference to the given SecureRemoteCommerceCheckoutData and assigns it to the SecureRemoteCommerceCheckoutData field. -func (o *PaymentSetupRequest) SetSecureRemoteCommerceCheckoutData(v SecureRemoteCommerceCheckoutData) { - o.SecureRemoteCommerceCheckoutData = &v -} - -// GetSessionValidity returns the SessionValidity field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetSessionValidity(v string) { - o.SessionValidity = &v -} - -// GetShopperEmail returns the ShopperEmail field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperEmail(v string) { - o.ShopperEmail = &v -} - -// GetShopperIP returns the ShopperIP field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperIP(v string) { - o.ShopperIP = &v -} - -// GetShopperInteraction returns the ShopperInteraction field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperInteraction(v string) { - o.ShopperInteraction = &v -} - -// GetShopperLocale returns the ShopperLocale field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperLocale(v string) { - o.ShopperLocale = &v -} - -// GetShopperName returns the ShopperName field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperName(v Name) { - o.ShopperName = &v -} - -// GetShopperReference returns the ShopperReference field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperReference(v string) { - o.ShopperReference = &v -} - -// GetShopperStatement returns the ShopperStatement field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetShopperStatement(v string) { - o.ShopperStatement = &v -} - -// GetSocialSecurityNumber returns the SocialSecurityNumber field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetSocialSecurityNumber(v string) { - o.SocialSecurityNumber = &v -} - -// GetSplits returns the Splits field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetSplits(v []Split) { - o.Splits = v -} - -// GetStore returns the Store field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetStore(v string) { - o.Store = &v -} - -// GetStorePaymentMethod returns the StorePaymentMethod field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetStorePaymentMethod(v bool) { - o.StorePaymentMethod = &v -} - -// GetTelephoneNumber returns the TelephoneNumber field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetTelephoneNumber(v string) { - o.TelephoneNumber = &v -} - -// GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. -// Deprecated since Adyen Checkout API v69 -// Use `authenticationData.authenticationOnly` instead. -func (o *PaymentSetupRequest) 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 since Adyen Checkout API v69 -// Use `authenticationData.authenticationOnly` instead. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 since Adyen Checkout API v69 -// Use `authenticationData.authenticationOnly` instead. -func (o *PaymentSetupRequest) SetThreeDSAuthenticationOnly(v bool) { - o.ThreeDSAuthenticationOnly = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetToken(v string) { - o.Token = &v -} - -// GetTrustedShopper returns the TrustedShopper field value if set, zero value otherwise. -func (o *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) 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 *PaymentSetupRequest) SetTrustedShopper(v bool) { - o.TrustedShopper = &v -} - -func (o PaymentSetupRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentSetupRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AdditionalAmount) { - toSerialize["additionalAmount"] = o.AdditionalAmount - } - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - if !common.IsNil(o.AllowedPaymentMethods) { - toSerialize["allowedPaymentMethods"] = o.AllowedPaymentMethods - } - toSerialize["amount"] = o.Amount - if !common.IsNil(o.ApplicationInfo) { - toSerialize["applicationInfo"] = o.ApplicationInfo - } - if !common.IsNil(o.BillingAddress) { - toSerialize["billingAddress"] = o.BillingAddress - } - if !common.IsNil(o.BlockedPaymentMethods) { - toSerialize["blockedPaymentMethods"] = o.BlockedPaymentMethods - } - if !common.IsNil(o.CaptureDelayHours) { - toSerialize["captureDelayHours"] = o.CaptureDelayHours - } - if !common.IsNil(o.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.Configuration) { - toSerialize["configuration"] = o.Configuration - } - if !common.IsNil(o.ConversionId) { - toSerialize["conversionId"] = o.ConversionId - } - toSerialize["countryCode"] = o.CountryCode - if !common.IsNil(o.DateOfBirth) { - toSerialize["dateOfBirth"] = o.DateOfBirth - } - if !common.IsNil(o.DccQuote) { - toSerialize["dccQuote"] = o.DccQuote - } - if !common.IsNil(o.DeliveryAddress) { - toSerialize["deliveryAddress"] = o.DeliveryAddress - } - if !common.IsNil(o.DeliveryDate) { - toSerialize["deliveryDate"] = o.DeliveryDate - } - if !common.IsNil(o.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.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.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !common.IsNil(o.OrderReference) { - toSerialize["orderReference"] = o.OrderReference - } - if !common.IsNil(o.Origin) { - toSerialize["origin"] = o.Origin - } - 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 - } - toSerialize["reference"] = o.Reference - toSerialize["returnUrl"] = o.ReturnUrl - if !common.IsNil(o.RiskData) { - toSerialize["riskData"] = o.RiskData - } - if !common.IsNil(o.SdkVersion) { - toSerialize["sdkVersion"] = o.SdkVersion - } - if !common.IsNil(o.SecureRemoteCommerceCheckoutData) { - toSerialize["secureRemoteCommerceCheckoutData"] = o.SecureRemoteCommerceCheckoutData - } - 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.ThreeDSAuthenticationOnly) { - toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly - } - if !common.IsNil(o.Token) { - toSerialize["token"] = o.Token - } - if !common.IsNil(o.TrustedShopper) { - toSerialize["trustedShopper"] = o.TrustedShopper - } - return toSerialize, nil -} - -type NullablePaymentSetupRequest struct { - value *PaymentSetupRequest - isSet bool -} - -func (v NullablePaymentSetupRequest) Get() *PaymentSetupRequest { - return v.value -} - -func (v *NullablePaymentSetupRequest) Set(val *PaymentSetupRequest) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentSetupRequest) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentSetupRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentSetupRequest(val *PaymentSetupRequest) *NullablePaymentSetupRequest { - return &NullablePaymentSetupRequest{value: val, isSet: true} -} - -func (v NullablePaymentSetupRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentSetupRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentSetupRequest) isValidChannel() bool { - var allowedEnumValues = []string{"iOS", "Android", "Web"} - for _, allowed := range allowedEnumValues { - if o.GetChannel() == allowed { - return true - } - } - return false -} -func (o *PaymentSetupRequest) isValidEntityType() bool { - var allowedEnumValues = []string{"NaturalPerson", "CompanyName"} - for _, allowed := range allowedEnumValues { - if o.GetEntityType() == allowed { - return true - } - } - return false -} -func (o *PaymentSetupRequest) isValidShopperInteraction() bool { - var allowedEnumValues = []string{"Ecommerce", "ContAuth", "Moto", "POS"} - for _, allowed := range allowedEnumValues { - if o.GetShopperInteraction() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_payment_setup_response.go b/src/checkout/model_payment_setup_response.go deleted file mode 100644 index a3bd47abb..000000000 --- a/src/checkout/model_payment_setup_response.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the PaymentSetupResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentSetupResponse{} - -// PaymentSetupResponse struct for PaymentSetupResponse -type PaymentSetupResponse struct { - // The encoded payment session that you need to pass to the SDK. - PaymentSession *string `json:"paymentSession,omitempty"` - // The detailed list of stored payment details required to generate payment forms. Will be empty if oneClick is set to false in the request. - // Deprecated - RecurringDetails []RecurringDetail `json:"recurringDetails,omitempty"` -} - -// NewPaymentSetupResponse instantiates a new PaymentSetupResponse 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 NewPaymentSetupResponse() *PaymentSetupResponse { - this := PaymentSetupResponse{} - return &this -} - -// NewPaymentSetupResponseWithDefaults instantiates a new PaymentSetupResponse 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 NewPaymentSetupResponseWithDefaults() *PaymentSetupResponse { - this := PaymentSetupResponse{} - return &this -} - -// GetPaymentSession returns the PaymentSession field value if set, zero value otherwise. -func (o *PaymentSetupResponse) GetPaymentSession() string { - if o == nil || common.IsNil(o.PaymentSession) { - var ret string - return ret - } - return *o.PaymentSession -} - -// GetPaymentSessionOk returns a tuple with the PaymentSession field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentSetupResponse) GetPaymentSessionOk() (*string, bool) { - if o == nil || common.IsNil(o.PaymentSession) { - return nil, false - } - return o.PaymentSession, true -} - -// HasPaymentSession returns a boolean if a field has been set. -func (o *PaymentSetupResponse) HasPaymentSession() bool { - if o != nil && !common.IsNil(o.PaymentSession) { - return true - } - - return false -} - -// SetPaymentSession gets a reference to the given string and assigns it to the PaymentSession field. -func (o *PaymentSetupResponse) SetPaymentSession(v string) { - o.PaymentSession = &v -} - -// GetRecurringDetails returns the RecurringDetails field value if set, zero value otherwise. -// Deprecated -func (o *PaymentSetupResponse) GetRecurringDetails() []RecurringDetail { - if o == nil || common.IsNil(o.RecurringDetails) { - var ret []RecurringDetail - return ret - } - return o.RecurringDetails -} - -// GetRecurringDetailsOk returns a tuple with the RecurringDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *PaymentSetupResponse) GetRecurringDetailsOk() ([]RecurringDetail, bool) { - if o == nil || common.IsNil(o.RecurringDetails) { - return nil, false - } - return o.RecurringDetails, true -} - -// HasRecurringDetails returns a boolean if a field has been set. -func (o *PaymentSetupResponse) HasRecurringDetails() bool { - if o != nil && !common.IsNil(o.RecurringDetails) { - return true - } - - return false -} - -// SetRecurringDetails gets a reference to the given []RecurringDetail and assigns it to the RecurringDetails field. -// Deprecated -func (o *PaymentSetupResponse) SetRecurringDetails(v []RecurringDetail) { - o.RecurringDetails = v -} - -func (o PaymentSetupResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentSetupResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.PaymentSession) { - toSerialize["paymentSession"] = o.PaymentSession - } - if !common.IsNil(o.RecurringDetails) { - toSerialize["recurringDetails"] = o.RecurringDetails - } - return toSerialize, nil -} - -type NullablePaymentSetupResponse struct { - value *PaymentSetupResponse - isSet bool -} - -func (v NullablePaymentSetupResponse) Get() *PaymentSetupResponse { - return v.value -} - -func (v *NullablePaymentSetupResponse) Set(val *PaymentSetupResponse) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentSetupResponse) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentSetupResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentSetupResponse(val *PaymentSetupResponse) *NullablePaymentSetupResponse { - return &NullablePaymentSetupResponse{value: val, isSet: true} -} - -func (v NullablePaymentSetupResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentSetupResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_payment_verification_request.go b/src/checkout/model_payment_verification_request.go deleted file mode 100644 index 6c2875934..000000000 --- a/src/checkout/model_payment_verification_request.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the PaymentVerificationRequest type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentVerificationRequest{} - -// PaymentVerificationRequest struct for PaymentVerificationRequest -type PaymentVerificationRequest struct { - // Encrypted and signed payment result data. You should receive this value from the Checkout SDK after the shopper completes the payment. - Payload string `json:"payload"` -} - -// NewPaymentVerificationRequest instantiates a new PaymentVerificationRequest 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 NewPaymentVerificationRequest(payload string) *PaymentVerificationRequest { - this := PaymentVerificationRequest{} - this.Payload = payload - return &this -} - -// NewPaymentVerificationRequestWithDefaults instantiates a new PaymentVerificationRequest 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 NewPaymentVerificationRequestWithDefaults() *PaymentVerificationRequest { - this := PaymentVerificationRequest{} - return &this -} - -// GetPayload returns the Payload field value -func (o *PaymentVerificationRequest) GetPayload() string { - if o == nil { - var ret string - return ret - } - - return o.Payload -} - -// GetPayloadOk returns a tuple with the Payload field value -// and a boolean to check if the value has been set. -func (o *PaymentVerificationRequest) GetPayloadOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Payload, true -} - -// SetPayload sets field value -func (o *PaymentVerificationRequest) SetPayload(v string) { - o.Payload = v -} - -func (o PaymentVerificationRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentVerificationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["payload"] = o.Payload - return toSerialize, nil -} - -type NullablePaymentVerificationRequest struct { - value *PaymentVerificationRequest - isSet bool -} - -func (v NullablePaymentVerificationRequest) Get() *PaymentVerificationRequest { - return v.value -} - -func (v *NullablePaymentVerificationRequest) Set(val *PaymentVerificationRequest) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentVerificationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentVerificationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentVerificationRequest(val *PaymentVerificationRequest) *NullablePaymentVerificationRequest { - return &NullablePaymentVerificationRequest{value: val, isSet: true} -} - -func (v NullablePaymentVerificationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentVerificationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_payment_verification_response.go b/src/checkout/model_payment_verification_response.go deleted file mode 100644 index b4ca69ae2..000000000 --- a/src/checkout/model_payment_verification_response.go +++ /dev/null @@ -1,447 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the PaymentVerificationResponse type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentVerificationResponse{} - -// PaymentVerificationResponse struct for PaymentVerificationResponse -type PaymentVerificationResponse struct { - // Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - AdditionalData *map[string]string `json:"additionalData,omitempty"` - FraudResult *FraudResult `json:"fraudResult,omitempty"` - // A unique value that you provided in the initial `/paymentSession` request as a `reference` field. - MerchantReference string `json:"merchantReference"` - Order *CheckoutOrderResponse `json:"order,omitempty"` - // Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - PspReference *string `json:"pspReference,omitempty"` - // If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - RefusalReason *string `json:"refusalReason,omitempty"` - // 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. * **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 *ServiceErrorDetails `json:"serviceError,omitempty"` - // The shopperLocale value provided in the payment request. - ShopperLocale string `json:"shopperLocale"` -} - -// NewPaymentVerificationResponse instantiates a new PaymentVerificationResponse 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 NewPaymentVerificationResponse(merchantReference string, shopperLocale string) *PaymentVerificationResponse { - this := PaymentVerificationResponse{} - this.MerchantReference = merchantReference - this.ShopperLocale = shopperLocale - return &this -} - -// NewPaymentVerificationResponseWithDefaults instantiates a new PaymentVerificationResponse 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 NewPaymentVerificationResponseWithDefaults() *PaymentVerificationResponse { - this := PaymentVerificationResponse{} - return &this -} - -// GetAdditionalData returns the AdditionalData field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) 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 *PaymentVerificationResponse) 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 *PaymentVerificationResponse) 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 *PaymentVerificationResponse) SetAdditionalData(v map[string]string) { - o.AdditionalData = &v -} - -// GetFraudResult returns the FraudResult field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetFraudResult() FraudResult { - if o == nil || common.IsNil(o.FraudResult) { - var ret FraudResult - return ret - } - return *o.FraudResult -} - -// GetFraudResultOk returns a tuple with the FraudResult field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetFraudResultOk() (*FraudResult, bool) { - if o == nil || common.IsNil(o.FraudResult) { - return nil, false - } - return o.FraudResult, true -} - -// HasFraudResult returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasFraudResult() bool { - if o != nil && !common.IsNil(o.FraudResult) { - return true - } - - return false -} - -// SetFraudResult gets a reference to the given FraudResult and assigns it to the FraudResult field. -func (o *PaymentVerificationResponse) SetFraudResult(v FraudResult) { - o.FraudResult = &v -} - -// GetMerchantReference returns the MerchantReference field value -func (o *PaymentVerificationResponse) GetMerchantReference() string { - if o == nil { - var ret string - return ret - } - - return o.MerchantReference -} - -// GetMerchantReferenceOk returns a tuple with the MerchantReference field value -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetMerchantReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MerchantReference, true -} - -// SetMerchantReference sets field value -func (o *PaymentVerificationResponse) SetMerchantReference(v string) { - o.MerchantReference = v -} - -// GetOrder returns the Order field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetOrder() CheckoutOrderResponse { - if o == nil || common.IsNil(o.Order) { - var ret CheckoutOrderResponse - 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 *PaymentVerificationResponse) GetOrderOk() (*CheckoutOrderResponse, 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 *PaymentVerificationResponse) HasOrder() bool { - if o != nil && !common.IsNil(o.Order) { - return true - } - - return false -} - -// SetOrder gets a reference to the given CheckoutOrderResponse and assigns it to the Order field. -func (o *PaymentVerificationResponse) SetOrder(v CheckoutOrderResponse) { - o.Order = &v -} - -// GetPspReference returns the PspReference field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetPspReference() string { - if o == nil || common.IsNil(o.PspReference) { - var ret string - return ret - } - return *o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetPspReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.PspReference) { - return nil, false - } - return o.PspReference, true -} - -// HasPspReference returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasPspReference() bool { - if o != nil && !common.IsNil(o.PspReference) { - return true - } - - return false -} - -// SetPspReference gets a reference to the given string and assigns it to the PspReference field. -func (o *PaymentVerificationResponse) SetPspReference(v string) { - o.PspReference = &v -} - -// GetRefusalReason returns the RefusalReason field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetRefusalReason() string { - if o == nil || common.IsNil(o.RefusalReason) { - var ret string - return ret - } - return *o.RefusalReason -} - -// GetRefusalReasonOk returns a tuple with the RefusalReason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetRefusalReasonOk() (*string, bool) { - if o == nil || common.IsNil(o.RefusalReason) { - return nil, false - } - return o.RefusalReason, true -} - -// HasRefusalReason returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasRefusalReason() bool { - if o != nil && !common.IsNil(o.RefusalReason) { - return true - } - - return false -} - -// SetRefusalReason gets a reference to the given string and assigns it to the RefusalReason field. -func (o *PaymentVerificationResponse) SetRefusalReason(v string) { - o.RefusalReason = &v -} - -// GetRefusalReasonCode returns the RefusalReasonCode field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetRefusalReasonCode() string { - if o == nil || common.IsNil(o.RefusalReasonCode) { - var ret string - return ret - } - return *o.RefusalReasonCode -} - -// GetRefusalReasonCodeOk returns a tuple with the RefusalReasonCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetRefusalReasonCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.RefusalReasonCode) { - return nil, false - } - return o.RefusalReasonCode, true -} - -// HasRefusalReasonCode returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasRefusalReasonCode() bool { - if o != nil && !common.IsNil(o.RefusalReasonCode) { - return true - } - - return false -} - -// SetRefusalReasonCode gets a reference to the given string and assigns it to the RefusalReasonCode field. -func (o *PaymentVerificationResponse) SetRefusalReasonCode(v string) { - o.RefusalReasonCode = &v -} - -// GetResultCode returns the ResultCode field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetResultCode() string { - if o == nil || common.IsNil(o.ResultCode) { - var ret string - return ret - } - return *o.ResultCode -} - -// GetResultCodeOk returns a tuple with the ResultCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetResultCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.ResultCode) { - return nil, false - } - return o.ResultCode, true -} - -// HasResultCode returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasResultCode() bool { - if o != nil && !common.IsNil(o.ResultCode) { - return true - } - - return false -} - -// SetResultCode gets a reference to the given string and assigns it to the ResultCode field. -func (o *PaymentVerificationResponse) SetResultCode(v string) { - o.ResultCode = &v -} - -// GetServiceError returns the ServiceError field value if set, zero value otherwise. -func (o *PaymentVerificationResponse) GetServiceError() ServiceErrorDetails { - if o == nil || common.IsNil(o.ServiceError) { - var ret ServiceErrorDetails - return ret - } - return *o.ServiceError -} - -// GetServiceErrorOk returns a tuple with the ServiceError field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetServiceErrorOk() (*ServiceErrorDetails, bool) { - if o == nil || common.IsNil(o.ServiceError) { - return nil, false - } - return o.ServiceError, true -} - -// HasServiceError returns a boolean if a field has been set. -func (o *PaymentVerificationResponse) HasServiceError() bool { - if o != nil && !common.IsNil(o.ServiceError) { - return true - } - - return false -} - -// SetServiceError gets a reference to the given ServiceErrorDetails and assigns it to the ServiceError field. -func (o *PaymentVerificationResponse) SetServiceError(v ServiceErrorDetails) { - o.ServiceError = &v -} - -// GetShopperLocale returns the ShopperLocale field value -func (o *PaymentVerificationResponse) GetShopperLocale() string { - if o == nil { - var ret string - return ret - } - - return o.ShopperLocale -} - -// GetShopperLocaleOk returns a tuple with the ShopperLocale field value -// and a boolean to check if the value has been set. -func (o *PaymentVerificationResponse) GetShopperLocaleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ShopperLocale, true -} - -// SetShopperLocale sets field value -func (o *PaymentVerificationResponse) SetShopperLocale(v string) { - o.ShopperLocale = v -} - -func (o PaymentVerificationResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentVerificationResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.AdditionalData) { - toSerialize["additionalData"] = o.AdditionalData - } - if !common.IsNil(o.FraudResult) { - toSerialize["fraudResult"] = o.FraudResult - } - toSerialize["merchantReference"] = o.MerchantReference - if !common.IsNil(o.Order) { - toSerialize["order"] = o.Order - } - if !common.IsNil(o.PspReference) { - toSerialize["pspReference"] = o.PspReference - } - if !common.IsNil(o.RefusalReason) { - toSerialize["refusalReason"] = o.RefusalReason - } - if !common.IsNil(o.RefusalReasonCode) { - toSerialize["refusalReasonCode"] = o.RefusalReasonCode - } - if !common.IsNil(o.ResultCode) { - toSerialize["resultCode"] = o.ResultCode - } - if !common.IsNil(o.ServiceError) { - toSerialize["serviceError"] = o.ServiceError - } - toSerialize["shopperLocale"] = o.ShopperLocale - return toSerialize, nil -} - -type NullablePaymentVerificationResponse struct { - value *PaymentVerificationResponse - isSet bool -} - -func (v NullablePaymentVerificationResponse) Get() *PaymentVerificationResponse { - return v.value -} - -func (v *NullablePaymentVerificationResponse) Set(val *PaymentVerificationResponse) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentVerificationResponse) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentVerificationResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentVerificationResponse(val *PaymentVerificationResponse) *NullablePaymentVerificationResponse { - return &NullablePaymentVerificationResponse{value: val, isSet: true} -} - -func (v NullablePaymentVerificationResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentVerificationResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *PaymentVerificationResponse) isValidResultCode() bool { - 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 - } - } - return false -} diff --git a/src/checkout/model_recurring_detail.go b/src/checkout/model_recurring_detail.go deleted file mode 100644 index c825af084..000000000 --- a/src/checkout/model_recurring_detail.go +++ /dev/null @@ -1,544 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the RecurringDetail type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &RecurringDetail{} - -// RecurringDetail struct for RecurringDetail -type RecurringDetail struct { - // A list of apps for this payment method. - Apps []PaymentMethodUPIApps `json:"apps,omitempty"` - // Brand for the selected gift card. For example: plastix, hmclub. - Brand *string `json:"brand,omitempty"` - // List of possible brands. For example: visa, mc. - Brands []string `json:"brands,omitempty"` - // The configuration of the payment method. - Configuration *map[string]string `json:"configuration,omitempty"` - // The funding source of the payment method. - FundingSource *string `json:"fundingSource,omitempty"` - Group *PaymentMethodGroup `json:"group,omitempty"` - // All input details to be provided to complete the payment with this payment method. - // Deprecated - InputDetails []InputDetail `json:"inputDetails,omitempty"` - // A list of issuers for this payment method. - Issuers []PaymentMethodIssuer `json:"issuers,omitempty"` - // The displayable name of this payment method. - Name *string `json:"name,omitempty"` - // The reference that uniquely identifies the recurring detail. - RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` - StoredDetails *StoredDetails `json:"storedDetails,omitempty"` - // The unique payment method code. - Type *string `json:"type,omitempty"` -} - -// NewRecurringDetail instantiates a new RecurringDetail 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 NewRecurringDetail() *RecurringDetail { - this := RecurringDetail{} - return &this -} - -// NewRecurringDetailWithDefaults instantiates a new RecurringDetail 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 NewRecurringDetailWithDefaults() *RecurringDetail { - this := RecurringDetail{} - return &this -} - -// GetApps returns the Apps field value if set, zero value otherwise. -func (o *RecurringDetail) GetApps() []PaymentMethodUPIApps { - if o == nil || common.IsNil(o.Apps) { - var ret []PaymentMethodUPIApps - return ret - } - return o.Apps -} - -// 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 *RecurringDetail) GetAppsOk() ([]PaymentMethodUPIApps, bool) { - if o == nil || common.IsNil(o.Apps) { - return nil, false - } - return o.Apps, true -} - -// HasApps returns a boolean if a field has been set. -func (o *RecurringDetail) HasApps() bool { - if o != nil && !common.IsNil(o.Apps) { - return true - } - - return false -} - -// SetApps gets a reference to the given []PaymentMethodUPIApps and assigns it to the Apps field. -func (o *RecurringDetail) SetApps(v []PaymentMethodUPIApps) { - o.Apps = v -} - -// GetBrand returns the Brand field value if set, zero value otherwise. -func (o *RecurringDetail) GetBrand() string { - if o == nil || common.IsNil(o.Brand) { - var ret string - return ret - } - return *o.Brand -} - -// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetBrandOk() (*string, bool) { - if o == nil || common.IsNil(o.Brand) { - return nil, false - } - return o.Brand, true -} - -// HasBrand returns a boolean if a field has been set. -func (o *RecurringDetail) HasBrand() bool { - if o != nil && !common.IsNil(o.Brand) { - return true - } - - return false -} - -// SetBrand gets a reference to the given string and assigns it to the Brand field. -func (o *RecurringDetail) SetBrand(v string) { - o.Brand = &v -} - -// GetBrands returns the Brands field value if set, zero value otherwise. -func (o *RecurringDetail) GetBrands() []string { - if o == nil || common.IsNil(o.Brands) { - var ret []string - return ret - } - return o.Brands -} - -// GetBrandsOk returns a tuple with the Brands field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetBrandsOk() ([]string, bool) { - if o == nil || common.IsNil(o.Brands) { - return nil, false - } - return o.Brands, true -} - -// HasBrands returns a boolean if a field has been set. -func (o *RecurringDetail) HasBrands() bool { - if o != nil && !common.IsNil(o.Brands) { - return true - } - - return false -} - -// SetBrands gets a reference to the given []string and assigns it to the Brands field. -func (o *RecurringDetail) SetBrands(v []string) { - o.Brands = v -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *RecurringDetail) GetConfiguration() map[string]string { - if o == nil || common.IsNil(o.Configuration) { - var ret map[string]string - return ret - } - return *o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetConfigurationOk() (*map[string]string, bool) { - if o == nil || common.IsNil(o.Configuration) { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *RecurringDetail) HasConfiguration() bool { - if o != nil && !common.IsNil(o.Configuration) { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given map[string]string and assigns it to the Configuration field. -func (o *RecurringDetail) SetConfiguration(v map[string]string) { - o.Configuration = &v -} - -// GetFundingSource returns the FundingSource field value if set, zero value otherwise. -func (o *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) SetFundingSource(v string) { - o.FundingSource = &v -} - -// GetGroup returns the Group field value if set, zero value otherwise. -func (o *RecurringDetail) GetGroup() PaymentMethodGroup { - if o == nil || common.IsNil(o.Group) { - var ret PaymentMethodGroup - return ret - } - return *o.Group -} - -// GetGroupOk returns a tuple with the Group field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetGroupOk() (*PaymentMethodGroup, bool) { - if o == nil || common.IsNil(o.Group) { - return nil, false - } - return o.Group, true -} - -// HasGroup returns a boolean if a field has been set. -func (o *RecurringDetail) HasGroup() bool { - if o != nil && !common.IsNil(o.Group) { - return true - } - - return false -} - -// SetGroup gets a reference to the given PaymentMethodGroup and assigns it to the Group field. -func (o *RecurringDetail) SetGroup(v PaymentMethodGroup) { - o.Group = &v -} - -// GetInputDetails returns the InputDetails field value if set, zero value otherwise. -// Deprecated -func (o *RecurringDetail) GetInputDetails() []InputDetail { - if o == nil || common.IsNil(o.InputDetails) { - var ret []InputDetail - return ret - } - return o.InputDetails -} - -// GetInputDetailsOk returns a tuple with the InputDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *RecurringDetail) GetInputDetailsOk() ([]InputDetail, bool) { - if o == nil || common.IsNil(o.InputDetails) { - return nil, false - } - return o.InputDetails, true -} - -// HasInputDetails returns a boolean if a field has been set. -func (o *RecurringDetail) HasInputDetails() bool { - if o != nil && !common.IsNil(o.InputDetails) { - return true - } - - return false -} - -// SetInputDetails gets a reference to the given []InputDetail and assigns it to the InputDetails field. -// Deprecated -func (o *RecurringDetail) SetInputDetails(v []InputDetail) { - o.InputDetails = v -} - -// GetIssuers returns the Issuers field value if set, zero value otherwise. -func (o *RecurringDetail) GetIssuers() []PaymentMethodIssuer { - if o == nil || common.IsNil(o.Issuers) { - var ret []PaymentMethodIssuer - return ret - } - return o.Issuers -} - -// GetIssuersOk returns a tuple with the Issuers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetIssuersOk() ([]PaymentMethodIssuer, bool) { - if o == nil || common.IsNil(o.Issuers) { - return nil, false - } - return o.Issuers, true -} - -// HasIssuers returns a boolean if a field has been set. -func (o *RecurringDetail) HasIssuers() bool { - if o != nil && !common.IsNil(o.Issuers) { - return true - } - - return false -} - -// SetIssuers gets a reference to the given []PaymentMethodIssuer and assigns it to the Issuers field. -func (o *RecurringDetail) SetIssuers(v []PaymentMethodIssuer) { - o.Issuers = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) SetName(v string) { - o.Name = &v -} - -// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. -func (o *RecurringDetail) GetRecurringDetailReference() string { - if o == nil || common.IsNil(o.RecurringDetailReference) { - var ret string - return ret - } - return *o.RecurringDetailReference -} - -// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetRecurringDetailReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.RecurringDetailReference) { - return nil, false - } - return o.RecurringDetailReference, true -} - -// HasRecurringDetailReference returns a boolean if a field has been set. -func (o *RecurringDetail) HasRecurringDetailReference() bool { - if o != nil && !common.IsNil(o.RecurringDetailReference) { - return true - } - - return false -} - -// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. -func (o *RecurringDetail) SetRecurringDetailReference(v string) { - o.RecurringDetailReference = &v -} - -// GetStoredDetails returns the StoredDetails field value if set, zero value otherwise. -func (o *RecurringDetail) GetStoredDetails() StoredDetails { - if o == nil || common.IsNil(o.StoredDetails) { - var ret StoredDetails - return ret - } - return *o.StoredDetails -} - -// GetStoredDetailsOk returns a tuple with the StoredDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RecurringDetail) GetStoredDetailsOk() (*StoredDetails, bool) { - if o == nil || common.IsNil(o.StoredDetails) { - return nil, false - } - return o.StoredDetails, true -} - -// HasStoredDetails returns a boolean if a field has been set. -func (o *RecurringDetail) HasStoredDetails() bool { - if o != nil && !common.IsNil(o.StoredDetails) { - return true - } - - return false -} - -// SetStoredDetails gets a reference to the given StoredDetails and assigns it to the StoredDetails field. -func (o *RecurringDetail) SetStoredDetails(v StoredDetails) { - o.StoredDetails = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) 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 *RecurringDetail) SetType(v string) { - o.Type = &v -} - -func (o RecurringDetail) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RecurringDetail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Apps) { - toSerialize["apps"] = o.Apps - } - if !common.IsNil(o.Brand) { - toSerialize["brand"] = o.Brand - } - if !common.IsNil(o.Brands) { - toSerialize["brands"] = o.Brands - } - if !common.IsNil(o.Configuration) { - toSerialize["configuration"] = o.Configuration - } - if !common.IsNil(o.FundingSource) { - toSerialize["fundingSource"] = o.FundingSource - } - if !common.IsNil(o.Group) { - toSerialize["group"] = o.Group - } - if !common.IsNil(o.InputDetails) { - toSerialize["inputDetails"] = o.InputDetails - } - if !common.IsNil(o.Issuers) { - toSerialize["issuers"] = o.Issuers - } - if !common.IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !common.IsNil(o.RecurringDetailReference) { - toSerialize["recurringDetailReference"] = o.RecurringDetailReference - } - if !common.IsNil(o.StoredDetails) { - toSerialize["storedDetails"] = o.StoredDetails - } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableRecurringDetail struct { - value *RecurringDetail - isSet bool -} - -func (v NullableRecurringDetail) Get() *RecurringDetail { - return v.value -} - -func (v *NullableRecurringDetail) Set(val *RecurringDetail) { - v.value = val - v.isSet = true -} - -func (v NullableRecurringDetail) IsSet() bool { - return v.isSet -} - -func (v *NullableRecurringDetail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRecurringDetail(val *RecurringDetail) *NullableRecurringDetail { - return &NullableRecurringDetail{value: val, isSet: true} -} - -func (v NullableRecurringDetail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRecurringDetail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *RecurringDetail) isValidFundingSource() bool { - var allowedEnumValues = []string{"credit", "debit"} - for _, allowed := range allowedEnumValues { - if o.GetFundingSource() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_response_additional_data_card.go b/src/checkout/model_response_additional_data_card.go index 3dd1aaaaa..45cb0adaf 100644 --- a/src/checkout/model_response_additional_data_card.go +++ b/src/checkout/model_response_additional_data_card.go @@ -31,6 +31,8 @@ type ResponseAdditionalDataCard struct { CardIssuingCurrency *string `json:"cardIssuingCurrency,omitempty"` // The card payment method used for the transaction. Example: amex CardPaymentMethod *string `json:"cardPaymentMethod,omitempty"` + // The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + CardProductId *string `json:"cardProductId,omitempty"` // The last four digits of a card number. > Returned only in case of a card payment. CardSummary *string `json:"cardSummary,omitempty"` // The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 @@ -246,6 +248,38 @@ func (o *ResponseAdditionalDataCard) SetCardPaymentMethod(v string) { o.CardPaymentMethod = &v } +// GetCardProductId returns the CardProductId field value if set, zero value otherwise. +func (o *ResponseAdditionalDataCard) GetCardProductId() string { + if o == nil || common.IsNil(o.CardProductId) { + var ret string + return ret + } + return *o.CardProductId +} + +// GetCardProductIdOk returns a tuple with the CardProductId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataCard) GetCardProductIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CardProductId) { + return nil, false + } + return o.CardProductId, true +} + +// HasCardProductId returns a boolean if a field has been set. +func (o *ResponseAdditionalDataCard) HasCardProductId() bool { + if o != nil && !common.IsNil(o.CardProductId) { + return true + } + + return false +} + +// SetCardProductId gets a reference to the given string and assigns it to the CardProductId field. +func (o *ResponseAdditionalDataCard) SetCardProductId(v string) { + o.CardProductId = &v +} + // GetCardSummary returns the CardSummary field value if set, zero value otherwise. func (o *ResponseAdditionalDataCard) GetCardSummary() string { if o == nil || common.IsNil(o.CardSummary) { @@ -338,6 +372,9 @@ func (o ResponseAdditionalDataCard) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CardPaymentMethod) { toSerialize["cardPaymentMethod"] = o.CardPaymentMethod } + if !common.IsNil(o.CardProductId) { + toSerialize["cardProductId"] = o.CardProductId + } if !common.IsNil(o.CardSummary) { toSerialize["cardSummary"] = o.CardSummary } @@ -382,3 +419,13 @@ func (v *NullableResponseAdditionalDataCard) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +func (o *ResponseAdditionalDataCard) isValidCardProductId() bool { + var allowedEnumValues = []string{"A", "B", "C", "D", "F", "MCC", "MCE", "MCF", "MCG", "MCH", "MCI"} + for _, allowed := range allowedEnumValues { + if o.GetCardProductId() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_secure_remote_commerce_checkout_data.go b/src/checkout/model_secure_remote_commerce_checkout_data.go deleted file mode 100644 index 405325a10..000000000 --- a/src/checkout/model_secure_remote_commerce_checkout_data.go +++ /dev/null @@ -1,320 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the SecureRemoteCommerceCheckoutData type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &SecureRemoteCommerceCheckoutData{} - -// SecureRemoteCommerceCheckoutData struct for SecureRemoteCommerceCheckoutData -type SecureRemoteCommerceCheckoutData struct { - // The Secure Remote Commerce checkout payload to process the payment with. - CheckoutPayload *string `json:"checkoutPayload,omitempty"` - // This is the unique identifier generated by SRC system to track and link SRC messages. Available within the present checkout session (e.g. received in an earlier API response during the present session). - CorrelationId *string `json:"correlationId,omitempty"` - // The [card verification code](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#card-security-code-cvc-cvv-cid). - Cvc *string `json:"cvc,omitempty"` - // A unique identifier that represents the token associated with a card enrolled. Required for scheme 'mc'. - DigitalCardId *string `json:"digitalCardId,omitempty"` - // The Secure Remote Commerce scheme. - Scheme *string `json:"scheme,omitempty"` - // A unique identifier that represents the token associated with a card enrolled. Required for scheme 'visa'. - TokenReference *string `json:"tokenReference,omitempty"` -} - -// NewSecureRemoteCommerceCheckoutData instantiates a new SecureRemoteCommerceCheckoutData 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 NewSecureRemoteCommerceCheckoutData() *SecureRemoteCommerceCheckoutData { - this := SecureRemoteCommerceCheckoutData{} - return &this -} - -// NewSecureRemoteCommerceCheckoutDataWithDefaults instantiates a new SecureRemoteCommerceCheckoutData 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 NewSecureRemoteCommerceCheckoutDataWithDefaults() *SecureRemoteCommerceCheckoutData { - this := SecureRemoteCommerceCheckoutData{} - return &this -} - -// GetCheckoutPayload returns the CheckoutPayload field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetCheckoutPayload() string { - if o == nil || common.IsNil(o.CheckoutPayload) { - var ret string - return ret - } - return *o.CheckoutPayload -} - -// GetCheckoutPayloadOk returns a tuple with the CheckoutPayload field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetCheckoutPayloadOk() (*string, bool) { - if o == nil || common.IsNil(o.CheckoutPayload) { - return nil, false - } - return o.CheckoutPayload, true -} - -// HasCheckoutPayload returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasCheckoutPayload() bool { - if o != nil && !common.IsNil(o.CheckoutPayload) { - return true - } - - return false -} - -// SetCheckoutPayload gets a reference to the given string and assigns it to the CheckoutPayload field. -func (o *SecureRemoteCommerceCheckoutData) SetCheckoutPayload(v string) { - o.CheckoutPayload = &v -} - -// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetCorrelationId() string { - if o == nil || common.IsNil(o.CorrelationId) { - var ret string - return ret - } - return *o.CorrelationId -} - -// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetCorrelationIdOk() (*string, bool) { - if o == nil || common.IsNil(o.CorrelationId) { - return nil, false - } - return o.CorrelationId, true -} - -// HasCorrelationId returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasCorrelationId() bool { - if o != nil && !common.IsNil(o.CorrelationId) { - return true - } - - return false -} - -// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -func (o *SecureRemoteCommerceCheckoutData) SetCorrelationId(v string) { - o.CorrelationId = &v -} - -// GetCvc returns the Cvc field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetCvc() string { - if o == nil || common.IsNil(o.Cvc) { - var ret string - return ret - } - return *o.Cvc -} - -// GetCvcOk returns a tuple with the Cvc field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetCvcOk() (*string, bool) { - if o == nil || common.IsNil(o.Cvc) { - return nil, false - } - return o.Cvc, true -} - -// HasCvc returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasCvc() bool { - if o != nil && !common.IsNil(o.Cvc) { - return true - } - - return false -} - -// SetCvc gets a reference to the given string and assigns it to the Cvc field. -func (o *SecureRemoteCommerceCheckoutData) SetCvc(v string) { - o.Cvc = &v -} - -// GetDigitalCardId returns the DigitalCardId field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetDigitalCardId() string { - if o == nil || common.IsNil(o.DigitalCardId) { - var ret string - return ret - } - return *o.DigitalCardId -} - -// GetDigitalCardIdOk returns a tuple with the DigitalCardId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetDigitalCardIdOk() (*string, bool) { - if o == nil || common.IsNil(o.DigitalCardId) { - return nil, false - } - return o.DigitalCardId, true -} - -// HasDigitalCardId returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasDigitalCardId() bool { - if o != nil && !common.IsNil(o.DigitalCardId) { - return true - } - - return false -} - -// SetDigitalCardId gets a reference to the given string and assigns it to the DigitalCardId field. -func (o *SecureRemoteCommerceCheckoutData) SetDigitalCardId(v string) { - o.DigitalCardId = &v -} - -// GetScheme returns the Scheme field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetScheme() string { - if o == nil || common.IsNil(o.Scheme) { - var ret string - return ret - } - return *o.Scheme -} - -// GetSchemeOk returns a tuple with the Scheme field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetSchemeOk() (*string, bool) { - if o == nil || common.IsNil(o.Scheme) { - return nil, false - } - return o.Scheme, true -} - -// HasScheme returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasScheme() bool { - if o != nil && !common.IsNil(o.Scheme) { - return true - } - - return false -} - -// SetScheme gets a reference to the given string and assigns it to the Scheme field. -func (o *SecureRemoteCommerceCheckoutData) SetScheme(v string) { - o.Scheme = &v -} - -// GetTokenReference returns the TokenReference field value if set, zero value otherwise. -func (o *SecureRemoteCommerceCheckoutData) GetTokenReference() string { - if o == nil || common.IsNil(o.TokenReference) { - var ret string - return ret - } - return *o.TokenReference -} - -// GetTokenReferenceOk returns a tuple with the TokenReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SecureRemoteCommerceCheckoutData) GetTokenReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.TokenReference) { - return nil, false - } - return o.TokenReference, true -} - -// HasTokenReference returns a boolean if a field has been set. -func (o *SecureRemoteCommerceCheckoutData) HasTokenReference() bool { - if o != nil && !common.IsNil(o.TokenReference) { - return true - } - - return false -} - -// SetTokenReference gets a reference to the given string and assigns it to the TokenReference field. -func (o *SecureRemoteCommerceCheckoutData) SetTokenReference(v string) { - o.TokenReference = &v -} - -func (o SecureRemoteCommerceCheckoutData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SecureRemoteCommerceCheckoutData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.CheckoutPayload) { - toSerialize["checkoutPayload"] = o.CheckoutPayload - } - if !common.IsNil(o.CorrelationId) { - toSerialize["correlationId"] = o.CorrelationId - } - if !common.IsNil(o.Cvc) { - toSerialize["cvc"] = o.Cvc - } - if !common.IsNil(o.DigitalCardId) { - toSerialize["digitalCardId"] = o.DigitalCardId - } - if !common.IsNil(o.Scheme) { - toSerialize["scheme"] = o.Scheme - } - if !common.IsNil(o.TokenReference) { - toSerialize["tokenReference"] = o.TokenReference - } - return toSerialize, nil -} - -type NullableSecureRemoteCommerceCheckoutData struct { - value *SecureRemoteCommerceCheckoutData - isSet bool -} - -func (v NullableSecureRemoteCommerceCheckoutData) Get() *SecureRemoteCommerceCheckoutData { - return v.value -} - -func (v *NullableSecureRemoteCommerceCheckoutData) Set(val *SecureRemoteCommerceCheckoutData) { - v.value = val - v.isSet = true -} - -func (v NullableSecureRemoteCommerceCheckoutData) IsSet() bool { - return v.isSet -} - -func (v *NullableSecureRemoteCommerceCheckoutData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSecureRemoteCommerceCheckoutData(val *SecureRemoteCommerceCheckoutData) *NullableSecureRemoteCommerceCheckoutData { - return &NullableSecureRemoteCommerceCheckoutData{value: val, isSet: true} -} - -func (v NullableSecureRemoteCommerceCheckoutData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSecureRemoteCommerceCheckoutData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *SecureRemoteCommerceCheckoutData) isValidScheme() bool { - var allowedEnumValues = []string{"mc", "visa"} - for _, allowed := range allowedEnumValues { - if o.GetScheme() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_service_error_details.go b/src/checkout/model_service_error_details.go deleted file mode 100644 index 51309df34..000000000 --- a/src/checkout/model_service_error_details.go +++ /dev/null @@ -1,232 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the ServiceErrorDetails type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &ServiceErrorDetails{} - -// ServiceErrorDetails struct for ServiceErrorDetails -type ServiceErrorDetails struct { - ErrorCode *string `json:"errorCode,omitempty"` - ErrorType *string `json:"errorType,omitempty"` - Message *string `json:"message,omitempty"` - PspReference *string `json:"pspReference,omitempty"` -} - -// NewServiceErrorDetails instantiates a new ServiceErrorDetails 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 NewServiceErrorDetails() *ServiceErrorDetails { - this := ServiceErrorDetails{} - return &this -} - -// NewServiceErrorDetailsWithDefaults instantiates a new ServiceErrorDetails 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 NewServiceErrorDetailsWithDefaults() *ServiceErrorDetails { - this := ServiceErrorDetails{} - return &this -} - -// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. -func (o *ServiceErrorDetails) GetErrorCode() string { - if o == nil || common.IsNil(o.ErrorCode) { - var ret string - return ret - } - return *o.ErrorCode -} - -// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceErrorDetails) GetErrorCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.ErrorCode) { - return nil, false - } - return o.ErrorCode, true -} - -// HasErrorCode returns a boolean if a field has been set. -func (o *ServiceErrorDetails) HasErrorCode() bool { - if o != nil && !common.IsNil(o.ErrorCode) { - return true - } - - return false -} - -// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. -func (o *ServiceErrorDetails) SetErrorCode(v string) { - o.ErrorCode = &v -} - -// GetErrorType returns the ErrorType field value if set, zero value otherwise. -func (o *ServiceErrorDetails) GetErrorType() string { - if o == nil || common.IsNil(o.ErrorType) { - var ret string - return ret - } - return *o.ErrorType -} - -// GetErrorTypeOk returns a tuple with the ErrorType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceErrorDetails) GetErrorTypeOk() (*string, bool) { - if o == nil || common.IsNil(o.ErrorType) { - return nil, false - } - return o.ErrorType, true -} - -// HasErrorType returns a boolean if a field has been set. -func (o *ServiceErrorDetails) HasErrorType() bool { - if o != nil && !common.IsNil(o.ErrorType) { - return true - } - - return false -} - -// SetErrorType gets a reference to the given string and assigns it to the ErrorType field. -func (o *ServiceErrorDetails) SetErrorType(v string) { - o.ErrorType = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *ServiceErrorDetails) GetMessage() string { - if o == nil || common.IsNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceErrorDetails) GetMessageOk() (*string, bool) { - if o == nil || common.IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *ServiceErrorDetails) HasMessage() bool { - if o != nil && !common.IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ServiceErrorDetails) SetMessage(v string) { - o.Message = &v -} - -// GetPspReference returns the PspReference field value if set, zero value otherwise. -func (o *ServiceErrorDetails) GetPspReference() string { - if o == nil || common.IsNil(o.PspReference) { - var ret string - return ret - } - return *o.PspReference -} - -// GetPspReferenceOk returns a tuple with the PspReference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceErrorDetails) GetPspReferenceOk() (*string, bool) { - if o == nil || common.IsNil(o.PspReference) { - return nil, false - } - return o.PspReference, true -} - -// HasPspReference returns a boolean if a field has been set. -func (o *ServiceErrorDetails) HasPspReference() bool { - if o != nil && !common.IsNil(o.PspReference) { - return true - } - - return false -} - -// SetPspReference gets a reference to the given string and assigns it to the PspReference field. -func (o *ServiceErrorDetails) SetPspReference(v string) { - o.PspReference = &v -} - -func (o ServiceErrorDetails) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ServiceErrorDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.ErrorCode) { - toSerialize["errorCode"] = o.ErrorCode - } - if !common.IsNil(o.ErrorType) { - toSerialize["errorType"] = o.ErrorType - } - if !common.IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !common.IsNil(o.PspReference) { - toSerialize["pspReference"] = o.PspReference - } - return toSerialize, nil -} - -type NullableServiceErrorDetails struct { - value *ServiceErrorDetails - isSet bool -} - -func (v NullableServiceErrorDetails) Get() *ServiceErrorDetails { - return v.value -} - -func (v *NullableServiceErrorDetails) Set(val *ServiceErrorDetails) { - v.value = val - v.isSet = true -} - -func (v NullableServiceErrorDetails) IsSet() bool { - return v.isSet -} - -func (v *NullableServiceErrorDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServiceErrorDetails(val *ServiceErrorDetails) *NullableServiceErrorDetails { - return &NullableServiceErrorDetails{value: val, isSet: true} -} - -func (v NullableServiceErrorDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServiceErrorDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_shopper_input.go b/src/checkout/model_shopper_input.go deleted file mode 100644 index 29d9d5f7d..000000000 --- a/src/checkout/model_shopper_input.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the ShopperInput type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &ShopperInput{} - -// ShopperInput struct for ShopperInput -type ShopperInput struct { - // Specifies visibility of billing address fields. Permitted values: * editable * hidden * readOnly - BillingAddress *string `json:"billingAddress,omitempty"` - // Specifies visibility of delivery address fields. Permitted values: * editable * hidden * readOnly - DeliveryAddress *string `json:"deliveryAddress,omitempty"` - // Specifies visibility of personal details. Permitted values: * editable * hidden * readOnly - PersonalDetails *string `json:"personalDetails,omitempty"` -} - -// NewShopperInput instantiates a new ShopperInput 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 NewShopperInput() *ShopperInput { - this := ShopperInput{} - return &this -} - -// NewShopperInputWithDefaults instantiates a new ShopperInput 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 NewShopperInputWithDefaults() *ShopperInput { - this := ShopperInput{} - return &this -} - -// GetBillingAddress returns the BillingAddress field value if set, zero value otherwise. -func (o *ShopperInput) GetBillingAddress() string { - if o == nil || common.IsNil(o.BillingAddress) { - var ret string - 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 *ShopperInput) GetBillingAddressOk() (*string, 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 *ShopperInput) HasBillingAddress() bool { - if o != nil && !common.IsNil(o.BillingAddress) { - return true - } - - return false -} - -// SetBillingAddress gets a reference to the given string and assigns it to the BillingAddress field. -func (o *ShopperInput) SetBillingAddress(v string) { - o.BillingAddress = &v -} - -// GetDeliveryAddress returns the DeliveryAddress field value if set, zero value otherwise. -func (o *ShopperInput) GetDeliveryAddress() string { - if o == nil || common.IsNil(o.DeliveryAddress) { - var ret string - 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 *ShopperInput) GetDeliveryAddressOk() (*string, 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 *ShopperInput) HasDeliveryAddress() bool { - if o != nil && !common.IsNil(o.DeliveryAddress) { - return true - } - - return false -} - -// SetDeliveryAddress gets a reference to the given string and assigns it to the DeliveryAddress field. -func (o *ShopperInput) SetDeliveryAddress(v string) { - o.DeliveryAddress = &v -} - -// GetPersonalDetails returns the PersonalDetails field value if set, zero value otherwise. -func (o *ShopperInput) GetPersonalDetails() string { - if o == nil || common.IsNil(o.PersonalDetails) { - var ret string - return ret - } - return *o.PersonalDetails -} - -// GetPersonalDetailsOk returns a tuple with the PersonalDetails field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ShopperInput) GetPersonalDetailsOk() (*string, bool) { - if o == nil || common.IsNil(o.PersonalDetails) { - return nil, false - } - return o.PersonalDetails, true -} - -// HasPersonalDetails returns a boolean if a field has been set. -func (o *ShopperInput) HasPersonalDetails() bool { - if o != nil && !common.IsNil(o.PersonalDetails) { - return true - } - - return false -} - -// SetPersonalDetails gets a reference to the given string and assigns it to the PersonalDetails field. -func (o *ShopperInput) SetPersonalDetails(v string) { - o.PersonalDetails = &v -} - -func (o ShopperInput) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShopperInput) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.BillingAddress) { - toSerialize["billingAddress"] = o.BillingAddress - } - if !common.IsNil(o.DeliveryAddress) { - toSerialize["deliveryAddress"] = o.DeliveryAddress - } - if !common.IsNil(o.PersonalDetails) { - toSerialize["personalDetails"] = o.PersonalDetails - } - return toSerialize, nil -} - -type NullableShopperInput struct { - value *ShopperInput - isSet bool -} - -func (v NullableShopperInput) Get() *ShopperInput { - return v.value -} - -func (v *NullableShopperInput) Set(val *ShopperInput) { - v.value = val - v.isSet = true -} - -func (v NullableShopperInput) IsSet() bool { - return v.isSet -} - -func (v *NullableShopperInput) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShopperInput(val *ShopperInput) *NullableShopperInput { - return &NullableShopperInput{value: val, isSet: true} -} - -func (v NullableShopperInput) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShopperInput) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *ShopperInput) isValidBillingAddress() bool { - var allowedEnumValues = []string{"editable", "hidden", "readOnly"} - for _, allowed := range allowedEnumValues { - if o.GetBillingAddress() == allowed { - return true - } - } - return false -} -func (o *ShopperInput) isValidDeliveryAddress() bool { - var allowedEnumValues = []string{"editable", "hidden", "readOnly"} - for _, allowed := range allowedEnumValues { - if o.GetDeliveryAddress() == allowed { - return true - } - } - return false -} -func (o *ShopperInput) isValidPersonalDetails() bool { - var allowedEnumValues = []string{"editable", "hidden", "readOnly"} - for _, allowed := range allowedEnumValues { - if o.GetPersonalDetails() == allowed { - return true - } - } - return false -} diff --git a/src/checkout/model_stored_details.go b/src/checkout/model_stored_details.go deleted file mode 100644 index fbac4a444..000000000 --- a/src/checkout/model_stored_details.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Adyen Checkout API - -API version: 71 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package checkout - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the StoredDetails type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &StoredDetails{} - -// StoredDetails struct for StoredDetails -type StoredDetails struct { - Bank *BankAccount `json:"bank,omitempty"` - Card *Card `json:"card,omitempty"` - // The email associated with stored payment details. - EmailAddress *string `json:"emailAddress,omitempty"` -} - -// NewStoredDetails instantiates a new StoredDetails 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 NewStoredDetails() *StoredDetails { - this := StoredDetails{} - return &this -} - -// NewStoredDetailsWithDefaults instantiates a new StoredDetails 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 NewStoredDetailsWithDefaults() *StoredDetails { - this := StoredDetails{} - return &this -} - -// GetBank returns the Bank field value if set, zero value otherwise. -func (o *StoredDetails) GetBank() BankAccount { - if o == nil || common.IsNil(o.Bank) { - var ret BankAccount - return ret - } - return *o.Bank -} - -// GetBankOk returns a tuple with the Bank field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StoredDetails) GetBankOk() (*BankAccount, bool) { - if o == nil || common.IsNil(o.Bank) { - return nil, false - } - return o.Bank, true -} - -// HasBank returns a boolean if a field has been set. -func (o *StoredDetails) HasBank() bool { - if o != nil && !common.IsNil(o.Bank) { - return true - } - - return false -} - -// SetBank gets a reference to the given BankAccount and assigns it to the Bank field. -func (o *StoredDetails) SetBank(v BankAccount) { - o.Bank = &v -} - -// GetCard returns the Card field value if set, zero value otherwise. -func (o *StoredDetails) GetCard() Card { - if o == nil || common.IsNil(o.Card) { - var ret Card - return ret - } - return *o.Card -} - -// GetCardOk returns a tuple with the Card field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StoredDetails) GetCardOk() (*Card, bool) { - if o == nil || common.IsNil(o.Card) { - return nil, false - } - return o.Card, true -} - -// HasCard returns a boolean if a field has been set. -func (o *StoredDetails) HasCard() bool { - if o != nil && !common.IsNil(o.Card) { - return true - } - - return false -} - -// SetCard gets a reference to the given Card and assigns it to the Card field. -func (o *StoredDetails) SetCard(v Card) { - o.Card = &v -} - -// GetEmailAddress returns the EmailAddress field value if set, zero value otherwise. -func (o *StoredDetails) GetEmailAddress() string { - if o == nil || common.IsNil(o.EmailAddress) { - var ret string - return ret - } - return *o.EmailAddress -} - -// GetEmailAddressOk returns a tuple with the EmailAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StoredDetails) GetEmailAddressOk() (*string, bool) { - if o == nil || common.IsNil(o.EmailAddress) { - return nil, false - } - return o.EmailAddress, true -} - -// HasEmailAddress returns a boolean if a field has been set. -func (o *StoredDetails) HasEmailAddress() bool { - if o != nil && !common.IsNil(o.EmailAddress) { - return true - } - - return false -} - -// SetEmailAddress gets a reference to the given string and assigns it to the EmailAddress field. -func (o *StoredDetails) SetEmailAddress(v string) { - o.EmailAddress = &v -} - -func (o StoredDetails) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StoredDetails) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Bank) { - toSerialize["bank"] = o.Bank - } - if !common.IsNil(o.Card) { - toSerialize["card"] = o.Card - } - if !common.IsNil(o.EmailAddress) { - toSerialize["emailAddress"] = o.EmailAddress - } - return toSerialize, nil -} - -type NullableStoredDetails struct { - value *StoredDetails - isSet bool -} - -func (v NullableStoredDetails) Get() *StoredDetails { - return v.value -} - -func (v *NullableStoredDetails) Set(val *StoredDetails) { - v.value = val - v.isSet = true -} - -func (v NullableStoredDetails) IsSet() bool { - return v.isSet -} - -func (v *NullableStoredDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStoredDetails(val *StoredDetails) *NullableStoredDetails { - return &NullableStoredDetails{value: val, isSet: true} -} - -func (v NullableStoredDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStoredDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/checkout/model_stored_payment_method_details.go b/src/checkout/model_stored_payment_method_details.go index 9a7eea42f..54df9532f 100644 --- a/src/checkout/model_stored_payment_method_details.go +++ b/src/checkout/model_stored_payment_method_details.go @@ -244,7 +244,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", "dana", "kakaopay", "truemoney"} + var allowedEnumValues = []string{"bcmc_mobile", "bcmc_mobile_QR", "bcmc_mobile_app", "momo_wallet", "momo_wallet_app", "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_three_ds_request_data.go b/src/checkout/model_three_ds_request_data.go index 25d523d82..509a03b8e 100644 --- a/src/checkout/model_three_ds_request_data.go +++ b/src/checkout/model_three_ds_request_data.go @@ -23,7 +23,7 @@ type ThreeDSRequestData struct { ChallengeWindowSize *string `json:"challengeWindowSize,omitempty"` // Flag for data only flow. DataOnly *string `json:"dataOnly,omitempty"` - // Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. + // Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be used when available. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Only use the redirect 3D Secure authentication flow. NativeThreeDS *string `json:"nativeThreeDS,omitempty"` // The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** ThreeDSVersion *string `json:"threeDSVersion,omitempty"` @@ -254,7 +254,7 @@ func (o *ThreeDSRequestData) isValidDataOnly() bool { return false } func (o *ThreeDSRequestData) isValidNativeThreeDS() bool { - var allowedEnumValues = []string{"preferred"} + var allowedEnumValues = []string{"preferred", "disabled"} for _, allowed := range allowedEnumValues { if o.GetNativeThreeDS() == allowed { return true diff --git a/src/checkout/model_twint_details.go b/src/checkout/model_twint_details.go new file mode 100644 index 000000000..9962e8327 --- /dev/null +++ b/src/checkout/model_twint_details.go @@ -0,0 +1,291 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the TwintDetails type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TwintDetails{} + +// TwintDetails struct for TwintDetails +type TwintDetails struct { + // The checkout attempt identifier. + CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + // Deprecated since Adyen Checkout API v49 + // Use `storedPaymentMethodId` instead. + RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` + // The type of flow to initiate. + Subtype *string `json:"subtype,omitempty"` + // The payment method type. + Type *string `json:"type,omitempty"` +} + +// NewTwintDetails instantiates a new TwintDetails 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 NewTwintDetails() *TwintDetails { + this := TwintDetails{} + return &this +} + +// NewTwintDetailsWithDefaults instantiates a new TwintDetails 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 NewTwintDetailsWithDefaults() *TwintDetails { + this := TwintDetails{} + return &this +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *TwintDetails) 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 *TwintDetails) 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 *TwintDetails) 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 *TwintDetails) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *TwintDetails) GetRecurringDetailReference() string { + if o == nil || common.IsNil(o.RecurringDetailReference) { + var ret string + return ret + } + return *o.RecurringDetailReference +} + +// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *TwintDetails) GetRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.RecurringDetailReference) { + return nil, false + } + return o.RecurringDetailReference, true +} + +// HasRecurringDetailReference returns a boolean if a field has been set. +func (o *TwintDetails) HasRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.RecurringDetailReference) { + return true + } + + return false +} + +// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *TwintDetails) SetRecurringDetailReference(v string) { + o.RecurringDetailReference = &v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. +func (o *TwintDetails) GetStoredPaymentMethodId() string { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + var ret string + return ret + } + return *o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TwintDetails) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + return nil, false + } + return o.StoredPaymentMethodId, true +} + +// HasStoredPaymentMethodId returns a boolean if a field has been set. +func (o *TwintDetails) HasStoredPaymentMethodId() bool { + if o != nil && !common.IsNil(o.StoredPaymentMethodId) { + return true + } + + return false +} + +// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field. +func (o *TwintDetails) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = &v +} + +// GetSubtype returns the Subtype field value if set, zero value otherwise. +func (o *TwintDetails) GetSubtype() string { + if o == nil || common.IsNil(o.Subtype) { + var ret string + return ret + } + return *o.Subtype +} + +// GetSubtypeOk returns a tuple with the Subtype field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TwintDetails) GetSubtypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Subtype) { + return nil, false + } + return o.Subtype, true +} + +// HasSubtype returns a boolean if a field has been set. +func (o *TwintDetails) HasSubtype() bool { + if o != nil && !common.IsNil(o.Subtype) { + return true + } + + return false +} + +// SetSubtype gets a reference to the given string and assigns it to the Subtype field. +func (o *TwintDetails) SetSubtype(v string) { + o.Subtype = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TwintDetails) 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 *TwintDetails) 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 *TwintDetails) 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 *TwintDetails) SetType(v string) { + o.Type = &v +} + +func (o TwintDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TwintDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CheckoutAttemptId) { + toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId + } + if !common.IsNil(o.RecurringDetailReference) { + toSerialize["recurringDetailReference"] = o.RecurringDetailReference + } + if !common.IsNil(o.StoredPaymentMethodId) { + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + } + if !common.IsNil(o.Subtype) { + toSerialize["subtype"] = o.Subtype + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableTwintDetails struct { + value *TwintDetails + isSet bool +} + +func (v NullableTwintDetails) Get() *TwintDetails { + return v.value +} + +func (v *NullableTwintDetails) Set(val *TwintDetails) { + v.value = val + v.isSet = true +} + +func (v NullableTwintDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableTwintDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTwintDetails(val *TwintDetails) *NullableTwintDetails { + return &NullableTwintDetails{value: val, isSet: true} +} + +func (v NullableTwintDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTwintDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TwintDetails) isValidType() bool { + var allowedEnumValues = []string{"twint"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/common/model_rest_service_error.go b/src/common/model_rest_service_error.go index 2654fb816..ebc1e3e62 100644 --- a/src/common/model_rest_service_error.go +++ b/src/common/model_rest_service_error.go @@ -26,7 +26,7 @@ type RestServiceError struct { // Detailed explanation of each validation error, when applicable. InvalidFields []InvalidField `json:"invalidFields,omitempty"` // A unique reference for the request, essentially the same as `pspReference`. - RequestId *string `json:"requestId,omitempty"` + RequestId *string `json:"requestId,omitempty"` // The HTTP status code. Status int32 `json:"status"` // A short, human-readable summary of the problem type. diff --git a/src/configurationwebhook/.openapi-generator-ignore b/src/configurationwebhook/.openapi-generator-ignore deleted file mode 100644 index ac5d64112..000000000 --- a/src/configurationwebhook/.openapi-generator-ignore +++ /dev/null @@ -1,7 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go - -# Webhook handler is not a generated file and should remain untouched -webhook_handler.go \ No newline at end of file diff --git a/src/configurationwebhook/.openapi-generator/VERSION b/src/configurationwebhook/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/configurationwebhook/.openapi-generator/VERSION +++ b/src/configurationwebhook/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/configurationwebhook/model_account_holder.go b/src/configurationwebhook/model_account_holder.go index 4095c3791..2ea2c49de 100644 --- a/src/configurationwebhook/model_account_holder.go +++ b/src/configurationwebhook/model_account_holder.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -39,7 +39,7 @@ type AccountHolder struct { PrimaryBalanceAccount *string `json:"primaryBalanceAccount,omitempty"` // Your reference for the account holder. Reference *string `json:"reference,omitempty"` - // The status of the account holder. Possible values: * **Active**: The account holder is active. This is the default status when creating an account holder. * **Inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **Suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **Closed**: The account holder is permanently deactivated by you. This action cannot be undone. + // The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. Status *string `json:"status,omitempty"` // The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` @@ -554,7 +554,7 @@ func (v *NullableAccountHolder) UnmarshalJSON(src []byte) error { } func (o *AccountHolder) isValidStatus() bool { - var allowedEnumValues = []string{"Active", "Closed", "Inactive", "Suspended"} + var allowedEnumValues = []string{"active", "closed", "suspended"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/configurationwebhook/model_account_holder_capability.go b/src/configurationwebhook/model_account_holder_capability.go index ece2a7e24..5b22bf92e 100644 --- a/src/configurationwebhook/model_account_holder_capability.go +++ b/src/configurationwebhook/model_account_holder_capability.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_account_holder_notification_data.go b/src/configurationwebhook/model_account_holder_notification_data.go index e7faf35a1..bb401809d 100644 --- a/src/configurationwebhook/model_account_holder_notification_data.go +++ b/src/configurationwebhook/model_account_holder_notification_data.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_account_holder_notification_request.go b/src/configurationwebhook/model_account_holder_notification_request.go index a99ff4a46..da576fcd1 100644 --- a/src/configurationwebhook/model_account_holder_notification_request.go +++ b/src/configurationwebhook/model_account_holder_notification_request.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_account_supporting_entity_capability.go b/src/configurationwebhook/model_account_supporting_entity_capability.go index 380cfa68d..1d84c719e 100644 --- a/src/configurationwebhook/model_account_supporting_entity_capability.go +++ b/src/configurationwebhook/model_account_supporting_entity_capability.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_address.go b/src/configurationwebhook/model_address.go index 8ba4e7953..63e81f2ab 100644 --- a/src/configurationwebhook/model_address.go +++ b/src/configurationwebhook/model_address.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_amount.go b/src/configurationwebhook/model_amount.go index b72b324db..7cf15dc92 100644 --- a/src/configurationwebhook/model_amount.go +++ b/src/configurationwebhook/model_amount.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_authentication.go b/src/configurationwebhook/model_authentication.go index 8f4af021d..f426b012f 100644 --- a/src/configurationwebhook/model_authentication.go +++ b/src/configurationwebhook/model_authentication.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_balance.go b/src/configurationwebhook/model_balance.go index 3496a252d..a1ddc9dad 100644 --- a/src/configurationwebhook/model_balance.go +++ b/src/configurationwebhook/model_balance.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_balance_account.go b/src/configurationwebhook/model_balance_account.go index a39da78d9..d096b6974 100644 --- a/src/configurationwebhook/model_balance_account.go +++ b/src/configurationwebhook/model_balance_account.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,13 +32,11 @@ type BalanceAccount struct { // A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. Metadata *map[string]string `json:"metadata,omitempty"` // The unique identifier of the account of the migrated account holder in the classic integration. - MigratedAccountCode *string `json:"migratedAccountCode,omitempty"` - // List of [payment instruments](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments) associated with the balance account. - PaymentInstruments []PaymentInstrumentReference `json:"paymentInstruments,omitempty"` + MigratedAccountCode *string `json:"migratedAccountCode,omitempty"` PlatformPaymentConfiguration *PlatformPaymentConfiguration `json:"platformPaymentConfiguration,omitempty"` // Your reference for the balance account, maximum 150 characters. Reference *string `json:"reference,omitempty"` - // The status of the balance account, set to **Active** by default. + // The status of the balance account, set to **active** by default. Status *string `json:"status,omitempty"` // The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` @@ -271,38 +269,6 @@ func (o *BalanceAccount) SetMigratedAccountCode(v string) { o.MigratedAccountCode = &v } -// GetPaymentInstruments returns the PaymentInstruments field value if set, zero value otherwise. -func (o *BalanceAccount) GetPaymentInstruments() []PaymentInstrumentReference { - if o == nil || common.IsNil(o.PaymentInstruments) { - var ret []PaymentInstrumentReference - return ret - } - return o.PaymentInstruments -} - -// GetPaymentInstrumentsOk returns a tuple with the PaymentInstruments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BalanceAccount) GetPaymentInstrumentsOk() ([]PaymentInstrumentReference, bool) { - if o == nil || common.IsNil(o.PaymentInstruments) { - return nil, false - } - return o.PaymentInstruments, true -} - -// HasPaymentInstruments returns a boolean if a field has been set. -func (o *BalanceAccount) HasPaymentInstruments() bool { - if o != nil && !common.IsNil(o.PaymentInstruments) { - return true - } - - return false -} - -// SetPaymentInstruments gets a reference to the given []PaymentInstrumentReference and assigns it to the PaymentInstruments field. -func (o *BalanceAccount) SetPaymentInstruments(v []PaymentInstrumentReference) { - o.PaymentInstruments = v -} - // GetPlatformPaymentConfiguration returns the PlatformPaymentConfiguration field value if set, zero value otherwise. func (o *BalanceAccount) GetPlatformPaymentConfiguration() PlatformPaymentConfiguration { if o == nil || common.IsNil(o.PlatformPaymentConfiguration) { @@ -458,9 +424,6 @@ func (o BalanceAccount) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.MigratedAccountCode) { toSerialize["migratedAccountCode"] = o.MigratedAccountCode } - if !common.IsNil(o.PaymentInstruments) { - toSerialize["paymentInstruments"] = o.PaymentInstruments - } if !common.IsNil(o.PlatformPaymentConfiguration) { toSerialize["platformPaymentConfiguration"] = o.PlatformPaymentConfiguration } @@ -513,7 +476,7 @@ func (v *NullableBalanceAccount) UnmarshalJSON(src []byte) error { } func (o *BalanceAccount) isValidStatus() bool { - var allowedEnumValues = []string{"Active", "Closed", "Inactive", "Suspended"} + var allowedEnumValues = []string{"active", "closed", "inactive", "suspended"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/configurationwebhook/model_balance_account_notification_data.go b/src/configurationwebhook/model_balance_account_notification_data.go index c8eceaf53..d5cb67809 100644 --- a/src/configurationwebhook/model_balance_account_notification_data.go +++ b/src/configurationwebhook/model_balance_account_notification_data.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_balance_account_notification_request.go b/src/configurationwebhook/model_balance_account_notification_request.go index 9fc570026..07dd4022c 100644 --- a/src/configurationwebhook/model_balance_account_notification_request.go +++ b/src/configurationwebhook/model_balance_account_notification_request.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_balance_platform_notification_response.go b/src/configurationwebhook/model_balance_platform_notification_response.go index 63ece83af..77682119a 100644 --- a/src/configurationwebhook/model_balance_platform_notification_response.go +++ b/src/configurationwebhook/model_balance_platform_notification_response.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_bank_account_details.go b/src/configurationwebhook/model_bank_account_details.go index 6546d2543..926bb3f8a 100644 --- a/src/configurationwebhook/model_bank_account_details.go +++ b/src/configurationwebhook/model_bank_account_details.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_bulk_address.go b/src/configurationwebhook/model_bulk_address.go index 24e8c7add..51e6136a8 100644 --- a/src/configurationwebhook/model_bulk_address.go +++ b/src/configurationwebhook/model_bulk_address.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_capability_problem.go b/src/configurationwebhook/model_capability_problem.go index b18a3771d..64e694300 100644 --- a/src/configurationwebhook/model_capability_problem.go +++ b/src/configurationwebhook/model_capability_problem.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_capability_problem_entity.go b/src/configurationwebhook/model_capability_problem_entity.go index 18524438d..6f65e4ebe 100644 --- a/src/configurationwebhook/model_capability_problem_entity.go +++ b/src/configurationwebhook/model_capability_problem_entity.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_capability_problem_entity_recursive.go b/src/configurationwebhook/model_capability_problem_entity_recursive.go index 6bdb2286d..297f909bd 100644 --- a/src/configurationwebhook/model_capability_problem_entity_recursive.go +++ b/src/configurationwebhook/model_capability_problem_entity_recursive.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_capability_settings.go b/src/configurationwebhook/model_capability_settings.go index a24a1c238..a3a792750 100644 --- a/src/configurationwebhook/model_capability_settings.go +++ b/src/configurationwebhook/model_capability_settings.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_card.go b/src/configurationwebhook/model_card.go index 713fecba8..2e6990550 100644 --- a/src/configurationwebhook/model_card.go +++ b/src/configurationwebhook/model_card.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -30,9 +30,9 @@ type Card struct { CardholderName string `json:"cardholderName"` Configuration *CardConfiguration `json:"configuration,omitempty"` // The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. - Cvc *string `json:"cvc,omitempty"` - DeliveryContact *Contact `json:"deliveryContact,omitempty"` - Expiration *Expiry `json:"expiration,omitempty"` + Cvc *string `json:"cvc,omitempty"` + DeliveryContact *DeliveryContact `json:"deliveryContact,omitempty"` + Expiration *Expiry `json:"expiration,omitempty"` // The form factor of the card. Possible values: **virtual**, **physical**. FormFactor string `json:"formFactor"` // Last last four digits of the card number. @@ -266,9 +266,9 @@ func (o *Card) SetCvc(v string) { } // GetDeliveryContact returns the DeliveryContact field value if set, zero value otherwise. -func (o *Card) GetDeliveryContact() Contact { +func (o *Card) GetDeliveryContact() DeliveryContact { if o == nil || common.IsNil(o.DeliveryContact) { - var ret Contact + var ret DeliveryContact return ret } return *o.DeliveryContact @@ -276,7 +276,7 @@ func (o *Card) GetDeliveryContact() Contact { // GetDeliveryContactOk returns a tuple with the DeliveryContact field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Card) GetDeliveryContactOk() (*Contact, bool) { +func (o *Card) GetDeliveryContactOk() (*DeliveryContact, bool) { if o == nil || common.IsNil(o.DeliveryContact) { return nil, false } @@ -292,8 +292,8 @@ func (o *Card) HasDeliveryContact() bool { return false } -// SetDeliveryContact gets a reference to the given Contact and assigns it to the DeliveryContact field. -func (o *Card) SetDeliveryContact(v Contact) { +// SetDeliveryContact gets a reference to the given DeliveryContact and assigns it to the DeliveryContact field. +func (o *Card) SetDeliveryContact(v DeliveryContact) { o.DeliveryContact = &v } diff --git a/src/configurationwebhook/model_card_configuration.go b/src/configurationwebhook/model_card_configuration.go index b83ca9987..bed7aa6b6 100644 --- a/src/configurationwebhook/model_card_configuration.go +++ b/src/configurationwebhook/model_card_configuration.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_card_order_item.go b/src/configurationwebhook/model_card_order_item.go index 890697d81..4bb2f00d6 100644 --- a/src/configurationwebhook/model_card_order_item.go +++ b/src/configurationwebhook/model_card_order_item.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_card_order_item_delivery_status.go b/src/configurationwebhook/model_card_order_item_delivery_status.go index 35c53b88c..d2ec0c0f5 100644 --- a/src/configurationwebhook/model_card_order_item_delivery_status.go +++ b/src/configurationwebhook/model_card_order_item_delivery_status.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_card_order_notification_request.go b/src/configurationwebhook/model_card_order_notification_request.go index d52aa99c5..9d5c1e94d 100644 --- a/src/configurationwebhook/model_card_order_notification_request.go +++ b/src/configurationwebhook/model_card_order_notification_request.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_contact.go b/src/configurationwebhook/model_contact.go deleted file mode 100644 index 8fec175d1..000000000 --- a/src/configurationwebhook/model_contact.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the Contact type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Contact{} - -// Contact struct for Contact -type Contact struct { - Address *Address `json:"address,omitempty"` - // The e-mail address of the contact. - Email *string `json:"email,omitempty"` - // The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - FullPhoneNumber *string `json:"fullPhoneNumber,omitempty"` - Name *Name `json:"name,omitempty"` - PersonalData *PersonalData `json:"personalData,omitempty"` - PhoneNumber *PhoneNumber `json:"phoneNumber,omitempty"` - // The URL of the website of the contact. - WebAddress *string `json:"webAddress,omitempty"` -} - -// NewContact instantiates a new Contact 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 NewContact() *Contact { - this := Contact{} - return &this -} - -// NewContactWithDefaults instantiates a new Contact 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 NewContactWithDefaults() *Contact { - this := Contact{} - return &this -} - -// GetAddress returns the Address field value if set, zero value otherwise. -func (o *Contact) 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 *Contact) 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 *Contact) 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 *Contact) SetAddress(v Address) { - o.Address = &v -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *Contact) GetEmail() string { - if o == nil || common.IsNil(o.Email) { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Contact) GetEmailOk() (*string, bool) { - if o == nil || common.IsNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *Contact) HasEmail() bool { - if o != nil && !common.IsNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *Contact) SetEmail(v string) { - o.Email = &v -} - -// GetFullPhoneNumber returns the FullPhoneNumber field value if set, zero value otherwise. -func (o *Contact) GetFullPhoneNumber() string { - if o == nil || common.IsNil(o.FullPhoneNumber) { - var ret string - return ret - } - return *o.FullPhoneNumber -} - -// GetFullPhoneNumberOk returns a tuple with the FullPhoneNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Contact) GetFullPhoneNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.FullPhoneNumber) { - return nil, false - } - return o.FullPhoneNumber, true -} - -// HasFullPhoneNumber returns a boolean if a field has been set. -func (o *Contact) HasFullPhoneNumber() bool { - if o != nil && !common.IsNil(o.FullPhoneNumber) { - return true - } - - return false -} - -// SetFullPhoneNumber gets a reference to the given string and assigns it to the FullPhoneNumber field. -func (o *Contact) SetFullPhoneNumber(v string) { - o.FullPhoneNumber = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Contact) GetName() Name { - if o == nil || common.IsNil(o.Name) { - var ret Name - 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 *Contact) GetNameOk() (*Name, 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 *Contact) HasName() bool { - if o != nil && !common.IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given Name and assigns it to the Name field. -func (o *Contact) SetName(v Name) { - o.Name = &v -} - -// GetPersonalData returns the PersonalData field value if set, zero value otherwise. -func (o *Contact) GetPersonalData() PersonalData { - if o == nil || common.IsNil(o.PersonalData) { - var ret PersonalData - return ret - } - return *o.PersonalData -} - -// GetPersonalDataOk returns a tuple with the PersonalData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Contact) GetPersonalDataOk() (*PersonalData, bool) { - if o == nil || common.IsNil(o.PersonalData) { - return nil, false - } - return o.PersonalData, true -} - -// HasPersonalData returns a boolean if a field has been set. -func (o *Contact) HasPersonalData() bool { - if o != nil && !common.IsNil(o.PersonalData) { - return true - } - - return false -} - -// SetPersonalData gets a reference to the given PersonalData and assigns it to the PersonalData field. -func (o *Contact) SetPersonalData(v PersonalData) { - o.PersonalData = &v -} - -// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. -func (o *Contact) GetPhoneNumber() PhoneNumber { - if o == nil || common.IsNil(o.PhoneNumber) { - var ret PhoneNumber - return ret - } - return *o.PhoneNumber -} - -// GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Contact) GetPhoneNumberOk() (*PhoneNumber, bool) { - if o == nil || common.IsNil(o.PhoneNumber) { - return nil, false - } - return o.PhoneNumber, true -} - -// HasPhoneNumber returns a boolean if a field has been set. -func (o *Contact) HasPhoneNumber() bool { - if o != nil && !common.IsNil(o.PhoneNumber) { - return true - } - - return false -} - -// SetPhoneNumber gets a reference to the given PhoneNumber and assigns it to the PhoneNumber field. -func (o *Contact) SetPhoneNumber(v PhoneNumber) { - o.PhoneNumber = &v -} - -// GetWebAddress returns the WebAddress field value if set, zero value otherwise. -func (o *Contact) GetWebAddress() string { - if o == nil || common.IsNil(o.WebAddress) { - var ret string - return ret - } - return *o.WebAddress -} - -// GetWebAddressOk returns a tuple with the WebAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Contact) GetWebAddressOk() (*string, bool) { - if o == nil || common.IsNil(o.WebAddress) { - return nil, false - } - return o.WebAddress, true -} - -// HasWebAddress returns a boolean if a field has been set. -func (o *Contact) HasWebAddress() bool { - if o != nil && !common.IsNil(o.WebAddress) { - return true - } - - return false -} - -// SetWebAddress gets a reference to the given string and assigns it to the WebAddress field. -func (o *Contact) SetWebAddress(v string) { - o.WebAddress = &v -} - -func (o Contact) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Contact) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Address) { - toSerialize["address"] = o.Address - } - if !common.IsNil(o.Email) { - toSerialize["email"] = o.Email - } - if !common.IsNil(o.FullPhoneNumber) { - toSerialize["fullPhoneNumber"] = o.FullPhoneNumber - } - if !common.IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !common.IsNil(o.PersonalData) { - toSerialize["personalData"] = o.PersonalData - } - if !common.IsNil(o.PhoneNumber) { - toSerialize["phoneNumber"] = o.PhoneNumber - } - if !common.IsNil(o.WebAddress) { - toSerialize["webAddress"] = o.WebAddress - } - return toSerialize, nil -} - -type NullableContact struct { - value *Contact - isSet bool -} - -func (v NullableContact) Get() *Contact { - return v.value -} - -func (v *NullableContact) Set(val *Contact) { - v.value = val - v.isSet = true -} - -func (v NullableContact) IsSet() bool { - return v.isSet -} - -func (v *NullableContact) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContact(val *Contact) *NullableContact { - return &NullableContact{value: val, isSet: true} -} - -func (v NullableContact) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContact) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/configurationwebhook/model_contact_details.go b/src/configurationwebhook/model_contact_details.go index e5b0d682f..5cc326bf4 100644 --- a/src/configurationwebhook/model_contact_details.go +++ b/src/configurationwebhook/model_contact_details.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_cron_sweep_schedule.go b/src/configurationwebhook/model_cron_sweep_schedule.go deleted file mode 100644 index 1ac5264f0..000000000 --- a/src/configurationwebhook/model_cron_sweep_schedule.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the CronSweepSchedule type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &CronSweepSchedule{} - -// CronSweepSchedule struct for CronSweepSchedule -type CronSweepSchedule struct { - // A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: *****, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. - CronExpression string `json:"cronExpression"` - // The schedule type. Possible values: * **cron**: push out funds based on a cron expression. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: pull in funds instantly if the balance is less than or equal to the `triggerAmount`. You can only use this for sweeps of `type` **pull** and when the source is a `merchantAccount` or `transferInstrument`.If the source is transferInstrument, merchant account identifier is still required, with which you want to process the transaction. - Type *string `json:"type,omitempty"` -} - -// NewCronSweepSchedule instantiates a new CronSweepSchedule 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 NewCronSweepSchedule(cronExpression string) *CronSweepSchedule { - this := CronSweepSchedule{} - this.CronExpression = cronExpression - return &this -} - -// NewCronSweepScheduleWithDefaults instantiates a new CronSweepSchedule 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 NewCronSweepScheduleWithDefaults() *CronSweepSchedule { - this := CronSweepSchedule{} - return &this -} - -// GetCronExpression returns the CronExpression field value -func (o *CronSweepSchedule) GetCronExpression() string { - if o == nil { - var ret string - return ret - } - - return o.CronExpression -} - -// GetCronExpressionOk returns a tuple with the CronExpression field value -// and a boolean to check if the value has been set. -func (o *CronSweepSchedule) GetCronExpressionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CronExpression, true -} - -// SetCronExpression sets field value -func (o *CronSweepSchedule) SetCronExpression(v string) { - o.CronExpression = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *CronSweepSchedule) 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 *CronSweepSchedule) 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 *CronSweepSchedule) 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 *CronSweepSchedule) SetType(v string) { - o.Type = &v -} - -func (o CronSweepSchedule) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CronSweepSchedule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cronExpression"] = o.CronExpression - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableCronSweepSchedule struct { - value *CronSweepSchedule - isSet bool -} - -func (v NullableCronSweepSchedule) Get() *CronSweepSchedule { - return v.value -} - -func (v *NullableCronSweepSchedule) Set(val *CronSweepSchedule) { - v.value = val - v.isSet = true -} - -func (v NullableCronSweepSchedule) IsSet() bool { - return v.isSet -} - -func (v *NullableCronSweepSchedule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCronSweepSchedule(val *CronSweepSchedule) *NullableCronSweepSchedule { - return &NullableCronSweepSchedule{value: val, isSet: true} -} - -func (v NullableCronSweepSchedule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCronSweepSchedule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *CronSweepSchedule) isValidType() bool { - var allowedEnumValues = []string{"daily", "weekly", "monthly", "balance", "cron"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/configurationwebhook/model_expiry.go b/src/configurationwebhook/model_expiry.go index ae41531ed..1d5927899 100644 --- a/src/configurationwebhook/model_expiry.go +++ b/src/configurationwebhook/model_expiry.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_iban_account_identification.go b/src/configurationwebhook/model_iban_account_identification.go index 0cf8349c9..aac35dfeb 100644 --- a/src/configurationwebhook/model_iban_account_identification.go +++ b/src/configurationwebhook/model_iban_account_identification.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_name.go b/src/configurationwebhook/model_name.go index c0dbef30a..b3643120c 100644 --- a/src/configurationwebhook/model_name.go +++ b/src/configurationwebhook/model_name.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_payment_instrument.go b/src/configurationwebhook/model_payment_instrument.go index 86c3fe455..8eba44021 100644 --- a/src/configurationwebhook/model_payment_instrument.go +++ b/src/configurationwebhook/model_payment_instrument.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,6 +20,8 @@ var _ common.MappedNullable = &PaymentInstrument{} // PaymentInstrument struct for PaymentInstrument type PaymentInstrument struct { // Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. + // Deprecated since Configuration webhooks v2 + // Please use `bankAccount` object instead AdditionalBankAccountIdentifications []PaymentInstrumentAdditionalBankAccountIdentificationsInner `json:"additionalBankAccountIdentifications,omitempty"` // The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. BalanceAccountId string `json:"balanceAccountId"` @@ -35,8 +37,12 @@ type PaymentInstrument struct { PaymentInstrumentGroupId *string `json:"paymentInstrumentGroupId,omitempty"` // Your reference for the payment instrument, maximum 150 characters. Reference *string `json:"reference,omitempty"` - // The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **Active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **Requested**. Possible values: * **Active**: The payment instrument is active and can be used to make payments. * **Requested**: The payment instrument has been requested. This state is applicable for physical cards. * **Inactive**: The payment instrument is inactive and cannot be used to make payments. * **Suspended**: The payment instrument is temporarily suspended and cannot be used to make payments. * **Closed**: The payment instrument is permanently closed. This action cannot be undone. * **Stolen** * **Lost** + // The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. Status *string `json:"status,omitempty"` + // The status comment provides additional information for the statusReason of the payment instrument. + StatusComment *string `json:"statusComment,omitempty"` + // The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. + StatusReason *string `json:"statusReason,omitempty"` // Type of payment instrument. Possible value: **card**, **bankAccount**. Type string `json:"type"` } @@ -63,6 +69,8 @@ func NewPaymentInstrumentWithDefaults() *PaymentInstrument { } // GetAdditionalBankAccountIdentifications returns the AdditionalBankAccountIdentifications field value if set, zero value otherwise. +// Deprecated since Configuration webhooks v2 +// Please use `bankAccount` object instead func (o *PaymentInstrument) GetAdditionalBankAccountIdentifications() []PaymentInstrumentAdditionalBankAccountIdentificationsInner { if o == nil || common.IsNil(o.AdditionalBankAccountIdentifications) { var ret []PaymentInstrumentAdditionalBankAccountIdentificationsInner @@ -73,6 +81,8 @@ func (o *PaymentInstrument) GetAdditionalBankAccountIdentifications() []PaymentI // GetAdditionalBankAccountIdentificationsOk returns a tuple with the AdditionalBankAccountIdentifications field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated since Configuration webhooks v2 +// Please use `bankAccount` object instead func (o *PaymentInstrument) GetAdditionalBankAccountIdentificationsOk() ([]PaymentInstrumentAdditionalBankAccountIdentificationsInner, bool) { if o == nil || common.IsNil(o.AdditionalBankAccountIdentifications) { return nil, false @@ -90,6 +100,8 @@ func (o *PaymentInstrument) HasAdditionalBankAccountIdentifications() bool { } // SetAdditionalBankAccountIdentifications gets a reference to the given []PaymentInstrumentAdditionalBankAccountIdentificationsInner and assigns it to the AdditionalBankAccountIdentifications field. +// Deprecated since Configuration webhooks v2 +// Please use `bankAccount` object instead func (o *PaymentInstrument) SetAdditionalBankAccountIdentifications(v []PaymentInstrumentAdditionalBankAccountIdentificationsInner) { o.AdditionalBankAccountIdentifications = v } @@ -358,6 +370,70 @@ func (o *PaymentInstrument) SetStatus(v string) { o.Status = &v } +// GetStatusComment returns the StatusComment field value if set, zero value otherwise. +func (o *PaymentInstrument) GetStatusComment() string { + if o == nil || common.IsNil(o.StatusComment) { + var ret string + return ret + } + return *o.StatusComment +} + +// GetStatusCommentOk returns a tuple with the StatusComment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentInstrument) GetStatusCommentOk() (*string, bool) { + if o == nil || common.IsNil(o.StatusComment) { + return nil, false + } + return o.StatusComment, true +} + +// HasStatusComment returns a boolean if a field has been set. +func (o *PaymentInstrument) HasStatusComment() bool { + if o != nil && !common.IsNil(o.StatusComment) { + return true + } + + return false +} + +// SetStatusComment gets a reference to the given string and assigns it to the StatusComment field. +func (o *PaymentInstrument) SetStatusComment(v string) { + o.StatusComment = &v +} + +// GetStatusReason returns the StatusReason field value if set, zero value otherwise. +func (o *PaymentInstrument) GetStatusReason() string { + if o == nil || common.IsNil(o.StatusReason) { + var ret string + return ret + } + return *o.StatusReason +} + +// GetStatusReasonOk returns a tuple with the StatusReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentInstrument) GetStatusReasonOk() (*string, bool) { + if o == nil || common.IsNil(o.StatusReason) { + return nil, false + } + return o.StatusReason, true +} + +// HasStatusReason returns a boolean if a field has been set. +func (o *PaymentInstrument) HasStatusReason() bool { + if o != nil && !common.IsNil(o.StatusReason) { + return true + } + + return false +} + +// SetStatusReason gets a reference to the given string and assigns it to the StatusReason field. +func (o *PaymentInstrument) SetStatusReason(v string) { + o.StatusReason = &v +} + // GetType returns the Type field value func (o *PaymentInstrument) GetType() string { if o == nil { @@ -416,6 +492,12 @@ func (o PaymentInstrument) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Status) { toSerialize["status"] = o.Status } + if !common.IsNil(o.StatusComment) { + toSerialize["statusComment"] = o.StatusComment + } + if !common.IsNil(o.StatusReason) { + toSerialize["statusReason"] = o.StatusReason + } toSerialize["type"] = o.Type return toSerialize, nil } @@ -457,7 +539,7 @@ func (v *NullablePaymentInstrument) UnmarshalJSON(src []byte) error { } func (o *PaymentInstrument) isValidStatus() bool { - var allowedEnumValues = []string{"Active", "Closed", "Inactive", "Lost", "Requested", "Stolen", "Suspended", "blocked", "discarded"} + var allowedEnumValues = []string{"active", "closed", "inactive", "suspended"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true @@ -465,6 +547,15 @@ func (o *PaymentInstrument) isValidStatus() bool { } return false } +func (o *PaymentInstrument) isValidStatusReason() bool { + var allowedEnumValues = []string{"accountClosure", "damaged", "endOfLife", "expired", "lost", "other", "stolen", "suspectedFraud", "transactionRule"} + for _, allowed := range allowedEnumValues { + if o.GetStatusReason() == allowed { + return true + } + } + return false +} func (o *PaymentInstrument) isValidType() bool { var allowedEnumValues = []string{"bankAccount", "card"} for _, allowed := range allowedEnumValues { diff --git a/src/configurationwebhook/model_payment_instrument_additional_bank_account_identifications_inner.go b/src/configurationwebhook/model_payment_instrument_additional_bank_account_identifications_inner.go index d040216d9..9cdc87d06 100644 --- a/src/configurationwebhook/model_payment_instrument_additional_bank_account_identifications_inner.go +++ b/src/configurationwebhook/model_payment_instrument_additional_bank_account_identifications_inner.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_payment_instrument_bank_account.go b/src/configurationwebhook/model_payment_instrument_bank_account.go deleted file mode 100644 index efaff7b11..000000000 --- a/src/configurationwebhook/model_payment_instrument_bank_account.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - "fmt" -) - -// PaymentInstrumentBankAccount - Contains the business account details. Returned when you create a payment instrument with `type` **bankAccount**. -type PaymentInstrumentBankAccount struct { - IbanAccountIdentification *IbanAccountIdentification - UKLocalAccountIdentification *UKLocalAccountIdentification - USLocalAccountIdentification *USLocalAccountIdentification -} - -// IbanAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns IbanAccountIdentification wrapped in PaymentInstrumentBankAccount -func IbanAccountIdentificationAsPaymentInstrumentBankAccount(v *IbanAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - IbanAccountIdentification: v, - } -} - -// UKLocalAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns UKLocalAccountIdentification wrapped in PaymentInstrumentBankAccount -func UKLocalAccountIdentificationAsPaymentInstrumentBankAccount(v *UKLocalAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - UKLocalAccountIdentification: v, - } -} - -// USLocalAccountIdentificationAsPaymentInstrumentBankAccount is a convenience function that returns USLocalAccountIdentification wrapped in PaymentInstrumentBankAccount -func USLocalAccountIdentificationAsPaymentInstrumentBankAccount(v *USLocalAccountIdentification) PaymentInstrumentBankAccount { - return PaymentInstrumentBankAccount{ - USLocalAccountIdentification: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *PaymentInstrumentBankAccount) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into IbanAccountIdentification - err = json.Unmarshal(data, &dst.IbanAccountIdentification) - if err == nil { - jsonIbanAccountIdentification, _ := json.Marshal(dst.IbanAccountIdentification) - if string(jsonIbanAccountIdentification) == "{}" || !dst.IbanAccountIdentification.isValidType() { // empty struct - dst.IbanAccountIdentification = nil - } else { - match++ - } - } else { - dst.IbanAccountIdentification = nil - } - - // try to unmarshal data into UKLocalAccountIdentification - err = json.Unmarshal(data, &dst.UKLocalAccountIdentification) - if err == nil { - jsonUKLocalAccountIdentification, _ := json.Marshal(dst.UKLocalAccountIdentification) - if string(jsonUKLocalAccountIdentification) == "{}" || !dst.UKLocalAccountIdentification.isValidType() { // empty struct - dst.UKLocalAccountIdentification = nil - } else { - match++ - } - } else { - dst.UKLocalAccountIdentification = nil - } - - // try to unmarshal data into USLocalAccountIdentification - err = json.Unmarshal(data, &dst.USLocalAccountIdentification) - if err == nil { - jsonUSLocalAccountIdentification, _ := json.Marshal(dst.USLocalAccountIdentification) - if string(jsonUSLocalAccountIdentification) == "{}" || !dst.USLocalAccountIdentification.isValidType() { // empty struct - dst.USLocalAccountIdentification = nil - } else { - match++ - } - } else { - dst.USLocalAccountIdentification = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.IbanAccountIdentification = nil - dst.UKLocalAccountIdentification = nil - dst.USLocalAccountIdentification = nil - - return fmt.Errorf("data matches more than one schema in oneOf(PaymentInstrumentBankAccount)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(PaymentInstrumentBankAccount)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src PaymentInstrumentBankAccount) MarshalJSON() ([]byte, error) { - if src.IbanAccountIdentification != nil { - return json.Marshal(&src.IbanAccountIdentification) - } - - if src.UKLocalAccountIdentification != nil { - return json.Marshal(&src.UKLocalAccountIdentification) - } - - if src.USLocalAccountIdentification != nil { - return json.Marshal(&src.USLocalAccountIdentification) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *PaymentInstrumentBankAccount) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.IbanAccountIdentification != nil { - return obj.IbanAccountIdentification - } - - if obj.UKLocalAccountIdentification != nil { - return obj.UKLocalAccountIdentification - } - - if obj.USLocalAccountIdentification != nil { - return obj.USLocalAccountIdentification - } - - // all schemas are nil - return nil -} - -type NullablePaymentInstrumentBankAccount struct { - value *PaymentInstrumentBankAccount - isSet bool -} - -func (v NullablePaymentInstrumentBankAccount) Get() *PaymentInstrumentBankAccount { - return v.value -} - -func (v *NullablePaymentInstrumentBankAccount) Set(val *PaymentInstrumentBankAccount) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentInstrumentBankAccount) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentInstrumentBankAccount) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentInstrumentBankAccount(val *PaymentInstrumentBankAccount) *NullablePaymentInstrumentBankAccount { - return &NullablePaymentInstrumentBankAccount{value: val, isSet: true} -} - -func (v NullablePaymentInstrumentBankAccount) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentInstrumentBankAccount) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/configurationwebhook/model_payment_instrument_notification_data.go b/src/configurationwebhook/model_payment_instrument_notification_data.go index be8901cbf..7be804445 100644 --- a/src/configurationwebhook/model_payment_instrument_notification_data.go +++ b/src/configurationwebhook/model_payment_instrument_notification_data.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_payment_instrument_reference.go b/src/configurationwebhook/model_payment_instrument_reference.go deleted file mode 100644 index 3d3856452..000000000 --- a/src/configurationwebhook/model_payment_instrument_reference.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the PaymentInstrumentReference type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentInstrumentReference{} - -// PaymentInstrumentReference struct for PaymentInstrumentReference -type PaymentInstrumentReference struct { - // The unique identifier of the payment instrument. - Id string `json:"id"` -} - -// NewPaymentInstrumentReference instantiates a new PaymentInstrumentReference 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 NewPaymentInstrumentReference(id string) *PaymentInstrumentReference { - this := PaymentInstrumentReference{} - this.Id = id - return &this -} - -// NewPaymentInstrumentReferenceWithDefaults instantiates a new PaymentInstrumentReference 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 NewPaymentInstrumentReferenceWithDefaults() *PaymentInstrumentReference { - this := PaymentInstrumentReference{} - return &this -} - -// GetId returns the Id field value -func (o *PaymentInstrumentReference) 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 *PaymentInstrumentReference) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *PaymentInstrumentReference) SetId(v string) { - o.Id = v -} - -func (o PaymentInstrumentReference) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentInstrumentReference) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - return toSerialize, nil -} - -type NullablePaymentInstrumentReference struct { - value *PaymentInstrumentReference - isSet bool -} - -func (v NullablePaymentInstrumentReference) Get() *PaymentInstrumentReference { - return v.value -} - -func (v *NullablePaymentInstrumentReference) Set(val *PaymentInstrumentReference) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentInstrumentReference) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentInstrumentReference) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentInstrumentReference(val *PaymentInstrumentReference) *NullablePaymentInstrumentReference { - return &NullablePaymentInstrumentReference{value: val, isSet: true} -} - -func (v NullablePaymentInstrumentReference) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentInstrumentReference) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/configurationwebhook/model_payment_notification_request.go b/src/configurationwebhook/model_payment_notification_request.go index e823ee28f..fe33217ae 100644 --- a/src/configurationwebhook/model_payment_notification_request.go +++ b/src/configurationwebhook/model_payment_notification_request.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_personal_data.go b/src/configurationwebhook/model_personal_data.go deleted file mode 100644 index 7e5d5d05a..000000000 --- a/src/configurationwebhook/model_personal_data.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the PersonalData type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PersonalData{} - -// PersonalData struct for PersonalData -type PersonalData struct { - // The date of birth of the person. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - DateOfBirth *string `json:"dateOfBirth,omitempty"` - // An ID number of the person. - IdNumber *string `json:"idNumber,omitempty"` - // The nationality of the person represented by a two-character country code. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). - Nationality *string `json:"nationality,omitempty"` -} - -// NewPersonalData instantiates a new PersonalData 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 NewPersonalData() *PersonalData { - this := PersonalData{} - return &this -} - -// NewPersonalDataWithDefaults instantiates a new PersonalData 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 NewPersonalDataWithDefaults() *PersonalData { - this := PersonalData{} - return &this -} - -// GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *PersonalData) GetDateOfBirth() string { - if o == nil || common.IsNil(o.DateOfBirth) { - var ret string - return ret - } - return *o.DateOfBirth -} - -// GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PersonalData) GetDateOfBirthOk() (*string, bool) { - if o == nil || common.IsNil(o.DateOfBirth) { - return nil, false - } - return o.DateOfBirth, true -} - -// HasDateOfBirth returns a boolean if a field has been set. -func (o *PersonalData) HasDateOfBirth() bool { - if o != nil && !common.IsNil(o.DateOfBirth) { - return true - } - - return false -} - -// SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *PersonalData) SetDateOfBirth(v string) { - o.DateOfBirth = &v -} - -// GetIdNumber returns the IdNumber field value if set, zero value otherwise. -func (o *PersonalData) GetIdNumber() string { - if o == nil || common.IsNil(o.IdNumber) { - var ret string - return ret - } - return *o.IdNumber -} - -// GetIdNumberOk returns a tuple with the IdNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PersonalData) GetIdNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.IdNumber) { - return nil, false - } - return o.IdNumber, true -} - -// HasIdNumber returns a boolean if a field has been set. -func (o *PersonalData) HasIdNumber() bool { - if o != nil && !common.IsNil(o.IdNumber) { - return true - } - - return false -} - -// SetIdNumber gets a reference to the given string and assigns it to the IdNumber field. -func (o *PersonalData) SetIdNumber(v string) { - o.IdNumber = &v -} - -// GetNationality returns the Nationality field value if set, zero value otherwise. -func (o *PersonalData) GetNationality() string { - if o == nil || common.IsNil(o.Nationality) { - var ret string - return ret - } - return *o.Nationality -} - -// GetNationalityOk returns a tuple with the Nationality field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PersonalData) GetNationalityOk() (*string, bool) { - if o == nil || common.IsNil(o.Nationality) { - return nil, false - } - return o.Nationality, true -} - -// HasNationality returns a boolean if a field has been set. -func (o *PersonalData) HasNationality() bool { - if o != nil && !common.IsNil(o.Nationality) { - return true - } - - return false -} - -// SetNationality gets a reference to the given string and assigns it to the Nationality field. -func (o *PersonalData) SetNationality(v string) { - o.Nationality = &v -} - -func (o PersonalData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PersonalData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.DateOfBirth) { - toSerialize["dateOfBirth"] = o.DateOfBirth - } - if !common.IsNil(o.IdNumber) { - toSerialize["idNumber"] = o.IdNumber - } - if !common.IsNil(o.Nationality) { - toSerialize["nationality"] = o.Nationality - } - return toSerialize, nil -} - -type NullablePersonalData struct { - value *PersonalData - isSet bool -} - -func (v NullablePersonalData) Get() *PersonalData { - return v.value -} - -func (v *NullablePersonalData) Set(val *PersonalData) { - v.value = val - v.isSet = true -} - -func (v NullablePersonalData) IsSet() bool { - return v.isSet -} - -func (v *NullablePersonalData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePersonalData(val *PersonalData) *NullablePersonalData { - return &NullablePersonalData{value: val, isSet: true} -} - -func (v NullablePersonalData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePersonalData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/configurationwebhook/model_phone.go b/src/configurationwebhook/model_phone.go index f99c3f944..5f4f8cfe7 100644 --- a/src/configurationwebhook/model_phone.go +++ b/src/configurationwebhook/model_phone.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -144,7 +144,7 @@ func (v *NullablePhone) UnmarshalJSON(src []byte) error { } func (o *Phone) isValidType() bool { - var allowedEnumValues = []string{"Landline", "Mobile"} + var allowedEnumValues = []string{"landline", "mobile"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/configurationwebhook/model_phone_number.go b/src/configurationwebhook/model_phone_number.go index 0188232d1..ac35c6d9e 100644 --- a/src/configurationwebhook/model_phone_number.go +++ b/src/configurationwebhook/model_phone_number.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_platform_payment_configuration.go b/src/configurationwebhook/model_platform_payment_configuration.go index 19c9e38df..84659fa79 100644 --- a/src/configurationwebhook/model_platform_payment_configuration.go +++ b/src/configurationwebhook/model_platform_payment_configuration.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_remediating_action.go b/src/configurationwebhook/model_remediating_action.go index 5bdf287b3..a601987b2 100644 --- a/src/configurationwebhook/model_remediating_action.go +++ b/src/configurationwebhook/model_remediating_action.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_resource.go b/src/configurationwebhook/model_resource.go index 664925803..d48dade60 100644 --- a/src/configurationwebhook/model_resource.go +++ b/src/configurationwebhook/model_resource.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_sweep_configuration.go b/src/configurationwebhook/model_sweep_configuration.go deleted file mode 100644 index 2ba9b4e21..000000000 --- a/src/configurationwebhook/model_sweep_configuration.go +++ /dev/null @@ -1,459 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the SweepConfiguration type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &SweepConfiguration{} - -// SweepConfiguration struct for SweepConfiguration -type SweepConfiguration struct { - // The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). You can only use this for periodic sweep schedules such as `schedule.type` **daily** or **monthly**. - BalanceAccountId *string `json:"balanceAccountId,omitempty"` - // The unique identifier of the sweep. - Id string `json:"id"` - // The merchant account that will be the source of funds. You can only use this if you are processing payments with Adyen. This can only be used for sweeps of `type` **pull** and `schedule.type` **balance**. - MerchantAccount *string `json:"merchantAccount,omitempty"` - Schedule SweepSchedule `json:"schedule"` - // The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - Status *string `json:"status,omitempty"` - SweepAmount *Amount `json:"sweepAmount,omitempty"` - TargetAmount *Amount `json:"targetAmount,omitempty"` - // The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/transferInstruments__resParam_id). You can also use this in combination with a `merchantAccount` and a `type` **pull** to start a direct debit request from the source transfer instrument. To use this feature, reach out to your Adyen contact. - TransferInstrumentId *string `json:"transferInstrumentId,omitempty"` - TriggerAmount *Amount `json:"triggerAmount,omitempty"` - // The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - Type *string `json:"type,omitempty"` -} - -// NewSweepConfiguration instantiates a new SweepConfiguration 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 NewSweepConfiguration(id string, schedule SweepSchedule) *SweepConfiguration { - this := SweepConfiguration{} - this.Id = id - this.Schedule = schedule - var type_ string = "push" - this.Type = &type_ - return &this -} - -// NewSweepConfigurationWithDefaults instantiates a new SweepConfiguration 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 NewSweepConfigurationWithDefaults() *SweepConfiguration { - this := SweepConfiguration{} - var type_ string = "push" - this.Type = &type_ - return &this -} - -// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. -func (o *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) SetBalanceAccountId(v string) { - o.BalanceAccountId = &v -} - -// GetId returns the Id field value -func (o *SweepConfiguration) 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 *SweepConfiguration) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *SweepConfiguration) SetId(v string) { - o.Id = v -} - -// GetMerchantAccount returns the MerchantAccount field value if set, zero value otherwise. -func (o *SweepConfiguration) GetMerchantAccount() string { - if o == nil || common.IsNil(o.MerchantAccount) { - var ret string - return ret - } - return *o.MerchantAccount -} - -// GetMerchantAccountOk returns a tuple with the MerchantAccount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SweepConfiguration) GetMerchantAccountOk() (*string, bool) { - if o == nil || common.IsNil(o.MerchantAccount) { - return nil, false - } - return o.MerchantAccount, true -} - -// HasMerchantAccount returns a boolean if a field has been set. -func (o *SweepConfiguration) HasMerchantAccount() bool { - if o != nil && !common.IsNil(o.MerchantAccount) { - return true - } - - return false -} - -// SetMerchantAccount gets a reference to the given string and assigns it to the MerchantAccount field. -func (o *SweepConfiguration) SetMerchantAccount(v string) { - o.MerchantAccount = &v -} - -// GetSchedule returns the Schedule field value -func (o *SweepConfiguration) GetSchedule() SweepSchedule { - if o == nil { - var ret SweepSchedule - return ret - } - - return o.Schedule -} - -// GetScheduleOk returns a tuple with the Schedule field value -// and a boolean to check if the value has been set. -func (o *SweepConfiguration) GetScheduleOk() (*SweepSchedule, bool) { - if o == nil { - return nil, false - } - return &o.Schedule, true -} - -// SetSchedule sets field value -func (o *SweepConfiguration) SetSchedule(v SweepSchedule) { - o.Schedule = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) SetStatus(v string) { - o.Status = &v -} - -// GetSweepAmount returns the SweepAmount field value if set, zero value otherwise. -func (o *SweepConfiguration) GetSweepAmount() Amount { - if o == nil || common.IsNil(o.SweepAmount) { - var ret Amount - return ret - } - return *o.SweepAmount -} - -// GetSweepAmountOk returns a tuple with the SweepAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SweepConfiguration) GetSweepAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.SweepAmount) { - return nil, false - } - return o.SweepAmount, true -} - -// HasSweepAmount returns a boolean if a field has been set. -func (o *SweepConfiguration) HasSweepAmount() bool { - if o != nil && !common.IsNil(o.SweepAmount) { - return true - } - - return false -} - -// SetSweepAmount gets a reference to the given Amount and assigns it to the SweepAmount field. -func (o *SweepConfiguration) SetSweepAmount(v Amount) { - o.SweepAmount = &v -} - -// GetTargetAmount returns the TargetAmount field value if set, zero value otherwise. -func (o *SweepConfiguration) GetTargetAmount() Amount { - if o == nil || common.IsNil(o.TargetAmount) { - var ret Amount - return ret - } - return *o.TargetAmount -} - -// GetTargetAmountOk returns a tuple with the TargetAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SweepConfiguration) GetTargetAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.TargetAmount) { - return nil, false - } - return o.TargetAmount, true -} - -// HasTargetAmount returns a boolean if a field has been set. -func (o *SweepConfiguration) HasTargetAmount() bool { - if o != nil && !common.IsNil(o.TargetAmount) { - return true - } - - return false -} - -// SetTargetAmount gets a reference to the given Amount and assigns it to the TargetAmount field. -func (o *SweepConfiguration) SetTargetAmount(v Amount) { - o.TargetAmount = &v -} - -// GetTransferInstrumentId returns the TransferInstrumentId field value if set, zero value otherwise. -func (o *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) SetTransferInstrumentId(v string) { - o.TransferInstrumentId = &v -} - -// GetTriggerAmount returns the TriggerAmount field value if set, zero value otherwise. -func (o *SweepConfiguration) GetTriggerAmount() Amount { - if o == nil || common.IsNil(o.TriggerAmount) { - var ret Amount - return ret - } - return *o.TriggerAmount -} - -// GetTriggerAmountOk returns a tuple with the TriggerAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SweepConfiguration) GetTriggerAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.TriggerAmount) { - return nil, false - } - return o.TriggerAmount, true -} - -// HasTriggerAmount returns a boolean if a field has been set. -func (o *SweepConfiguration) HasTriggerAmount() bool { - if o != nil && !common.IsNil(o.TriggerAmount) { - return true - } - - return false -} - -// SetTriggerAmount gets a reference to the given Amount and assigns it to the TriggerAmount field. -func (o *SweepConfiguration) SetTriggerAmount(v Amount) { - o.TriggerAmount = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) 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 *SweepConfiguration) SetType(v string) { - o.Type = &v -} - -func (o SweepConfiguration) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SweepConfiguration) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.BalanceAccountId) { - toSerialize["balanceAccountId"] = o.BalanceAccountId - } - toSerialize["id"] = o.Id - if !common.IsNil(o.MerchantAccount) { - toSerialize["merchantAccount"] = o.MerchantAccount - } - toSerialize["schedule"] = o.Schedule - if !common.IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !common.IsNil(o.SweepAmount) { - toSerialize["sweepAmount"] = o.SweepAmount - } - if !common.IsNil(o.TargetAmount) { - toSerialize["targetAmount"] = o.TargetAmount - } - if !common.IsNil(o.TransferInstrumentId) { - toSerialize["transferInstrumentId"] = o.TransferInstrumentId - } - if !common.IsNil(o.TriggerAmount) { - toSerialize["triggerAmount"] = o.TriggerAmount - } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableSweepConfiguration struct { - value *SweepConfiguration - isSet bool -} - -func (v NullableSweepConfiguration) Get() *SweepConfiguration { - return v.value -} - -func (v *NullableSweepConfiguration) Set(val *SweepConfiguration) { - v.value = val - v.isSet = true -} - -func (v NullableSweepConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableSweepConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSweepConfiguration(val *SweepConfiguration) *NullableSweepConfiguration { - return &NullableSweepConfiguration{value: val, isSet: true} -} - -func (v NullableSweepConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSweepConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *SweepConfiguration) isValidStatus() bool { - var allowedEnumValues = []string{"active", "inactive"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} -func (o *SweepConfiguration) isValidType() bool { - var allowedEnumValues = []string{"pull", "push"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/configurationwebhook/model_sweep_configuration_notification_data.go b/src/configurationwebhook/model_sweep_configuration_notification_data.go index 311a7ddcc..3ea166f4d 100644 --- a/src/configurationwebhook/model_sweep_configuration_notification_data.go +++ b/src/configurationwebhook/model_sweep_configuration_notification_data.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_sweep_configuration_notification_request.go b/src/configurationwebhook/model_sweep_configuration_notification_request.go index 20573654e..6040bb7ae 100644 --- a/src/configurationwebhook/model_sweep_configuration_notification_request.go +++ b/src/configurationwebhook/model_sweep_configuration_notification_request.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_sweep_configuration_schedule.go b/src/configurationwebhook/model_sweep_configuration_schedule.go deleted file mode 100644 index 937ff77e2..000000000 --- a/src/configurationwebhook/model_sweep_configuration_schedule.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - "fmt" -) - -// SweepConfigurationSchedule - The schedule when the `triggerAmount` is evaluated. If the balance meets the threshold, funds are pushed out of or pulled in to the balance account. -type SweepConfigurationSchedule struct { - CronSweepSchedule *CronSweepSchedule - SweepSchedule *SweepSchedule -} - -// CronSweepScheduleAsSweepConfigurationSchedule is a convenience function that returns CronSweepSchedule wrapped in SweepConfigurationSchedule -func CronSweepScheduleAsSweepConfigurationSchedule(v *CronSweepSchedule) SweepConfigurationSchedule { - return SweepConfigurationSchedule{ - CronSweepSchedule: v, - } -} - -// SweepScheduleAsSweepConfigurationSchedule is a convenience function that returns SweepSchedule wrapped in SweepConfigurationSchedule -func SweepScheduleAsSweepConfigurationSchedule(v *SweepSchedule) SweepConfigurationSchedule { - return SweepConfigurationSchedule{ - SweepSchedule: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *SweepConfigurationSchedule) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into CronSweepSchedule - err = json.Unmarshal(data, &dst.CronSweepSchedule) - if err == nil { - jsonCronSweepSchedule, _ := json.Marshal(dst.CronSweepSchedule) - if string(jsonCronSweepSchedule) == "{}" || !dst.CronSweepSchedule.isValidType() { // empty struct - dst.CronSweepSchedule = nil - } else { - match++ - } - } else { - dst.CronSweepSchedule = nil - } - - // try to unmarshal data into SweepSchedule - err = json.Unmarshal(data, &dst.SweepSchedule) - if err == nil { - jsonSweepSchedule, _ := json.Marshal(dst.SweepSchedule) - if string(jsonSweepSchedule) == "{}" || !dst.SweepSchedule.isValidType() { // empty struct - dst.SweepSchedule = nil - } else { - match++ - } - } else { - dst.SweepSchedule = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.CronSweepSchedule = nil - dst.SweepSchedule = nil - - return fmt.Errorf("data matches more than one schema in oneOf(SweepConfigurationSchedule)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(SweepConfigurationSchedule)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src SweepConfigurationSchedule) MarshalJSON() ([]byte, error) { - if src.CronSweepSchedule != nil { - return json.Marshal(&src.CronSweepSchedule) - } - - if src.SweepSchedule != nil { - return json.Marshal(&src.SweepSchedule) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *SweepConfigurationSchedule) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.CronSweepSchedule != nil { - return obj.CronSweepSchedule - } - - if obj.SweepSchedule != nil { - return obj.SweepSchedule - } - - // all schemas are nil - return nil -} - -type NullableSweepConfigurationSchedule struct { - value *SweepConfigurationSchedule - isSet bool -} - -func (v NullableSweepConfigurationSchedule) Get() *SweepConfigurationSchedule { - return v.value -} - -func (v *NullableSweepConfigurationSchedule) Set(val *SweepConfigurationSchedule) { - v.value = val - v.isSet = true -} - -func (v NullableSweepConfigurationSchedule) IsSet() bool { - return v.isSet -} - -func (v *NullableSweepConfigurationSchedule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSweepConfigurationSchedule(val *SweepConfigurationSchedule) *NullableSweepConfigurationSchedule { - return &NullableSweepConfigurationSchedule{value: val, isSet: true} -} - -func (v NullableSweepConfigurationSchedule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSweepConfigurationSchedule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/configurationwebhook/model_sweep_configuration_v2.go b/src/configurationwebhook/model_sweep_configuration_v2.go index 3b6fbb22e..b336f0d89 100644 --- a/src/configurationwebhook/model_sweep_configuration_v2.go +++ b/src/configurationwebhook/model_sweep_configuration_v2.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,6 +19,8 @@ var _ common.MappedNullable = &SweepConfigurationV2{} // SweepConfigurationV2 struct for SweepConfigurationV2 type SweepConfigurationV2 struct { + // The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. + Category *string `json:"category,omitempty"` Counterparty SweepCounterparty `json:"counterparty"` // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). Currency string `json:"currency"` @@ -26,6 +28,8 @@ type SweepConfigurationV2 struct { Description *string `json:"description,omitempty"` // The unique identifier of the sweep. Id string `json:"id"` + // The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + Priorities []string `json:"priorities,omitempty"` // The reason for disabling the sweep. Reason *string `json:"reason,omitempty"` // Your reference for the sweep configuration. @@ -67,6 +71,38 @@ func NewSweepConfigurationV2WithDefaults() *SweepConfigurationV2 { return &this } +// GetCategory returns the Category field value if set, zero value otherwise. +func (o *SweepConfigurationV2) GetCategory() string { + if o == nil || common.IsNil(o.Category) { + var ret string + return ret + } + return *o.Category +} + +// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SweepConfigurationV2) GetCategoryOk() (*string, bool) { + if o == nil || common.IsNil(o.Category) { + return nil, false + } + return o.Category, true +} + +// HasCategory returns a boolean if a field has been set. +func (o *SweepConfigurationV2) HasCategory() bool { + if o != nil && !common.IsNil(o.Category) { + return true + } + + return false +} + +// SetCategory gets a reference to the given string and assigns it to the Category field. +func (o *SweepConfigurationV2) SetCategory(v string) { + o.Category = &v +} + // GetCounterparty returns the Counterparty field value func (o *SweepConfigurationV2) GetCounterparty() SweepCounterparty { if o == nil { @@ -171,6 +207,38 @@ func (o *SweepConfigurationV2) SetId(v string) { o.Id = v } +// GetPriorities returns the Priorities field value if set, zero value otherwise. +func (o *SweepConfigurationV2) GetPriorities() []string { + if o == nil || common.IsNil(o.Priorities) { + var ret []string + return ret + } + return o.Priorities +} + +// GetPrioritiesOk returns a tuple with the Priorities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SweepConfigurationV2) GetPrioritiesOk() ([]string, bool) { + if o == nil || common.IsNil(o.Priorities) { + return nil, false + } + return o.Priorities, true +} + +// HasPriorities returns a boolean if a field has been set. +func (o *SweepConfigurationV2) HasPriorities() bool { + if o != nil && !common.IsNil(o.Priorities) { + return true + } + + return false +} + +// SetPriorities gets a reference to the given []string and assigns it to the Priorities field. +func (o *SweepConfigurationV2) SetPriorities(v []string) { + o.Priorities = v +} + // GetReason returns the Reason field value if set, zero value otherwise. func (o *SweepConfigurationV2) GetReason() string { if o == nil || common.IsNil(o.Reason) { @@ -461,12 +529,18 @@ func (o SweepConfigurationV2) MarshalJSON() ([]byte, error) { func (o SweepConfigurationV2) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.Category) { + toSerialize["category"] = o.Category + } toSerialize["counterparty"] = o.Counterparty toSerialize["currency"] = o.Currency if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } toSerialize["id"] = o.Id + if !common.IsNil(o.Priorities) { + toSerialize["priorities"] = o.Priorities + } if !common.IsNil(o.Reason) { toSerialize["reason"] = o.Reason } @@ -531,6 +605,15 @@ func (v *NullableSweepConfigurationV2) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *SweepConfigurationV2) isValidCategory() bool { + var allowedEnumValues = []string{"bank", "internal", "platformPayment"} + for _, allowed := range allowedEnumValues { + if o.GetCategory() == allowed { + return true + } + } + return false +} func (o *SweepConfigurationV2) isValidReason() bool { var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { diff --git a/src/configurationwebhook/model_sweep_counterparty.go b/src/configurationwebhook/model_sweep_counterparty.go index acf497c8b..5ea232264 100644 --- a/src/configurationwebhook/model_sweep_counterparty.go +++ b/src/configurationwebhook/model_sweep_counterparty.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_sweep_schedule.go b/src/configurationwebhook/model_sweep_schedule.go index 8ca548179..219b21b37 100644 --- a/src/configurationwebhook/model_sweep_schedule.go +++ b/src/configurationwebhook/model_sweep_schedule.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_uk_local_account_identification.go b/src/configurationwebhook/model_uk_local_account_identification.go deleted file mode 100644 index f93c5b56d..000000000 --- a/src/configurationwebhook/model_uk_local_account_identification.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the UKLocalAccountIdentification type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &UKLocalAccountIdentification{} - -// UKLocalAccountIdentification struct for UKLocalAccountIdentification -type UKLocalAccountIdentification struct { - // The 8-digit bank account number, without separators or whitespace. - AccountNumber string `json:"accountNumber"` - // The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. - FormFactor common.NullableString `json:"formFactor,omitempty"` - // The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - SortCode string `json:"sortCode"` - // **ukLocal** - Type string `json:"type"` -} - -// NewUKLocalAccountIdentification instantiates a new UKLocalAccountIdentification 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 NewUKLocalAccountIdentification(accountNumber string, sortCode string, type_ string) *UKLocalAccountIdentification { - this := UKLocalAccountIdentification{} - this.AccountNumber = accountNumber - var formFactor string = "physical" - this.FormFactor = *common.NewNullableString(&formFactor) - this.SortCode = sortCode - this.Type = type_ - return &this -} - -// NewUKLocalAccountIdentificationWithDefaults instantiates a new UKLocalAccountIdentification 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 NewUKLocalAccountIdentificationWithDefaults() *UKLocalAccountIdentification { - this := UKLocalAccountIdentification{} - var formFactor string = "physical" - this.FormFactor = *common.NewNullableString(&formFactor) - var type_ string = "ukLocal" - this.Type = type_ - return &this -} - -// GetAccountNumber returns the AccountNumber field value -func (o *UKLocalAccountIdentification) 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 *UKLocalAccountIdentification) GetAccountNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccountNumber, true -} - -// SetAccountNumber sets field value -func (o *UKLocalAccountIdentification) SetAccountNumber(v string) { - o.AccountNumber = v -} - -// GetFormFactor returns the FormFactor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UKLocalAccountIdentification) GetFormFactor() string { - if o == nil || common.IsNil(o.FormFactor.Get()) { - var ret string - return ret - } - return *o.FormFactor.Get() -} - -// GetFormFactorOk returns a tuple with the FormFactor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UKLocalAccountIdentification) GetFormFactorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FormFactor.Get(), o.FormFactor.IsSet() -} - -// HasFormFactor returns a boolean if a field has been set. -func (o *UKLocalAccountIdentification) HasFormFactor() bool { - if o != nil && o.FormFactor.IsSet() { - return true - } - - return false -} - -// SetFormFactor gets a reference to the given NullableString and assigns it to the FormFactor field. -func (o *UKLocalAccountIdentification) SetFormFactor(v string) { - o.FormFactor.Set(&v) -} - -// SetFormFactorNil sets the value for FormFactor to be an explicit nil -func (o *UKLocalAccountIdentification) SetFormFactorNil() { - o.FormFactor.Set(nil) -} - -// UnsetFormFactor ensures that no value is present for FormFactor, not even an explicit nil -func (o *UKLocalAccountIdentification) UnsetFormFactor() { - o.FormFactor.Unset() -} - -// GetSortCode returns the SortCode field value -func (o *UKLocalAccountIdentification) GetSortCode() string { - if o == nil { - var ret string - return ret - } - - return o.SortCode -} - -// GetSortCodeOk returns a tuple with the SortCode field value -// and a boolean to check if the value has been set. -func (o *UKLocalAccountIdentification) GetSortCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SortCode, true -} - -// SetSortCode sets field value -func (o *UKLocalAccountIdentification) SetSortCode(v string) { - o.SortCode = v -} - -// GetType returns the Type field value -func (o *UKLocalAccountIdentification) 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 *UKLocalAccountIdentification) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *UKLocalAccountIdentification) SetType(v string) { - o.Type = v -} - -func (o UKLocalAccountIdentification) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UKLocalAccountIdentification) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["accountNumber"] = o.AccountNumber - if o.FormFactor.IsSet() { - toSerialize["formFactor"] = o.FormFactor.Get() - } - toSerialize["sortCode"] = o.SortCode - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableUKLocalAccountIdentification struct { - value *UKLocalAccountIdentification - isSet bool -} - -func (v NullableUKLocalAccountIdentification) Get() *UKLocalAccountIdentification { - return v.value -} - -func (v *NullableUKLocalAccountIdentification) Set(val *UKLocalAccountIdentification) { - v.value = val - v.isSet = true -} - -func (v NullableUKLocalAccountIdentification) IsSet() bool { - return v.isSet -} - -func (v *NullableUKLocalAccountIdentification) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUKLocalAccountIdentification(val *UKLocalAccountIdentification) *NullableUKLocalAccountIdentification { - return &NullableUKLocalAccountIdentification{value: val, isSet: true} -} - -func (v NullableUKLocalAccountIdentification) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUKLocalAccountIdentification) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *UKLocalAccountIdentification) isValidType() bool { - var allowedEnumValues = []string{"ukLocal"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/configurationwebhook/model_us_local_account_identification.go b/src/configurationwebhook/model_us_local_account_identification.go deleted file mode 100644 index bc4bd5f0a..000000000 --- a/src/configurationwebhook/model_us_local_account_identification.go +++ /dev/null @@ -1,286 +0,0 @@ -/* -Configuration webhooks - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package configurationwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the USLocalAccountIdentification type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &USLocalAccountIdentification{} - -// USLocalAccountIdentification struct for USLocalAccountIdentification -type USLocalAccountIdentification struct { - // The bank account number, without separators or whitespace. - AccountNumber string `json:"accountNumber"` - // The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - AccountType *string `json:"accountType,omitempty"` - // The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**. - FormFactor common.NullableString `json:"formFactor,omitempty"` - // The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - RoutingNumber string `json:"routingNumber"` - // **usLocal** - Type string `json:"type"` -} - -// NewUSLocalAccountIdentification instantiates a new USLocalAccountIdentification 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 NewUSLocalAccountIdentification(accountNumber string, routingNumber string, type_ string) *USLocalAccountIdentification { - this := USLocalAccountIdentification{} - this.AccountNumber = accountNumber - var accountType string = "checking" - this.AccountType = &accountType - var formFactor string = "physical" - this.FormFactor = *common.NewNullableString(&formFactor) - this.RoutingNumber = routingNumber - this.Type = type_ - return &this -} - -// NewUSLocalAccountIdentificationWithDefaults instantiates a new USLocalAccountIdentification 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 NewUSLocalAccountIdentificationWithDefaults() *USLocalAccountIdentification { - this := USLocalAccountIdentification{} - var accountType string = "checking" - this.AccountType = &accountType - var formFactor string = "physical" - this.FormFactor = *common.NewNullableString(&formFactor) - var type_ string = "usLocal" - this.Type = type_ - return &this -} - -// GetAccountNumber returns the AccountNumber field value -func (o *USLocalAccountIdentification) 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 *USLocalAccountIdentification) GetAccountNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccountNumber, true -} - -// SetAccountNumber sets field value -func (o *USLocalAccountIdentification) SetAccountNumber(v string) { - o.AccountNumber = v -} - -// GetAccountType returns the AccountType field value if set, zero value otherwise. -func (o *USLocalAccountIdentification) GetAccountType() string { - if o == nil || common.IsNil(o.AccountType) { - var ret string - return ret - } - return *o.AccountType -} - -// GetAccountTypeOk returns a tuple with the AccountType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *USLocalAccountIdentification) GetAccountTypeOk() (*string, bool) { - if o == nil || common.IsNil(o.AccountType) { - return nil, false - } - return o.AccountType, true -} - -// HasAccountType returns a boolean if a field has been set. -func (o *USLocalAccountIdentification) HasAccountType() bool { - if o != nil && !common.IsNil(o.AccountType) { - return true - } - - return false -} - -// SetAccountType gets a reference to the given string and assigns it to the AccountType field. -func (o *USLocalAccountIdentification) SetAccountType(v string) { - o.AccountType = &v -} - -// GetFormFactor returns the FormFactor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *USLocalAccountIdentification) GetFormFactor() string { - if o == nil || common.IsNil(o.FormFactor.Get()) { - var ret string - return ret - } - return *o.FormFactor.Get() -} - -// GetFormFactorOk returns a tuple with the FormFactor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *USLocalAccountIdentification) GetFormFactorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FormFactor.Get(), o.FormFactor.IsSet() -} - -// HasFormFactor returns a boolean if a field has been set. -func (o *USLocalAccountIdentification) HasFormFactor() bool { - if o != nil && o.FormFactor.IsSet() { - return true - } - - return false -} - -// SetFormFactor gets a reference to the given NullableString and assigns it to the FormFactor field. -func (o *USLocalAccountIdentification) SetFormFactor(v string) { - o.FormFactor.Set(&v) -} - -// SetFormFactorNil sets the value for FormFactor to be an explicit nil -func (o *USLocalAccountIdentification) SetFormFactorNil() { - o.FormFactor.Set(nil) -} - -// UnsetFormFactor ensures that no value is present for FormFactor, not even an explicit nil -func (o *USLocalAccountIdentification) UnsetFormFactor() { - o.FormFactor.Unset() -} - -// GetRoutingNumber returns the RoutingNumber field value -func (o *USLocalAccountIdentification) GetRoutingNumber() string { - if o == nil { - var ret string - return ret - } - - return o.RoutingNumber -} - -// GetRoutingNumberOk returns a tuple with the RoutingNumber field value -// and a boolean to check if the value has been set. -func (o *USLocalAccountIdentification) GetRoutingNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RoutingNumber, true -} - -// SetRoutingNumber sets field value -func (o *USLocalAccountIdentification) SetRoutingNumber(v string) { - o.RoutingNumber = v -} - -// GetType returns the Type field value -func (o *USLocalAccountIdentification) 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 *USLocalAccountIdentification) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *USLocalAccountIdentification) SetType(v string) { - o.Type = v -} - -func (o USLocalAccountIdentification) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o USLocalAccountIdentification) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["accountNumber"] = o.AccountNumber - if !common.IsNil(o.AccountType) { - toSerialize["accountType"] = o.AccountType - } - if o.FormFactor.IsSet() { - toSerialize["formFactor"] = o.FormFactor.Get() - } - toSerialize["routingNumber"] = o.RoutingNumber - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableUSLocalAccountIdentification struct { - value *USLocalAccountIdentification - isSet bool -} - -func (v NullableUSLocalAccountIdentification) Get() *USLocalAccountIdentification { - return v.value -} - -func (v *NullableUSLocalAccountIdentification) Set(val *USLocalAccountIdentification) { - v.value = val - v.isSet = true -} - -func (v NullableUSLocalAccountIdentification) IsSet() bool { - return v.isSet -} - -func (v *NullableUSLocalAccountIdentification) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUSLocalAccountIdentification(val *USLocalAccountIdentification) *NullableUSLocalAccountIdentification { - return &NullableUSLocalAccountIdentification{value: val, isSet: true} -} - -func (v NullableUSLocalAccountIdentification) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUSLocalAccountIdentification) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *USLocalAccountIdentification) isValidAccountType() bool { - var allowedEnumValues = []string{"checking", "savings"} - for _, allowed := range allowedEnumValues { - if o.GetAccountType() == allowed { - return true - } - } - return false -} -func (o *USLocalAccountIdentification) isValidType() bool { - var allowedEnumValues = []string{"usLocal"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/configurationwebhook/model_verification_deadline.go b/src/configurationwebhook/model_verification_deadline.go index 6d1faf3f9..254b544d3 100644 --- a/src/configurationwebhook/model_verification_deadline.go +++ b/src/configurationwebhook/model_verification_deadline.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_verification_error.go b/src/configurationwebhook/model_verification_error.go index 061cbafe0..1236f7cbd 100644 --- a/src/configurationwebhook/model_verification_error.go +++ b/src/configurationwebhook/model_verification_error.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/configurationwebhook/model_verification_error_recursive.go b/src/configurationwebhook/model_verification_error_recursive.go index a99701f3f..6c11e122e 100644 --- a/src/configurationwebhook/model_verification_error_recursive.go +++ b/src/configurationwebhook/model_verification_error_recursive.go @@ -1,7 +1,7 @@ /* Configuration webhooks -API version: 1 +API version: 2 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/dataprotection/.openapi-generator-ignore b/src/dataprotection/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/dataprotection/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/disputes/.openapi-generator-ignore b/src/disputes/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/disputes/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/disputes/.openapi-generator/VERSION b/src/disputes/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/disputes/.openapi-generator/VERSION +++ b/src/disputes/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/legalentity/.openapi-generator/VERSION b/src/legalentity/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/legalentity/.openapi-generator/VERSION +++ b/src/legalentity/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/legalentity/api_business_lines.go b/src/legalentity/api_business_lines.go index 5e65c40e0..5af7c259b 100644 --- a/src/legalentity/api_business_lines.go +++ b/src/legalentity/api_business_lines.go @@ -46,6 +46,8 @@ 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. + + @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 @@ -90,7 +92,7 @@ DeleteBusinessLine Delete a business line Deletes a business line. - >If you delete a business line linked to a [payment method](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api), it can affect your merchant account's ability to use the [payment method](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/paymentMethodSettings). The business line is removed from all linked merchant accounts. + >If you delete a business line linked to a [payment method](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api), it can affect your merchant account's ability to use the [payment method](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/paymentMethodSettings). The business line is removed from all linked merchant accounts. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r BusinessLinesApiDeleteBusinessLineInput - Request parameters, see DeleteBusinessLineInput diff --git a/src/legalentity/api_documents.go b/src/legalentity/api_documents.go index 4d7b116b8..4b40e0869 100644 --- a/src/legalentity/api_documents.go +++ b/src/legalentity/api_documents.go @@ -154,7 +154,7 @@ UpdateDocument Update a document Updates a document. - >You can upload a maximum of 15 pages for photo IDs. + >You can upload a maximum of 15 pages for photo IDs. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r DocumentsApiUpdateDocumentInput - Request parameters, see UpdateDocumentInput @@ -214,11 +214,11 @@ UploadDocumentForVerificationChecks Upload a document for verification checks Uploads a document for verification checks. - Adyen uses the information from the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities) to run automated verification checks. If these checks fail, you will be notified to provide additional documents. + Adyen uses the information from the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities) to run automated verification checks. If these checks fail, you will be notified to provide additional documents. - You should only upload documents when Adyen requests additional information for the legal entity. + You should only upload documents when Adyen requests additional information for the legal entity. - >You can upload a maximum of 15 pages for photo IDs. + >You can upload a maximum of 15 pages for photo IDs. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r DocumentsApiUploadDocumentForVerificationChecksInput - Request parameters, see UploadDocumentForVerificationChecksInput diff --git a/src/legalentity/api_hosted_onboarding.go b/src/legalentity/api_hosted_onboarding.go index a9867c646..1320204e9 100644 --- a/src/legalentity/api_hosted_onboarding.go +++ b/src/legalentity/api_hosted_onboarding.go @@ -47,6 +47,8 @@ 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. + + @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 @@ -134,6 +136,8 @@ ListHostedOnboardingPageThemes Get a list of hosted onboarding page themes Returns a list of hosted onboarding page themes. + + @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 851ce9cc9..a329deacd 100644 --- a/src/legalentity/api_legal_entities.go +++ b/src/legalentity/api_legal_entities.go @@ -143,6 +143,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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r LegalEntitiesApiCreateLegalEntityInput - Request parameters, see CreateLegalEntityInput @return LegalEntity, *http.Response, error @@ -293,7 +295,7 @@ UpdateLegalEntity Update a legal entity Updates a legal entity. - >To change the legal entity type, include only the new `type` in your request. To update the `entityAssociations` array, you need to replace the entire array. For example, if the array has 3 entries and you want to remove 1 entry, you need to PATCH the resource with the remaining 2 entries. + >To change the legal entity type, include only the new `type` in your request. To update the `entityAssociations` array, you need to replace the entire array. For example, if the array has 3 entries and you want to remove 1 entry, you need to PATCH the resource with the remaining 2 entries. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r LegalEntitiesApiUpdateLegalEntityInput - Request parameters, see UpdateLegalEntityInput diff --git a/src/legalentity/api_terms_of_service.go b/src/legalentity/api_terms_of_service.go index 1013eba83..b418200ad 100644 --- a/src/legalentity/api_terms_of_service.go +++ b/src/legalentity/api_terms_of_service.go @@ -74,6 +74,64 @@ func (a *TermsOfServiceApi) AcceptTermsOfService(ctx context.Context, r TermsOfS return *res, httpRes, err } +// All parameters accepted by TermsOfServiceApi.GetAcceptedTermsOfServiceDocument +type TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput struct { + id string + termsofserviceacceptancereference string + termsOfServiceDocumentFormat *string +} + +// The format of the Terms of Service document. Possible values: **JSON**, **PDF**, or **TXT** +func (r TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput) TermsOfServiceDocumentFormat(termsOfServiceDocumentFormat string) TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput { + r.termsOfServiceDocumentFormat = &termsOfServiceDocumentFormat + return r +} + +/* +Prepare a request for GetAcceptedTermsOfServiceDocument +@param id The unique identifier of the legal entity. For sole proprietorship, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.@param termsofserviceacceptancereference An Adyen-generated reference for the accepted Terms of Service. +@return TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput +*/ +func (a *TermsOfServiceApi) GetAcceptedTermsOfServiceDocumentInput(id string, termsofserviceacceptancereference string) TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput { + return TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput{ + id: id, + termsofserviceacceptancereference: termsofserviceacceptancereference, + } +} + +/* +GetAcceptedTermsOfServiceDocument Get accepted Terms of Service document + +Returns the accepted Terms of Service document for a legal entity. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput - Request parameters, see GetAcceptedTermsOfServiceDocumentInput +@return GetAcceptedTermsOfServiceDocumentResponse, *http.Response, error +*/ +func (a *TermsOfServiceApi) GetAcceptedTermsOfServiceDocument(ctx context.Context, r TermsOfServiceApiGetAcceptedTermsOfServiceDocumentInput) (GetAcceptedTermsOfServiceDocumentResponse, *http.Response, error) { + res := &GetAcceptedTermsOfServiceDocumentResponse{} + path := "/legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + path = strings.Replace(path, "{"+"termsofserviceacceptancereference"+"}", url.PathEscape(common.ParameterValueToString(r.termsofserviceacceptancereference, "termsofserviceacceptancereference")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.termsOfServiceDocumentFormat != nil { + common.ParameterAddToQuery(queryParams, "termsOfServiceDocumentFormat", r.termsOfServiceDocumentFormat, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} + // All parameters accepted by TermsOfServiceApi.GetTermsOfServiceDocument type TermsOfServiceApiGetTermsOfServiceDocumentInput struct { id string diff --git a/src/legalentity/client.go b/src/legalentity/client.go index f56fcc1a1..e077a5362 100644 --- a/src/legalentity/client.go +++ b/src/legalentity/client.go @@ -9,7 +9,7 @@ API version: 3 package legalentity import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Legal Entity Management API API v3 @@ -39,10 +39,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.LegalEntityEndpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.LegalEntityEndpoint + } // API Services c.BusinessLinesApi = (*BusinessLinesApi)(&c.common) diff --git a/src/legalentity/model_accept_terms_of_service_response.go b/src/legalentity/model_accept_terms_of_service_response.go index 462a90312..7388ca5ee 100644 --- a/src/legalentity/model_accept_terms_of_service_response.go +++ b/src/legalentity/model_accept_terms_of_service_response.go @@ -29,7 +29,7 @@ type AcceptTermsOfServiceResponse struct { Language *string `json:"language,omitempty"` // The unique identifier of the Terms of Service document. TermsOfServiceDocumentId *string `json:"termsOfServiceDocumentId,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableAcceptTermsOfServiceResponse) UnmarshalJSON(src []byte) error { } func (o *AcceptTermsOfServiceResponse) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_get_accepted_terms_of_service_document_response.go b/src/legalentity/model_get_accepted_terms_of_service_document_response.go new file mode 100644 index 000000000..70d93a6fd --- /dev/null +++ b/src/legalentity/model_get_accepted_terms_of_service_document_response.go @@ -0,0 +1,246 @@ +/* +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/v14/src/common" +) + +// checks if the GetAcceptedTermsOfServiceDocumentResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &GetAcceptedTermsOfServiceDocumentResponse{} + +// GetAcceptedTermsOfServiceDocumentResponse struct for GetAcceptedTermsOfServiceDocumentResponse +type GetAcceptedTermsOfServiceDocumentResponse struct { + // The accepted Terms of Service document in the requested format represented as a Base64-encoded bytes array. + Document *string `json:"document,omitempty"` + // The unique identifier of the legal entity. + Id *string `json:"id,omitempty"` + // An Adyen-generated reference for the accepted Terms of Service. + TermsOfServiceAcceptanceReference *string `json:"termsOfServiceAcceptanceReference,omitempty"` + // The format of the Terms of Service document. + TermsOfServiceDocumentFormat *string `json:"termsOfServiceDocumentFormat,omitempty"` +} + +// NewGetAcceptedTermsOfServiceDocumentResponse instantiates a new GetAcceptedTermsOfServiceDocumentResponse 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 NewGetAcceptedTermsOfServiceDocumentResponse() *GetAcceptedTermsOfServiceDocumentResponse { + this := GetAcceptedTermsOfServiceDocumentResponse{} + return &this +} + +// NewGetAcceptedTermsOfServiceDocumentResponseWithDefaults instantiates a new GetAcceptedTermsOfServiceDocumentResponse 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 NewGetAcceptedTermsOfServiceDocumentResponseWithDefaults() *GetAcceptedTermsOfServiceDocumentResponse { + this := GetAcceptedTermsOfServiceDocumentResponse{} + return &this +} + +// GetDocument returns the Document field value if set, zero value otherwise. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetDocument() string { + if o == nil || common.IsNil(o.Document) { + var ret string + return ret + } + return *o.Document +} + +// GetDocumentOk returns a tuple with the Document field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetDocumentOk() (*string, bool) { + if o == nil || common.IsNil(o.Document) { + return nil, false + } + return o.Document, true +} + +// HasDocument returns a boolean if a field has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) HasDocument() bool { + if o != nil && !common.IsNil(o.Document) { + return true + } + + return false +} + +// SetDocument gets a reference to the given string and assigns it to the Document field. +func (o *GetAcceptedTermsOfServiceDocumentResponse) SetDocument(v string) { + o.Document = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetAcceptedTermsOfServiceDocumentResponse) 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 *GetAcceptedTermsOfServiceDocumentResponse) 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 *GetAcceptedTermsOfServiceDocumentResponse) 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 *GetAcceptedTermsOfServiceDocumentResponse) SetId(v string) { + o.Id = &v +} + +// GetTermsOfServiceAcceptanceReference returns the TermsOfServiceAcceptanceReference field value if set, zero value otherwise. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetTermsOfServiceAcceptanceReference() string { + if o == nil || common.IsNil(o.TermsOfServiceAcceptanceReference) { + var ret string + return ret + } + return *o.TermsOfServiceAcceptanceReference +} + +// GetTermsOfServiceAcceptanceReferenceOk returns a tuple with the TermsOfServiceAcceptanceReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetTermsOfServiceAcceptanceReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.TermsOfServiceAcceptanceReference) { + return nil, false + } + return o.TermsOfServiceAcceptanceReference, true +} + +// HasTermsOfServiceAcceptanceReference returns a boolean if a field has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) HasTermsOfServiceAcceptanceReference() bool { + if o != nil && !common.IsNil(o.TermsOfServiceAcceptanceReference) { + return true + } + + return false +} + +// SetTermsOfServiceAcceptanceReference gets a reference to the given string and assigns it to the TermsOfServiceAcceptanceReference field. +func (o *GetAcceptedTermsOfServiceDocumentResponse) SetTermsOfServiceAcceptanceReference(v string) { + o.TermsOfServiceAcceptanceReference = &v +} + +// GetTermsOfServiceDocumentFormat returns the TermsOfServiceDocumentFormat field value if set, zero value otherwise. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetTermsOfServiceDocumentFormat() string { + if o == nil || common.IsNil(o.TermsOfServiceDocumentFormat) { + var ret string + return ret + } + return *o.TermsOfServiceDocumentFormat +} + +// GetTermsOfServiceDocumentFormatOk returns a tuple with the TermsOfServiceDocumentFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) GetTermsOfServiceDocumentFormatOk() (*string, bool) { + if o == nil || common.IsNil(o.TermsOfServiceDocumentFormat) { + return nil, false + } + return o.TermsOfServiceDocumentFormat, true +} + +// HasTermsOfServiceDocumentFormat returns a boolean if a field has been set. +func (o *GetAcceptedTermsOfServiceDocumentResponse) HasTermsOfServiceDocumentFormat() bool { + if o != nil && !common.IsNil(o.TermsOfServiceDocumentFormat) { + return true + } + + return false +} + +// SetTermsOfServiceDocumentFormat gets a reference to the given string and assigns it to the TermsOfServiceDocumentFormat field. +func (o *GetAcceptedTermsOfServiceDocumentResponse) SetTermsOfServiceDocumentFormat(v string) { + o.TermsOfServiceDocumentFormat = &v +} + +func (o GetAcceptedTermsOfServiceDocumentResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAcceptedTermsOfServiceDocumentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Document) { + toSerialize["document"] = o.Document + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.TermsOfServiceAcceptanceReference) { + toSerialize["termsOfServiceAcceptanceReference"] = o.TermsOfServiceAcceptanceReference + } + if !common.IsNil(o.TermsOfServiceDocumentFormat) { + toSerialize["termsOfServiceDocumentFormat"] = o.TermsOfServiceDocumentFormat + } + return toSerialize, nil +} + +type NullableGetAcceptedTermsOfServiceDocumentResponse struct { + value *GetAcceptedTermsOfServiceDocumentResponse + isSet bool +} + +func (v NullableGetAcceptedTermsOfServiceDocumentResponse) Get() *GetAcceptedTermsOfServiceDocumentResponse { + return v.value +} + +func (v *NullableGetAcceptedTermsOfServiceDocumentResponse) Set(val *GetAcceptedTermsOfServiceDocumentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetAcceptedTermsOfServiceDocumentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAcceptedTermsOfServiceDocumentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAcceptedTermsOfServiceDocumentResponse(val *GetAcceptedTermsOfServiceDocumentResponse) *NullableGetAcceptedTermsOfServiceDocumentResponse { + return &NullableGetAcceptedTermsOfServiceDocumentResponse{value: val, isSet: true} +} + +func (v NullableGetAcceptedTermsOfServiceDocumentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAcceptedTermsOfServiceDocumentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *GetAcceptedTermsOfServiceDocumentResponse) isValidTermsOfServiceDocumentFormat() bool { + var allowedEnumValues = []string{"JSON", "PDF", "TXT"} + for _, allowed := range allowedEnumValues { + if o.GetTermsOfServiceDocumentFormat() == allowed { + return true + } + } + return false +} diff --git a/src/legalentity/model_get_terms_of_service_document_request.go b/src/legalentity/model_get_terms_of_service_document_request.go index 72dcd3a44..8156b843f 100644 --- a/src/legalentity/model_get_terms_of_service_document_request.go +++ b/src/legalentity/model_get_terms_of_service_document_request.go @@ -23,7 +23,7 @@ type GetTermsOfServiceDocumentRequest struct { Language string `json:"language"` // The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**. TermsOfServiceDocumentFormat *string `json:"termsOfServiceDocumentFormat,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type string `json:"type"` } @@ -181,7 +181,7 @@ func (v *NullableGetTermsOfServiceDocumentRequest) UnmarshalJSON(src []byte) err } func (o *GetTermsOfServiceDocumentRequest) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_get_terms_of_service_document_response.go b/src/legalentity/model_get_terms_of_service_document_response.go index 7ce1eb7a8..9db531890 100644 --- a/src/legalentity/model_get_terms_of_service_document_response.go +++ b/src/legalentity/model_get_terms_of_service_document_response.go @@ -29,7 +29,7 @@ type GetTermsOfServiceDocumentResponse struct { TermsOfServiceDocumentFormat *string `json:"termsOfServiceDocumentFormat,omitempty"` // The unique identifier of the Terms of Service document. TermsOfServiceDocumentId *string `json:"termsOfServiceDocumentId,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableGetTermsOfServiceDocumentResponse) UnmarshalJSON(src []byte) er } func (o *GetTermsOfServiceDocumentResponse) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_terms_of_service_acceptance_info.go b/src/legalentity/model_terms_of_service_acceptance_info.go index 6cd5fac57..f7ee04533 100644 --- a/src/legalentity/model_terms_of_service_acceptance_info.go +++ b/src/legalentity/model_terms_of_service_acceptance_info.go @@ -28,7 +28,7 @@ type TermsOfServiceAcceptanceInfo struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // An Adyen-generated reference for the accepted Terms of Service. Id *string `json:"id,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -274,7 +274,7 @@ func (v *NullableTermsOfServiceAcceptanceInfo) UnmarshalJSON(src []byte) error { } func (o *TermsOfServiceAcceptanceInfo) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/management/api_android_files_company_level.go b/src/management/api_android_files_company_level.go index 41e94f254..dfb45e3d8 100644 --- a/src/management/api_android_files_company_level.go +++ b/src/management/api_android_files_company_level.go @@ -602,6 +602,7 @@ UploadAndroidCertificate Upload Android Certificate Uploads an Android Certificate file to Adyen. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r AndroidFilesCompanyLevelApiUploadAndroidCertificateInput - Request parameters, see UploadAndroidCertificateInput @return UploadAndroidCertificateResponse, *http.Response, error diff --git a/src/management/api_payment_methods_merchant_level.go b/src/management/api_payment_methods_merchant_level.go index 679f32b2c..982ff1e55 100644 --- a/src/management/api_payment_methods_merchant_level.go +++ b/src/management/api_payment_methods_merchant_level.go @@ -54,6 +54,7 @@ Adds the new domain to the list of Apple Pay domains that are registered with th To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiAddApplePayDomainInput - Request parameters, see AddApplePayDomainInput @return *http.Response, error @@ -185,6 +186,7 @@ Returns details for all payment methods of the merchant account identified in th To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiGetAllPaymentMethodsInput - Request parameters, see GetAllPaymentMethodsInput @return PaymentMethodResponse, *http.Response, error @@ -301,6 +303,7 @@ Returns all Apple Pay domains that are registered with the merchant account and To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiGetApplePayDomainsInput - Request parameters, see GetApplePayDomainsInput @return ApplePayInfo, *http.Response, error @@ -398,6 +401,7 @@ Returns details for the merchant account and the payment method identified in th To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiGetPaymentMethodDetailsInput - Request parameters, see GetPaymentMethodDetailsInput @return PaymentMethod, *http.Response, error @@ -507,6 +511,7 @@ Sends a request to add a new payment method to the merchant account identified i To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiRequestPaymentMethodInput - Request parameters, see RequestPaymentMethodInput @return PaymentMethod, *http.Response, error @@ -617,6 +622,7 @@ Updates payment method details for the merchant account and the payment method i To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Payment methods read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r PaymentMethodsMerchantLevelApiUpdatePaymentMethodInput - Request parameters, see UpdatePaymentMethodInput @return PaymentMethod, *http.Response, error diff --git a/src/management/api_terminal_orders_company_level.go b/src/management/api_terminal_orders_company_level.go index f59d8d22e..5da6a088f 100644 --- a/src/management/api_terminal_orders_company_level.go +++ b/src/management/api_terminal_orders_company_level.go @@ -1051,8 +1051,7 @@ Updating is only possible while the order has the status **Placed**. The request body only needs to contain what you want to change. However, to update the products in the `items` array, you must provide the entire array. For example, if the array has three items: - - To remove one item, the array must include the remaining two items. Or to add one item, the array must include all four items. + To remove one item, the array must include the remaining two items. Or to add one item, the array must include all four items. To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Terminal ordering read and write diff --git a/src/management/api_terminal_orders_merchant_level.go b/src/management/api_terminal_orders_merchant_level.go index 562ad9cc8..e76c510fd 100644 --- a/src/management/api_terminal_orders_merchant_level.go +++ b/src/management/api_terminal_orders_merchant_level.go @@ -1049,8 +1049,7 @@ Updating is only possible while the order has the status **Placed**. The request body only needs to contain what you want to change. However, to update the products in the `items` array, you must provide the entire array. For example, if the array has three items: - - To remove one item, the array must include the remaining two items. Or to add one item, the array must include all four items. + To remove one item, the array must include the remaining two items. Or to add one item, the array must include all four items. To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Terminal ordering read and write diff --git a/src/management/api_users_company_level.go b/src/management/api_users_company_level.go index 1951b15bb..16498d5cd 100644 --- a/src/management/api_users_company_level.go +++ b/src/management/api_users_company_level.go @@ -52,6 +52,7 @@ Creates the user for the `companyId` identified 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersCompanyLevelApiCreateNewUserInput - Request parameters, see CreateNewUserInput @return CreateCompanyUserResponse, *http.Response, error @@ -148,6 +149,7 @@ Returns user details for the `userId` and the `companyId` identified 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersCompanyLevelApiGetUserDetailsInput - Request parameters, see GetUserDetailsInput @return CompanyUser, *http.Response, error @@ -264,6 +266,7 @@ Returns the list of users for the `companyId` identified 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersCompanyLevelApiListUsersInput - Request parameters, see ListUsersInput @return ListCompanyUsersResponse, *http.Response, error @@ -375,6 +378,7 @@ Updates user details for the `userId` and the `companyId` identified 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersCompanyLevelApiUpdateUserDetailsInput - Request parameters, see UpdateUserDetailsInput @return CompanyUser, *http.Response, error diff --git a/src/management/api_users_merchant_level.go b/src/management/api_users_merchant_level.go index ba3773720..46e9fcc08 100644 --- a/src/management/api_users_merchant_level.go +++ b/src/management/api_users_merchant_level.go @@ -52,6 +52,7 @@ Creates a user for the `merchantId` 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersMerchantLevelApiCreateNewUserInput - Request parameters, see CreateNewUserInput @return CreateUserResponse, *http.Response, error @@ -148,6 +149,7 @@ Returns user details for the `userId` and the `merchantId` 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersMerchantLevelApiGetUserDetailsInput - Request parameters, see GetUserDetailsInput @return User, *http.Response, error @@ -264,6 +266,7 @@ Returns a list of users associated with the `merchantId` 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersMerchantLevelApiListUsersInput - Request parameters, see ListUsersInput @return ListMerchantUsersResponse, *http.Response, error @@ -375,6 +378,7 @@ Updates user details for the `userId` and the `merchantId` 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—Users read and write + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r UsersMerchantLevelApiUpdateUserInput - Request parameters, see UpdateUserInput @return User, *http.Response, error diff --git a/src/management/client.go b/src/management/client.go index e618b7818..7ee293dbb 100644 --- a/src/management/client.go +++ b/src/management/client.go @@ -9,7 +9,7 @@ API version: 3 package management import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Management API API v3 @@ -81,10 +81,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.ManagementEndpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.ManagementEndpoint + } // API Services c.APICredentialsCompanyLevelApi = (*APICredentialsCompanyLevelApi)(&c.common) diff --git a/src/management/model_json_object.go b/src/management/model_json_object.go deleted file mode 100644 index 004f10abb..000000000 --- a/src/management/model_json_object.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Management API - -API version: 3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONObject type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONObject{} - -// JSONObject struct for JSONObject -type JSONObject struct { - Paths []JSONPath `json:"paths,omitempty"` - RootPath *JSONPath `json:"rootPath,omitempty"` -} - -// NewJSONObject instantiates a new JSONObject 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 NewJSONObject() *JSONObject { - this := JSONObject{} - return &this -} - -// NewJSONObjectWithDefaults instantiates a new JSONObject 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 NewJSONObjectWithDefaults() *JSONObject { - this := JSONObject{} - return &this -} - -// GetPaths returns the Paths field value if set, zero value otherwise. -func (o *JSONObject) GetPaths() []JSONPath { - if o == nil || common.IsNil(o.Paths) { - var ret []JSONPath - return ret - } - return o.Paths -} - -// 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) { - if o == nil || common.IsNil(o.Paths) { - return nil, false - } - return o.Paths, true -} - -// HasPaths returns a boolean if a field has been set. -func (o *JSONObject) HasPaths() bool { - if o != nil && !common.IsNil(o.Paths) { - return true - } - - return false -} - -// SetPaths gets a reference to the given []JSONPath and assigns it to the Paths field. -func (o *JSONObject) SetPaths(v []JSONPath) { - o.Paths = v -} - -// GetRootPath returns the RootPath field value if set, zero value otherwise. -func (o *JSONObject) GetRootPath() JSONPath { - if o == nil || common.IsNil(o.RootPath) { - var ret JSONPath - return ret - } - return *o.RootPath -} - -// GetRootPathOk returns a tuple with the RootPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONObject) GetRootPathOk() (*JSONPath, bool) { - if o == nil || common.IsNil(o.RootPath) { - return nil, false - } - return o.RootPath, true -} - -// HasRootPath returns a boolean if a field has been set. -func (o *JSONObject) HasRootPath() bool { - if o != nil && !common.IsNil(o.RootPath) { - return true - } - - return false -} - -// SetRootPath gets a reference to the given JSONPath and assigns it to the RootPath field. -func (o *JSONObject) SetRootPath(v JSONPath) { - o.RootPath = &v -} - -func (o JSONObject) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONObject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Paths) { - toSerialize["paths"] = o.Paths - } - if !common.IsNil(o.RootPath) { - toSerialize["rootPath"] = o.RootPath - } - return toSerialize, nil -} - -type NullableJSONObject struct { - value *JSONObject - isSet bool -} - -func (v NullableJSONObject) Get() *JSONObject { - return v.value -} - -func (v *NullableJSONObject) Set(val *JSONObject) { - v.value = val - v.isSet = true -} - -func (v NullableJSONObject) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONObject(val *JSONObject) *NullableJSONObject { - return &NullableJSONObject{value: val, isSet: true} -} - -func (v NullableJSONObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONObject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/management/model_json_path.go b/src/management/model_json_path.go deleted file mode 100644 index 5967a4055..000000000 --- a/src/management/model_json_path.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Management API - -API version: 3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONPath type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONPath{} - -// JSONPath struct for JSONPath -type JSONPath struct { - Content []string `json:"content,omitempty"` -} - -// NewJSONPath instantiates a new JSONPath 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 NewJSONPath() *JSONPath { - this := JSONPath{} - return &this -} - -// NewJSONPathWithDefaults instantiates a new JSONPath 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 NewJSONPathWithDefaults() *JSONPath { - this := JSONPath{} - return &this -} - -// GetContent returns the Content field value if set, zero value otherwise. -func (o *JSONPath) GetContent() []string { - if o == nil || common.IsNil(o.Content) { - var ret []string - return ret - } - return o.Content -} - -// GetContentOk returns a tuple with the Content field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONPath) GetContentOk() ([]string, bool) { - if o == nil || common.IsNil(o.Content) { - return nil, false - } - return o.Content, true -} - -// HasContent returns a boolean if a field has been set. -func (o *JSONPath) HasContent() bool { - if o != nil && !common.IsNil(o.Content) { - return true - } - - return false -} - -// SetContent gets a reference to the given []string and assigns it to the Content field. -func (o *JSONPath) SetContent(v []string) { - o.Content = v -} - -func (o JSONPath) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONPath) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Content) { - toSerialize["content"] = o.Content - } - return toSerialize, nil -} - -type NullableJSONPath struct { - value *JSONPath - isSet bool -} - -func (v NullableJSONPath) Get() *JSONPath { - return v.value -} - -func (v *NullableJSONPath) Set(val *JSONPath) { - v.value = val - v.isSet = true -} - -func (v NullableJSONPath) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONPath) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONPath(val *JSONPath) *NullableJSONPath { - return &NullableJSONPath{value: val, isSet: true} -} - -func (v NullableJSONPath) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONPath) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/managementwebhook/.openapi-generator-ignore b/src/managementwebhook/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/managementwebhook/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/managementwebhook/model_notification_data_message.go b/src/managementwebhook/model_notification_data_message.go deleted file mode 100644 index 12fc04c65..000000000 --- a/src/managementwebhook/model_notification_data_message.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Management Webhooks - -API version: 3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package managementwebhook - -import ( - "encoding/json" - "time" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the NotificationDataMessage type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &NotificationDataMessage{} - -// NotificationDataMessage struct for NotificationDataMessage -type NotificationDataMessage struct { - // Timestamp for when the webhook was created. - CreatedAt time.Time `json:"createdAt"` - Data MidServiceNotificationData `json:"data"` - // The environment from which the webhook originated. Possible values: **test**, **live**. - Environment string `json:"environment"` - // Type of notification. - Type string `json:"type"` -} - -// NewNotificationDataMessage instantiates a new NotificationDataMessage 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 NewNotificationDataMessage(createdAt time.Time, data MidServiceNotificationData, environment string, type_ string) *NotificationDataMessage { - this := NotificationDataMessage{} - this.CreatedAt = createdAt - this.Data = data - this.Environment = environment - this.Type = type_ - return &this -} - -// NewNotificationDataMessageWithDefaults instantiates a new NotificationDataMessage 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 NewNotificationDataMessageWithDefaults() *NotificationDataMessage { - this := NotificationDataMessage{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *NotificationDataMessage) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *NotificationDataMessage) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *NotificationDataMessage) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetData returns the Data field value -func (o *NotificationDataMessage) GetData() MidServiceNotificationData { - if o == nil { - var ret MidServiceNotificationData - return ret - } - - return o.Data -} - -// GetDataOk returns a tuple with the Data field value -// and a boolean to check if the value has been set. -func (o *NotificationDataMessage) GetDataOk() (*MidServiceNotificationData, bool) { - if o == nil { - return nil, false - } - return &o.Data, true -} - -// SetData sets field value -func (o *NotificationDataMessage) SetData(v MidServiceNotificationData) { - o.Data = v -} - -// GetEnvironment returns the Environment field value -func (o *NotificationDataMessage) GetEnvironment() string { - if o == nil { - var ret string - return ret - } - - return o.Environment -} - -// GetEnvironmentOk returns a tuple with the Environment field value -// and a boolean to check if the value has been set. -func (o *NotificationDataMessage) GetEnvironmentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Environment, true -} - -// SetEnvironment sets field value -func (o *NotificationDataMessage) SetEnvironment(v string) { - o.Environment = v -} - -// GetType returns the Type field value -func (o *NotificationDataMessage) 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 *NotificationDataMessage) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *NotificationDataMessage) SetType(v string) { - o.Type = v -} - -func (o NotificationDataMessage) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o NotificationDataMessage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["createdAt"] = o.CreatedAt - toSerialize["data"] = o.Data - toSerialize["environment"] = o.Environment - toSerialize["type"] = o.Type - return toSerialize, nil -} - -type NullableNotificationDataMessage struct { - value *NotificationDataMessage - isSet bool -} - -func (v NullableNotificationDataMessage) Get() *NotificationDataMessage { - return v.value -} - -func (v *NullableNotificationDataMessage) Set(val *NotificationDataMessage) { - v.value = val - v.isSet = true -} - -func (v NullableNotificationDataMessage) IsSet() bool { - return v.isSet -} - -func (v *NullableNotificationDataMessage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNotificationDataMessage(val *NotificationDataMessage) *NullableNotificationDataMessage { - return &NullableNotificationDataMessage{value: val, isSet: true} -} - -func (v NullableNotificationDataMessage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNotificationDataMessage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/payments/.openapi-generator/VERSION b/src/payments/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/payments/.openapi-generator/VERSION +++ b/src/payments/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/payments/api_modifications.go b/src/payments/api_modifications.go index 98cd93273..4dc124bca 100644 --- a/src/payments/api_modifications.go +++ b/src/payments/api_modifications.go @@ -147,12 +147,10 @@ CancelOrRefund Cancel or refund a payment Cancels a payment if it has not been captured yet, or refunds it if it has already been captured. This is useful when it is not certain if the payment has been captured or not (for example, when using auto-capture). Do not use this endpoint for payments that involve: + * [Multiple partial captures](https://docs.adyen.com/online-payments/capture). + * [Split data](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information) either at time of payment or capture for Adyen for Platforms. - - [Multiple partial captures](https://docs.adyen.com/online-payments/capture). - - - [Split data](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information) either at time of payment or capture for Adyen for Platforms. - - Instead, check if the payment has been captured and make a corresponding [`/refund`](https://docs.adyen.com/api-explorer/#/Payment/refund) or [`/cancel`](https://docs.adyen.com/api-explorer/#/Payment/cancel) call. + Instead, check if the payment has been captured and make a corresponding [`/refund`](https://docs.adyen.com/api-explorer/#/Payment/refund) or [`/cancel`](https://docs.adyen.com/api-explorer/#/Payment/cancel) call. For more information, refer to [Cancel or refund](https://docs.adyen.com/online-payments/classic-integrations/modify-payments/cancel-or-refund). @@ -211,6 +209,8 @@ For more information refer to [Capture](https://docs.adyen.com/online-payments/c > This endpoint is part of our [classic API integration](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce). If using a [newer integration](https://docs.adyen.com/online-payments), use the [`/payments/{paymentPspReference}/captures`](https://docs.adyen.com/api-explorer/#/CheckoutService/v67/post/payments/{paymentPspReference}/captures) endpoint on Checkout API instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r ModificationsApiCaptureInput - Request parameters, see CaptureInput @return ModificationResult, *http.Response, error diff --git a/src/payments/client.go b/src/payments/client.go index 130466197..dd0bc70d8 100644 --- a/src/payments/client.go +++ b/src/payments/client.go @@ -9,7 +9,7 @@ API version: 68 package payments import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Adyen Payment API API v68 @@ -27,10 +27,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.Endpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.Endpoint + } // API Services c.ModificationsApi = (*ModificationsApi)(&c.common) diff --git a/src/payments/model_response_additional_data_card.go b/src/payments/model_response_additional_data_card.go index be1a2f2f9..d37763b28 100644 --- a/src/payments/model_response_additional_data_card.go +++ b/src/payments/model_response_additional_data_card.go @@ -31,6 +31,8 @@ type ResponseAdditionalDataCard struct { CardIssuingCurrency *string `json:"cardIssuingCurrency,omitempty"` // The card payment method used for the transaction. Example: amex CardPaymentMethod *string `json:"cardPaymentMethod,omitempty"` + // The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit + CardProductId *string `json:"cardProductId,omitempty"` // The last four digits of a card number. > Returned only in case of a card payment. CardSummary *string `json:"cardSummary,omitempty"` // The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 @@ -246,6 +248,38 @@ func (o *ResponseAdditionalDataCard) SetCardPaymentMethod(v string) { o.CardPaymentMethod = &v } +// GetCardProductId returns the CardProductId field value if set, zero value otherwise. +func (o *ResponseAdditionalDataCard) GetCardProductId() string { + if o == nil || common.IsNil(o.CardProductId) { + var ret string + return ret + } + return *o.CardProductId +} + +// GetCardProductIdOk returns a tuple with the CardProductId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataCard) GetCardProductIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CardProductId) { + return nil, false + } + return o.CardProductId, true +} + +// HasCardProductId returns a boolean if a field has been set. +func (o *ResponseAdditionalDataCard) HasCardProductId() bool { + if o != nil && !common.IsNil(o.CardProductId) { + return true + } + + return false +} + +// SetCardProductId gets a reference to the given string and assigns it to the CardProductId field. +func (o *ResponseAdditionalDataCard) SetCardProductId(v string) { + o.CardProductId = &v +} + // GetCardSummary returns the CardSummary field value if set, zero value otherwise. func (o *ResponseAdditionalDataCard) GetCardSummary() string { if o == nil || common.IsNil(o.CardSummary) { @@ -338,6 +372,9 @@ func (o ResponseAdditionalDataCard) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CardPaymentMethod) { toSerialize["cardPaymentMethod"] = o.CardPaymentMethod } + if !common.IsNil(o.CardProductId) { + toSerialize["cardProductId"] = o.CardProductId + } if !common.IsNil(o.CardSummary) { toSerialize["cardSummary"] = o.CardSummary } @@ -382,3 +419,13 @@ func (v *NullableResponseAdditionalDataCard) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +func (o *ResponseAdditionalDataCard) isValidCardProductId() bool { + var allowedEnumValues = []string{"A", "B", "C", "D", "F", "MCC", "MCE", "MCF", "MCG", "MCH", "MCI"} + for _, allowed := range allowedEnumValues { + if o.GetCardProductId() == allowed { + return true + } + } + return false +} diff --git a/src/payout/.openapi-generator/VERSION b/src/payout/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/payout/.openapi-generator/VERSION +++ b/src/payout/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/payout/api_initialization.go b/src/payout/api_initialization.go index 29d51c999..b81675318 100644 --- a/src/payout/api_initialization.go +++ b/src/payout/api_initialization.go @@ -52,6 +52,7 @@ StoreDetail Store payout details > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + Stores payment details under the `PAYOUT` recurring contract. These payment details can be used later to submit a payout via the `/submitThirdParty` call. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -110,6 +111,7 @@ StoreDetailAndSubmitThirdParty Store details and submit a payout > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + Submits a payout and stores its details for subsequent payouts. The submitted payout must be confirmed or declined either by a reviewer or via `/confirmThirdParty` or `/declineThirdParty` calls. @@ -170,6 +172,7 @@ SubmitThirdParty Submit a payout > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + Submits a payout using the previously stored payment details. To store payment details, use the `/storeDetail` API call. The submitted payout must be confirmed or declined either by a reviewer or via `/confirmThirdParty` or `/declineThirdParty` calls. diff --git a/src/payout/api_instant_payouts.go b/src/payout/api_instant_payouts.go index 10515d31e..874b45018 100644 --- a/src/payout/api_instant_payouts.go +++ b/src/payout/api_instant_payouts.go @@ -52,6 +52,7 @@ Payout Make an instant card payout > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + With this call, you can pay out to your customers, and funds will be made available within 30 minutes on the cardholder's bank account (this is dependent on whether the issuer supports this functionality). Instant card payouts are only supported for Visa and Mastercard cards. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/src/payout/api_reviewing.go b/src/payout/api_reviewing.go index b180c0d10..284b1921e 100644 --- a/src/payout/api_reviewing.go +++ b/src/payout/api_reviewing.go @@ -52,6 +52,7 @@ ConfirmThirdParty Confirm a payout > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + Confirms a previously submitted payout. To cancel a payout, use the `/declineThirdParty` endpoint. @@ -112,6 +113,7 @@ DeclineThirdParty Cancel a payout > > For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + Cancels a previously submitted payout. To confirm and send a payout, use the `/confirmThirdParty` endpoint. diff --git a/src/payout/client.go b/src/payout/client.go index 9f667ff9a..8691b2b76 100644 --- a/src/payout/client.go +++ b/src/payout/client.go @@ -9,7 +9,7 @@ API version: 68 package payout import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Adyen Payout API API v68 @@ -29,10 +29,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.Endpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.Endpoint + } // API Services c.InitializationApi = (*InitializationApi)(&c.common) diff --git a/src/posterminalmanagement/.openapi-generator-ignore b/src/posterminalmanagement/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/posterminalmanagement/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/posterminalmanagement/.openapi-generator/VERSION b/src/posterminalmanagement/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/posterminalmanagement/.openapi-generator/VERSION +++ b/src/posterminalmanagement/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/recurring/.openapi-generator-ignore b/src/recurring/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/recurring/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/recurring/.openapi-generator/VERSION b/src/recurring/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/recurring/.openapi-generator/VERSION +++ b/src/recurring/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/reportwebhook/.openapi-generator-ignore b/src/reportwebhook/.openapi-generator-ignore deleted file mode 100644 index ac5d64112..000000000 --- a/src/reportwebhook/.openapi-generator-ignore +++ /dev/null @@ -1,7 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go - -# Webhook handler is not a generated file and should remain untouched -webhook_handler.go \ No newline at end of file diff --git a/src/reportwebhook/.openapi-generator/VERSION b/src/reportwebhook/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/reportwebhook/.openapi-generator/VERSION +++ b/src/reportwebhook/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/storedvalue/.openapi-generator-ignore b/src/storedvalue/.openapi-generator-ignore deleted file mode 100644 index 2f7402806..000000000 --- a/src/storedvalue/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go \ No newline at end of file diff --git a/src/storedvalue/.openapi-generator/VERSION b/src/storedvalue/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/storedvalue/.openapi-generator/VERSION +++ b/src/storedvalue/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/storedvalue/api_general.go b/src/storedvalue/api_general.go index f8741e84e..87f1b2e6f 100644 --- a/src/storedvalue/api_general.go +++ b/src/storedvalue/api_general.go @@ -229,7 +229,7 @@ func (a *GeneralApi) MergeBalanceInput() GeneralApiMergeBalanceInput { /* MergeBalance Merge the balance of two cards. -# Increases the balance of the paymentmethod by the full amount left on the source paymentmethod +Increases the balance of the paymentmethod by the full amount left on the source paymentmethod @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GeneralApiMergeBalanceInput - Request parameters, see MergeBalanceInput diff --git a/src/transactionwebhook/.openapi-generator-ignore b/src/transactionwebhook/.openapi-generator-ignore deleted file mode 100644 index ac5d64112..000000000 --- a/src/transactionwebhook/.openapi-generator-ignore +++ /dev/null @@ -1,7 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go - -# Webhook handler is not a generated file and should remain untouched -webhook_handler.go \ No newline at end of file diff --git a/src/transactionwebhook/model_balance_platform_notification_response.go b/src/transactionwebhook/model_balance_platform_notification_response.go index e1953718c..4100f9c3d 100644 --- a/src/transactionwebhook/model_balance_platform_notification_response.go +++ b/src/transactionwebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/transactionwebhook/model_bank_category_data.go b/src/transactionwebhook/model_bank_category_data.go new file mode 100644 index 000000000..0a092aed1 --- /dev/null +++ b/src/transactionwebhook/model_bank_category_data.go @@ -0,0 +1,185 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the BankCategoryData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BankCategoryData{} + +// BankCategoryData struct for BankCategoryData +type BankCategoryData struct { + // 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**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + Priority *string `json:"priority,omitempty"` + // **bank** + Type *string `json:"type,omitempty"` +} + +// NewBankCategoryData instantiates a new BankCategoryData 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 NewBankCategoryData() *BankCategoryData { + this := BankCategoryData{} + var type_ string = "bank" + this.Type = &type_ + return &this +} + +// NewBankCategoryDataWithDefaults instantiates a new BankCategoryData 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 NewBankCategoryDataWithDefaults() *BankCategoryData { + this := BankCategoryData{} + var type_ string = "bank" + this.Type = &type_ + return &this +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *BankCategoryData) 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 *BankCategoryData) 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 *BankCategoryData) 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 *BankCategoryData) SetPriority(v string) { + o.Priority = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BankCategoryData) 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 *BankCategoryData) 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 *BankCategoryData) 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 *BankCategoryData) SetType(v string) { + o.Type = &v +} + +func (o BankCategoryData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BankCategoryData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableBankCategoryData struct { + value *BankCategoryData + isSet bool +} + +func (v NullableBankCategoryData) Get() *BankCategoryData { + return v.value +} + +func (v *NullableBankCategoryData) Set(val *BankCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableBankCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableBankCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBankCategoryData(val *BankCategoryData) *NullableBankCategoryData { + return &NullableBankCategoryData{value: val, isSet: true} +} + +func (v NullableBankCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBankCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *BankCategoryData) isValidPriority() bool { + var allowedEnumValues = []string{"crossBorder", "fast", "instant", "internal", "regular", "wire"} + for _, allowed := range allowedEnumValues { + if o.GetPriority() == allowed { + return true + } + } + return false +} +func (o *BankCategoryData) isValidType() bool { + var allowedEnumValues = []string{"bank"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transactionwebhook/model_internal_category_data.go b/src/transactionwebhook/model_internal_category_data.go new file mode 100644 index 000000000..8bf60f08f --- /dev/null +++ b/src/transactionwebhook/model_internal_category_data.go @@ -0,0 +1,213 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the InternalCategoryData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &InternalCategoryData{} + +// InternalCategoryData struct for InternalCategoryData +type InternalCategoryData struct { + // The capture's merchant reference included in the transfer. + ModificationMerchantReference *string `json:"modificationMerchantReference,omitempty"` + // The capture reference included in the transfer. + ModificationPspReference *string `json:"modificationPspReference,omitempty"` + // **internal** + Type *string `json:"type,omitempty"` +} + +// NewInternalCategoryData instantiates a new InternalCategoryData 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 NewInternalCategoryData() *InternalCategoryData { + this := InternalCategoryData{} + var type_ string = "internal" + this.Type = &type_ + return &this +} + +// NewInternalCategoryDataWithDefaults instantiates a new InternalCategoryData 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 NewInternalCategoryDataWithDefaults() *InternalCategoryData { + this := InternalCategoryData{} + var type_ string = "internal" + this.Type = &type_ + return &this +} + +// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. +func (o *InternalCategoryData) 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. +func (o *InternalCategoryData) 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 *InternalCategoryData) 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. +func (o *InternalCategoryData) SetModificationMerchantReference(v string) { + o.ModificationMerchantReference = &v +} + +// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. +func (o *InternalCategoryData) 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. +func (o *InternalCategoryData) 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 *InternalCategoryData) 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. +func (o *InternalCategoryData) SetModificationPspReference(v string) { + o.ModificationPspReference = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InternalCategoryData) 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 *InternalCategoryData) 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 *InternalCategoryData) 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 *InternalCategoryData) SetType(v string) { + o.Type = &v +} + +func (o InternalCategoryData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InternalCategoryData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ModificationMerchantReference) { + toSerialize["modificationMerchantReference"] = o.ModificationMerchantReference + } + if !common.IsNil(o.ModificationPspReference) { + toSerialize["modificationPspReference"] = o.ModificationPspReference + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableInternalCategoryData struct { + value *InternalCategoryData + isSet bool +} + +func (v NullableInternalCategoryData) Get() *InternalCategoryData { + return v.value +} + +func (v *NullableInternalCategoryData) Set(val *InternalCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableInternalCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableInternalCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInternalCategoryData(val *InternalCategoryData) *NullableInternalCategoryData { + return &NullableInternalCategoryData{value: val, isSet: true} +} + +func (v NullableInternalCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInternalCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *InternalCategoryData) isValidType() bool { + var allowedEnumValues = []string{"internal"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transactionwebhook/model_issued_card.go b/src/transactionwebhook/model_issued_card.go new file mode 100644 index 000000000..daf6a48d0 --- /dev/null +++ b/src/transactionwebhook/model_issued_card.go @@ -0,0 +1,415 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the IssuedCard type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &IssuedCard{} + +// IssuedCard struct for IssuedCard +type IssuedCard struct { + // The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** + AuthorisationType *string `json:"authorisationType,omitempty"` + // Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + PanEntryMode *string `json:"panEntryMode,omitempty"` + // Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + ProcessingType *string `json:"processingType,omitempty"` + RelayedAuthorisationData *RelayedAuthorisationData `json:"relayedAuthorisationData,omitempty"` + // The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. + SchemeTraceId *string `json:"schemeTraceId,omitempty"` + // The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. + SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + // **issuedCard** + Type *string `json:"type,omitempty"` + // The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + ValidationFacts []TransferNotificationValidationFact `json:"validationFacts,omitempty"` +} + +// NewIssuedCard instantiates a new IssuedCard 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 NewIssuedCard() *IssuedCard { + this := IssuedCard{} + var type_ string = "issuedCard" + this.Type = &type_ + return &this +} + +// NewIssuedCardWithDefaults instantiates a new IssuedCard 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 NewIssuedCardWithDefaults() *IssuedCard { + this := IssuedCard{} + var type_ string = "issuedCard" + this.Type = &type_ + return &this +} + +// GetAuthorisationType returns the AuthorisationType field value if set, zero value otherwise. +func (o *IssuedCard) GetAuthorisationType() string { + if o == nil || common.IsNil(o.AuthorisationType) { + var ret string + return ret + } + return *o.AuthorisationType +} + +// GetAuthorisationTypeOk returns a tuple with the AuthorisationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetAuthorisationTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.AuthorisationType) { + return nil, false + } + return o.AuthorisationType, true +} + +// HasAuthorisationType returns a boolean if a field has been set. +func (o *IssuedCard) HasAuthorisationType() bool { + if o != nil && !common.IsNil(o.AuthorisationType) { + return true + } + + return false +} + +// SetAuthorisationType gets a reference to the given string and assigns it to the AuthorisationType field. +func (o *IssuedCard) SetAuthorisationType(v string) { + o.AuthorisationType = &v +} + +// GetPanEntryMode returns the PanEntryMode field value if set, zero value otherwise. +func (o *IssuedCard) 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. +func (o *IssuedCard) 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 *IssuedCard) 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. +func (o *IssuedCard) SetPanEntryMode(v string) { + o.PanEntryMode = &v +} + +// GetProcessingType returns the ProcessingType field value if set, zero value otherwise. +func (o *IssuedCard) 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. +func (o *IssuedCard) 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 *IssuedCard) 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. +func (o *IssuedCard) SetProcessingType(v string) { + o.ProcessingType = &v +} + +// GetRelayedAuthorisationData returns the RelayedAuthorisationData field value if set, zero value otherwise. +func (o *IssuedCard) 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 *IssuedCard) 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 *IssuedCard) 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 *IssuedCard) SetRelayedAuthorisationData(v RelayedAuthorisationData) { + o.RelayedAuthorisationData = &v +} + +// GetSchemeTraceId returns the SchemeTraceId field value if set, zero value otherwise. +func (o *IssuedCard) GetSchemeTraceId() string { + if o == nil || common.IsNil(o.SchemeTraceId) { + var ret string + return ret + } + return *o.SchemeTraceId +} + +// GetSchemeTraceIdOk returns a tuple with the SchemeTraceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetSchemeTraceIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SchemeTraceId) { + return nil, false + } + return o.SchemeTraceId, true +} + +// HasSchemeTraceId returns a boolean if a field has been set. +func (o *IssuedCard) HasSchemeTraceId() bool { + if o != nil && !common.IsNil(o.SchemeTraceId) { + return true + } + + return false +} + +// SetSchemeTraceId gets a reference to the given string and assigns it to the SchemeTraceId field. +func (o *IssuedCard) SetSchemeTraceId(v string) { + o.SchemeTraceId = &v +} + +// GetSchemeUniqueTransactionId returns the SchemeUniqueTransactionId field value if set, zero value otherwise. +func (o *IssuedCard) GetSchemeUniqueTransactionId() string { + if o == nil || common.IsNil(o.SchemeUniqueTransactionId) { + var ret string + return ret + } + return *o.SchemeUniqueTransactionId +} + +// GetSchemeUniqueTransactionIdOk returns a tuple with the SchemeUniqueTransactionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetSchemeUniqueTransactionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SchemeUniqueTransactionId) { + return nil, false + } + return o.SchemeUniqueTransactionId, true +} + +// HasSchemeUniqueTransactionId returns a boolean if a field has been set. +func (o *IssuedCard) HasSchemeUniqueTransactionId() bool { + if o != nil && !common.IsNil(o.SchemeUniqueTransactionId) { + return true + } + + return false +} + +// SetSchemeUniqueTransactionId gets a reference to the given string and assigns it to the SchemeUniqueTransactionId field. +func (o *IssuedCard) SetSchemeUniqueTransactionId(v string) { + o.SchemeUniqueTransactionId = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IssuedCard) 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 *IssuedCard) 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 *IssuedCard) 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 *IssuedCard) SetType(v string) { + o.Type = &v +} + +// GetValidationFacts returns the ValidationFacts field value if set, zero value otherwise. +func (o *IssuedCard) 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. +func (o *IssuedCard) 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 *IssuedCard) 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. +func (o *IssuedCard) SetValidationFacts(v []TransferNotificationValidationFact) { + o.ValidationFacts = v +} + +func (o IssuedCard) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedCard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AuthorisationType) { + toSerialize["authorisationType"] = o.AuthorisationType + } + if !common.IsNil(o.PanEntryMode) { + toSerialize["panEntryMode"] = o.PanEntryMode + } + if !common.IsNil(o.ProcessingType) { + toSerialize["processingType"] = o.ProcessingType + } + if !common.IsNil(o.RelayedAuthorisationData) { + toSerialize["relayedAuthorisationData"] = o.RelayedAuthorisationData + } + if !common.IsNil(o.SchemeTraceId) { + toSerialize["schemeTraceId"] = o.SchemeTraceId + } + if !common.IsNil(o.SchemeUniqueTransactionId) { + toSerialize["schemeUniqueTransactionId"] = o.SchemeUniqueTransactionId + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !common.IsNil(o.ValidationFacts) { + toSerialize["validationFacts"] = o.ValidationFacts + } + return toSerialize, nil +} + +type NullableIssuedCard struct { + value *IssuedCard + isSet bool +} + +func (v NullableIssuedCard) Get() *IssuedCard { + return v.value +} + +func (v *NullableIssuedCard) Set(val *IssuedCard) { + v.value = val + v.isSet = true +} + +func (v NullableIssuedCard) IsSet() bool { + return v.isSet +} + +func (v *NullableIssuedCard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIssuedCard(val *IssuedCard) *NullableIssuedCard { + return &NullableIssuedCard{value: val, isSet: true} +} + +func (v NullableIssuedCard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIssuedCard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *IssuedCard) 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 *IssuedCard) 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 *IssuedCard) isValidType() bool { + var allowedEnumValues = []string{"issuedCard"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transactionwebhook/model_payment_instrument.go b/src/transactionwebhook/model_payment_instrument.go new file mode 100644 index 000000000..ec53762a7 --- /dev/null +++ b/src/transactionwebhook/model_payment_instrument.go @@ -0,0 +1,236 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the PaymentInstrument type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PaymentInstrument{} + +// PaymentInstrument struct for PaymentInstrument +type PaymentInstrument struct { + // The description of the resource. + Description *string `json:"description,omitempty"` + // The unique identifier of the resource. + Id *string `json:"id,omitempty"` + // The reference for the resource. + Reference *string `json:"reference,omitempty"` + // The type of wallet that the network token is associated with. + TokenType *string `json:"tokenType,omitempty"` +} + +// NewPaymentInstrument instantiates a new PaymentInstrument 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 NewPaymentInstrument() *PaymentInstrument { + this := PaymentInstrument{} + return &this +} + +// NewPaymentInstrumentWithDefaults instantiates a new PaymentInstrument 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 NewPaymentInstrumentWithDefaults() *PaymentInstrument { + this := PaymentInstrument{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) SetId(v string) { + o.Id = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) 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 *PaymentInstrument) SetReference(v string) { + o.Reference = &v +} + +// GetTokenType returns the TokenType field value if set, zero value otherwise. +func (o *PaymentInstrument) GetTokenType() string { + if o == nil || common.IsNil(o.TokenType) { + var ret string + return ret + } + return *o.TokenType +} + +// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentInstrument) GetTokenTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.TokenType) { + return nil, false + } + return o.TokenType, true +} + +// HasTokenType returns a boolean if a field has been set. +func (o *PaymentInstrument) HasTokenType() bool { + if o != nil && !common.IsNil(o.TokenType) { + return true + } + + return false +} + +// SetTokenType gets a reference to the given string and assigns it to the TokenType field. +func (o *PaymentInstrument) SetTokenType(v string) { + o.TokenType = &v +} + +func (o PaymentInstrument) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentInstrument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.TokenType) { + toSerialize["tokenType"] = o.TokenType + } + return toSerialize, nil +} + +type NullablePaymentInstrument struct { + value *PaymentInstrument + isSet bool +} + +func (v NullablePaymentInstrument) Get() *PaymentInstrument { + return v.value +} + +func (v *NullablePaymentInstrument) Set(val *PaymentInstrument) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentInstrument) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentInstrument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentInstrument(val *PaymentInstrument) *NullablePaymentInstrument { + return &NullablePaymentInstrument{value: val, isSet: true} +} + +func (v NullablePaymentInstrument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentInstrument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transactionwebhook/model_platform_payment.go b/src/transactionwebhook/model_platform_payment.go new file mode 100644 index 000000000..7c90e1a93 --- /dev/null +++ b/src/transactionwebhook/model_platform_payment.go @@ -0,0 +1,333 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the PlatformPayment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PlatformPayment{} + +// PlatformPayment struct for PlatformPayment +type PlatformPayment struct { + // The capture's merchant reference included in the transfer. + ModificationMerchantReference *string `json:"modificationMerchantReference,omitempty"` + // The capture reference included in the transfer. + ModificationPspReference *string `json:"modificationPspReference,omitempty"` + // The payment's merchant reference included in the transfer. + PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` + // The type of the related split. + PlatformPaymentType *string `json:"platformPaymentType,omitempty"` + // The payment reference included in the transfer. + PspPaymentReference *string `json:"pspPaymentReference,omitempty"` + // **platformPayment** + Type *string `json:"type,omitempty"` +} + +// NewPlatformPayment instantiates a new PlatformPayment 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 NewPlatformPayment() *PlatformPayment { + this := PlatformPayment{} + var type_ string = "platformPayment" + this.Type = &type_ + return &this +} + +// NewPlatformPaymentWithDefaults instantiates a new PlatformPayment 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 NewPlatformPaymentWithDefaults() *PlatformPayment { + this := PlatformPayment{} + var type_ string = "platformPayment" + this.Type = &type_ + return &this +} + +// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. +func (o *PlatformPayment) 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. +func (o *PlatformPayment) 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 *PlatformPayment) 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. +func (o *PlatformPayment) SetModificationMerchantReference(v string) { + o.ModificationMerchantReference = &v +} + +// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. +func (o *PlatformPayment) 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. +func (o *PlatformPayment) 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 *PlatformPayment) 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. +func (o *PlatformPayment) SetModificationPspReference(v string) { + o.ModificationPspReference = &v +} + +// GetPaymentMerchantReference returns the PaymentMerchantReference field value if set, zero value otherwise. +func (o *PlatformPayment) 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. +func (o *PlatformPayment) 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 *PlatformPayment) 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. +func (o *PlatformPayment) SetPaymentMerchantReference(v string) { + o.PaymentMerchantReference = &v +} + +// GetPlatformPaymentType returns the PlatformPaymentType field value if set, zero value otherwise. +func (o *PlatformPayment) 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. +func (o *PlatformPayment) 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 *PlatformPayment) 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. +func (o *PlatformPayment) SetPlatformPaymentType(v string) { + o.PlatformPaymentType = &v +} + +// GetPspPaymentReference returns the PspPaymentReference field value if set, zero value otherwise. +func (o *PlatformPayment) 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. +func (o *PlatformPayment) 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 *PlatformPayment) 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. +func (o *PlatformPayment) SetPspPaymentReference(v string) { + o.PspPaymentReference = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PlatformPayment) 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 *PlatformPayment) 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 *PlatformPayment) 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 *PlatformPayment) SetType(v string) { + o.Type = &v +} + +func (o PlatformPayment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlatformPayment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ModificationMerchantReference) { + toSerialize["modificationMerchantReference"] = o.ModificationMerchantReference + } + if !common.IsNil(o.ModificationPspReference) { + toSerialize["modificationPspReference"] = o.ModificationPspReference + } + if !common.IsNil(o.PaymentMerchantReference) { + toSerialize["paymentMerchantReference"] = o.PaymentMerchantReference + } + if !common.IsNil(o.PlatformPaymentType) { + toSerialize["platformPaymentType"] = o.PlatformPaymentType + } + if !common.IsNil(o.PspPaymentReference) { + toSerialize["pspPaymentReference"] = o.PspPaymentReference + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullablePlatformPayment struct { + value *PlatformPayment + isSet bool +} + +func (v NullablePlatformPayment) Get() *PlatformPayment { + return v.value +} + +func (v *NullablePlatformPayment) Set(val *PlatformPayment) { + v.value = val + v.isSet = true +} + +func (v NullablePlatformPayment) IsSet() bool { + return v.isSet +} + +func (v *NullablePlatformPayment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlatformPayment(val *PlatformPayment) *NullablePlatformPayment { + return &NullablePlatformPayment{value: val, isSet: true} +} + +func (v NullablePlatformPayment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlatformPayment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *PlatformPayment) isValidPlatformPaymentType() bool { + var allowedEnumValues = []string{"AcquiringFees", "AdyenCommission", "AdyenFees", "AdyenMarkup", "BalanceAccount", "Commission", "Default", "Interchange", "PaymentFee", "Remainder", "SchemeFee", "Surcharge", "Tip", "TopUp", "VAT"} + for _, allowed := range allowedEnumValues { + if o.GetPlatformPaymentType() == allowed { + return true + } + } + return false +} +func (o *PlatformPayment) isValidType() bool { + var allowedEnumValues = []string{"platformPayment"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transactionwebhook/model_relayed_authorisation_data.go b/src/transactionwebhook/model_relayed_authorisation_data.go new file mode 100644 index 000000000..462bf2c7c --- /dev/null +++ b/src/transactionwebhook/model_relayed_authorisation_data.go @@ -0,0 +1,162 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the RelayedAuthorisationData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RelayedAuthorisationData{} + +// RelayedAuthorisationData struct for RelayedAuthorisationData +type RelayedAuthorisationData struct { + // Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. + Metadata *map[string]string `json:"metadata,omitempty"` + // Your reference for the relayed authorisation data. + Reference *string `json:"reference,omitempty"` +} + +// NewRelayedAuthorisationData instantiates a new RelayedAuthorisationData 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 NewRelayedAuthorisationData() *RelayedAuthorisationData { + this := RelayedAuthorisationData{} + return &this +} + +// NewRelayedAuthorisationDataWithDefaults instantiates a new RelayedAuthorisationData 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 NewRelayedAuthorisationDataWithDefaults() *RelayedAuthorisationData { + this := RelayedAuthorisationData{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *RelayedAuthorisationData) 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 *RelayedAuthorisationData) 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 *RelayedAuthorisationData) 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 *RelayedAuthorisationData) SetMetadata(v map[string]string) { + o.Metadata = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *RelayedAuthorisationData) 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 *RelayedAuthorisationData) 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 *RelayedAuthorisationData) 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 *RelayedAuthorisationData) SetReference(v string) { + o.Reference = &v +} + +func (o RelayedAuthorisationData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RelayedAuthorisationData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +type NullableRelayedAuthorisationData struct { + value *RelayedAuthorisationData + isSet bool +} + +func (v NullableRelayedAuthorisationData) Get() *RelayedAuthorisationData { + return v.value +} + +func (v *NullableRelayedAuthorisationData) Set(val *RelayedAuthorisationData) { + v.value = val + v.isSet = true +} + +func (v NullableRelayedAuthorisationData) IsSet() bool { + return v.isSet +} + +func (v *NullableRelayedAuthorisationData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelayedAuthorisationData(val *RelayedAuthorisationData) *NullableRelayedAuthorisationData { + return &NullableRelayedAuthorisationData{value: val, isSet: true} +} + +func (v NullableRelayedAuthorisationData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelayedAuthorisationData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transactionwebhook/model_transaction.go b/src/transactionwebhook/model_transaction.go index c72f7cadb..0d08a2f0e 100644 --- a/src/transactionwebhook/model_transaction.go +++ b/src/transactionwebhook/model_transaction.go @@ -29,11 +29,16 @@ type Transaction struct { BookingDate time.Time `json:"bookingDate"` // 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"` + // The `description` from the `/transfers` request. + Description *string `json:"description,omitempty"` // The unique identifier of the transaction. - Id string `json:"id"` + Id string `json:"id"` + PaymentInstrument *PaymentInstrument `json:"paymentInstrument,omitempty"` + // The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. + ReferenceForBeneficiary *string `json:"referenceForBeneficiary,omitempty"` // The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. Status string `json:"status"` - Transfer *TransferData `json:"transfer,omitempty"` + Transfer *TransferView `json:"transfer,omitempty"` // The date the transfer amount becomes available in the balance account. ValueDate time.Time `json:"valueDate"` } @@ -215,6 +220,38 @@ func (o *Transaction) SetCreationDate(v time.Time) { o.CreationDate = &v } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Transaction) 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 *Transaction) 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 *Transaction) 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 *Transaction) SetDescription(v string) { + o.Description = &v +} + // GetId returns the Id field value func (o *Transaction) GetId() string { if o == nil { @@ -239,6 +276,70 @@ func (o *Transaction) SetId(v string) { o.Id = v } +// GetPaymentInstrument returns the PaymentInstrument field value if set, zero value otherwise. +func (o *Transaction) 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 *Transaction) 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 *Transaction) 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 *Transaction) SetPaymentInstrument(v PaymentInstrument) { + o.PaymentInstrument = &v +} + +// GetReferenceForBeneficiary returns the ReferenceForBeneficiary field value if set, zero value otherwise. +func (o *Transaction) 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 *Transaction) 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 *Transaction) 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 *Transaction) SetReferenceForBeneficiary(v string) { + o.ReferenceForBeneficiary = &v +} + // GetStatus returns the Status field value func (o *Transaction) GetStatus() string { if o == nil { @@ -264,9 +365,9 @@ func (o *Transaction) SetStatus(v string) { } // GetTransfer returns the Transfer field value if set, zero value otherwise. -func (o *Transaction) GetTransfer() TransferData { +func (o *Transaction) GetTransfer() TransferView { if o == nil || common.IsNil(o.Transfer) { - var ret TransferData + var ret TransferView return ret } return *o.Transfer @@ -274,7 +375,7 @@ func (o *Transaction) GetTransfer() TransferData { // GetTransferOk returns a tuple with the Transfer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Transaction) GetTransferOk() (*TransferData, bool) { +func (o *Transaction) GetTransferOk() (*TransferView, bool) { if o == nil || common.IsNil(o.Transfer) { return nil, false } @@ -290,8 +391,8 @@ func (o *Transaction) HasTransfer() bool { return false } -// SetTransfer gets a reference to the given TransferData and assigns it to the Transfer field. -func (o *Transaction) SetTransfer(v TransferData) { +// SetTransfer gets a reference to the given TransferView and assigns it to the Transfer field. +func (o *Transaction) SetTransfer(v TransferView) { o.Transfer = &v } @@ -337,7 +438,16 @@ func (o Transaction) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate } + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } toSerialize["id"] = o.Id + if !common.IsNil(o.PaymentInstrument) { + toSerialize["paymentInstrument"] = o.PaymentInstrument + } + if !common.IsNil(o.ReferenceForBeneficiary) { + toSerialize["referenceForBeneficiary"] = o.ReferenceForBeneficiary + } toSerialize["status"] = o.Status if !common.IsNil(o.Transfer) { toSerialize["transfer"] = o.Transfer diff --git a/src/transactionwebhook/model_transfer_data.go b/src/transactionwebhook/model_transfer_data.go deleted file mode 100644 index ade570306..000000000 --- a/src/transactionwebhook/model_transfer_data.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Transaction webhooks - -API version: 4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package transactionwebhook - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/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 { - // The ID of the resource. - Id *string `json:"id,omitempty"` - // The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - Reference string `json:"reference"` -} - -// 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(reference string) *TransferData { - this := TransferData{} - this.Reference = reference - 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 -} - -// 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 -} - -// GetReference returns the Reference field value -func (o *TransferData) 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 *TransferData) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *TransferData) SetReference(v string) { - o.Reference = 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.Id) { - toSerialize["id"] = o.Id - } - toSerialize["reference"] = o.Reference - 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) -} diff --git a/src/transactionwebhook/model_transfer_notification_validation_fact.go b/src/transactionwebhook/model_transfer_notification_validation_fact.go new file mode 100644 index 000000000..6d6df4499 --- /dev/null +++ b/src/transactionwebhook/model_transfer_notification_validation_fact.go @@ -0,0 +1,162 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the TransferNotificationValidationFact type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferNotificationValidationFact{} + +// TransferNotificationValidationFact struct for TransferNotificationValidationFact +type TransferNotificationValidationFact struct { + // The evaluation result of the validation fact. + Result *string `json:"result,omitempty"` + // The type of the validation fact. + Type *string `json:"type,omitempty"` +} + +// NewTransferNotificationValidationFact instantiates a new TransferNotificationValidationFact 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 NewTransferNotificationValidationFact() *TransferNotificationValidationFact { + this := TransferNotificationValidationFact{} + return &this +} + +// NewTransferNotificationValidationFactWithDefaults instantiates a new TransferNotificationValidationFact 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 NewTransferNotificationValidationFactWithDefaults() *TransferNotificationValidationFact { + this := TransferNotificationValidationFact{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *TransferNotificationValidationFact) GetResult() string { + if o == nil || common.IsNil(o.Result) { + var ret string + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferNotificationValidationFact) GetResultOk() (*string, bool) { + if o == nil || common.IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *TransferNotificationValidationFact) HasResult() bool { + if o != nil && !common.IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given string and assigns it to the Result field. +func (o *TransferNotificationValidationFact) SetResult(v string) { + o.Result = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransferNotificationValidationFact) 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 *TransferNotificationValidationFact) 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 *TransferNotificationValidationFact) 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 *TransferNotificationValidationFact) SetType(v string) { + o.Type = &v +} + +func (o TransferNotificationValidationFact) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferNotificationValidationFact) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Result) { + toSerialize["result"] = o.Result + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableTransferNotificationValidationFact struct { + value *TransferNotificationValidationFact + isSet bool +} + +func (v NullableTransferNotificationValidationFact) Get() *TransferNotificationValidationFact { + return v.value +} + +func (v *NullableTransferNotificationValidationFact) Set(val *TransferNotificationValidationFact) { + v.value = val + v.isSet = true +} + +func (v NullableTransferNotificationValidationFact) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferNotificationValidationFact) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferNotificationValidationFact(val *TransferNotificationValidationFact) *NullableTransferNotificationValidationFact { + return &NullableTransferNotificationValidationFact{value: val, isSet: true} +} + +func (v NullableTransferNotificationValidationFact) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferNotificationValidationFact) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transactionwebhook/model_transfer_view.go b/src/transactionwebhook/model_transfer_view.go new file mode 100644 index 000000000..e7eeb4d3a --- /dev/null +++ b/src/transactionwebhook/model_transfer_view.go @@ -0,0 +1,189 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v14/src/common" +) + +// checks if the TransferView type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferView{} + +// TransferView struct for TransferView +type TransferView struct { + CategoryData *TransferViewCategoryData `json:"categoryData,omitempty"` + // The ID of the resource. + Id *string `json:"id,omitempty"` + // The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. + Reference string `json:"reference"` +} + +// NewTransferView instantiates a new TransferView 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 NewTransferView(reference string) *TransferView { + this := TransferView{} + this.Reference = reference + return &this +} + +// NewTransferViewWithDefaults instantiates a new TransferView 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 NewTransferViewWithDefaults() *TransferView { + this := TransferView{} + return &this +} + +// GetCategoryData returns the CategoryData field value if set, zero value otherwise. +func (o *TransferView) GetCategoryData() TransferViewCategoryData { + if o == nil || common.IsNil(o.CategoryData) { + var ret TransferViewCategoryData + return ret + } + return *o.CategoryData +} + +// GetCategoryDataOk returns a tuple with the CategoryData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferView) GetCategoryDataOk() (*TransferViewCategoryData, bool) { + if o == nil || common.IsNil(o.CategoryData) { + return nil, false + } + return o.CategoryData, true +} + +// HasCategoryData returns a boolean if a field has been set. +func (o *TransferView) HasCategoryData() bool { + if o != nil && !common.IsNil(o.CategoryData) { + return true + } + + return false +} + +// SetCategoryData gets a reference to the given TransferViewCategoryData and assigns it to the CategoryData field. +func (o *TransferView) SetCategoryData(v TransferViewCategoryData) { + o.CategoryData = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TransferView) 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 *TransferView) 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 *TransferView) 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 *TransferView) SetId(v string) { + o.Id = &v +} + +// GetReference returns the Reference field value +func (o *TransferView) 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 *TransferView) GetReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reference, true +} + +// SetReference sets field value +func (o *TransferView) SetReference(v string) { + o.Reference = v +} + +func (o TransferView) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CategoryData) { + toSerialize["categoryData"] = o.CategoryData + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["reference"] = o.Reference + return toSerialize, nil +} + +type NullableTransferView struct { + value *TransferView + isSet bool +} + +func (v NullableTransferView) Get() *TransferView { + return v.value +} + +func (v *NullableTransferView) Set(val *TransferView) { + v.value = val + v.isSet = true +} + +func (v NullableTransferView) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferView(val *TransferView) *NullableTransferView { + return &NullableTransferView{value: val, isSet: true} +} + +func (v NullableTransferView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transactionwebhook/model_transfer_view_category_data.go b/src/transactionwebhook/model_transfer_view_category_data.go new file mode 100644 index 000000000..593b1c982 --- /dev/null +++ b/src/transactionwebhook/model_transfer_view_category_data.go @@ -0,0 +1,203 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + "fmt" +) + +// TransferViewCategoryData - The relevant data according to the transfer category. +type TransferViewCategoryData struct { + BankCategoryData *BankCategoryData + InternalCategoryData *InternalCategoryData + IssuedCard *IssuedCard + PlatformPayment *PlatformPayment +} + +// BankCategoryDataAsTransferViewCategoryData is a convenience function that returns BankCategoryData wrapped in TransferViewCategoryData +func BankCategoryDataAsTransferViewCategoryData(v *BankCategoryData) TransferViewCategoryData { + return TransferViewCategoryData{ + BankCategoryData: v, + } +} + +// InternalCategoryDataAsTransferViewCategoryData is a convenience function that returns InternalCategoryData wrapped in TransferViewCategoryData +func InternalCategoryDataAsTransferViewCategoryData(v *InternalCategoryData) TransferViewCategoryData { + return TransferViewCategoryData{ + InternalCategoryData: v, + } +} + +// IssuedCardAsTransferViewCategoryData is a convenience function that returns IssuedCard wrapped in TransferViewCategoryData +func IssuedCardAsTransferViewCategoryData(v *IssuedCard) TransferViewCategoryData { + return TransferViewCategoryData{ + IssuedCard: v, + } +} + +// PlatformPaymentAsTransferViewCategoryData is a convenience function that returns PlatformPayment wrapped in TransferViewCategoryData +func PlatformPaymentAsTransferViewCategoryData(v *PlatformPayment) TransferViewCategoryData { + return TransferViewCategoryData{ + PlatformPayment: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TransferViewCategoryData) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BankCategoryData + err = json.Unmarshal(data, &dst.BankCategoryData) + if err == nil { + jsonBankCategoryData, _ := json.Marshal(dst.BankCategoryData) + if string(jsonBankCategoryData) == "{}" || !dst.BankCategoryData.isValidType() { // empty struct + dst.BankCategoryData = nil + } else { + match++ + } + } else { + dst.BankCategoryData = nil + } + + // try to unmarshal data into InternalCategoryData + err = json.Unmarshal(data, &dst.InternalCategoryData) + if err == nil { + jsonInternalCategoryData, _ := json.Marshal(dst.InternalCategoryData) + if string(jsonInternalCategoryData) == "{}" || !dst.InternalCategoryData.isValidType() { // empty struct + dst.InternalCategoryData = nil + } else { + match++ + } + } else { + dst.InternalCategoryData = nil + } + + // try to unmarshal data into IssuedCard + err = json.Unmarshal(data, &dst.IssuedCard) + if err == nil { + jsonIssuedCard, _ := json.Marshal(dst.IssuedCard) + if string(jsonIssuedCard) == "{}" || !dst.IssuedCard.isValidType() { // empty struct + dst.IssuedCard = nil + } else { + match++ + } + } else { + dst.IssuedCard = nil + } + + // try to unmarshal data into PlatformPayment + err = json.Unmarshal(data, &dst.PlatformPayment) + if err == nil { + jsonPlatformPayment, _ := json.Marshal(dst.PlatformPayment) + if string(jsonPlatformPayment) == "{}" || !dst.PlatformPayment.isValidType() { // empty struct + dst.PlatformPayment = nil + } else { + match++ + } + } else { + dst.PlatformPayment = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BankCategoryData = nil + dst.InternalCategoryData = nil + dst.IssuedCard = nil + dst.PlatformPayment = nil + + return fmt.Errorf("data matches more than one schema in oneOf(TransferViewCategoryData)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(TransferViewCategoryData)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TransferViewCategoryData) MarshalJSON() ([]byte, error) { + if src.BankCategoryData != nil { + return json.Marshal(&src.BankCategoryData) + } + + if src.InternalCategoryData != nil { + return json.Marshal(&src.InternalCategoryData) + } + + if src.IssuedCard != nil { + return json.Marshal(&src.IssuedCard) + } + + if src.PlatformPayment != nil { + return json.Marshal(&src.PlatformPayment) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TransferViewCategoryData) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.BankCategoryData != nil { + return obj.BankCategoryData + } + + if obj.InternalCategoryData != nil { + return obj.InternalCategoryData + } + + if obj.IssuedCard != nil { + return obj.IssuedCard + } + + if obj.PlatformPayment != nil { + return obj.PlatformPayment + } + + // all schemas are nil + return nil +} + +type NullableTransferViewCategoryData struct { + value *TransferViewCategoryData + isSet bool +} + +func (v NullableTransferViewCategoryData) Get() *TransferViewCategoryData { + return v.value +} + +func (v *NullableTransferViewCategoryData) Set(val *TransferViewCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableTransferViewCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferViewCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferViewCategoryData(val *TransferViewCategoryData) *NullableTransferViewCategoryData { + return &NullableTransferViewCategoryData{value: val, isSet: true} +} + +func (v NullableTransferViewCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferViewCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/api_capital.go b/src/transfers/api_capital.go index 51a7d8a0d..615eda424 100644 --- a/src/transfers/api_capital.go +++ b/src/transfers/api_capital.go @@ -228,9 +228,16 @@ func (a *CapitalApi) GetGrantReferenceDetails(ctx context.Context, r CapitalApiG // All parameters accepted by CapitalApi.RequestGrantPayout type CapitalApiRequestGrantPayoutInput struct { + idempotencyKey *string capitalGrantInfo *CapitalGrantInfo } +// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). +func (r CapitalApiRequestGrantPayoutInput) IdempotencyKey(idempotencyKey string) CapitalApiRequestGrantPayoutInput { + r.idempotencyKey = &idempotencyKey + return r +} + func (r CapitalApiRequestGrantPayoutInput) CapitalGrantInfo(capitalGrantInfo CapitalGrantInfo) CapitalApiRequestGrantPayoutInput { r.capitalGrantInfo = &capitalGrantInfo return r @@ -259,6 +266,9 @@ func (a *CapitalApi) RequestGrantPayout(ctx context.Context, r CapitalApiRequest path := "/grants" queryParams := url.Values{} headerParams := make(map[string]string) + if r.idempotencyKey != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, diff --git a/src/transfers/api_transactions.go b/src/transfers/api_transactions.go index 54a7eef1d..ab8f641b8 100644 --- a/src/transfers/api_transactions.go +++ b/src/transfers/api_transactions.go @@ -106,6 +106,8 @@ When making this request, you must include at least one of the following: This endpoint supports cursor-based pagination. The response returns the first page of results, and returns links to the next and previous pages when applicable. You can use the links to page through the results. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r TransactionsApiGetAllTransactionsInput - Request parameters, see GetAllTransactionsInput @return TransactionSearchResponse, *http.Response, error diff --git a/src/transfers/api_transfers.go b/src/transfers/api_transfers.go index 15575886e..d13404a0c 100644 --- a/src/transfers/api_transfers.go +++ b/src/transfers/api_transfers.go @@ -25,10 +25,17 @@ type TransfersApi common.Service // All parameters accepted by TransfersApi.ApproveInitiatedTransfers type TransfersApiApproveInitiatedTransfersInput struct { + idempotencyKey *string wWWAuthenticate *string approveTransfersRequest *ApproveTransfersRequest } +// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). +func (r TransfersApiApproveInitiatedTransfersInput) IdempotencyKey(idempotencyKey string) TransfersApiApproveInitiatedTransfersInput { + r.idempotencyKey = &idempotencyKey + return r +} + // Header for authenticating through SCA func (r TransfersApiApproveInitiatedTransfersInput) WWWAuthenticate(wWWAuthenticate string) TransfersApiApproveInitiatedTransfersInput { r.wWWAuthenticate = &wWWAuthenticate @@ -69,6 +76,9 @@ func (a *TransfersApi) ApproveInitiatedTransfers(ctx context.Context, r Transfer path := "/transfers/approve" queryParams := url.Values{} headerParams := make(map[string]string) + if r.idempotencyKey != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") + } if r.wWWAuthenticate != nil { common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") } @@ -126,9 +136,16 @@ func (a *TransfersApi) ApproveInitiatedTransfers(ctx context.Context, r Transfer // All parameters accepted by TransfersApi.CancelInitiatedTransfers type TransfersApiCancelInitiatedTransfersInput struct { + idempotencyKey *string cancelTransfersRequest *CancelTransfersRequest } +// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). +func (r TransfersApiCancelInitiatedTransfersInput) IdempotencyKey(idempotencyKey string) TransfersApiCancelInitiatedTransfersInput { + r.idempotencyKey = &idempotencyKey + return r +} + func (r TransfersApiCancelInitiatedTransfersInput) CancelTransfersRequest(cancelTransfersRequest CancelTransfersRequest) TransfersApiCancelInitiatedTransfersInput { r.cancelTransfersRequest = &cancelTransfersRequest return r @@ -163,6 +180,9 @@ func (a *TransfersApi) CancelInitiatedTransfers(ctx context.Context, r Transfers path := "/transfers/cancel" queryParams := url.Values{} headerParams := make(map[string]string) + if r.idempotencyKey != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, @@ -310,6 +330,8 @@ When making this request, you must include at least one of the following: This endpoint supports cursor-based pagination. The response returns the first page of results, and returns links to the next and previous pages when applicable. You can use the links to page through the results. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r TransfersApiGetAllTransfersInput - Request parameters, see GetAllTransfersInput @return FindTransfersResponse, *http.Response, error @@ -487,9 +509,16 @@ func (a *TransfersApi) GetTransfer(ctx context.Context, r TransfersApiGetTransfe // All parameters accepted by TransfersApi.ReturnTransfer type TransfersApiReturnTransferInput struct { transferId string + idempotencyKey *string returnTransferRequest *ReturnTransferRequest } +// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). +func (r TransfersApiReturnTransferInput) IdempotencyKey(idempotencyKey string) TransfersApiReturnTransferInput { + r.idempotencyKey = &idempotencyKey + return r +} + func (r TransfersApiReturnTransferInput) ReturnTransferRequest(returnTransferRequest ReturnTransferRequest) TransfersApiReturnTransferInput { r.returnTransferRequest = &returnTransferRequest return r @@ -521,6 +550,9 @@ func (a *TransfersApi) ReturnTransfer(ctx context.Context, r TransfersApiReturnT path = strings.Replace(path, "{"+"transferId"+"}", url.PathEscape(common.ParameterValueToString(r.transferId, "transferId")), -1) queryParams := url.Values{} headerParams := make(map[string]string) + if r.idempotencyKey != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, @@ -575,10 +607,17 @@ func (a *TransfersApi) ReturnTransfer(ctx context.Context, r TransfersApiReturnT // All parameters accepted by TransfersApi.TransferFunds type TransfersApiTransferFundsInput struct { + idempotencyKey *string wWWAuthenticate *string transferInfo *TransferInfo } +// A unique identifier for the message with a maximum of 64 characters (we recommend a UUID). +func (r TransfersApiTransferFundsInput) IdempotencyKey(idempotencyKey string) TransfersApiTransferFundsInput { + r.idempotencyKey = &idempotencyKey + return r +} + // Header for authenticating through SCA func (r TransfersApiTransferFundsInput) WWWAuthenticate(wWWAuthenticate string) TransfersApiTransferFundsInput { r.wWWAuthenticate = &wWWAuthenticate @@ -627,6 +666,9 @@ func (a *TransfersApi) TransferFunds(ctx context.Context, r TransfersApiTransfer path := "/transfers" queryParams := url.Values{} headerParams := make(map[string]string) + if r.idempotencyKey != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "Idempotency-Key", r.idempotencyKey, "") + } if r.wWWAuthenticate != nil { common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") } diff --git a/src/transfers/client.go b/src/transfers/client.go index 98ac60731..4c5878fd9 100644 --- a/src/transfers/client.go +++ b/src/transfers/client.go @@ -9,7 +9,7 @@ API version: 4 package transfers import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" + "github.com/adyen/adyen-go-api-library/v14/src/common" ) // APIClient manages communication with the Transfers API API v4 @@ -29,10 +29,10 @@ type APIClient struct { // NewAPIClient creates a new API client. func NewAPIClient(client *common.Client) *APIClient { c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.TransfersEndpoint - } + c.common.Client = client + c.common.BasePath = func() string { + return client.Cfg.TransfersEndpoint + } // API Services c.CapitalApi = (*CapitalApi)(&c.common) diff --git a/src/transfers/model_json_object.go b/src/transfers/model_json_object.go deleted file mode 100644 index 8b9d70413..000000000 --- a/src/transfers/model_json_object.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Transfers API - -API version: 4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package transfers - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONObject type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONObject{} - -// JSONObject struct for JSONObject -type JSONObject struct { - Paths []JSONPath `json:"paths,omitempty"` - RootPath *JSONPath `json:"rootPath,omitempty"` -} - -// NewJSONObject instantiates a new JSONObject 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 NewJSONObject() *JSONObject { - this := JSONObject{} - return &this -} - -// NewJSONObjectWithDefaults instantiates a new JSONObject 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 NewJSONObjectWithDefaults() *JSONObject { - this := JSONObject{} - return &this -} - -// GetPaths returns the Paths field value if set, zero value otherwise. -func (o *JSONObject) GetPaths() []JSONPath { - if o == nil || common.IsNil(o.Paths) { - var ret []JSONPath - return ret - } - return o.Paths -} - -// 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) { - if o == nil || common.IsNil(o.Paths) { - return nil, false - } - return o.Paths, true -} - -// HasPaths returns a boolean if a field has been set. -func (o *JSONObject) HasPaths() bool { - if o != nil && !common.IsNil(o.Paths) { - return true - } - - return false -} - -// SetPaths gets a reference to the given []JSONPath and assigns it to the Paths field. -func (o *JSONObject) SetPaths(v []JSONPath) { - o.Paths = v -} - -// GetRootPath returns the RootPath field value if set, zero value otherwise. -func (o *JSONObject) GetRootPath() JSONPath { - if o == nil || common.IsNil(o.RootPath) { - var ret JSONPath - return ret - } - return *o.RootPath -} - -// GetRootPathOk returns a tuple with the RootPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONObject) GetRootPathOk() (*JSONPath, bool) { - if o == nil || common.IsNil(o.RootPath) { - return nil, false - } - return o.RootPath, true -} - -// HasRootPath returns a boolean if a field has been set. -func (o *JSONObject) HasRootPath() bool { - if o != nil && !common.IsNil(o.RootPath) { - return true - } - - return false -} - -// SetRootPath gets a reference to the given JSONPath and assigns it to the RootPath field. -func (o *JSONObject) SetRootPath(v JSONPath) { - o.RootPath = &v -} - -func (o JSONObject) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONObject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Paths) { - toSerialize["paths"] = o.Paths - } - if !common.IsNil(o.RootPath) { - toSerialize["rootPath"] = o.RootPath - } - return toSerialize, nil -} - -type NullableJSONObject struct { - value *JSONObject - isSet bool -} - -func (v NullableJSONObject) Get() *JSONObject { - return v.value -} - -func (v *NullableJSONObject) Set(val *JSONObject) { - v.value = val - v.isSet = true -} - -func (v NullableJSONObject) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONObject(val *JSONObject) *NullableJSONObject { - return &NullableJSONObject{value: val, isSet: true} -} - -func (v NullableJSONObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONObject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/transfers/model_json_path.go b/src/transfers/model_json_path.go deleted file mode 100644 index 2c52706cc..000000000 --- a/src/transfers/model_json_path.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Transfers API - -API version: 4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package transfers - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the JSONPath type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONPath{} - -// JSONPath struct for JSONPath -type JSONPath struct { - Content []string `json:"content,omitempty"` -} - -// NewJSONPath instantiates a new JSONPath 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 NewJSONPath() *JSONPath { - this := JSONPath{} - return &this -} - -// NewJSONPathWithDefaults instantiates a new JSONPath 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 NewJSONPathWithDefaults() *JSONPath { - this := JSONPath{} - return &this -} - -// GetContent returns the Content field value if set, zero value otherwise. -func (o *JSONPath) GetContent() []string { - if o == nil || common.IsNil(o.Content) { - var ret []string - return ret - } - return o.Content -} - -// GetContentOk returns a tuple with the Content field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONPath) GetContentOk() ([]string, bool) { - if o == nil || common.IsNil(o.Content) { - return nil, false - } - return o.Content, true -} - -// HasContent returns a boolean if a field has been set. -func (o *JSONPath) HasContent() bool { - if o != nil && !common.IsNil(o.Content) { - return true - } - - return false -} - -// SetContent gets a reference to the given []string and assigns it to the Content field. -func (o *JSONPath) SetContent(v []string) { - o.Content = v -} - -func (o JSONPath) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONPath) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Content) { - toSerialize["content"] = o.Content - } - return toSerialize, nil -} - -type NullableJSONPath struct { - value *JSONPath - isSet bool -} - -func (v NullableJSONPath) Get() *JSONPath { - return v.value -} - -func (v *NullableJSONPath) Set(val *JSONPath) { - v.value = val - v.isSet = true -} - -func (v NullableJSONPath) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONPath) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONPath(val *JSONPath) *NullableJSONPath { - return &NullableJSONPath{value: val, isSet: true} -} - -func (v NullableJSONPath) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONPath) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/transfers/model_transfer_notification_transfer_tracking.go b/src/transfers/model_transfer_notification_transfer_tracking.go deleted file mode 100644 index f43e26efd..000000000 --- a/src/transfers/model_transfer_notification_transfer_tracking.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Transfers API - -API version: 4 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package transfers - -import ( - "encoding/json" - "time" - - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// checks if the TransferNotificationTransferTracking type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &TransferNotificationTransferTracking{} - -// TransferNotificationTransferTracking struct for TransferNotificationTransferTracking -type TransferNotificationTransferTracking struct { - // The estimated time the beneficiary should have access to the funds. - EstimatedArrivalTime *time.Time `json:"estimatedArrivalTime,omitempty"` - // The tracking status of the transfer. - Status *string `json:"status,omitempty"` -} - -// NewTransferNotificationTransferTracking instantiates a new TransferNotificationTransferTracking 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 NewTransferNotificationTransferTracking() *TransferNotificationTransferTracking { - this := TransferNotificationTransferTracking{} - return &this -} - -// NewTransferNotificationTransferTrackingWithDefaults instantiates a new TransferNotificationTransferTracking 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 NewTransferNotificationTransferTrackingWithDefaults() *TransferNotificationTransferTracking { - this := TransferNotificationTransferTracking{} - return &this -} - -// GetEstimatedArrivalTime returns the EstimatedArrivalTime field value if set, zero value otherwise. -func (o *TransferNotificationTransferTracking) GetEstimatedArrivalTime() time.Time { - if o == nil || common.IsNil(o.EstimatedArrivalTime) { - var ret time.Time - return ret - } - return *o.EstimatedArrivalTime -} - -// GetEstimatedArrivalTimeOk returns a tuple with the EstimatedArrivalTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferNotificationTransferTracking) GetEstimatedArrivalTimeOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.EstimatedArrivalTime) { - return nil, false - } - return o.EstimatedArrivalTime, true -} - -// HasEstimatedArrivalTime returns a boolean if a field has been set. -func (o *TransferNotificationTransferTracking) HasEstimatedArrivalTime() bool { - if o != nil && !common.IsNil(o.EstimatedArrivalTime) { - return true - } - - return false -} - -// SetEstimatedArrivalTime gets a reference to the given time.Time and assigns it to the EstimatedArrivalTime field. -func (o *TransferNotificationTransferTracking) SetEstimatedArrivalTime(v time.Time) { - o.EstimatedArrivalTime = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) SetStatus(v string) { - o.Status = &v -} - -func (o TransferNotificationTransferTracking) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferNotificationTransferTracking) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.EstimatedArrivalTime) { - toSerialize["estimatedArrivalTime"] = o.EstimatedArrivalTime - } - if !common.IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableTransferNotificationTransferTracking struct { - value *TransferNotificationTransferTracking - isSet bool -} - -func (v NullableTransferNotificationTransferTracking) Get() *TransferNotificationTransferTracking { - return v.value -} - -func (v *NullableTransferNotificationTransferTracking) Set(val *TransferNotificationTransferTracking) { - v.value = val - v.isSet = true -} - -func (v NullableTransferNotificationTransferTracking) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferNotificationTransferTracking) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferNotificationTransferTracking(val *TransferNotificationTransferTracking) *NullableTransferNotificationTransferTracking { - return &NullableTransferNotificationTransferTracking{value: val, isSet: true} -} - -func (v NullableTransferNotificationTransferTracking) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferNotificationTransferTracking) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *TransferNotificationTransferTracking) isValidStatus() bool { - var allowedEnumValues = []string{"credited"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/transferwebhook/.openapi-generator-ignore b/src/transferwebhook/.openapi-generator-ignore deleted file mode 100644 index ac5d64112..000000000 --- a/src/transferwebhook/.openapi-generator-ignore +++ /dev/null @@ -1,7 +0,0 @@ -# OpenAPI Generator Ignore - -# Single class service does not need an "index" to group multiple tags -client.go - -# Webhook handler is not a generated file and should remain untouched -webhook_handler.go \ No newline at end of file diff --git a/src/transferwebhook/.openapi-generator/VERSION b/src/transferwebhook/.openapi-generator/VERSION index 4be2c727a..6d54bbd77 100644 --- a/src/transferwebhook/.openapi-generator/VERSION +++ b/src/transferwebhook/.openapi-generator/VERSION @@ -1 +1 @@ -6.5.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/src/transferwebhook/client.go b/src/transferwebhook/client.go deleted file mode 100644 index 12f767014..000000000 --- a/src/transferwebhook/client.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Transfer webhooks - -API version: 3 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package transferwebhook - -import ( - "github.com/adyen/adyen-go-api-library/v14/src/common" -) - -// APIClient manages communication with the Transfer webhooks API v3 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - common common.Service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services -} - -// NewAPIClient creates a new API client. -func NewAPIClient(client *common.Client) *APIClient { - c := &APIClient{} - c.common.Client = client - c.common.BasePath = func() string { - return client.Cfg.Endpoint - } - - // API Services - - return c -} diff --git a/src/transferwebhook/model_transfer_notification_data.go b/src/transferwebhook/model_transfer_notification_data.go deleted file mode 100644 index 9ee0c00f7..000000000 --- a/src/transferwebhook/model_transfer_notification_data.go +++ /dev/null @@ -1,1388 +0,0 @@ -/* -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/v14/src/common" -) - -// checks if the TransferNotificationData type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &TransferNotificationData{} - -// TransferNotificationData struct for TransferNotificationData -type TransferNotificationData 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 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"` -} - -// NewTransferNotificationData instantiates a new TransferNotificationData 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 NewTransferNotificationData(amount Amount, category string, status string) *TransferNotificationData { - this := TransferNotificationData{} - this.Amount = amount - this.Category = category - this.Status = status - return &this -} - -// NewTransferNotificationDataWithDefaults instantiates a new TransferNotificationData 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 NewTransferNotificationDataWithDefaults() *TransferNotificationData { - this := TransferNotificationData{} - return &this -} - -// GetAccountHolder returns the AccountHolder field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetAccountHolder(v ResourceReference) { - o.AccountHolder = &v -} - -// GetAmount returns the Amount field value -func (o *TransferNotificationData) 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 *TransferNotificationData) GetAmountOk() (*Amount, bool) { - if o == nil { - return nil, false - } - return &o.Amount, true -} - -// SetAmount sets field value -func (o *TransferNotificationData) SetAmount(v Amount) { - o.Amount = v -} - -// GetBalanceAccount returns the BalanceAccount field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetBalanceAccount(v ResourceReference) { - o.BalanceAccount = &v -} - -// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetBalanceAccountId(v string) { - o.BalanceAccountId = &v -} - -// GetBalancePlatform returns the BalancePlatform field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetBalancePlatform(v string) { - o.BalancePlatform = &v -} - -// GetBalances returns the Balances field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetBalances(v []BalanceMutation) { - o.Balances = v -} - -// GetCategory returns the Category field value -func (o *TransferNotificationData) 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 *TransferNotificationData) GetCategoryOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Category, true -} - -// SetCategory sets field value -func (o *TransferNotificationData) SetCategory(v string) { - o.Category = v -} - -// GetCounterparty returns the Counterparty field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetCounterparty(v CounterpartyV3) { - o.Counterparty = &v -} - -// GetCreationDate returns the CreationDate field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetCreationDate(v time.Time) { - o.CreationDate = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetDescription(v string) { - o.Description = &v -} - -// GetDirection returns the Direction field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetDirection(v string) { - o.Direction = &v -} - -// GetEvents returns the Events field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetEvents(v []TransferEvent) { - o.Events = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetId(v string) { - o.Id = &v -} - -// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetModificationMerchantReference(v string) { - o.ModificationMerchantReference = &v -} - -// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetModificationPspReference(v string) { - o.ModificationPspReference = &v -} - -// GetPanEntryMode returns the PanEntryMode field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPanEntryMode(v string) { - o.PanEntryMode = &v -} - -// GetPaymentInstrument returns the PaymentInstrument field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPaymentInstrument(v PaymentInstrument) { - o.PaymentInstrument = &v -} - -// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPaymentInstrumentId(v string) { - o.PaymentInstrumentId = &v -} - -// GetPaymentMerchantReference returns the PaymentMerchantReference field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPaymentMerchantReference(v string) { - o.PaymentMerchantReference = &v -} - -// GetPriority returns the Priority field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPriority(v string) { - o.Priority = &v -} - -// GetProcessingType returns the ProcessingType field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetProcessingType(v string) { - o.ProcessingType = &v -} - -// GetPspPaymentReference returns the PspPaymentReference field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetPspPaymentReference(v string) { - o.PspPaymentReference = &v -} - -// GetReason returns the Reason field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetReason(v string) { - o.Reason = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetReference(v string) { - o.Reference = &v -} - -// GetReferenceForBeneficiary returns the ReferenceForBeneficiary field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetReferenceForBeneficiary(v string) { - o.ReferenceForBeneficiary = &v -} - -// GetRelayedAuthorisationData returns the RelayedAuthorisationData field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetRelayedAuthorisationData(v RelayedAuthorisationData) { - o.RelayedAuthorisationData = &v -} - -// GetSequenceNumber returns the SequenceNumber field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetSequenceNumber(v int32) { - o.SequenceNumber = &v -} - -// GetStatus returns the Status field value -func (o *TransferNotificationData) 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 *TransferNotificationData) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *TransferNotificationData) SetStatus(v string) { - o.Status = v -} - -// GetTracking returns the Tracking field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetTracking(v TransferNotificationTransferTracking) { - o.Tracking = &v -} - -// GetTransactionId returns the TransactionId field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetTransactionId(v string) { - o.TransactionId = &v -} - -// GetTransactionRulesResult returns the TransactionRulesResult field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetTransactionRulesResult(v TransactionRulesResult) { - o.TransactionRulesResult = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetType(v string) { - o.Type = &v -} - -// GetValidationFacts returns the ValidationFacts field value if set, zero value otherwise. -// Deprecated -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) SetValidationFacts(v []TransferNotificationValidationFact) { - o.ValidationFacts = v -} - -func (o TransferNotificationData) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferNotificationData) 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.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 NullableTransferNotificationData struct { - value *TransferNotificationData - isSet bool -} - -func (v NullableTransferNotificationData) Get() *TransferNotificationData { - return v.value -} - -func (v *NullableTransferNotificationData) Set(val *TransferNotificationData) { - v.value = val - v.isSet = true -} - -func (v NullableTransferNotificationData) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferNotificationData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferNotificationData(val *TransferNotificationData) *NullableTransferNotificationData { - return &NullableTransferNotificationData{value: val, isSet: true} -} - -func (v NullableTransferNotificationData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferNotificationData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *TransferNotificationData) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "internal", "issuedCard", "platformPayment"} - for _, allowed := range allowedEnumValues { - if o.GetCategory() == allowed { - return true - } - } - return false -} -func (o *TransferNotificationData) isValidDirection() bool { - var allowedEnumValues = []string{"incoming", "outgoing"} - for _, allowed := range allowedEnumValues { - if o.GetDirection() == allowed { - return true - } - } - return false -} -func (o *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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 *TransferNotificationData) 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"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} -func (o *TransferNotificationData) 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"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/transferwebhook/model_transfer_notification_transfer_tracking.go b/src/transferwebhook/model_transfer_notification_transfer_tracking.go deleted file mode 100644 index 4170342ae..000000000 --- a/src/transferwebhook/model_transfer_notification_transfer_tracking.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Transfer webhooks - -API version: 4 -*/ - -// 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/v14/src/common" -) - -// checks if the TransferNotificationTransferTracking type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &TransferNotificationTransferTracking{} - -// TransferNotificationTransferTracking struct for TransferNotificationTransferTracking -type TransferNotificationTransferTracking struct { - // The estimated time the beneficiary should have access to the funds. - EstimatedArrivalTime *time.Time `json:"estimatedArrivalTime,omitempty"` - // The tracking status of the transfer. - Status *string `json:"status,omitempty"` -} - -// NewTransferNotificationTransferTracking instantiates a new TransferNotificationTransferTracking 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 NewTransferNotificationTransferTracking() *TransferNotificationTransferTracking { - this := TransferNotificationTransferTracking{} - return &this -} - -// NewTransferNotificationTransferTrackingWithDefaults instantiates a new TransferNotificationTransferTracking 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 NewTransferNotificationTransferTrackingWithDefaults() *TransferNotificationTransferTracking { - this := TransferNotificationTransferTracking{} - return &this -} - -// GetEstimatedArrivalTime returns the EstimatedArrivalTime field value if set, zero value otherwise. -func (o *TransferNotificationTransferTracking) GetEstimatedArrivalTime() time.Time { - if o == nil || common.IsNil(o.EstimatedArrivalTime) { - var ret time.Time - return ret - } - return *o.EstimatedArrivalTime -} - -// GetEstimatedArrivalTimeOk returns a tuple with the EstimatedArrivalTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TransferNotificationTransferTracking) GetEstimatedArrivalTimeOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.EstimatedArrivalTime) { - return nil, false - } - return o.EstimatedArrivalTime, true -} - -// HasEstimatedArrivalTime returns a boolean if a field has been set. -func (o *TransferNotificationTransferTracking) HasEstimatedArrivalTime() bool { - if o != nil && !common.IsNil(o.EstimatedArrivalTime) { - return true - } - - return false -} - -// SetEstimatedArrivalTime gets a reference to the given time.Time and assigns it to the EstimatedArrivalTime field. -func (o *TransferNotificationTransferTracking) SetEstimatedArrivalTime(v time.Time) { - o.EstimatedArrivalTime = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) 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 *TransferNotificationTransferTracking) SetStatus(v string) { - o.Status = &v -} - -func (o TransferNotificationTransferTracking) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferNotificationTransferTracking) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.EstimatedArrivalTime) { - toSerialize["estimatedArrivalTime"] = o.EstimatedArrivalTime - } - if !common.IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableTransferNotificationTransferTracking struct { - value *TransferNotificationTransferTracking - isSet bool -} - -func (v NullableTransferNotificationTransferTracking) Get() *TransferNotificationTransferTracking { - return v.value -} - -func (v *NullableTransferNotificationTransferTracking) Set(val *TransferNotificationTransferTracking) { - v.value = val - v.isSet = true -} - -func (v NullableTransferNotificationTransferTracking) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferNotificationTransferTracking) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferNotificationTransferTracking(val *TransferNotificationTransferTracking) *NullableTransferNotificationTransferTracking { - return &NullableTransferNotificationTransferTracking{value: val, isSet: true} -} - -func (v NullableTransferNotificationTransferTracking) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferNotificationTransferTracking) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *TransferNotificationTransferTracking) isValidStatus() bool { - var allowedEnumValues = []string{"credited"} - for _, allowed := range allowedEnumValues { - if o.GetStatus() == allowed { - return true - } - } - return false -} diff --git a/src/transferwebhook/model_transfer_operation.go b/src/transferwebhook/model_transfer_operation.go deleted file mode 100644 index 30d3c61e2..000000000 --- a/src/transferwebhook/model_transfer_operation.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -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/v14/src/common" -) - -// checks if the TransferOperation type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &TransferOperation{} - -// TransferOperation struct for TransferOperation -type TransferOperation struct { - // The direction of the money movement. - Direction *string `json:"direction,omitempty"` - // The reference returned when the amend was initiated. - Reference *string `json:"reference,omitempty"` - // The type of amend for the transfer. - Type *string `json:"type,omitempty"` -} - -// NewTransferOperation instantiates a new TransferOperation 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 NewTransferOperation() *TransferOperation { - this := TransferOperation{} - return &this -} - -// NewTransferOperationWithDefaults instantiates a new TransferOperation 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 NewTransferOperationWithDefaults() *TransferOperation { - this := TransferOperation{} - return &this -} - -// GetDirection returns the Direction field value if set, zero value otherwise. -func (o *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) SetDirection(v string) { - o.Direction = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) SetReference(v string) { - o.Reference = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) 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 *TransferOperation) SetType(v string) { - o.Type = &v -} - -func (o TransferOperation) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TransferOperation) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.Direction) { - toSerialize["direction"] = o.Direction - } - if !common.IsNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableTransferOperation struct { - value *TransferOperation - isSet bool -} - -func (v NullableTransferOperation) Get() *TransferOperation { - return v.value -} - -func (v *NullableTransferOperation) Set(val *TransferOperation) { - v.value = val - v.isSet = true -} - -func (v NullableTransferOperation) IsSet() bool { - return v.isSet -} - -func (v *NullableTransferOperation) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTransferOperation(val *TransferOperation) *NullableTransferOperation { - return &NullableTransferOperation{value: val, isSet: true} -} - -func (v NullableTransferOperation) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTransferOperation) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -}