diff --git a/src/balanceplatform/api_account_holders.go b/src/balanceplatform/api_account_holders.go index 412bc0722..f94a32024 100644 --- a/src/balanceplatform/api_account_holders.go +++ b/src/balanceplatform/api_account_holders.go @@ -412,9 +412,10 @@ func (a *AccountHoldersApi) GetAllTransactionRulesForAccountHolder(ctx context.C // All parameters accepted by AccountHoldersApi.GetTaxForm type AccountHoldersApiGetTaxFormInput struct { - id string - formType *string - year *int32 + id string + formType *string + year *int32 + legalEntityId *string } // The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec** @@ -429,6 +430,12 @@ func (r AccountHoldersApiGetTaxFormInput) Year(year int32) AccountHoldersApiGetT return r } +// The legal entity reference whose tax form you want to retrieve +func (r AccountHoldersApiGetTaxFormInput) LegalEntityId(legalEntityId string) AccountHoldersApiGetTaxFormInput { + r.legalEntityId = &legalEntityId + return r +} + /* Prepare a request for GetTaxForm @param id The unique identifier of the account holder. @@ -461,6 +468,9 @@ func (a *AccountHoldersApi) GetTaxForm(ctx context.Context, r AccountHoldersApiG if r.year != nil { common.ParameterAddToQuery(queryParams, "year", r.year, "") } + if r.legalEntityId != nil { + common.ParameterAddToQuery(queryParams, "legalEntityId", r.legalEntityId, "") + } httpRes, err := common.SendAPIRequest( ctx, a.Client, diff --git a/src/balanceplatform/api_authorized_card_users.go b/src/balanceplatform/api_authorized_card_users.go new file mode 100644 index 000000000..cd16956c9 --- /dev/null +++ b/src/balanceplatform/api_authorized_card_users.go @@ -0,0 +1,353 @@ +/* +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" + "strings" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// AuthorizedCardUsersApi service +type AuthorizedCardUsersApi common.Service + +// All parameters accepted by AuthorizedCardUsersApi.CreateAuthorisedCardUsers +type AuthorizedCardUsersApiCreateAuthorisedCardUsersInput struct { + paymentInstrumentId string + authorisedCardUsers *AuthorisedCardUsers +} + +func (r AuthorizedCardUsersApiCreateAuthorisedCardUsersInput) AuthorisedCardUsers(authorisedCardUsers AuthorisedCardUsers) AuthorizedCardUsersApiCreateAuthorisedCardUsersInput { + r.authorisedCardUsers = &authorisedCardUsers + return r +} + +/* +Prepare a request for CreateAuthorisedCardUsers +@param paymentInstrumentId +@return AuthorizedCardUsersApiCreateAuthorisedCardUsersInput +*/ +func (a *AuthorizedCardUsersApi) CreateAuthorisedCardUsersInput(paymentInstrumentId string) AuthorizedCardUsersApiCreateAuthorisedCardUsersInput { + return AuthorizedCardUsersApiCreateAuthorisedCardUsersInput{ + paymentInstrumentId: paymentInstrumentId, + } +} + +/* +CreateAuthorisedCardUsers Create authorized users for a card. + +Assigns authorized users to a card. Users must have the **authorisedPaymentInstrumentUser** capability to be able to use the card. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AuthorizedCardUsersApiCreateAuthorisedCardUsersInput - Request parameters, see CreateAuthorisedCardUsersInput +@return *http.Response, error +*/ +func (a *AuthorizedCardUsersApi) CreateAuthorisedCardUsers(ctx context.Context, r AuthorizedCardUsersApiCreateAuthorisedCardUsersInput) (*http.Response, error) { + var res interface{} + path := "/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" + path = strings.Replace(path, "{"+"paymentInstrumentId"+"}", url.PathEscape(common.ParameterValueToString(r.paymentInstrumentId, "paymentInstrumentId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.authorisedCardUsers, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by AuthorizedCardUsersApi.DeleteAuthorisedCardUsers +type AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput struct { + paymentInstrumentId string +} + +/* +Prepare a request for DeleteAuthorisedCardUsers +@param paymentInstrumentId +@return AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput +*/ +func (a *AuthorizedCardUsersApi) DeleteAuthorisedCardUsersInput(paymentInstrumentId string) AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput { + return AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput{ + paymentInstrumentId: paymentInstrumentId, + } +} + +/* +DeleteAuthorisedCardUsers Delete the authorized users for a card. + +Deletes the list of authorized users assigned to a card. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput - Request parameters, see DeleteAuthorisedCardUsersInput +@return *http.Response, error +*/ +func (a *AuthorizedCardUsersApi) DeleteAuthorisedCardUsers(ctx context.Context, r AuthorizedCardUsersApiDeleteAuthorisedCardUsersInput) (*http.Response, error) { + var res interface{} + path := "/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" + path = strings.Replace(path, "{"+"paymentInstrumentId"+"}", url.PathEscape(common.ParameterValueToString(r.paymentInstrumentId, "paymentInstrumentId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return 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 httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by AuthorizedCardUsersApi.GetAllAuthorisedCardUsers +type AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput struct { + paymentInstrumentId string +} + +/* +Prepare a request for GetAllAuthorisedCardUsers +@param paymentInstrumentId +@return AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput +*/ +func (a *AuthorizedCardUsersApi) GetAllAuthorisedCardUsersInput(paymentInstrumentId string) AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput { + return AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput{ + paymentInstrumentId: paymentInstrumentId, + } +} + +/* +GetAllAuthorisedCardUsers Get authorized users for a card. + +Returns the authorized users for a card. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput - Request parameters, see GetAllAuthorisedCardUsersInput +@return AuthorisedCardUsers, *http.Response, error +*/ +func (a *AuthorizedCardUsersApi) GetAllAuthorisedCardUsers(ctx context.Context, r AuthorizedCardUsersApiGetAllAuthorisedCardUsersInput) (AuthorisedCardUsers, *http.Response, error) { + res := &AuthorisedCardUsers{} + path := "/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" + path = strings.Replace(path, "{"+"paymentInstrumentId"+"}", url.PathEscape(common.ParameterValueToString(r.paymentInstrumentId, "paymentInstrumentId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + 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 == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by AuthorizedCardUsersApi.UpdateAuthorisedCardUsers +type AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput struct { + paymentInstrumentId string + authorisedCardUsers *AuthorisedCardUsers +} + +func (r AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput) AuthorisedCardUsers(authorisedCardUsers AuthorisedCardUsers) AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput { + r.authorisedCardUsers = &authorisedCardUsers + return r +} + +/* +Prepare a request for UpdateAuthorisedCardUsers +@param paymentInstrumentId +@return AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput +*/ +func (a *AuthorizedCardUsersApi) UpdateAuthorisedCardUsersInput(paymentInstrumentId string) AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput { + return AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput{ + paymentInstrumentId: paymentInstrumentId, + } +} + +/* +UpdateAuthorisedCardUsers Update the authorized users for a card. + +Updates the list of authorized users for a card. + +>This request replaces all existing authorized users for the card. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput - Request parameters, see UpdateAuthorisedCardUsersInput +@return *http.Response, error +*/ +func (a *AuthorizedCardUsersApi) UpdateAuthorisedCardUsers(ctx context.Context, r AuthorizedCardUsersApiUpdateAuthorisedCardUsersInput) (*http.Response, error) { + var res interface{} + path := "/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers" + path = strings.Replace(path, "{"+"paymentInstrumentId"+"}", url.PathEscape(common.ParameterValueToString(r.paymentInstrumentId, "paymentInstrumentId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.authorisedCardUsers, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} diff --git a/src/balanceplatform/api_balances.go b/src/balanceplatform/api_balances.go new file mode 100644 index 000000000..9667ef505 --- /dev/null +++ b/src/balanceplatform/api_balances.go @@ -0,0 +1,562 @@ +/* +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" + "strings" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// BalancesApi service +type BalancesApi common.Service + +// All parameters accepted by BalancesApi.CreateWebhookSetting +type BalancesApiCreateWebhookSettingInput struct { + balancePlatformId string + webhookId string + balanceWebhookSettingInfo *BalanceWebhookSettingInfo +} + +func (r BalancesApiCreateWebhookSettingInput) BalanceWebhookSettingInfo(balanceWebhookSettingInfo BalanceWebhookSettingInfo) BalancesApiCreateWebhookSettingInput { + r.balanceWebhookSettingInfo = &balanceWebhookSettingInfo + return r +} + +/* +Prepare a request for CreateWebhookSetting +@param balancePlatformId The unique identifier of the balance platform.@param webhookId The unique identifier of the balance webhook. +@return BalancesApiCreateWebhookSettingInput +*/ +func (a *BalancesApi) CreateWebhookSettingInput(balancePlatformId string, webhookId string) BalancesApiCreateWebhookSettingInput { + return BalancesApiCreateWebhookSettingInput{ + balancePlatformId: balancePlatformId, + webhookId: webhookId, + } +} + +/* +CreateWebhookSetting Create a balance webhook setting + +Configures the criteria for triggering [balance webhooks](https://docs.adyen.com/api-explorer/balance-webhooks/1/post/balancePlatform.balanceAccount.balance.updated). + +Adyen sends balance webhooks to notify you of balance changes in your balance platform. They can be triggered when the balance reaches, exceeds, or drops below a specific value in a specific currency. + +You can get notified about balance changes in your entire balance platform, in the balance accounts of a specific user, or a specific balance account. The hierarchy between the webhook settings are based on the following business logic: + +* Settings on a higher level apply to all lower level resources (balance platform > account holder > balance acocunt). + +* The most granular setting overrides higher level settings (balance account > account holder > balance platform). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r BalancesApiCreateWebhookSettingInput - Request parameters, see CreateWebhookSettingInput +@return WebhookSetting, *http.Response, error +*/ +func (a *BalancesApi) CreateWebhookSetting(ctx context.Context, r BalancesApiCreateWebhookSettingInput) (WebhookSetting, *http.Response, error) { + res := &WebhookSetting{} + path := "/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings" + path = strings.Replace(path, "{"+"balancePlatformId"+"}", url.PathEscape(common.ParameterValueToString(r.balancePlatformId, "balancePlatformId")), -1) + path = strings.Replace(path, "{"+"webhookId"+"}", url.PathEscape(common.ParameterValueToString(r.webhookId, "webhookId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.balanceWebhookSettingInfo, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by BalancesApi.DeleteWebhookSetting +type BalancesApiDeleteWebhookSettingInput struct { + balancePlatformId string + webhookId string + settingId string +} + +/* +Prepare a request for DeleteWebhookSetting +@param balancePlatformId The unique identifier of the balance platform.@param webhookId The unique identifier of the balance webhook.@param settingId The unique identifier of the balance webhook setting. +@return BalancesApiDeleteWebhookSettingInput +*/ +func (a *BalancesApi) DeleteWebhookSettingInput(balancePlatformId string, webhookId string, settingId string) BalancesApiDeleteWebhookSettingInput { + return BalancesApiDeleteWebhookSettingInput{ + balancePlatformId: balancePlatformId, + webhookId: webhookId, + settingId: settingId, + } +} + +/* +DeleteWebhookSetting Delete a balance webhook setting by id + +Deletes a balance webhook setting that contains the conditions for triggering [balance webhooks](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r BalancesApiDeleteWebhookSettingInput - Request parameters, see DeleteWebhookSettingInput +@return *http.Response, error +*/ +func (a *BalancesApi) DeleteWebhookSetting(ctx context.Context, r BalancesApiDeleteWebhookSettingInput) (*http.Response, error) { + var res interface{} + path := "/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" + path = strings.Replace(path, "{"+"balancePlatformId"+"}", url.PathEscape(common.ParameterValueToString(r.balancePlatformId, "balancePlatformId")), -1) + path = strings.Replace(path, "{"+"webhookId"+"}", url.PathEscape(common.ParameterValueToString(r.webhookId, "webhookId")), -1) + path = strings.Replace(path, "{"+"settingId"+"}", url.PathEscape(common.ParameterValueToString(r.settingId, "settingId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by BalancesApi.GetAllWebhookSettings +type BalancesApiGetAllWebhookSettingsInput struct { + balancePlatformId string + webhookId string +} + +/* +Prepare a request for GetAllWebhookSettings +@param balancePlatformId The unique identifier of the balance platform.@param webhookId The unique identifier of the balance webhook. +@return BalancesApiGetAllWebhookSettingsInput +*/ +func (a *BalancesApi) GetAllWebhookSettingsInput(balancePlatformId string, webhookId string) BalancesApiGetAllWebhookSettingsInput { + return BalancesApiGetAllWebhookSettingsInput{ + balancePlatformId: balancePlatformId, + webhookId: webhookId, + } +} + +/* +GetAllWebhookSettings Get all balance webhook settings + +Returns all balance webhook settings configured for triggering [balance webhooks](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r BalancesApiGetAllWebhookSettingsInput - Request parameters, see GetAllWebhookSettingsInput +@return WebhookSettings, *http.Response, error +*/ +func (a *BalancesApi) GetAllWebhookSettings(ctx context.Context, r BalancesApiGetAllWebhookSettingsInput) (WebhookSettings, *http.Response, error) { + res := &WebhookSettings{} + path := "/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings" + path = strings.Replace(path, "{"+"balancePlatformId"+"}", url.PathEscape(common.ParameterValueToString(r.balancePlatformId, "balancePlatformId")), -1) + path = strings.Replace(path, "{"+"webhookId"+"}", url.PathEscape(common.ParameterValueToString(r.webhookId, "webhookId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by BalancesApi.GetWebhookSetting +type BalancesApiGetWebhookSettingInput struct { + balancePlatformId string + webhookId string + settingId string +} + +/* +Prepare a request for GetWebhookSetting +@param balancePlatformId The unique identifier of the balance platform.@param webhookId The unique identifier of the balance webhook.@param settingId The unique identifier of the balance webhook setting. +@return BalancesApiGetWebhookSettingInput +*/ +func (a *BalancesApi) GetWebhookSettingInput(balancePlatformId string, webhookId string, settingId string) BalancesApiGetWebhookSettingInput { + return BalancesApiGetWebhookSettingInput{ + balancePlatformId: balancePlatformId, + webhookId: webhookId, + settingId: settingId, + } +} + +/* +GetWebhookSetting Get a balance webhook setting by id + +Returns the details of a specific balance webhook setting configured for triggering [balance webhooks](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r BalancesApiGetWebhookSettingInput - Request parameters, see GetWebhookSettingInput +@return WebhookSetting, *http.Response, error +*/ +func (a *BalancesApi) GetWebhookSetting(ctx context.Context, r BalancesApiGetWebhookSettingInput) (WebhookSetting, *http.Response, error) { + res := &WebhookSetting{} + path := "/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" + path = strings.Replace(path, "{"+"balancePlatformId"+"}", url.PathEscape(common.ParameterValueToString(r.balancePlatformId, "balancePlatformId")), -1) + path = strings.Replace(path, "{"+"webhookId"+"}", url.PathEscape(common.ParameterValueToString(r.webhookId, "webhookId")), -1) + path = strings.Replace(path, "{"+"settingId"+"}", url.PathEscape(common.ParameterValueToString(r.settingId, "settingId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by BalancesApi.UpdateWebhookSetting +type BalancesApiUpdateWebhookSettingInput struct { + balancePlatformId string + webhookId string + settingId string + balanceWebhookSettingInfoUpdate *BalanceWebhookSettingInfoUpdate +} + +func (r BalancesApiUpdateWebhookSettingInput) BalanceWebhookSettingInfoUpdate(balanceWebhookSettingInfoUpdate BalanceWebhookSettingInfoUpdate) BalancesApiUpdateWebhookSettingInput { + r.balanceWebhookSettingInfoUpdate = &balanceWebhookSettingInfoUpdate + return r +} + +/* +Prepare a request for UpdateWebhookSetting +@param balancePlatformId The unique identifier of the balance platform.@param webhookId The unique identifier of the balance webhook.@param settingId The unique identifier of the balance webhook setting. +@return BalancesApiUpdateWebhookSettingInput +*/ +func (a *BalancesApi) UpdateWebhookSettingInput(balancePlatformId string, webhookId string, settingId string) BalancesApiUpdateWebhookSettingInput { + return BalancesApiUpdateWebhookSettingInput{ + balancePlatformId: balancePlatformId, + webhookId: webhookId, + settingId: settingId, + } +} + +/* +UpdateWebhookSetting Update a balance webhook setting by id + +Updates the conditions the balance change needs to meet for Adyen to send a [balance webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r BalancesApiUpdateWebhookSettingInput - Request parameters, see UpdateWebhookSettingInput +@return WebhookSetting, *http.Response, error +*/ +func (a *BalancesApi) UpdateWebhookSetting(ctx context.Context, r BalancesApiUpdateWebhookSettingInput) (WebhookSetting, *http.Response, error) { + res := &WebhookSetting{} + path := "/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}" + path = strings.Replace(path, "{"+"balancePlatformId"+"}", url.PathEscape(common.ParameterValueToString(r.balancePlatformId, "balancePlatformId")), -1) + path = strings.Replace(path, "{"+"webhookId"+"}", url.PathEscape(common.ParameterValueToString(r.webhookId, "webhookId")), -1) + path = strings.Replace(path, "{"+"settingId"+"}", url.PathEscape(common.ParameterValueToString(r.settingId, "settingId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.balanceWebhookSettingInfoUpdate, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/balanceplatform/api_payment_instruments.go b/src/balanceplatform/api_payment_instruments.go index 0595061f7..d72e43586 100644 --- a/src/balanceplatform/api_payment_instruments.go +++ b/src/balanceplatform/api_payment_instruments.go @@ -22,6 +22,103 @@ import ( // PaymentInstrumentsApi service type PaymentInstrumentsApi common.Service +// All parameters accepted by PaymentInstrumentsApi.CreateNetworkTokenProvisioningData +type PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput struct { + id string + networkTokenActivationDataRequest *NetworkTokenActivationDataRequest +} + +func (r PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput) NetworkTokenActivationDataRequest(networkTokenActivationDataRequest NetworkTokenActivationDataRequest) PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput { + r.networkTokenActivationDataRequest = &networkTokenActivationDataRequest + return r +} + +/* +Prepare a request for CreateNetworkTokenProvisioningData +@param id The unique identifier of the payment instrument. +@return PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput +*/ +func (a *PaymentInstrumentsApi) CreateNetworkTokenProvisioningDataInput(id string) PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput { + return PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput{ + id: id, + } +} + +/* +CreateNetworkTokenProvisioningData Create network token provisioning data + +Create provisioning data for a network token. Use the provisioning data to add a user's payment instrument to their digital wallet. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput - Request parameters, see CreateNetworkTokenProvisioningDataInput +@return NetworkTokenActivationDataResponse, *http.Response, error +*/ +func (a *PaymentInstrumentsApi) CreateNetworkTokenProvisioningData(ctx context.Context, r PaymentInstrumentsApiCreateNetworkTokenProvisioningDataInput) (NetworkTokenActivationDataResponse, *http.Response, error) { + res := &NetworkTokenActivationDataResponse{} + path := "/paymentInstruments/{id}/networkTokenActivationData" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.networkTokenActivationDataRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + // All parameters accepted by PaymentInstrumentsApi.CreatePaymentInstrument type PaymentInstrumentsApiCreatePaymentInstrumentInput struct { paymentInstrumentInfo *PaymentInstrumentInfo @@ -208,6 +305,97 @@ func (a *PaymentInstrumentsApi) GetAllTransactionRulesForPaymentInstrument(ctx c return *res, httpRes, err } +// All parameters accepted by PaymentInstrumentsApi.GetNetworkTokenActivationData +type PaymentInstrumentsApiGetNetworkTokenActivationDataInput struct { + id string +} + +/* +Prepare a request for GetNetworkTokenActivationData +@param id The unique identifier of the payment instrument. +@return PaymentInstrumentsApiGetNetworkTokenActivationDataInput +*/ +func (a *PaymentInstrumentsApi) GetNetworkTokenActivationDataInput(id string) PaymentInstrumentsApiGetNetworkTokenActivationDataInput { + return PaymentInstrumentsApiGetNetworkTokenActivationDataInput{ + id: id, + } +} + +/* +GetNetworkTokenActivationData Get network token activation data + +Get the network token activation data for a payment instrument. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r PaymentInstrumentsApiGetNetworkTokenActivationDataInput - Request parameters, see GetNetworkTokenActivationDataInput +@return NetworkTokenActivationDataResponse, *http.Response, error +*/ +func (a *PaymentInstrumentsApi) GetNetworkTokenActivationData(ctx context.Context, r PaymentInstrumentsApiGetNetworkTokenActivationDataInput) (NetworkTokenActivationDataResponse, *http.Response, error) { + res := &NetworkTokenActivationDataResponse{} + path := "/paymentInstruments/{id}/networkTokenActivationData" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + // All parameters accepted by PaymentInstrumentsApi.GetPanOfPaymentInstrument type PaymentInstrumentsApiGetPanOfPaymentInstrumentInput struct { id string diff --git a/src/balanceplatform/api_sca_association_management.go b/src/balanceplatform/api_sca_association_management.go new file mode 100644 index 000000000..9063eaa4f --- /dev/null +++ b/src/balanceplatform/api_sca_association_management.go @@ -0,0 +1,311 @@ +/* +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/v21/src/common" +) + +// SCAAssociationManagementApi service +type SCAAssociationManagementApi common.Service + +// All parameters accepted by SCAAssociationManagementApi.ApproveAssociation +type SCAAssociationManagementApiApproveAssociationInput struct { + wWWAuthenticate *string + approveAssociationRequest *ApproveAssociationRequest +} + +// The header for authenticating through SCA. +func (r SCAAssociationManagementApiApproveAssociationInput) WWWAuthenticate(wWWAuthenticate string) SCAAssociationManagementApiApproveAssociationInput { + r.wWWAuthenticate = &wWWAuthenticate + return r +} + +func (r SCAAssociationManagementApiApproveAssociationInput) ApproveAssociationRequest(approveAssociationRequest ApproveAssociationRequest) SCAAssociationManagementApiApproveAssociationInput { + r.approveAssociationRequest = &approveAssociationRequest + return r +} + +/* +Prepare a request for ApproveAssociation + +@return SCAAssociationManagementApiApproveAssociationInput +*/ +func (a *SCAAssociationManagementApi) ApproveAssociationInput() SCAAssociationManagementApiApproveAssociationInput { + return SCAAssociationManagementApiApproveAssociationInput{} +} + +/* +ApproveAssociation Approve a pending approval association + +Approves a previously created association that is in a pending state. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCAAssociationManagementApiApproveAssociationInput - Request parameters, see ApproveAssociationInput +@return ApproveAssociationResponse, *http.Response, error +*/ +func (a *SCAAssociationManagementApi) ApproveAssociation(ctx context.Context, r SCAAssociationManagementApiApproveAssociationInput) (ApproveAssociationResponse, *http.Response, error) { + res := &ApproveAssociationResponse{} + path := "/scaAssociations" + queryParams := url.Values{} + headerParams := make(map[string]string) + common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.approveAssociationRequest, + res, + http.MethodPatch, + 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 == 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 SCAAssociationManagementApi.ListAssociations +type SCAAssociationManagementApiListAssociationsInput struct { + entityType *ScaEntityType + entityId *string + pageSize *int32 + pageNumber *int32 +} + +// The type of entity you want to retrieve a list of associations for. Possible values: **accountHolder** or **paymentInstrument**. +func (r SCAAssociationManagementApiListAssociationsInput) EntityType(entityType ScaEntityType) SCAAssociationManagementApiListAssociationsInput { + r.entityType = &entityType + return r +} + +// The unique identifier of the entity. +func (r SCAAssociationManagementApiListAssociationsInput) EntityId(entityId string) SCAAssociationManagementApiListAssociationsInput { + r.entityId = &entityId + return r +} + +// The number of items to have on a page. Default: **5**. +func (r SCAAssociationManagementApiListAssociationsInput) PageSize(pageSize int32) SCAAssociationManagementApiListAssociationsInput { + r.pageSize = &pageSize + return r +} + +// The index of the page to retrieve. The index of the first page is **0** (zero). Default: **0**. +func (r SCAAssociationManagementApiListAssociationsInput) PageNumber(pageNumber int32) SCAAssociationManagementApiListAssociationsInput { + r.pageNumber = &pageNumber + return r +} + +/* +Prepare a request for ListAssociations + +@return SCAAssociationManagementApiListAssociationsInput +*/ +func (a *SCAAssociationManagementApi) ListAssociationsInput() SCAAssociationManagementApiListAssociationsInput { + return SCAAssociationManagementApiListAssociationsInput{} +} + +/* +ListAssociations Get a list of devices associated with an entity + +Returns a paginated list of the SCA devices associated with a specific entity. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCAAssociationManagementApiListAssociationsInput - Request parameters, see ListAssociationsInput +@return ListAssociationsResponse, *http.Response, error +*/ +func (a *SCAAssociationManagementApi) ListAssociations(ctx context.Context, r SCAAssociationManagementApiListAssociationsInput) (ListAssociationsResponse, *http.Response, error) { + res := &ListAssociationsResponse{} + path := "/scaAssociations" + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.entityType != nil { + common.ParameterAddToQuery(queryParams, "entityType", r.entityType, "") + } + if r.entityId != nil { + common.ParameterAddToQuery(queryParams, "entityId", r.entityId, "") + } + if r.pageSize != nil { + common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") + } + if r.pageNumber != nil { + common.ParameterAddToQuery(queryParams, "pageNumber", r.pageNumber, "") + } + 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 == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 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 SCAAssociationManagementApi.RemoveAssociation +type SCAAssociationManagementApiRemoveAssociationInput struct { + wWWAuthenticate *string + removeAssociationRequest *RemoveAssociationRequest +} + +// The header for authenticating through SCA. +func (r SCAAssociationManagementApiRemoveAssociationInput) WWWAuthenticate(wWWAuthenticate string) SCAAssociationManagementApiRemoveAssociationInput { + r.wWWAuthenticate = &wWWAuthenticate + return r +} + +func (r SCAAssociationManagementApiRemoveAssociationInput) RemoveAssociationRequest(removeAssociationRequest RemoveAssociationRequest) SCAAssociationManagementApiRemoveAssociationInput { + r.removeAssociationRequest = &removeAssociationRequest + return r +} + +/* +Prepare a request for RemoveAssociation + +@return SCAAssociationManagementApiRemoveAssociationInput +*/ +func (a *SCAAssociationManagementApi) RemoveAssociationInput() SCAAssociationManagementApiRemoveAssociationInput { + return SCAAssociationManagementApiRemoveAssociationInput{} +} + +/* +RemoveAssociation Delete association to devices + +Deletes one or more SCA associations for a device. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCAAssociationManagementApiRemoveAssociationInput - Request parameters, see RemoveAssociationInput +@return *http.Response, error +*/ +func (a *SCAAssociationManagementApi) RemoveAssociation(ctx context.Context, r SCAAssociationManagementApiRemoveAssociationInput) (*http.Response, error) { + var res interface{} + path := "/scaAssociations" + queryParams := url.Values{} + headerParams := make(map[string]string) + common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.removeAssociationRequest, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return 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 httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} diff --git a/src/balanceplatform/api_sca_device_management.go b/src/balanceplatform/api_sca_device_management.go new file mode 100644 index 000000000..211112f5d --- /dev/null +++ b/src/balanceplatform/api_sca_device_management.go @@ -0,0 +1,326 @@ +/* +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" + "strings" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// SCADeviceManagementApi service +type SCADeviceManagementApi common.Service + +// All parameters accepted by SCADeviceManagementApi.BeginScaDeviceRegistration +type SCADeviceManagementApiBeginScaDeviceRegistrationInput struct { + beginScaDeviceRegistrationRequest *BeginScaDeviceRegistrationRequest +} + +func (r SCADeviceManagementApiBeginScaDeviceRegistrationInput) BeginScaDeviceRegistrationRequest(beginScaDeviceRegistrationRequest BeginScaDeviceRegistrationRequest) SCADeviceManagementApiBeginScaDeviceRegistrationInput { + r.beginScaDeviceRegistrationRequest = &beginScaDeviceRegistrationRequest + return r +} + +/* +Prepare a request for BeginScaDeviceRegistration + +@return SCADeviceManagementApiBeginScaDeviceRegistrationInput +*/ +func (a *SCADeviceManagementApi) BeginScaDeviceRegistrationInput() SCADeviceManagementApiBeginScaDeviceRegistrationInput { + return SCADeviceManagementApiBeginScaDeviceRegistrationInput{} +} + +/* +BeginScaDeviceRegistration Begin SCA device registration + +Begins the registration process for a new Strong Customer Authentication (SCA) device. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCADeviceManagementApiBeginScaDeviceRegistrationInput - Request parameters, see BeginScaDeviceRegistrationInput +@return BeginScaDeviceRegistrationResponse, *http.Response, error +*/ +func (a *SCADeviceManagementApi) BeginScaDeviceRegistration(ctx context.Context, r SCADeviceManagementApiBeginScaDeviceRegistrationInput) (BeginScaDeviceRegistrationResponse, *http.Response, error) { + res := &BeginScaDeviceRegistrationResponse{} + path := "/scaDevices" + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.beginScaDeviceRegistrationRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SCADeviceManagementApi.FinishScaDeviceRegistration +type SCADeviceManagementApiFinishScaDeviceRegistrationInput struct { + deviceId string + finishScaDeviceRegistrationRequest *FinishScaDeviceRegistrationRequest +} + +func (r SCADeviceManagementApiFinishScaDeviceRegistrationInput) FinishScaDeviceRegistrationRequest(finishScaDeviceRegistrationRequest FinishScaDeviceRegistrationRequest) SCADeviceManagementApiFinishScaDeviceRegistrationInput { + r.finishScaDeviceRegistrationRequest = &finishScaDeviceRegistrationRequest + return r +} + +/* +Prepare a request for FinishScaDeviceRegistration +@param deviceId The unique identifier of the SCA device that you are associating with a resource. +@return SCADeviceManagementApiFinishScaDeviceRegistrationInput +*/ +func (a *SCADeviceManagementApi) FinishScaDeviceRegistrationInput(deviceId string) SCADeviceManagementApiFinishScaDeviceRegistrationInput { + return SCADeviceManagementApiFinishScaDeviceRegistrationInput{ + deviceId: deviceId, + } +} + +/* +FinishScaDeviceRegistration Finish registration process for a SCA device + +Finishes the registration process for a new Strong Customer Authentication (SCA) device. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCADeviceManagementApiFinishScaDeviceRegistrationInput - Request parameters, see FinishScaDeviceRegistrationInput +@return FinishScaDeviceRegistrationResponse, *http.Response, error +*/ +func (a *SCADeviceManagementApi) FinishScaDeviceRegistration(ctx context.Context, r SCADeviceManagementApiFinishScaDeviceRegistrationInput) (FinishScaDeviceRegistrationResponse, *http.Response, error) { + res := &FinishScaDeviceRegistrationResponse{} + path := "/scaDevices/{deviceId}" + path = strings.Replace(path, "{"+"deviceId"+"}", url.PathEscape(common.ParameterValueToString(r.deviceId, "deviceId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.finishScaDeviceRegistrationRequest, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by SCADeviceManagementApi.SubmitScaAssociation +type SCADeviceManagementApiSubmitScaAssociationInput struct { + deviceId string + submitScaAssociationRequest *SubmitScaAssociationRequest +} + +func (r SCADeviceManagementApiSubmitScaAssociationInput) SubmitScaAssociationRequest(submitScaAssociationRequest SubmitScaAssociationRequest) SCADeviceManagementApiSubmitScaAssociationInput { + r.submitScaAssociationRequest = &submitScaAssociationRequest + return r +} + +/* +Prepare a request for SubmitScaAssociation +@param deviceId The unique identifier of the SCA device that you are associating with a resource. +@return SCADeviceManagementApiSubmitScaAssociationInput +*/ +func (a *SCADeviceManagementApi) SubmitScaAssociationInput(deviceId string) SCADeviceManagementApiSubmitScaAssociationInput { + return SCADeviceManagementApiSubmitScaAssociationInput{ + deviceId: deviceId, + } +} + +/* +SubmitScaAssociation Create a new SCA association for a device + +Creates an association between an SCA-enabled device and an entity, such as an account holder. This action does not guarantee the association is immediately ready for use; its status may be `pendingApproval` if the account holder has existing devices. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SCADeviceManagementApiSubmitScaAssociationInput - Request parameters, see SubmitScaAssociationInput +@return SubmitScaAssociationResponse, *http.Response, error +*/ +func (a *SCADeviceManagementApi) SubmitScaAssociation(ctx context.Context, r SCADeviceManagementApiSubmitScaAssociationInput) (SubmitScaAssociationResponse, *http.Response, error) { + res := &SubmitScaAssociationResponse{} + path := "/scaDevices/{deviceId}/scaAssociations" + path = strings.Replace(path, "{"+"deviceId"+"}", url.PathEscape(common.ParameterValueToString(r.deviceId, "deviceId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.submitScaAssociationRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/balanceplatform/api_transfer_limits_balance_account_level.go b/src/balanceplatform/api_transfer_limits_balance_account_level.go new file mode 100644 index 000000000..e8d46f264 --- /dev/null +++ b/src/balanceplatform/api_transfer_limits_balance_account_level.go @@ -0,0 +1,529 @@ +/* +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" + "strings" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// TransferLimitsBalanceAccountLevelApi service +type TransferLimitsBalanceAccountLevelApi common.Service + +// All parameters accepted by TransferLimitsBalanceAccountLevelApi.ApprovePendingTransferLimits +type TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput struct { + id string + approveTransferLimitRequest *ApproveTransferLimitRequest + wWWAuthenticate *string +} + +func (r TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput) ApproveTransferLimitRequest(approveTransferLimitRequest ApproveTransferLimitRequest) TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput { + r.approveTransferLimitRequest = &approveTransferLimitRequest + return r +} + +// Header for authenticating using SCA. +func (r TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput) WWWAuthenticate(wWWAuthenticate string) TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput { + r.wWWAuthenticate = &wWWAuthenticate + return r +} + +/* +Prepare a request for ApprovePendingTransferLimits +@param id The unique identifier of the balance account. +@return TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) ApprovePendingTransferLimitsInput(id string) TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput { + return TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput{ + id: id, + } +} + +/* +ApprovePendingTransferLimits Approve pending transfer limits + +Approve transfer limits that are pending SCA authentication. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput - Request parameters, see ApprovePendingTransferLimitsInput +@return *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) ApprovePendingTransferLimits(ctx context.Context, r TransferLimitsBalanceAccountLevelApiApprovePendingTransferLimitsInput) (*http.Response, error) { + var res interface{} + path := "/balanceAccounts/{id}/transferLimits/approve" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.wWWAuthenticate != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.approveTransferLimitRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return 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 httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by TransferLimitsBalanceAccountLevelApi.CreateTransferLimit +type TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput struct { + id string + createTransferLimitRequest *CreateTransferLimitRequest + wWWAuthenticate *string +} + +func (r TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput) CreateTransferLimitRequest(createTransferLimitRequest CreateTransferLimitRequest) TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput { + r.createTransferLimitRequest = &createTransferLimitRequest + return r +} + +// Header for authenticating through SCA +func (r TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput) WWWAuthenticate(wWWAuthenticate string) TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput { + r.wWWAuthenticate = &wWWAuthenticate + return r +} + +/* +Prepare a request for CreateTransferLimit +@param id The unique identifier of the balance account. +@return TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) CreateTransferLimitInput(id string) TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput { + return TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput{ + id: id, + } +} + +/* +CreateTransferLimit Create a transfer limit + +Create a transfer limit for your balance account using the unique `id` of your balance account. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput - Request parameters, see CreateTransferLimitInput +@return TransferLimit, *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) CreateTransferLimit(ctx context.Context, r TransferLimitsBalanceAccountLevelApiCreateTransferLimitInput) (TransferLimit, *http.Response, error) { + res := &TransferLimit{} + path := "/balanceAccounts/{id}/transferLimits" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.wWWAuthenticate != nil { + common.ParameterAddToHeaderOrQuery(headerParams, "WWW-Authenticate", r.wWWAuthenticate, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.createTransferLimitRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + 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 TransferLimitsBalanceAccountLevelApi.DeletePendingTransferLimit +type TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput struct { + id string + transferLimitId string +} + +/* +Prepare a request for DeletePendingTransferLimit +@param id The unique identifier of the balance account.@param transferLimitId The unique identifier of the transfer limit. +@return TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) DeletePendingTransferLimitInput(id string, transferLimitId string) TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput { + return TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput{ + id: id, + transferLimitId: transferLimitId, + } +} + +/* +DeletePendingTransferLimit Delete a scheduled or pending transfer limit + +Delete a scheduled or pending transfer limit using its unique `transferLimitId`. You cannot delete an active limit. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput - Request parameters, see DeletePendingTransferLimitInput +@return *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) DeletePendingTransferLimit(ctx context.Context, r TransferLimitsBalanceAccountLevelApiDeletePendingTransferLimitInput) (*http.Response, error) { + var res interface{} + path := "/balanceAccounts/{id}/transferLimits/{transferLimitId}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + path = strings.Replace(path, "{"+"transferLimitId"+"}", url.PathEscape(common.ParameterValueToString(r.transferLimitId, "transferLimitId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by TransferLimitsBalanceAccountLevelApi.GetCurrentTransferLimits +type TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput struct { + id string + scope *Scope + transferType *TransferType +} + +// The scope to which the transfer limit applies. Possible values: * **perTransaction**: you set a maximum amount for each transfer made from the balance account or balance platform. * **perDay**: you set a maximum total amount for all transfers made from the balance account or balance platform in a day. +func (r TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput) Scope(scope Scope) TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput { + r.scope = &scope + return r +} + +// The type of transfer to which the limit applies. Possible values: * **instant**: the limit applies to transfers with an **instant** priority. * **all**: the limit applies to all transfers, regardless of priority. +func (r TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput) TransferType(transferType TransferType) TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput { + r.transferType = &transferType + return r +} + +/* +Prepare a request for GetCurrentTransferLimits +@param id The unique identifier of the balance account. +@return TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetCurrentTransferLimitsInput(id string) TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput { + return TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput{ + id: id, + } +} + +/* +GetCurrentTransferLimits Get all current transfer limits + +Get all transfer limits that currently apply to a balance account using the unique `id` of the balance account. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput - Request parameters, see GetCurrentTransferLimitsInput +@return TransferLimitListResponse, *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetCurrentTransferLimits(ctx context.Context, r TransferLimitsBalanceAccountLevelApiGetCurrentTransferLimitsInput) (TransferLimitListResponse, *http.Response, error) { + res := &TransferLimitListResponse{} + path := "/balanceAccounts/{id}/transferLimits/current" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.scope != nil { + common.ParameterAddToQuery(queryParams, "scope", r.scope, "") + } + if r.transferType != nil { + common.ParameterAddToQuery(queryParams, "transferType", r.transferType, "") + } + 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 == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by TransferLimitsBalanceAccountLevelApi.GetSpecificTransferLimit +type TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput struct { + id string + transferLimitId string +} + +/* +Prepare a request for GetSpecificTransferLimit +@param id The unique identifier of the balance account.@param transferLimitId The unique identifier of the transfer limit. +@return TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetSpecificTransferLimitInput(id string, transferLimitId string) TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput { + return TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput{ + id: id, + transferLimitId: transferLimitId, + } +} + +/* +GetSpecificTransferLimit Get the details of a transfer limit + +Get the details of a transfer limit using its unique `transferLimitId`. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput - Request parameters, see GetSpecificTransferLimitInput +@return TransferLimit, *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetSpecificTransferLimit(ctx context.Context, r TransferLimitsBalanceAccountLevelApiGetSpecificTransferLimitInput) (TransferLimit, *http.Response, error) { + res := &TransferLimit{} + path := "/balanceAccounts/{id}/transferLimits/{transferLimitId}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + path = strings.Replace(path, "{"+"transferLimitId"+"}", url.PathEscape(common.ParameterValueToString(r.transferLimitId, "transferLimitId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by TransferLimitsBalanceAccountLevelApi.GetTransferLimits +type TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput struct { + id string + scope *Scope + transferType *TransferType + status *LimitStatus +} + +// The scope to which the transfer limit applies. Possible values: * **perTransaction**: you set a maximum amount for each transfer made from the balance account or balance platform. * **perDay**: you set a maximum total amount for all transfers made from the balance account or balance platform in a day. +func (r TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput) Scope(scope Scope) TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput { + r.scope = &scope + return r +} + +// The type of transfer to which the limit applies. Possible values: * **instant**: the limit applies to transfers with an **instant** priority. * **all**: the limit applies to all transfers, regardless of priority. +func (r TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput) TransferType(transferType TransferType) TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput { + r.transferType = &transferType + return r +} + +// The status of the transfer limit. Possible values: * **active**: the limit is currently active. * **inactive**: the limit is currently inactive. * **pendingSCA**: the limit is pending until your user performs SCA. * **scheduled**: the limit is scheduled to become active at a future date. +func (r TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput) Status(status LimitStatus) TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput { + r.status = &status + return r +} + +/* +Prepare a request for GetTransferLimits +@param id The unique identifier of the balance account. +@return TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetTransferLimitsInput(id string) TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput { + return TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput{ + id: id, + } +} + +/* +GetTransferLimits Filter and view the transfer limits + +Filter and view the transfer limits configured for a balance account using the balance account's unique `id` and the available query parameters. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput - Request parameters, see GetTransferLimitsInput +@return TransferLimitListResponse, *http.Response, error +*/ +func (a *TransferLimitsBalanceAccountLevelApi) GetTransferLimits(ctx context.Context, r TransferLimitsBalanceAccountLevelApiGetTransferLimitsInput) (TransferLimitListResponse, *http.Response, error) { + res := &TransferLimitListResponse{} + path := "/balanceAccounts/{id}/transferLimits" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.scope != nil { + common.ParameterAddToQuery(queryParams, "scope", r.scope, "") + } + if r.transferType != nil { + common.ParameterAddToQuery(queryParams, "transferType", r.transferType, "") + } + if r.status != nil { + common.ParameterAddToQuery(queryParams, "status", r.status, "") + } + 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 == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/balanceplatform/api_transfer_limits_balance_platform_level.go b/src/balanceplatform/api_transfer_limits_balance_platform_level.go new file mode 100644 index 000000000..3cd91adc1 --- /dev/null +++ b/src/balanceplatform/api_transfer_limits_balance_platform_level.go @@ -0,0 +1,333 @@ +/* +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" + "strings" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// TransferLimitsBalancePlatformLevelApi service +type TransferLimitsBalancePlatformLevelApi common.Service + +// All parameters accepted by TransferLimitsBalancePlatformLevelApi.CreateTransferLimit +type TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput struct { + id string + createTransferLimitRequest *CreateTransferLimitRequest +} + +func (r TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput) CreateTransferLimitRequest(createTransferLimitRequest CreateTransferLimitRequest) TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput { + r.createTransferLimitRequest = &createTransferLimitRequest + return r +} + +/* +Prepare a request for CreateTransferLimit +@param id The unique identifier of the balance platform. +@return TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput +*/ +func (a *TransferLimitsBalancePlatformLevelApi) CreateTransferLimitInput(id string) TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput { + return TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput{ + id: id, + } +} + +/* +CreateTransferLimit Create a transfer limit + +Create a transfer limit for your balance platform using the unique `id` of your balance platform. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput - Request parameters, see CreateTransferLimitInput +@return TransferLimit, *http.Response, error +*/ +func (a *TransferLimitsBalancePlatformLevelApi) CreateTransferLimit(ctx context.Context, r TransferLimitsBalancePlatformLevelApiCreateTransferLimitInput) (TransferLimit, *http.Response, error) { + res := &TransferLimit{} + path := "/balancePlatforms/{id}/transferLimits" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.createTransferLimitRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by TransferLimitsBalancePlatformLevelApi.DeletePendingTransferLimit +type TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput struct { + id string + transferLimitId string +} + +/* +Prepare a request for DeletePendingTransferLimit +@param id The unique identifier of the balance platform.@param transferLimitId The unique identifier of the transfer limit. +@return TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput +*/ +func (a *TransferLimitsBalancePlatformLevelApi) DeletePendingTransferLimitInput(id string, transferLimitId string) TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput { + return TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput{ + id: id, + transferLimitId: transferLimitId, + } +} + +/* +DeletePendingTransferLimit Delete a scheduled or pending transfer limit + +Delete a scheduled or pending transfer limit using its unique `transferLimitId`. You cannot delete an active limit. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput - Request parameters, see DeletePendingTransferLimitInput +@return *http.Response, error +*/ +func (a *TransferLimitsBalancePlatformLevelApi) DeletePendingTransferLimit(ctx context.Context, r TransferLimitsBalancePlatformLevelApiDeletePendingTransferLimitInput) (*http.Response, error) { + var res interface{} + path := "/balancePlatforms/{id}/transferLimits/{transferLimitId}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + path = strings.Replace(path, "{"+"transferLimitId"+"}", url.PathEscape(common.ParameterValueToString(r.transferLimitId, "transferLimitId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodDelete, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return httpRes, decodeError + } + return httpRes, serviceError + } + + return httpRes, err +} + +// All parameters accepted by TransferLimitsBalancePlatformLevelApi.GetSpecificTransferLimit +type TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput struct { + id string + transferLimitId string +} + +/* +Prepare a request for GetSpecificTransferLimit +@param id The unique identifier of the balance platform.@param transferLimitId The unique identifier of the transfer limit. +@return TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput +*/ +func (a *TransferLimitsBalancePlatformLevelApi) GetSpecificTransferLimitInput(id string, transferLimitId string) TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput { + return TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput{ + id: id, + transferLimitId: transferLimitId, + } +} + +/* +GetSpecificTransferLimit Get the details of a transfer limit + +Get the details of a transfer limit using its unique `transferLimitId`. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput - Request parameters, see GetSpecificTransferLimitInput +@return TransferLimit, *http.Response, error +*/ +func (a *TransferLimitsBalancePlatformLevelApi) GetSpecificTransferLimit(ctx context.Context, r TransferLimitsBalancePlatformLevelApiGetSpecificTransferLimitInput) (TransferLimit, *http.Response, error) { + res := &TransferLimit{} + path := "/balancePlatforms/{id}/transferLimits/{transferLimitId}" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + path = strings.Replace(path, "{"+"transferLimitId"+"}", url.PathEscape(common.ParameterValueToString(r.transferLimitId, "transferLimitId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodGet, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + +// All parameters accepted by TransferLimitsBalancePlatformLevelApi.GetTransferLimits +type TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput struct { + id string + scope *Scope + transferType *TransferType + status *LimitStatus +} + +// The scope to which the transfer limit applies. Possible values: * **perTransaction**: you set a maximum amount for each transfer made from the balance account or balance platform. * **perDay**: you set a maximum total amount for all transfers made from the balance account or balance platform in a day. +func (r TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput) Scope(scope Scope) TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput { + r.scope = &scope + return r +} + +// The type of transfer to which the limit applies. Possible values: * **instant**: the limit applies to transfers with an **instant** priority. * **all**: the limit applies to all transfers, regardless of priority. +func (r TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput) TransferType(transferType TransferType) TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput { + r.transferType = &transferType + return r +} + +// The status of the transfer limit. Possible values: * **active**: the limit is currently active. * **inactive**: the limit is currently inactive. * **pendingSCA**: the limit is pending until your user performs SCA. * **scheduled**: the limit is scheduled to become active at a future date. +func (r TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput) Status(status LimitStatus) TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput { + r.status = &status + return r +} + +/* +Prepare a request for GetTransferLimits +@param id The unique identifier of the balance platform. +@return TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput +*/ +func (a *TransferLimitsBalancePlatformLevelApi) GetTransferLimitsInput(id string) TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput { + return TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput{ + id: id, + } +} + +/* +GetTransferLimits Filter and view the transfer limits + +Filter and view the transfer limits configured for your balance platform using the balance platform's unique `id` and the available query parameters. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput - Request parameters, see GetTransferLimitsInput +@return TransferLimitListResponse, *http.Response, error +*/ +func (a *TransferLimitsBalancePlatformLevelApi) GetTransferLimits(ctx context.Context, r TransferLimitsBalancePlatformLevelApiGetTransferLimitsInput) (TransferLimitListResponse, *http.Response, error) { + res := &TransferLimitListResponse{} + path := "/balancePlatforms/{id}/transferLimits" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.scope != nil { + common.ParameterAddToQuery(queryParams, "scope", r.scope, "") + } + if r.transferType != nil { + common.ParameterAddToQuery(queryParams, "transferType", r.transferType, "") + } + if r.status != nil { + common.ParameterAddToQuery(queryParams, "status", r.status, "") + } + 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 == 404 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} diff --git a/src/balanceplatform/client.go b/src/balanceplatform/client.go index 35c86d67b..3b6de2158 100644 --- a/src/balanceplatform/client.go +++ b/src/balanceplatform/client.go @@ -21,8 +21,12 @@ type APIClient struct { AccountHoldersApi *AccountHoldersApi + AuthorizedCardUsersApi *AuthorizedCardUsersApi + BalanceAccountsApi *BalanceAccountsApi + BalancesApi *BalancesApi + BankAccountValidationApi *BankAccountValidationApi CardOrdersApi *CardOrdersApi @@ -43,8 +47,16 @@ type APIClient struct { PlatformApi *PlatformApi + SCAAssociationManagementApi *SCAAssociationManagementApi + + SCADeviceManagementApi *SCADeviceManagementApi + TransactionRulesApi *TransactionRulesApi + TransferLimitsBalanceAccountLevelApi *TransferLimitsBalanceAccountLevelApi + + TransferLimitsBalancePlatformLevelApi *TransferLimitsBalancePlatformLevelApi + TransferRoutesApi *TransferRoutesApi } @@ -58,7 +70,9 @@ func NewAPIClient(client *common.Client) *APIClient { // API Services c.AccountHoldersApi = (*AccountHoldersApi)(&c.common) + c.AuthorizedCardUsersApi = (*AuthorizedCardUsersApi)(&c.common) c.BalanceAccountsApi = (*BalanceAccountsApi)(&c.common) + c.BalancesApi = (*BalancesApi)(&c.common) c.BankAccountValidationApi = (*BankAccountValidationApi)(&c.common) c.CardOrdersApi = (*CardOrdersApi)(&c.common) c.GrantAccountsApi = (*GrantAccountsApi)(&c.common) @@ -69,7 +83,11 @@ func NewAPIClient(client *common.Client) *APIClient { c.PaymentInstrumentGroupsApi = (*PaymentInstrumentGroupsApi)(&c.common) c.PaymentInstrumentsApi = (*PaymentInstrumentsApi)(&c.common) c.PlatformApi = (*PlatformApi)(&c.common) + c.SCAAssociationManagementApi = (*SCAAssociationManagementApi)(&c.common) + c.SCADeviceManagementApi = (*SCADeviceManagementApi)(&c.common) c.TransactionRulesApi = (*TransactionRulesApi)(&c.common) + c.TransferLimitsBalanceAccountLevelApi = (*TransferLimitsBalanceAccountLevelApi)(&c.common) + c.TransferLimitsBalancePlatformLevelApi = (*TransferLimitsBalancePlatformLevelApi)(&c.common) c.TransferRoutesApi = (*TransferRoutesApi)(&c.common) return c diff --git a/src/balanceplatform/model_additional_bank_identification.go b/src/balanceplatform/model_additional_bank_identification.go index 82f998b11..12239649c 100644 --- a/src/balanceplatform/model_additional_bank_identification.go +++ b/src/balanceplatform/model_additional_bank_identification.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &AdditionalBankIdentification{} type AdditionalBankIdentification struct { // The value of the additional bank identification. Code *string `json:"code,omitempty"` - // The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + // The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. Type *string `json:"type,omitempty"` } @@ -162,7 +162,7 @@ func (v *NullableAdditionalBankIdentification) UnmarshalJSON(src []byte) error { } func (o *AdditionalBankIdentification) isValidType() bool { - var allowedEnumValues = []string{"gbSortCode", "usRoutingNumber"} + var allowedEnumValues = []string{"auBsbCode", "caRoutingNumber", "gbSortCode", "usRoutingNumber"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/balanceplatform/model_additional_bank_identification_requirement.go b/src/balanceplatform/model_additional_bank_identification_requirement.go new file mode 100644 index 000000000..bf78dab98 --- /dev/null +++ b/src/balanceplatform/model_additional_bank_identification_requirement.go @@ -0,0 +1,211 @@ +/* +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/v21/src/common" +) + +// checks if the AdditionalBankIdentificationRequirement type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AdditionalBankIdentificationRequirement{} + +// AdditionalBankIdentificationRequirement struct for AdditionalBankIdentificationRequirement +type AdditionalBankIdentificationRequirement struct { + // The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + AdditionalBankIdentificationType *string `json:"additionalBankIdentificationType,omitempty"` + // The description of the additional bank identification requirement. + Description *string `json:"description,omitempty"` + // **additionalBankIdentificationRequirement** + Type string `json:"type"` +} + +// NewAdditionalBankIdentificationRequirement instantiates a new AdditionalBankIdentificationRequirement 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 NewAdditionalBankIdentificationRequirement(type_ string) *AdditionalBankIdentificationRequirement { + this := AdditionalBankIdentificationRequirement{} + this.Type = type_ + return &this +} + +// NewAdditionalBankIdentificationRequirementWithDefaults instantiates a new AdditionalBankIdentificationRequirement 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 NewAdditionalBankIdentificationRequirementWithDefaults() *AdditionalBankIdentificationRequirement { + this := AdditionalBankIdentificationRequirement{} + var type_ string = "additionalBankIdentificationRequirement" + this.Type = type_ + return &this +} + +// GetAdditionalBankIdentificationType returns the AdditionalBankIdentificationType field value if set, zero value otherwise. +func (o *AdditionalBankIdentificationRequirement) GetAdditionalBankIdentificationType() string { + if o == nil || common.IsNil(o.AdditionalBankIdentificationType) { + var ret string + return ret + } + return *o.AdditionalBankIdentificationType +} + +// GetAdditionalBankIdentificationTypeOk returns a tuple with the AdditionalBankIdentificationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AdditionalBankIdentificationRequirement) GetAdditionalBankIdentificationTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.AdditionalBankIdentificationType) { + return nil, false + } + return o.AdditionalBankIdentificationType, true +} + +// HasAdditionalBankIdentificationType returns a boolean if a field has been set. +func (o *AdditionalBankIdentificationRequirement) HasAdditionalBankIdentificationType() bool { + if o != nil && !common.IsNil(o.AdditionalBankIdentificationType) { + return true + } + + return false +} + +// SetAdditionalBankIdentificationType gets a reference to the given string and assigns it to the AdditionalBankIdentificationType field. +func (o *AdditionalBankIdentificationRequirement) SetAdditionalBankIdentificationType(v string) { + o.AdditionalBankIdentificationType = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AdditionalBankIdentificationRequirement) 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 *AdditionalBankIdentificationRequirement) 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 *AdditionalBankIdentificationRequirement) 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 *AdditionalBankIdentificationRequirement) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value +func (o *AdditionalBankIdentificationRequirement) 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 *AdditionalBankIdentificationRequirement) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AdditionalBankIdentificationRequirement) SetType(v string) { + o.Type = v +} + +func (o AdditionalBankIdentificationRequirement) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AdditionalBankIdentificationRequirement) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AdditionalBankIdentificationType) { + toSerialize["additionalBankIdentificationType"] = o.AdditionalBankIdentificationType + } + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableAdditionalBankIdentificationRequirement struct { + value *AdditionalBankIdentificationRequirement + isSet bool +} + +func (v NullableAdditionalBankIdentificationRequirement) Get() *AdditionalBankIdentificationRequirement { + return v.value +} + +func (v *NullableAdditionalBankIdentificationRequirement) Set(val *AdditionalBankIdentificationRequirement) { + v.value = val + v.isSet = true +} + +func (v NullableAdditionalBankIdentificationRequirement) IsSet() bool { + return v.isSet +} + +func (v *NullableAdditionalBankIdentificationRequirement) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAdditionalBankIdentificationRequirement(val *AdditionalBankIdentificationRequirement) *NullableAdditionalBankIdentificationRequirement { + return &NullableAdditionalBankIdentificationRequirement{value: val, isSet: true} +} + +func (v NullableAdditionalBankIdentificationRequirement) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAdditionalBankIdentificationRequirement) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *AdditionalBankIdentificationRequirement) isValidAdditionalBankIdentificationType() bool { + var allowedEnumValues = []string{"auBsbCode", "caRoutingNumber", "gbSortCode", "usRoutingNumber"} + for _, allowed := range allowedEnumValues { + if o.GetAdditionalBankIdentificationType() == allowed { + return true + } + } + return false +} +func (o *AdditionalBankIdentificationRequirement) isValidType() bool { + var allowedEnumValues = []string{"additionalBankIdentificationRequirement"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_approve_association_request.go b/src/balanceplatform/model_approve_association_request.go new file mode 100644 index 000000000..af641657c --- /dev/null +++ b/src/balanceplatform/model_approve_association_request.go @@ -0,0 +1,198 @@ +/* +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/v21/src/common" +) + +// checks if the ApproveAssociationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ApproveAssociationRequest{} + +// ApproveAssociationRequest struct for ApproveAssociationRequest +type ApproveAssociationRequest struct { + // The unique identifier of the entity. + EntityId string `json:"entityId"` + EntityType ScaEntityType `json:"entityType"` + // List of device ids associated to the entity that will be approved. + ScaDeviceIds []string `json:"scaDeviceIds"` + Status AssociationStatus `json:"status"` +} + +// NewApproveAssociationRequest instantiates a new ApproveAssociationRequest 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 NewApproveAssociationRequest(entityId string, entityType ScaEntityType, scaDeviceIds []string, status AssociationStatus) *ApproveAssociationRequest { + this := ApproveAssociationRequest{} + this.EntityId = entityId + this.EntityType = entityType + this.ScaDeviceIds = scaDeviceIds + this.Status = status + return &this +} + +// NewApproveAssociationRequestWithDefaults instantiates a new ApproveAssociationRequest 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 NewApproveAssociationRequestWithDefaults() *ApproveAssociationRequest { + this := ApproveAssociationRequest{} + return &this +} + +// GetEntityId returns the EntityId field value +func (o *ApproveAssociationRequest) GetEntityId() string { + if o == nil { + var ret string + return ret + } + + return o.EntityId +} + +// GetEntityIdOk returns a tuple with the EntityId field value +// and a boolean to check if the value has been set. +func (o *ApproveAssociationRequest) GetEntityIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntityId, true +} + +// SetEntityId sets field value +func (o *ApproveAssociationRequest) SetEntityId(v string) { + o.EntityId = v +} + +// GetEntityType returns the EntityType field value +func (o *ApproveAssociationRequest) GetEntityType() ScaEntityType { + if o == nil { + var ret ScaEntityType + return ret + } + + return o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value +// and a boolean to check if the value has been set. +func (o *ApproveAssociationRequest) GetEntityTypeOk() (*ScaEntityType, bool) { + if o == nil { + return nil, false + } + return &o.EntityType, true +} + +// SetEntityType sets field value +func (o *ApproveAssociationRequest) SetEntityType(v ScaEntityType) { + o.EntityType = v +} + +// GetScaDeviceIds returns the ScaDeviceIds field value +func (o *ApproveAssociationRequest) GetScaDeviceIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ScaDeviceIds +} + +// GetScaDeviceIdsOk returns a tuple with the ScaDeviceIds field value +// and a boolean to check if the value has been set. +func (o *ApproveAssociationRequest) GetScaDeviceIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ScaDeviceIds, true +} + +// SetScaDeviceIds sets field value +func (o *ApproveAssociationRequest) SetScaDeviceIds(v []string) { + o.ScaDeviceIds = v +} + +// GetStatus returns the Status field value +func (o *ApproveAssociationRequest) GetStatus() AssociationStatus { + if o == nil { + var ret AssociationStatus + 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 *ApproveAssociationRequest) GetStatusOk() (*AssociationStatus, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ApproveAssociationRequest) SetStatus(v AssociationStatus) { + o.Status = v +} + +func (o ApproveAssociationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApproveAssociationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entityId"] = o.EntityId + toSerialize["entityType"] = o.EntityType + toSerialize["scaDeviceIds"] = o.ScaDeviceIds + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableApproveAssociationRequest struct { + value *ApproveAssociationRequest + isSet bool +} + +func (v NullableApproveAssociationRequest) Get() *ApproveAssociationRequest { + return v.value +} + +func (v *NullableApproveAssociationRequest) Set(val *ApproveAssociationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApproveAssociationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApproveAssociationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApproveAssociationRequest(val *ApproveAssociationRequest) *NullableApproveAssociationRequest { + return &NullableApproveAssociationRequest{value: val, isSet: true} +} + +func (v NullableApproveAssociationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApproveAssociationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_approve_association_response.go b/src/balanceplatform/model_approve_association_response.go new file mode 100644 index 000000000..f07e9f506 --- /dev/null +++ b/src/balanceplatform/model_approve_association_response.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the ApproveAssociationResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ApproveAssociationResponse{} + +// ApproveAssociationResponse struct for ApproveAssociationResponse +type ApproveAssociationResponse struct { + // The list of associations. + ScaAssociations []Association `json:"scaAssociations"` +} + +// NewApproveAssociationResponse instantiates a new ApproveAssociationResponse 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 NewApproveAssociationResponse(scaAssociations []Association) *ApproveAssociationResponse { + this := ApproveAssociationResponse{} + this.ScaAssociations = scaAssociations + return &this +} + +// NewApproveAssociationResponseWithDefaults instantiates a new ApproveAssociationResponse 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 NewApproveAssociationResponseWithDefaults() *ApproveAssociationResponse { + this := ApproveAssociationResponse{} + return &this +} + +// GetScaAssociations returns the ScaAssociations field value +func (o *ApproveAssociationResponse) GetScaAssociations() []Association { + if o == nil { + var ret []Association + return ret + } + + return o.ScaAssociations +} + +// GetScaAssociationsOk returns a tuple with the ScaAssociations field value +// and a boolean to check if the value has been set. +func (o *ApproveAssociationResponse) GetScaAssociationsOk() ([]Association, bool) { + if o == nil { + return nil, false + } + return o.ScaAssociations, true +} + +// SetScaAssociations sets field value +func (o *ApproveAssociationResponse) SetScaAssociations(v []Association) { + o.ScaAssociations = v +} + +func (o ApproveAssociationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApproveAssociationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["scaAssociations"] = o.ScaAssociations + return toSerialize, nil +} + +type NullableApproveAssociationResponse struct { + value *ApproveAssociationResponse + isSet bool +} + +func (v NullableApproveAssociationResponse) Get() *ApproveAssociationResponse { + return v.value +} + +func (v *NullableApproveAssociationResponse) Set(val *ApproveAssociationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApproveAssociationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApproveAssociationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApproveAssociationResponse(val *ApproveAssociationResponse) *NullableApproveAssociationResponse { + return &NullableApproveAssociationResponse{value: val, isSet: true} +} + +func (v NullableApproveAssociationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApproveAssociationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_approve_transfer_limit_request.go b/src/balanceplatform/model_approve_transfer_limit_request.go new file mode 100644 index 000000000..a6e75bd7a --- /dev/null +++ b/src/balanceplatform/model_approve_transfer_limit_request.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the ApproveTransferLimitRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ApproveTransferLimitRequest{} + +// ApproveTransferLimitRequest struct for ApproveTransferLimitRequest +type ApproveTransferLimitRequest struct { + // A list that includes the `transferLimitId` of all the pending transfer limits you want to approve. + TransferLimitIds []string `json:"transferLimitIds"` +} + +// NewApproveTransferLimitRequest instantiates a new ApproveTransferLimitRequest 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 NewApproveTransferLimitRequest(transferLimitIds []string) *ApproveTransferLimitRequest { + this := ApproveTransferLimitRequest{} + this.TransferLimitIds = transferLimitIds + return &this +} + +// NewApproveTransferLimitRequestWithDefaults instantiates a new ApproveTransferLimitRequest 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 NewApproveTransferLimitRequestWithDefaults() *ApproveTransferLimitRequest { + this := ApproveTransferLimitRequest{} + return &this +} + +// GetTransferLimitIds returns the TransferLimitIds field value +func (o *ApproveTransferLimitRequest) GetTransferLimitIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.TransferLimitIds +} + +// GetTransferLimitIdsOk returns a tuple with the TransferLimitIds field value +// and a boolean to check if the value has been set. +func (o *ApproveTransferLimitRequest) GetTransferLimitIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.TransferLimitIds, true +} + +// SetTransferLimitIds sets field value +func (o *ApproveTransferLimitRequest) SetTransferLimitIds(v []string) { + o.TransferLimitIds = v +} + +func (o ApproveTransferLimitRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApproveTransferLimitRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["transferLimitIds"] = o.TransferLimitIds + return toSerialize, nil +} + +type NullableApproveTransferLimitRequest struct { + value *ApproveTransferLimitRequest + isSet bool +} + +func (v NullableApproveTransferLimitRequest) Get() *ApproveTransferLimitRequest { + return v.value +} + +func (v *NullableApproveTransferLimitRequest) Set(val *ApproveTransferLimitRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApproveTransferLimitRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApproveTransferLimitRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApproveTransferLimitRequest(val *ApproveTransferLimitRequest) *NullableApproveTransferLimitRequest { + return &NullableApproveTransferLimitRequest{value: val, isSet: true} +} + +func (v NullableApproveTransferLimitRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApproveTransferLimitRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_association.go b/src/balanceplatform/model_association.go new file mode 100644 index 000000000..b907173fd --- /dev/null +++ b/src/balanceplatform/model_association.go @@ -0,0 +1,198 @@ +/* +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/v21/src/common" +) + +// checks if the Association type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Association{} + +// Association struct for Association +type Association struct { + // The unique identifier of the entity. + EntityId string `json:"entityId"` + EntityType ScaEntityType `json:"entityType"` + // The unique identifier for the SCA device. + ScaDeviceId string `json:"scaDeviceId"` + Status AssociationStatus `json:"status"` +} + +// NewAssociation instantiates a new Association 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 NewAssociation(entityId string, entityType ScaEntityType, scaDeviceId string, status AssociationStatus) *Association { + this := Association{} + this.EntityId = entityId + this.EntityType = entityType + this.ScaDeviceId = scaDeviceId + this.Status = status + return &this +} + +// NewAssociationWithDefaults instantiates a new Association 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 NewAssociationWithDefaults() *Association { + this := Association{} + return &this +} + +// GetEntityId returns the EntityId field value +func (o *Association) GetEntityId() string { + if o == nil { + var ret string + return ret + } + + return o.EntityId +} + +// GetEntityIdOk returns a tuple with the EntityId field value +// and a boolean to check if the value has been set. +func (o *Association) GetEntityIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntityId, true +} + +// SetEntityId sets field value +func (o *Association) SetEntityId(v string) { + o.EntityId = v +} + +// GetEntityType returns the EntityType field value +func (o *Association) GetEntityType() ScaEntityType { + if o == nil { + var ret ScaEntityType + return ret + } + + return o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value +// and a boolean to check if the value has been set. +func (o *Association) GetEntityTypeOk() (*ScaEntityType, bool) { + if o == nil { + return nil, false + } + return &o.EntityType, true +} + +// SetEntityType sets field value +func (o *Association) SetEntityType(v ScaEntityType) { + o.EntityType = v +} + +// GetScaDeviceId returns the ScaDeviceId field value +func (o *Association) GetScaDeviceId() string { + if o == nil { + var ret string + return ret + } + + return o.ScaDeviceId +} + +// GetScaDeviceIdOk returns a tuple with the ScaDeviceId field value +// and a boolean to check if the value has been set. +func (o *Association) GetScaDeviceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ScaDeviceId, true +} + +// SetScaDeviceId sets field value +func (o *Association) SetScaDeviceId(v string) { + o.ScaDeviceId = v +} + +// GetStatus returns the Status field value +func (o *Association) GetStatus() AssociationStatus { + if o == nil { + var ret AssociationStatus + 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 *Association) GetStatusOk() (*AssociationStatus, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Association) SetStatus(v AssociationStatus) { + o.Status = v +} + +func (o Association) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Association) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entityId"] = o.EntityId + toSerialize["entityType"] = o.EntityType + toSerialize["scaDeviceId"] = o.ScaDeviceId + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableAssociation struct { + value *Association + isSet bool +} + +func (v NullableAssociation) Get() *Association { + return v.value +} + +func (v *NullableAssociation) Set(val *Association) { + v.value = val + v.isSet = true +} + +func (v NullableAssociation) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociation(val *Association) *NullableAssociation { + return &NullableAssociation{value: val, isSet: true} +} + +func (v NullableAssociation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_association_listing.go b/src/balanceplatform/model_association_listing.go new file mode 100644 index 000000000..8929f0626 --- /dev/null +++ b/src/balanceplatform/model_association_listing.go @@ -0,0 +1,291 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the AssociationListing type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationListing{} + +// AssociationListing struct for AssociationListing +type AssociationListing struct { + // The date and time when the association was created. + CreatedAt time.Time `json:"createdAt"` + // The unique identifier of the entity. + EntityId string `json:"entityId"` + EntityType ScaEntityType `json:"entityType"` + // The unique identifier of the SCA device. + ScaDeviceId string `json:"scaDeviceId"` + // The human-readable name for the SCA device that was registered. + ScaDeviceName *string `json:"scaDeviceName,omitempty"` + ScaDeviceType ScaDeviceType `json:"scaDeviceType"` + Status AssociationStatus `json:"status"` +} + +// NewAssociationListing instantiates a new AssociationListing 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 NewAssociationListing(createdAt time.Time, entityId string, entityType ScaEntityType, scaDeviceId string, scaDeviceType ScaDeviceType, status AssociationStatus) *AssociationListing { + this := AssociationListing{} + this.CreatedAt = createdAt + this.EntityId = entityId + this.EntityType = entityType + this.ScaDeviceId = scaDeviceId + this.ScaDeviceType = scaDeviceType + this.Status = status + return &this +} + +// NewAssociationListingWithDefaults instantiates a new AssociationListing 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 NewAssociationListingWithDefaults() *AssociationListing { + this := AssociationListing{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *AssociationListing) 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 *AssociationListing) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *AssociationListing) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetEntityId returns the EntityId field value +func (o *AssociationListing) GetEntityId() string { + if o == nil { + var ret string + return ret + } + + return o.EntityId +} + +// GetEntityIdOk returns a tuple with the EntityId field value +// and a boolean to check if the value has been set. +func (o *AssociationListing) GetEntityIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntityId, true +} + +// SetEntityId sets field value +func (o *AssociationListing) SetEntityId(v string) { + o.EntityId = v +} + +// GetEntityType returns the EntityType field value +func (o *AssociationListing) GetEntityType() ScaEntityType { + if o == nil { + var ret ScaEntityType + return ret + } + + return o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value +// and a boolean to check if the value has been set. +func (o *AssociationListing) GetEntityTypeOk() (*ScaEntityType, bool) { + if o == nil { + return nil, false + } + return &o.EntityType, true +} + +// SetEntityType sets field value +func (o *AssociationListing) SetEntityType(v ScaEntityType) { + o.EntityType = v +} + +// GetScaDeviceId returns the ScaDeviceId field value +func (o *AssociationListing) GetScaDeviceId() string { + if o == nil { + var ret string + return ret + } + + return o.ScaDeviceId +} + +// GetScaDeviceIdOk returns a tuple with the ScaDeviceId field value +// and a boolean to check if the value has been set. +func (o *AssociationListing) GetScaDeviceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ScaDeviceId, true +} + +// SetScaDeviceId sets field value +func (o *AssociationListing) SetScaDeviceId(v string) { + o.ScaDeviceId = v +} + +// GetScaDeviceName returns the ScaDeviceName field value if set, zero value otherwise. +func (o *AssociationListing) GetScaDeviceName() string { + if o == nil || common.IsNil(o.ScaDeviceName) { + var ret string + return ret + } + return *o.ScaDeviceName +} + +// GetScaDeviceNameOk returns a tuple with the ScaDeviceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssociationListing) GetScaDeviceNameOk() (*string, bool) { + if o == nil || common.IsNil(o.ScaDeviceName) { + return nil, false + } + return o.ScaDeviceName, true +} + +// HasScaDeviceName returns a boolean if a field has been set. +func (o *AssociationListing) HasScaDeviceName() bool { + if o != nil && !common.IsNil(o.ScaDeviceName) { + return true + } + + return false +} + +// SetScaDeviceName gets a reference to the given string and assigns it to the ScaDeviceName field. +func (o *AssociationListing) SetScaDeviceName(v string) { + o.ScaDeviceName = &v +} + +// GetScaDeviceType returns the ScaDeviceType field value +func (o *AssociationListing) GetScaDeviceType() ScaDeviceType { + if o == nil { + var ret ScaDeviceType + return ret + } + + return o.ScaDeviceType +} + +// GetScaDeviceTypeOk returns a tuple with the ScaDeviceType field value +// and a boolean to check if the value has been set. +func (o *AssociationListing) GetScaDeviceTypeOk() (*ScaDeviceType, bool) { + if o == nil { + return nil, false + } + return &o.ScaDeviceType, true +} + +// SetScaDeviceType sets field value +func (o *AssociationListing) SetScaDeviceType(v ScaDeviceType) { + o.ScaDeviceType = v +} + +// GetStatus returns the Status field value +func (o *AssociationListing) GetStatus() AssociationStatus { + if o == nil { + var ret AssociationStatus + 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 *AssociationListing) GetStatusOk() (*AssociationStatus, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *AssociationListing) SetStatus(v AssociationStatus) { + o.Status = v +} + +func (o AssociationListing) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationListing) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["entityId"] = o.EntityId + toSerialize["entityType"] = o.EntityType + toSerialize["scaDeviceId"] = o.ScaDeviceId + if !common.IsNil(o.ScaDeviceName) { + toSerialize["scaDeviceName"] = o.ScaDeviceName + } + toSerialize["scaDeviceType"] = o.ScaDeviceType + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableAssociationListing struct { + value *AssociationListing + isSet bool +} + +func (v NullableAssociationListing) Get() *AssociationListing { + return v.value +} + +func (v *NullableAssociationListing) Set(val *AssociationListing) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationListing) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationListing) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationListing(val *AssociationListing) *NullableAssociationListing { + return &NullableAssociationListing{value: val, isSet: true} +} + +func (v NullableAssociationListing) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationListing) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_association_status.go b/src/balanceplatform/model_association_status.go new file mode 100644 index 000000000..d7b634047 --- /dev/null +++ b/src/balanceplatform/model_association_status.go @@ -0,0 +1,108 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// AssociationStatus the model 'AssociationStatus' +type AssociationStatus string + +// List of AssociationStatus +const ( + PENDING_APPROVAL AssociationStatus = "pendingApproval" + ACTIVE AssociationStatus = "active" +) + +// All allowed values of AssociationStatus enum +var AllowedAssociationStatusEnumValues = []AssociationStatus{ + "pendingApproval", + "active", +} + +func (v *AssociationStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AssociationStatus(value) + for _, existing := range AllowedAssociationStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AssociationStatus", value) +} + +// NewAssociationStatusFromValue returns a pointer to a valid AssociationStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAssociationStatusFromValue(v string) (*AssociationStatus, error) { + ev := AssociationStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AssociationStatus: valid values are %v", v, AllowedAssociationStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AssociationStatus) IsValid() bool { + for _, existing := range AllowedAssociationStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to AssociationStatus value +func (v AssociationStatus) Ptr() *AssociationStatus { + return &v +} + +type NullableAssociationStatus struct { + value *AssociationStatus + isSet bool +} + +func (v NullableAssociationStatus) Get() *AssociationStatus { + return v.value +} + +func (v *NullableAssociationStatus) Set(val *AssociationStatus) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationStatus(val *AssociationStatus) *NullableAssociationStatus { + return &NullableAssociationStatus{value: val, isSet: true} +} + +func (v NullableAssociationStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_authorised_card_users.go b/src/balanceplatform/model_authorised_card_users.go new file mode 100644 index 000000000..f6d69f483 --- /dev/null +++ b/src/balanceplatform/model_authorised_card_users.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the AuthorisedCardUsers type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AuthorisedCardUsers{} + +// AuthorisedCardUsers struct for AuthorisedCardUsers +type AuthorisedCardUsers struct { + // The legal entity IDs of the authorized card users linked to the specified payment instrument. + LegalEntityIds []string `json:"legalEntityIds,omitempty"` +} + +// NewAuthorisedCardUsers instantiates a new AuthorisedCardUsers 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 NewAuthorisedCardUsers() *AuthorisedCardUsers { + this := AuthorisedCardUsers{} + return &this +} + +// NewAuthorisedCardUsersWithDefaults instantiates a new AuthorisedCardUsers 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 NewAuthorisedCardUsersWithDefaults() *AuthorisedCardUsers { + this := AuthorisedCardUsers{} + return &this +} + +// GetLegalEntityIds returns the LegalEntityIds field value if set, zero value otherwise. +func (o *AuthorisedCardUsers) GetLegalEntityIds() []string { + if o == nil || common.IsNil(o.LegalEntityIds) { + var ret []string + return ret + } + return o.LegalEntityIds +} + +// GetLegalEntityIdsOk returns a tuple with the LegalEntityIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthorisedCardUsers) GetLegalEntityIdsOk() ([]string, bool) { + if o == nil || common.IsNil(o.LegalEntityIds) { + return nil, false + } + return o.LegalEntityIds, true +} + +// HasLegalEntityIds returns a boolean if a field has been set. +func (o *AuthorisedCardUsers) HasLegalEntityIds() bool { + if o != nil && !common.IsNil(o.LegalEntityIds) { + return true + } + + return false +} + +// SetLegalEntityIds gets a reference to the given []string and assigns it to the LegalEntityIds field. +func (o *AuthorisedCardUsers) SetLegalEntityIds(v []string) { + o.LegalEntityIds = v +} + +func (o AuthorisedCardUsers) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthorisedCardUsers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.LegalEntityIds) { + toSerialize["legalEntityIds"] = o.LegalEntityIds + } + return toSerialize, nil +} + +type NullableAuthorisedCardUsers struct { + value *AuthorisedCardUsers + isSet bool +} + +func (v NullableAuthorisedCardUsers) Get() *AuthorisedCardUsers { + return v.value +} + +func (v *NullableAuthorisedCardUsers) Set(val *AuthorisedCardUsers) { + v.value = val + v.isSet = true +} + +func (v NullableAuthorisedCardUsers) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthorisedCardUsers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthorisedCardUsers(val *AuthorisedCardUsers) *NullableAuthorisedCardUsers { + return &NullableAuthorisedCardUsers{value: val, isSet: true} +} + +func (v NullableAuthorisedCardUsers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthorisedCardUsers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_balance_account.go b/src/balanceplatform/model_balance_account.go index 1476244d9..9c71061d6 100644 --- a/src/balanceplatform/model_balance_account.go +++ b/src/balanceplatform/model_balance_account.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalanceAccount{} // BalanceAccount struct for BalanceAccount type BalanceAccount struct { - // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-id) associated with the balance account. AccountHolderId string `json:"accountHolderId"` // List of balances with the amount and currency. Balances []Balance `json:"balances,omitempty"` diff --git a/src/balanceplatform/model_balance_account_base.go b/src/balanceplatform/model_balance_account_base.go index fdf47fabb..f61ba37ad 100644 --- a/src/balanceplatform/model_balance_account_base.go +++ b/src/balanceplatform/model_balance_account_base.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalanceAccountBase{} // BalanceAccountBase struct for BalanceAccountBase type BalanceAccountBase struct { - // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-id) associated with the balance account. AccountHolderId string `json:"accountHolderId"` // The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. This is the currency displayed on the Balance Account overview page in your Customer Area. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. DefaultCurrencyCode *string `json:"defaultCurrencyCode,omitempty"` diff --git a/src/balanceplatform/model_balance_account_info.go b/src/balanceplatform/model_balance_account_info.go index 90d6f56a5..bf0affb03 100644 --- a/src/balanceplatform/model_balance_account_info.go +++ b/src/balanceplatform/model_balance_account_info.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalanceAccountInfo{} // BalanceAccountInfo struct for BalanceAccountInfo type BalanceAccountInfo struct { - // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-id) associated with the balance account. AccountHolderId string `json:"accountHolderId"` // The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. This is the currency displayed on the Balance Account overview page in your Customer Area. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. DefaultCurrencyCode *string `json:"defaultCurrencyCode,omitempty"` diff --git a/src/balanceplatform/model_balance_account_update_request.go b/src/balanceplatform/model_balance_account_update_request.go index fbc797b78..259e81e71 100644 --- a/src/balanceplatform/model_balance_account_update_request.go +++ b/src/balanceplatform/model_balance_account_update_request.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalanceAccountUpdateRequest{} // BalanceAccountUpdateRequest struct for BalanceAccountUpdateRequest type BalanceAccountUpdateRequest struct { - // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-id) associated with the balance account. AccountHolderId *string `json:"accountHolderId,omitempty"` // A human-readable description of the balance account. You can use this parameter to distinguish between multiple balance accounts under an account holder. Description *string `json:"description,omitempty"` diff --git a/src/balanceplatform/model_balance_webhook_setting.go b/src/balanceplatform/model_balance_webhook_setting.go new file mode 100644 index 000000000..e9b69ca0e --- /dev/null +++ b/src/balanceplatform/model_balance_webhook_setting.go @@ -0,0 +1,130 @@ +/* +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/v21/src/common" +) + +// checks if the BalanceWebhookSetting type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceWebhookSetting{} + +// BalanceWebhookSetting struct for BalanceWebhookSetting +type BalanceWebhookSetting struct { + // The list of settings and criteria for triggering the [balance webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + Conditions []Condition `json:"conditions,omitempty"` +} + +// NewBalanceWebhookSetting instantiates a new BalanceWebhookSetting 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 NewBalanceWebhookSetting(currency string, id string, status string, target Target, type_ SettingType) *BalanceWebhookSetting { + this := BalanceWebhookSetting{} + this.Currency = currency + this.Id = id + this.Status = status + this.Target = target + this.Type = type_ + return &this +} + +// NewBalanceWebhookSettingWithDefaults instantiates a new BalanceWebhookSetting 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 NewBalanceWebhookSettingWithDefaults() *BalanceWebhookSetting { + this := BalanceWebhookSetting{} + return &this +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *BalanceWebhookSetting) GetConditions() []Condition { + if o == nil || common.IsNil(o.Conditions) { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSetting) GetConditionsOk() ([]Condition, bool) { + if o == nil || common.IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *BalanceWebhookSetting) HasConditions() bool { + if o != nil && !common.IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *BalanceWebhookSetting) SetConditions(v []Condition) { + o.Conditions = v +} + +func (o BalanceWebhookSetting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceWebhookSetting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + return toSerialize, nil +} + +type NullableBalanceWebhookSetting struct { + value *BalanceWebhookSetting + isSet bool +} + +func (v NullableBalanceWebhookSetting) Get() *BalanceWebhookSetting { + return v.value +} + +func (v *NullableBalanceWebhookSetting) Set(val *BalanceWebhookSetting) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceWebhookSetting) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceWebhookSetting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceWebhookSetting(val *BalanceWebhookSetting) *NullableBalanceWebhookSetting { + return &NullableBalanceWebhookSetting{value: val, isSet: true} +} + +func (v NullableBalanceWebhookSetting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceWebhookSetting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_balance_webhook_setting_all_of.go b/src/balanceplatform/model_balance_webhook_setting_all_of.go new file mode 100644 index 000000000..724496b12 --- /dev/null +++ b/src/balanceplatform/model_balance_webhook_setting_all_of.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the BalanceWebhookSettingAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceWebhookSettingAllOf{} + +// BalanceWebhookSettingAllOf struct for BalanceWebhookSettingAllOf +type BalanceWebhookSettingAllOf struct { + // The list of settings and criteria for triggering the [balance webhook](https://docs.adyen.com/api-explorer/balance-webhooks/latest/post/balanceAccount.balance.updated). + Conditions []Condition `json:"conditions,omitempty"` +} + +// NewBalanceWebhookSettingAllOf instantiates a new BalanceWebhookSettingAllOf 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 NewBalanceWebhookSettingAllOf() *BalanceWebhookSettingAllOf { + this := BalanceWebhookSettingAllOf{} + return &this +} + +// NewBalanceWebhookSettingAllOfWithDefaults instantiates a new BalanceWebhookSettingAllOf 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 NewBalanceWebhookSettingAllOfWithDefaults() *BalanceWebhookSettingAllOf { + this := BalanceWebhookSettingAllOf{} + return &this +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *BalanceWebhookSettingAllOf) GetConditions() []Condition { + if o == nil || common.IsNil(o.Conditions) { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingAllOf) GetConditionsOk() ([]Condition, bool) { + if o == nil || common.IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *BalanceWebhookSettingAllOf) HasConditions() bool { + if o != nil && !common.IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *BalanceWebhookSettingAllOf) SetConditions(v []Condition) { + o.Conditions = v +} + +func (o BalanceWebhookSettingAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceWebhookSettingAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + return toSerialize, nil +} + +type NullableBalanceWebhookSettingAllOf struct { + value *BalanceWebhookSettingAllOf + isSet bool +} + +func (v NullableBalanceWebhookSettingAllOf) Get() *BalanceWebhookSettingAllOf { + return v.value +} + +func (v *NullableBalanceWebhookSettingAllOf) Set(val *BalanceWebhookSettingAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceWebhookSettingAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceWebhookSettingAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceWebhookSettingAllOf(val *BalanceWebhookSettingAllOf) *NullableBalanceWebhookSettingAllOf { + return &NullableBalanceWebhookSettingAllOf{value: val, isSet: true} +} + +func (v NullableBalanceWebhookSettingAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceWebhookSettingAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_balance_webhook_setting_info.go b/src/balanceplatform/model_balance_webhook_setting_info.go new file mode 100644 index 000000000..000ca1e46 --- /dev/null +++ b/src/balanceplatform/model_balance_webhook_setting_info.go @@ -0,0 +1,255 @@ +/* +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/v21/src/common" +) + +// checks if the BalanceWebhookSettingInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceWebhookSettingInfo{} + +// BalanceWebhookSettingInfo struct for BalanceWebhookSettingInfo +type BalanceWebhookSettingInfo struct { + // The array of conditions a balance change must meet for Adyen to send the webhook. + Conditions []Condition `json:"conditions,omitempty"` + // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. + Currency string `json:"currency"` + // The status of the webhook setting. Possible values: * **active**: You receive a balance webhook if any of the conditions in this setting are met. * **inactive**: You do not receive a balance webhook even if the conditions in this settings are met. + Status string `json:"status"` + Target Target `json:"target"` + // The type of the webhook you are configuring. Set to **balance**. + Type string `json:"type"` +} + +// NewBalanceWebhookSettingInfo instantiates a new BalanceWebhookSettingInfo 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 NewBalanceWebhookSettingInfo(currency string, status string, target Target, type_ string) *BalanceWebhookSettingInfo { + this := BalanceWebhookSettingInfo{} + this.Currency = currency + this.Status = status + this.Target = target + this.Type = type_ + return &this +} + +// NewBalanceWebhookSettingInfoWithDefaults instantiates a new BalanceWebhookSettingInfo 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 NewBalanceWebhookSettingInfoWithDefaults() *BalanceWebhookSettingInfo { + this := BalanceWebhookSettingInfo{} + return &this +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfo) GetConditions() []Condition { + if o == nil || common.IsNil(o.Conditions) { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfo) GetConditionsOk() ([]Condition, bool) { + if o == nil || common.IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *BalanceWebhookSettingInfo) HasConditions() bool { + if o != nil && !common.IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *BalanceWebhookSettingInfo) SetConditions(v []Condition) { + o.Conditions = v +} + +// GetCurrency returns the Currency field value +func (o *BalanceWebhookSettingInfo) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfo) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *BalanceWebhookSettingInfo) SetCurrency(v string) { + o.Currency = v +} + +// GetStatus returns the Status field value +func (o *BalanceWebhookSettingInfo) 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 *BalanceWebhookSettingInfo) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *BalanceWebhookSettingInfo) SetStatus(v string) { + o.Status = v +} + +// GetTarget returns the Target field value +func (o *BalanceWebhookSettingInfo) GetTarget() Target { + if o == nil { + var ret Target + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfo) GetTargetOk() (*Target, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *BalanceWebhookSettingInfo) SetTarget(v Target) { + o.Target = v +} + +// GetType returns the Type field value +func (o *BalanceWebhookSettingInfo) 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 *BalanceWebhookSettingInfo) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BalanceWebhookSettingInfo) SetType(v string) { + o.Type = v +} + +func (o BalanceWebhookSettingInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceWebhookSettingInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + toSerialize["currency"] = o.Currency + toSerialize["status"] = o.Status + toSerialize["target"] = o.Target + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableBalanceWebhookSettingInfo struct { + value *BalanceWebhookSettingInfo + isSet bool +} + +func (v NullableBalanceWebhookSettingInfo) Get() *BalanceWebhookSettingInfo { + return v.value +} + +func (v *NullableBalanceWebhookSettingInfo) Set(val *BalanceWebhookSettingInfo) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceWebhookSettingInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceWebhookSettingInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceWebhookSettingInfo(val *BalanceWebhookSettingInfo) *NullableBalanceWebhookSettingInfo { + return &NullableBalanceWebhookSettingInfo{value: val, isSet: true} +} + +func (v NullableBalanceWebhookSettingInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceWebhookSettingInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *BalanceWebhookSettingInfo) isValidStatus() bool { + var allowedEnumValues = []string{"active", "inactive"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} +func (o *BalanceWebhookSettingInfo) isValidType() bool { + var allowedEnumValues = []string{"balance"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_balance_webhook_setting_info_update.go b/src/balanceplatform/model_balance_webhook_setting_info_update.go new file mode 100644 index 000000000..6f849564d --- /dev/null +++ b/src/balanceplatform/model_balance_webhook_setting_info_update.go @@ -0,0 +1,291 @@ +/* +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/v21/src/common" +) + +// checks if the BalanceWebhookSettingInfoUpdate type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceWebhookSettingInfoUpdate{} + +// BalanceWebhookSettingInfoUpdate struct for BalanceWebhookSettingInfoUpdate +type BalanceWebhookSettingInfoUpdate struct { + // The array of conditions a balance change must meet for Adyen to send the webhook. + Conditions []Condition `json:"conditions,omitempty"` + // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. + Currency *string `json:"currency,omitempty"` + // The status of the webhook setting. Possible values: * **active**: You receive a balance webhook if any of the conditions in this setting are met. * **inactive**: You do not receive a balance webhook even if the conditions in this settings are met. + Status *string `json:"status,omitempty"` + Target *TargetUpdate `json:"target,omitempty"` + // The type of the webhook you are configuring. Set to **balance**. + Type *string `json:"type,omitempty"` +} + +// NewBalanceWebhookSettingInfoUpdate instantiates a new BalanceWebhookSettingInfoUpdate 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 NewBalanceWebhookSettingInfoUpdate() *BalanceWebhookSettingInfoUpdate { + this := BalanceWebhookSettingInfoUpdate{} + return &this +} + +// NewBalanceWebhookSettingInfoUpdateWithDefaults instantiates a new BalanceWebhookSettingInfoUpdate 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 NewBalanceWebhookSettingInfoUpdateWithDefaults() *BalanceWebhookSettingInfoUpdate { + this := BalanceWebhookSettingInfoUpdate{} + return &this +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfoUpdate) GetConditions() []Condition { + if o == nil || common.IsNil(o.Conditions) { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfoUpdate) GetConditionsOk() ([]Condition, bool) { + if o == nil || common.IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *BalanceWebhookSettingInfoUpdate) HasConditions() bool { + if o != nil && !common.IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *BalanceWebhookSettingInfoUpdate) SetConditions(v []Condition) { + o.Conditions = v +} + +// GetCurrency returns the Currency field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfoUpdate) GetCurrency() string { + if o == nil || common.IsNil(o.Currency) { + var ret string + return ret + } + return *o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfoUpdate) GetCurrencyOk() (*string, bool) { + if o == nil || common.IsNil(o.Currency) { + return nil, false + } + return o.Currency, true +} + +// HasCurrency returns a boolean if a field has been set. +func (o *BalanceWebhookSettingInfoUpdate) HasCurrency() bool { + if o != nil && !common.IsNil(o.Currency) { + return true + } + + return false +} + +// SetCurrency gets a reference to the given string and assigns it to the Currency field. +func (o *BalanceWebhookSettingInfoUpdate) SetCurrency(v string) { + o.Currency = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) SetStatus(v string) { + o.Status = &v +} + +// GetTarget returns the Target field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfoUpdate) GetTarget() TargetUpdate { + if o == nil || common.IsNil(o.Target) { + var ret TargetUpdate + return ret + } + return *o.Target +} + +// GetTargetOk returns a tuple with the Target field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BalanceWebhookSettingInfoUpdate) GetTargetOk() (*TargetUpdate, bool) { + if o == nil || common.IsNil(o.Target) { + return nil, false + } + return o.Target, true +} + +// HasTarget returns a boolean if a field has been set. +func (o *BalanceWebhookSettingInfoUpdate) HasTarget() bool { + if o != nil && !common.IsNil(o.Target) { + return true + } + + return false +} + +// SetTarget gets a reference to the given TargetUpdate and assigns it to the Target field. +func (o *BalanceWebhookSettingInfoUpdate) SetTarget(v TargetUpdate) { + o.Target = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) 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 *BalanceWebhookSettingInfoUpdate) SetType(v string) { + o.Type = &v +} + +func (o BalanceWebhookSettingInfoUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceWebhookSettingInfoUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + if !common.IsNil(o.Currency) { + toSerialize["currency"] = o.Currency + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.Target) { + toSerialize["target"] = o.Target + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableBalanceWebhookSettingInfoUpdate struct { + value *BalanceWebhookSettingInfoUpdate + isSet bool +} + +func (v NullableBalanceWebhookSettingInfoUpdate) Get() *BalanceWebhookSettingInfoUpdate { + return v.value +} + +func (v *NullableBalanceWebhookSettingInfoUpdate) Set(val *BalanceWebhookSettingInfoUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceWebhookSettingInfoUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceWebhookSettingInfoUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceWebhookSettingInfoUpdate(val *BalanceWebhookSettingInfoUpdate) *NullableBalanceWebhookSettingInfoUpdate { + return &NullableBalanceWebhookSettingInfoUpdate{value: val, isSet: true} +} + +func (v NullableBalanceWebhookSettingInfoUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceWebhookSettingInfoUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *BalanceWebhookSettingInfoUpdate) isValidStatus() bool { + var allowedEnumValues = []string{"active", "inactive"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} +func (o *BalanceWebhookSettingInfoUpdate) isValidType() bool { + var allowedEnumValues = []string{"balance"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_begin_sca_device_registration_request.go b/src/balanceplatform/model_begin_sca_device_registration_request.go new file mode 100644 index 000000000..159a47554 --- /dev/null +++ b/src/balanceplatform/model_begin_sca_device_registration_request.go @@ -0,0 +1,144 @@ +/* +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/v21/src/common" +) + +// checks if the BeginScaDeviceRegistrationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BeginScaDeviceRegistrationRequest{} + +// BeginScaDeviceRegistrationRequest struct for BeginScaDeviceRegistrationRequest +type BeginScaDeviceRegistrationRequest struct { + // The name of the SCA device that you are registering. You can use it to help your users identify the device. + Name string `json:"name"` + // A base64-encoded block with the data required to register the SCA device. You obtain this information by using Adyen's authentication SDK. + SdkOutput string `json:"sdkOutput"` +} + +// NewBeginScaDeviceRegistrationRequest instantiates a new BeginScaDeviceRegistrationRequest 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 NewBeginScaDeviceRegistrationRequest(name string, sdkOutput string) *BeginScaDeviceRegistrationRequest { + this := BeginScaDeviceRegistrationRequest{} + this.Name = name + this.SdkOutput = sdkOutput + return &this +} + +// NewBeginScaDeviceRegistrationRequestWithDefaults instantiates a new BeginScaDeviceRegistrationRequest 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 NewBeginScaDeviceRegistrationRequestWithDefaults() *BeginScaDeviceRegistrationRequest { + this := BeginScaDeviceRegistrationRequest{} + return &this +} + +// GetName returns the Name field value +func (o *BeginScaDeviceRegistrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *BeginScaDeviceRegistrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BeginScaDeviceRegistrationRequest) SetName(v string) { + o.Name = v +} + +// GetSdkOutput returns the SdkOutput field value +func (o *BeginScaDeviceRegistrationRequest) GetSdkOutput() string { + if o == nil { + var ret string + return ret + } + + return o.SdkOutput +} + +// GetSdkOutputOk returns a tuple with the SdkOutput field value +// and a boolean to check if the value has been set. +func (o *BeginScaDeviceRegistrationRequest) GetSdkOutputOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SdkOutput, true +} + +// SetSdkOutput sets field value +func (o *BeginScaDeviceRegistrationRequest) SetSdkOutput(v string) { + o.SdkOutput = v +} + +func (o BeginScaDeviceRegistrationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BeginScaDeviceRegistrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["sdkOutput"] = o.SdkOutput + return toSerialize, nil +} + +type NullableBeginScaDeviceRegistrationRequest struct { + value *BeginScaDeviceRegistrationRequest + isSet bool +} + +func (v NullableBeginScaDeviceRegistrationRequest) Get() *BeginScaDeviceRegistrationRequest { + return v.value +} + +func (v *NullableBeginScaDeviceRegistrationRequest) Set(val *BeginScaDeviceRegistrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBeginScaDeviceRegistrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBeginScaDeviceRegistrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBeginScaDeviceRegistrationRequest(val *BeginScaDeviceRegistrationRequest) *NullableBeginScaDeviceRegistrationRequest { + return &NullableBeginScaDeviceRegistrationRequest{value: val, isSet: true} +} + +func (v NullableBeginScaDeviceRegistrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBeginScaDeviceRegistrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_begin_sca_device_registration_response.go b/src/balanceplatform/model_begin_sca_device_registration_response.go new file mode 100644 index 000000000..44b567451 --- /dev/null +++ b/src/balanceplatform/model_begin_sca_device_registration_response.go @@ -0,0 +1,161 @@ +/* +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/v21/src/common" +) + +// checks if the BeginScaDeviceRegistrationResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BeginScaDeviceRegistrationResponse{} + +// BeginScaDeviceRegistrationResponse struct for BeginScaDeviceRegistrationResponse +type BeginScaDeviceRegistrationResponse struct { + ScaDevice *ScaDevice `json:"scaDevice,omitempty"` + // A string that you must pass to the authentication SDK to continue with the registration process. + SdkInput *string `json:"sdkInput,omitempty"` +} + +// NewBeginScaDeviceRegistrationResponse instantiates a new BeginScaDeviceRegistrationResponse 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 NewBeginScaDeviceRegistrationResponse() *BeginScaDeviceRegistrationResponse { + this := BeginScaDeviceRegistrationResponse{} + return &this +} + +// NewBeginScaDeviceRegistrationResponseWithDefaults instantiates a new BeginScaDeviceRegistrationResponse 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 NewBeginScaDeviceRegistrationResponseWithDefaults() *BeginScaDeviceRegistrationResponse { + this := BeginScaDeviceRegistrationResponse{} + return &this +} + +// GetScaDevice returns the ScaDevice field value if set, zero value otherwise. +func (o *BeginScaDeviceRegistrationResponse) GetScaDevice() ScaDevice { + if o == nil || common.IsNil(o.ScaDevice) { + var ret ScaDevice + return ret + } + return *o.ScaDevice +} + +// GetScaDeviceOk returns a tuple with the ScaDevice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BeginScaDeviceRegistrationResponse) GetScaDeviceOk() (*ScaDevice, bool) { + if o == nil || common.IsNil(o.ScaDevice) { + return nil, false + } + return o.ScaDevice, true +} + +// HasScaDevice returns a boolean if a field has been set. +func (o *BeginScaDeviceRegistrationResponse) HasScaDevice() bool { + if o != nil && !common.IsNil(o.ScaDevice) { + return true + } + + return false +} + +// SetScaDevice gets a reference to the given ScaDevice and assigns it to the ScaDevice field. +func (o *BeginScaDeviceRegistrationResponse) SetScaDevice(v ScaDevice) { + o.ScaDevice = &v +} + +// GetSdkInput returns the SdkInput field value if set, zero value otherwise. +func (o *BeginScaDeviceRegistrationResponse) GetSdkInput() string { + if o == nil || common.IsNil(o.SdkInput) { + var ret string + return ret + } + return *o.SdkInput +} + +// GetSdkInputOk returns a tuple with the SdkInput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BeginScaDeviceRegistrationResponse) GetSdkInputOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkInput) { + return nil, false + } + return o.SdkInput, true +} + +// HasSdkInput returns a boolean if a field has been set. +func (o *BeginScaDeviceRegistrationResponse) HasSdkInput() bool { + if o != nil && !common.IsNil(o.SdkInput) { + return true + } + + return false +} + +// SetSdkInput gets a reference to the given string and assigns it to the SdkInput field. +func (o *BeginScaDeviceRegistrationResponse) SetSdkInput(v string) { + o.SdkInput = &v +} + +func (o BeginScaDeviceRegistrationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BeginScaDeviceRegistrationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ScaDevice) { + toSerialize["scaDevice"] = o.ScaDevice + } + if !common.IsNil(o.SdkInput) { + toSerialize["sdkInput"] = o.SdkInput + } + return toSerialize, nil +} + +type NullableBeginScaDeviceRegistrationResponse struct { + value *BeginScaDeviceRegistrationResponse + isSet bool +} + +func (v NullableBeginScaDeviceRegistrationResponse) Get() *BeginScaDeviceRegistrationResponse { + return v.value +} + +func (v *NullableBeginScaDeviceRegistrationResponse) Set(val *BeginScaDeviceRegistrationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBeginScaDeviceRegistrationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBeginScaDeviceRegistrationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBeginScaDeviceRegistrationResponse(val *BeginScaDeviceRegistrationResponse) *NullableBeginScaDeviceRegistrationResponse { + return &NullableBeginScaDeviceRegistrationResponse{value: val, isSet: true} +} + +func (v NullableBeginScaDeviceRegistrationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBeginScaDeviceRegistrationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_bulk_address.go b/src/balanceplatform/model_bulk_address.go index c2dd5c07a..b7b821a0e 100644 --- a/src/balanceplatform/model_bulk_address.go +++ b/src/balanceplatform/model_bulk_address.go @@ -29,6 +29,12 @@ type BulkAddress struct { Email *string `json:"email,omitempty"` // The house number or name. HouseNumberOrName *string `json:"houseNumberOrName,omitempty"` + // The name of the street and the number of the building. For example: **Simon Carmiggeltstraat 6-50**. + Line1 *string `json:"line1,omitempty"` + // Additional information about the delivery address. For example, an apartment number. + Line2 *string `json:"line2,omitempty"` + // Additional information about the delivery address. + Line3 *string `json:"line3,omitempty"` // The full telephone number. Mobile *string `json:"mobile,omitempty"` // The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. @@ -209,6 +215,102 @@ func (o *BulkAddress) SetHouseNumberOrName(v string) { o.HouseNumberOrName = &v } +// GetLine1 returns the Line1 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine1() string { + if o == nil || common.IsNil(o.Line1) { + var ret string + return ret + } + return *o.Line1 +} + +// GetLine1Ok returns a tuple with the Line1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine1Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line1) { + return nil, false + } + return o.Line1, true +} + +// HasLine1 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine1() bool { + if o != nil && !common.IsNil(o.Line1) { + return true + } + + return false +} + +// SetLine1 gets a reference to the given string and assigns it to the Line1 field. +func (o *BulkAddress) SetLine1(v string) { + o.Line1 = &v +} + +// GetLine2 returns the Line2 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine2() string { + if o == nil || common.IsNil(o.Line2) { + var ret string + return ret + } + return *o.Line2 +} + +// GetLine2Ok returns a tuple with the Line2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine2Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line2) { + return nil, false + } + return o.Line2, true +} + +// HasLine2 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine2() bool { + if o != nil && !common.IsNil(o.Line2) { + return true + } + + return false +} + +// SetLine2 gets a reference to the given string and assigns it to the Line2 field. +func (o *BulkAddress) SetLine2(v string) { + o.Line2 = &v +} + +// GetLine3 returns the Line3 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine3() string { + if o == nil || common.IsNil(o.Line3) { + var ret string + return ret + } + return *o.Line3 +} + +// GetLine3Ok returns a tuple with the Line3 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine3Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line3) { + return nil, false + } + return o.Line3, true +} + +// HasLine3 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine3() bool { + if o != nil && !common.IsNil(o.Line3) { + return true + } + + return false +} + +// SetLine3 gets a reference to the given string and assigns it to the Line3 field. +func (o *BulkAddress) SetLine3(v string) { + o.Line3 = &v +} + // GetMobile returns the Mobile field value if set, zero value otherwise. func (o *BulkAddress) GetMobile() string { if o == nil || common.IsNil(o.Mobile) { @@ -360,6 +462,15 @@ func (o BulkAddress) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.HouseNumberOrName) { toSerialize["houseNumberOrName"] = o.HouseNumberOrName } + if !common.IsNil(o.Line1) { + toSerialize["line1"] = o.Line1 + } + if !common.IsNil(o.Line2) { + toSerialize["line2"] = o.Line2 + } + if !common.IsNil(o.Line3) { + toSerialize["line3"] = o.Line3 + } if !common.IsNil(o.Mobile) { toSerialize["mobile"] = o.Mobile } diff --git a/src/balanceplatform/model_card.go b/src/balanceplatform/model_card.go index 0ed3de58b..8b6c44b0c 100644 --- a/src/balanceplatform/model_card.go +++ b/src/balanceplatform/model_card.go @@ -39,8 +39,10 @@ type Card struct { LastFour *string `json:"lastFour,omitempty"` // The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. Number string `json:"number"` - // Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + // The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration. ThreeDSecure *string `json:"threeDSecure,omitempty"` + // Specifies how many times the card can be used. Possible values: **singleUse**, **multiUse**. > Reach out to your Adyen contact to determine the value relevant for your integration. + Usage *string `json:"usage,omitempty"` } // NewCard instantiates a new Card object @@ -441,6 +443,38 @@ func (o *Card) SetThreeDSecure(v string) { o.ThreeDSecure = &v } +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *Card) GetUsage() string { + if o == nil || common.IsNil(o.Usage) { + var ret string + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Card) GetUsageOk() (*string, bool) { + if o == nil || common.IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *Card) HasUsage() bool { + if o != nil && !common.IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given string and assigns it to the Usage field. +func (o *Card) SetUsage(v string) { + o.Usage = &v +} + func (o Card) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -480,6 +514,9 @@ func (o Card) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ThreeDSecure) { toSerialize["threeDSecure"] = o.ThreeDSecure } + if !common.IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } return toSerialize, nil } diff --git a/src/balanceplatform/model_card_info.go b/src/balanceplatform/model_card_info.go index 2600128ca..40bf5c7fc 100644 --- a/src/balanceplatform/model_card_info.go +++ b/src/balanceplatform/model_card_info.go @@ -30,8 +30,10 @@ type CardInfo struct { DeliveryContact *DeliveryContact `json:"deliveryContact,omitempty"` // The form factor of the card. Possible values: **virtual**, **physical**. FormFactor string `json:"formFactor"` - // Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + // The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration. ThreeDSecure *string `json:"threeDSecure,omitempty"` + // Specifies how many times the card can be used. Possible values: **singleUse**, **multiUse**. > Reach out to your Adyen contact to determine the value relevant for your integration. + Usage *string `json:"usage,omitempty"` } // NewCardInfo instantiates a new CardInfo object @@ -279,6 +281,38 @@ func (o *CardInfo) SetThreeDSecure(v string) { o.ThreeDSecure = &v } +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *CardInfo) GetUsage() string { + if o == nil || common.IsNil(o.Usage) { + var ret string + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardInfo) GetUsageOk() (*string, bool) { + if o == nil || common.IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *CardInfo) HasUsage() bool { + if o != nil && !common.IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given string and assigns it to the Usage field. +func (o *CardInfo) SetUsage(v string) { + o.Usage = &v +} + func (o CardInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -305,6 +339,9 @@ func (o CardInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ThreeDSecure) { toSerialize["threeDSecure"] = o.ThreeDSecure } + if !common.IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } return toSerialize, nil } diff --git a/src/balanceplatform/model_card_order_item.go b/src/balanceplatform/model_card_order_item.go index 22ef77e7b..f3f7a6988 100644 --- a/src/balanceplatform/model_card_order_item.go +++ b/src/balanceplatform/model_card_order_item.go @@ -25,7 +25,7 @@ type CardOrderItem struct { Card *CardOrderItemDeliveryStatus `json:"card,omitempty"` // The unique identifier of the card order item. CardOrderItemId *string `json:"cardOrderItemId,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/balanceplatform/model_condition.go b/src/balanceplatform/model_condition.go new file mode 100644 index 000000000..23f7d7262 --- /dev/null +++ b/src/balanceplatform/model_condition.go @@ -0,0 +1,191 @@ +/* +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/v21/src/common" +) + +// checks if the Condition type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Condition{} + +// Condition struct for Condition +type Condition struct { + // Define the type of balance about which you want to get notified. Possible values: * **available**: the balance available for use. * **balance**: the sum of transactions that have already been settled. * **pending**: the sum of transactions that will be settled in the future. * **reserved**: the balance currently held in reserve. + BalanceType string `json:"balanceType"` + // Define when you want to get notified about a balance change. Possible values: * **greaterThan**: the balance in the account(s) exceeds the specified `value`. * **greaterThanOrEqual**: the balance in the account(s) reaches or exceeds the specified `value`. * **lessThan**: the balance in the account(s) drops below the specified `value`. * **lessThanOrEqual**: the balance in the account(s) reaches to drops below the specified `value`. + ConditionType string `json:"conditionType"` + // The value limit in the specified balance type and currency, in minor units. + Value int64 `json:"value"` +} + +// NewCondition instantiates a new Condition 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 NewCondition(balanceType string, conditionType string, value int64) *Condition { + this := Condition{} + this.BalanceType = balanceType + this.ConditionType = conditionType + this.Value = value + return &this +} + +// NewConditionWithDefaults instantiates a new Condition 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 NewConditionWithDefaults() *Condition { + this := Condition{} + return &this +} + +// GetBalanceType returns the BalanceType field value +func (o *Condition) GetBalanceType() string { + if o == nil { + var ret string + return ret + } + + return o.BalanceType +} + +// GetBalanceTypeOk returns a tuple with the BalanceType field value +// and a boolean to check if the value has been set. +func (o *Condition) GetBalanceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BalanceType, true +} + +// SetBalanceType sets field value +func (o *Condition) SetBalanceType(v string) { + o.BalanceType = v +} + +// GetConditionType returns the ConditionType field value +func (o *Condition) GetConditionType() string { + if o == nil { + var ret string + return ret + } + + return o.ConditionType +} + +// GetConditionTypeOk returns a tuple with the ConditionType field value +// and a boolean to check if the value has been set. +func (o *Condition) GetConditionTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ConditionType, true +} + +// SetConditionType sets field value +func (o *Condition) SetConditionType(v string) { + o.ConditionType = v +} + +// GetValue returns the Value field value +func (o *Condition) GetValue() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *Condition) GetValueOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *Condition) SetValue(v int64) { + o.Value = v +} + +func (o Condition) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Condition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["balanceType"] = o.BalanceType + toSerialize["conditionType"] = o.ConditionType + toSerialize["value"] = o.Value + return toSerialize, nil +} + +type NullableCondition struct { + value *Condition + isSet bool +} + +func (v NullableCondition) Get() *Condition { + return v.value +} + +func (v *NullableCondition) Set(val *Condition) { + v.value = val + v.isSet = true +} + +func (v NullableCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCondition(val *Condition) *NullableCondition { + return &NullableCondition{value: val, isSet: true} +} + +func (v NullableCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *Condition) isValidBalanceType() bool { + var allowedEnumValues = []string{"balance", "available", "pending", "reserved"} + for _, allowed := range allowedEnumValues { + if o.GetBalanceType() == allowed { + return true + } + } + return false +} +func (o *Condition) isValidConditionType() bool { + var allowedEnumValues = []string{"greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"} + for _, allowed := range allowedEnumValues { + if o.GetConditionType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_create_sca_information.go b/src/balanceplatform/model_create_sca_information.go new file mode 100644 index 000000000..d360e5d7b --- /dev/null +++ b/src/balanceplatform/model_create_sca_information.go @@ -0,0 +1,161 @@ +/* +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/v21/src/common" +) + +// checks if the CreateScaInformation type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CreateScaInformation{} + +// CreateScaInformation struct for CreateScaInformation +type CreateScaInformation struct { + Exemption *ScaExemption `json:"exemption,omitempty"` + // Indicates whether to initiate Strong Customer Authentication (SCA) later, during approval, or immediately after you submit this request. Possible values: * **true**: you can initiate SCA later, during approval, for all pending transfer limits. * **false** (default): you initiate SCA immediately after submitting the transfer limit request. + ScaOnApproval *bool `json:"scaOnApproval,omitempty"` +} + +// NewCreateScaInformation instantiates a new CreateScaInformation 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 NewCreateScaInformation() *CreateScaInformation { + this := CreateScaInformation{} + return &this +} + +// NewCreateScaInformationWithDefaults instantiates a new CreateScaInformation 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 NewCreateScaInformationWithDefaults() *CreateScaInformation { + this := CreateScaInformation{} + return &this +} + +// GetExemption returns the Exemption field value if set, zero value otherwise. +func (o *CreateScaInformation) GetExemption() ScaExemption { + if o == nil || common.IsNil(o.Exemption) { + var ret ScaExemption + return ret + } + return *o.Exemption +} + +// GetExemptionOk returns a tuple with the Exemption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScaInformation) GetExemptionOk() (*ScaExemption, bool) { + if o == nil || common.IsNil(o.Exemption) { + return nil, false + } + return o.Exemption, true +} + +// HasExemption returns a boolean if a field has been set. +func (o *CreateScaInformation) HasExemption() bool { + if o != nil && !common.IsNil(o.Exemption) { + return true + } + + return false +} + +// SetExemption gets a reference to the given ScaExemption and assigns it to the Exemption field. +func (o *CreateScaInformation) SetExemption(v ScaExemption) { + o.Exemption = &v +} + +// GetScaOnApproval returns the ScaOnApproval field value if set, zero value otherwise. +func (o *CreateScaInformation) GetScaOnApproval() bool { + if o == nil || common.IsNil(o.ScaOnApproval) { + var ret bool + return ret + } + return *o.ScaOnApproval +} + +// GetScaOnApprovalOk returns a tuple with the ScaOnApproval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateScaInformation) GetScaOnApprovalOk() (*bool, bool) { + if o == nil || common.IsNil(o.ScaOnApproval) { + return nil, false + } + return o.ScaOnApproval, true +} + +// HasScaOnApproval returns a boolean if a field has been set. +func (o *CreateScaInformation) HasScaOnApproval() bool { + if o != nil && !common.IsNil(o.ScaOnApproval) { + return true + } + + return false +} + +// SetScaOnApproval gets a reference to the given bool and assigns it to the ScaOnApproval field. +func (o *CreateScaInformation) SetScaOnApproval(v bool) { + o.ScaOnApproval = &v +} + +func (o CreateScaInformation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateScaInformation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Exemption) { + toSerialize["exemption"] = o.Exemption + } + if !common.IsNil(o.ScaOnApproval) { + toSerialize["scaOnApproval"] = o.ScaOnApproval + } + return toSerialize, nil +} + +type NullableCreateScaInformation struct { + value *CreateScaInformation + isSet bool +} + +func (v NullableCreateScaInformation) Get() *CreateScaInformation { + return v.value +} + +func (v *NullableCreateScaInformation) Set(val *CreateScaInformation) { + v.value = val + v.isSet = true +} + +func (v NullableCreateScaInformation) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateScaInformation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateScaInformation(val *CreateScaInformation) *NullableCreateScaInformation { + return &NullableCreateScaInformation{value: val, isSet: true} +} + +func (v NullableCreateScaInformation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateScaInformation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_create_sweep_configuration_v2.go b/src/balanceplatform/model_create_sweep_configuration_v2.go index 6d5f0af33..75cd8c8a7 100644 --- a/src/balanceplatform/model_create_sweep_configuration_v2.go +++ b/src/balanceplatform/model_create_sweep_configuration_v2.go @@ -26,7 +26,7 @@ type CreateSweepConfigurationV2 struct { Currency string `json:"currency"` // The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. Description *string `json:"description,omitempty"` - // 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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). + // 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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 within the United States and in [SEPA locations](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"` @@ -624,7 +624,7 @@ func (o *CreateSweepConfigurationV2) isValidCategory() bool { return false } func (o *CreateSweepConfigurationV2) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/balanceplatform/model_create_transfer_limit_request.go b/src/balanceplatform/model_create_transfer_limit_request.go new file mode 100644 index 000000000..e7561cb7f --- /dev/null +++ b/src/balanceplatform/model_create_transfer_limit_request.go @@ -0,0 +1,317 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the CreateTransferLimitRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CreateTransferLimitRequest{} + +// CreateTransferLimitRequest struct for CreateTransferLimitRequest +type CreateTransferLimitRequest struct { + Amount Amount `json:"amount"` + // The date and time when the transfer limit becomes inactive. If you do not specify an end date, the limit stays active until you override it with a new limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD** + EndsAt *time.Time `json:"endsAt,omitempty"` + // Your reference for the transfer limit. + Reference *string `json:"reference,omitempty"` + ScaInformation *CreateScaInformation `json:"scaInformation,omitempty"` + Scope Scope `json:"scope"` + // The date and time when the transfer limit becomes active. If you specify a date in the future, we will schedule a transfer limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD** + StartsAt *time.Time `json:"startsAt,omitempty"` + TransferType TransferType `json:"transferType"` +} + +// NewCreateTransferLimitRequest instantiates a new CreateTransferLimitRequest 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 NewCreateTransferLimitRequest(amount Amount, scope Scope, transferType TransferType) *CreateTransferLimitRequest { + this := CreateTransferLimitRequest{} + this.Amount = amount + this.Scope = scope + this.TransferType = transferType + return &this +} + +// NewCreateTransferLimitRequestWithDefaults instantiates a new CreateTransferLimitRequest 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 NewCreateTransferLimitRequestWithDefaults() *CreateTransferLimitRequest { + this := CreateTransferLimitRequest{} + return &this +} + +// GetAmount returns the Amount field value +func (o *CreateTransferLimitRequest) 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 *CreateTransferLimitRequest) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *CreateTransferLimitRequest) SetAmount(v Amount) { + o.Amount = v +} + +// GetEndsAt returns the EndsAt field value if set, zero value otherwise. +func (o *CreateTransferLimitRequest) GetEndsAt() time.Time { + if o == nil || common.IsNil(o.EndsAt) { + var ret time.Time + return ret + } + return *o.EndsAt +} + +// GetEndsAtOk returns a tuple with the EndsAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTransferLimitRequest) GetEndsAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.EndsAt) { + return nil, false + } + return o.EndsAt, true +} + +// HasEndsAt returns a boolean if a field has been set. +func (o *CreateTransferLimitRequest) HasEndsAt() bool { + if o != nil && !common.IsNil(o.EndsAt) { + return true + } + + return false +} + +// SetEndsAt gets a reference to the given time.Time and assigns it to the EndsAt field. +func (o *CreateTransferLimitRequest) SetEndsAt(v time.Time) { + o.EndsAt = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *CreateTransferLimitRequest) 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 *CreateTransferLimitRequest) 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 *CreateTransferLimitRequest) 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 *CreateTransferLimitRequest) SetReference(v string) { + o.Reference = &v +} + +// GetScaInformation returns the ScaInformation field value if set, zero value otherwise. +func (o *CreateTransferLimitRequest) GetScaInformation() CreateScaInformation { + if o == nil || common.IsNil(o.ScaInformation) { + var ret CreateScaInformation + return ret + } + return *o.ScaInformation +} + +// GetScaInformationOk returns a tuple with the ScaInformation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTransferLimitRequest) GetScaInformationOk() (*CreateScaInformation, bool) { + if o == nil || common.IsNil(o.ScaInformation) { + return nil, false + } + return o.ScaInformation, true +} + +// HasScaInformation returns a boolean if a field has been set. +func (o *CreateTransferLimitRequest) HasScaInformation() bool { + if o != nil && !common.IsNil(o.ScaInformation) { + return true + } + + return false +} + +// SetScaInformation gets a reference to the given CreateScaInformation and assigns it to the ScaInformation field. +func (o *CreateTransferLimitRequest) SetScaInformation(v CreateScaInformation) { + o.ScaInformation = &v +} + +// GetScope returns the Scope field value +func (o *CreateTransferLimitRequest) GetScope() Scope { + if o == nil { + var ret Scope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *CreateTransferLimitRequest) GetScopeOk() (*Scope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *CreateTransferLimitRequest) SetScope(v Scope) { + o.Scope = v +} + +// GetStartsAt returns the StartsAt field value if set, zero value otherwise. +func (o *CreateTransferLimitRequest) GetStartsAt() time.Time { + if o == nil || common.IsNil(o.StartsAt) { + var ret time.Time + return ret + } + return *o.StartsAt +} + +// GetStartsAtOk returns a tuple with the StartsAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateTransferLimitRequest) GetStartsAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.StartsAt) { + return nil, false + } + return o.StartsAt, true +} + +// HasStartsAt returns a boolean if a field has been set. +func (o *CreateTransferLimitRequest) HasStartsAt() bool { + if o != nil && !common.IsNil(o.StartsAt) { + return true + } + + return false +} + +// SetStartsAt gets a reference to the given time.Time and assigns it to the StartsAt field. +func (o *CreateTransferLimitRequest) SetStartsAt(v time.Time) { + o.StartsAt = &v +} + +// GetTransferType returns the TransferType field value +func (o *CreateTransferLimitRequest) GetTransferType() TransferType { + if o == nil { + var ret TransferType + return ret + } + + return o.TransferType +} + +// GetTransferTypeOk returns a tuple with the TransferType field value +// and a boolean to check if the value has been set. +func (o *CreateTransferLimitRequest) GetTransferTypeOk() (*TransferType, bool) { + if o == nil { + return nil, false + } + return &o.TransferType, true +} + +// SetTransferType sets field value +func (o *CreateTransferLimitRequest) SetTransferType(v TransferType) { + o.TransferType = v +} + +func (o CreateTransferLimitRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateTransferLimitRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + if !common.IsNil(o.EndsAt) { + toSerialize["endsAt"] = o.EndsAt + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.ScaInformation) { + toSerialize["scaInformation"] = o.ScaInformation + } + toSerialize["scope"] = o.Scope + if !common.IsNil(o.StartsAt) { + toSerialize["startsAt"] = o.StartsAt + } + toSerialize["transferType"] = o.TransferType + return toSerialize, nil +} + +type NullableCreateTransferLimitRequest struct { + value *CreateTransferLimitRequest + isSet bool +} + +func (v NullableCreateTransferLimitRequest) Get() *CreateTransferLimitRequest { + return v.value +} + +func (v *NullableCreateTransferLimitRequest) Set(val *CreateTransferLimitRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateTransferLimitRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateTransferLimitRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateTransferLimitRequest(val *CreateTransferLimitRequest) *NullableCreateTransferLimitRequest { + return &NullableCreateTransferLimitRequest{value: val, isSet: true} +} + +func (v NullableCreateTransferLimitRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateTransferLimitRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_default_error_response_entity.go b/src/balanceplatform/model_default_error_response_entity.go new file mode 100644 index 000000000..08813a43f --- /dev/null +++ b/src/balanceplatform/model_default_error_response_entity.go @@ -0,0 +1,384 @@ +/* +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/v21/src/common" +) + +// checks if the DefaultErrorResponseEntity type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &DefaultErrorResponseEntity{} + +// DefaultErrorResponseEntity Standardized error response following RFC-7807 format +type DefaultErrorResponseEntity struct { + // A human-readable explanation specific to this occurrence of the problem. + Detail *string `json:"detail,omitempty"` + // Unique business error code. + ErrorCode *string `json:"errorCode,omitempty"` + // A URI that identifies the specific occurrence of the problem if applicable. + Instance *string `json:"instance,omitempty"` + // Array of fields with validation errors when applicable. + InvalidFields []InvalidField `json:"invalidFields,omitempty"` + // The unique reference for the request. + RequestId *string `json:"requestId,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` + // A short, human-readable summary of the problem type. + Title *string `json:"title,omitempty"` + // A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + Type *string `json:"type,omitempty"` +} + +// NewDefaultErrorResponseEntity instantiates a new DefaultErrorResponseEntity object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultErrorResponseEntity() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// NewDefaultErrorResponseEntityWithDefaults instantiates a new DefaultErrorResponseEntity object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultErrorResponseEntityWithDefaults() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetDetail() string { + if o == nil || common.IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetDetailOk() (*string, bool) { + if o == nil || common.IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasDetail() bool { + if o != nil && !common.IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *DefaultErrorResponseEntity) SetDetail(v string) { + o.Detail = &v +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetErrorCode() string { + if o == nil || common.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetErrorCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasErrorCode() bool { + if o != nil && !common.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *DefaultErrorResponseEntity) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetInstance returns the Instance field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInstance() string { + if o == nil || common.IsNil(o.Instance) { + var ret string + return ret + } + return *o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInstanceOk() (*string, bool) { + if o == nil || common.IsNil(o.Instance) { + return nil, false + } + return o.Instance, true +} + +// HasInstance returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInstance() bool { + if o != nil && !common.IsNil(o.Instance) { + return true + } + + return false +} + +// SetInstance gets a reference to the given string and assigns it to the Instance field. +func (o *DefaultErrorResponseEntity) SetInstance(v string) { + o.Instance = &v +} + +// GetInvalidFields returns the InvalidFields field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInvalidFields() []InvalidField { + if o == nil || common.IsNil(o.InvalidFields) { + var ret []InvalidField + return ret + } + return o.InvalidFields +} + +// GetInvalidFieldsOk returns a tuple with the InvalidFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInvalidFieldsOk() ([]InvalidField, bool) { + if o == nil || common.IsNil(o.InvalidFields) { + return nil, false + } + return o.InvalidFields, true +} + +// HasInvalidFields returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInvalidFields() bool { + if o != nil && !common.IsNil(o.InvalidFields) { + return true + } + + return false +} + +// SetInvalidFields gets a reference to the given []InvalidField and assigns it to the InvalidFields field. +func (o *DefaultErrorResponseEntity) SetInvalidFields(v []InvalidField) { + o.InvalidFields = v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetRequestId() string { + if o == nil || common.IsNil(o.RequestId) { + var ret string + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetRequestIdOk() (*string, bool) { + if o == nil || common.IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasRequestId() bool { + if o != nil && !common.IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given string and assigns it to the RequestId field. +func (o *DefaultErrorResponseEntity) SetRequestId(v string) { + o.RequestId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetStatus() int32 { + if o == nil || common.IsNil(o.Status) { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetStatusOk() (*int32, bool) { + if o == nil || common.IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasStatus() bool { + if o != nil && !common.IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *DefaultErrorResponseEntity) SetStatus(v int32) { + o.Status = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetTitle() string { + if o == nil || common.IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTitleOk() (*string, bool) { + if o == nil || common.IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasTitle() bool { + if o != nil && !common.IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *DefaultErrorResponseEntity) SetTitle(v string) { + o.Title = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DefaultErrorResponseEntity) SetType(v string) { + o.Type = &v +} + +func (o DefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultErrorResponseEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + if !common.IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } + if !common.IsNil(o.Instance) { + toSerialize["instance"] = o.Instance + } + if !common.IsNil(o.InvalidFields) { + toSerialize["invalidFields"] = o.InvalidFields + } + if !common.IsNil(o.RequestId) { + toSerialize["requestId"] = o.RequestId + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableDefaultErrorResponseEntity struct { + value *DefaultErrorResponseEntity + isSet bool +} + +func (v NullableDefaultErrorResponseEntity) Get() *DefaultErrorResponseEntity { + return v.value +} + +func (v *NullableDefaultErrorResponseEntity) Set(val *DefaultErrorResponseEntity) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultErrorResponseEntity) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultErrorResponseEntity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultErrorResponseEntity(val *DefaultErrorResponseEntity) *NullableDefaultErrorResponseEntity { + return &NullableDefaultErrorResponseEntity{value: val, isSet: true} +} + +func (v NullableDefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultErrorResponseEntity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_delivery_address.go b/src/balanceplatform/model_delivery_address.go index d0b34c16e..c81d4f2d5 100644 --- a/src/balanceplatform/model_delivery_address.go +++ b/src/balanceplatform/model_delivery_address.go @@ -31,7 +31,7 @@ type DeliveryAddress struct { Line3 *string `json:"line3,omitempty"` // The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. PostalCode *string `json:"postalCode,omitempty"` - // The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + // The state or province code, maximum 3 characters. For example, **CA** for California in the US or **ON** for Ontario in Canada. > Required for the US and Canada. StateOrProvince *string `json:"stateOrProvince,omitempty"` } diff --git a/src/balanceplatform/model_finish_sca_device_registration_request.go b/src/balanceplatform/model_finish_sca_device_registration_request.go new file mode 100644 index 000000000..d56d25ad0 --- /dev/null +++ b/src/balanceplatform/model_finish_sca_device_registration_request.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the FinishScaDeviceRegistrationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &FinishScaDeviceRegistrationRequest{} + +// FinishScaDeviceRegistrationRequest struct for FinishScaDeviceRegistrationRequest +type FinishScaDeviceRegistrationRequest struct { + // A base64-encoded block with the data required to register the SCA device. You obtain this information by using Adyen's authentication SDK. + SdkOutput string `json:"sdkOutput"` +} + +// NewFinishScaDeviceRegistrationRequest instantiates a new FinishScaDeviceRegistrationRequest 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 NewFinishScaDeviceRegistrationRequest(sdkOutput string) *FinishScaDeviceRegistrationRequest { + this := FinishScaDeviceRegistrationRequest{} + this.SdkOutput = sdkOutput + return &this +} + +// NewFinishScaDeviceRegistrationRequestWithDefaults instantiates a new FinishScaDeviceRegistrationRequest 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 NewFinishScaDeviceRegistrationRequestWithDefaults() *FinishScaDeviceRegistrationRequest { + this := FinishScaDeviceRegistrationRequest{} + return &this +} + +// GetSdkOutput returns the SdkOutput field value +func (o *FinishScaDeviceRegistrationRequest) GetSdkOutput() string { + if o == nil { + var ret string + return ret + } + + return o.SdkOutput +} + +// GetSdkOutputOk returns a tuple with the SdkOutput field value +// and a boolean to check if the value has been set. +func (o *FinishScaDeviceRegistrationRequest) GetSdkOutputOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SdkOutput, true +} + +// SetSdkOutput sets field value +func (o *FinishScaDeviceRegistrationRequest) SetSdkOutput(v string) { + o.SdkOutput = v +} + +func (o FinishScaDeviceRegistrationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinishScaDeviceRegistrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sdkOutput"] = o.SdkOutput + return toSerialize, nil +} + +type NullableFinishScaDeviceRegistrationRequest struct { + value *FinishScaDeviceRegistrationRequest + isSet bool +} + +func (v NullableFinishScaDeviceRegistrationRequest) Get() *FinishScaDeviceRegistrationRequest { + return v.value +} + +func (v *NullableFinishScaDeviceRegistrationRequest) Set(val *FinishScaDeviceRegistrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFinishScaDeviceRegistrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFinishScaDeviceRegistrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinishScaDeviceRegistrationRequest(val *FinishScaDeviceRegistrationRequest) *NullableFinishScaDeviceRegistrationRequest { + return &NullableFinishScaDeviceRegistrationRequest{value: val, isSet: true} +} + +func (v NullableFinishScaDeviceRegistrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinishScaDeviceRegistrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_finish_sca_device_registration_response.go b/src/balanceplatform/model_finish_sca_device_registration_response.go new file mode 100644 index 000000000..2763dac6b --- /dev/null +++ b/src/balanceplatform/model_finish_sca_device_registration_response.go @@ -0,0 +1,124 @@ +/* +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/v21/src/common" +) + +// checks if the FinishScaDeviceRegistrationResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &FinishScaDeviceRegistrationResponse{} + +// FinishScaDeviceRegistrationResponse struct for FinishScaDeviceRegistrationResponse +type FinishScaDeviceRegistrationResponse struct { + ScaDevice *ScaDevice `json:"scaDevice,omitempty"` +} + +// NewFinishScaDeviceRegistrationResponse instantiates a new FinishScaDeviceRegistrationResponse 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 NewFinishScaDeviceRegistrationResponse() *FinishScaDeviceRegistrationResponse { + this := FinishScaDeviceRegistrationResponse{} + return &this +} + +// NewFinishScaDeviceRegistrationResponseWithDefaults instantiates a new FinishScaDeviceRegistrationResponse 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 NewFinishScaDeviceRegistrationResponseWithDefaults() *FinishScaDeviceRegistrationResponse { + this := FinishScaDeviceRegistrationResponse{} + return &this +} + +// GetScaDevice returns the ScaDevice field value if set, zero value otherwise. +func (o *FinishScaDeviceRegistrationResponse) GetScaDevice() ScaDevice { + if o == nil || common.IsNil(o.ScaDevice) { + var ret ScaDevice + return ret + } + return *o.ScaDevice +} + +// GetScaDeviceOk returns a tuple with the ScaDevice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FinishScaDeviceRegistrationResponse) GetScaDeviceOk() (*ScaDevice, bool) { + if o == nil || common.IsNil(o.ScaDevice) { + return nil, false + } + return o.ScaDevice, true +} + +// HasScaDevice returns a boolean if a field has been set. +func (o *FinishScaDeviceRegistrationResponse) HasScaDevice() bool { + if o != nil && !common.IsNil(o.ScaDevice) { + return true + } + + return false +} + +// SetScaDevice gets a reference to the given ScaDevice and assigns it to the ScaDevice field. +func (o *FinishScaDeviceRegistrationResponse) SetScaDevice(v ScaDevice) { + o.ScaDevice = &v +} + +func (o FinishScaDeviceRegistrationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FinishScaDeviceRegistrationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ScaDevice) { + toSerialize["scaDevice"] = o.ScaDevice + } + return toSerialize, nil +} + +type NullableFinishScaDeviceRegistrationResponse struct { + value *FinishScaDeviceRegistrationResponse + isSet bool +} + +func (v NullableFinishScaDeviceRegistrationResponse) Get() *FinishScaDeviceRegistrationResponse { + return v.value +} + +func (v *NullableFinishScaDeviceRegistrationResponse) Set(val *FinishScaDeviceRegistrationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFinishScaDeviceRegistrationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFinishScaDeviceRegistrationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFinishScaDeviceRegistrationResponse(val *FinishScaDeviceRegistrationResponse) *NullableFinishScaDeviceRegistrationResponse { + return &NullableFinishScaDeviceRegistrationResponse{value: val, isSet: true} +} + +func (v NullableFinishScaDeviceRegistrationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFinishScaDeviceRegistrationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_hk_local_account_identification.go b/src/balanceplatform/model_hk_local_account_identification.go index 5a8dd67f6..db80b2d0c 100644 --- a/src/balanceplatform/model_hk_local_account_identification.go +++ b/src/balanceplatform/model_hk_local_account_identification.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &HKLocalAccountIdentification{} // HKLocalAccountIdentification struct for HKLocalAccountIdentification type HKLocalAccountIdentification struct { - // The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + // The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. AccountNumber string `json:"accountNumber"` // The 3-digit clearing code, without separators or whitespace. ClearingCode string `json:"clearingCode"` diff --git a/src/balanceplatform/model_invalid_field.go b/src/balanceplatform/model_invalid_field.go index 087016ec1..25ccea064 100644 --- a/src/balanceplatform/model_invalid_field.go +++ b/src/balanceplatform/model_invalid_field.go @@ -19,23 +19,23 @@ var _ common.MappedNullable = &InvalidField{} // InvalidField struct for InvalidField type InvalidField struct { - // Description of the validation error. - Message string `json:"message"` // The field that has an invalid value. Name string `json:"name"` // The invalid value. Value string `json:"value"` + // Description of the validation error. + Message string `json:"message"` } // NewInvalidField instantiates a new InvalidField object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInvalidField(message string, name string, value string) *InvalidField { +func NewInvalidField(name string, value string, message string) *InvalidField { this := InvalidField{} - this.Message = message this.Name = name this.Value = value + this.Message = message return &this } @@ -47,30 +47,6 @@ func NewInvalidFieldWithDefaults() *InvalidField { return &this } -// GetMessage returns the Message field value -func (o *InvalidField) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *InvalidField) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *InvalidField) SetMessage(v string) { - o.Message = v -} - // GetName returns the Name field value func (o *InvalidField) GetName() string { if o == nil { @@ -119,6 +95,30 @@ func (o *InvalidField) SetValue(v string) { o.Value = v } +// GetMessage returns the Message field value +func (o *InvalidField) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *InvalidField) SetMessage(v string) { + o.Message = v +} + func (o InvalidField) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -129,9 +129,9 @@ func (o InvalidField) MarshalJSON() ([]byte, error) { func (o InvalidField) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message toSerialize["name"] = o.Name toSerialize["value"] = o.Value + toSerialize["message"] = o.Message return toSerialize, nil } diff --git a/src/balanceplatform/model_limit_status.go b/src/balanceplatform/model_limit_status.go new file mode 100644 index 000000000..26ded435f --- /dev/null +++ b/src/balanceplatform/model_limit_status.go @@ -0,0 +1,112 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// LimitStatus The status of the transfer limit. Possible values: * **active**: the limit is currently active. * **inactive**: the limit is currently inactive. * **pendingSCA**: the limit is pending until your user performs SCA. * **scheduled**: the limit is scheduled to become active at a future date. +type LimitStatus string + +// List of LimitStatus +const ( + ACTIVE LimitStatus = "active" + INACTIVE LimitStatus = "inactive" + PENDING_SCA LimitStatus = "pendingSCA" + SCHEDULED LimitStatus = "scheduled" +) + +// All allowed values of LimitStatus enum +var AllowedLimitStatusEnumValues = []LimitStatus{ + "active", + "inactive", + "pendingSCA", + "scheduled", +} + +func (v *LimitStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := LimitStatus(value) + for _, existing := range AllowedLimitStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid LimitStatus", value) +} + +// NewLimitStatusFromValue returns a pointer to a valid LimitStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewLimitStatusFromValue(v string) (*LimitStatus, error) { + ev := LimitStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for LimitStatus: valid values are %v", v, AllowedLimitStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v LimitStatus) IsValid() bool { + for _, existing := range AllowedLimitStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to LimitStatus value +func (v LimitStatus) Ptr() *LimitStatus { + return &v +} + +type NullableLimitStatus struct { + value *LimitStatus + isSet bool +} + +func (v NullableLimitStatus) Get() *LimitStatus { + return v.value +} + +func (v *NullableLimitStatus) Set(val *LimitStatus) { + v.value = val + v.isSet = true +} + +func (v NullableLimitStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableLimitStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLimitStatus(val *LimitStatus) *NullableLimitStatus { + return &NullableLimitStatus{value: val, isSet: true} +} + +func (v NullableLimitStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLimitStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_list_associations_response.go b/src/balanceplatform/model_list_associations_response.go new file mode 100644 index 000000000..2de6f9f57 --- /dev/null +++ b/src/balanceplatform/model_list_associations_response.go @@ -0,0 +1,199 @@ +/* +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/v21/src/common" +) + +// checks if the ListAssociationsResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ListAssociationsResponse{} + +// ListAssociationsResponse struct for ListAssociationsResponse +type ListAssociationsResponse struct { + Links Link `json:"_links"` + // Contains a list of associations and their corresponding details. + Data []AssociationListing `json:"data"` + // The total number of items available. + ItemsTotal int32 `json:"itemsTotal"` + // The total number of pages available. + PagesTotal int32 `json:"pagesTotal"` +} + +// NewListAssociationsResponse instantiates a new ListAssociationsResponse 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 NewListAssociationsResponse(links Link, data []AssociationListing, itemsTotal int32, pagesTotal int32) *ListAssociationsResponse { + this := ListAssociationsResponse{} + this.Links = links + this.Data = data + this.ItemsTotal = itemsTotal + this.PagesTotal = pagesTotal + return &this +} + +// NewListAssociationsResponseWithDefaults instantiates a new ListAssociationsResponse 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 NewListAssociationsResponseWithDefaults() *ListAssociationsResponse { + this := ListAssociationsResponse{} + return &this +} + +// GetLinks returns the Links field value +func (o *ListAssociationsResponse) GetLinks() Link { + if o == nil { + var ret Link + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *ListAssociationsResponse) GetLinksOk() (*Link, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *ListAssociationsResponse) SetLinks(v Link) { + o.Links = v +} + +// GetData returns the Data field value +func (o *ListAssociationsResponse) GetData() []AssociationListing { + if o == nil { + var ret []AssociationListing + 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 *ListAssociationsResponse) GetDataOk() ([]AssociationListing, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ListAssociationsResponse) SetData(v []AssociationListing) { + o.Data = v +} + +// GetItemsTotal returns the ItemsTotal field value +func (o *ListAssociationsResponse) GetItemsTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ItemsTotal +} + +// GetItemsTotalOk returns a tuple with the ItemsTotal field value +// and a boolean to check if the value has been set. +func (o *ListAssociationsResponse) GetItemsTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ItemsTotal, true +} + +// SetItemsTotal sets field value +func (o *ListAssociationsResponse) SetItemsTotal(v int32) { + o.ItemsTotal = v +} + +// GetPagesTotal returns the PagesTotal field value +func (o *ListAssociationsResponse) GetPagesTotal() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PagesTotal +} + +// GetPagesTotalOk returns a tuple with the PagesTotal field value +// and a boolean to check if the value has been set. +func (o *ListAssociationsResponse) GetPagesTotalOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PagesTotal, true +} + +// SetPagesTotal sets field value +func (o *ListAssociationsResponse) SetPagesTotal(v int32) { + o.PagesTotal = v +} + +func (o ListAssociationsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListAssociationsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["_links"] = o.Links + toSerialize["data"] = o.Data + toSerialize["itemsTotal"] = o.ItemsTotal + toSerialize["pagesTotal"] = o.PagesTotal + return toSerialize, nil +} + +type NullableListAssociationsResponse struct { + value *ListAssociationsResponse + isSet bool +} + +func (v NullableListAssociationsResponse) Get() *ListAssociationsResponse { + return v.value +} + +func (v *NullableListAssociationsResponse) Set(val *ListAssociationsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListAssociationsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListAssociationsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAssociationsResponse(val *ListAssociationsResponse) *NullableListAssociationsResponse { + return &NullableListAssociationsResponse{value: val, isSet: true} +} + +func (v NullableListAssociationsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAssociationsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_network_token.go b/src/balanceplatform/model_network_token.go index 9c296d3d3..6adffa5cf 100644 --- a/src/balanceplatform/model_network_token.go +++ b/src/balanceplatform/model_network_token.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &NetworkToken{} type NetworkToken struct { // The card brand variant of the payment instrument associated with the network token. For example, **mc_prepaid_mrw**. BrandVariant *string `json:"brandVariant,omitempty"` - // Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**.. + // Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2025-03-19T10:15:30+01:00**.. CreationDate *time.Time `json:"creationDate,omitempty"` Device *DeviceInfo `json:"device,omitempty"` // The unique identifier of the network token. @@ -32,7 +32,8 @@ type NetworkToken struct { // The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. Status *string `json:"status,omitempty"` // The last four digits of the network token `id`. - TokenLastFour *string `json:"tokenLastFour,omitempty"` + TokenLastFour *string `json:"tokenLastFour,omitempty"` + TokenRequestor *NetworkTokenRequestor `json:"tokenRequestor,omitempty"` // The type of network token. For example, **wallet**, **cof**. Type *string `json:"type,omitempty"` } @@ -278,6 +279,38 @@ func (o *NetworkToken) SetTokenLastFour(v string) { o.TokenLastFour = &v } +// GetTokenRequestor returns the TokenRequestor field value if set, zero value otherwise. +func (o *NetworkToken) GetTokenRequestor() NetworkTokenRequestor { + if o == nil || common.IsNil(o.TokenRequestor) { + var ret NetworkTokenRequestor + return ret + } + return *o.TokenRequestor +} + +// GetTokenRequestorOk returns a tuple with the TokenRequestor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkToken) GetTokenRequestorOk() (*NetworkTokenRequestor, bool) { + if o == nil || common.IsNil(o.TokenRequestor) { + return nil, false + } + return o.TokenRequestor, true +} + +// HasTokenRequestor returns a boolean if a field has been set. +func (o *NetworkToken) HasTokenRequestor() bool { + if o != nil && !common.IsNil(o.TokenRequestor) { + return true + } + + return false +} + +// SetTokenRequestor gets a reference to the given NetworkTokenRequestor and assigns it to the TokenRequestor field. +func (o *NetworkToken) SetTokenRequestor(v NetworkTokenRequestor) { + o.TokenRequestor = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *NetworkToken) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -341,6 +374,9 @@ func (o NetworkToken) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.TokenLastFour) { toSerialize["tokenLastFour"] = o.TokenLastFour } + if !common.IsNil(o.TokenRequestor) { + toSerialize["tokenRequestor"] = o.TokenRequestor + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/balanceplatform/model_network_token_activation_data_request.go b/src/balanceplatform/model_network_token_activation_data_request.go new file mode 100644 index 000000000..526ec8bce --- /dev/null +++ b/src/balanceplatform/model_network_token_activation_data_request.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the NetworkTokenActivationDataRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenActivationDataRequest{} + +// NetworkTokenActivationDataRequest struct for NetworkTokenActivationDataRequest +type NetworkTokenActivationDataRequest struct { + // A block of data automatically generated by Adyen's SDK for network token provisioning. This `sdkOutput` is required to create provisioning data for the network token. For more information, see the repositories for Adyen's SDKs for network token provisioning: * [Adyen Apple Pay Provisioning SDK](https://github.com/Adyen/adyen-apple-pay-provisioning-ios). * [Adyen Google Wallet Provisioning SDK](https://github.com/Adyen/adyen-issuing-android) + SdkOutput *string `json:"sdkOutput,omitempty"` +} + +// NewNetworkTokenActivationDataRequest instantiates a new NetworkTokenActivationDataRequest 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 NewNetworkTokenActivationDataRequest() *NetworkTokenActivationDataRequest { + this := NetworkTokenActivationDataRequest{} + return &this +} + +// NewNetworkTokenActivationDataRequestWithDefaults instantiates a new NetworkTokenActivationDataRequest 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 NewNetworkTokenActivationDataRequestWithDefaults() *NetworkTokenActivationDataRequest { + this := NetworkTokenActivationDataRequest{} + return &this +} + +// GetSdkOutput returns the SdkOutput field value if set, zero value otherwise. +func (o *NetworkTokenActivationDataRequest) GetSdkOutput() string { + if o == nil || common.IsNil(o.SdkOutput) { + var ret string + return ret + } + return *o.SdkOutput +} + +// GetSdkOutputOk returns a tuple with the SdkOutput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenActivationDataRequest) GetSdkOutputOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkOutput) { + return nil, false + } + return o.SdkOutput, true +} + +// HasSdkOutput returns a boolean if a field has been set. +func (o *NetworkTokenActivationDataRequest) HasSdkOutput() bool { + if o != nil && !common.IsNil(o.SdkOutput) { + return true + } + + return false +} + +// SetSdkOutput gets a reference to the given string and assigns it to the SdkOutput field. +func (o *NetworkTokenActivationDataRequest) SetSdkOutput(v string) { + o.SdkOutput = &v +} + +func (o NetworkTokenActivationDataRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenActivationDataRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SdkOutput) { + toSerialize["sdkOutput"] = o.SdkOutput + } + return toSerialize, nil +} + +type NullableNetworkTokenActivationDataRequest struct { + value *NetworkTokenActivationDataRequest + isSet bool +} + +func (v NullableNetworkTokenActivationDataRequest) Get() *NetworkTokenActivationDataRequest { + return v.value +} + +func (v *NullableNetworkTokenActivationDataRequest) Set(val *NetworkTokenActivationDataRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenActivationDataRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenActivationDataRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenActivationDataRequest(val *NetworkTokenActivationDataRequest) *NullableNetworkTokenActivationDataRequest { + return &NullableNetworkTokenActivationDataRequest{value: val, isSet: true} +} + +func (v NullableNetworkTokenActivationDataRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenActivationDataRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_network_token_activation_data_response.go b/src/balanceplatform/model_network_token_activation_data_response.go new file mode 100644 index 000000000..db9318bb1 --- /dev/null +++ b/src/balanceplatform/model_network_token_activation_data_response.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the NetworkTokenActivationDataResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenActivationDataResponse{} + +// NetworkTokenActivationDataResponse struct for NetworkTokenActivationDataResponse +type NetworkTokenActivationDataResponse struct { + // A block of data that contains the activation data for a network token. This `sdkInput` is required to initialize Adyen's SDK for network token provisioning. For more information, see the repositories for Adyen's SDKs for network token provisioning: * [Adyen Apple Pay Provisioning SDK](https://github.com/Adyen/adyen-apple-pay-provisioning-ios). * [Adyen Google Wallet Provisioning SDK](https://github.com/Adyen/adyen-issuing-android) + SdkInput *string `json:"sdkInput,omitempty"` +} + +// NewNetworkTokenActivationDataResponse instantiates a new NetworkTokenActivationDataResponse 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 NewNetworkTokenActivationDataResponse() *NetworkTokenActivationDataResponse { + this := NetworkTokenActivationDataResponse{} + return &this +} + +// NewNetworkTokenActivationDataResponseWithDefaults instantiates a new NetworkTokenActivationDataResponse 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 NewNetworkTokenActivationDataResponseWithDefaults() *NetworkTokenActivationDataResponse { + this := NetworkTokenActivationDataResponse{} + return &this +} + +// GetSdkInput returns the SdkInput field value if set, zero value otherwise. +func (o *NetworkTokenActivationDataResponse) GetSdkInput() string { + if o == nil || common.IsNil(o.SdkInput) { + var ret string + return ret + } + return *o.SdkInput +} + +// GetSdkInputOk returns a tuple with the SdkInput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenActivationDataResponse) GetSdkInputOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkInput) { + return nil, false + } + return o.SdkInput, true +} + +// HasSdkInput returns a boolean if a field has been set. +func (o *NetworkTokenActivationDataResponse) HasSdkInput() bool { + if o != nil && !common.IsNil(o.SdkInput) { + return true + } + + return false +} + +// SetSdkInput gets a reference to the given string and assigns it to the SdkInput field. +func (o *NetworkTokenActivationDataResponse) SetSdkInput(v string) { + o.SdkInput = &v +} + +func (o NetworkTokenActivationDataResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenActivationDataResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SdkInput) { + toSerialize["sdkInput"] = o.SdkInput + } + return toSerialize, nil +} + +type NullableNetworkTokenActivationDataResponse struct { + value *NetworkTokenActivationDataResponse + isSet bool +} + +func (v NullableNetworkTokenActivationDataResponse) Get() *NetworkTokenActivationDataResponse { + return v.value +} + +func (v *NullableNetworkTokenActivationDataResponse) Set(val *NetworkTokenActivationDataResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenActivationDataResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenActivationDataResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenActivationDataResponse(val *NetworkTokenActivationDataResponse) *NullableNetworkTokenActivationDataResponse { + return &NullableNetworkTokenActivationDataResponse{value: val, isSet: true} +} + +func (v NullableNetworkTokenActivationDataResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenActivationDataResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_network_token_requestor.go b/src/balanceplatform/model_network_token_requestor.go new file mode 100644 index 000000000..a38453575 --- /dev/null +++ b/src/balanceplatform/model_network_token_requestor.go @@ -0,0 +1,162 @@ +/* +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/v21/src/common" +) + +// checks if the NetworkTokenRequestor type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenRequestor{} + +// NetworkTokenRequestor struct for NetworkTokenRequestor +type NetworkTokenRequestor struct { + // The id of the network token requestor. + Id *string `json:"id,omitempty"` + // The name of the network token requestor. + Name *string `json:"name,omitempty"` +} + +// NewNetworkTokenRequestor instantiates a new NetworkTokenRequestor 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 NewNetworkTokenRequestor() *NetworkTokenRequestor { + this := NetworkTokenRequestor{} + return &this +} + +// NewNetworkTokenRequestorWithDefaults instantiates a new NetworkTokenRequestor 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 NewNetworkTokenRequestorWithDefaults() *NetworkTokenRequestor { + this := NetworkTokenRequestor{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NetworkTokenRequestor) 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 *NetworkTokenRequestor) 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 *NetworkTokenRequestor) 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 *NetworkTokenRequestor) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NetworkTokenRequestor) 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 *NetworkTokenRequestor) 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 *NetworkTokenRequestor) 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 *NetworkTokenRequestor) SetName(v string) { + o.Name = &v +} + +func (o NetworkTokenRequestor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenRequestor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableNetworkTokenRequestor struct { + value *NetworkTokenRequestor + isSet bool +} + +func (v NullableNetworkTokenRequestor) Get() *NetworkTokenRequestor { + return v.value +} + +func (v *NullableNetworkTokenRequestor) Set(val *NetworkTokenRequestor) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenRequestor) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenRequestor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenRequestor(val *NetworkTokenRequestor) *NullableNetworkTokenRequestor { + return &NullableNetworkTokenRequestor{value: val, isSet: true} +} + +func (v NullableNetworkTokenRequestor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenRequestor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_platform_payment_configuration.go b/src/balanceplatform/model_platform_payment_configuration.go index cf464074e..078ecd45b 100644 --- a/src/balanceplatform/model_platform_payment_configuration.go +++ b/src/balanceplatform/model_platform_payment_configuration.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &PlatformPaymentConfiguration{} // PlatformPaymentConfiguration struct for PlatformPaymentConfiguration type PlatformPaymentConfiguration struct { - // Specifies at what time a [sales day](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#sales-day) ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + // Specifies at what time a sales day ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. SalesDayClosingTime *string `json:"salesDayClosingTime,omitempty"` - // Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **20**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**. + // Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**. SettlementDelayDays *int32 `json:"settlementDelayDays,omitempty"` } diff --git a/src/balanceplatform/model_remove_association_request.go b/src/balanceplatform/model_remove_association_request.go new file mode 100644 index 000000000..d4a2fd444 --- /dev/null +++ b/src/balanceplatform/model_remove_association_request.go @@ -0,0 +1,171 @@ +/* +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/v21/src/common" +) + +// checks if the RemoveAssociationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RemoveAssociationRequest{} + +// RemoveAssociationRequest struct for RemoveAssociationRequest +type RemoveAssociationRequest struct { + // The unique identifier of the entity. + EntityId string `json:"entityId"` + EntityType ScaEntityType `json:"entityType"` + // A list of device ids associated with the entity that should be removed. + ScaDeviceIds []string `json:"scaDeviceIds"` +} + +// NewRemoveAssociationRequest instantiates a new RemoveAssociationRequest 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 NewRemoveAssociationRequest(entityId string, entityType ScaEntityType, scaDeviceIds []string) *RemoveAssociationRequest { + this := RemoveAssociationRequest{} + this.EntityId = entityId + this.EntityType = entityType + this.ScaDeviceIds = scaDeviceIds + return &this +} + +// NewRemoveAssociationRequestWithDefaults instantiates a new RemoveAssociationRequest 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 NewRemoveAssociationRequestWithDefaults() *RemoveAssociationRequest { + this := RemoveAssociationRequest{} + return &this +} + +// GetEntityId returns the EntityId field value +func (o *RemoveAssociationRequest) GetEntityId() string { + if o == nil { + var ret string + return ret + } + + return o.EntityId +} + +// GetEntityIdOk returns a tuple with the EntityId field value +// and a boolean to check if the value has been set. +func (o *RemoveAssociationRequest) GetEntityIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntityId, true +} + +// SetEntityId sets field value +func (o *RemoveAssociationRequest) SetEntityId(v string) { + o.EntityId = v +} + +// GetEntityType returns the EntityType field value +func (o *RemoveAssociationRequest) GetEntityType() ScaEntityType { + if o == nil { + var ret ScaEntityType + return ret + } + + return o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value +// and a boolean to check if the value has been set. +func (o *RemoveAssociationRequest) GetEntityTypeOk() (*ScaEntityType, bool) { + if o == nil { + return nil, false + } + return &o.EntityType, true +} + +// SetEntityType sets field value +func (o *RemoveAssociationRequest) SetEntityType(v ScaEntityType) { + o.EntityType = v +} + +// GetScaDeviceIds returns the ScaDeviceIds field value +func (o *RemoveAssociationRequest) GetScaDeviceIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ScaDeviceIds +} + +// GetScaDeviceIdsOk returns a tuple with the ScaDeviceIds field value +// and a boolean to check if the value has been set. +func (o *RemoveAssociationRequest) GetScaDeviceIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ScaDeviceIds, true +} + +// SetScaDeviceIds sets field value +func (o *RemoveAssociationRequest) SetScaDeviceIds(v []string) { + o.ScaDeviceIds = v +} + +func (o RemoveAssociationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveAssociationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entityId"] = o.EntityId + toSerialize["entityType"] = o.EntityType + toSerialize["scaDeviceIds"] = o.ScaDeviceIds + return toSerialize, nil +} + +type NullableRemoveAssociationRequest struct { + value *RemoveAssociationRequest + isSet bool +} + +func (v NullableRemoveAssociationRequest) Get() *RemoveAssociationRequest { + return v.value +} + +func (v *NullableRemoveAssociationRequest) Set(val *RemoveAssociationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveAssociationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveAssociationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveAssociationRequest(val *RemoveAssociationRequest) *NullableRemoveAssociationRequest { + return &NullableRemoveAssociationRequest{value: val, isSet: true} +} + +func (v NullableRemoveAssociationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveAssociationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_device.go b/src/balanceplatform/model_sca_device.go new file mode 100644 index 000000000..4c2f39bda --- /dev/null +++ b/src/balanceplatform/model_sca_device.go @@ -0,0 +1,171 @@ +/* +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/v21/src/common" +) + +// checks if the ScaDevice type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ScaDevice{} + +// ScaDevice A resource that contains information about a device, including its unique ID, name, and type. +type ScaDevice struct { + // The unique identifier of the SCA device you are registering. + Id string `json:"id"` + // The name of the SCA device that you are registering. You can use it to help your users identify the device. + Name string `json:"name"` + Type ScaDeviceType `json:"type"` +} + +// NewScaDevice instantiates a new ScaDevice 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 NewScaDevice(id string, name string, type_ ScaDeviceType) *ScaDevice { + this := ScaDevice{} + this.Id = id + this.Name = name + this.Type = type_ + return &this +} + +// NewScaDeviceWithDefaults instantiates a new ScaDevice 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 NewScaDeviceWithDefaults() *ScaDevice { + this := ScaDevice{} + return &this +} + +// GetId returns the Id field value +func (o *ScaDevice) 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 *ScaDevice) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ScaDevice) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ScaDevice) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ScaDevice) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ScaDevice) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *ScaDevice) GetType() ScaDeviceType { + if o == nil { + var ret ScaDeviceType + 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 *ScaDevice) GetTypeOk() (*ScaDeviceType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ScaDevice) SetType(v ScaDeviceType) { + o.Type = v +} + +func (o ScaDevice) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScaDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableScaDevice struct { + value *ScaDevice + isSet bool +} + +func (v NullableScaDevice) Get() *ScaDevice { + return v.value +} + +func (v *NullableScaDevice) Set(val *ScaDevice) { + v.value = val + v.isSet = true +} + +func (v NullableScaDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableScaDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaDevice(val *ScaDevice) *NullableScaDevice { + return &NullableScaDevice{value: val, isSet: true} +} + +func (v NullableScaDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_device_type.go b/src/balanceplatform/model_sca_device_type.go new file mode 100644 index 000000000..a890da793 --- /dev/null +++ b/src/balanceplatform/model_sca_device_type.go @@ -0,0 +1,110 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// ScaDeviceType the model 'ScaDeviceType' +type ScaDeviceType string + +// List of ScaDeviceType +const ( + BROWSER ScaDeviceType = "browser" + IOS ScaDeviceType = "ios" + ANDROID ScaDeviceType = "android" +) + +// All allowed values of ScaDeviceType enum +var AllowedScaDeviceTypeEnumValues = []ScaDeviceType{ + "browser", + "ios", + "android", +} + +func (v *ScaDeviceType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ScaDeviceType(value) + for _, existing := range AllowedScaDeviceTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ScaDeviceType", value) +} + +// NewScaDeviceTypeFromValue returns a pointer to a valid ScaDeviceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScaDeviceTypeFromValue(v string) (*ScaDeviceType, error) { + ev := ScaDeviceType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ScaDeviceType: valid values are %v", v, AllowedScaDeviceTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ScaDeviceType) IsValid() bool { + for _, existing := range AllowedScaDeviceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ScaDeviceType value +func (v ScaDeviceType) Ptr() *ScaDeviceType { + return &v +} + +type NullableScaDeviceType struct { + value *ScaDeviceType + isSet bool +} + +func (v NullableScaDeviceType) Get() *ScaDeviceType { + return v.value +} + +func (v *NullableScaDeviceType) Set(val *ScaDeviceType) { + v.value = val + v.isSet = true +} + +func (v NullableScaDeviceType) IsSet() bool { + return v.isSet +} + +func (v *NullableScaDeviceType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaDeviceType(val *ScaDeviceType) *NullableScaDeviceType { + return &NullableScaDeviceType{value: val, isSet: true} +} + +func (v NullableScaDeviceType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaDeviceType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_entity.go b/src/balanceplatform/model_sca_entity.go new file mode 100644 index 000000000..7a493e7d6 --- /dev/null +++ b/src/balanceplatform/model_sca_entity.go @@ -0,0 +1,143 @@ +/* +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/v21/src/common" +) + +// checks if the ScaEntity type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ScaEntity{} + +// ScaEntity struct for ScaEntity +type ScaEntity struct { + // The unique identifier of the entity. + Id string `json:"id"` + Type ScaEntityType `json:"type"` +} + +// NewScaEntity instantiates a new ScaEntity 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 NewScaEntity(id string, type_ ScaEntityType) *ScaEntity { + this := ScaEntity{} + this.Id = id + this.Type = type_ + return &this +} + +// NewScaEntityWithDefaults instantiates a new ScaEntity 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 NewScaEntityWithDefaults() *ScaEntity { + this := ScaEntity{} + return &this +} + +// GetId returns the Id field value +func (o *ScaEntity) 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 *ScaEntity) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ScaEntity) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ScaEntity) GetType() ScaEntityType { + if o == nil { + var ret ScaEntityType + 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 *ScaEntity) GetTypeOk() (*ScaEntityType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ScaEntity) SetType(v ScaEntityType) { + o.Type = v +} + +func (o ScaEntity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScaEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableScaEntity struct { + value *ScaEntity + isSet bool +} + +func (v NullableScaEntity) Get() *ScaEntity { + return v.value +} + +func (v *NullableScaEntity) Set(val *ScaEntity) { + v.value = val + v.isSet = true +} + +func (v NullableScaEntity) IsSet() bool { + return v.isSet +} + +func (v *NullableScaEntity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaEntity(val *ScaEntity) *NullableScaEntity { + return &NullableScaEntity{value: val, isSet: true} +} + +func (v NullableScaEntity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaEntity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_entity_type.go b/src/balanceplatform/model_sca_entity_type.go new file mode 100644 index 000000000..ed100516d --- /dev/null +++ b/src/balanceplatform/model_sca_entity_type.go @@ -0,0 +1,108 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// ScaEntityType the model 'ScaEntityType' +type ScaEntityType string + +// List of ScaEntityType +const ( + ACCOUNT_HOLDER ScaEntityType = "accountHolder" + PAYMENT_INSTRUMENT ScaEntityType = "paymentInstrument" +) + +// All allowed values of ScaEntityType enum +var AllowedScaEntityTypeEnumValues = []ScaEntityType{ + "accountHolder", + "paymentInstrument", +} + +func (v *ScaEntityType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ScaEntityType(value) + for _, existing := range AllowedScaEntityTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ScaEntityType", value) +} + +// NewScaEntityTypeFromValue returns a pointer to a valid ScaEntityType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScaEntityTypeFromValue(v string) (*ScaEntityType, error) { + ev := ScaEntityType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ScaEntityType: valid values are %v", v, AllowedScaEntityTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ScaEntityType) IsValid() bool { + for _, existing := range AllowedScaEntityTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ScaEntityType value +func (v ScaEntityType) Ptr() *ScaEntityType { + return &v +} + +type NullableScaEntityType struct { + value *ScaEntityType + isSet bool +} + +func (v NullableScaEntityType) Get() *ScaEntityType { + return v.value +} + +func (v *NullableScaEntityType) Set(val *ScaEntityType) { + v.value = val + v.isSet = true +} + +func (v NullableScaEntityType) IsSet() bool { + return v.isSet +} + +func (v *NullableScaEntityType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaEntityType(val *ScaEntityType) *NullableScaEntityType { + return &NullableScaEntityType{value: val, isSet: true} +} + +func (v NullableScaEntityType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaEntityType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_exemption.go b/src/balanceplatform/model_sca_exemption.go new file mode 100644 index 000000000..4f51620d6 --- /dev/null +++ b/src/balanceplatform/model_sca_exemption.go @@ -0,0 +1,114 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// ScaExemption The type of exemption for Strong Customer Authentication (SCA). Possible values: * **lowerLimit**: the newly created limit is lower than the existing limit. * **notRegulated**: the limit is created in a country, region, or industry where it is not mandated by law to use SCA. * **setByPlatform**: you set a limit for one of your user's balance accounts, or for your balance platform. * **initialLimit**: there are no existing transfer limits set on the balance account or balance platform. * **alreadyPerformed**: you are confident about your user's identity and do not need to verify this using SCA. +type ScaExemption string + +// List of ScaExemption +const ( + SET_BY_PLATFORM ScaExemption = "setByPlatform" + INITIAL_LIMIT ScaExemption = "initialLimit" + LOWER_LIMIT ScaExemption = "lowerLimit" + NOT_REGULATED ScaExemption = "notRegulated" + ALREADY_PERFORMED ScaExemption = "alreadyPerformed" +) + +// All allowed values of ScaExemption enum +var AllowedScaExemptionEnumValues = []ScaExemption{ + "setByPlatform", + "initialLimit", + "lowerLimit", + "notRegulated", + "alreadyPerformed", +} + +func (v *ScaExemption) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ScaExemption(value) + for _, existing := range AllowedScaExemptionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ScaExemption", value) +} + +// NewScaExemptionFromValue returns a pointer to a valid ScaExemption +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScaExemptionFromValue(v string) (*ScaExemption, error) { + ev := ScaExemption(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ScaExemption: valid values are %v", v, AllowedScaExemptionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ScaExemption) IsValid() bool { + for _, existing := range AllowedScaExemptionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ScaExemption value +func (v ScaExemption) Ptr() *ScaExemption { + return &v +} + +type NullableScaExemption struct { + value *ScaExemption + isSet bool +} + +func (v NullableScaExemption) Get() *ScaExemption { + return v.value +} + +func (v *NullableScaExemption) Set(val *ScaExemption) { + v.value = val + v.isSet = true +} + +func (v NullableScaExemption) IsSet() bool { + return v.isSet +} + +func (v *NullableScaExemption) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaExemption(val *ScaExemption) *NullableScaExemption { + return &NullableScaExemption{value: val, isSet: true} +} + +func (v NullableScaExemption) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaExemption) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_information.go b/src/balanceplatform/model_sca_information.go new file mode 100644 index 000000000..3519bff21 --- /dev/null +++ b/src/balanceplatform/model_sca_information.go @@ -0,0 +1,151 @@ +/* +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/v21/src/common" +) + +// checks if the ScaInformation type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ScaInformation{} + +// ScaInformation struct for ScaInformation +type ScaInformation struct { + Exemption *ScaExemption `json:"exemption,omitempty"` + Status ScaStatus `json:"status"` +} + +// NewScaInformation instantiates a new ScaInformation 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 NewScaInformation(status ScaStatus) *ScaInformation { + this := ScaInformation{} + this.Status = status + return &this +} + +// NewScaInformationWithDefaults instantiates a new ScaInformation 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 NewScaInformationWithDefaults() *ScaInformation { + this := ScaInformation{} + return &this +} + +// GetExemption returns the Exemption field value if set, zero value otherwise. +func (o *ScaInformation) GetExemption() ScaExemption { + if o == nil || common.IsNil(o.Exemption) { + var ret ScaExemption + return ret + } + return *o.Exemption +} + +// GetExemptionOk returns a tuple with the Exemption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScaInformation) GetExemptionOk() (*ScaExemption, bool) { + if o == nil || common.IsNil(o.Exemption) { + return nil, false + } + return o.Exemption, true +} + +// HasExemption returns a boolean if a field has been set. +func (o *ScaInformation) HasExemption() bool { + if o != nil && !common.IsNil(o.Exemption) { + return true + } + + return false +} + +// SetExemption gets a reference to the given ScaExemption and assigns it to the Exemption field. +func (o *ScaInformation) SetExemption(v ScaExemption) { + o.Exemption = &v +} + +// GetStatus returns the Status field value +func (o *ScaInformation) GetStatus() ScaStatus { + if o == nil { + var ret ScaStatus + 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 *ScaInformation) GetStatusOk() (*ScaStatus, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ScaInformation) SetStatus(v ScaStatus) { + o.Status = v +} + +func (o ScaInformation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScaInformation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Exemption) { + toSerialize["exemption"] = o.Exemption + } + toSerialize["status"] = o.Status + return toSerialize, nil +} + +type NullableScaInformation struct { + value *ScaInformation + isSet bool +} + +func (v NullableScaInformation) Get() *ScaInformation { + return v.value +} + +func (v *NullableScaInformation) Set(val *ScaInformation) { + v.value = val + v.isSet = true +} + +func (v NullableScaInformation) IsSet() bool { + return v.isSet +} + +func (v *NullableScaInformation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaInformation(val *ScaInformation) *NullableScaInformation { + return &NullableScaInformation{value: val, isSet: true} +} + +func (v NullableScaInformation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaInformation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sca_status.go b/src/balanceplatform/model_sca_status.go new file mode 100644 index 000000000..97d52e98c --- /dev/null +++ b/src/balanceplatform/model_sca_status.go @@ -0,0 +1,110 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// ScaStatus The status of Strong Customer Authentication (SCA). Possible values: * **notPerformed**: the requester was unable to successfully authenticate the request using SCA, or has an SCA exemption. * **pending**: the request is pending SCA authentication. * **performed**: the request is successfully authenticated using SCA. +type ScaStatus string + +// List of ScaStatus +const ( + NOT_PERFORMED ScaStatus = "notPerformed" + PENDING ScaStatus = "pending" + PERFORMED ScaStatus = "performed" +) + +// All allowed values of ScaStatus enum +var AllowedScaStatusEnumValues = []ScaStatus{ + "notPerformed", + "pending", + "performed", +} + +func (v *ScaStatus) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ScaStatus(value) + for _, existing := range AllowedScaStatusEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ScaStatus", value) +} + +// NewScaStatusFromValue returns a pointer to a valid ScaStatus +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScaStatusFromValue(v string) (*ScaStatus, error) { + ev := ScaStatus(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ScaStatus: valid values are %v", v, AllowedScaStatusEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ScaStatus) IsValid() bool { + for _, existing := range AllowedScaStatusEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ScaStatus value +func (v ScaStatus) Ptr() *ScaStatus { + return &v +} + +type NullableScaStatus struct { + value *ScaStatus + isSet bool +} + +func (v NullableScaStatus) Get() *ScaStatus { + return v.value +} + +func (v *NullableScaStatus) Set(val *ScaStatus) { + v.value = val + v.isSet = true +} + +func (v NullableScaStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableScaStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScaStatus(val *ScaStatus) *NullableScaStatus { + return &NullableScaStatus{value: val, isSet: true} +} + +func (v NullableScaStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScaStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_scope.go b/src/balanceplatform/model_scope.go new file mode 100644 index 000000000..3a40da1dd --- /dev/null +++ b/src/balanceplatform/model_scope.go @@ -0,0 +1,108 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// Scope The scope to which the transfer limit applies. Possible values: * **perTransaction**: you set a maximum amount for each transfer made from the balance account or balance platform. * **perDay**: you set a maximum total amount for all transfers made from the balance account or balance platform in a day. +type Scope string + +// List of Scope +const ( + PER_DAY Scope = "perDay" + PER_TRANSACTION Scope = "perTransaction" +) + +// All allowed values of Scope enum +var AllowedScopeEnumValues = []Scope{ + "perDay", + "perTransaction", +} + +func (v *Scope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Scope(value) + for _, existing := range AllowedScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Scope", value) +} + +// NewScopeFromValue returns a pointer to a valid Scope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewScopeFromValue(v string) (*Scope, error) { + ev := Scope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Scope: valid values are %v", v, AllowedScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Scope) IsValid() bool { + for _, existing := range AllowedScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to Scope value +func (v Scope) Ptr() *Scope { + return &v +} + +type NullableScope struct { + value *Scope + isSet bool +} + +func (v NullableScope) Get() *Scope { + return v.value +} + +func (v *NullableScope) Set(val *Scope) { + v.value = val + v.isSet = true +} + +func (v NullableScope) IsSet() bool { + return v.isSet +} + +func (v *NullableScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScope(val *Scope) *NullableScope { + return &NullableScope{value: val, isSet: true} +} + +func (v NullableScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_setting_type.go b/src/balanceplatform/model_setting_type.go new file mode 100644 index 000000000..b01118927 --- /dev/null +++ b/src/balanceplatform/model_setting_type.go @@ -0,0 +1,106 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// SettingType the model 'SettingType' +type SettingType string + +// List of SettingType +const ( + BALANCE SettingType = "balance" +) + +// All allowed values of SettingType enum +var AllowedSettingTypeEnumValues = []SettingType{ + "balance", +} + +func (v *SettingType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := SettingType(value) + for _, existing := range AllowedSettingTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid SettingType", value) +} + +// NewSettingTypeFromValue returns a pointer to a valid SettingType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewSettingTypeFromValue(v string) (*SettingType, error) { + ev := SettingType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for SettingType: valid values are %v", v, AllowedSettingTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v SettingType) IsValid() bool { + for _, existing := range AllowedSettingTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to SettingType value +func (v SettingType) Ptr() *SettingType { + return &v +} + +type NullableSettingType struct { + value *SettingType + isSet bool +} + +func (v NullableSettingType) Get() *SettingType { + return v.value +} + +func (v *NullableSettingType) Set(val *SettingType) { + v.value = val + v.isSet = true +} + +func (v NullableSettingType) IsSet() bool { + return v.isSet +} + +func (v *NullableSettingType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSettingType(val *SettingType) *NullableSettingType { + return &NullableSettingType{value: val, isSet: true} +} + +func (v NullableSettingType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSettingType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_submit_sca_association_request.go b/src/balanceplatform/model_submit_sca_association_request.go new file mode 100644 index 000000000..076f449b2 --- /dev/null +++ b/src/balanceplatform/model_submit_sca_association_request.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the SubmitScaAssociationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SubmitScaAssociationRequest{} + +// SubmitScaAssociationRequest struct for SubmitScaAssociationRequest +type SubmitScaAssociationRequest struct { + // The list of entities to be associated. + Entities []ScaEntity `json:"entities"` +} + +// NewSubmitScaAssociationRequest instantiates a new SubmitScaAssociationRequest 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 NewSubmitScaAssociationRequest(entities []ScaEntity) *SubmitScaAssociationRequest { + this := SubmitScaAssociationRequest{} + this.Entities = entities + return &this +} + +// NewSubmitScaAssociationRequestWithDefaults instantiates a new SubmitScaAssociationRequest 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 NewSubmitScaAssociationRequestWithDefaults() *SubmitScaAssociationRequest { + this := SubmitScaAssociationRequest{} + return &this +} + +// GetEntities returns the Entities field value +func (o *SubmitScaAssociationRequest) GetEntities() []ScaEntity { + if o == nil { + var ret []ScaEntity + return ret + } + + return o.Entities +} + +// GetEntitiesOk returns a tuple with the Entities field value +// and a boolean to check if the value has been set. +func (o *SubmitScaAssociationRequest) GetEntitiesOk() ([]ScaEntity, bool) { + if o == nil { + return nil, false + } + return o.Entities, true +} + +// SetEntities sets field value +func (o *SubmitScaAssociationRequest) SetEntities(v []ScaEntity) { + o.Entities = v +} + +func (o SubmitScaAssociationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SubmitScaAssociationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["entities"] = o.Entities + return toSerialize, nil +} + +type NullableSubmitScaAssociationRequest struct { + value *SubmitScaAssociationRequest + isSet bool +} + +func (v NullableSubmitScaAssociationRequest) Get() *SubmitScaAssociationRequest { + return v.value +} + +func (v *NullableSubmitScaAssociationRequest) Set(val *SubmitScaAssociationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitScaAssociationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitScaAssociationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitScaAssociationRequest(val *SubmitScaAssociationRequest) *NullableSubmitScaAssociationRequest { + return &NullableSubmitScaAssociationRequest{value: val, isSet: true} +} + +func (v NullableSubmitScaAssociationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitScaAssociationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_submit_sca_association_response.go b/src/balanceplatform/model_submit_sca_association_response.go new file mode 100644 index 000000000..c009d3aee --- /dev/null +++ b/src/balanceplatform/model_submit_sca_association_response.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the SubmitScaAssociationResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SubmitScaAssociationResponse{} + +// SubmitScaAssociationResponse struct for SubmitScaAssociationResponse +type SubmitScaAssociationResponse struct { + // List of associations created to the entities and their statuses. + ScaAssociations []Association `json:"scaAssociations"` +} + +// NewSubmitScaAssociationResponse instantiates a new SubmitScaAssociationResponse 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 NewSubmitScaAssociationResponse(scaAssociations []Association) *SubmitScaAssociationResponse { + this := SubmitScaAssociationResponse{} + this.ScaAssociations = scaAssociations + return &this +} + +// NewSubmitScaAssociationResponseWithDefaults instantiates a new SubmitScaAssociationResponse 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 NewSubmitScaAssociationResponseWithDefaults() *SubmitScaAssociationResponse { + this := SubmitScaAssociationResponse{} + return &this +} + +// GetScaAssociations returns the ScaAssociations field value +func (o *SubmitScaAssociationResponse) GetScaAssociations() []Association { + if o == nil { + var ret []Association + return ret + } + + return o.ScaAssociations +} + +// GetScaAssociationsOk returns a tuple with the ScaAssociations field value +// and a boolean to check if the value has been set. +func (o *SubmitScaAssociationResponse) GetScaAssociationsOk() ([]Association, bool) { + if o == nil { + return nil, false + } + return o.ScaAssociations, true +} + +// SetScaAssociations sets field value +func (o *SubmitScaAssociationResponse) SetScaAssociations(v []Association) { + o.ScaAssociations = v +} + +func (o SubmitScaAssociationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SubmitScaAssociationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["scaAssociations"] = o.ScaAssociations + return toSerialize, nil +} + +type NullableSubmitScaAssociationResponse struct { + value *SubmitScaAssociationResponse + isSet bool +} + +func (v NullableSubmitScaAssociationResponse) Get() *SubmitScaAssociationResponse { + return v.value +} + +func (v *NullableSubmitScaAssociationResponse) Set(val *SubmitScaAssociationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSubmitScaAssociationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSubmitScaAssociationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubmitScaAssociationResponse(val *SubmitScaAssociationResponse) *NullableSubmitScaAssociationResponse { + return &NullableSubmitScaAssociationResponse{value: val, isSet: true} +} + +func (v NullableSubmitScaAssociationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubmitScaAssociationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_sweep_configuration_v2.go b/src/balanceplatform/model_sweep_configuration_v2.go index c45162bdf..dcdb6e1fc 100644 --- a/src/balanceplatform/model_sweep_configuration_v2.go +++ b/src/balanceplatform/model_sweep_configuration_v2.go @@ -28,7 +28,7 @@ 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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). + // 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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 within the United States and in [SEPA locations](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"` @@ -652,7 +652,7 @@ func (o *SweepConfigurationV2) isValidCategory() bool { 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", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/balanceplatform/model_target.go b/src/balanceplatform/model_target.go new file mode 100644 index 000000000..75f1b9b48 --- /dev/null +++ b/src/balanceplatform/model_target.go @@ -0,0 +1,154 @@ +/* +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/v21/src/common" +) + +// checks if the Target type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Target{} + +// Target struct for Target +type Target struct { + // The unique identifier of the `target.type`. This can be the ID of your: * balance platform * account holder * account holder's balance account + Id string `json:"id"` + // The resource for which you want to receive notifications. Possible values: * **balancePlatform**: receive notifications about balance changes in your entire balance platform. * **accountHolder**: receive notifications about balance changes of a specific user. * **balanceAccount**: receive notifications about balance changes in a specific balance account. + Type string `json:"type"` +} + +// NewTarget instantiates a new Target 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 NewTarget(id string, type_ string) *Target { + this := Target{} + this.Id = id + this.Type = type_ + return &this +} + +// NewTargetWithDefaults instantiates a new Target 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 NewTargetWithDefaults() *Target { + this := Target{} + return &this +} + +// GetId returns the Id field value +func (o *Target) 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 *Target) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Target) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *Target) 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 *Target) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Target) SetType(v string) { + o.Type = v +} + +func (o Target) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Target) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableTarget struct { + value *Target + isSet bool +} + +func (v NullableTarget) Get() *Target { + return v.value +} + +func (v *NullableTarget) Set(val *Target) { + v.value = val + v.isSet = true +} + +func (v NullableTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTarget(val *Target) *NullableTarget { + return &NullableTarget{value: val, isSet: true} +} + +func (v NullableTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *Target) isValidType() bool { + var allowedEnumValues = []string{"balanceAccount", "accountHolder", "balancePlatform"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_target_update.go b/src/balanceplatform/model_target_update.go new file mode 100644 index 000000000..900f5d0d6 --- /dev/null +++ b/src/balanceplatform/model_target_update.go @@ -0,0 +1,172 @@ +/* +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/v21/src/common" +) + +// checks if the TargetUpdate type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TargetUpdate{} + +// TargetUpdate struct for TargetUpdate +type TargetUpdate struct { + // The unique identifier of the `target.type`. This can be the ID of your: * balance platform * account holder * account holder's balance account + Id *string `json:"id,omitempty"` + // The resource for which you want to receive notifications. Possible values: * **balancePlatform**: receive notifications about balance changes in your entire balance platform. * **accountHolder**: receive notifications about balance changes of a specific user. * **balanceAccount**: receive notifications about balance changes in a specific balance account. + Type *string `json:"type,omitempty"` +} + +// NewTargetUpdate instantiates a new TargetUpdate 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 NewTargetUpdate() *TargetUpdate { + this := TargetUpdate{} + return &this +} + +// NewTargetUpdateWithDefaults instantiates a new TargetUpdate 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 NewTargetUpdateWithDefaults() *TargetUpdate { + this := TargetUpdate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TargetUpdate) 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 *TargetUpdate) 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 *TargetUpdate) 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 *TargetUpdate) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TargetUpdate) 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 *TargetUpdate) 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 *TargetUpdate) 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 *TargetUpdate) SetType(v string) { + o.Type = &v +} + +func (o TargetUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TargetUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableTargetUpdate struct { + value *TargetUpdate + isSet bool +} + +func (v NullableTargetUpdate) Get() *TargetUpdate { + return v.value +} + +func (v *NullableTargetUpdate) Set(val *TargetUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableTargetUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableTargetUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTargetUpdate(val *TargetUpdate) *NullableTargetUpdate { + return &NullableTargetUpdate{value: val, isSet: true} +} + +func (v NullableTargetUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTargetUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TargetUpdate) isValidType() bool { + var allowedEnumValues = []string{"balanceAccount", "accountHolder", "balancePlatform"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_transaction_rule.go b/src/balanceplatform/model_transaction_rule.go index 441c60d00..82dd66551 100644 --- a/src/balanceplatform/model_transaction_rule.go +++ b/src/balanceplatform/model_transaction_rule.go @@ -23,13 +23,13 @@ type TransactionRule struct { AggregationLevel *string `json:"aggregationLevel,omitempty"` // Your description for the transaction rule. Description string `json:"description"` - // The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. + // The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2025-03-19T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. EndDate *string `json:"endDate,omitempty"` EntityKey TransactionRuleEntityKey `json:"entityKey"` // The unique identifier of the transaction rule. Id *string `json:"id,omitempty"` Interval TransactionRuleInterval `json:"interval"` - // The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. + // The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. This value is not allowed when `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or times out, the transaction is declined. This value is only allowed when `requestType` is **authentication**. OutcomeType *string `json:"outcomeType,omitempty"` // Your reference for the transaction rule. Reference string `json:"reference"` @@ -38,7 +38,7 @@ type TransactionRule struct { RuleRestrictions TransactionRuleRestrictions `json:"ruleRestrictions"` // A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. Score *int32 `json:"score,omitempty"` - // The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. + // The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2025-03-19T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. StartDate *string `json:"startDate,omitempty"` // The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. Status *string `json:"status,omitempty"` diff --git a/src/balanceplatform/model_transaction_rule_info.go b/src/balanceplatform/model_transaction_rule_info.go index 64ffbe31e..d0d912c3e 100644 --- a/src/balanceplatform/model_transaction_rule_info.go +++ b/src/balanceplatform/model_transaction_rule_info.go @@ -23,11 +23,11 @@ type TransactionRuleInfo struct { AggregationLevel *string `json:"aggregationLevel,omitempty"` // Your description for the transaction rule. Description string `json:"description"` - // The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. + // The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2025-03-19T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. EndDate *string `json:"endDate,omitempty"` EntityKey TransactionRuleEntityKey `json:"entityKey"` Interval TransactionRuleInterval `json:"interval"` - // The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. + // The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock** (default): the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. This value is not allowed when `requestType` is **bankTransfer**. * **enforceSCA**: your user is prompted to verify their identity using [3D Secure authentication](https://docs.adyen.com/issuing/3d-secure/). If the authentication fails or times out, the transaction is declined. This value is only allowed when `requestType` is **authentication**. OutcomeType *string `json:"outcomeType,omitempty"` // Your reference for the transaction rule. Reference string `json:"reference"` @@ -36,7 +36,7 @@ type TransactionRuleInfo struct { RuleRestrictions TransactionRuleRestrictions `json:"ruleRestrictions"` // A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. Score *int32 `json:"score,omitempty"` - // The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. + // The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2025-03-19T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. StartDate *string `json:"startDate,omitempty"` // The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. Status *string `json:"status,omitempty"` diff --git a/src/balanceplatform/model_transaction_rule_restrictions.go b/src/balanceplatform/model_transaction_rule_restrictions.go index b89f79eeb..5d6101686 100644 --- a/src/balanceplatform/model_transaction_rule_restrictions.go +++ b/src/balanceplatform/model_transaction_rule_restrictions.go @@ -43,6 +43,7 @@ type TransactionRuleRestrictions struct { TotalAmount *TotalAmountRestriction `json:"totalAmount,omitempty"` WalletProviderAccountScore *WalletProviderAccountScoreRestriction `json:"walletProviderAccountScore,omitempty"` WalletProviderDeviceScore *WalletProviderDeviceScore `json:"walletProviderDeviceScore,omitempty"` + WalletProviderDeviceType *WalletProviderDeviceType `json:"walletProviderDeviceType,omitempty"` } // NewTransactionRuleRestrictions instantiates a new TransactionRuleRestrictions object @@ -830,6 +831,38 @@ func (o *TransactionRuleRestrictions) SetWalletProviderDeviceScore(v WalletProvi o.WalletProviderDeviceScore = &v } +// GetWalletProviderDeviceType returns the WalletProviderDeviceType field value if set, zero value otherwise. +func (o *TransactionRuleRestrictions) GetWalletProviderDeviceType() WalletProviderDeviceType { + if o == nil || common.IsNil(o.WalletProviderDeviceType) { + var ret WalletProviderDeviceType + return ret + } + return *o.WalletProviderDeviceType +} + +// GetWalletProviderDeviceTypeOk returns a tuple with the WalletProviderDeviceType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactionRuleRestrictions) GetWalletProviderDeviceTypeOk() (*WalletProviderDeviceType, bool) { + if o == nil || common.IsNil(o.WalletProviderDeviceType) { + return nil, false + } + return o.WalletProviderDeviceType, true +} + +// HasWalletProviderDeviceType returns a boolean if a field has been set. +func (o *TransactionRuleRestrictions) HasWalletProviderDeviceType() bool { + if o != nil && !common.IsNil(o.WalletProviderDeviceType) { + return true + } + + return false +} + +// SetWalletProviderDeviceType gets a reference to the given WalletProviderDeviceType and assigns it to the WalletProviderDeviceType field. +func (o *TransactionRuleRestrictions) SetWalletProviderDeviceType(v WalletProviderDeviceType) { + o.WalletProviderDeviceType = &v +} + func (o TransactionRuleRestrictions) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -912,6 +945,9 @@ func (o TransactionRuleRestrictions) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.WalletProviderDeviceScore) { toSerialize["walletProviderDeviceScore"] = o.WalletProviderDeviceScore } + if !common.IsNil(o.WalletProviderDeviceType) { + toSerialize["walletProviderDeviceType"] = o.WalletProviderDeviceType + } return toSerialize, nil } diff --git a/src/balanceplatform/model_transfer_limit.go b/src/balanceplatform/model_transfer_limit.go new file mode 100644 index 000000000..279b12a21 --- /dev/null +++ b/src/balanceplatform/model_transfer_limit.go @@ -0,0 +1,363 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TransferLimit type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferLimit{} + +// TransferLimit The transfer limit configured to regulate outgoing transfers. +type TransferLimit struct { + Amount Amount `json:"amount"` + // The date and time when the transfer limit becomes inactive. If you do not specify an end date, the limit stays active until you override it with a new limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD** + EndsAt *time.Time `json:"endsAt,omitempty"` + // The unique identifier of the transfer limit. + Id string `json:"id"` + LimitStatus LimitStatus `json:"limitStatus"` + // Your reference for the transfer limit. + Reference *string `json:"reference,omitempty"` + ScaInformation *ScaInformation `json:"scaInformation,omitempty"` + Scope Scope `json:"scope"` + // The date and time when the transfer limit becomes active. If you specify a date in the future, we will schedule a transfer limit. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): **YYYY-MM-DDThh:mm:ss.sssTZD** + StartsAt time.Time `json:"startsAt"` + TransferType TransferType `json:"transferType"` +} + +// NewTransferLimit instantiates a new TransferLimit 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 NewTransferLimit(amount Amount, id string, limitStatus LimitStatus, scope Scope, startsAt time.Time, transferType TransferType) *TransferLimit { + this := TransferLimit{} + this.Amount = amount + this.Id = id + this.LimitStatus = limitStatus + this.Scope = scope + this.StartsAt = startsAt + this.TransferType = transferType + return &this +} + +// NewTransferLimitWithDefaults instantiates a new TransferLimit 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 NewTransferLimitWithDefaults() *TransferLimit { + this := TransferLimit{} + return &this +} + +// GetAmount returns the Amount field value +func (o *TransferLimit) 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 *TransferLimit) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *TransferLimit) SetAmount(v Amount) { + o.Amount = v +} + +// GetEndsAt returns the EndsAt field value if set, zero value otherwise. +func (o *TransferLimit) GetEndsAt() time.Time { + if o == nil || common.IsNil(o.EndsAt) { + var ret time.Time + return ret + } + return *o.EndsAt +} + +// GetEndsAtOk returns a tuple with the EndsAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetEndsAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.EndsAt) { + return nil, false + } + return o.EndsAt, true +} + +// HasEndsAt returns a boolean if a field has been set. +func (o *TransferLimit) HasEndsAt() bool { + if o != nil && !common.IsNil(o.EndsAt) { + return true + } + + return false +} + +// SetEndsAt gets a reference to the given time.Time and assigns it to the EndsAt field. +func (o *TransferLimit) SetEndsAt(v time.Time) { + o.EndsAt = &v +} + +// GetId returns the Id field value +func (o *TransferLimit) 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 *TransferLimit) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TransferLimit) SetId(v string) { + o.Id = v +} + +// GetLimitStatus returns the LimitStatus field value +func (o *TransferLimit) GetLimitStatus() LimitStatus { + if o == nil { + var ret LimitStatus + return ret + } + + return o.LimitStatus +} + +// GetLimitStatusOk returns a tuple with the LimitStatus field value +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetLimitStatusOk() (*LimitStatus, bool) { + if o == nil { + return nil, false + } + return &o.LimitStatus, true +} + +// SetLimitStatus sets field value +func (o *TransferLimit) SetLimitStatus(v LimitStatus) { + o.LimitStatus = v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *TransferLimit) 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 *TransferLimit) 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 *TransferLimit) 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 *TransferLimit) SetReference(v string) { + o.Reference = &v +} + +// GetScaInformation returns the ScaInformation field value if set, zero value otherwise. +func (o *TransferLimit) GetScaInformation() ScaInformation { + if o == nil || common.IsNil(o.ScaInformation) { + var ret ScaInformation + return ret + } + return *o.ScaInformation +} + +// GetScaInformationOk returns a tuple with the ScaInformation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetScaInformationOk() (*ScaInformation, bool) { + if o == nil || common.IsNil(o.ScaInformation) { + return nil, false + } + return o.ScaInformation, true +} + +// HasScaInformation returns a boolean if a field has been set. +func (o *TransferLimit) HasScaInformation() bool { + if o != nil && !common.IsNil(o.ScaInformation) { + return true + } + + return false +} + +// SetScaInformation gets a reference to the given ScaInformation and assigns it to the ScaInformation field. +func (o *TransferLimit) SetScaInformation(v ScaInformation) { + o.ScaInformation = &v +} + +// GetScope returns the Scope field value +func (o *TransferLimit) GetScope() Scope { + if o == nil { + var ret Scope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetScopeOk() (*Scope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *TransferLimit) SetScope(v Scope) { + o.Scope = v +} + +// GetStartsAt returns the StartsAt field value +func (o *TransferLimit) GetStartsAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartsAt +} + +// GetStartsAtOk returns a tuple with the StartsAt field value +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetStartsAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.StartsAt, true +} + +// SetStartsAt sets field value +func (o *TransferLimit) SetStartsAt(v time.Time) { + o.StartsAt = v +} + +// GetTransferType returns the TransferType field value +func (o *TransferLimit) GetTransferType() TransferType { + if o == nil { + var ret TransferType + return ret + } + + return o.TransferType +} + +// GetTransferTypeOk returns a tuple with the TransferType field value +// and a boolean to check if the value has been set. +func (o *TransferLimit) GetTransferTypeOk() (*TransferType, bool) { + if o == nil { + return nil, false + } + return &o.TransferType, true +} + +// SetTransferType sets field value +func (o *TransferLimit) SetTransferType(v TransferType) { + o.TransferType = v +} + +func (o TransferLimit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + if !common.IsNil(o.EndsAt) { + toSerialize["endsAt"] = o.EndsAt + } + toSerialize["id"] = o.Id + toSerialize["limitStatus"] = o.LimitStatus + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.ScaInformation) { + toSerialize["scaInformation"] = o.ScaInformation + } + toSerialize["scope"] = o.Scope + toSerialize["startsAt"] = o.StartsAt + toSerialize["transferType"] = o.TransferType + return toSerialize, nil +} + +type NullableTransferLimit struct { + value *TransferLimit + isSet bool +} + +func (v NullableTransferLimit) Get() *TransferLimit { + return v.value +} + +func (v *NullableTransferLimit) Set(val *TransferLimit) { + v.value = val + v.isSet = true +} + +func (v NullableTransferLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferLimit(val *TransferLimit) *NullableTransferLimit { + return &NullableTransferLimit{value: val, isSet: true} +} + +func (v NullableTransferLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_transfer_limit_list_response.go b/src/balanceplatform/model_transfer_limit_list_response.go new file mode 100644 index 000000000..86d9b441c --- /dev/null +++ b/src/balanceplatform/model_transfer_limit_list_response.go @@ -0,0 +1,116 @@ +/* +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/v21/src/common" +) + +// checks if the TransferLimitListResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferLimitListResponse{} + +// TransferLimitListResponse struct for TransferLimitListResponse +type TransferLimitListResponse struct { + // List of available transfer limits. + TransferLimits []TransferLimit `json:"transferLimits"` +} + +// NewTransferLimitListResponse instantiates a new TransferLimitListResponse 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 NewTransferLimitListResponse(transferLimits []TransferLimit) *TransferLimitListResponse { + this := TransferLimitListResponse{} + this.TransferLimits = transferLimits + return &this +} + +// NewTransferLimitListResponseWithDefaults instantiates a new TransferLimitListResponse 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 NewTransferLimitListResponseWithDefaults() *TransferLimitListResponse { + this := TransferLimitListResponse{} + return &this +} + +// GetTransferLimits returns the TransferLimits field value +func (o *TransferLimitListResponse) GetTransferLimits() []TransferLimit { + if o == nil { + var ret []TransferLimit + return ret + } + + return o.TransferLimits +} + +// GetTransferLimitsOk returns a tuple with the TransferLimits field value +// and a boolean to check if the value has been set. +func (o *TransferLimitListResponse) GetTransferLimitsOk() ([]TransferLimit, bool) { + if o == nil { + return nil, false + } + return o.TransferLimits, true +} + +// SetTransferLimits sets field value +func (o *TransferLimitListResponse) SetTransferLimits(v []TransferLimit) { + o.TransferLimits = v +} + +func (o TransferLimitListResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferLimitListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["transferLimits"] = o.TransferLimits + return toSerialize, nil +} + +type NullableTransferLimitListResponse struct { + value *TransferLimitListResponse + isSet bool +} + +func (v NullableTransferLimitListResponse) Get() *TransferLimitListResponse { + return v.value +} + +func (v *NullableTransferLimitListResponse) Set(val *TransferLimitListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTransferLimitListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferLimitListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferLimitListResponse(val *TransferLimitListResponse) *NullableTransferLimitListResponse { + return &NullableTransferLimitListResponse{value: val, isSet: true} +} + +func (v NullableTransferLimitListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferLimitListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_transfer_route.go b/src/balanceplatform/model_transfer_route.go index cd2a8f8b3..b53913e26 100644 --- a/src/balanceplatform/model_transfer_route.go +++ b/src/balanceplatform/model_transfer_route.go @@ -25,7 +25,7 @@ type TransferRoute struct { Country *string `json:"country,omitempty"` // The three-character ISO currency code of transfer. For example, **USD** or **EUR**. Currency *string `json:"currency,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. 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). + // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. 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 within the United States and in [SEPA locations](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"` // 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`. Requirements []TransferRouteRequirementsInner `json:"requirements,omitempty"` @@ -273,7 +273,7 @@ func (v *NullableTransferRoute) UnmarshalJSON(src []byte) error { } func (o *TransferRoute) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "card", "grants", "internal", "issuedCard", "migration", "platformPayment", "topUp", "upgrade"} + var allowedEnumValues = []string{"bank", "card", "grants", "interest", "internal", "issuedCard", "migration", "platformPayment", "topUp", "upgrade"} for _, allowed := range allowedEnumValues { if o.GetCategory() == allowed { return true diff --git a/src/balanceplatform/model_transfer_route_request.go b/src/balanceplatform/model_transfer_route_request.go index 785e25656..413a50387 100644 --- a/src/balanceplatform/model_transfer_route_request.go +++ b/src/balanceplatform/model_transfer_route_request.go @@ -30,7 +30,7 @@ type TransferRouteRequest struct { Country *string `json:"country,omitempty"` // The three-character ISO currency code of transfer. For example, **USD** or **EUR**. Currency string `json:"currency"` - // The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. 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). + // The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. 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 within the United States and in [SEPA locations](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). Priorities []string `json:"priorities,omitempty"` } diff --git a/src/balanceplatform/model_transfer_route_requirements_inner.go b/src/balanceplatform/model_transfer_route_requirements_inner.go index fa0c12298..098fc923f 100644 --- a/src/balanceplatform/model_transfer_route_requirements_inner.go +++ b/src/balanceplatform/model_transfer_route_requirements_inner.go @@ -15,6 +15,7 @@ import ( // TransferRouteRequirementsInner - struct for TransferRouteRequirementsInner type TransferRouteRequirementsInner struct { + AdditionalBankIdentificationRequirement *AdditionalBankIdentificationRequirement AddressRequirement *AddressRequirement AmountMinMaxRequirement *AmountMinMaxRequirement AmountNonZeroDecimalsRequirement *AmountNonZeroDecimalsRequirement @@ -23,6 +24,14 @@ type TransferRouteRequirementsInner struct { PaymentInstrumentRequirement *PaymentInstrumentRequirement USInstantPayoutAddressRequirement *USInstantPayoutAddressRequirement USInternationalAchAddressRequirement *USInternationalAchAddressRequirement + USInternationalAchPriorityRequirement *USInternationalAchPriorityRequirement +} + +// AdditionalBankIdentificationRequirementAsTransferRouteRequirementsInner is a convenience function that returns AdditionalBankIdentificationRequirement wrapped in TransferRouteRequirementsInner +func AdditionalBankIdentificationRequirementAsTransferRouteRequirementsInner(v *AdditionalBankIdentificationRequirement) TransferRouteRequirementsInner { + return TransferRouteRequirementsInner{ + AdditionalBankIdentificationRequirement: v, + } } // AddressRequirementAsTransferRouteRequirementsInner is a convenience function that returns AddressRequirement wrapped in TransferRouteRequirementsInner @@ -81,10 +90,30 @@ func USInternationalAchAddressRequirementAsTransferRouteRequirementsInner(v *USI } } +// USInternationalAchPriorityRequirementAsTransferRouteRequirementsInner is a convenience function that returns USInternationalAchPriorityRequirement wrapped in TransferRouteRequirementsInner +func USInternationalAchPriorityRequirementAsTransferRouteRequirementsInner(v *USInternationalAchPriorityRequirement) TransferRouteRequirementsInner { + return TransferRouteRequirementsInner{ + USInternationalAchPriorityRequirement: v, + } +} + // Unmarshal JSON data into one of the pointers in the struct func (dst *TransferRouteRequirementsInner) UnmarshalJSON(data []byte) error { var err error match := 0 + // try to unmarshal data into AdditionalBankIdentificationRequirement + err = json.Unmarshal(data, &dst.AdditionalBankIdentificationRequirement) + if err == nil { + jsonAdditionalBankIdentificationRequirement, _ := json.Marshal(dst.AdditionalBankIdentificationRequirement) + if string(jsonAdditionalBankIdentificationRequirement) == "{}" || !dst.AdditionalBankIdentificationRequirement.isValidType() { // empty struct + dst.AdditionalBankIdentificationRequirement = nil + } else { + match++ + } + } else { + dst.AdditionalBankIdentificationRequirement = nil + } + // try to unmarshal data into AddressRequirement err = json.Unmarshal(data, &dst.AddressRequirement) if err == nil { @@ -189,8 +218,22 @@ func (dst *TransferRouteRequirementsInner) UnmarshalJSON(data []byte) error { dst.USInternationalAchAddressRequirement = nil } + // try to unmarshal data into USInternationalAchPriorityRequirement + err = json.Unmarshal(data, &dst.USInternationalAchPriorityRequirement) + if err == nil { + jsonUSInternationalAchPriorityRequirement, _ := json.Marshal(dst.USInternationalAchPriorityRequirement) + if string(jsonUSInternationalAchPriorityRequirement) == "{}" || !dst.USInternationalAchPriorityRequirement.isValidType() { // empty struct + dst.USInternationalAchPriorityRequirement = nil + } else { + match++ + } + } else { + dst.USInternationalAchPriorityRequirement = nil + } + if match > 1 { // more than 1 match // reset to nil + dst.AdditionalBankIdentificationRequirement = nil dst.AddressRequirement = nil dst.AmountMinMaxRequirement = nil dst.AmountNonZeroDecimalsRequirement = nil @@ -199,6 +242,7 @@ func (dst *TransferRouteRequirementsInner) UnmarshalJSON(data []byte) error { dst.PaymentInstrumentRequirement = nil dst.USInstantPayoutAddressRequirement = nil dst.USInternationalAchAddressRequirement = nil + dst.USInternationalAchPriorityRequirement = nil return fmt.Errorf("data matches more than one schema in oneOf(TransferRouteRequirementsInner)") } else if match == 1 { @@ -210,6 +254,10 @@ func (dst *TransferRouteRequirementsInner) UnmarshalJSON(data []byte) error { // Marshal data from the first non-nil pointers in the struct to JSON func (src TransferRouteRequirementsInner) MarshalJSON() ([]byte, error) { + if src.AdditionalBankIdentificationRequirement != nil { + return json.Marshal(&src.AdditionalBankIdentificationRequirement) + } + if src.AddressRequirement != nil { return json.Marshal(&src.AddressRequirement) } @@ -242,6 +290,10 @@ func (src TransferRouteRequirementsInner) MarshalJSON() ([]byte, error) { return json.Marshal(&src.USInternationalAchAddressRequirement) } + if src.USInternationalAchPriorityRequirement != nil { + return json.Marshal(&src.USInternationalAchPriorityRequirement) + } + return nil, nil // no data in oneOf schemas } @@ -250,6 +302,10 @@ func (obj *TransferRouteRequirementsInner) GetActualInstance() interface{} { if obj == nil { return nil } + if obj.AdditionalBankIdentificationRequirement != nil { + return obj.AdditionalBankIdentificationRequirement + } + if obj.AddressRequirement != nil { return obj.AddressRequirement } @@ -282,6 +338,10 @@ func (obj *TransferRouteRequirementsInner) GetActualInstance() interface{} { return obj.USInternationalAchAddressRequirement } + if obj.USInternationalAchPriorityRequirement != nil { + return obj.USInternationalAchPriorityRequirement + } + // all schemas are nil return nil } diff --git a/src/balanceplatform/model_transfer_type.go b/src/balanceplatform/model_transfer_type.go new file mode 100644 index 000000000..5dddfd200 --- /dev/null +++ b/src/balanceplatform/model_transfer_type.go @@ -0,0 +1,108 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + "fmt" +) + +// TransferType The type of transfer to which the limit applies. Possible values: * **instant**: the limit applies to transfers with an **instant** priority. * **all**: the limit applies to all transfers, regardless of priority. +type TransferType string + +// List of TransferType +const ( + INSTANT TransferType = "instant" + ALL TransferType = "all" +) + +// All allowed values of TransferType enum +var AllowedTransferTypeEnumValues = []TransferType{ + "instant", + "all", +} + +func (v *TransferType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := TransferType(value) + for _, existing := range AllowedTransferTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid TransferType", value) +} + +// NewTransferTypeFromValue returns a pointer to a valid TransferType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewTransferTypeFromValue(v string) (*TransferType, error) { + ev := TransferType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for TransferType: valid values are %v", v, AllowedTransferTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v TransferType) IsValid() bool { + for _, existing := range AllowedTransferTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to TransferType value +func (v TransferType) Ptr() *TransferType { + return &v +} + +type NullableTransferType struct { + value *TransferType + isSet bool +} + +func (v NullableTransferType) Get() *TransferType { + return v.value +} + +func (v *NullableTransferType) Set(val *TransferType) { + v.value = val + v.isSet = true +} + +func (v NullableTransferType) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferType(val *TransferType) *NullableTransferType { + return &NullableTransferType{value: val, isSet: true} +} + +func (v NullableTransferType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_update_sweep_configuration_v2.go b/src/balanceplatform/model_update_sweep_configuration_v2.go index 92a4b79c7..1adb4c84a 100644 --- a/src/balanceplatform/model_update_sweep_configuration_v2.go +++ b/src/balanceplatform/model_update_sweep_configuration_v2.go @@ -28,7 +28,7 @@ type UpdateSweepConfigurationV2 struct { Description *string `json:"description,omitempty"` // The unique identifier of the sweep. Id *string `json:"id,omitempty"` - // 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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). + // 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, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. 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 within the United States and in [SEPA locations](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"` @@ -688,7 +688,7 @@ func (o *UpdateSweepConfigurationV2) isValidCategory() bool { return false } func (o *UpdateSweepConfigurationV2) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/balanceplatform/model_us_international_ach_priority_requirement.go b/src/balanceplatform/model_us_international_ach_priority_requirement.go new file mode 100644 index 000000000..2a2712b93 --- /dev/null +++ b/src/balanceplatform/model_us_international_ach_priority_requirement.go @@ -0,0 +1,165 @@ +/* +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/v21/src/common" +) + +// checks if the USInternationalAchPriorityRequirement type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &USInternationalAchPriorityRequirement{} + +// USInternationalAchPriorityRequirement struct for USInternationalAchPriorityRequirement +type USInternationalAchPriorityRequirement struct { + // Specifies that transactions deemed to be International ACH (IAT) per OFAC/NACHA rules cannot have fast priority. + Description *string `json:"description,omitempty"` + // **usInternationalAchPriorityRequirement** + Type string `json:"type"` +} + +// NewUSInternationalAchPriorityRequirement instantiates a new USInternationalAchPriorityRequirement 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 NewUSInternationalAchPriorityRequirement(type_ string) *USInternationalAchPriorityRequirement { + this := USInternationalAchPriorityRequirement{} + this.Type = type_ + return &this +} + +// NewUSInternationalAchPriorityRequirementWithDefaults instantiates a new USInternationalAchPriorityRequirement 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 NewUSInternationalAchPriorityRequirementWithDefaults() *USInternationalAchPriorityRequirement { + this := USInternationalAchPriorityRequirement{} + var type_ string = "usInternationalAchPriorityRequirement" + this.Type = type_ + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *USInternationalAchPriorityRequirement) 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 *USInternationalAchPriorityRequirement) 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 *USInternationalAchPriorityRequirement) 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 *USInternationalAchPriorityRequirement) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value +func (o *USInternationalAchPriorityRequirement) 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 *USInternationalAchPriorityRequirement) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *USInternationalAchPriorityRequirement) SetType(v string) { + o.Type = v +} + +func (o USInternationalAchPriorityRequirement) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o USInternationalAchPriorityRequirement) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableUSInternationalAchPriorityRequirement struct { + value *USInternationalAchPriorityRequirement + isSet bool +} + +func (v NullableUSInternationalAchPriorityRequirement) Get() *USInternationalAchPriorityRequirement { + return v.value +} + +func (v *NullableUSInternationalAchPriorityRequirement) Set(val *USInternationalAchPriorityRequirement) { + v.value = val + v.isSet = true +} + +func (v NullableUSInternationalAchPriorityRequirement) IsSet() bool { + return v.isSet +} + +func (v *NullableUSInternationalAchPriorityRequirement) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUSInternationalAchPriorityRequirement(val *USInternationalAchPriorityRequirement) *NullableUSInternationalAchPriorityRequirement { + return &NullableUSInternationalAchPriorityRequirement{value: val, isSet: true} +} + +func (v NullableUSInternationalAchPriorityRequirement) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUSInternationalAchPriorityRequirement) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *USInternationalAchPriorityRequirement) isValidType() bool { + var allowedEnumValues = []string{"usInternationalAchPriorityRequirement"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_verification_error.go b/src/balanceplatform/model_verification_error.go index 5d0fd64ef..9d35c20ad 100644 --- a/src/balanceplatform/model_verification_error.go +++ b/src/balanceplatform/model_verification_error.go @@ -29,7 +29,7 @@ type VerificationError struct { RemediatingActions []RemediatingAction `json:"remediatingActions,omitempty"` // Contains more granular information about the verification error. SubErrors []VerificationErrorRecursive `json:"subErrors,omitempty"` - // The type of error. Possible values: **invalidInput**, **dataMissing**. + // The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableVerificationError) UnmarshalJSON(src []byte) error { } func (o *VerificationError) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/balanceplatform/model_verification_error_recursive.go b/src/balanceplatform/model_verification_error_recursive.go index a69858c82..9e2c7e529 100644 --- a/src/balanceplatform/model_verification_error_recursive.go +++ b/src/balanceplatform/model_verification_error_recursive.go @@ -25,7 +25,7 @@ type VerificationErrorRecursive struct { Code *string `json:"code,omitempty"` // A description of the error. Message *string `json:"message,omitempty"` - // The type of error. Possible values: **invalidInput**, **dataMissing**. + // The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** Type *string `json:"type,omitempty"` // Contains the actions that you can take to resolve the verification error. RemediatingActions []RemediatingAction `json:"remediatingActions,omitempty"` @@ -273,7 +273,7 @@ func (v *NullableVerificationErrorRecursive) UnmarshalJSON(src []byte) error { } func (o *VerificationErrorRecursive) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/balanceplatform/model_wallet_provider_device_type.go b/src/balanceplatform/model_wallet_provider_device_type.go new file mode 100644 index 000000000..b33b23544 --- /dev/null +++ b/src/balanceplatform/model_wallet_provider_device_type.go @@ -0,0 +1,152 @@ +/* +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/v21/src/common" +) + +// checks if the WalletProviderDeviceType type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &WalletProviderDeviceType{} + +// WalletProviderDeviceType struct for WalletProviderDeviceType +type WalletProviderDeviceType struct { + // Defines how the condition must be evaluated. + Operation string `json:"operation"` + Value []string `json:"value,omitempty"` +} + +// NewWalletProviderDeviceType instantiates a new WalletProviderDeviceType 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 NewWalletProviderDeviceType(operation string) *WalletProviderDeviceType { + this := WalletProviderDeviceType{} + this.Operation = operation + return &this +} + +// NewWalletProviderDeviceTypeWithDefaults instantiates a new WalletProviderDeviceType 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 NewWalletProviderDeviceTypeWithDefaults() *WalletProviderDeviceType { + this := WalletProviderDeviceType{} + return &this +} + +// GetOperation returns the Operation field value +func (o *WalletProviderDeviceType) GetOperation() string { + if o == nil { + var ret string + return ret + } + + return o.Operation +} + +// GetOperationOk returns a tuple with the Operation field value +// and a boolean to check if the value has been set. +func (o *WalletProviderDeviceType) GetOperationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operation, true +} + +// SetOperation sets field value +func (o *WalletProviderDeviceType) SetOperation(v string) { + o.Operation = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *WalletProviderDeviceType) GetValue() []string { + if o == nil || common.IsNil(o.Value) { + var ret []string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WalletProviderDeviceType) GetValueOk() ([]string, bool) { + if o == nil || common.IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *WalletProviderDeviceType) HasValue() bool { + if o != nil && !common.IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given []string and assigns it to the Value field. +func (o *WalletProviderDeviceType) SetValue(v []string) { + o.Value = v +} + +func (o WalletProviderDeviceType) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WalletProviderDeviceType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["operation"] = o.Operation + if !common.IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableWalletProviderDeviceType struct { + value *WalletProviderDeviceType + isSet bool +} + +func (v NullableWalletProviderDeviceType) Get() *WalletProviderDeviceType { + return v.value +} + +func (v *NullableWalletProviderDeviceType) Set(val *WalletProviderDeviceType) { + v.value = val + v.isSet = true +} + +func (v NullableWalletProviderDeviceType) IsSet() bool { + return v.isSet +} + +func (v *NullableWalletProviderDeviceType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWalletProviderDeviceType(val *WalletProviderDeviceType) *NullableWalletProviderDeviceType { + return &NullableWalletProviderDeviceType{value: val, isSet: true} +} + +func (v NullableWalletProviderDeviceType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWalletProviderDeviceType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_webhook_setting.go b/src/balanceplatform/model_webhook_setting.go new file mode 100644 index 000000000..c7c49821a --- /dev/null +++ b/src/balanceplatform/model_webhook_setting.go @@ -0,0 +1,225 @@ +/* +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/v21/src/common" +) + +// checks if the WebhookSetting type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &WebhookSetting{} + +// WebhookSetting struct for WebhookSetting +type WebhookSetting struct { + // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. + Currency string `json:"currency"` + // The unique identifier of the webhook setting. + Id string `json:"id"` + Status string `json:"status"` + Target Target `json:"target"` + Type SettingType `json:"type"` +} + +// NewWebhookSetting instantiates a new WebhookSetting 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 NewWebhookSetting(currency string, id string, status string, target Target, type_ SettingType) *WebhookSetting { + this := WebhookSetting{} + this.Currency = currency + this.Id = id + this.Status = status + this.Target = target + this.Type = type_ + return &this +} + +// NewWebhookSettingWithDefaults instantiates a new WebhookSetting 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 NewWebhookSettingWithDefaults() *WebhookSetting { + this := WebhookSetting{} + return &this +} + +// GetCurrency returns the Currency field value +func (o *WebhookSetting) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *WebhookSetting) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *WebhookSetting) SetCurrency(v string) { + o.Currency = v +} + +// GetId returns the Id field value +func (o *WebhookSetting) 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 *WebhookSetting) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WebhookSetting) SetId(v string) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *WebhookSetting) 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 *WebhookSetting) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *WebhookSetting) SetStatus(v string) { + o.Status = v +} + +// GetTarget returns the Target field value +func (o *WebhookSetting) GetTarget() Target { + if o == nil { + var ret Target + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *WebhookSetting) GetTargetOk() (*Target, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *WebhookSetting) SetTarget(v Target) { + o.Target = v +} + +// GetType returns the Type field value +func (o *WebhookSetting) GetType() SettingType { + if o == nil { + var ret SettingType + 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 *WebhookSetting) GetTypeOk() (*SettingType, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *WebhookSetting) SetType(v SettingType) { + o.Type = v +} + +func (o WebhookSetting) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WebhookSetting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["currency"] = o.Currency + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["target"] = o.Target + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableWebhookSetting struct { + value *WebhookSetting + isSet bool +} + +func (v NullableWebhookSetting) Get() *WebhookSetting { + return v.value +} + +func (v *NullableWebhookSetting) Set(val *WebhookSetting) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookSetting) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookSetting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookSetting(val *WebhookSetting) *NullableWebhookSetting { + return &NullableWebhookSetting{value: val, isSet: true} +} + +func (v NullableWebhookSetting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookSetting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_webhook_settings.go b/src/balanceplatform/model_webhook_settings.go new file mode 100644 index 000000000..81da7d420 --- /dev/null +++ b/src/balanceplatform/model_webhook_settings.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the WebhookSettings type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &WebhookSettings{} + +// WebhookSettings struct for WebhookSettings +type WebhookSettings struct { + // The list of webhook settings. + WebhookSettings []WebhookSetting `json:"webhookSettings,omitempty"` +} + +// NewWebhookSettings instantiates a new WebhookSettings 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 NewWebhookSettings() *WebhookSettings { + this := WebhookSettings{} + return &this +} + +// NewWebhookSettingsWithDefaults instantiates a new WebhookSettings 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 NewWebhookSettingsWithDefaults() *WebhookSettings { + this := WebhookSettings{} + return &this +} + +// GetWebhookSettings returns the WebhookSettings field value if set, zero value otherwise. +func (o *WebhookSettings) GetWebhookSettings() []WebhookSetting { + if o == nil || common.IsNil(o.WebhookSettings) { + var ret []WebhookSetting + return ret + } + return o.WebhookSettings +} + +// GetWebhookSettingsOk returns a tuple with the WebhookSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookSettings) GetWebhookSettingsOk() ([]WebhookSetting, bool) { + if o == nil || common.IsNil(o.WebhookSettings) { + return nil, false + } + return o.WebhookSettings, true +} + +// HasWebhookSettings returns a boolean if a field has been set. +func (o *WebhookSettings) HasWebhookSettings() bool { + if o != nil && !common.IsNil(o.WebhookSettings) { + return true + } + + return false +} + +// SetWebhookSettings gets a reference to the given []WebhookSetting and assigns it to the WebhookSettings field. +func (o *WebhookSettings) SetWebhookSettings(v []WebhookSetting) { + o.WebhookSettings = v +} + +func (o WebhookSettings) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WebhookSettings) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.WebhookSettings) { + toSerialize["webhookSettings"] = o.WebhookSettings + } + return toSerialize, nil +} + +type NullableWebhookSettings struct { + value *WebhookSettings + isSet bool +} + +func (v NullableWebhookSettings) Get() *WebhookSettings { + return v.value +} + +func (v *NullableWebhookSettings) Set(val *WebhookSettings) { + v.value = val + v.isSet = true +} + +func (v NullableWebhookSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableWebhookSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWebhookSettings(val *WebhookSettings) *NullableWebhookSettings { + return &NullableWebhookSettings{value: val, isSet: true} +} + +func (v NullableWebhookSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWebhookSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/api_legal_entities.go b/src/legalentity/api_legal_entities.go index 34f93a3b0..51f666f9e 100644 --- a/src/legalentity/api_legal_entities.go +++ b/src/legalentity/api_legal_entities.go @@ -299,6 +299,51 @@ func (a *LegalEntitiesApi) GetLegalEntity(ctx context.Context, r LegalEntitiesAp return *res, httpRes, err } +// All parameters accepted by LegalEntitiesApi.RequestPeriodicReview +type LegalEntitiesApiRequestPeriodicReviewInput struct { + id string +} + +/* +Prepare a request for RequestPeriodicReview +@param id The unique identifier of the legal entity. +@return LegalEntitiesApiRequestPeriodicReviewInput +*/ +func (a *LegalEntitiesApi) RequestPeriodicReviewInput(id string) LegalEntitiesApiRequestPeriodicReviewInput { + return LegalEntitiesApiRequestPeriodicReviewInput{ + id: id, + } +} + +/* +RequestPeriodicReview Request periodic data review. + +Requests a periodic data review for the legal entity of the user specified in the path. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r LegalEntitiesApiRequestPeriodicReviewInput - Request parameters, see RequestPeriodicReviewInput +@return *http.Response, error +*/ +func (a *LegalEntitiesApi) RequestPeriodicReview(ctx context.Context, r LegalEntitiesApiRequestPeriodicReviewInput) (*http.Response, error) { + var res interface{} + path := "/legalEntities/{id}/requestPeriodicReview" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return httpRes, err +} + // All parameters accepted by LegalEntitiesApi.UpdateLegalEntity type LegalEntitiesApiUpdateLegalEntityInput struct { id string diff --git a/src/legalentity/model_attachment.go b/src/legalentity/model_attachment.go index 3ab384b8f..2e8f52bde 100644 --- a/src/legalentity/model_attachment.go +++ b/src/legalentity/model_attachment.go @@ -29,7 +29,7 @@ type Attachment struct { Filename *string `json:"filename,omitempty"` // The name of the file including the file extension. PageName *string `json:"pageName,omitempty"` - // Specifies which side of the ID card is uploaded. * If the `type` is **driversLicense** or **identityCard**, you must set this to **front** or **back**. * For any other types, when this is omitted, we infer the page number based on the order of attachments. + // Specifies which side of the ID card is uploaded. * If the `type` is **driversLicense** or **identityCard**, you must set this to **front** or **back** and include both sides in the same API request. * For any other types, when this is omitted, we infer the page number based on the order of attachments. PageType *string `json:"pageType,omitempty"` } diff --git a/src/legalentity/model_financial_report.go b/src/legalentity/model_financial_report.go index 0d8790791..be1fe03cf 100644 --- a/src/legalentity/model_financial_report.go +++ b/src/legalentity/model_financial_report.go @@ -26,7 +26,7 @@ type FinancialReport struct { // The currency used for the annual turnover, balance sheet total, and net assets. CurrencyOfFinancialData *string `json:"currencyOfFinancialData,omitempty"` // The date the financial data were provided, in YYYY-MM-DD format. - DateOfFinancialData string `json:"dateOfFinancialData"` + DateOfFinancialData *string `json:"dateOfFinancialData,omitempty"` // The number of employees of the business. EmployeeCount *string `json:"employeeCount,omitempty"` // The net assets of the business. @@ -37,9 +37,8 @@ type FinancialReport struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFinancialReport(dateOfFinancialData string) *FinancialReport { +func NewFinancialReport() *FinancialReport { this := FinancialReport{} - this.DateOfFinancialData = dateOfFinancialData return &this } @@ -147,28 +146,36 @@ func (o *FinancialReport) SetCurrencyOfFinancialData(v string) { o.CurrencyOfFinancialData = &v } -// GetDateOfFinancialData returns the DateOfFinancialData field value +// GetDateOfFinancialData returns the DateOfFinancialData field value if set, zero value otherwise. func (o *FinancialReport) GetDateOfFinancialData() string { - if o == nil { + if o == nil || common.IsNil(o.DateOfFinancialData) { var ret string return ret } - - return o.DateOfFinancialData + return *o.DateOfFinancialData } -// GetDateOfFinancialDataOk returns a tuple with the DateOfFinancialData field value +// GetDateOfFinancialDataOk returns a tuple with the DateOfFinancialData field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *FinancialReport) GetDateOfFinancialDataOk() (*string, bool) { - if o == nil { + if o == nil || common.IsNil(o.DateOfFinancialData) { return nil, false } - return &o.DateOfFinancialData, true + return o.DateOfFinancialData, true +} + +// HasDateOfFinancialData returns a boolean if a field has been set. +func (o *FinancialReport) HasDateOfFinancialData() bool { + if o != nil && !common.IsNil(o.DateOfFinancialData) { + return true + } + + return false } -// SetDateOfFinancialData sets field value +// SetDateOfFinancialData gets a reference to the given string and assigns it to the DateOfFinancialData field. func (o *FinancialReport) SetDateOfFinancialData(v string) { - o.DateOfFinancialData = v + o.DateOfFinancialData = &v } // GetEmployeeCount returns the EmployeeCount field value if set, zero value otherwise. @@ -254,7 +261,9 @@ func (o FinancialReport) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CurrencyOfFinancialData) { toSerialize["currencyOfFinancialData"] = o.CurrencyOfFinancialData } - toSerialize["dateOfFinancialData"] = o.DateOfFinancialData + if !common.IsNil(o.DateOfFinancialData) { + toSerialize["dateOfFinancialData"] = o.DateOfFinancialData + } if !common.IsNil(o.EmployeeCount) { toSerialize["employeeCount"] = o.EmployeeCount } diff --git a/src/sessionauthentication/api_session_authentication.go b/src/sessionauthentication/api_session_authentication.go new file mode 100644 index 000000000..ac86f0ecc --- /dev/null +++ b/src/sessionauthentication/api_session_authentication.go @@ -0,0 +1,71 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "context" + "net/http" + "net/url" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// SessionAuthenticationApi service +type SessionAuthenticationApi common.Service + +// All parameters accepted by SessionAuthenticationApi.CreateAuthenticationSession +type SessionAuthenticationApiCreateAuthenticationSessionInput struct { + authenticationSessionRequest *AuthenticationSessionRequest +} + +func (r SessionAuthenticationApiCreateAuthenticationSessionInput) AuthenticationSessionRequest(authenticationSessionRequest AuthenticationSessionRequest) SessionAuthenticationApiCreateAuthenticationSessionInput { + r.authenticationSessionRequest = &authenticationSessionRequest + return r +} + +/* +Prepare a request for CreateAuthenticationSession + +@return SessionAuthenticationApiCreateAuthenticationSessionInput +*/ +func (a *SessionAuthenticationApi) CreateAuthenticationSessionInput() SessionAuthenticationApiCreateAuthenticationSessionInput { + return SessionAuthenticationApiCreateAuthenticationSessionInput{} +} + +/* +CreateAuthenticationSession Create a session token + +Creates a session token that is required to integrate [components](https://docs.adyen.com/platforms/components-overview). + +The response contains encrypted session data. The front end then uses the session data to make the required server-side calls for the component. + +To create a token, you must meet specific requirements. These requirements vary depending on the type of component. For more information, see the documentation for [Onboarding](https://docs.adyen.com/platforms/onboard-users/components) and [Platform Experience](https://docs.adyen.com/platforms/build-user-dashboards) components. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r SessionAuthenticationApiCreateAuthenticationSessionInput - Request parameters, see CreateAuthenticationSessionInput +@return AuthenticationSessionResponse, *http.Response, error +*/ +func (a *SessionAuthenticationApi) CreateAuthenticationSession(ctx context.Context, r SessionAuthenticationApiCreateAuthenticationSessionInput) (AuthenticationSessionResponse, *http.Response, error) { + res := &AuthenticationSessionResponse{} + path := "/sessions" + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.authenticationSessionRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} diff --git a/src/sessionauthentication/client.go b/src/sessionauthentication/client.go new file mode 100644 index 000000000..b9b2fa28c --- /dev/null +++ b/src/sessionauthentication/client.go @@ -0,0 +1,37 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// APIClient manages communication with the Session authentication API API v1 +// 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 + + SessionAuthenticationApi *SessionAuthenticationApi +} + +// 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.SessionAuthenticationEndpoint + } + + // API Services + c.SessionAuthenticationApi = (*SessionAuthenticationApi)(&c.common) + + return c +} diff --git a/src/sessionauthentication/model_account_holder_resource.go b/src/sessionauthentication/model_account_holder_resource.go new file mode 100644 index 000000000..0ebd81ae3 --- /dev/null +++ b/src/sessionauthentication/model_account_holder_resource.go @@ -0,0 +1,116 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the AccountHolderResource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AccountHolderResource{} + +// AccountHolderResource struct for AccountHolderResource +type AccountHolderResource struct { + // The unique identifier of the resource connected to the component. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the account holder linked to the balance account shown in the component. + AccountHolderId string `json:"accountHolderId"` +} + +// NewAccountHolderResource instantiates a new AccountHolderResource 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 NewAccountHolderResource(accountHolderId string) *AccountHolderResource { + this := AccountHolderResource{} + this.AccountHolderId = accountHolderId + return &this +} + +// NewAccountHolderResourceWithDefaults instantiates a new AccountHolderResource 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 NewAccountHolderResourceWithDefaults() *AccountHolderResource { + this := AccountHolderResource{} + return &this +} + +// GetAccountHolderId returns the AccountHolderId field value +func (o *AccountHolderResource) GetAccountHolderId() string { + if o == nil { + var ret string + return ret + } + + return o.AccountHolderId +} + +// GetAccountHolderIdOk returns a tuple with the AccountHolderId field value +// and a boolean to check if the value has been set. +func (o *AccountHolderResource) GetAccountHolderIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountHolderId, true +} + +// SetAccountHolderId sets field value +func (o *AccountHolderResource) SetAccountHolderId(v string) { + o.AccountHolderId = v +} + +func (o AccountHolderResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountHolderResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["accountHolderId"] = o.AccountHolderId + return toSerialize, nil +} + +type NullableAccountHolderResource struct { + value *AccountHolderResource + isSet bool +} + +func (v NullableAccountHolderResource) Get() *AccountHolderResource { + return v.value +} + +func (v *NullableAccountHolderResource) Set(val *AccountHolderResource) { + v.value = val + v.isSet = true +} + +func (v NullableAccountHolderResource) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountHolderResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountHolderResource(val *AccountHolderResource) *NullableAccountHolderResource { + return &NullableAccountHolderResource{value: val, isSet: true} +} + +func (v NullableAccountHolderResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountHolderResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_account_holder_resource_all_of.go b/src/sessionauthentication/model_account_holder_resource_all_of.go new file mode 100644 index 000000000..266a2c55b --- /dev/null +++ b/src/sessionauthentication/model_account_holder_resource_all_of.go @@ -0,0 +1,125 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the AccountHolderResourceAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AccountHolderResourceAllOf{} + +// AccountHolderResourceAllOf struct for AccountHolderResourceAllOf +type AccountHolderResourceAllOf struct { + // The unique identifier of the resource connected to the component. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the account holder linked to the balance account shown in the component. + AccountHolderId *string `json:"accountHolderId,omitempty"` +} + +// NewAccountHolderResourceAllOf instantiates a new AccountHolderResourceAllOf 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 NewAccountHolderResourceAllOf() *AccountHolderResourceAllOf { + this := AccountHolderResourceAllOf{} + return &this +} + +// NewAccountHolderResourceAllOfWithDefaults instantiates a new AccountHolderResourceAllOf 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 NewAccountHolderResourceAllOfWithDefaults() *AccountHolderResourceAllOf { + this := AccountHolderResourceAllOf{} + return &this +} + +// GetAccountHolderId returns the AccountHolderId field value if set, zero value otherwise. +func (o *AccountHolderResourceAllOf) GetAccountHolderId() string { + if o == nil || common.IsNil(o.AccountHolderId) { + var ret string + return ret + } + return *o.AccountHolderId +} + +// GetAccountHolderIdOk returns a tuple with the AccountHolderId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountHolderResourceAllOf) GetAccountHolderIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AccountHolderId) { + return nil, false + } + return o.AccountHolderId, true +} + +// HasAccountHolderId returns a boolean if a field has been set. +func (o *AccountHolderResourceAllOf) HasAccountHolderId() bool { + if o != nil && !common.IsNil(o.AccountHolderId) { + return true + } + + return false +} + +// SetAccountHolderId gets a reference to the given string and assigns it to the AccountHolderId field. +func (o *AccountHolderResourceAllOf) SetAccountHolderId(v string) { + o.AccountHolderId = &v +} + +func (o AccountHolderResourceAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountHolderResourceAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AccountHolderId) { + toSerialize["accountHolderId"] = o.AccountHolderId + } + return toSerialize, nil +} + +type NullableAccountHolderResourceAllOf struct { + value *AccountHolderResourceAllOf + isSet bool +} + +func (v NullableAccountHolderResourceAllOf) Get() *AccountHolderResourceAllOf { + return v.value +} + +func (v *NullableAccountHolderResourceAllOf) Set(val *AccountHolderResourceAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableAccountHolderResourceAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountHolderResourceAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountHolderResourceAllOf(val *AccountHolderResourceAllOf) *NullableAccountHolderResourceAllOf { + return &NullableAccountHolderResourceAllOf{value: val, isSet: true} +} + +func (v NullableAccountHolderResourceAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountHolderResourceAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_authentication_session_request.go b/src/sessionauthentication/model_authentication_session_request.go new file mode 100644 index 000000000..b0f348048 --- /dev/null +++ b/src/sessionauthentication/model_authentication_session_request.go @@ -0,0 +1,170 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the AuthenticationSessionRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AuthenticationSessionRequest{} + +// AuthenticationSessionRequest struct for AuthenticationSessionRequest +type AuthenticationSessionRequest struct { + // The URL where the component will appear. In your live environment, you must protect the URL with an SSL certificate and ensure that it starts with `https://`. + AllowOrigin string `json:"allowOrigin"` + Policy Policy `json:"policy"` + Product ProductType `json:"product"` +} + +// NewAuthenticationSessionRequest instantiates a new AuthenticationSessionRequest 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 NewAuthenticationSessionRequest(allowOrigin string, policy Policy, product ProductType) *AuthenticationSessionRequest { + this := AuthenticationSessionRequest{} + this.AllowOrigin = allowOrigin + this.Policy = policy + this.Product = product + return &this +} + +// NewAuthenticationSessionRequestWithDefaults instantiates a new AuthenticationSessionRequest 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 NewAuthenticationSessionRequestWithDefaults() *AuthenticationSessionRequest { + this := AuthenticationSessionRequest{} + return &this +} + +// GetAllowOrigin returns the AllowOrigin field value +func (o *AuthenticationSessionRequest) GetAllowOrigin() string { + if o == nil { + var ret string + return ret + } + + return o.AllowOrigin +} + +// GetAllowOriginOk returns a tuple with the AllowOrigin field value +// and a boolean to check if the value has been set. +func (o *AuthenticationSessionRequest) GetAllowOriginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AllowOrigin, true +} + +// SetAllowOrigin sets field value +func (o *AuthenticationSessionRequest) SetAllowOrigin(v string) { + o.AllowOrigin = v +} + +// GetPolicy returns the Policy field value +func (o *AuthenticationSessionRequest) GetPolicy() Policy { + if o == nil { + var ret Policy + return ret + } + + return o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value +// and a boolean to check if the value has been set. +func (o *AuthenticationSessionRequest) GetPolicyOk() (*Policy, bool) { + if o == nil { + return nil, false + } + return &o.Policy, true +} + +// SetPolicy sets field value +func (o *AuthenticationSessionRequest) SetPolicy(v Policy) { + o.Policy = v +} + +// GetProduct returns the Product field value +func (o *AuthenticationSessionRequest) GetProduct() ProductType { + if o == nil { + var ret ProductType + return ret + } + + return o.Product +} + +// GetProductOk returns a tuple with the Product field value +// and a boolean to check if the value has been set. +func (o *AuthenticationSessionRequest) GetProductOk() (*ProductType, bool) { + if o == nil { + return nil, false + } + return &o.Product, true +} + +// SetProduct sets field value +func (o *AuthenticationSessionRequest) SetProduct(v ProductType) { + o.Product = v +} + +func (o AuthenticationSessionRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationSessionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["allowOrigin"] = o.AllowOrigin + toSerialize["policy"] = o.Policy + toSerialize["product"] = o.Product + return toSerialize, nil +} + +type NullableAuthenticationSessionRequest struct { + value *AuthenticationSessionRequest + isSet bool +} + +func (v NullableAuthenticationSessionRequest) Get() *AuthenticationSessionRequest { + return v.value +} + +func (v *NullableAuthenticationSessionRequest) Set(val *AuthenticationSessionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationSessionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationSessionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationSessionRequest(val *AuthenticationSessionRequest) *NullableAuthenticationSessionRequest { + return &NullableAuthenticationSessionRequest{value: val, isSet: true} +} + +func (v NullableAuthenticationSessionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationSessionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_authentication_session_response.go b/src/sessionauthentication/model_authentication_session_response.go new file mode 100644 index 000000000..c1f1e27f6 --- /dev/null +++ b/src/sessionauthentication/model_authentication_session_response.go @@ -0,0 +1,162 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the AuthenticationSessionResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AuthenticationSessionResponse{} + +// AuthenticationSessionResponse struct for AuthenticationSessionResponse +type AuthenticationSessionResponse struct { + // The unique identifier of the session. + Id *string `json:"id,omitempty"` + // The session token created. + Token *string `json:"token,omitempty"` +} + +// NewAuthenticationSessionResponse instantiates a new AuthenticationSessionResponse 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 NewAuthenticationSessionResponse() *AuthenticationSessionResponse { + this := AuthenticationSessionResponse{} + return &this +} + +// NewAuthenticationSessionResponseWithDefaults instantiates a new AuthenticationSessionResponse 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 NewAuthenticationSessionResponseWithDefaults() *AuthenticationSessionResponse { + this := AuthenticationSessionResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) SetId(v string) { + o.Id = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) 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 *AuthenticationSessionResponse) SetToken(v string) { + o.Token = &v +} + +func (o AuthenticationSessionResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthenticationSessionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Token) { + toSerialize["token"] = o.Token + } + return toSerialize, nil +} + +type NullableAuthenticationSessionResponse struct { + value *AuthenticationSessionResponse + isSet bool +} + +func (v NullableAuthenticationSessionResponse) Get() *AuthenticationSessionResponse { + return v.value +} + +func (v *NullableAuthenticationSessionResponse) Set(val *AuthenticationSessionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAuthenticationSessionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthenticationSessionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthenticationSessionResponse(val *AuthenticationSessionResponse) *NullableAuthenticationSessionResponse { + return &NullableAuthenticationSessionResponse{value: val, isSet: true} +} + +func (v NullableAuthenticationSessionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthenticationSessionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_balance_account_resource.go b/src/sessionauthentication/model_balance_account_resource.go new file mode 100644 index 000000000..b639ed6e1 --- /dev/null +++ b/src/sessionauthentication/model_balance_account_resource.go @@ -0,0 +1,115 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the BalanceAccountResource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceAccountResource{} + +// BalanceAccountResource struct for BalanceAccountResource +type BalanceAccountResource struct { + BalanceAccountId string `json:"balanceAccountId"` +} + +// NewBalanceAccountResource instantiates a new BalanceAccountResource 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 NewBalanceAccountResource(balanceAccountId string) *BalanceAccountResource { + this := BalanceAccountResource{} + this.BalanceAccountId = balanceAccountId + return &this +} + +// NewBalanceAccountResourceWithDefaults instantiates a new BalanceAccountResource 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 NewBalanceAccountResourceWithDefaults() *BalanceAccountResource { + this := BalanceAccountResource{} + return &this +} + +// GetBalanceAccountId returns the BalanceAccountId field value +func (o *BalanceAccountResource) GetBalanceAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.BalanceAccountId +} + +// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value +// and a boolean to check if the value has been set. +func (o *BalanceAccountResource) GetBalanceAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BalanceAccountId, true +} + +// SetBalanceAccountId sets field value +func (o *BalanceAccountResource) SetBalanceAccountId(v string) { + o.BalanceAccountId = v +} + +func (o BalanceAccountResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceAccountResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["balanceAccountId"] = o.BalanceAccountId + return toSerialize, nil +} + +type NullableBalanceAccountResource struct { + value *BalanceAccountResource + isSet bool +} + +func (v NullableBalanceAccountResource) Get() *BalanceAccountResource { + return v.value +} + +func (v *NullableBalanceAccountResource) Set(val *BalanceAccountResource) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceAccountResource) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceAccountResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceAccountResource(val *BalanceAccountResource) *NullableBalanceAccountResource { + return &NullableBalanceAccountResource{value: val, isSet: true} +} + +func (v NullableBalanceAccountResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceAccountResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_balance_account_resource_all_of.go b/src/sessionauthentication/model_balance_account_resource_all_of.go new file mode 100644 index 000000000..b185793cd --- /dev/null +++ b/src/sessionauthentication/model_balance_account_resource_all_of.go @@ -0,0 +1,124 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the BalanceAccountResourceAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BalanceAccountResourceAllOf{} + +// BalanceAccountResourceAllOf struct for BalanceAccountResourceAllOf +type BalanceAccountResourceAllOf struct { + BalanceAccountId *string `json:"balanceAccountId,omitempty"` +} + +// NewBalanceAccountResourceAllOf instantiates a new BalanceAccountResourceAllOf 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 NewBalanceAccountResourceAllOf() *BalanceAccountResourceAllOf { + this := BalanceAccountResourceAllOf{} + return &this +} + +// NewBalanceAccountResourceAllOfWithDefaults instantiates a new BalanceAccountResourceAllOf 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 NewBalanceAccountResourceAllOfWithDefaults() *BalanceAccountResourceAllOf { + this := BalanceAccountResourceAllOf{} + return &this +} + +// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. +func (o *BalanceAccountResourceAllOf) 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 *BalanceAccountResourceAllOf) 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 *BalanceAccountResourceAllOf) 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 *BalanceAccountResourceAllOf) SetBalanceAccountId(v string) { + o.BalanceAccountId = &v +} + +func (o BalanceAccountResourceAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BalanceAccountResourceAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.BalanceAccountId) { + toSerialize["balanceAccountId"] = o.BalanceAccountId + } + return toSerialize, nil +} + +type NullableBalanceAccountResourceAllOf struct { + value *BalanceAccountResourceAllOf + isSet bool +} + +func (v NullableBalanceAccountResourceAllOf) Get() *BalanceAccountResourceAllOf { + return v.value +} + +func (v *NullableBalanceAccountResourceAllOf) Set(val *BalanceAccountResourceAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableBalanceAccountResourceAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableBalanceAccountResourceAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBalanceAccountResourceAllOf(val *BalanceAccountResourceAllOf) *NullableBalanceAccountResourceAllOf { + return &NullableBalanceAccountResourceAllOf{value: val, isSet: true} +} + +func (v NullableBalanceAccountResourceAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBalanceAccountResourceAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_default_error_response_entity.go b/src/sessionauthentication/model_default_error_response_entity.go new file mode 100644 index 000000000..a9403c377 --- /dev/null +++ b/src/sessionauthentication/model_default_error_response_entity.go @@ -0,0 +1,384 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the DefaultErrorResponseEntity type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &DefaultErrorResponseEntity{} + +// DefaultErrorResponseEntity Standardized error response following RFC-7807 format +type DefaultErrorResponseEntity struct { + // A human-readable explanation specific to this occurrence of the problem. + Detail *string `json:"detail,omitempty"` + // Unique business error code. + ErrorCode *string `json:"errorCode,omitempty"` + // A URI that identifies the specific occurrence of the problem if applicable. + Instance *string `json:"instance,omitempty"` + // Array of fields with validation errors when applicable. + InvalidFields []InvalidField `json:"invalidFields,omitempty"` + // The unique reference for the request. + RequestId *string `json:"requestId,omitempty"` + // The HTTP status code. + Status *int32 `json:"status,omitempty"` + // A short, human-readable summary of the problem type. + Title *string `json:"title,omitempty"` + // A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + Type *string `json:"type,omitempty"` +} + +// NewDefaultErrorResponseEntity instantiates a new DefaultErrorResponseEntity object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultErrorResponseEntity() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// NewDefaultErrorResponseEntityWithDefaults instantiates a new DefaultErrorResponseEntity object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultErrorResponseEntityWithDefaults() *DefaultErrorResponseEntity { + this := DefaultErrorResponseEntity{} + return &this +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetDetail() string { + if o == nil || common.IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetDetailOk() (*string, bool) { + if o == nil || common.IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasDetail() bool { + if o != nil && !common.IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *DefaultErrorResponseEntity) SetDetail(v string) { + o.Detail = &v +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetErrorCode() string { + if o == nil || common.IsNil(o.ErrorCode) { + var ret string + return ret + } + return *o.ErrorCode +} + +// GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetErrorCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.ErrorCode) { + return nil, false + } + return o.ErrorCode, true +} + +// HasErrorCode returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasErrorCode() bool { + if o != nil && !common.IsNil(o.ErrorCode) { + return true + } + + return false +} + +// SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field. +func (o *DefaultErrorResponseEntity) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetInstance returns the Instance field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInstance() string { + if o == nil || common.IsNil(o.Instance) { + var ret string + return ret + } + return *o.Instance +} + +// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInstanceOk() (*string, bool) { + if o == nil || common.IsNil(o.Instance) { + return nil, false + } + return o.Instance, true +} + +// HasInstance returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInstance() bool { + if o != nil && !common.IsNil(o.Instance) { + return true + } + + return false +} + +// SetInstance gets a reference to the given string and assigns it to the Instance field. +func (o *DefaultErrorResponseEntity) SetInstance(v string) { + o.Instance = &v +} + +// GetInvalidFields returns the InvalidFields field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetInvalidFields() []InvalidField { + if o == nil || common.IsNil(o.InvalidFields) { + var ret []InvalidField + return ret + } + return o.InvalidFields +} + +// GetInvalidFieldsOk returns a tuple with the InvalidFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetInvalidFieldsOk() ([]InvalidField, bool) { + if o == nil || common.IsNil(o.InvalidFields) { + return nil, false + } + return o.InvalidFields, true +} + +// HasInvalidFields returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasInvalidFields() bool { + if o != nil && !common.IsNil(o.InvalidFields) { + return true + } + + return false +} + +// SetInvalidFields gets a reference to the given []InvalidField and assigns it to the InvalidFields field. +func (o *DefaultErrorResponseEntity) SetInvalidFields(v []InvalidField) { + o.InvalidFields = v +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetRequestId() string { + if o == nil || common.IsNil(o.RequestId) { + var ret string + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetRequestIdOk() (*string, bool) { + if o == nil || common.IsNil(o.RequestId) { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasRequestId() bool { + if o != nil && !common.IsNil(o.RequestId) { + return true + } + + return false +} + +// SetRequestId gets a reference to the given string and assigns it to the RequestId field. +func (o *DefaultErrorResponseEntity) SetRequestId(v string) { + o.RequestId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetStatus() int32 { + if o == nil || common.IsNil(o.Status) { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetStatusOk() (*int32, bool) { + if o == nil || common.IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasStatus() bool { + if o != nil && !common.IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *DefaultErrorResponseEntity) SetStatus(v int32) { + o.Status = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetTitle() string { + if o == nil || common.IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTitleOk() (*string, bool) { + if o == nil || common.IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasTitle() bool { + if o != nil && !common.IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *DefaultErrorResponseEntity) SetTitle(v string) { + o.Title = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DefaultErrorResponseEntity) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DefaultErrorResponseEntity) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DefaultErrorResponseEntity) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DefaultErrorResponseEntity) SetType(v string) { + o.Type = &v +} + +func (o DefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultErrorResponseEntity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + if !common.IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } + if !common.IsNil(o.Instance) { + toSerialize["instance"] = o.Instance + } + if !common.IsNil(o.InvalidFields) { + toSerialize["invalidFields"] = o.InvalidFields + } + if !common.IsNil(o.RequestId) { + toSerialize["requestId"] = o.RequestId + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableDefaultErrorResponseEntity struct { + value *DefaultErrorResponseEntity + isSet bool +} + +func (v NullableDefaultErrorResponseEntity) Get() *DefaultErrorResponseEntity { + return v.value +} + +func (v *NullableDefaultErrorResponseEntity) Set(val *DefaultErrorResponseEntity) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultErrorResponseEntity) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultErrorResponseEntity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultErrorResponseEntity(val *DefaultErrorResponseEntity) *NullableDefaultErrorResponseEntity { + return &NullableDefaultErrorResponseEntity{value: val, isSet: true} +} + +func (v NullableDefaultErrorResponseEntity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultErrorResponseEntity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_invalid_field.go b/src/sessionauthentication/model_invalid_field.go new file mode 100644 index 000000000..02953b981 --- /dev/null +++ b/src/sessionauthentication/model_invalid_field.go @@ -0,0 +1,172 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the InvalidField type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &InvalidField{} + +// InvalidField struct for InvalidField +type InvalidField struct { + // The field that has an invalid value. + Name string `json:"name"` + // The invalid value. + Value string `json:"value"` + // Description of the validation error. + Message string `json:"message"` +} + +// NewInvalidField instantiates a new InvalidField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInvalidField(name string, value string, message string) *InvalidField { + this := InvalidField{} + this.Name = name + this.Value = value + this.Message = message + return &this +} + +// NewInvalidFieldWithDefaults instantiates a new InvalidField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInvalidFieldWithDefaults() *InvalidField { + this := InvalidField{} + return &this +} + +// GetName returns the Name field value +func (o *InvalidField) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *InvalidField) SetName(v string) { + o.Name = v +} + +// GetValue returns the Value field value +func (o *InvalidField) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *InvalidField) SetValue(v string) { + o.Value = v +} + +// GetMessage returns the Message field value +func (o *InvalidField) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *InvalidField) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *InvalidField) SetMessage(v string) { + o.Message = v +} + +func (o InvalidField) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InvalidField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["value"] = o.Value + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableInvalidField struct { + value *InvalidField + isSet bool +} + +func (v NullableInvalidField) Get() *InvalidField { + return v.value +} + +func (v *NullableInvalidField) Set(val *InvalidField) { + v.value = val + v.isSet = true +} + +func (v NullableInvalidField) IsSet() bool { + return v.isSet +} + +func (v *NullableInvalidField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInvalidField(val *InvalidField) *NullableInvalidField { + return &NullableInvalidField{value: val, isSet: true} +} + +func (v NullableInvalidField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInvalidField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_legal_entity_resource.go b/src/sessionauthentication/model_legal_entity_resource.go new file mode 100644 index 000000000..1b9fd3835 --- /dev/null +++ b/src/sessionauthentication/model_legal_entity_resource.go @@ -0,0 +1,116 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the LegalEntityResource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &LegalEntityResource{} + +// LegalEntityResource struct for LegalEntityResource +type LegalEntityResource struct { + // The unique identifier of the resource connected to the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the legal entity that has a contractual relationship with your platform and owns the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). For sole proprietorships, this is the legal entity of the individual owner. + LegalEntityId string `json:"legalEntityId"` +} + +// NewLegalEntityResource instantiates a new LegalEntityResource 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 NewLegalEntityResource(legalEntityId string) *LegalEntityResource { + this := LegalEntityResource{} + this.LegalEntityId = legalEntityId + return &this +} + +// NewLegalEntityResourceWithDefaults instantiates a new LegalEntityResource 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 NewLegalEntityResourceWithDefaults() *LegalEntityResource { + this := LegalEntityResource{} + return &this +} + +// GetLegalEntityId returns the LegalEntityId field value +func (o *LegalEntityResource) GetLegalEntityId() string { + if o == nil { + var ret string + return ret + } + + return o.LegalEntityId +} + +// GetLegalEntityIdOk returns a tuple with the LegalEntityId field value +// and a boolean to check if the value has been set. +func (o *LegalEntityResource) GetLegalEntityIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LegalEntityId, true +} + +// SetLegalEntityId sets field value +func (o *LegalEntityResource) SetLegalEntityId(v string) { + o.LegalEntityId = v +} + +func (o LegalEntityResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegalEntityResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["legalEntityId"] = o.LegalEntityId + return toSerialize, nil +} + +type NullableLegalEntityResource struct { + value *LegalEntityResource + isSet bool +} + +func (v NullableLegalEntityResource) Get() *LegalEntityResource { + return v.value +} + +func (v *NullableLegalEntityResource) Set(val *LegalEntityResource) { + v.value = val + v.isSet = true +} + +func (v NullableLegalEntityResource) IsSet() bool { + return v.isSet +} + +func (v *NullableLegalEntityResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegalEntityResource(val *LegalEntityResource) *NullableLegalEntityResource { + return &NullableLegalEntityResource{value: val, isSet: true} +} + +func (v NullableLegalEntityResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegalEntityResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_legal_entity_resource_all_of.go b/src/sessionauthentication/model_legal_entity_resource_all_of.go new file mode 100644 index 000000000..161cca0d7 --- /dev/null +++ b/src/sessionauthentication/model_legal_entity_resource_all_of.go @@ -0,0 +1,125 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the LegalEntityResourceAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &LegalEntityResourceAllOf{} + +// LegalEntityResourceAllOf struct for LegalEntityResourceAllOf +type LegalEntityResourceAllOf struct { + // The unique identifier of the resource connected to the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the legal entity that has a contractual relationship with your platform and owns the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). For sole proprietorships, this is the legal entity of the individual owner. + LegalEntityId *string `json:"legalEntityId,omitempty"` +} + +// NewLegalEntityResourceAllOf instantiates a new LegalEntityResourceAllOf 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 NewLegalEntityResourceAllOf() *LegalEntityResourceAllOf { + this := LegalEntityResourceAllOf{} + return &this +} + +// NewLegalEntityResourceAllOfWithDefaults instantiates a new LegalEntityResourceAllOf 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 NewLegalEntityResourceAllOfWithDefaults() *LegalEntityResourceAllOf { + this := LegalEntityResourceAllOf{} + return &this +} + +// GetLegalEntityId returns the LegalEntityId field value if set, zero value otherwise. +func (o *LegalEntityResourceAllOf) GetLegalEntityId() string { + if o == nil || common.IsNil(o.LegalEntityId) { + var ret string + return ret + } + return *o.LegalEntityId +} + +// GetLegalEntityIdOk returns a tuple with the LegalEntityId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegalEntityResourceAllOf) GetLegalEntityIdOk() (*string, bool) { + if o == nil || common.IsNil(o.LegalEntityId) { + return nil, false + } + return o.LegalEntityId, true +} + +// HasLegalEntityId returns a boolean if a field has been set. +func (o *LegalEntityResourceAllOf) HasLegalEntityId() bool { + if o != nil && !common.IsNil(o.LegalEntityId) { + return true + } + + return false +} + +// SetLegalEntityId gets a reference to the given string and assigns it to the LegalEntityId field. +func (o *LegalEntityResourceAllOf) SetLegalEntityId(v string) { + o.LegalEntityId = &v +} + +func (o LegalEntityResourceAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LegalEntityResourceAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.LegalEntityId) { + toSerialize["legalEntityId"] = o.LegalEntityId + } + return toSerialize, nil +} + +type NullableLegalEntityResourceAllOf struct { + value *LegalEntityResourceAllOf + isSet bool +} + +func (v NullableLegalEntityResourceAllOf) Get() *LegalEntityResourceAllOf { + return v.value +} + +func (v *NullableLegalEntityResourceAllOf) Set(val *LegalEntityResourceAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableLegalEntityResourceAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableLegalEntityResourceAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLegalEntityResourceAllOf(val *LegalEntityResourceAllOf) *NullableLegalEntityResourceAllOf { + return &NullableLegalEntityResourceAllOf{value: val, isSet: true} +} + +func (v NullableLegalEntityResourceAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLegalEntityResourceAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_merchant_account_resource.go b/src/sessionauthentication/model_merchant_account_resource.go new file mode 100644 index 000000000..28f391bc2 --- /dev/null +++ b/src/sessionauthentication/model_merchant_account_resource.go @@ -0,0 +1,124 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the MerchantAccountResource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &MerchantAccountResource{} + +// MerchantAccountResource struct for MerchantAccountResource +type MerchantAccountResource struct { + MerchantAccountCode *string `json:"merchantAccountCode,omitempty"` +} + +// NewMerchantAccountResource instantiates a new MerchantAccountResource 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 NewMerchantAccountResource() *MerchantAccountResource { + this := MerchantAccountResource{} + return &this +} + +// NewMerchantAccountResourceWithDefaults instantiates a new MerchantAccountResource 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 NewMerchantAccountResourceWithDefaults() *MerchantAccountResource { + this := MerchantAccountResource{} + return &this +} + +// GetMerchantAccountCode returns the MerchantAccountCode field value if set, zero value otherwise. +func (o *MerchantAccountResource) GetMerchantAccountCode() string { + if o == nil || common.IsNil(o.MerchantAccountCode) { + var ret string + return ret + } + return *o.MerchantAccountCode +} + +// GetMerchantAccountCodeOk returns a tuple with the MerchantAccountCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MerchantAccountResource) GetMerchantAccountCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantAccountCode) { + return nil, false + } + return o.MerchantAccountCode, true +} + +// HasMerchantAccountCode returns a boolean if a field has been set. +func (o *MerchantAccountResource) HasMerchantAccountCode() bool { + if o != nil && !common.IsNil(o.MerchantAccountCode) { + return true + } + + return false +} + +// SetMerchantAccountCode gets a reference to the given string and assigns it to the MerchantAccountCode field. +func (o *MerchantAccountResource) SetMerchantAccountCode(v string) { + o.MerchantAccountCode = &v +} + +func (o MerchantAccountResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MerchantAccountResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.MerchantAccountCode) { + toSerialize["merchantAccountCode"] = o.MerchantAccountCode + } + return toSerialize, nil +} + +type NullableMerchantAccountResource struct { + value *MerchantAccountResource + isSet bool +} + +func (v NullableMerchantAccountResource) Get() *MerchantAccountResource { + return v.value +} + +func (v *NullableMerchantAccountResource) Set(val *MerchantAccountResource) { + v.value = val + v.isSet = true +} + +func (v NullableMerchantAccountResource) IsSet() bool { + return v.isSet +} + +func (v *NullableMerchantAccountResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMerchantAccountResource(val *MerchantAccountResource) *NullableMerchantAccountResource { + return &NullableMerchantAccountResource{value: val, isSet: true} +} + +func (v NullableMerchantAccountResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMerchantAccountResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_merchant_account_resource_all_of.go b/src/sessionauthentication/model_merchant_account_resource_all_of.go new file mode 100644 index 000000000..dc0fb2499 --- /dev/null +++ b/src/sessionauthentication/model_merchant_account_resource_all_of.go @@ -0,0 +1,124 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the MerchantAccountResourceAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &MerchantAccountResourceAllOf{} + +// MerchantAccountResourceAllOf struct for MerchantAccountResourceAllOf +type MerchantAccountResourceAllOf struct { + MerchantAccountCode *string `json:"merchantAccountCode,omitempty"` +} + +// NewMerchantAccountResourceAllOf instantiates a new MerchantAccountResourceAllOf 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 NewMerchantAccountResourceAllOf() *MerchantAccountResourceAllOf { + this := MerchantAccountResourceAllOf{} + return &this +} + +// NewMerchantAccountResourceAllOfWithDefaults instantiates a new MerchantAccountResourceAllOf 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 NewMerchantAccountResourceAllOfWithDefaults() *MerchantAccountResourceAllOf { + this := MerchantAccountResourceAllOf{} + return &this +} + +// GetMerchantAccountCode returns the MerchantAccountCode field value if set, zero value otherwise. +func (o *MerchantAccountResourceAllOf) GetMerchantAccountCode() string { + if o == nil || common.IsNil(o.MerchantAccountCode) { + var ret string + return ret + } + return *o.MerchantAccountCode +} + +// GetMerchantAccountCodeOk returns a tuple with the MerchantAccountCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MerchantAccountResourceAllOf) GetMerchantAccountCodeOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantAccountCode) { + return nil, false + } + return o.MerchantAccountCode, true +} + +// HasMerchantAccountCode returns a boolean if a field has been set. +func (o *MerchantAccountResourceAllOf) HasMerchantAccountCode() bool { + if o != nil && !common.IsNil(o.MerchantAccountCode) { + return true + } + + return false +} + +// SetMerchantAccountCode gets a reference to the given string and assigns it to the MerchantAccountCode field. +func (o *MerchantAccountResourceAllOf) SetMerchantAccountCode(v string) { + o.MerchantAccountCode = &v +} + +func (o MerchantAccountResourceAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MerchantAccountResourceAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.MerchantAccountCode) { + toSerialize["merchantAccountCode"] = o.MerchantAccountCode + } + return toSerialize, nil +} + +type NullableMerchantAccountResourceAllOf struct { + value *MerchantAccountResourceAllOf + isSet bool +} + +func (v NullableMerchantAccountResourceAllOf) Get() *MerchantAccountResourceAllOf { + return v.value +} + +func (v *NullableMerchantAccountResourceAllOf) Set(val *MerchantAccountResourceAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableMerchantAccountResourceAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableMerchantAccountResourceAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMerchantAccountResourceAllOf(val *MerchantAccountResourceAllOf) *NullableMerchantAccountResourceAllOf { + return &NullableMerchantAccountResourceAllOf{value: val, isSet: true} +} + +func (v NullableMerchantAccountResourceAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMerchantAccountResourceAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_payment_instrument_resource.go b/src/sessionauthentication/model_payment_instrument_resource.go new file mode 100644 index 000000000..c2d14518f --- /dev/null +++ b/src/sessionauthentication/model_payment_instrument_resource.go @@ -0,0 +1,115 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the PaymentInstrumentResource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PaymentInstrumentResource{} + +// PaymentInstrumentResource struct for PaymentInstrumentResource +type PaymentInstrumentResource struct { + PaymentInstrumentId string `json:"paymentInstrumentId"` +} + +// NewPaymentInstrumentResource instantiates a new PaymentInstrumentResource 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 NewPaymentInstrumentResource(paymentInstrumentId string) *PaymentInstrumentResource { + this := PaymentInstrumentResource{} + this.PaymentInstrumentId = paymentInstrumentId + return &this +} + +// NewPaymentInstrumentResourceWithDefaults instantiates a new PaymentInstrumentResource 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 NewPaymentInstrumentResourceWithDefaults() *PaymentInstrumentResource { + this := PaymentInstrumentResource{} + return &this +} + +// GetPaymentInstrumentId returns the PaymentInstrumentId field value +func (o *PaymentInstrumentResource) GetPaymentInstrumentId() string { + if o == nil { + var ret string + return ret + } + + return o.PaymentInstrumentId +} + +// GetPaymentInstrumentIdOk returns a tuple with the PaymentInstrumentId field value +// and a boolean to check if the value has been set. +func (o *PaymentInstrumentResource) GetPaymentInstrumentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentInstrumentId, true +} + +// SetPaymentInstrumentId sets field value +func (o *PaymentInstrumentResource) SetPaymentInstrumentId(v string) { + o.PaymentInstrumentId = v +} + +func (o PaymentInstrumentResource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentInstrumentResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId + return toSerialize, nil +} + +type NullablePaymentInstrumentResource struct { + value *PaymentInstrumentResource + isSet bool +} + +func (v NullablePaymentInstrumentResource) Get() *PaymentInstrumentResource { + return v.value +} + +func (v *NullablePaymentInstrumentResource) Set(val *PaymentInstrumentResource) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentInstrumentResource) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentInstrumentResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentInstrumentResource(val *PaymentInstrumentResource) *NullablePaymentInstrumentResource { + return &NullablePaymentInstrumentResource{value: val, isSet: true} +} + +func (v NullablePaymentInstrumentResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentInstrumentResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_payment_instrument_resource_all_of.go b/src/sessionauthentication/model_payment_instrument_resource_all_of.go new file mode 100644 index 000000000..33937f33b --- /dev/null +++ b/src/sessionauthentication/model_payment_instrument_resource_all_of.go @@ -0,0 +1,124 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the PaymentInstrumentResourceAllOf type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PaymentInstrumentResourceAllOf{} + +// PaymentInstrumentResourceAllOf struct for PaymentInstrumentResourceAllOf +type PaymentInstrumentResourceAllOf struct { + PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` +} + +// NewPaymentInstrumentResourceAllOf instantiates a new PaymentInstrumentResourceAllOf 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 NewPaymentInstrumentResourceAllOf() *PaymentInstrumentResourceAllOf { + this := PaymentInstrumentResourceAllOf{} + return &this +} + +// NewPaymentInstrumentResourceAllOfWithDefaults instantiates a new PaymentInstrumentResourceAllOf 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 NewPaymentInstrumentResourceAllOfWithDefaults() *PaymentInstrumentResourceAllOf { + this := PaymentInstrumentResourceAllOf{} + return &this +} + +// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. +func (o *PaymentInstrumentResourceAllOf) 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. +func (o *PaymentInstrumentResourceAllOf) 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 *PaymentInstrumentResourceAllOf) 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. +func (o *PaymentInstrumentResourceAllOf) SetPaymentInstrumentId(v string) { + o.PaymentInstrumentId = &v +} + +func (o PaymentInstrumentResourceAllOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentInstrumentResourceAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.PaymentInstrumentId) { + toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId + } + return toSerialize, nil +} + +type NullablePaymentInstrumentResourceAllOf struct { + value *PaymentInstrumentResourceAllOf + isSet bool +} + +func (v NullablePaymentInstrumentResourceAllOf) Get() *PaymentInstrumentResourceAllOf { + return v.value +} + +func (v *NullablePaymentInstrumentResourceAllOf) Set(val *PaymentInstrumentResourceAllOf) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentInstrumentResourceAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentInstrumentResourceAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentInstrumentResourceAllOf(val *PaymentInstrumentResourceAllOf) *NullablePaymentInstrumentResourceAllOf { + return &NullablePaymentInstrumentResourceAllOf{value: val, isSet: true} +} + +func (v NullablePaymentInstrumentResourceAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentInstrumentResourceAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_policy.go b/src/sessionauthentication/model_policy.go new file mode 100644 index 000000000..544813848 --- /dev/null +++ b/src/sessionauthentication/model_policy.go @@ -0,0 +1,162 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the Policy type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Policy{} + +// Policy struct for Policy +type Policy struct { + // An object containing the type and the unique identifier of the user of the component. For [Onboarding components](https://docs.adyen.com/platforms/onboard-users/components), this is the ID of the legal entity that has a contractual relationship with your platform. For sole proprietorships, use the ID of the legal entity of the individual owner. For [Platform Experience components](https://docs.adyen.com/platforms/build-user-dashboards), this is the ID of the account holder that is associated with the balance account shown in the component. + Resources []Resource `json:"resources,omitempty"` + // The name of the role required to use the component. + Roles []string `json:"roles,omitempty"` +} + +// NewPolicy instantiates a new Policy 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 NewPolicy() *Policy { + this := Policy{} + return &this +} + +// NewPolicyWithDefaults instantiates a new Policy 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 NewPolicyWithDefaults() *Policy { + this := Policy{} + return &this +} + +// GetResources returns the Resources field value if set, zero value otherwise. +func (o *Policy) GetResources() []Resource { + if o == nil || common.IsNil(o.Resources) { + var ret []Resource + return ret + } + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Policy) GetResourcesOk() ([]Resource, bool) { + if o == nil || common.IsNil(o.Resources) { + return nil, false + } + return o.Resources, true +} + +// HasResources returns a boolean if a field has been set. +func (o *Policy) HasResources() bool { + if o != nil && !common.IsNil(o.Resources) { + return true + } + + return false +} + +// SetResources gets a reference to the given []Resource and assigns it to the Resources field. +func (o *Policy) SetResources(v []Resource) { + o.Resources = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *Policy) GetRoles() []string { + if o == nil || common.IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Policy) GetRolesOk() ([]string, bool) { + if o == nil || common.IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *Policy) HasRoles() bool { + if o != nil && !common.IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *Policy) SetRoles(v []string) { + o.Roles = v +} + +func (o Policy) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Policy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Resources) { + toSerialize["resources"] = o.Resources + } + if !common.IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullablePolicy struct { + value *Policy + isSet bool +} + +func (v NullablePolicy) Get() *Policy { + return v.value +} + +func (v *NullablePolicy) Set(val *Policy) { + v.value = val + v.isSet = true +} + +func (v NullablePolicy) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicy(val *Policy) *NullablePolicy { + return &NullablePolicy{value: val, isSet: true} +} + +func (v NullablePolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_product_type.go b/src/sessionauthentication/model_product_type.go new file mode 100644 index 000000000..42f12debc --- /dev/null +++ b/src/sessionauthentication/model_product_type.go @@ -0,0 +1,110 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + "fmt" +) + +// ProductType the model 'ProductType' +type ProductType string + +// List of ProductType +const ( + ONBOARDING ProductType = "onboarding" + PLATFORM ProductType = "platform" + BANK ProductType = "bank" +) + +// All allowed values of ProductType enum +var AllowedProductTypeEnumValues = []ProductType{ + "onboarding", + "platform", + "bank", +} + +func (v *ProductType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ProductType(value) + for _, existing := range AllowedProductTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ProductType", value) +} + +// NewProductTypeFromValue returns a pointer to a valid ProductType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewProductTypeFromValue(v string) (*ProductType, error) { + ev := ProductType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ProductType: valid values are %v", v, AllowedProductTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ProductType) IsValid() bool { + for _, existing := range AllowedProductTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ProductType value +func (v ProductType) Ptr() *ProductType { + return &v +} + +type NullableProductType struct { + value *ProductType + isSet bool +} + +func (v NullableProductType) Get() *ProductType { + return v.value +} + +func (v *NullableProductType) Set(val *ProductType) { + v.value = val + v.isSet = true +} + +func (v NullableProductType) IsSet() bool { + return v.isSet +} + +func (v *NullableProductType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProductType(val *ProductType) *NullableProductType { + return &NullableProductType{value: val, isSet: true} +} + +func (v NullableProductType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProductType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_resource.go b/src/sessionauthentication/model_resource.go new file mode 100644 index 000000000..a89c68608 --- /dev/null +++ b/src/sessionauthentication/model_resource.go @@ -0,0 +1,124 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the Resource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Resource{} + +// Resource struct for Resource +type Resource struct { + Type *ResourceType `json:"type,omitempty"` +} + +// NewResource instantiates a new Resource 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 NewResource() *Resource { + this := Resource{} + return &this +} + +// NewResourceWithDefaults instantiates a new Resource 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 NewResourceWithDefaults() *Resource { + this := Resource{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Resource) GetType() ResourceType { + if o == nil || common.IsNil(o.Type) { + var ret ResourceType + 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 *Resource) GetTypeOk() (*ResourceType, 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 *Resource) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given ResourceType and assigns it to the Type field. +func (o *Resource) SetType(v ResourceType) { + o.Type = &v +} + +func (o Resource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Resource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableResource struct { + value *Resource + isSet bool +} + +func (v NullableResource) Get() *Resource { + return v.value +} + +func (v *NullableResource) Set(val *Resource) { + v.value = val + v.isSet = true +} + +func (v NullableResource) IsSet() bool { + return v.isSet +} + +func (v *NullableResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResource(val *Resource) *NullableResource { + return &NullableResource{value: val, isSet: true} +} + +func (v NullableResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/sessionauthentication/model_resource_type.go b/src/sessionauthentication/model_resource_type.go new file mode 100644 index 000000000..67565c292 --- /dev/null +++ b/src/sessionauthentication/model_resource_type.go @@ -0,0 +1,114 @@ +/* +Session authentication API + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package sessionauthentication + +import ( + "encoding/json" + "fmt" +) + +// ResourceType the model 'ResourceType' +type ResourceType string + +// List of ResourceType +const ( + LEGAL_ENTITY ResourceType = "legalEntity" + BALANCE_ACCOUNT ResourceType = "balanceAccount" + ACCOUNT_HOLDER ResourceType = "accountHolder" + MERCHANT_ACCOUNT ResourceType = "merchantAccount" + PAYMENT_INSTRUMENT ResourceType = "paymentInstrument" +) + +// All allowed values of ResourceType enum +var AllowedResourceTypeEnumValues = []ResourceType{ + "legalEntity", + "balanceAccount", + "accountHolder", + "merchantAccount", + "paymentInstrument", +} + +func (v *ResourceType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ResourceType(value) + for _, existing := range AllowedResourceTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ResourceType", value) +} + +// NewResourceTypeFromValue returns a pointer to a valid ResourceType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewResourceTypeFromValue(v string) (*ResourceType, error) { + ev := ResourceType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ResourceType: valid values are %v", v, AllowedResourceTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ResourceType) IsValid() bool { + for _, existing := range AllowedResourceTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ResourceType value +func (v ResourceType) Ptr() *ResourceType { + return &v +} + +type NullableResourceType struct { + value *ResourceType + isSet bool +} + +func (v NullableResourceType) Get() *ResourceType { + return v.value +} + +func (v *NullableResourceType) Set(val *ResourceType) { + v.value = val + v.isSet = true +} + +func (v NullableResourceType) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceType(val *ResourceType) *NullableResourceType { + return &NullableResourceType{value: val, isSet: true} +} + +func (v NullableResourceType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/api_transactions.go b/src/transfers/api_transactions.go index a848a4512..d611361a9 100644 --- a/src/transfers/api_transactions.go +++ b/src/transfers/api_transactions.go @@ -32,6 +32,7 @@ type TransactionsApiGetAllTransactionsInput struct { accountHolderId *string balanceAccountId *string cursor *string + sortOrder *string limit *int32 } @@ -77,6 +78,12 @@ func (r TransactionsApiGetAllTransactionsInput) Cursor(cursor string) Transactio return r } +// Determines the sort order of the returned transactions. The sort order is based on the creation date of the transaction. Possible values: - **asc**: Ascending order, from oldest to most recent. - **desc**: Descending order, from most recent to oldest. Default value: **asc**. +func (r TransactionsApiGetAllTransactionsInput) SortOrder(sortOrder string) TransactionsApiGetAllTransactionsInput { + r.sortOrder = &sortOrder + return r +} + // The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. func (r TransactionsApiGetAllTransactionsInput) Limit(limit int32) TransactionsApiGetAllTransactionsInput { r.limit = &limit @@ -136,6 +143,9 @@ func (a *TransactionsApi) GetAllTransactions(ctx context.Context, r Transactions if r.createdUntil != nil { common.ParameterAddToQuery(queryParams, "createdUntil", r.createdUntil, "") } + if r.sortOrder != nil { + common.ParameterAddToQuery(queryParams, "sortOrder", r.sortOrder, "") + } if r.limit != nil { common.ParameterAddToQuery(queryParams, "limit", r.limit, "") } diff --git a/src/transfers/api_transfers.go b/src/transfers/api_transfers.go index b1ee70d6a..fb795489f 100644 --- a/src/transfers/api_transfers.go +++ b/src/transfers/api_transfers.go @@ -245,6 +245,7 @@ type TransfersApiGetAllTransfersInput struct { paymentInstrumentId *string reference *string category *string + sortOrder *string cursor *string limit *int32 } @@ -297,6 +298,12 @@ func (r TransfersApiGetAllTransfersInput) Category(category string) TransfersApi return r } +// Determines the sort order of the returned transfers. The sort order is based on the creation date of the transfers. Possible values: - **asc**: Ascending order, from oldest to most recent. - **desc**: Descending order, from most recent to oldest. Default value: **asc**. +func (r TransfersApiGetAllTransfersInput) SortOrder(sortOrder string) TransfersApiGetAllTransfersInput { + r.sortOrder = &sortOrder + return r +} + // The `cursor` returned in the links of the previous response. func (r TransfersApiGetAllTransfersInput) Cursor(cursor string) TransfersApiGetAllTransfersInput { r.cursor = &cursor @@ -363,6 +370,9 @@ func (a *TransfersApi) GetAllTransfers(ctx context.Context, r TransfersApiGetAll if r.createdUntil != nil { common.ParameterAddToQuery(queryParams, "createdUntil", r.createdUntil, "") } + if r.sortOrder != nil { + common.ParameterAddToQuery(queryParams, "sortOrder", r.sortOrder, "") + } if r.cursor != nil { common.ParameterAddToQuery(queryParams, "cursor", r.cursor, "") } diff --git a/src/transfers/model_additional_bank_identification.go b/src/transfers/model_additional_bank_identification.go index e9bf31ded..cb9724a73 100644 --- a/src/transfers/model_additional_bank_identification.go +++ b/src/transfers/model_additional_bank_identification.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &AdditionalBankIdentification{} type AdditionalBankIdentification struct { // The value of the additional bank identification. Code *string `json:"code,omitempty"` - // The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + // The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. Type *string `json:"type,omitempty"` } @@ -162,7 +162,7 @@ func (v *NullableAdditionalBankIdentification) UnmarshalJSON(src []byte) error { } func (o *AdditionalBankIdentification) isValidType() bool { - var allowedEnumValues = []string{"gbSortCode", "usRoutingNumber"} + var allowedEnumValues = []string{"auBsbCode", "caRoutingNumber", "gbSortCode", "usRoutingNumber"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/transfers/model_bank_category_data.go b/src/transfers/model_bank_category_data.go index 22d473346..4e96be61c 100644 --- a/src/transfers/model_bank_category_data.go +++ b/src/transfers/model_bank_category_data.go @@ -19,7 +19,7 @@ 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). + // 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 within the United States and in [SEPA locations](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"` diff --git a/src/transfers/model_confirmation_tracking_data.go b/src/transfers/model_confirmation_tracking_data.go index c95c850b9..bacede2ab 100644 --- a/src/transfers/model_confirmation_tracking_data.go +++ b/src/transfers/model_confirmation_tracking_data.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &ConfirmationTrackingData{} // ConfirmationTrackingData struct for ConfirmationTrackingData type ConfirmationTrackingData struct { - // The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. + // The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account.- **accepted**: the request is accepted by the integration. Status string `json:"status"` // The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. Type string `json:"type"` @@ -146,7 +146,7 @@ func (v *NullableConfirmationTrackingData) UnmarshalJSON(src []byte) error { } func (o *ConfirmationTrackingData) isValidStatus() bool { - var allowedEnumValues = []string{"credited"} + var allowedEnumValues = []string{"credited", "accepted"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/transfers/model_execution_date.go b/src/transfers/model_execution_date.go new file mode 100644 index 000000000..f6502e942 --- /dev/null +++ b/src/transfers/model_execution_date.go @@ -0,0 +1,162 @@ +/* +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/v21/src/common" +) + +// checks if the ExecutionDate type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ExecutionDate{} + +// ExecutionDate struct for ExecutionDate +type ExecutionDate struct { + // The date when the transfer will be processed. This date must be: * Within 30 days of the current date. * In the [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) **YYYY-MM-DD**. For example: 2025-01-31 + Date *string `json:"date,omitempty"` + // The timezone that applies to the execution date. Use a timezone identifier from the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Example: **America/Los_Angeles**. Default value: **Europe/Amsterdam**. + Timezone *string `json:"timezone,omitempty"` +} + +// NewExecutionDate instantiates a new ExecutionDate 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 NewExecutionDate() *ExecutionDate { + this := ExecutionDate{} + return &this +} + +// NewExecutionDateWithDefaults instantiates a new ExecutionDate 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 NewExecutionDateWithDefaults() *ExecutionDate { + this := ExecutionDate{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *ExecutionDate) GetDate() string { + if o == nil || common.IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionDate) GetDateOk() (*string, bool) { + if o == nil || common.IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *ExecutionDate) HasDate() bool { + if o != nil && !common.IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *ExecutionDate) SetDate(v string) { + o.Date = &v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *ExecutionDate) GetTimezone() string { + if o == nil || common.IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionDate) GetTimezoneOk() (*string, bool) { + if o == nil || common.IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *ExecutionDate) HasTimezone() bool { + if o != nil && !common.IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *ExecutionDate) SetTimezone(v string) { + o.Timezone = &v +} + +func (o ExecutionDate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutionDate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !common.IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +type NullableExecutionDate struct { + value *ExecutionDate + isSet bool +} + +func (v NullableExecutionDate) Get() *ExecutionDate { + return v.value +} + +func (v *NullableExecutionDate) Set(val *ExecutionDate) { + v.value = val + v.isSet = true +} + +func (v NullableExecutionDate) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutionDate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutionDate(val *ExecutionDate) *NullableExecutionDate { + return &NullableExecutionDate{value: val, isSet: true} +} + +func (v NullableExecutionDate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutionDate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_hk_local_account_identification.go b/src/transfers/model_hk_local_account_identification.go index d59418ba9..70c3f6fcf 100644 --- a/src/transfers/model_hk_local_account_identification.go +++ b/src/transfers/model_hk_local_account_identification.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &HKLocalAccountIdentification{} // HKLocalAccountIdentification struct for HKLocalAccountIdentification type HKLocalAccountIdentification struct { - // The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + // The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. AccountNumber string `json:"accountNumber"` // The 3-digit clearing code, without separators or whitespace. ClearingCode string `json:"clearingCode"` diff --git a/src/transfers/model_internal_review_tracking_data.go b/src/transfers/model_internal_review_tracking_data.go index 89e612f6a..bd2c6cc52 100644 --- a/src/transfers/model_internal_review_tracking_data.go +++ b/src/transfers/model_internal_review_tracking_data.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &InternalReviewTrackingData{} type InternalReviewTrackingData struct { // The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). Reason *string `json:"reason,omitempty"` - // The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. + // The status of the transfer. Possible values: - **pending**: the transfer is under internal review by Adyen. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. Status string `json:"status"` // The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. Type string `json:"type"` diff --git a/src/transfers/model_issued_card.go b/src/transfers/model_issued_card.go index abce66d24..3988fe818 100644 --- a/src/transfers/model_issued_card.go +++ b/src/transfers/model_issued_card.go @@ -29,7 +29,8 @@ type IssuedCard struct { // 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"` + SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + ThreeDSecure *ThreeDSecure `json:"threeDSecure,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. @@ -249,6 +250,38 @@ func (o *IssuedCard) SetSchemeUniqueTransactionId(v string) { o.SchemeUniqueTransactionId = &v } +// GetThreeDSecure returns the ThreeDSecure field value if set, zero value otherwise. +func (o *IssuedCard) GetThreeDSecure() ThreeDSecure { + if o == nil || common.IsNil(o.ThreeDSecure) { + var ret ThreeDSecure + return ret + } + return *o.ThreeDSecure +} + +// GetThreeDSecureOk returns a tuple with the ThreeDSecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetThreeDSecureOk() (*ThreeDSecure, bool) { + if o == nil || common.IsNil(o.ThreeDSecure) { + return nil, false + } + return o.ThreeDSecure, true +} + +// HasThreeDSecure returns a boolean if a field has been set. +func (o *IssuedCard) HasThreeDSecure() bool { + if o != nil && !common.IsNil(o.ThreeDSecure) { + return true + } + + return false +} + +// SetThreeDSecure gets a reference to the given ThreeDSecure and assigns it to the ThreeDSecure field. +func (o *IssuedCard) SetThreeDSecure(v ThreeDSecure) { + o.ThreeDSecure = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *IssuedCard) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -341,6 +374,9 @@ func (o IssuedCard) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.SchemeUniqueTransactionId) { toSerialize["schemeUniqueTransactionId"] = o.SchemeUniqueTransactionId } + if !common.IsNil(o.ThreeDSecure) { + toSerialize["threeDSecure"] = o.ThreeDSecure + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/transfers/model_party_identification.go b/src/transfers/model_party_identification.go index 1eb665294..814dd1c83 100644 --- a/src/transfers/model_party_identification.go +++ b/src/transfers/model_party_identification.go @@ -22,6 +22,8 @@ type PartyIdentification struct { Address *Address `json:"address,omitempty"` // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` + // The email address of the organization or individual. Maximum length: 254 characters. + Email *string `json:"email,omitempty"` // The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. FirstName *string `json:"firstName,omitempty"` // The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. @@ -32,6 +34,8 @@ type PartyIdentification struct { Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. Type *string `json:"type,omitempty"` + // The URL of the organization or individual. Maximum length: 255 characters. + Url *string `json:"url,omitempty"` } // NewPartyIdentification instantiates a new PartyIdentification object @@ -119,6 +123,38 @@ func (o *PartyIdentification) SetDateOfBirth(v string) { o.DateOfBirth = &v } +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *PartyIdentification) 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 *PartyIdentification) 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 *PartyIdentification) 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 *PartyIdentification) SetEmail(v string) { + o.Email = &v +} + // GetFirstName returns the FirstName field value if set, zero value otherwise. func (o *PartyIdentification) GetFirstName() string { if o == nil || common.IsNil(o.FirstName) { @@ -279,6 +315,38 @@ func (o *PartyIdentification) SetType(v string) { o.Type = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PartyIdentification) GetUrl() string { + if o == nil || common.IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartyIdentification) GetUrlOk() (*string, bool) { + if o == nil || common.IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PartyIdentification) HasUrl() bool { + if o != nil && !common.IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PartyIdentification) SetUrl(v string) { + o.Url = &v +} + func (o PartyIdentification) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -295,6 +363,9 @@ func (o PartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.DateOfBirth) { toSerialize["dateOfBirth"] = o.DateOfBirth } + if !common.IsNil(o.Email) { + toSerialize["email"] = o.Email + } if !common.IsNil(o.FirstName) { toSerialize["firstName"] = o.FirstName } @@ -310,6 +381,9 @@ func (o PartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.Url) { + toSerialize["url"] = o.Url + } return toSerialize, nil } diff --git a/src/transfers/model_platform_payment.go b/src/transfers/model_platform_payment.go index e05afc80c..a3c306bc0 100644 --- a/src/transfers/model_platform_payment.go +++ b/src/transfers/model_platform_payment.go @@ -25,7 +25,7 @@ type PlatformPayment struct { ModificationPspReference *string `json:"modificationPspReference,omitempty"` // The payment's merchant reference included in the transfer. PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` - // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. + // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: the acquiring fee (the aggregated amount of interchange and scheme fee) incurred on a transaction. * **AdyenCommission**: the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: all transaction fees due to Adyen. This is the aggregated amount of Adyen's commission and markup. * **AdyenMarkup**: the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: the amount booked to your user after the deduction of the relevant fees. * **Commission**: your platform's or marketplace's commission on a transaction. * **DCCPlatformCommission**: the Dynamic Currency Conversion (DCC) fee on a transaction. * **Interchange**: the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: the aggregated amount of all transaction fees. * **Remainder**: the leftover amount after currency conversion. * **SchemeFee**: the scheme fee incurred on a transaction. * **Surcharge**: the surcharge paid by the customer on a transaction. * **Tip**: the tip paid by the customer. * **TopUp**: an incoming transfer to top up your user's balance account. * **VAT**: the value-added tax charged on the payment. PlatformPaymentType *string `json:"platformPaymentType,omitempty"` // The payment reference included in the transfer. PspPaymentReference *string `json:"pspPaymentReference,omitempty"` diff --git a/src/transfers/model_routing_details.go b/src/transfers/model_routing_details.go index d710ed118..8afc88a8b 100644 --- a/src/transfers/model_routing_details.go +++ b/src/transfers/model_routing_details.go @@ -23,7 +23,7 @@ type RoutingDetails struct { Detail *string `json:"detail,omitempty"` // A code that identifies the problem type. ErrorCode *string `json:"errorCode,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**: 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). + // 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 within the United States and in [SEPA locations](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"` // A short, human-readable summary of the problem type. Title *string `json:"title,omitempty"` diff --git a/src/transfers/model_three_d_secure.go b/src/transfers/model_three_d_secure.go new file mode 100644 index 000000000..6a29ee447 --- /dev/null +++ b/src/transfers/model_three_d_secure.go @@ -0,0 +1,125 @@ +/* +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/v21/src/common" +) + +// checks if the ThreeDSecure type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ThreeDSecure{} + +// ThreeDSecure struct for ThreeDSecure +type ThreeDSecure struct { + // The transaction identifier for the Access Control Server + AcsTransactionId *string `json:"acsTransactionId,omitempty"` +} + +// NewThreeDSecure instantiates a new ThreeDSecure 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 NewThreeDSecure() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// NewThreeDSecureWithDefaults instantiates a new ThreeDSecure 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 NewThreeDSecureWithDefaults() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// GetAcsTransactionId returns the AcsTransactionId field value if set, zero value otherwise. +func (o *ThreeDSecure) GetAcsTransactionId() string { + if o == nil || common.IsNil(o.AcsTransactionId) { + var ret string + return ret + } + return *o.AcsTransactionId +} + +// GetAcsTransactionIdOk returns a tuple with the AcsTransactionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDSecure) GetAcsTransactionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AcsTransactionId) { + return nil, false + } + return o.AcsTransactionId, true +} + +// HasAcsTransactionId returns a boolean if a field has been set. +func (o *ThreeDSecure) HasAcsTransactionId() bool { + if o != nil && !common.IsNil(o.AcsTransactionId) { + return true + } + + return false +} + +// SetAcsTransactionId gets a reference to the given string and assigns it to the AcsTransactionId field. +func (o *ThreeDSecure) SetAcsTransactionId(v string) { + o.AcsTransactionId = &v +} + +func (o ThreeDSecure) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreeDSecure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcsTransactionId) { + toSerialize["acsTransactionId"] = o.AcsTransactionId + } + return toSerialize, nil +} + +type NullableThreeDSecure struct { + value *ThreeDSecure + isSet bool +} + +func (v NullableThreeDSecure) Get() *ThreeDSecure { + return v.value +} + +func (v *NullableThreeDSecure) Set(val *ThreeDSecure) { + v.value = val + v.isSet = true +} + +func (v NullableThreeDSecure) IsSet() bool { + return v.isSet +} + +func (v *NullableThreeDSecure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreeDSecure(val *ThreeDSecure) *NullableThreeDSecure { + return &NullableThreeDSecure{value: val, isSet: true} +} + +func (v NullableThreeDSecure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreeDSecure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_transaction.go b/src/transfers/model_transaction.go index c3ae98180..c9b7d2131 100644 --- a/src/transfers/model_transaction.go +++ b/src/transfers/model_transaction.go @@ -27,7 +27,7 @@ type Transaction struct { BalancePlatform string `json:"balancePlatform"` // The date the transaction was booked into the balance account. 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**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The `description` from the `/transfers` request. Description *string `json:"description,omitempty"` diff --git a/src/transfers/model_transaction_rule_reference.go b/src/transfers/model_transaction_rule_reference.go index 75c42b1be..72c494b9b 100644 --- a/src/transfers/model_transaction_rule_reference.go +++ b/src/transfers/model_transaction_rule_reference.go @@ -27,7 +27,7 @@ type TransactionRuleReference struct { OutcomeType *string `json:"outcomeType,omitempty"` // The reference for the resource. Reference *string `json:"reference,omitempty"` - // The score of the rule in case it's a scoreBased rule. + // The transaction score determined by the rule. Returned only when `outcomeType` is **scoreBased**. Score *int32 `json:"score,omitempty"` } diff --git a/src/transfers/model_transfer.go b/src/transfers/model_transfer.go index a3957b59b..c3d427247 100644 --- a/src/transfers/model_transfer.go +++ b/src/transfers/model_transfer.go @@ -23,17 +23,22 @@ type Transfer struct { AccountHolder *ResourceReference `json:"accountHolder,omitempty"` Amount Amount `json:"amount"` BalanceAccount *ResourceReference `json:"balanceAccount,omitempty"` - // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. + // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by an Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. Category string `json:"category"` CategoryData *TransferCategoryData `json:"categoryData,omitempty"` Counterparty CounterpartyV3 `json:"counterparty"` + // The date and time when the transfer was created, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + CreatedAt *time.Time `json:"createdAt,omitempty"` // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // Deprecated since Transfers API v3 + // Use createdAt or updatedAt 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"` DirectDebitInformation *DirectDebitInformation `json:"directDebitInformation,omitempty"` // The direction of the transfer. Possible values: **incoming**, **outgoing**. - Direction *string `json:"direction,omitempty"` + Direction *string `json:"direction,omitempty"` + ExecutionDate *ExecutionDate `json:"executionDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` PaymentInstrument *PaymentInstrument `json:"paymentInstrument,omitempty"` @@ -44,7 +49,7 @@ type Transfer struct { // 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"` Review *TransferReview `json:"review,omitempty"` - // The result of the transfer. For example, **authorised**, **refused**, or **error**. + // The result of the transfer. For example: - **received**: an outgoing transfer request is created. - **authorised**: the transfer request is authorized and the funds are reserved. - **booked**: the funds are deducted from your user's balance account. - **failed**: the transfer is rejected by the counterparty's bank. - **returned**: the transfer is returned by the counterparty's bank. Status string `json:"status"` // The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. Type *string `json:"type,omitempty"` @@ -239,7 +244,41 @@ func (o *Transfer) SetCounterparty(v CounterpartyV3) { o.Counterparty = v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Transfer) GetCreatedAt() time.Time { + if o == nil || common.IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Transfer) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Transfer) HasCreatedAt() bool { + if o != nil && !common.IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Transfer) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetCreationDate returns the CreationDate field value if set, zero value otherwise. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *Transfer) GetCreationDate() time.Time { if o == nil || common.IsNil(o.CreationDate) { var ret time.Time @@ -250,6 +289,8 @@ func (o *Transfer) GetCreationDate() time.Time { // GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *Transfer) GetCreationDateOk() (*time.Time, bool) { if o == nil || common.IsNil(o.CreationDate) { return nil, false @@ -267,6 +308,8 @@ func (o *Transfer) HasCreationDate() bool { } // SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *Transfer) SetCreationDate(v time.Time) { o.CreationDate = &v } @@ -367,6 +410,38 @@ func (o *Transfer) SetDirection(v string) { o.Direction = &v } +// GetExecutionDate returns the ExecutionDate field value if set, zero value otherwise. +func (o *Transfer) GetExecutionDate() ExecutionDate { + if o == nil || common.IsNil(o.ExecutionDate) { + var ret ExecutionDate + return ret + } + return *o.ExecutionDate +} + +// GetExecutionDateOk returns a tuple with the ExecutionDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Transfer) GetExecutionDateOk() (*ExecutionDate, bool) { + if o == nil || common.IsNil(o.ExecutionDate) { + return nil, false + } + return o.ExecutionDate, true +} + +// HasExecutionDate returns a boolean if a field has been set. +func (o *Transfer) HasExecutionDate() bool { + if o != nil && !common.IsNil(o.ExecutionDate) { + return true + } + + return false +} + +// SetExecutionDate gets a reference to the given ExecutionDate and assigns it to the ExecutionDate field. +func (o *Transfer) SetExecutionDate(v ExecutionDate) { + o.ExecutionDate = &v +} + // GetId returns the Id field value if set, zero value otherwise. func (o *Transfer) GetId() string { if o == nil || common.IsNil(o.Id) { @@ -637,6 +712,9 @@ func (o Transfer) ToMap() (map[string]interface{}, error) { toSerialize["categoryData"] = o.CategoryData } toSerialize["counterparty"] = o.Counterparty + if !common.IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate } @@ -649,6 +727,9 @@ func (o Transfer) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Direction) { toSerialize["direction"] = o.Direction } + if !common.IsNil(o.ExecutionDate) { + toSerialize["executionDate"] = o.ExecutionDate + } if !common.IsNil(o.Id) { toSerialize["id"] = o.Id } @@ -729,7 +810,7 @@ func (o *Transfer) isValidDirection() bool { return false } func (o *Transfer) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/transfers/model_transfer_data.go b/src/transfers/model_transfer_data.go index d233862ec..5b8e4acb4 100644 --- a/src/transfers/model_transfer_data.go +++ b/src/transfers/model_transfer_data.go @@ -27,11 +27,15 @@ type TransferData struct { BalancePlatform *string `json:"balancePlatform,omitempty"` // The list of the latest balance statuses in the transfer. Balances []BalanceMutation `json:"balances,omitempty"` - // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. + // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by an Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. Category string `json:"category"` CategoryData *TransferCategoryData `json:"categoryData,omitempty"` Counterparty *TransferNotificationCounterParty `json:"counterparty,omitempty"` + // The date and time when the transfer was created, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + CreatedAt *time.Time `json:"createdAt,omitempty"` // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // Deprecated since Transfers API v3 + // Use createdAt or updatedAt 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"` @@ -42,6 +46,7 @@ type TransferData struct { EventId *string `json:"eventId,omitempty"` // The list of events leading up to the current status of the transfer. Events []TransferEvent `json:"events,omitempty"` + ExecutionDate *ExecutionDate `json:"executionDate,omitempty"` ExternalReason *ExternalReason `json:"externalReason,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` @@ -55,12 +60,14 @@ type TransferData struct { Review *TransferReview `json:"review,omitempty"` // The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number 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**. + // The result of the transfer. For example: - **received**: an outgoing transfer request is created. - **authorised**: the transfer request is authorized and the funds are reserved. - **booked**: the funds are deducted from your user's balance account. - **failed**: the transfer is rejected by the counterparty's bank. - **returned**: the transfer is returned by the counterparty's bank. Status string `json:"status"` Tracking *TransferDataTracking `json:"tracking,omitempty"` TransactionRulesResult *TransactionRulesResult `json:"transactionRulesResult,omitempty"` // The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. Type *string `json:"type,omitempty"` + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` } // NewTransferData instantiates a new TransferData object @@ -323,7 +330,41 @@ func (o *TransferData) SetCounterparty(v TransferNotificationCounterParty) { o.Counterparty = &v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TransferData) GetCreatedAt() time.Time { + if o == nil || common.IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TransferData) HasCreatedAt() bool { + if o != nil && !common.IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TransferData) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetCreationDate returns the CreationDate field value if set, zero value otherwise. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *TransferData) GetCreationDate() time.Time { if o == nil || common.IsNil(o.CreationDate) { var ret time.Time @@ -334,6 +375,8 @@ func (o *TransferData) GetCreationDate() time.Time { // GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *TransferData) GetCreationDateOk() (*time.Time, bool) { if o == nil || common.IsNil(o.CreationDate) { return nil, false @@ -351,6 +394,8 @@ func (o *TransferData) HasCreationDate() bool { } // SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +// Deprecated since Transfers API v3 +// Use createdAt or updatedAt func (o *TransferData) SetCreationDate(v time.Time) { o.CreationDate = &v } @@ -515,6 +560,38 @@ func (o *TransferData) SetEvents(v []TransferEvent) { o.Events = v } +// GetExecutionDate returns the ExecutionDate field value if set, zero value otherwise. +func (o *TransferData) GetExecutionDate() ExecutionDate { + if o == nil || common.IsNil(o.ExecutionDate) { + var ret ExecutionDate + return ret + } + return *o.ExecutionDate +} + +// GetExecutionDateOk returns a tuple with the ExecutionDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetExecutionDateOk() (*ExecutionDate, bool) { + if o == nil || common.IsNil(o.ExecutionDate) { + return nil, false + } + return o.ExecutionDate, true +} + +// HasExecutionDate returns a boolean if a field has been set. +func (o *TransferData) HasExecutionDate() bool { + if o != nil && !common.IsNil(o.ExecutionDate) { + return true + } + + return false +} + +// SetExecutionDate gets a reference to the given ExecutionDate and assigns it to the ExecutionDate field. +func (o *TransferData) SetExecutionDate(v ExecutionDate) { + o.ExecutionDate = &v +} + // GetExternalReason returns the ExternalReason field value if set, zero value otherwise. func (o *TransferData) GetExternalReason() ExternalReason { if o == nil || common.IsNil(o.ExternalReason) { @@ -891,6 +968,38 @@ func (o *TransferData) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TransferData) GetUpdatedAt() time.Time { + if o == nil || common.IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TransferData) HasUpdatedAt() bool { + if o != nil && !common.IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TransferData) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o TransferData) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -921,6 +1030,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Counterparty) { toSerialize["counterparty"] = o.Counterparty } + if !common.IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate } @@ -939,6 +1051,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Events) { toSerialize["events"] = o.Events } + if !common.IsNil(o.ExecutionDate) { + toSerialize["executionDate"] = o.ExecutionDate + } if !common.IsNil(o.ExternalReason) { toSerialize["externalReason"] = o.ExternalReason } @@ -973,6 +1088,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } return toSerialize, nil } @@ -1031,7 +1149,7 @@ func (o *TransferData) isValidDirection() bool { return false } func (o *TransferData) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/transfers/model_transfer_event.go b/src/transfers/model_transfer_event.go index ee0e828ff..358a90d11 100644 --- a/src/transfers/model_transfer_event.go +++ b/src/transfers/model_transfer_event.go @@ -750,7 +750,7 @@ func (v *NullableTransferEvent) UnmarshalJSON(src []byte) error { } func (o *TransferEvent) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/transfers/model_transfer_info.go b/src/transfers/model_transfer_info.go index a26d466e3..e3df9520c 100644 --- a/src/transfers/model_transfer_info.go +++ b/src/transfers/model_transfer_info.go @@ -22,16 +22,17 @@ type TransferInfo struct { Amount Amount `json:"amount"` // The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount** assigned to the balance account, you must specify the [payment instrument ID](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id) of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. BalanceAccountId *string `json:"balanceAccountId,omitempty"` - // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. + // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by an Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. Category string `json:"category"` Counterparty CounterpartyInfoV3 `json:"counterparty"` // 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"` + Description *string `json:"description,omitempty"` + ExecutionDate *ExecutionDate `json:"executionDate,omitempty"` // The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount**, you must specify the payment instrument ID of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` - // 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). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities). + // 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 within the United States and in [SEPA locations](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). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities). Priorities []string `json:"priorities,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**: 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). + // 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 within the United States and in [SEPA locations](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"` // 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"` @@ -199,6 +200,38 @@ func (o *TransferInfo) SetDescription(v string) { o.Description = &v } +// GetExecutionDate returns the ExecutionDate field value if set, zero value otherwise. +func (o *TransferInfo) GetExecutionDate() ExecutionDate { + if o == nil || common.IsNil(o.ExecutionDate) { + var ret ExecutionDate + return ret + } + return *o.ExecutionDate +} + +// GetExecutionDateOk returns a tuple with the ExecutionDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferInfo) GetExecutionDateOk() (*ExecutionDate, bool) { + if o == nil || common.IsNil(o.ExecutionDate) { + return nil, false + } + return o.ExecutionDate, true +} + +// HasExecutionDate returns a boolean if a field has been set. +func (o *TransferInfo) HasExecutionDate() bool { + if o != nil && !common.IsNil(o.ExecutionDate) { + return true + } + + return false +} + +// SetExecutionDate gets a reference to the given ExecutionDate and assigns it to the ExecutionDate field. +func (o *TransferInfo) SetExecutionDate(v ExecutionDate) { + o.ExecutionDate = &v +} + // GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. func (o *TransferInfo) GetPaymentInstrumentId() string { if o == nil || common.IsNil(o.PaymentInstrumentId) { @@ -474,6 +507,9 @@ func (o TransferInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.ExecutionDate) { + toSerialize["executionDate"] = o.ExecutionDate + } if !common.IsNil(o.PaymentInstrumentId) { toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId } diff --git a/src/transfers/model_ultimate_party_identification.go b/src/transfers/model_ultimate_party_identification.go index 7f8359017..9b133a34f 100644 --- a/src/transfers/model_ultimate_party_identification.go +++ b/src/transfers/model_ultimate_party_identification.go @@ -22,6 +22,8 @@ type UltimatePartyIdentification struct { Address *Address `json:"address,omitempty"` // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` + // The email address of the organization or individual. Maximum length: 254 characters. + Email *string `json:"email,omitempty"` // The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. FirstName *string `json:"firstName,omitempty"` // The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. @@ -32,6 +34,8 @@ type UltimatePartyIdentification struct { Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. Type *string `json:"type,omitempty"` + // The URL of the organization or individual. Maximum length: 255 characters. + Url *string `json:"url,omitempty"` } // NewUltimatePartyIdentification instantiates a new UltimatePartyIdentification object @@ -119,6 +123,38 @@ func (o *UltimatePartyIdentification) SetDateOfBirth(v string) { o.DateOfBirth = &v } +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UltimatePartyIdentification) 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 *UltimatePartyIdentification) 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 *UltimatePartyIdentification) 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 *UltimatePartyIdentification) SetEmail(v string) { + o.Email = &v +} + // GetFirstName returns the FirstName field value if set, zero value otherwise. func (o *UltimatePartyIdentification) GetFirstName() string { if o == nil || common.IsNil(o.FirstName) { @@ -279,6 +315,38 @@ func (o *UltimatePartyIdentification) SetType(v string) { o.Type = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *UltimatePartyIdentification) GetUrl() string { + if o == nil || common.IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UltimatePartyIdentification) GetUrlOk() (*string, bool) { + if o == nil || common.IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *UltimatePartyIdentification) HasUrl() bool { + if o != nil && !common.IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *UltimatePartyIdentification) SetUrl(v string) { + o.Url = &v +} + func (o UltimatePartyIdentification) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -295,6 +363,9 @@ func (o UltimatePartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.DateOfBirth) { toSerialize["dateOfBirth"] = o.DateOfBirth } + if !common.IsNil(o.Email) { + toSerialize["email"] = o.Email + } if !common.IsNil(o.FirstName) { toSerialize["firstName"] = o.FirstName } @@ -310,6 +381,9 @@ func (o UltimatePartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.Url) { + toSerialize["url"] = o.Url + } return toSerialize, nil }