diff --git a/Makefile b/Makefile index e1224f54b..41eca56d7 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ balanceplatform: hasRestServiceError=true acswebhook: spec=BalancePlatformAcsNotification-v1 configurationwebhook: spec=BalancePlatformConfigurationNotification-v1 reportwebhook: spec=BalancePlatformReportNotification-v1 -transferwebhook: spec=BalancePlatformTransferNotification-v3 +transferwebhook: spec=BalancePlatformTransferNotification-v4 binlookup: spec=BinLookupService-v54 checkout: spec=CheckoutService-v70 checkout: serviceName=Checkout @@ -48,10 +48,10 @@ payout: spec=PayoutService-v68 recurring: spec=RecurringService-v68 storedvalue: spec=StoredValueService-v46 storedvalue: serviceName=StoredValue -transfers: spec=TransferService-v3 +transfers: spec=TransferService-v4 transfers: serviceName=Transfers transfers: hasRestServiceError=true -management: spec=ManagementService-v1 +management: spec=ManagementService-v3 management: serviceName=Management management: hasRestServiceError=true managementwebhook: spec=ManagementNotificationService-v3 diff --git a/Readme.md b/Readme.md index 7267fae9c..4e6179dd1 100644 --- a/Readme.md +++ b/Readme.md @@ -18,12 +18,12 @@ The Library supports all APIs under the following services: | [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | client.BinLookup() | **v54** | | [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api/) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | client.Disputes() | **v30** | | [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | Endpoints for managing your point-of-sale payment terminals. | client.PosTerminalManagement() | **v1** | -| [Management API](https://docs.adyen.com/api-explorer/Management/1/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | client.Management() | **v1** | +| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | client.Management() | **v3** | | [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. | client.DataProtection() | **v1** | | [Balance Control API](https://docs.adyen.com/api-explorer/BalanceControl/1/overview) | The Balance Control API lets you transfer funds between merchant accounts that belong to the same legal entity and are under the same company account. | client.BalanceControl() | **v1** | | [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Manage legal entities that contain information required for verification. | client.LegalEntity() | **v3** | | [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | client.BalancePlatform() | **v2** | -| [Transfers API](https://docs.adyen.com/api-explorer/transfers/3/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | client.Transfers() | **v3** | +| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview) | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | client.Transfers() | **v4** | | [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | Manage both online and point-of-sale gift cards and other stored-value cards. | client.StoredValue() | **v46** | | [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | Our classic integration for online payments. | client.Payments() | **v68** | | [Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | **Deprecated:** This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. | client.PlatformsAccount() | **v6** | @@ -42,7 +42,7 @@ The library supports all webhooks under the following model directories: | [Payment Webhooks](https://docs.adyen.com/api-explorer/Webhooks/1/overview) | Adyen uses webhooks to send notifications about payment status updates, newly available reports, and other events that can be subscribed to. For more information, refer to our [documentation](https://docs.adyen.com/development-resources/webhooks). | [webhook](src/webhook) | **v1** | | [Authentication Webhooks](https://docs.adyen.com/api-explorer/acs-webhook/1/overview) | Adyen sends this webhook when the process of cardholder authentication is finalized, whether it is completed successfully, fails, or expires. | [acswebhook](src/acswebhook) | **v1** | | [Configuration Webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/1/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update internal statuses when the status of a capability is changed. | [configurationwebhook](src/configurationwebhook) | **v1** | -| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/3/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhook](src/transferwebhook) | **v3** | +| [Transfer Webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/4/overview) | You can use these webhooks to build your implementation. For example, you can use this information to update balances in your own dashboards or to keep track of incoming funds. | [transferwebhook](src/transferwebhook) | **v4** | | [Report Webhooks](https://docs.adyen.com/api-explorer/report-webhooks/1/overview) | You can download reports programmatically by making an HTTP GET request, or manually from your Balance Platform Customer Area | [reportwebhook](src/reportwebhook) | **v1** | | [Management Webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/3/overview) | Adyen uses webhooks to inform your system about events that happen with your Adyen company and merchant accounts, stores, payment terminals, and payment methods when using Management API. | [managementwebhook](src/managementwebhook) | **v3** | | [Platforms Notifications Webhooks](https://docs.adyen.com/api-explorer/Notification/6/overview) | **Deprecated:** This API is used for the classic integration. If you are just starting your implementation, refer to our [new integration guide](https://docs.adyen.com/marketplaces-and-platforms) instead. | [platformsnotificationevents](src/platformsnotificationevents) | **v6** | diff --git a/src/adyen/api.go b/src/adyen/api.go index 3b297e1b0..e4d0084c5 100644 --- a/src/adyen/api.go +++ b/src/adyen/api.go @@ -73,8 +73,8 @@ const ( DisputesAPIVersion = "v30" StoredValueAPIVersion = "v46" BalancePlatformAPIVersion = "v2" - TransfersAPIVersion = "v3" - ManagementAPIVersion = "v1" + TransfersAPIVersion = "v4" + ManagementAPIVersion = "v3" LegalEntityAPIVersion = "v3" PosTerminalManagementAPIVersion = "v1" DataProtectionAPIVersion = "v1" diff --git a/src/management/.openapi-generator/VERSION b/src/management/.openapi-generator/VERSION deleted file mode 100644 index 4be2c727a..000000000 --- a/src/management/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.5.0 \ No newline at end of file diff --git a/src/management/api_account_company_level.go b/src/management/api_account_company_level.go index 59dba2f49..d424a6148 100644 --- a/src/management/api_account_company_level.go +++ b/src/management/api_account_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_account_merchant_level.go b/src/management/api_account_merchant_level.go index 407f2afaa..97bd2d967 100644 --- a/src/management/api_account_merchant_level.go +++ b/src/management/api_account_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_account_store_level.go b/src/management/api_account_store_level.go index 2cc76de7d..609e3b27f 100644 --- a/src/management/api_account_store_level.go +++ b/src/management/api_account_store_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_allowed_origins_company_level.go b/src/management/api_allowed_origins_company_level.go index 066731e00..97ee3f8b7 100644 --- a/src/management/api_allowed_origins_company_level.go +++ b/src/management/api_allowed_origins_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_allowed_origins_merchant_level.go b/src/management/api_allowed_origins_merchant_level.go index 39313bd74..614b3aa58 100644 --- a/src/management/api_allowed_origins_merchant_level.go +++ b/src/management/api_allowed_origins_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_android_files_company_level.go b/src/management/api_android_files_company_level.go new file mode 100644 index 000000000..669cb266d --- /dev/null +++ b/src/management/api_android_files_company_level.go @@ -0,0 +1,503 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "context" + "encoding/json" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// AndroidFilesCompanyLevelApi service +type AndroidFilesCompanyLevelApi common.Service + +// All parameters accepted by AndroidFilesCompanyLevelApi.GetAndroidApp +type AndroidFilesCompanyLevelApiGetAndroidAppInput struct { + companyId string + id string +} + +/* +Prepare a request for GetAndroidApp +@param companyId The unique identifier of the company account.@param id The unique identifier of the app. +@return AndroidFilesCompanyLevelApiGetAndroidAppInput +*/ +func (a *AndroidFilesCompanyLevelApi) GetAndroidAppInput(companyId string, id string) AndroidFilesCompanyLevelApiGetAndroidAppInput { + return AndroidFilesCompanyLevelApiGetAndroidAppInput{ + companyId: companyId, + id: id, + } +} + +/* +GetAndroidApp Get Android app + +Returns the details of the Android app identified in the path. +These apps have been uploaded to Adyen and can be installed or uninstalled on Android payment terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). + +To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Android files read +* Management API—Android files read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AndroidFilesCompanyLevelApiGetAndroidAppInput - Request parameters, see GetAndroidAppInput +@return AndroidApp, *http.Response, error +*/ +func (a *AndroidFilesCompanyLevelApi) GetAndroidApp(ctx context.Context, r AndroidFilesCompanyLevelApiGetAndroidAppInput) (AndroidApp, *http.Response, error) { + res := &AndroidApp{} + path := "/companies/{companyId}/androidApps/{id}" + path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) + 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 AndroidFilesCompanyLevelApi.ListAndroidApps +type AndroidFilesCompanyLevelApiListAndroidAppsInput struct { + companyId string + pageNumber *int32 + pageSize *int32 + packageName *string + versionCode *int32 +} + +// The number of the page to fetch. +func (r AndroidFilesCompanyLevelApiListAndroidAppsInput) PageNumber(pageNumber int32) AndroidFilesCompanyLevelApiListAndroidAppsInput { + r.pageNumber = &pageNumber + return r +} + +// The number of items to have on a page, maximum 100. The default is 20 items on a page. +func (r AndroidFilesCompanyLevelApiListAndroidAppsInput) PageSize(pageSize int32) AndroidFilesCompanyLevelApiListAndroidAppsInput { + r.pageSize = &pageSize + return r +} + +// The package name that uniquely identifies the Android app. +func (r AndroidFilesCompanyLevelApiListAndroidAppsInput) PackageName(packageName string) AndroidFilesCompanyLevelApiListAndroidAppsInput { + r.packageName = &packageName + return r +} + +// The version number of the app. +func (r AndroidFilesCompanyLevelApiListAndroidAppsInput) VersionCode(versionCode int32) AndroidFilesCompanyLevelApiListAndroidAppsInput { + r.versionCode = &versionCode + return r +} + +/* +Prepare a request for ListAndroidApps +@param companyId The unique identifier of the company account. +@return AndroidFilesCompanyLevelApiListAndroidAppsInput +*/ +func (a *AndroidFilesCompanyLevelApi) ListAndroidAppsInput(companyId string) AndroidFilesCompanyLevelApiListAndroidAppsInput { + return AndroidFilesCompanyLevelApiListAndroidAppsInput{ + companyId: companyId, + } +} + +/* +ListAndroidApps Get a list of Android apps + +Returns a list of the Android apps that are available for the company identified in the path. +These apps have been uploaded to Adyen and can be installed or uninstalled on Android payment terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). + +To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Android files read +* Management API—Android files read and write +* Management API—Terminal actions read +* Management API—Terminal actions read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AndroidFilesCompanyLevelApiListAndroidAppsInput - Request parameters, see ListAndroidAppsInput +@return AndroidAppsResponse, *http.Response, error +*/ +func (a *AndroidFilesCompanyLevelApi) ListAndroidApps(ctx context.Context, r AndroidFilesCompanyLevelApiListAndroidAppsInput) (AndroidAppsResponse, *http.Response, error) { + res := &AndroidAppsResponse{} + path := "/companies/{companyId}/androidApps" + path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.pageNumber != nil { + common.ParameterAddToQuery(queryParams, "pageNumber", r.pageNumber, "") + } + if r.pageSize != nil { + common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") + } + if r.packageName != nil { + common.ParameterAddToQuery(queryParams, "packageName", r.packageName, "") + } + if r.versionCode != nil { + common.ParameterAddToQuery(queryParams, "versionCode", r.versionCode, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + 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 AndroidFilesCompanyLevelApi.ListAndroidCertificates +type AndroidFilesCompanyLevelApiListAndroidCertificatesInput struct { + companyId string + pageNumber *int32 + pageSize *int32 + certificateName *string +} + +// The number of the page to fetch. +func (r AndroidFilesCompanyLevelApiListAndroidCertificatesInput) PageNumber(pageNumber int32) AndroidFilesCompanyLevelApiListAndroidCertificatesInput { + r.pageNumber = &pageNumber + return r +} + +// The number of items to have on a page, maximum 100. The default is 20 items on a page. +func (r AndroidFilesCompanyLevelApiListAndroidCertificatesInput) PageSize(pageSize int32) AndroidFilesCompanyLevelApiListAndroidCertificatesInput { + r.pageSize = &pageSize + return r +} + +// The name of the certificate. +func (r AndroidFilesCompanyLevelApiListAndroidCertificatesInput) CertificateName(certificateName string) AndroidFilesCompanyLevelApiListAndroidCertificatesInput { + r.certificateName = &certificateName + return r +} + +/* +Prepare a request for ListAndroidCertificates +@param companyId The unique identifier of the company account. +@return AndroidFilesCompanyLevelApiListAndroidCertificatesInput +*/ +func (a *AndroidFilesCompanyLevelApi) ListAndroidCertificatesInput(companyId string) AndroidFilesCompanyLevelApiListAndroidCertificatesInput { + return AndroidFilesCompanyLevelApiListAndroidCertificatesInput{ + companyId: companyId, + } +} + +/* +ListAndroidCertificates Get a list of Android certificates + +Returns a list of the Android certificates that are available for the company identified in the path. +Typically, these certificates enable running apps on Android payment terminals. The certifcates in the list have been uploaded to Adyen and can be installed or uninstalled on Android terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). + +To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Android files read +* Management API—Android files read and write +* Management API—Terminal actions read +* Management API—Terminal actions read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AndroidFilesCompanyLevelApiListAndroidCertificatesInput - Request parameters, see ListAndroidCertificatesInput +@return AndroidCertificatesResponse, *http.Response, error +*/ +func (a *AndroidFilesCompanyLevelApi) ListAndroidCertificates(ctx context.Context, r AndroidFilesCompanyLevelApiListAndroidCertificatesInput) (AndroidCertificatesResponse, *http.Response, error) { + res := &AndroidCertificatesResponse{} + path := "/companies/{companyId}/androidCertificates" + path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + if r.pageNumber != nil { + common.ParameterAddToQuery(queryParams, "pageNumber", r.pageNumber, "") + } + if r.pageSize != nil { + common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") + } + if r.certificateName != nil { + common.ParameterAddToQuery(queryParams, "certificateName", r.certificateName, "") + } + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + 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 AndroidFilesCompanyLevelApi.UploadAndroidApp +type AndroidFilesCompanyLevelApiUploadAndroidAppInput struct { + companyId string +} + +/* +Prepare a request for UploadAndroidApp +@param companyId The unique identifier of the company account. +@return AndroidFilesCompanyLevelApiUploadAndroidAppInput +*/ +func (a *AndroidFilesCompanyLevelApi) UploadAndroidAppInput(companyId string) AndroidFilesCompanyLevelApiUploadAndroidAppInput { + return AndroidFilesCompanyLevelApiUploadAndroidAppInput{ + companyId: companyId, + } +} + +/* +UploadAndroidApp Upload Android App + +Uploads an Android APK file to Adyen. +The maximum APK file size is 200 MB. +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Android files read and write + +>By choosing to upload, install, or run any third-party applications on an Adyen payment terminal, you accept full responsibility and liability for any consequences of uploading, installing, or running any such applications. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AndroidFilesCompanyLevelApiUploadAndroidAppInput - Request parameters, see UploadAndroidAppInput +@return *http.Response, error +*/ +func (a *AndroidFilesCompanyLevelApi) UploadAndroidApp(ctx context.Context, r AndroidFilesCompanyLevelApiUploadAndroidAppInput) (*http.Response, error) { + var res interface{} + path := "/companies/{companyId}/androidApps" + path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -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, + ) + + 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 + } + + 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/management/api_api_credentials_company_level.go b/src/management/api_api_credentials_company_level.go index 41d1162c0..e76855667 100644 --- a/src/management/api_api_credentials_company_level.go +++ b/src/management/api_api_credentials_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_api_credentials_merchant_level.go b/src/management/api_api_credentials_merchant_level.go index 8ee7d1f47..73a86ad7e 100644 --- a/src/management/api_api_credentials_merchant_level.go +++ b/src/management/api_api_credentials_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_api_key_company_level.go b/src/management/api_api_key_company_level.go index c16a8931f..ef1f71e88 100644 --- a/src/management/api_api_key_company_level.go +++ b/src/management/api_api_key_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_api_key_merchant_level.go b/src/management/api_api_key_merchant_level.go index 1f5739bf7..4fb69a4fc 100644 --- a/src/management/api_api_key_merchant_level.go +++ b/src/management/api_api_key_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_client_key_company_level.go b/src/management/api_client_key_company_level.go index 007305caf..01720de86 100644 --- a/src/management/api_client_key_company_level.go +++ b/src/management/api_client_key_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_client_key_merchant_level.go b/src/management/api_client_key_merchant_level.go index 77756daf6..9893f9483 100644 --- a/src/management/api_client_key_merchant_level.go +++ b/src/management/api_client_key_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_my_api_credential.go b/src/management/api_my_api_credential.go index 809849574..6062b94a6 100644 --- a/src/management/api_my_api_credential.go +++ b/src/management/api_my_api_credential.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -123,6 +123,99 @@ func (a *MyAPICredentialApi) AddAllowedOrigin(ctx context.Context, r MyAPICreden return *res, httpRes, err } +// All parameters accepted by MyAPICredentialApi.GenerateNewClientKeyForSelf +type MyAPICredentialApiGenerateNewClientKeyForSelfInput struct { +} + +/* +Prepare a request for GenerateNewClientKeyForSelf + +@return MyAPICredentialApiGenerateNewClientKeyForSelfInput +*/ +func (a *MyAPICredentialApi) GenerateNewClientKeyForSelfInput() MyAPICredentialApiGenerateNewClientKeyForSelfInput { + return MyAPICredentialApiGenerateNewClientKeyForSelfInput{} +} + +/* +GenerateNewClientKeyForSelf Generate new client key for self + +Returns a new [client key](https://docs.adyen.com/development-resources/client-side-authentication#how-it-works) for the caller - API Credential or OAuth Access Token. You can use the new client key a few minutes after generating it. The old client key stops working 24 hours after generating a new one.To make this request, your API credential must have the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—API credentials read and write + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r MyAPICredentialApiGenerateNewClientKeyForSelfInput - Request parameters, see GenerateNewClientKeyForSelfInput +@return GenerateClientKeyResponse, *http.Response, error +*/ +func (a *MyAPICredentialApi) GenerateNewClientKeyForSelf(ctx context.Context, r MyAPICredentialApiGenerateNewClientKeyForSelfInput) (GenerateClientKeyResponse, *http.Response, error) { + res := &GenerateClientKeyResponse{} + path := "/me/generateClientKey" + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + 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 MyAPICredentialApi.GetAllowedOriginDetails type MyAPICredentialApiGetAllowedOriginDetailsInput struct { originId string diff --git a/src/management/api_payment_methods_merchant_level.go b/src/management/api_payment_methods_merchant_level.go index de65b63f6..69d5639cd 100644 --- a/src/management/api_payment_methods_merchant_level.go +++ b/src/management/api_payment_methods_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_payout_settings_merchant_level.go b/src/management/api_payout_settings_merchant_level.go index 85cb5863b..47d12a84c 100644 --- a/src/management/api_payout_settings_merchant_level.go +++ b/src/management/api_payout_settings_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_split_configuration_merchant_level.go b/src/management/api_split_configuration_merchant_level.go index 69fa74644..b7d4e1b92 100644 --- a/src/management/api_split_configuration_merchant_level.go +++ b/src/management/api_split_configuration_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_actions_company_level.go b/src/management/api_terminal_actions_company_level.go index 021334e29..57d23a21e 100644 --- a/src/management/api_terminal_actions_company_level.go +++ b/src/management/api_terminal_actions_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -124,278 +124,6 @@ func (a *TerminalActionsCompanyLevelApi) GetTerminalAction(ctx context.Context, return *res, httpRes, err } -// All parameters accepted by TerminalActionsCompanyLevelApi.ListAndroidApps -type TerminalActionsCompanyLevelApiListAndroidAppsInput struct { - companyId string - pageNumber *int32 - pageSize *int32 - packageName *string - versionCode *int32 -} - -// The number of the page to fetch. -func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) PageNumber(pageNumber int32) TerminalActionsCompanyLevelApiListAndroidAppsInput { - r.pageNumber = &pageNumber - return r -} - -// The number of items to have on a page, maximum 100. The default is 20 items on a page. -func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) PageSize(pageSize int32) TerminalActionsCompanyLevelApiListAndroidAppsInput { - r.pageSize = &pageSize - return r -} - -// The package name that uniquely identifies the Android app. -func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) PackageName(packageName string) TerminalActionsCompanyLevelApiListAndroidAppsInput { - r.packageName = &packageName - return r -} - -// The version number of the app. -func (r TerminalActionsCompanyLevelApiListAndroidAppsInput) VersionCode(versionCode int32) TerminalActionsCompanyLevelApiListAndroidAppsInput { - r.versionCode = &versionCode - return r -} - -/* -Prepare a request for ListAndroidApps -@param companyId The unique identifier of the company account. -@return TerminalActionsCompanyLevelApiListAndroidAppsInput -*/ -func (a *TerminalActionsCompanyLevelApi) ListAndroidAppsInput(companyId string) TerminalActionsCompanyLevelApiListAndroidAppsInput { - return TerminalActionsCompanyLevelApiListAndroidAppsInput{ - companyId: companyId, - } -} - -/* -ListAndroidApps Get a list of Android apps - -Returns a list of the Android apps that are available for the company identified in the path. -These apps have been uploaded to Adyen and can be installed or uninstalled on Android payment terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). - -To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): -* Management API—Terminal actions read -* Management API—Terminal actions read and write - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r TerminalActionsCompanyLevelApiListAndroidAppsInput - Request parameters, see ListAndroidAppsInput -@return AndroidAppsResponse, *http.Response, error -*/ -func (a *TerminalActionsCompanyLevelApi) ListAndroidApps(ctx context.Context, r TerminalActionsCompanyLevelApiListAndroidAppsInput) (AndroidAppsResponse, *http.Response, error) { - res := &AndroidAppsResponse{} - path := "/companies/{companyId}/androidApps" - path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) - queryParams := url.Values{} - headerParams := make(map[string]string) - if r.pageNumber != nil { - common.ParameterAddToQuery(queryParams, "pageNumber", r.pageNumber, "") - } - if r.pageSize != nil { - common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") - } - if r.packageName != nil { - common.ParameterAddToQuery(queryParams, "packageName", r.packageName, "") - } - if r.versionCode != nil { - common.ParameterAddToQuery(queryParams, "versionCode", r.versionCode, "") - } - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - 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 TerminalActionsCompanyLevelApi.ListAndroidCertificates -type TerminalActionsCompanyLevelApiListAndroidCertificatesInput struct { - companyId string - pageNumber *int32 - pageSize *int32 - certificateName *string -} - -// The number of the page to fetch. -func (r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) PageNumber(pageNumber int32) TerminalActionsCompanyLevelApiListAndroidCertificatesInput { - r.pageNumber = &pageNumber - return r -} - -// The number of items to have on a page, maximum 100. The default is 20 items on a page. -func (r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) PageSize(pageSize int32) TerminalActionsCompanyLevelApiListAndroidCertificatesInput { - r.pageSize = &pageSize - return r -} - -// The name of the certificate. -func (r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) CertificateName(certificateName string) TerminalActionsCompanyLevelApiListAndroidCertificatesInput { - r.certificateName = &certificateName - return r -} - -/* -Prepare a request for ListAndroidCertificates -@param companyId The unique identifier of the company account. -@return TerminalActionsCompanyLevelApiListAndroidCertificatesInput -*/ -func (a *TerminalActionsCompanyLevelApi) ListAndroidCertificatesInput(companyId string) TerminalActionsCompanyLevelApiListAndroidCertificatesInput { - return TerminalActionsCompanyLevelApiListAndroidCertificatesInput{ - companyId: companyId, - } -} - -/* -ListAndroidCertificates Get a list of Android certificates - -Returns a list of the Android certificates that are available for the company identified in the path. -Typically, these certificates enable running apps on Android payment terminals. The certifcates in the list have been uploaded to Adyen and can be installed or uninstalled on Android terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). - -To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): -* Management API—Terminal actions read -* Management API—Terminal actions read and write - -@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@param r TerminalActionsCompanyLevelApiListAndroidCertificatesInput - Request parameters, see ListAndroidCertificatesInput -@return AndroidCertificatesResponse, *http.Response, error -*/ -func (a *TerminalActionsCompanyLevelApi) ListAndroidCertificates(ctx context.Context, r TerminalActionsCompanyLevelApiListAndroidCertificatesInput) (AndroidCertificatesResponse, *http.Response, error) { - res := &AndroidCertificatesResponse{} - path := "/companies/{companyId}/androidCertificates" - path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) - queryParams := url.Values{} - headerParams := make(map[string]string) - if r.pageNumber != nil { - common.ParameterAddToQuery(queryParams, "pageNumber", r.pageNumber, "") - } - if r.pageSize != nil { - common.ParameterAddToQuery(queryParams, "pageSize", r.pageSize, "") - } - if r.certificateName != nil { - common.ParameterAddToQuery(queryParams, "certificateName", r.certificateName, "") - } - httpRes, err := common.SendAPIRequest( - ctx, - a.Client, - 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 TerminalActionsCompanyLevelApi.ListTerminalActions type TerminalActionsCompanyLevelApiListTerminalActionsInput struct { companyId string diff --git a/src/management/api_terminal_actions_terminal_level.go b/src/management/api_terminal_actions_terminal_level.go index cee981e56..0b13b8e36 100644 --- a/src/management/api_terminal_actions_terminal_level.go +++ b/src/management/api_terminal_actions_terminal_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_orders_company_level.go b/src/management/api_terminal_orders_company_level.go index a99552a20..6a8064bfd 100644 --- a/src/management/api_terminal_orders_company_level.go +++ b/src/management/api_terminal_orders_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_orders_merchant_level.go b/src/management/api_terminal_orders_merchant_level.go index 97f0de105..f856644e1 100644 --- a/src/management/api_terminal_orders_merchant_level.go +++ b/src/management/api_terminal_orders_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_settings_company_level.go b/src/management/api_terminal_settings_company_level.go index 1e50cda00..5651917a9 100644 --- a/src/management/api_terminal_settings_company_level.go +++ b/src/management/api_terminal_settings_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_settings_merchant_level.go b/src/management/api_terminal_settings_merchant_level.go index ed55ff9b0..937d7e4a1 100644 --- a/src/management/api_terminal_settings_merchant_level.go +++ b/src/management/api_terminal_settings_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_settings_store_level.go b/src/management/api_terminal_settings_store_level.go index 0988c1c82..7ebea153e 100644 --- a/src/management/api_terminal_settings_store_level.go +++ b/src/management/api_terminal_settings_store_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminal_settings_terminal_level.go b/src/management/api_terminal_settings_terminal_level.go index 52c09d708..f96e41aa6 100644 --- a/src/management/api_terminal_settings_terminal_level.go +++ b/src/management/api_terminal_settings_terminal_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_terminals_terminal_level.go b/src/management/api_terminals_terminal_level.go index d346975a7..f9937f631 100644 --- a/src/management/api_terminals_terminal_level.go +++ b/src/management/api_terminals_terminal_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/url" + "strings" "github.com/adyen/adyen-go-api-library/v7/src/common" ) @@ -194,3 +195,108 @@ func (a *TerminalsTerminalLevelApi) ListTerminals(ctx context.Context, r Termina return *res, httpRes, err } + +// All parameters accepted by TerminalsTerminalLevelApi.ReassignTerminal +type TerminalsTerminalLevelApiReassignTerminalInput struct { + terminalId string + terminalReassignmentRequest *TerminalReassignmentRequest +} + +func (r TerminalsTerminalLevelApiReassignTerminalInput) TerminalReassignmentRequest(terminalReassignmentRequest TerminalReassignmentRequest) TerminalsTerminalLevelApiReassignTerminalInput { + r.terminalReassignmentRequest = &terminalReassignmentRequest + return r +} + +/* +Prepare a request for ReassignTerminal +@param terminalId The unique identifier of the payment terminal. +@return TerminalsTerminalLevelApiReassignTerminalInput +*/ +func (a *TerminalsTerminalLevelApi) ReassignTerminalInput(terminalId string) TerminalsTerminalLevelApiReassignTerminalInput { + return TerminalsTerminalLevelApiReassignTerminalInput{ + terminalId: terminalId, + } +} + +/* +ReassignTerminal Reassign a terminal + +Reassigns a payment terminal to a company account, merchant account, merchant account inventory, or a store. + +To make this request, your API credential must have the following [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Assign Terminal + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TerminalsTerminalLevelApiReassignTerminalInput - Request parameters, see ReassignTerminalInput +@return *http.Response, error +*/ +func (a *TerminalsTerminalLevelApi) ReassignTerminal(ctx context.Context, r TerminalsTerminalLevelApiReassignTerminalInput) (*http.Response, error) { + var res interface{} + path := "/terminals/{terminalId}/reassign" + path = strings.Replace(path, "{"+"terminalId"+"}", url.PathEscape(common.ParameterValueToString(r.terminalId, "terminalId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.terminalReassignmentRequest, + 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 + } + + 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/management/api_users_company_level.go b/src/management/api_users_company_level.go index 35da7465e..e9408a921 100644 --- a/src/management/api_users_company_level.go +++ b/src/management/api_users_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_users_merchant_level.go b/src/management/api_users_merchant_level.go index 46e6a1340..727411d5c 100644 --- a/src/management/api_users_merchant_level.go +++ b/src/management/api_users_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_webhooks_company_level.go b/src/management/api_webhooks_company_level.go index 34d59af9d..40ceca7b1 100644 --- a/src/management/api_webhooks_company_level.go +++ b/src/management/api_webhooks_company_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/api_webhooks_merchant_level.go b/src/management/api_webhooks_merchant_level.go index 44de9fb29..15a93d8ce 100644 --- a/src/management/api_webhooks_merchant_level.go +++ b/src/management/api_webhooks_merchant_level.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/client.go b/src/management/client.go index 7463855c3..14dbe213d 100644 --- a/src/management/client.go +++ b/src/management/client.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,7 +12,7 @@ import ( "github.com/adyen/adyen-go-api-library/v7/src/common" ) -// APIClient manages communication with the Management API API v1 +// APIClient manages communication with the Management API API v3 // In most cases there should be only one, shared, APIClient. type APIClient struct { common common.Service // Reuse a single struct instead of allocating one for each service on the heap. @@ -37,6 +37,8 @@ type APIClient struct { AllowedOriginsMerchantLevelApi *AllowedOriginsMerchantLevelApi + AndroidFilesCompanyLevelApi *AndroidFilesCompanyLevelApi + ClientKeyCompanyLevelApi *ClientKeyCompanyLevelApi ClientKeyMerchantLevelApi *ClientKeyMerchantLevelApi @@ -94,6 +96,7 @@ func NewAPIClient(client *common.Client) *APIClient { c.AccountStoreLevelApi = (*AccountStoreLevelApi)(&c.common) c.AllowedOriginsCompanyLevelApi = (*AllowedOriginsCompanyLevelApi)(&c.common) c.AllowedOriginsMerchantLevelApi = (*AllowedOriginsMerchantLevelApi)(&c.common) + c.AndroidFilesCompanyLevelApi = (*AndroidFilesCompanyLevelApi)(&c.common) c.ClientKeyCompanyLevelApi = (*ClientKeyCompanyLevelApi)(&c.common) c.ClientKeyMerchantLevelApi = (*ClientKeyMerchantLevelApi)(&c.common) c.MyAPICredentialApi = (*MyAPICredentialApi)(&c.common) diff --git a/src/management/model_additional_commission.go b/src/management/model_additional_commission.go index 296fefc6a..294c714fe 100644 --- a/src/management/model_additional_commission.go +++ b/src/management/model_additional_commission.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_additional_settings.go b/src/management/model_additional_settings.go index 03dcb58fa..5696b20dc 100644 --- a/src/management/model_additional_settings.go +++ b/src/management/model_additional_settings.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_additional_settings_response.go b/src/management/model_additional_settings_response.go index 0bdcd4c05..c838bd415 100644 --- a/src/management/model_additional_settings_response.go +++ b/src/management/model_additional_settings_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_address.go b/src/management/model_address.go index b954f26d9..45e5c10b5 100644 --- a/src/management/model_address.go +++ b/src/management/model_address.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_afterpay_touch_info.go b/src/management/model_afterpay_touch_info.go index 8f2251aa4..da2f1d88e 100644 --- a/src/management/model_afterpay_touch_info.go +++ b/src/management/model_afterpay_touch_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_allowed_origin.go b/src/management/model_allowed_origin.go index d3cddef40..5179d955d 100644 --- a/src/management/model_allowed_origin.go +++ b/src/management/model_allowed_origin.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_allowed_origins_response.go b/src/management/model_allowed_origins_response.go index c38c3c9aa..b50611311 100644 --- a/src/management/model_allowed_origins_response.go +++ b/src/management/model_allowed_origins_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_amount.go b/src/management/model_amount.go index eedb31577..a3a0cfdb2 100644 --- a/src/management/model_amount.go +++ b/src/management/model_amount.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_android_app.go b/src/management/model_android_app.go index 67f84b5b7..18a4b5ef4 100644 --- a/src/management/model_android_app.go +++ b/src/management/model_android_app.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,13 +21,15 @@ var _ common.MappedNullable = &AndroidApp{} type AndroidApp struct { // The description that was provided when uploading the app. The description is not shown on the terminal. Description *string `json:"description,omitempty"` + // The error code of the app. It exists if the status is error or invalid. + ErrorCode *string `json:"errorCode,omitempty"` // The unique identifier of the app. Id string `json:"id"` // The app name that is shown on the terminal. Label *string `json:"label,omitempty"` // The package name that uniquely identifies the Android app. PackageName *string `json:"packageName,omitempty"` - // The status of the app. Possible values: * `processing`: The app is being signed and converted to a format that the terminal can handle. * `error`: Something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: There is something wrong with the APK file of the app. * `ready`: The app has been signed and converted. * `archived`: The app is no longer available. + // The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. Status string `json:"status"` // The version number of the app. VersionCode *int32 `json:"versionCode,omitempty"` @@ -86,6 +88,38 @@ func (o *AndroidApp) SetDescription(v string) { o.Description = &v } +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *AndroidApp) 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 *AndroidApp) 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 *AndroidApp) 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 *AndroidApp) SetErrorCode(v string) { + o.ErrorCode = &v +} + // GetId returns the Id field value func (o *AndroidApp) GetId() string { if o == nil { @@ -275,6 +309,9 @@ func (o AndroidApp) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } toSerialize["id"] = o.Id if !common.IsNil(o.Label) { toSerialize["label"] = o.Label diff --git a/src/management/model_android_apps_response.go b/src/management/model_android_apps_response.go index 8999afc5b..a5b8a2d5d 100644 --- a/src/management/model_android_apps_response.go +++ b/src/management/model_android_apps_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_android_certificate.go b/src/management/model_android_certificate.go index 7710a6086..7e366f504 100644 --- a/src/management/model_android_certificate.go +++ b/src/management/model_android_certificate.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_android_certificates_response.go b/src/management/model_android_certificates_response.go index ff4e71ce5..12055365a 100644 --- a/src/management/model_android_certificates_response.go +++ b/src/management/model_android_certificates_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_api_credential.go b/src/management/model_api_credential.go index 5b2226762..7b4830235 100644 --- a/src/management/model_api_credential.go +++ b/src/management/model_api_credential.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_api_credential_links.go b/src/management/model_api_credential_links.go index 3291e998d..875e8dcb5 100644 --- a/src/management/model_api_credential_links.go +++ b/src/management/model_api_credential_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_apple_pay_info.go b/src/management/model_apple_pay_info.go index 6f4a46db2..3d45069bc 100644 --- a/src/management/model_apple_pay_info.go +++ b/src/management/model_apple_pay_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,15 +20,16 @@ var _ common.MappedNullable = &ApplePayInfo{} // ApplePayInfo struct for ApplePayInfo type ApplePayInfo struct { // The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). - Domains []string `json:"domains,omitempty"` + Domains []string `json:"domains"` } // NewApplePayInfo instantiates a new ApplePayInfo 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 NewApplePayInfo() *ApplePayInfo { +func NewApplePayInfo(domains []string) *ApplePayInfo { this := ApplePayInfo{} + this.Domains = domains return &this } @@ -40,34 +41,26 @@ func NewApplePayInfoWithDefaults() *ApplePayInfo { return &this } -// GetDomains returns the Domains field value if set, zero value otherwise. +// GetDomains returns the Domains field value func (o *ApplePayInfo) GetDomains() []string { - if o == nil || common.IsNil(o.Domains) { + if o == nil { var ret []string return ret } + return o.Domains } -// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// GetDomainsOk returns a tuple with the Domains field value // and a boolean to check if the value has been set. func (o *ApplePayInfo) GetDomainsOk() ([]string, bool) { - if o == nil || common.IsNil(o.Domains) { + if o == nil { return nil, false } return o.Domains, true } -// HasDomains returns a boolean if a field has been set. -func (o *ApplePayInfo) HasDomains() bool { - if o != nil && !common.IsNil(o.Domains) { - return true - } - - return false -} - -// SetDomains gets a reference to the given []string and assigns it to the Domains field. +// SetDomains sets field value func (o *ApplePayInfo) SetDomains(v []string) { o.Domains = v } @@ -82,9 +75,7 @@ func (o ApplePayInfo) MarshalJSON() ([]byte, error) { func (o ApplePayInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !common.IsNil(o.Domains) { - toSerialize["domains"] = o.Domains - } + toSerialize["domains"] = o.Domains return toSerialize, nil } diff --git a/src/management/model_bcmc_info.go b/src/management/model_bcmc_info.go index 68f211fb4..8deaf1526 100644 --- a/src/management/model_bcmc_info.go +++ b/src/management/model_bcmc_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,7 +20,8 @@ var _ common.MappedNullable = &BcmcInfo{} // BcmcInfo struct for BcmcInfo type BcmcInfo struct { // Indicates if [Bancontact mobile](https://docs.adyen.com/payment-methods/bancontact/bancontact-mobile) is enabled. - EnableBcmcMobile *bool `json:"enableBcmcMobile,omitempty"` + EnableBcmcMobile *bool `json:"enableBcmcMobile,omitempty"` + TransactionDescription *TransactionDescriptionInfo `json:"transactionDescription,omitempty"` } // NewBcmcInfo instantiates a new BcmcInfo object @@ -72,6 +73,38 @@ func (o *BcmcInfo) SetEnableBcmcMobile(v bool) { o.EnableBcmcMobile = &v } +// GetTransactionDescription returns the TransactionDescription field value if set, zero value otherwise. +func (o *BcmcInfo) GetTransactionDescription() TransactionDescriptionInfo { + if o == nil || common.IsNil(o.TransactionDescription) { + var ret TransactionDescriptionInfo + return ret + } + return *o.TransactionDescription +} + +// GetTransactionDescriptionOk returns a tuple with the TransactionDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BcmcInfo) GetTransactionDescriptionOk() (*TransactionDescriptionInfo, bool) { + if o == nil || common.IsNil(o.TransactionDescription) { + return nil, false + } + return o.TransactionDescription, true +} + +// HasTransactionDescription returns a boolean if a field has been set. +func (o *BcmcInfo) HasTransactionDescription() bool { + if o != nil && !common.IsNil(o.TransactionDescription) { + return true + } + + return false +} + +// SetTransactionDescription gets a reference to the given TransactionDescriptionInfo and assigns it to the TransactionDescription field. +func (o *BcmcInfo) SetTransactionDescription(v TransactionDescriptionInfo) { + o.TransactionDescription = &v +} + func (o BcmcInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -85,6 +118,9 @@ func (o BcmcInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.EnableBcmcMobile) { toSerialize["enableBcmcMobile"] = o.EnableBcmcMobile } + if !common.IsNil(o.TransactionDescription) { + toSerialize["transactionDescription"] = o.TransactionDescription + } return toSerialize, nil } diff --git a/src/management/model_billing_entities_response.go b/src/management/model_billing_entities_response.go index 0e0a5397a..3fed21d5f 100644 --- a/src/management/model_billing_entities_response.go +++ b/src/management/model_billing_entities_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_billing_entity.go b/src/management/model_billing_entity.go index 94eaa976c..0d0286f6b 100644 --- a/src/management/model_billing_entity.go +++ b/src/management/model_billing_entity.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_cardholder_receipt.go b/src/management/model_cardholder_receipt.go index e2a6db14b..eb5c8fd56 100644 --- a/src/management/model_cardholder_receipt.go +++ b/src/management/model_cardholder_receipt.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_cartes_bancaires_info.go b/src/management/model_cartes_bancaires_info.go index dbb303bbd..b1acead4f 100644 --- a/src/management/model_cartes_bancaires_info.go +++ b/src/management/model_cartes_bancaires_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,7 +20,8 @@ var _ common.MappedNullable = &CartesBancairesInfo{} // CartesBancairesInfo struct for CartesBancairesInfo type CartesBancairesInfo struct { // Cartes Bancaires SIRET. Format: 14 digits. - Siret string `json:"siret"` + Siret string `json:"siret"` + TransactionDescription *TransactionDescriptionInfo `json:"transactionDescription,omitempty"` } // NewCartesBancairesInfo instantiates a new CartesBancairesInfo object @@ -65,6 +66,38 @@ func (o *CartesBancairesInfo) SetSiret(v string) { o.Siret = v } +// GetTransactionDescription returns the TransactionDescription field value if set, zero value otherwise. +func (o *CartesBancairesInfo) GetTransactionDescription() TransactionDescriptionInfo { + if o == nil || common.IsNil(o.TransactionDescription) { + var ret TransactionDescriptionInfo + return ret + } + return *o.TransactionDescription +} + +// GetTransactionDescriptionOk returns a tuple with the TransactionDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CartesBancairesInfo) GetTransactionDescriptionOk() (*TransactionDescriptionInfo, bool) { + if o == nil || common.IsNil(o.TransactionDescription) { + return nil, false + } + return o.TransactionDescription, true +} + +// HasTransactionDescription returns a boolean if a field has been set. +func (o *CartesBancairesInfo) HasTransactionDescription() bool { + if o != nil && !common.IsNil(o.TransactionDescription) { + return true + } + + return false +} + +// SetTransactionDescription gets a reference to the given TransactionDescriptionInfo and assigns it to the TransactionDescription field. +func (o *CartesBancairesInfo) SetTransactionDescription(v TransactionDescriptionInfo) { + o.TransactionDescription = &v +} + func (o CartesBancairesInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -76,6 +109,9 @@ func (o CartesBancairesInfo) MarshalJSON() ([]byte, error) { func (o CartesBancairesInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["siret"] = o.Siret + if !common.IsNil(o.TransactionDescription) { + toSerialize["transactionDescription"] = o.TransactionDescription + } return toSerialize, nil } diff --git a/src/management/model_clearpay_info.go b/src/management/model_clearpay_info.go index 14458f49d..541a5e2f6 100644 --- a/src/management/model_clearpay_info.go +++ b/src/management/model_clearpay_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_commission.go b/src/management/model_commission.go index 09034fc95..ff84f8131 100644 --- a/src/management/model_commission.go +++ b/src/management/model_commission.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_company.go b/src/management/model_company.go index 26206d869..3d7a498d3 100644 --- a/src/management/model_company.go +++ b/src/management/model_company.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_company_api_credential.go b/src/management/model_company_api_credential.go index e4d31460f..077ee7673 100644 --- a/src/management/model_company_api_credential.go +++ b/src/management/model_company_api_credential.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_company_links.go b/src/management/model_company_links.go index 277c43183..640c39160 100644 --- a/src/management/model_company_links.go +++ b/src/management/model_company_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_company_user.go b/src/management/model_company_user.go index ec6dc78f8..badf5c494 100644 --- a/src/management/model_company_user.go +++ b/src/management/model_company_user.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_configuration.go b/src/management/model_configuration.go index 04601e660..8cbea50b6 100644 --- a/src/management/model_configuration.go +++ b/src/management/model_configuration.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_connectivity.go b/src/management/model_connectivity.go index 8f5bdece6..dfb6101cb 100644 --- a/src/management/model_connectivity.go +++ b/src/management/model_connectivity.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_contact.go b/src/management/model_contact.go index 315d232f5..2bdd85f9d 100644 --- a/src/management/model_contact.go +++ b/src/management/model_contact.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_allowed_origin_request.go b/src/management/model_create_allowed_origin_request.go index 4644bc416..361357d70 100644 --- a/src/management/model_create_allowed_origin_request.go +++ b/src/management/model_create_allowed_origin_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_api_credential_response.go b/src/management/model_create_api_credential_response.go index 4ff5e7766..5733e4ce1 100644 --- a/src/management/model_create_api_credential_response.go +++ b/src/management/model_create_api_credential_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_company_api_credential_request.go b/src/management/model_create_company_api_credential_request.go index 59601dd11..acc4055bf 100644 --- a/src/management/model_create_company_api_credential_request.go +++ b/src/management/model_create_company_api_credential_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_company_api_credential_response.go b/src/management/model_create_company_api_credential_response.go index 5d221a886..cf2f65009 100644 --- a/src/management/model_create_company_api_credential_response.go +++ b/src/management/model_create_company_api_credential_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_company_user_request.go b/src/management/model_create_company_user_request.go index ceb030748..464be2aca 100644 --- a/src/management/model_create_company_user_request.go +++ b/src/management/model_create_company_user_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_company_user_response.go b/src/management/model_create_company_user_response.go index c8a66ea88..b2077fa70 100644 --- a/src/management/model_create_company_user_response.go +++ b/src/management/model_create_company_user_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_company_webhook_request.go b/src/management/model_create_company_webhook_request.go index 58d6b2eab..a0708c512 100644 --- a/src/management/model_create_company_webhook_request.go +++ b/src/management/model_create_company_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,7 +32,9 @@ type CreateCompanyWebhookRequest struct { CommunicationFormat string `json:"communicationFormat"` // Your description for this webhook configuration. Description *string `json:"description,omitempty"` - // Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. + // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + EncryptionProtocol *string `json:"encryptionProtocol,omitempty"` + // Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. FilterMerchantAccountType string `json:"filterMerchantAccountType"` // A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. FilterMerchantAccounts []string `json:"filterMerchantAccounts"` @@ -42,9 +44,7 @@ type CreateCompanyWebhookRequest struct { Password *string `json:"password,omitempty"` // Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. PopulateSoapActionHeader *bool `json:"populateSoapActionHeader,omitempty"` - // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - SslVersion *string `json:"sslVersion,omitempty"` - // The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + // The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). Type string `json:"type"` // Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. Url string `json:"url"` @@ -283,6 +283,38 @@ func (o *CreateCompanyWebhookRequest) SetDescription(v string) { o.Description = &v } +// GetEncryptionProtocol returns the EncryptionProtocol field value if set, zero value otherwise. +func (o *CreateCompanyWebhookRequest) GetEncryptionProtocol() string { + if o == nil || common.IsNil(o.EncryptionProtocol) { + var ret string + return ret + } + return *o.EncryptionProtocol +} + +// GetEncryptionProtocolOk returns a tuple with the EncryptionProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCompanyWebhookRequest) GetEncryptionProtocolOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptionProtocol) { + return nil, false + } + return o.EncryptionProtocol, true +} + +// HasEncryptionProtocol returns a boolean if a field has been set. +func (o *CreateCompanyWebhookRequest) HasEncryptionProtocol() bool { + if o != nil && !common.IsNil(o.EncryptionProtocol) { + return true + } + + return false +} + +// SetEncryptionProtocol gets a reference to the given string and assigns it to the EncryptionProtocol field. +func (o *CreateCompanyWebhookRequest) SetEncryptionProtocol(v string) { + o.EncryptionProtocol = &v +} + // GetFilterMerchantAccountType returns the FilterMerchantAccountType field value func (o *CreateCompanyWebhookRequest) GetFilterMerchantAccountType() string { if o == nil { @@ -427,38 +459,6 @@ func (o *CreateCompanyWebhookRequest) SetPopulateSoapActionHeader(v bool) { o.PopulateSoapActionHeader = &v } -// GetSslVersion returns the SslVersion field value if set, zero value otherwise. -func (o *CreateCompanyWebhookRequest) GetSslVersion() string { - if o == nil || common.IsNil(o.SslVersion) { - var ret string - return ret - } - return *o.SslVersion -} - -// GetSslVersionOk returns a tuple with the SslVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCompanyWebhookRequest) GetSslVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SslVersion) { - return nil, false - } - return o.SslVersion, true -} - -// HasSslVersion returns a boolean if a field has been set. -func (o *CreateCompanyWebhookRequest) HasSslVersion() bool { - if o != nil && !common.IsNil(o.SslVersion) { - return true - } - - return false -} - -// SetSslVersion gets a reference to the given string and assigns it to the SslVersion field. -func (o *CreateCompanyWebhookRequest) SetSslVersion(v string) { - o.SslVersion = &v -} - // GetType returns the Type field value func (o *CreateCompanyWebhookRequest) GetType() string { if o == nil { @@ -566,6 +566,9 @@ func (o CreateCompanyWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.EncryptionProtocol) { + toSerialize["encryptionProtocol"] = o.EncryptionProtocol + } toSerialize["filterMerchantAccountType"] = o.FilterMerchantAccountType toSerialize["filterMerchantAccounts"] = o.FilterMerchantAccounts if !common.IsNil(o.NetworkType) { @@ -577,9 +580,6 @@ func (o CreateCompanyWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PopulateSoapActionHeader) { toSerialize["populateSoapActionHeader"] = o.PopulateSoapActionHeader } - if !common.IsNil(o.SslVersion) { - toSerialize["sslVersion"] = o.SslVersion - } toSerialize["type"] = o.Type toSerialize["url"] = o.Url if !common.IsNil(o.Username) { @@ -633,28 +633,28 @@ func (o *CreateCompanyWebhookRequest) isValidCommunicationFormat() bool { } return false } -func (o *CreateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { - var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} +func (o *CreateCompanyWebhookRequest) isValidEncryptionProtocol() bool { + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { - if o.GetFilterMerchantAccountType() == allowed { + if o.GetEncryptionProtocol() == allowed { return true } } return false } -func (o *CreateCompanyWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"local", "public"} +func (o *CreateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { + var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} for _, allowed := range allowedEnumValues { - if o.GetNetworkType() == allowed { + if o.GetFilterMerchantAccountType() == allowed { return true } } return false } -func (o *CreateCompanyWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} +func (o *CreateCompanyWebhookRequest) isValidNetworkType() bool { + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { - if o.GetSslVersion() == allowed { + if o.GetNetworkType() == allowed { return true } } diff --git a/src/management/model_create_merchant_api_credential_request.go b/src/management/model_create_merchant_api_credential_request.go index f6979342f..4e57ab71b 100644 --- a/src/management/model_create_merchant_api_credential_request.go +++ b/src/management/model_create_merchant_api_credential_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_merchant_request.go b/src/management/model_create_merchant_request.go index cf49f00c4..ff0ee11a9 100644 --- a/src/management/model_create_merchant_request.go +++ b/src/management/model_create_merchant_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_merchant_response.go b/src/management/model_create_merchant_response.go index e9f94c4ca..4cbd25487 100644 --- a/src/management/model_create_merchant_response.go +++ b/src/management/model_create_merchant_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_merchant_user_request.go b/src/management/model_create_merchant_user_request.go index 4c4e5c9a9..e085abe0e 100644 --- a/src/management/model_create_merchant_user_request.go +++ b/src/management/model_create_merchant_user_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_create_merchant_webhook_request.go b/src/management/model_create_merchant_webhook_request.go index e07ec5633..4a832d474 100644 --- a/src/management/model_create_merchant_webhook_request.go +++ b/src/management/model_create_merchant_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,15 +32,15 @@ type CreateMerchantWebhookRequest struct { CommunicationFormat string `json:"communicationFormat"` // Your description for this webhook configuration. Description *string `json:"description,omitempty"` + // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + EncryptionProtocol *string `json:"encryptionProtocol,omitempty"` // Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. NetworkType *string `json:"networkType,omitempty"` // Password to access the webhook URL. Password *string `json:"password,omitempty"` // Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. PopulateSoapActionHeader *bool `json:"populateSoapActionHeader,omitempty"` - // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - SslVersion *string `json:"sslVersion,omitempty"` - // The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + // The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). Type string `json:"type"` // Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. Url string `json:"url"` @@ -277,6 +277,38 @@ func (o *CreateMerchantWebhookRequest) SetDescription(v string) { o.Description = &v } +// GetEncryptionProtocol returns the EncryptionProtocol field value if set, zero value otherwise. +func (o *CreateMerchantWebhookRequest) GetEncryptionProtocol() string { + if o == nil || common.IsNil(o.EncryptionProtocol) { + var ret string + return ret + } + return *o.EncryptionProtocol +} + +// GetEncryptionProtocolOk returns a tuple with the EncryptionProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateMerchantWebhookRequest) GetEncryptionProtocolOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptionProtocol) { + return nil, false + } + return o.EncryptionProtocol, true +} + +// HasEncryptionProtocol returns a boolean if a field has been set. +func (o *CreateMerchantWebhookRequest) HasEncryptionProtocol() bool { + if o != nil && !common.IsNil(o.EncryptionProtocol) { + return true + } + + return false +} + +// SetEncryptionProtocol gets a reference to the given string and assigns it to the EncryptionProtocol field. +func (o *CreateMerchantWebhookRequest) SetEncryptionProtocol(v string) { + o.EncryptionProtocol = &v +} + // GetNetworkType returns the NetworkType field value if set, zero value otherwise. func (o *CreateMerchantWebhookRequest) GetNetworkType() string { if o == nil || common.IsNil(o.NetworkType) { @@ -373,38 +405,6 @@ func (o *CreateMerchantWebhookRequest) SetPopulateSoapActionHeader(v bool) { o.PopulateSoapActionHeader = &v } -// GetSslVersion returns the SslVersion field value if set, zero value otherwise. -func (o *CreateMerchantWebhookRequest) GetSslVersion() string { - if o == nil || common.IsNil(o.SslVersion) { - var ret string - return ret - } - return *o.SslVersion -} - -// GetSslVersionOk returns a tuple with the SslVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateMerchantWebhookRequest) GetSslVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SslVersion) { - return nil, false - } - return o.SslVersion, true -} - -// HasSslVersion returns a boolean if a field has been set. -func (o *CreateMerchantWebhookRequest) HasSslVersion() bool { - if o != nil && !common.IsNil(o.SslVersion) { - return true - } - - return false -} - -// SetSslVersion gets a reference to the given string and assigns it to the SslVersion field. -func (o *CreateMerchantWebhookRequest) SetSslVersion(v string) { - o.SslVersion = &v -} - // GetType returns the Type field value func (o *CreateMerchantWebhookRequest) GetType() string { if o == nil { @@ -512,6 +512,9 @@ func (o CreateMerchantWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.EncryptionProtocol) { + toSerialize["encryptionProtocol"] = o.EncryptionProtocol + } if !common.IsNil(o.NetworkType) { toSerialize["networkType"] = o.NetworkType } @@ -521,9 +524,6 @@ func (o CreateMerchantWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PopulateSoapActionHeader) { toSerialize["populateSoapActionHeader"] = o.PopulateSoapActionHeader } - if !common.IsNil(o.SslVersion) { - toSerialize["sslVersion"] = o.SslVersion - } toSerialize["type"] = o.Type toSerialize["url"] = o.Url if !common.IsNil(o.Username) { @@ -577,19 +577,19 @@ func (o *CreateMerchantWebhookRequest) isValidCommunicationFormat() bool { } return false } -func (o *CreateMerchantWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"local", "public"} +func (o *CreateMerchantWebhookRequest) isValidEncryptionProtocol() bool { + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { - if o.GetNetworkType() == allowed { + if o.GetEncryptionProtocol() == allowed { return true } } return false } -func (o *CreateMerchantWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} +func (o *CreateMerchantWebhookRequest) isValidNetworkType() bool { + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { - if o.GetSslVersion() == allowed { + if o.GetNetworkType() == allowed { return true } } diff --git a/src/management/model_create_user_response.go b/src/management/model_create_user_response.go index 7da1a31f3..e622cc9e5 100644 --- a/src/management/model_create_user_response.go +++ b/src/management/model_create_user_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_currency.go b/src/management/model_currency.go index fab2e0ef9..cb40266ba 100644 --- a/src/management/model_currency.go +++ b/src/management/model_currency.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_custom_notification.go b/src/management/model_custom_notification.go index 405d2f79d..10f9aa51f 100644 --- a/src/management/model_custom_notification.go +++ b/src/management/model_custom_notification.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ common.MappedNullable = &CustomNotification{} // CustomNotification struct for CustomNotification type CustomNotification struct { Amount *Amount `json:"amount,omitempty"` - // The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **DEACTIVATE_RECURRING** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** + // The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** EventCode *string `json:"eventCode,omitempty"` // The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD. EventDate *time.Time `json:"eventDate,omitempty"` diff --git a/src/management/model_data_center.go b/src/management/model_data_center.go index 5e6572295..aedd46045 100644 --- a/src/management/model_data_center.go +++ b/src/management/model_data_center.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_event_url.go b/src/management/model_event_url.go index 352408048..ebe36f20b 100644 --- a/src/management/model_event_url.go +++ b/src/management/model_event_url.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_external_terminal_action.go b/src/management/model_external_terminal_action.go index ee69edd49..72ab0ee40 100644 --- a/src/management/model_external_terminal_action.go +++ b/src/management/model_external_terminal_action.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_file.go b/src/management/model_file.go index ac12f2e74..4942110b7 100644 --- a/src/management/model_file.go +++ b/src/management/model_file.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_generate_api_key_response.go b/src/management/model_generate_api_key_response.go index 24e8bc120..552cb4f32 100644 --- a/src/management/model_generate_api_key_response.go +++ b/src/management/model_generate_api_key_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_generate_client_key_response.go b/src/management/model_generate_client_key_response.go index 5b5a25e28..516ea5aaa 100644 --- a/src/management/model_generate_client_key_response.go +++ b/src/management/model_generate_client_key_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_generate_hmac_key_response.go b/src/management/model_generate_hmac_key_response.go index 49f74aa93..69aa2098e 100644 --- a/src/management/model_generate_hmac_key_response.go +++ b/src/management/model_generate_hmac_key_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_generic_pm_with_tdi_info.go b/src/management/model_generic_pm_with_tdi_info.go new file mode 100644 index 000000000..eda0bd7d8 --- /dev/null +++ b/src/management/model_generic_pm_with_tdi_info.go @@ -0,0 +1,124 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the GenericPmWithTdiInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &GenericPmWithTdiInfo{} + +// GenericPmWithTdiInfo struct for GenericPmWithTdiInfo +type GenericPmWithTdiInfo struct { + TransactionDescription *TransactionDescriptionInfo `json:"transactionDescription,omitempty"` +} + +// NewGenericPmWithTdiInfo instantiates a new GenericPmWithTdiInfo 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 NewGenericPmWithTdiInfo() *GenericPmWithTdiInfo { + this := GenericPmWithTdiInfo{} + return &this +} + +// NewGenericPmWithTdiInfoWithDefaults instantiates a new GenericPmWithTdiInfo 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 NewGenericPmWithTdiInfoWithDefaults() *GenericPmWithTdiInfo { + this := GenericPmWithTdiInfo{} + return &this +} + +// GetTransactionDescription returns the TransactionDescription field value if set, zero value otherwise. +func (o *GenericPmWithTdiInfo) GetTransactionDescription() TransactionDescriptionInfo { + if o == nil || common.IsNil(o.TransactionDescription) { + var ret TransactionDescriptionInfo + return ret + } + return *o.TransactionDescription +} + +// GetTransactionDescriptionOk returns a tuple with the TransactionDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenericPmWithTdiInfo) GetTransactionDescriptionOk() (*TransactionDescriptionInfo, bool) { + if o == nil || common.IsNil(o.TransactionDescription) { + return nil, false + } + return o.TransactionDescription, true +} + +// HasTransactionDescription returns a boolean if a field has been set. +func (o *GenericPmWithTdiInfo) HasTransactionDescription() bool { + if o != nil && !common.IsNil(o.TransactionDescription) { + return true + } + + return false +} + +// SetTransactionDescription gets a reference to the given TransactionDescriptionInfo and assigns it to the TransactionDescription field. +func (o *GenericPmWithTdiInfo) SetTransactionDescription(v TransactionDescriptionInfo) { + o.TransactionDescription = &v +} + +func (o GenericPmWithTdiInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenericPmWithTdiInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.TransactionDescription) { + toSerialize["transactionDescription"] = o.TransactionDescription + } + return toSerialize, nil +} + +type NullableGenericPmWithTdiInfo struct { + value *GenericPmWithTdiInfo + isSet bool +} + +func (v NullableGenericPmWithTdiInfo) Get() *GenericPmWithTdiInfo { + return v.value +} + +func (v *NullableGenericPmWithTdiInfo) Set(val *GenericPmWithTdiInfo) { + v.value = val + v.isSet = true +} + +func (v NullableGenericPmWithTdiInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableGenericPmWithTdiInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenericPmWithTdiInfo(val *GenericPmWithTdiInfo) *NullableGenericPmWithTdiInfo { + return &NullableGenericPmWithTdiInfo{value: val, isSet: true} +} + +func (v NullableGenericPmWithTdiInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenericPmWithTdiInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_giro_pay_info.go b/src/management/model_giro_pay_info.go index 52a1a79fc..3998d7413 100644 --- a/src/management/model_giro_pay_info.go +++ b/src/management/model_giro_pay_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_google_pay_info.go b/src/management/model_google_pay_info.go index 634e40f56..4d9023eda 100644 --- a/src/management/model_google_pay_info.go +++ b/src/management/model_google_pay_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_gratuity.go b/src/management/model_gratuity.go index 5caa00a88..cfea43f74 100644 --- a/src/management/model_gratuity.go +++ b/src/management/model_gratuity.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_hardware.go b/src/management/model_hardware.go index 63aed16b6..ca06c303d 100644 --- a/src/management/model_hardware.go +++ b/src/management/model_hardware.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ common.MappedNullable = &Hardware{} type Hardware struct { // The brightness of the display when the terminal is being used, expressed as a percentage. DisplayMaximumBackLight *int32 `json:"displayMaximumBackLight,omitempty"` - // The hour (0 - 23) in which the device will reboot, reboot will happen in the timezone of the device + // The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal Minimum vaoue: 0, maximum value: 23. RestartHour *int32 `json:"restartHour,omitempty"` } diff --git a/src/management/model_id_name.go b/src/management/model_id_name.go index dcf25c823..0321b28b0 100644 --- a/src/management/model_id_name.go +++ b/src/management/model_id_name.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_install_android_app_details.go b/src/management/model_install_android_app_details.go index 381ea5d23..60f51b87f 100644 --- a/src/management/model_install_android_app_details.go +++ b/src/management/model_install_android_app_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_install_android_certificate_details.go b/src/management/model_install_android_certificate_details.go index 81708ac3c..44ac78afb 100644 --- a/src/management/model_install_android_certificate_details.go +++ b/src/management/model_install_android_certificate_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_invalid_field.go b/src/management/model_invalid_field.go index bfa24bc57..df3c887a3 100644 --- a/src/management/model_invalid_field.go +++ b/src/management/model_invalid_field.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_invalid_field_wrapper.go b/src/management/model_invalid_field_wrapper.go deleted file mode 100644 index 2362504b2..000000000 --- a/src/management/model_invalid_field_wrapper.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Management API - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v7/src/common" -) - -// checks if the InvalidFieldWrapper type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &InvalidFieldWrapper{} - -// InvalidFieldWrapper struct for InvalidFieldWrapper -type InvalidFieldWrapper struct { - InvalidField *InvalidField `json:"InvalidField,omitempty"` -} - -// NewInvalidFieldWrapper instantiates a new InvalidFieldWrapper object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvalidFieldWrapper() *InvalidFieldWrapper { - this := InvalidFieldWrapper{} - return &this -} - -// NewInvalidFieldWrapperWithDefaults instantiates a new InvalidFieldWrapper object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvalidFieldWrapperWithDefaults() *InvalidFieldWrapper { - this := InvalidFieldWrapper{} - return &this -} - -// GetInvalidField returns the InvalidField field value if set, zero value otherwise. -func (o *InvalidFieldWrapper) GetInvalidField() InvalidField { - if o == nil || common.IsNil(o.InvalidField) { - var ret InvalidField - return ret - } - return *o.InvalidField -} - -// GetInvalidFieldOk returns a tuple with the InvalidField field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InvalidFieldWrapper) GetInvalidFieldOk() (*InvalidField, bool) { - if o == nil || common.IsNil(o.InvalidField) { - return nil, false - } - return o.InvalidField, true -} - -// HasInvalidField returns a boolean if a field has been set. -func (o *InvalidFieldWrapper) HasInvalidField() bool { - if o != nil && !common.IsNil(o.InvalidField) { - return true - } - - return false -} - -// SetInvalidField gets a reference to the given InvalidField and assigns it to the InvalidField field. -func (o *InvalidFieldWrapper) SetInvalidField(v InvalidField) { - o.InvalidField = &v -} - -func (o InvalidFieldWrapper) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvalidFieldWrapper) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.InvalidField) { - toSerialize["InvalidField"] = o.InvalidField - } - return toSerialize, nil -} - -type NullableInvalidFieldWrapper struct { - value *InvalidFieldWrapper - isSet bool -} - -func (v NullableInvalidFieldWrapper) Get() *InvalidFieldWrapper { - return v.value -} - -func (v *NullableInvalidFieldWrapper) Set(val *InvalidFieldWrapper) { - v.value = val - v.isSet = true -} - -func (v NullableInvalidFieldWrapper) IsSet() bool { - return v.isSet -} - -func (v *NullableInvalidFieldWrapper) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvalidFieldWrapper(val *InvalidFieldWrapper) *NullableInvalidFieldWrapper { - return &NullableInvalidFieldWrapper{value: val, isSet: true} -} - -func (v NullableInvalidFieldWrapper) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvalidFieldWrapper) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/management/model_json_object.go b/src/management/model_json_object.go index 6a9c9f870..718ba6d42 100644 --- a/src/management/model_json_object.go +++ b/src/management/model_json_object.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,8 +19,8 @@ var _ common.MappedNullable = &JSONObject{} // JSONObject struct for JSONObject type JSONObject struct { - Paths []JSONPathWrapper `json:"paths,omitempty"` - RootPath *JSONPath `json:"rootPath,omitempty"` + Paths []JSONPath `json:"paths,omitempty"` + RootPath *JSONPath `json:"rootPath,omitempty"` } // NewJSONObject instantiates a new JSONObject object @@ -41,9 +41,9 @@ func NewJSONObjectWithDefaults() *JSONObject { } // GetPaths returns the Paths field value if set, zero value otherwise. -func (o *JSONObject) GetPaths() []JSONPathWrapper { +func (o *JSONObject) GetPaths() []JSONPath { if o == nil || common.IsNil(o.Paths) { - var ret []JSONPathWrapper + var ret []JSONPath return ret } return o.Paths @@ -51,7 +51,7 @@ func (o *JSONObject) GetPaths() []JSONPathWrapper { // GetPathsOk returns a tuple with the Paths field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONObject) GetPathsOk() ([]JSONPathWrapper, bool) { +func (o *JSONObject) GetPathsOk() ([]JSONPath, bool) { if o == nil || common.IsNil(o.Paths) { return nil, false } @@ -67,8 +67,8 @@ func (o *JSONObject) HasPaths() bool { return false } -// SetPaths gets a reference to the given []JSONPathWrapper and assigns it to the Paths field. -func (o *JSONObject) SetPaths(v []JSONPathWrapper) { +// SetPaths gets a reference to the given []JSONPath and assigns it to the Paths field. +func (o *JSONObject) SetPaths(v []JSONPath) { o.Paths = v } diff --git a/src/management/model_json_path.go b/src/management/model_json_path.go index 7010ef508..8727c374c 100644 --- a/src/management/model_json_path.go +++ b/src/management/model_json_path.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_json_path_wrapper.go b/src/management/model_json_path_wrapper.go deleted file mode 100644 index cf529b6cf..000000000 --- a/src/management/model_json_path_wrapper.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Management API - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v7/src/common" -) - -// checks if the JSONPathWrapper type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &JSONPathWrapper{} - -// JSONPathWrapper struct for JSONPathWrapper -type JSONPathWrapper struct { - JSONPath *JSONPath `json:"JSONPath,omitempty"` -} - -// NewJSONPathWrapper instantiates a new JSONPathWrapper object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJSONPathWrapper() *JSONPathWrapper { - this := JSONPathWrapper{} - return &this -} - -// NewJSONPathWrapperWithDefaults instantiates a new JSONPathWrapper object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJSONPathWrapperWithDefaults() *JSONPathWrapper { - this := JSONPathWrapper{} - return &this -} - -// GetJSONPath returns the JSONPath field value if set, zero value otherwise. -func (o *JSONPathWrapper) GetJSONPath() JSONPath { - if o == nil || common.IsNil(o.JSONPath) { - var ret JSONPath - return ret - } - return *o.JSONPath -} - -// GetJSONPathOk returns a tuple with the JSONPath field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JSONPathWrapper) GetJSONPathOk() (*JSONPath, bool) { - if o == nil || common.IsNil(o.JSONPath) { - return nil, false - } - return o.JSONPath, true -} - -// HasJSONPath returns a boolean if a field has been set. -func (o *JSONPathWrapper) HasJSONPath() bool { - if o != nil && !common.IsNil(o.JSONPath) { - return true - } - - return false -} - -// SetJSONPath gets a reference to the given JSONPath and assigns it to the JSONPath field. -func (o *JSONPathWrapper) SetJSONPath(v JSONPath) { - o.JSONPath = &v -} - -func (o JSONPathWrapper) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JSONPathWrapper) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.JSONPath) { - toSerialize["JSONPath"] = o.JSONPath - } - return toSerialize, nil -} - -type NullableJSONPathWrapper struct { - value *JSONPathWrapper - isSet bool -} - -func (v NullableJSONPathWrapper) Get() *JSONPathWrapper { - return v.value -} - -func (v *NullableJSONPathWrapper) Set(val *JSONPathWrapper) { - v.value = val - v.isSet = true -} - -func (v NullableJSONPathWrapper) IsSet() bool { - return v.isSet -} - -func (v *NullableJSONPathWrapper) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJSONPathWrapper(val *JSONPathWrapper) *NullableJSONPathWrapper { - return &NullableJSONPathWrapper{value: val, isSet: true} -} - -func (v NullableJSONPathWrapper) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJSONPathWrapper) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/management/model_key.go b/src/management/model_key.go index 52d72a7ac..2bf9dd42c 100644 --- a/src/management/model_key.go +++ b/src/management/model_key.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_klarna_info.go b/src/management/model_klarna_info.go index 1b03d25ca..f71ee3c6f 100644 --- a/src/management/model_klarna_info.go +++ b/src/management/model_klarna_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,7 +24,7 @@ type KlarnaInfo struct { // The email address for disputes. DisputeEmail string `json:"disputeEmail"` // The region of operation. For example, **NA**, **EU**, **CH**, **AU**. - Region *string `json:"region,omitempty"` + Region string `json:"region"` // The email address of merchant support. SupportEmail string `json:"supportEmail"` } @@ -33,9 +33,10 @@ type KlarnaInfo 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 NewKlarnaInfo(disputeEmail string, supportEmail string) *KlarnaInfo { +func NewKlarnaInfo(disputeEmail string, region string, supportEmail string) *KlarnaInfo { this := KlarnaInfo{} this.DisputeEmail = disputeEmail + this.Region = region this.SupportEmail = supportEmail return &this } @@ -104,36 +105,28 @@ func (o *KlarnaInfo) SetDisputeEmail(v string) { o.DisputeEmail = v } -// GetRegion returns the Region field value if set, zero value otherwise. +// GetRegion returns the Region field value func (o *KlarnaInfo) GetRegion() string { - if o == nil || common.IsNil(o.Region) { + if o == nil { var ret string return ret } - return *o.Region + + return o.Region } -// GetRegionOk returns a tuple with the Region field value if set, nil otherwise +// GetRegionOk returns a tuple with the Region field value // and a boolean to check if the value has been set. func (o *KlarnaInfo) GetRegionOk() (*string, bool) { - if o == nil || common.IsNil(o.Region) { + if o == nil { return nil, false } - return o.Region, true -} - -// HasRegion returns a boolean if a field has been set. -func (o *KlarnaInfo) HasRegion() bool { - if o != nil && !common.IsNil(o.Region) { - return true - } - - return false + return &o.Region, true } -// SetRegion gets a reference to the given string and assigns it to the Region field. +// SetRegion sets field value func (o *KlarnaInfo) SetRegion(v string) { - o.Region = &v + o.Region = v } // GetSupportEmail returns the SupportEmail field value @@ -174,9 +167,7 @@ func (o KlarnaInfo) ToMap() (map[string]interface{}, error) { toSerialize["autoCapture"] = o.AutoCapture } toSerialize["disputeEmail"] = o.DisputeEmail - if !common.IsNil(o.Region) { - toSerialize["region"] = o.Region - } + toSerialize["region"] = o.Region toSerialize["supportEmail"] = o.SupportEmail return toSerialize, nil } diff --git a/src/management/model_links.go b/src/management/model_links.go index a0448f902..c8264e176 100644 --- a/src/management/model_links.go +++ b/src/management/model_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_links_element.go b/src/management/model_links_element.go index bbb2175c5..f29ef17e7 100644 --- a/src/management/model_links_element.go +++ b/src/management/model_links_element.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_company_api_credentials_response.go b/src/management/model_list_company_api_credentials_response.go index cdd5a4b9d..13c78e04d 100644 --- a/src/management/model_list_company_api_credentials_response.go +++ b/src/management/model_list_company_api_credentials_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_company_response.go b/src/management/model_list_company_response.go index f272db7ab..9af131952 100644 --- a/src/management/model_list_company_response.go +++ b/src/management/model_list_company_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_company_users_response.go b/src/management/model_list_company_users_response.go index 7b1335998..ce036d632 100644 --- a/src/management/model_list_company_users_response.go +++ b/src/management/model_list_company_users_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_external_terminal_actions_response.go b/src/management/model_list_external_terminal_actions_response.go index 3c0940a41..4d51f6789 100644 --- a/src/management/model_list_external_terminal_actions_response.go +++ b/src/management/model_list_external_terminal_actions_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_merchant_api_credentials_response.go b/src/management/model_list_merchant_api_credentials_response.go index b9e819de8..d93518d4b 100644 --- a/src/management/model_list_merchant_api_credentials_response.go +++ b/src/management/model_list_merchant_api_credentials_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_merchant_response.go b/src/management/model_list_merchant_response.go index 52b6eacdc..48be3fd57 100644 --- a/src/management/model_list_merchant_response.go +++ b/src/management/model_list_merchant_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_merchant_users_response.go b/src/management/model_list_merchant_users_response.go index c916dbb02..565d03ad3 100644 --- a/src/management/model_list_merchant_users_response.go +++ b/src/management/model_list_merchant_users_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_stores_response.go b/src/management/model_list_stores_response.go index a684369ce..5c9b7169b 100644 --- a/src/management/model_list_stores_response.go +++ b/src/management/model_list_stores_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_list_terminals_response.go b/src/management/model_list_terminals_response.go index 316933217..05512abbd 100644 --- a/src/management/model_list_terminals_response.go +++ b/src/management/model_list_terminals_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,7 +20,7 @@ var _ common.MappedNullable = &ListTerminalsResponse{} // ListTerminalsResponse struct for ListTerminalsResponse type ListTerminalsResponse struct { Links *PaginationLinks `json:"_links,omitempty"` - // The list of terminals. + // The list of terminals and their details. Data []Terminal `json:"data,omitempty"` // Total number of items. ItemsTotal int32 `json:"itemsTotal"` diff --git a/src/management/model_list_webhooks_response.go b/src/management/model_list_webhooks_response.go index 311bf9c57..0ed94df7e 100644 --- a/src/management/model_list_webhooks_response.go +++ b/src/management/model_list_webhooks_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_localization.go b/src/management/model_localization.go new file mode 100644 index 000000000..64bfbbf96 --- /dev/null +++ b/src/management/model_localization.go @@ -0,0 +1,125 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the Localization type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Localization{} + +// Localization struct for Localization +type Localization struct { + // Language of the terminal. + Language *string `json:"language,omitempty"` +} + +// NewLocalization instantiates a new Localization 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 NewLocalization() *Localization { + this := Localization{} + return &this +} + +// NewLocalizationWithDefaults instantiates a new Localization 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 NewLocalizationWithDefaults() *Localization { + this := Localization{} + return &this +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *Localization) GetLanguage() string { + if o == nil || common.IsNil(o.Language) { + var ret string + return ret + } + return *o.Language +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Localization) GetLanguageOk() (*string, bool) { + if o == nil || common.IsNil(o.Language) { + return nil, false + } + return o.Language, true +} + +// HasLanguage returns a boolean if a field has been set. +func (o *Localization) HasLanguage() bool { + if o != nil && !common.IsNil(o.Language) { + return true + } + + return false +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *Localization) SetLanguage(v string) { + o.Language = &v +} + +func (o Localization) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Localization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Language) { + toSerialize["language"] = o.Language + } + return toSerialize, nil +} + +type NullableLocalization struct { + value *Localization + isSet bool +} + +func (v NullableLocalization) Get() *Localization { + return v.value +} + +func (v *NullableLocalization) Set(val *Localization) { + v.value = val + v.isSet = true +} + +func (v NullableLocalization) IsSet() bool { + return v.isSet +} + +func (v *NullableLocalization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocalization(val *Localization) *NullableLocalization { + return &NullableLocalization{value: val, isSet: true} +} + +func (v NullableLocalization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocalization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_logo.go b/src/management/model_logo.go index 224430999..b6c0b2ca5 100644 --- a/src/management/model_logo.go +++ b/src/management/model_logo.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_me_api_credential.go b/src/management/model_me_api_credential.go index 6c7e78145..7dc0f354e 100644 --- a/src/management/model_me_api_credential.go +++ b/src/management/model_me_api_credential.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_meal_voucher_fr_info.go b/src/management/model_meal_voucher_fr_info.go index 745edfd65..3c4c617a4 100644 --- a/src/management/model_meal_voucher_fr_info.go +++ b/src/management/model_meal_voucher_fr_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -23,7 +23,7 @@ type MealVoucherFRInfo struct { ConecsId string `json:"conecsId"` // Meal Voucher siret. Format: 14 digits. Siret string `json:"siret"` - // The list of additional payment methods. Allowed values: **mealVoucher_FR_endenred**, **mealVoucher_FR_groupeup**, **mealVoucher_FR_natixis**, **mealVoucher_FR_sodexo**. + // The list of additional payment methods. Allowed values: **mealVoucher_FR_edenred**, **mealVoucher_FR_groupeup**, **mealVoucher_FR_natixis**, **mealVoucher_FR_sodexo**. SubTypes []string `json:"subTypes"` } diff --git a/src/management/model_merchant.go b/src/management/model_merchant.go index 16ae12bdf..86f4b4f72 100644 --- a/src/management/model_merchant.go +++ b/src/management/model_merchant.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_merchant_links.go b/src/management/model_merchant_links.go index 6eada2b6a..75ff44e43 100644 --- a/src/management/model_merchant_links.go +++ b/src/management/model_merchant_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_minor_units_monetary_value.go b/src/management/model_minor_units_monetary_value.go index a1afe3064..2583e4b50 100644 --- a/src/management/model_minor_units_monetary_value.go +++ b/src/management/model_minor_units_monetary_value.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_name.go b/src/management/model_name.go index 7fe34fb64..959ad439d 100644 --- a/src/management/model_name.go +++ b/src/management/model_name.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_name2.go b/src/management/model_name2.go index f0b5a4817..7037b5a62 100644 --- a/src/management/model_name2.go +++ b/src/management/model_name2.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_nexo.go b/src/management/model_nexo.go index 87bff3534..a9144467a 100644 --- a/src/management/model_nexo.go +++ b/src/management/model_nexo.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_notification.go b/src/management/model_notification.go index f1ecccc48..79a60d2a0 100644 --- a/src/management/model_notification.go +++ b/src/management/model_notification.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,7 +19,7 @@ var _ common.MappedNullable = &Notification{} // Notification struct for Notification type Notification struct { - // Toggle to show or hide Notification button on the terminal + // Shows or hides the event notification button on the terminal screen. ShowButton *bool `json:"showButton,omitempty"` } diff --git a/src/management/model_notification_url.go b/src/management/model_notification_url.go index ab5dd3113..3e164f628 100644 --- a/src/management/model_notification_url.go +++ b/src/management/model_notification_url.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_offline_processing.go b/src/management/model_offline_processing.go index 4d9154916..4ca68181a 100644 --- a/src/management/model_offline_processing.go +++ b/src/management/model_offline_processing.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_opi.go b/src/management/model_opi.go index 931a17dee..308c3a122 100644 --- a/src/management/model_opi.go +++ b/src/management/model_opi.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_order_item.go b/src/management/model_order_item.go index 04e825fa6..8a84b4264 100644 --- a/src/management/model_order_item.go +++ b/src/management/model_order_item.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_pagination_links.go b/src/management/model_pagination_links.go index bf228c298..606dfc6dc 100644 --- a/src/management/model_pagination_links.go +++ b/src/management/model_pagination_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_passcodes.go b/src/management/model_passcodes.go index cd894fed2..cd846149e 100644 --- a/src/management/model_passcodes.go +++ b/src/management/model_passcodes.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_pay_at_table.go b/src/management/model_pay_at_table.go index 91767d11f..6af6842c1 100644 --- a/src/management/model_pay_at_table.go +++ b/src/management/model_pay_at_table.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_pay_pal_info.go b/src/management/model_pay_pal_info.go index 7c32acbfd..92cb1b496 100644 --- a/src/management/model_pay_pal_info.go +++ b/src/management/model_pay_pal_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_payment.go b/src/management/model_payment.go index 1307a5b31..36eb44f75 100644 --- a/src/management/model_payment.go +++ b/src/management/model_payment.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,6 +19,8 @@ var _ common.MappedNullable = &Payment{} // Payment struct for Payment type Payment struct { + // The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + ContactlessCurrency *string `json:"contactlessCurrency,omitempty"` // Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217). HideMinorUnitsInCurrencies []string `json:"hideMinorUnitsInCurrencies,omitempty"` } @@ -40,6 +42,38 @@ func NewPaymentWithDefaults() *Payment { return &this } +// GetContactlessCurrency returns the ContactlessCurrency field value if set, zero value otherwise. +func (o *Payment) GetContactlessCurrency() string { + if o == nil || common.IsNil(o.ContactlessCurrency) { + var ret string + return ret + } + return *o.ContactlessCurrency +} + +// GetContactlessCurrencyOk returns a tuple with the ContactlessCurrency field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Payment) GetContactlessCurrencyOk() (*string, bool) { + if o == nil || common.IsNil(o.ContactlessCurrency) { + return nil, false + } + return o.ContactlessCurrency, true +} + +// HasContactlessCurrency returns a boolean if a field has been set. +func (o *Payment) HasContactlessCurrency() bool { + if o != nil && !common.IsNil(o.ContactlessCurrency) { + return true + } + + return false +} + +// SetContactlessCurrency gets a reference to the given string and assigns it to the ContactlessCurrency field. +func (o *Payment) SetContactlessCurrency(v string) { + o.ContactlessCurrency = &v +} + // GetHideMinorUnitsInCurrencies returns the HideMinorUnitsInCurrencies field value if set, zero value otherwise. func (o *Payment) GetHideMinorUnitsInCurrencies() []string { if o == nil || common.IsNil(o.HideMinorUnitsInCurrencies) { @@ -82,6 +116,9 @@ func (o Payment) MarshalJSON() ([]byte, error) { func (o Payment) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.ContactlessCurrency) { + toSerialize["contactlessCurrency"] = o.ContactlessCurrency + } if !common.IsNil(o.HideMinorUnitsInCurrencies) { toSerialize["hideMinorUnitsInCurrencies"] = o.HideMinorUnitsInCurrencies } diff --git a/src/management/model_payment_method.go b/src/management/model_payment_method.go index b179f45c4..9035eb9b7 100644 --- a/src/management/model_payment_method.go +++ b/src/management/model_payment_method.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -29,34 +29,45 @@ type PaymentMethod struct { CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` Clearpay *ClearpayInfo `json:"clearpay,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. - Countries []string `json:"countries,omitempty"` + Countries []string `json:"countries,omitempty"` + Cup *GenericPmWithTdiInfo `json:"cup,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. Currencies []string `json:"currencies,omitempty"` // The list of custom routing flags to route payment to the intended acquirer. - CustomRoutingFlags []string `json:"customRoutingFlags,omitempty"` + CustomRoutingFlags []string `json:"customRoutingFlags,omitempty"` + Diners *GenericPmWithTdiInfo `json:"diners,omitempty"` + Discover *GenericPmWithTdiInfo `json:"discover,omitempty"` + EftposAustralia *GenericPmWithTdiInfo `json:"eftpos_australia,omitempty"` // Indicates whether the payment method is enabled (**true**) or disabled (**false**). - Enabled *bool `json:"enabled,omitempty"` - GiroPay *GiroPayInfo `json:"giroPay,omitempty"` - GooglePay *GooglePayInfo `json:"googlePay,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + GiroPay *GiroPayInfo `json:"giroPay,omitempty"` + Girocard *GenericPmWithTdiInfo `json:"girocard,omitempty"` + GooglePay *GooglePayInfo `json:"googlePay,omitempty"` // The identifier of the resource. - Id string `json:"id"` - Klarna *KlarnaInfo `json:"klarna,omitempty"` - MealVoucherFR *MealVoucherFRInfo `json:"mealVoucher_FR,omitempty"` - Paypal *PayPalInfo `json:"paypal,omitempty"` + Id string `json:"id"` + Ideal *GenericPmWithTdiInfo `json:"ideal,omitempty"` + InteracCard *GenericPmWithTdiInfo `json:"interac_card,omitempty"` + Jcb *GenericPmWithTdiInfo `json:"jcb,omitempty"` + Klarna *KlarnaInfo `json:"klarna,omitempty"` + Maestro *GenericPmWithTdiInfo `json:"maestro,omitempty"` + Mc *GenericPmWithTdiInfo `json:"mc,omitempty"` + MealVoucherFR *MealVoucherFRInfo `json:"mealVoucher_FR,omitempty"` + Paypal *PayPalInfo `json:"paypal,omitempty"` // Your reference for the payment method. Supported characters a-z, A-Z, 0-9. Reference *string `json:"reference,omitempty"` // The sales channel. ShopperInteraction *string `json:"shopperInteraction,omitempty"` Sofort *SofortInfo `json:"sofort,omitempty"` - // The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. - StoreId *string `json:"storeId,omitempty"` - Swish *SwishInfo `json:"swish,omitempty"` - Twint *TwintInfo `json:"twint,omitempty"` + // The unique identifier of the store for which to configure the payment method, if any. + StoreIds []string `json:"storeIds,omitempty"` + Swish *SwishInfo `json:"swish,omitempty"` + Twint *TwintInfo `json:"twint,omitempty"` // Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). Type *string `json:"type,omitempty"` // Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - VerificationStatus *string `json:"verificationStatus,omitempty"` - Vipps *VippsInfo `json:"vipps,omitempty"` + VerificationStatus *string `json:"verificationStatus,omitempty"` + Vipps *VippsInfo `json:"vipps,omitempty"` + Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` } // NewPaymentMethod instantiates a new PaymentMethod object @@ -333,6 +344,38 @@ func (o *PaymentMethod) SetCountries(v []string) { o.Countries = v } +// GetCup returns the Cup field value if set, zero value otherwise. +func (o *PaymentMethod) GetCup() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Cup) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Cup +} + +// GetCupOk returns a tuple with the Cup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCupOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Cup) { + return nil, false + } + return o.Cup, true +} + +// HasCup returns a boolean if a field has been set. +func (o *PaymentMethod) HasCup() bool { + if o != nil && !common.IsNil(o.Cup) { + return true + } + + return false +} + +// SetCup gets a reference to the given GenericPmWithTdiInfo and assigns it to the Cup field. +func (o *PaymentMethod) SetCup(v GenericPmWithTdiInfo) { + o.Cup = &v +} + // GetCurrencies returns the Currencies field value if set, zero value otherwise. func (o *PaymentMethod) GetCurrencies() []string { if o == nil || common.IsNil(o.Currencies) { @@ -397,6 +440,102 @@ func (o *PaymentMethod) SetCustomRoutingFlags(v []string) { o.CustomRoutingFlags = v } +// GetDiners returns the Diners field value if set, zero value otherwise. +func (o *PaymentMethod) GetDiners() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Diners) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Diners +} + +// GetDinersOk returns a tuple with the Diners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetDinersOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Diners) { + return nil, false + } + return o.Diners, true +} + +// HasDiners returns a boolean if a field has been set. +func (o *PaymentMethod) HasDiners() bool { + if o != nil && !common.IsNil(o.Diners) { + return true + } + + return false +} + +// SetDiners gets a reference to the given GenericPmWithTdiInfo and assigns it to the Diners field. +func (o *PaymentMethod) SetDiners(v GenericPmWithTdiInfo) { + o.Diners = &v +} + +// GetDiscover returns the Discover field value if set, zero value otherwise. +func (o *PaymentMethod) GetDiscover() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Discover) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Discover +} + +// GetDiscoverOk returns a tuple with the Discover field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetDiscoverOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Discover) { + return nil, false + } + return o.Discover, true +} + +// HasDiscover returns a boolean if a field has been set. +func (o *PaymentMethod) HasDiscover() bool { + if o != nil && !common.IsNil(o.Discover) { + return true + } + + return false +} + +// SetDiscover gets a reference to the given GenericPmWithTdiInfo and assigns it to the Discover field. +func (o *PaymentMethod) SetDiscover(v GenericPmWithTdiInfo) { + o.Discover = &v +} + +// GetEftposAustralia returns the EftposAustralia field value if set, zero value otherwise. +func (o *PaymentMethod) GetEftposAustralia() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.EftposAustralia) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.EftposAustralia +} + +// GetEftposAustraliaOk returns a tuple with the EftposAustralia field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetEftposAustraliaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.EftposAustralia) { + return nil, false + } + return o.EftposAustralia, true +} + +// HasEftposAustralia returns a boolean if a field has been set. +func (o *PaymentMethod) HasEftposAustralia() bool { + if o != nil && !common.IsNil(o.EftposAustralia) { + return true + } + + return false +} + +// SetEftposAustralia gets a reference to the given GenericPmWithTdiInfo and assigns it to the EftposAustralia field. +func (o *PaymentMethod) SetEftposAustralia(v GenericPmWithTdiInfo) { + o.EftposAustralia = &v +} + // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *PaymentMethod) GetEnabled() bool { if o == nil || common.IsNil(o.Enabled) { @@ -461,6 +600,38 @@ func (o *PaymentMethod) SetGiroPay(v GiroPayInfo) { o.GiroPay = &v } +// GetGirocard returns the Girocard field value if set, zero value otherwise. +func (o *PaymentMethod) GetGirocard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Girocard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Girocard +} + +// GetGirocardOk returns a tuple with the Girocard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetGirocardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Girocard) { + return nil, false + } + return o.Girocard, true +} + +// HasGirocard returns a boolean if a field has been set. +func (o *PaymentMethod) HasGirocard() bool { + if o != nil && !common.IsNil(o.Girocard) { + return true + } + + return false +} + +// SetGirocard gets a reference to the given GenericPmWithTdiInfo and assigns it to the Girocard field. +func (o *PaymentMethod) SetGirocard(v GenericPmWithTdiInfo) { + o.Girocard = &v +} + // GetGooglePay returns the GooglePay field value if set, zero value otherwise. func (o *PaymentMethod) GetGooglePay() GooglePayInfo { if o == nil || common.IsNil(o.GooglePay) { @@ -517,6 +688,102 @@ func (o *PaymentMethod) SetId(v string) { o.Id = v } +// GetIdeal returns the Ideal field value if set, zero value otherwise. +func (o *PaymentMethod) GetIdeal() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Ideal) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Ideal +} + +// GetIdealOk returns a tuple with the Ideal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetIdealOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Ideal) { + return nil, false + } + return o.Ideal, true +} + +// HasIdeal returns a boolean if a field has been set. +func (o *PaymentMethod) HasIdeal() bool { + if o != nil && !common.IsNil(o.Ideal) { + return true + } + + return false +} + +// SetIdeal gets a reference to the given GenericPmWithTdiInfo and assigns it to the Ideal field. +func (o *PaymentMethod) SetIdeal(v GenericPmWithTdiInfo) { + o.Ideal = &v +} + +// GetInteracCard returns the InteracCard field value if set, zero value otherwise. +func (o *PaymentMethod) GetInteracCard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.InteracCard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.InteracCard +} + +// GetInteracCardOk returns a tuple with the InteracCard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetInteracCardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.InteracCard) { + return nil, false + } + return o.InteracCard, true +} + +// HasInteracCard returns a boolean if a field has been set. +func (o *PaymentMethod) HasInteracCard() bool { + if o != nil && !common.IsNil(o.InteracCard) { + return true + } + + return false +} + +// SetInteracCard gets a reference to the given GenericPmWithTdiInfo and assigns it to the InteracCard field. +func (o *PaymentMethod) SetInteracCard(v GenericPmWithTdiInfo) { + o.InteracCard = &v +} + +// GetJcb returns the Jcb field value if set, zero value otherwise. +func (o *PaymentMethod) GetJcb() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Jcb) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Jcb +} + +// GetJcbOk returns a tuple with the Jcb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetJcbOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Jcb) { + return nil, false + } + return o.Jcb, true +} + +// HasJcb returns a boolean if a field has been set. +func (o *PaymentMethod) HasJcb() bool { + if o != nil && !common.IsNil(o.Jcb) { + return true + } + + return false +} + +// SetJcb gets a reference to the given GenericPmWithTdiInfo and assigns it to the Jcb field. +func (o *PaymentMethod) SetJcb(v GenericPmWithTdiInfo) { + o.Jcb = &v +} + // GetKlarna returns the Klarna field value if set, zero value otherwise. func (o *PaymentMethod) GetKlarna() KlarnaInfo { if o == nil || common.IsNil(o.Klarna) { @@ -549,6 +816,70 @@ func (o *PaymentMethod) SetKlarna(v KlarnaInfo) { o.Klarna = &v } +// GetMaestro returns the Maestro field value if set, zero value otherwise. +func (o *PaymentMethod) GetMaestro() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Maestro) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Maestro +} + +// GetMaestroOk returns a tuple with the Maestro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetMaestroOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Maestro) { + return nil, false + } + return o.Maestro, true +} + +// HasMaestro returns a boolean if a field has been set. +func (o *PaymentMethod) HasMaestro() bool { + if o != nil && !common.IsNil(o.Maestro) { + return true + } + + return false +} + +// SetMaestro gets a reference to the given GenericPmWithTdiInfo and assigns it to the Maestro field. +func (o *PaymentMethod) SetMaestro(v GenericPmWithTdiInfo) { + o.Maestro = &v +} + +// GetMc returns the Mc field value if set, zero value otherwise. +func (o *PaymentMethod) GetMc() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Mc) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Mc +} + +// GetMcOk returns a tuple with the Mc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetMcOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Mc) { + return nil, false + } + return o.Mc, true +} + +// HasMc returns a boolean if a field has been set. +func (o *PaymentMethod) HasMc() bool { + if o != nil && !common.IsNil(o.Mc) { + return true + } + + return false +} + +// SetMc gets a reference to the given GenericPmWithTdiInfo and assigns it to the Mc field. +func (o *PaymentMethod) SetMc(v GenericPmWithTdiInfo) { + o.Mc = &v +} + // GetMealVoucherFR returns the MealVoucherFR field value if set, zero value otherwise. func (o *PaymentMethod) GetMealVoucherFR() MealVoucherFRInfo { if o == nil || common.IsNil(o.MealVoucherFR) { @@ -709,36 +1040,36 @@ func (o *PaymentMethod) SetSofort(v SofortInfo) { o.Sofort = &v } -// GetStoreId returns the StoreId field value if set, zero value otherwise. -func (o *PaymentMethod) GetStoreId() string { - if o == nil || common.IsNil(o.StoreId) { - var ret string +// GetStoreIds returns the StoreIds field value if set, zero value otherwise. +func (o *PaymentMethod) GetStoreIds() []string { + if o == nil || common.IsNil(o.StoreIds) { + var ret []string return ret } - return *o.StoreId + return o.StoreIds } -// GetStoreIdOk returns a tuple with the StoreId field value if set, nil otherwise +// GetStoreIdsOk returns a tuple with the StoreIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethod) GetStoreIdOk() (*string, bool) { - if o == nil || common.IsNil(o.StoreId) { +func (o *PaymentMethod) GetStoreIdsOk() ([]string, bool) { + if o == nil || common.IsNil(o.StoreIds) { return nil, false } - return o.StoreId, true + return o.StoreIds, true } -// HasStoreId returns a boolean if a field has been set. -func (o *PaymentMethod) HasStoreId() bool { - if o != nil && !common.IsNil(o.StoreId) { +// HasStoreIds returns a boolean if a field has been set. +func (o *PaymentMethod) HasStoreIds() bool { + if o != nil && !common.IsNil(o.StoreIds) { return true } return false } -// SetStoreId gets a reference to the given string and assigns it to the StoreId field. -func (o *PaymentMethod) SetStoreId(v string) { - o.StoreId = &v +// SetStoreIds gets a reference to the given []string and assigns it to the StoreIds field. +func (o *PaymentMethod) SetStoreIds(v []string) { + o.StoreIds = v } // GetSwish returns the Swish field value if set, zero value otherwise. @@ -901,6 +1232,38 @@ func (o *PaymentMethod) SetVipps(v VippsInfo) { o.Vipps = &v } +// GetVisa returns the Visa field value if set, zero value otherwise. +func (o *PaymentMethod) GetVisa() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Visa) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Visa +} + +// GetVisaOk returns a tuple with the Visa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetVisaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Visa) { + return nil, false + } + return o.Visa, true +} + +// HasVisa returns a boolean if a field has been set. +func (o *PaymentMethod) HasVisa() bool { + if o != nil && !common.IsNil(o.Visa) { + return true + } + + return false +} + +// SetVisa gets a reference to the given GenericPmWithTdiInfo and assigns it to the Visa field. +func (o *PaymentMethod) SetVisa(v GenericPmWithTdiInfo) { + o.Visa = &v +} + func (o PaymentMethod) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -935,25 +1298,55 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } + if !common.IsNil(o.Cup) { + toSerialize["cup"] = o.Cup + } if !common.IsNil(o.Currencies) { toSerialize["currencies"] = o.Currencies } if !common.IsNil(o.CustomRoutingFlags) { toSerialize["customRoutingFlags"] = o.CustomRoutingFlags } + if !common.IsNil(o.Diners) { + toSerialize["diners"] = o.Diners + } + if !common.IsNil(o.Discover) { + toSerialize["discover"] = o.Discover + } + if !common.IsNil(o.EftposAustralia) { + toSerialize["eftpos_australia"] = o.EftposAustralia + } if !common.IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } if !common.IsNil(o.GiroPay) { toSerialize["giroPay"] = o.GiroPay } + if !common.IsNil(o.Girocard) { + toSerialize["girocard"] = o.Girocard + } if !common.IsNil(o.GooglePay) { toSerialize["googlePay"] = o.GooglePay } toSerialize["id"] = o.Id + if !common.IsNil(o.Ideal) { + toSerialize["ideal"] = o.Ideal + } + if !common.IsNil(o.InteracCard) { + toSerialize["interac_card"] = o.InteracCard + } + if !common.IsNil(o.Jcb) { + toSerialize["jcb"] = o.Jcb + } if !common.IsNil(o.Klarna) { toSerialize["klarna"] = o.Klarna } + if !common.IsNil(o.Maestro) { + toSerialize["maestro"] = o.Maestro + } + if !common.IsNil(o.Mc) { + toSerialize["mc"] = o.Mc + } if !common.IsNil(o.MealVoucherFR) { toSerialize["mealVoucher_FR"] = o.MealVoucherFR } @@ -969,8 +1362,8 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Sofort) { toSerialize["sofort"] = o.Sofort } - if !common.IsNil(o.StoreId) { - toSerialize["storeId"] = o.StoreId + if !common.IsNil(o.StoreIds) { + toSerialize["storeIds"] = o.StoreIds } if !common.IsNil(o.Swish) { toSerialize["swish"] = o.Swish @@ -987,6 +1380,9 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Vipps) { toSerialize["vipps"] = o.Vipps } + if !common.IsNil(o.Visa) { + toSerialize["visa"] = o.Visa + } return toSerialize, nil } diff --git a/src/management/model_payment_method_response.go b/src/management/model_payment_method_response.go index 499a26822..85b7a6b33 100644 --- a/src/management/model_payment_method_response.go +++ b/src/management/model_payment_method_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,8 +20,8 @@ var _ common.MappedNullable = &PaymentMethodResponse{} // PaymentMethodResponse struct for PaymentMethodResponse type PaymentMethodResponse struct { Links *PaginationLinks `json:"_links,omitempty"` - // Payment methods details. - Data []PaymentMethodWrapper `json:"data,omitempty"` + // The list of supported payment methods and their details. + Data []PaymentMethod `json:"data,omitempty"` // Total number of items. ItemsTotal int32 `json:"itemsTotal"` // Total number of pages. @@ -82,9 +82,9 @@ func (o *PaymentMethodResponse) SetLinks(v PaginationLinks) { } // GetData returns the Data field value if set, zero value otherwise. -func (o *PaymentMethodResponse) GetData() []PaymentMethodWrapper { +func (o *PaymentMethodResponse) GetData() []PaymentMethod { if o == nil || common.IsNil(o.Data) { - var ret []PaymentMethodWrapper + var ret []PaymentMethod return ret } return o.Data @@ -92,7 +92,7 @@ func (o *PaymentMethodResponse) GetData() []PaymentMethodWrapper { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodResponse) GetDataOk() ([]PaymentMethodWrapper, bool) { +func (o *PaymentMethodResponse) GetDataOk() ([]PaymentMethod, bool) { if o == nil || common.IsNil(o.Data) { return nil, false } @@ -108,8 +108,8 @@ func (o *PaymentMethodResponse) HasData() bool { return false } -// SetData gets a reference to the given []PaymentMethodWrapper and assigns it to the Data field. -func (o *PaymentMethodResponse) SetData(v []PaymentMethodWrapper) { +// SetData gets a reference to the given []PaymentMethod and assigns it to the Data field. +func (o *PaymentMethodResponse) SetData(v []PaymentMethod) { o.Data = v } diff --git a/src/management/model_payment_method_setup_info.go b/src/management/model_payment_method_setup_info.go index 9f9d3e443..7cef75446 100644 --- a/src/management/model_payment_method_setup_info.go +++ b/src/management/model_payment_method_setup_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -27,36 +27,48 @@ type PaymentMethodSetupInfo struct { CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` Clearpay *ClearpayInfo `json:"clearpay,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. - Countries []string `json:"countries,omitempty"` + Countries []string `json:"countries,omitempty"` + Cup *GenericPmWithTdiInfo `json:"cup,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. Currencies []string `json:"currencies,omitempty"` // The list of custom routing flags to route payment to the intended acquirer. - CustomRoutingFlags []string `json:"customRoutingFlags,omitempty"` - GiroPay *GiroPayInfo `json:"giroPay,omitempty"` - GooglePay *GooglePayInfo `json:"googlePay,omitempty"` - Klarna *KlarnaInfo `json:"klarna,omitempty"` - MealVoucherFR *MealVoucherFRInfo `json:"mealVoucher_FR,omitempty"` - Paypal *PayPalInfo `json:"paypal,omitempty"` + CustomRoutingFlags []string `json:"customRoutingFlags,omitempty"` + Diners *GenericPmWithTdiInfo `json:"diners,omitempty"` + Discover *GenericPmWithTdiInfo `json:"discover,omitempty"` + EftposAustralia *GenericPmWithTdiInfo `json:"eftpos_australia,omitempty"` + GiroPay *GiroPayInfo `json:"giroPay,omitempty"` + Girocard *GenericPmWithTdiInfo `json:"girocard,omitempty"` + GooglePay *GooglePayInfo `json:"googlePay,omitempty"` + Ideal *GenericPmWithTdiInfo `json:"ideal,omitempty"` + InteracCard *GenericPmWithTdiInfo `json:"interac_card,omitempty"` + Jcb *GenericPmWithTdiInfo `json:"jcb,omitempty"` + Klarna *KlarnaInfo `json:"klarna,omitempty"` + Maestro *GenericPmWithTdiInfo `json:"maestro,omitempty"` + Mc *GenericPmWithTdiInfo `json:"mc,omitempty"` + MealVoucherFR *MealVoucherFRInfo `json:"mealVoucher_FR,omitempty"` + Paypal *PayPalInfo `json:"paypal,omitempty"` // Your reference for the payment method. Supported characters a-z, A-Z, 0-9. Reference *string `json:"reference,omitempty"` // The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. ShopperInteraction *string `json:"shopperInteraction,omitempty"` Sofort *SofortInfo `json:"sofort,omitempty"` - // The ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/stores__resParam_id), if any. - StoreId *string `json:"storeId,omitempty"` - Swish *SwishInfo `json:"swish,omitempty"` - Twint *TwintInfo `json:"twint,omitempty"` + // The unique identifier of the store for which to configure the payment method, if any. + StoreIds []string `json:"storeIds,omitempty"` + Swish *SwishInfo `json:"swish,omitempty"` + Twint *TwintInfo `json:"twint,omitempty"` // Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - Type *string `json:"type,omitempty"` - Vipps *VippsInfo `json:"vipps,omitempty"` + Type string `json:"type"` + Vipps *VippsInfo `json:"vipps,omitempty"` + Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` } // NewPaymentMethodSetupInfo instantiates a new PaymentMethodSetupInfo 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 NewPaymentMethodSetupInfo() *PaymentMethodSetupInfo { +func NewPaymentMethodSetupInfo(type_ string) *PaymentMethodSetupInfo { this := PaymentMethodSetupInfo{} + this.Type = type_ return &this } @@ -292,6 +304,38 @@ func (o *PaymentMethodSetupInfo) SetCountries(v []string) { o.Countries = v } +// GetCup returns the Cup field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetCup() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Cup) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Cup +} + +// GetCupOk returns a tuple with the Cup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetCupOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Cup) { + return nil, false + } + return o.Cup, true +} + +// HasCup returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasCup() bool { + if o != nil && !common.IsNil(o.Cup) { + return true + } + + return false +} + +// SetCup gets a reference to the given GenericPmWithTdiInfo and assigns it to the Cup field. +func (o *PaymentMethodSetupInfo) SetCup(v GenericPmWithTdiInfo) { + o.Cup = &v +} + // GetCurrencies returns the Currencies field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetCurrencies() []string { if o == nil || common.IsNil(o.Currencies) { @@ -356,6 +400,102 @@ func (o *PaymentMethodSetupInfo) SetCustomRoutingFlags(v []string) { o.CustomRoutingFlags = v } +// GetDiners returns the Diners field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetDiners() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Diners) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Diners +} + +// GetDinersOk returns a tuple with the Diners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetDinersOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Diners) { + return nil, false + } + return o.Diners, true +} + +// HasDiners returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasDiners() bool { + if o != nil && !common.IsNil(o.Diners) { + return true + } + + return false +} + +// SetDiners gets a reference to the given GenericPmWithTdiInfo and assigns it to the Diners field. +func (o *PaymentMethodSetupInfo) SetDiners(v GenericPmWithTdiInfo) { + o.Diners = &v +} + +// GetDiscover returns the Discover field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetDiscover() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Discover) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Discover +} + +// GetDiscoverOk returns a tuple with the Discover field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetDiscoverOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Discover) { + return nil, false + } + return o.Discover, true +} + +// HasDiscover returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasDiscover() bool { + if o != nil && !common.IsNil(o.Discover) { + return true + } + + return false +} + +// SetDiscover gets a reference to the given GenericPmWithTdiInfo and assigns it to the Discover field. +func (o *PaymentMethodSetupInfo) SetDiscover(v GenericPmWithTdiInfo) { + o.Discover = &v +} + +// GetEftposAustralia returns the EftposAustralia field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetEftposAustralia() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.EftposAustralia) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.EftposAustralia +} + +// GetEftposAustraliaOk returns a tuple with the EftposAustralia field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetEftposAustraliaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.EftposAustralia) { + return nil, false + } + return o.EftposAustralia, true +} + +// HasEftposAustralia returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasEftposAustralia() bool { + if o != nil && !common.IsNil(o.EftposAustralia) { + return true + } + + return false +} + +// SetEftposAustralia gets a reference to the given GenericPmWithTdiInfo and assigns it to the EftposAustralia field. +func (o *PaymentMethodSetupInfo) SetEftposAustralia(v GenericPmWithTdiInfo) { + o.EftposAustralia = &v +} + // GetGiroPay returns the GiroPay field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetGiroPay() GiroPayInfo { if o == nil || common.IsNil(o.GiroPay) { @@ -388,6 +528,38 @@ func (o *PaymentMethodSetupInfo) SetGiroPay(v GiroPayInfo) { o.GiroPay = &v } +// GetGirocard returns the Girocard field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetGirocard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Girocard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Girocard +} + +// GetGirocardOk returns a tuple with the Girocard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetGirocardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Girocard) { + return nil, false + } + return o.Girocard, true +} + +// HasGirocard returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasGirocard() bool { + if o != nil && !common.IsNil(o.Girocard) { + return true + } + + return false +} + +// SetGirocard gets a reference to the given GenericPmWithTdiInfo and assigns it to the Girocard field. +func (o *PaymentMethodSetupInfo) SetGirocard(v GenericPmWithTdiInfo) { + o.Girocard = &v +} + // GetGooglePay returns the GooglePay field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetGooglePay() GooglePayInfo { if o == nil || common.IsNil(o.GooglePay) { @@ -420,6 +592,102 @@ func (o *PaymentMethodSetupInfo) SetGooglePay(v GooglePayInfo) { o.GooglePay = &v } +// GetIdeal returns the Ideal field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetIdeal() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Ideal) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Ideal +} + +// GetIdealOk returns a tuple with the Ideal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetIdealOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Ideal) { + return nil, false + } + return o.Ideal, true +} + +// HasIdeal returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasIdeal() bool { + if o != nil && !common.IsNil(o.Ideal) { + return true + } + + return false +} + +// SetIdeal gets a reference to the given GenericPmWithTdiInfo and assigns it to the Ideal field. +func (o *PaymentMethodSetupInfo) SetIdeal(v GenericPmWithTdiInfo) { + o.Ideal = &v +} + +// GetInteracCard returns the InteracCard field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetInteracCard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.InteracCard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.InteracCard +} + +// GetInteracCardOk returns a tuple with the InteracCard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetInteracCardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.InteracCard) { + return nil, false + } + return o.InteracCard, true +} + +// HasInteracCard returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasInteracCard() bool { + if o != nil && !common.IsNil(o.InteracCard) { + return true + } + + return false +} + +// SetInteracCard gets a reference to the given GenericPmWithTdiInfo and assigns it to the InteracCard field. +func (o *PaymentMethodSetupInfo) SetInteracCard(v GenericPmWithTdiInfo) { + o.InteracCard = &v +} + +// GetJcb returns the Jcb field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetJcb() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Jcb) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Jcb +} + +// GetJcbOk returns a tuple with the Jcb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetJcbOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Jcb) { + return nil, false + } + return o.Jcb, true +} + +// HasJcb returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasJcb() bool { + if o != nil && !common.IsNil(o.Jcb) { + return true + } + + return false +} + +// SetJcb gets a reference to the given GenericPmWithTdiInfo and assigns it to the Jcb field. +func (o *PaymentMethodSetupInfo) SetJcb(v GenericPmWithTdiInfo) { + o.Jcb = &v +} + // GetKlarna returns the Klarna field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetKlarna() KlarnaInfo { if o == nil || common.IsNil(o.Klarna) { @@ -452,6 +720,70 @@ func (o *PaymentMethodSetupInfo) SetKlarna(v KlarnaInfo) { o.Klarna = &v } +// GetMaestro returns the Maestro field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetMaestro() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Maestro) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Maestro +} + +// GetMaestroOk returns a tuple with the Maestro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetMaestroOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Maestro) { + return nil, false + } + return o.Maestro, true +} + +// HasMaestro returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasMaestro() bool { + if o != nil && !common.IsNil(o.Maestro) { + return true + } + + return false +} + +// SetMaestro gets a reference to the given GenericPmWithTdiInfo and assigns it to the Maestro field. +func (o *PaymentMethodSetupInfo) SetMaestro(v GenericPmWithTdiInfo) { + o.Maestro = &v +} + +// GetMc returns the Mc field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetMc() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Mc) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Mc +} + +// GetMcOk returns a tuple with the Mc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetMcOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Mc) { + return nil, false + } + return o.Mc, true +} + +// HasMc returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasMc() bool { + if o != nil && !common.IsNil(o.Mc) { + return true + } + + return false +} + +// SetMc gets a reference to the given GenericPmWithTdiInfo and assigns it to the Mc field. +func (o *PaymentMethodSetupInfo) SetMc(v GenericPmWithTdiInfo) { + o.Mc = &v +} + // GetMealVoucherFR returns the MealVoucherFR field value if set, zero value otherwise. func (o *PaymentMethodSetupInfo) GetMealVoucherFR() MealVoucherFRInfo { if o == nil || common.IsNil(o.MealVoucherFR) { @@ -612,36 +944,36 @@ func (o *PaymentMethodSetupInfo) SetSofort(v SofortInfo) { o.Sofort = &v } -// GetStoreId returns the StoreId field value if set, zero value otherwise. -func (o *PaymentMethodSetupInfo) GetStoreId() string { - if o == nil || common.IsNil(o.StoreId) { - var ret string +// GetStoreIds returns the StoreIds field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetStoreIds() []string { + if o == nil || common.IsNil(o.StoreIds) { + var ret []string return ret } - return *o.StoreId + return o.StoreIds } -// GetStoreIdOk returns a tuple with the StoreId field value if set, nil otherwise +// GetStoreIdsOk returns a tuple with the StoreIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodSetupInfo) GetStoreIdOk() (*string, bool) { - if o == nil || common.IsNil(o.StoreId) { +func (o *PaymentMethodSetupInfo) GetStoreIdsOk() ([]string, bool) { + if o == nil || common.IsNil(o.StoreIds) { return nil, false } - return o.StoreId, true + return o.StoreIds, true } -// HasStoreId returns a boolean if a field has been set. -func (o *PaymentMethodSetupInfo) HasStoreId() bool { - if o != nil && !common.IsNil(o.StoreId) { +// HasStoreIds returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasStoreIds() bool { + if o != nil && !common.IsNil(o.StoreIds) { return true } return false } -// SetStoreId gets a reference to the given string and assigns it to the StoreId field. -func (o *PaymentMethodSetupInfo) SetStoreId(v string) { - o.StoreId = &v +// SetStoreIds gets a reference to the given []string and assigns it to the StoreIds field. +func (o *PaymentMethodSetupInfo) SetStoreIds(v []string) { + o.StoreIds = v } // GetSwish returns the Swish field value if set, zero value otherwise. @@ -708,36 +1040,28 @@ func (o *PaymentMethodSetupInfo) SetTwint(v TwintInfo) { o.Twint = &v } -// GetType returns the Type field value if set, zero value otherwise. +// GetType returns the Type field value func (o *PaymentMethodSetupInfo) GetType() string { - if o == nil || common.IsNil(o.Type) { + if o == nil { var ret string return ret } - return *o.Type + + return o.Type } -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. func (o *PaymentMethodSetupInfo) GetTypeOk() (*string, bool) { - if o == nil || common.IsNil(o.Type) { + if o == nil { return nil, false } - return o.Type, true + return &o.Type, true } -// HasType returns a boolean if a field has been set. -func (o *PaymentMethodSetupInfo) 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. +// SetType sets field value func (o *PaymentMethodSetupInfo) SetType(v string) { - o.Type = &v + o.Type = v } // GetVipps returns the Vipps field value if set, zero value otherwise. @@ -772,6 +1096,38 @@ func (o *PaymentMethodSetupInfo) SetVipps(v VippsInfo) { o.Vipps = &v } +// GetVisa returns the Visa field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetVisa() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Visa) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Visa +} + +// GetVisaOk returns a tuple with the Visa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetVisaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Visa) { + return nil, false + } + return o.Visa, true +} + +// HasVisa returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasVisa() bool { + if o != nil && !common.IsNil(o.Visa) { + return true + } + + return false +} + +// SetVisa gets a reference to the given GenericPmWithTdiInfo and assigns it to the Visa field. +func (o *PaymentMethodSetupInfo) SetVisa(v GenericPmWithTdiInfo) { + o.Visa = &v +} + func (o PaymentMethodSetupInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -803,21 +1159,51 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } + if !common.IsNil(o.Cup) { + toSerialize["cup"] = o.Cup + } if !common.IsNil(o.Currencies) { toSerialize["currencies"] = o.Currencies } if !common.IsNil(o.CustomRoutingFlags) { toSerialize["customRoutingFlags"] = o.CustomRoutingFlags } + if !common.IsNil(o.Diners) { + toSerialize["diners"] = o.Diners + } + if !common.IsNil(o.Discover) { + toSerialize["discover"] = o.Discover + } + if !common.IsNil(o.EftposAustralia) { + toSerialize["eftpos_australia"] = o.EftposAustralia + } if !common.IsNil(o.GiroPay) { toSerialize["giroPay"] = o.GiroPay } + if !common.IsNil(o.Girocard) { + toSerialize["girocard"] = o.Girocard + } if !common.IsNil(o.GooglePay) { toSerialize["googlePay"] = o.GooglePay } + if !common.IsNil(o.Ideal) { + toSerialize["ideal"] = o.Ideal + } + if !common.IsNil(o.InteracCard) { + toSerialize["interac_card"] = o.InteracCard + } + if !common.IsNil(o.Jcb) { + toSerialize["jcb"] = o.Jcb + } if !common.IsNil(o.Klarna) { toSerialize["klarna"] = o.Klarna } + if !common.IsNil(o.Maestro) { + toSerialize["maestro"] = o.Maestro + } + if !common.IsNil(o.Mc) { + toSerialize["mc"] = o.Mc + } if !common.IsNil(o.MealVoucherFR) { toSerialize["mealVoucher_FR"] = o.MealVoucherFR } @@ -833,8 +1219,8 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Sofort) { toSerialize["sofort"] = o.Sofort } - if !common.IsNil(o.StoreId) { - toSerialize["storeId"] = o.StoreId + if !common.IsNil(o.StoreIds) { + toSerialize["storeIds"] = o.StoreIds } if !common.IsNil(o.Swish) { toSerialize["swish"] = o.Swish @@ -842,12 +1228,13 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Twint) { toSerialize["twint"] = o.Twint } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } + toSerialize["type"] = o.Type if !common.IsNil(o.Vipps) { toSerialize["vipps"] = o.Vipps } + if !common.IsNil(o.Visa) { + toSerialize["visa"] = o.Visa + } return toSerialize, nil } @@ -897,7 +1284,7 @@ func (o *PaymentMethodSetupInfo) isValidShopperInteraction() bool { return false } func (o *PaymentMethodSetupInfo) isValidType() bool { - var allowedEnumValues = []string{"afterpaytouch", "alipay", "alipay_hk", "amex", "applepay", "bcmc", "blik", "cartebancaire", "clearpay", "cup", "diners", "directEbanking", "directdebit_GB", "discover", "ebanking_FI", "eftpos_australia", "elo", "elocredit", "elodebit", "girocard", "googlepay", "hiper", "hipercard", "ideal", "interac_card", "jcb", "klarna", "klarna_account", "klarna_paynow", "maestro", "mbway", "mc", "mcdebit", "mealVoucher_FR", "mobilepay", "multibanco", "onlineBanking_PL", "paybybank", "paypal", "payshop", "swish", "trustly", "twint", "twint_pos", "vipps", "visa", "visadebit", "vpay", "wechatpay", "wechatpay_pos"} + var allowedEnumValues = []string{"afterpaytouch", "alipay", "alipay_hk", "amex", "applepay", "bcmc", "blik", "cartebancaire", "clearpay", "cup", "diners", "directdebit_GB", "discover", "ebanking_FI", "eftpos_australia", "elo", "elocredit", "elodebit", "girocard", "googlepay", "hiper", "hipercard", "ideal", "interac_card", "jcb", "klarna", "klarna_account", "klarna_paynow", "maestro", "mbway", "mc", "mcdebit", "mealVoucher_FR", "mobilepay", "multibanco", "onlineBanking_PL", "paybybank", "paypal", "payshop", "swish", "trustly", "twint", "twint_pos", "vipps", "visa", "visadebit", "vpay", "wechatpay", "wechatpay_pos"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/management/model_payment_method_wrapper.go b/src/management/model_payment_method_wrapper.go deleted file mode 100644 index e3b3361ba..000000000 --- a/src/management/model_payment_method_wrapper.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Management API - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v7/src/common" -) - -// checks if the PaymentMethodWrapper type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PaymentMethodWrapper{} - -// PaymentMethodWrapper struct for PaymentMethodWrapper -type PaymentMethodWrapper struct { - PaymentMethod *PaymentMethod `json:"PaymentMethod,omitempty"` -} - -// NewPaymentMethodWrapper instantiates a new PaymentMethodWrapper object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPaymentMethodWrapper() *PaymentMethodWrapper { - this := PaymentMethodWrapper{} - return &this -} - -// NewPaymentMethodWrapperWithDefaults instantiates a new PaymentMethodWrapper object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPaymentMethodWrapperWithDefaults() *PaymentMethodWrapper { - this := PaymentMethodWrapper{} - return &this -} - -// GetPaymentMethod returns the PaymentMethod field value if set, zero value otherwise. -func (o *PaymentMethodWrapper) GetPaymentMethod() PaymentMethod { - if o == nil || common.IsNil(o.PaymentMethod) { - var ret PaymentMethod - return ret - } - return *o.PaymentMethod -} - -// GetPaymentMethodOk returns a tuple with the PaymentMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PaymentMethodWrapper) GetPaymentMethodOk() (*PaymentMethod, bool) { - if o == nil || common.IsNil(o.PaymentMethod) { - return nil, false - } - return o.PaymentMethod, true -} - -// HasPaymentMethod returns a boolean if a field has been set. -func (o *PaymentMethodWrapper) HasPaymentMethod() bool { - if o != nil && !common.IsNil(o.PaymentMethod) { - return true - } - - return false -} - -// SetPaymentMethod gets a reference to the given PaymentMethod and assigns it to the PaymentMethod field. -func (o *PaymentMethodWrapper) SetPaymentMethod(v PaymentMethod) { - o.PaymentMethod = &v -} - -func (o PaymentMethodWrapper) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PaymentMethodWrapper) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.PaymentMethod) { - toSerialize["PaymentMethod"] = o.PaymentMethod - } - return toSerialize, nil -} - -type NullablePaymentMethodWrapper struct { - value *PaymentMethodWrapper - isSet bool -} - -func (v NullablePaymentMethodWrapper) Get() *PaymentMethodWrapper { - return v.value -} - -func (v *NullablePaymentMethodWrapper) Set(val *PaymentMethodWrapper) { - v.value = val - v.isSet = true -} - -func (v NullablePaymentMethodWrapper) IsSet() bool { - return v.isSet -} - -func (v *NullablePaymentMethodWrapper) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePaymentMethodWrapper(val *PaymentMethodWrapper) *NullablePaymentMethodWrapper { - return &NullablePaymentMethodWrapper{value: val, isSet: true} -} - -func (v NullablePaymentMethodWrapper) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePaymentMethodWrapper) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/src/management/model_payout_settings.go b/src/management/model_payout_settings.go index c7065171b..ff66a9545 100644 --- a/src/management/model_payout_settings.go +++ b/src/management/model_payout_settings.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_payout_settings_request.go b/src/management/model_payout_settings_request.go index ab9ce5c26..afd216725 100644 --- a/src/management/model_payout_settings_request.go +++ b/src/management/model_payout_settings_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_payout_settings_response.go b/src/management/model_payout_settings_response.go index 8b65bcaf0..1d65b6b81 100644 --- a/src/management/model_payout_settings_response.go +++ b/src/management/model_payout_settings_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_profile.go b/src/management/model_profile.go index ce1d42796..0fa35ddae 100644 --- a/src/management/model_profile.go +++ b/src/management/model_profile.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_receipt_options.go b/src/management/model_receipt_options.go index 4a19f1291..89bdfcb59 100644 --- a/src/management/model_receipt_options.go +++ b/src/management/model_receipt_options.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_receipt_printing.go b/src/management/model_receipt_printing.go index 61def9d14..cecb23f47 100644 --- a/src/management/model_receipt_printing.go +++ b/src/management/model_receipt_printing.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_release_update_details.go b/src/management/model_release_update_details.go index 2c98d1329..ca39dcc18 100644 --- a/src/management/model_release_update_details.go +++ b/src/management/model_release_update_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_request_activation_response.go b/src/management/model_request_activation_response.go index f41abc171..0195cd924 100644 --- a/src/management/model_request_activation_response.go +++ b/src/management/model_request_activation_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_rest_service_error.go b/src/management/model_rest_service_error.go index 645860fff..9ed1c597c 100644 --- a/src/management/model_rest_service_error.go +++ b/src/management/model_rest_service_error.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -26,7 +26,7 @@ type RestServiceError struct { // A unique URI that identifies the specific occurrence of the problem. Instance *string `json:"instance,omitempty"` // Detailed explanation of each validation error, when applicable. - InvalidFields []InvalidFieldWrapper `json:"invalidFields,omitempty"` + InvalidFields []InvalidField `json:"invalidFields,omitempty"` // A unique reference for the request, essentially the same as `pspReference`. RequestId *string `json:"requestId,omitempty"` Response *JSONObject `json:"response,omitempty"` @@ -141,9 +141,9 @@ func (o *RestServiceError) SetInstance(v string) { } // GetInvalidFields returns the InvalidFields field value if set, zero value otherwise. -func (o *RestServiceError) GetInvalidFields() []InvalidFieldWrapper { +func (o *RestServiceError) GetInvalidFields() []InvalidField { if o == nil || common.IsNil(o.InvalidFields) { - var ret []InvalidFieldWrapper + var ret []InvalidField return ret } return o.InvalidFields @@ -151,7 +151,7 @@ func (o *RestServiceError) GetInvalidFields() []InvalidFieldWrapper { // GetInvalidFieldsOk returns a tuple with the InvalidFields field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RestServiceError) GetInvalidFieldsOk() ([]InvalidFieldWrapper, bool) { +func (o *RestServiceError) GetInvalidFieldsOk() ([]InvalidField, bool) { if o == nil || common.IsNil(o.InvalidFields) { return nil, false } @@ -167,8 +167,8 @@ func (o *RestServiceError) HasInvalidFields() bool { return false } -// SetInvalidFields gets a reference to the given []InvalidFieldWrapper and assigns it to the InvalidFields field. -func (o *RestServiceError) SetInvalidFields(v []InvalidFieldWrapper) { +// SetInvalidFields gets a reference to the given []InvalidField and assigns it to the InvalidFields field. +func (o *RestServiceError) SetInvalidFields(v []InvalidField) { o.InvalidFields = v } diff --git a/src/management/model_schedule_terminal_actions_request.go b/src/management/model_schedule_terminal_actions_request.go index 27bb3d8ce..64b5c3c7c 100644 --- a/src/management/model_schedule_terminal_actions_request.go +++ b/src/management/model_schedule_terminal_actions_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_schedule_terminal_actions_request_action_details.go b/src/management/model_schedule_terminal_actions_request_action_details.go index 65582a125..aefc52294 100644 --- a/src/management/model_schedule_terminal_actions_request_action_details.go +++ b/src/management/model_schedule_terminal_actions_request_action_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_schedule_terminal_actions_response.go b/src/management/model_schedule_terminal_actions_response.go index 5cb0590be..dc8b03013 100644 --- a/src/management/model_schedule_terminal_actions_response.go +++ b/src/management/model_schedule_terminal_actions_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -26,9 +26,6 @@ type ScheduleTerminalActionsResponse struct { ScheduledAt *string `json:"scheduledAt,omitempty"` // The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. StoreId *string `json:"storeId,omitempty"` - // A list of unique IDs of the terminals that the action applies to. - // Deprecated - TerminalIds []string `json:"terminalIds,omitempty"` // The validation errors that occurred in the list of terminals, and for each error the IDs of the terminals that the error applies to. TerminalsWithErrors *map[string][]string `json:"terminalsWithErrors,omitempty"` // The number of terminals for which scheduling the action failed. @@ -182,41 +179,6 @@ func (o *ScheduleTerminalActionsResponse) SetStoreId(v string) { o.StoreId = &v } -// GetTerminalIds returns the TerminalIds field value if set, zero value otherwise. -// Deprecated -func (o *ScheduleTerminalActionsResponse) GetTerminalIds() []string { - if o == nil || common.IsNil(o.TerminalIds) { - var ret []string - return ret - } - return o.TerminalIds -} - -// GetTerminalIdsOk returns a tuple with the TerminalIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *ScheduleTerminalActionsResponse) GetTerminalIdsOk() ([]string, bool) { - if o == nil || common.IsNil(o.TerminalIds) { - return nil, false - } - return o.TerminalIds, true -} - -// HasTerminalIds returns a boolean if a field has been set. -func (o *ScheduleTerminalActionsResponse) HasTerminalIds() bool { - if o != nil && !common.IsNil(o.TerminalIds) { - return true - } - - return false -} - -// SetTerminalIds gets a reference to the given []string and assigns it to the TerminalIds field. -// Deprecated -func (o *ScheduleTerminalActionsResponse) SetTerminalIds(v []string) { - o.TerminalIds = v -} - // GetTerminalsWithErrors returns the TerminalsWithErrors field value if set, zero value otherwise. func (o *ScheduleTerminalActionsResponse) GetTerminalsWithErrors() map[string][]string { if o == nil || common.IsNil(o.TerminalsWithErrors) { @@ -335,9 +297,6 @@ func (o ScheduleTerminalActionsResponse) ToMap() (map[string]interface{}, error) if !common.IsNil(o.StoreId) { toSerialize["storeId"] = o.StoreId } - if !common.IsNil(o.TerminalIds) { - toSerialize["terminalIds"] = o.TerminalIds - } if !common.IsNil(o.TerminalsWithErrors) { toSerialize["terminalsWithErrors"] = o.TerminalsWithErrors } diff --git a/src/management/model_settings.go b/src/management/model_settings.go index e0f93984d..4dee1b95e 100644 --- a/src/management/model_settings.go +++ b/src/management/model_settings.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_shipping_location.go b/src/management/model_shipping_location.go index f8085e1f9..0c512c0a2 100644 --- a/src/management/model_shipping_location.go +++ b/src/management/model_shipping_location.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_shipping_locations_response.go b/src/management/model_shipping_locations_response.go index 5b737c692..0ddee5eb2 100644 --- a/src/management/model_shipping_locations_response.go +++ b/src/management/model_shipping_locations_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_shopper_statement.go b/src/management/model_shopper_statement.go deleted file mode 100644 index b6a59618d..000000000 --- a/src/management/model_shopper_statement.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -Management API - -API version: 1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package management - -import ( - "encoding/json" - - "github.com/adyen/adyen-go-api-library/v7/src/common" -) - -// checks if the ShopperStatement type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &ShopperStatement{} - -// ShopperStatement struct for ShopperStatement -type ShopperStatement struct { - // The name you want to be shown on the shopper's bank or credit card statement. Can't be all numbers. If a shopper statement is present, this field is required. - DoingBusinessAsName *string `json:"doingBusinessAsName,omitempty"` - // The type of shopperstatement you want to use: fixed, append or dynamic - Type *string `json:"type,omitempty"` -} - -// NewShopperStatement instantiates a new ShopperStatement 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 NewShopperStatement() *ShopperStatement { - this := ShopperStatement{} - var type_ string = "dynamic" - this.Type = &type_ - return &this -} - -// NewShopperStatementWithDefaults instantiates a new ShopperStatement 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 NewShopperStatementWithDefaults() *ShopperStatement { - this := ShopperStatement{} - var type_ string = "dynamic" - this.Type = &type_ - return &this -} - -// GetDoingBusinessAsName returns the DoingBusinessAsName field value if set, zero value otherwise. -func (o *ShopperStatement) GetDoingBusinessAsName() string { - if o == nil || common.IsNil(o.DoingBusinessAsName) { - var ret string - return ret - } - return *o.DoingBusinessAsName -} - -// GetDoingBusinessAsNameOk returns a tuple with the DoingBusinessAsName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ShopperStatement) GetDoingBusinessAsNameOk() (*string, bool) { - if o == nil || common.IsNil(o.DoingBusinessAsName) { - return nil, false - } - return o.DoingBusinessAsName, true -} - -// HasDoingBusinessAsName returns a boolean if a field has been set. -func (o *ShopperStatement) HasDoingBusinessAsName() bool { - if o != nil && !common.IsNil(o.DoingBusinessAsName) { - return true - } - - return false -} - -// SetDoingBusinessAsName gets a reference to the given string and assigns it to the DoingBusinessAsName field. -func (o *ShopperStatement) SetDoingBusinessAsName(v string) { - o.DoingBusinessAsName = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *ShopperStatement) 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 *ShopperStatement) 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 *ShopperStatement) 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 *ShopperStatement) SetType(v string) { - o.Type = &v -} - -func (o ShopperStatement) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShopperStatement) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !common.IsNil(o.DoingBusinessAsName) { - toSerialize["doingBusinessAsName"] = o.DoingBusinessAsName - } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableShopperStatement struct { - value *ShopperStatement - isSet bool -} - -func (v NullableShopperStatement) Get() *ShopperStatement { - return v.value -} - -func (v *NullableShopperStatement) Set(val *ShopperStatement) { - v.value = val - v.isSet = true -} - -func (v NullableShopperStatement) IsSet() bool { - return v.isSet -} - -func (v *NullableShopperStatement) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShopperStatement(val *ShopperStatement) *NullableShopperStatement { - return &NullableShopperStatement{value: val, isSet: true} -} - -func (v NullableShopperStatement) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShopperStatement) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -func (o *ShopperStatement) isValidType() bool { - var allowedEnumValues = []string{"append", "dynamic", "fixed"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/management/model_signature.go b/src/management/model_signature.go index b543e362a..97f940468 100644 --- a/src/management/model_signature.go +++ b/src/management/model_signature.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_sofort_info.go b/src/management/model_sofort_info.go index 5ed430ffc..2461e4b64 100644 --- a/src/management/model_sofort_info.go +++ b/src/management/model_sofort_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_split_configuration.go b/src/management/model_split_configuration.go index b625b7d35..ed61f1a8e 100644 --- a/src/management/model_split_configuration.go +++ b/src/management/model_split_configuration.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_split_configuration_list.go b/src/management/model_split_configuration_list.go index 221be2af4..4732643a0 100644 --- a/src/management/model_split_configuration_list.go +++ b/src/management/model_split_configuration_list.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_split_configuration_logic.go b/src/management/model_split_configuration_logic.go index 6b153010c..483d2fd8c 100644 --- a/src/management/model_split_configuration_logic.go +++ b/src/management/model_split_configuration_logic.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,14 +19,28 @@ var _ common.MappedNullable = &SplitConfigurationLogic{} // SplitConfigurationLogic struct for SplitConfigurationLogic type SplitConfigurationLogic struct { + // Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AcquiringFees *string `json:"acquiringFees,omitempty"` AdditionalCommission *AdditionalCommission `json:"additionalCommission,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenCommission *string `json:"adyenCommission,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenFees *string `json:"adyenFees,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenMarkup *string `json:"adyenMarkup,omitempty"` // Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - Chargeback *string `json:"chargeback,omitempty"` - Commission Commission `json:"commission"` - // Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - PaymentFee string `json:"paymentFee"` + Chargeback *string `json:"chargeback,omitempty"` + // Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + ChargebackCostAllocation *string `json:"chargebackCostAllocation,omitempty"` + Commission Commission `json:"commission"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + Interchange *string `json:"interchange,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + PaymentFee *string `json:"paymentFee,omitempty"` // Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. Remainder *string `json:"remainder,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + SchemeFee *string `json:"schemeFee,omitempty"` // Unique identifier of the split logic that is applied when the split configuration conditions are met. SplitLogicId *string `json:"splitLogicId,omitempty"` // Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** @@ -39,10 +53,9 @@ type SplitConfigurationLogic 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 NewSplitConfigurationLogic(commission Commission, paymentFee string) *SplitConfigurationLogic { +func NewSplitConfigurationLogic(commission Commission) *SplitConfigurationLogic { this := SplitConfigurationLogic{} this.Commission = commission - this.PaymentFee = paymentFee return &this } @@ -54,6 +67,38 @@ func NewSplitConfigurationLogicWithDefaults() *SplitConfigurationLogic { return &this } +// GetAcquiringFees returns the AcquiringFees field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetAcquiringFees() string { + if o == nil || common.IsNil(o.AcquiringFees) { + var ret string + return ret + } + return *o.AcquiringFees +} + +// GetAcquiringFeesOk returns a tuple with the AcquiringFees field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetAcquiringFeesOk() (*string, bool) { + if o == nil || common.IsNil(o.AcquiringFees) { + return nil, false + } + return o.AcquiringFees, true +} + +// HasAcquiringFees returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasAcquiringFees() bool { + if o != nil && !common.IsNil(o.AcquiringFees) { + return true + } + + return false +} + +// SetAcquiringFees gets a reference to the given string and assigns it to the AcquiringFees field. +func (o *SplitConfigurationLogic) SetAcquiringFees(v string) { + o.AcquiringFees = &v +} + // GetAdditionalCommission returns the AdditionalCommission field value if set, zero value otherwise. func (o *SplitConfigurationLogic) GetAdditionalCommission() AdditionalCommission { if o == nil || common.IsNil(o.AdditionalCommission) { @@ -86,6 +131,102 @@ func (o *SplitConfigurationLogic) SetAdditionalCommission(v AdditionalCommission o.AdditionalCommission = &v } +// GetAdyenCommission returns the AdyenCommission field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetAdyenCommission() string { + if o == nil || common.IsNil(o.AdyenCommission) { + var ret string + return ret + } + return *o.AdyenCommission +} + +// GetAdyenCommissionOk returns a tuple with the AdyenCommission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetAdyenCommissionOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenCommission) { + return nil, false + } + return o.AdyenCommission, true +} + +// HasAdyenCommission returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasAdyenCommission() bool { + if o != nil && !common.IsNil(o.AdyenCommission) { + return true + } + + return false +} + +// SetAdyenCommission gets a reference to the given string and assigns it to the AdyenCommission field. +func (o *SplitConfigurationLogic) SetAdyenCommission(v string) { + o.AdyenCommission = &v +} + +// GetAdyenFees returns the AdyenFees field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetAdyenFees() string { + if o == nil || common.IsNil(o.AdyenFees) { + var ret string + return ret + } + return *o.AdyenFees +} + +// GetAdyenFeesOk returns a tuple with the AdyenFees field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetAdyenFeesOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenFees) { + return nil, false + } + return o.AdyenFees, true +} + +// HasAdyenFees returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasAdyenFees() bool { + if o != nil && !common.IsNil(o.AdyenFees) { + return true + } + + return false +} + +// SetAdyenFees gets a reference to the given string and assigns it to the AdyenFees field. +func (o *SplitConfigurationLogic) SetAdyenFees(v string) { + o.AdyenFees = &v +} + +// GetAdyenMarkup returns the AdyenMarkup field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetAdyenMarkup() string { + if o == nil || common.IsNil(o.AdyenMarkup) { + var ret string + return ret + } + return *o.AdyenMarkup +} + +// GetAdyenMarkupOk returns a tuple with the AdyenMarkup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetAdyenMarkupOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenMarkup) { + return nil, false + } + return o.AdyenMarkup, true +} + +// HasAdyenMarkup returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasAdyenMarkup() bool { + if o != nil && !common.IsNil(o.AdyenMarkup) { + return true + } + + return false +} + +// SetAdyenMarkup gets a reference to the given string and assigns it to the AdyenMarkup field. +func (o *SplitConfigurationLogic) SetAdyenMarkup(v string) { + o.AdyenMarkup = &v +} + // GetChargeback returns the Chargeback field value if set, zero value otherwise. func (o *SplitConfigurationLogic) GetChargeback() string { if o == nil || common.IsNil(o.Chargeback) { @@ -118,6 +259,38 @@ func (o *SplitConfigurationLogic) SetChargeback(v string) { o.Chargeback = &v } +// GetChargebackCostAllocation returns the ChargebackCostAllocation field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetChargebackCostAllocation() string { + if o == nil || common.IsNil(o.ChargebackCostAllocation) { + var ret string + return ret + } + return *o.ChargebackCostAllocation +} + +// GetChargebackCostAllocationOk returns a tuple with the ChargebackCostAllocation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetChargebackCostAllocationOk() (*string, bool) { + if o == nil || common.IsNil(o.ChargebackCostAllocation) { + return nil, false + } + return o.ChargebackCostAllocation, true +} + +// HasChargebackCostAllocation returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasChargebackCostAllocation() bool { + if o != nil && !common.IsNil(o.ChargebackCostAllocation) { + return true + } + + return false +} + +// SetChargebackCostAllocation gets a reference to the given string and assigns it to the ChargebackCostAllocation field. +func (o *SplitConfigurationLogic) SetChargebackCostAllocation(v string) { + o.ChargebackCostAllocation = &v +} + // GetCommission returns the Commission field value func (o *SplitConfigurationLogic) GetCommission() Commission { if o == nil { @@ -142,28 +315,68 @@ func (o *SplitConfigurationLogic) SetCommission(v Commission) { o.Commission = v } -// GetPaymentFee returns the PaymentFee field value -func (o *SplitConfigurationLogic) GetPaymentFee() string { - if o == nil { +// GetInterchange returns the Interchange field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetInterchange() string { + if o == nil || common.IsNil(o.Interchange) { var ret string return ret } + return *o.Interchange +} + +// GetInterchangeOk returns a tuple with the Interchange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetInterchangeOk() (*string, bool) { + if o == nil || common.IsNil(o.Interchange) { + return nil, false + } + return o.Interchange, true +} + +// HasInterchange returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasInterchange() bool { + if o != nil && !common.IsNil(o.Interchange) { + return true + } + + return false +} + +// SetInterchange gets a reference to the given string and assigns it to the Interchange field. +func (o *SplitConfigurationLogic) SetInterchange(v string) { + o.Interchange = &v +} - return o.PaymentFee +// GetPaymentFee returns the PaymentFee field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetPaymentFee() string { + if o == nil || common.IsNil(o.PaymentFee) { + var ret string + return ret + } + return *o.PaymentFee } -// GetPaymentFeeOk returns a tuple with the PaymentFee field value +// GetPaymentFeeOk returns a tuple with the PaymentFee field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SplitConfigurationLogic) GetPaymentFeeOk() (*string, bool) { - if o == nil { + if o == nil || common.IsNil(o.PaymentFee) { return nil, false } - return &o.PaymentFee, true + return o.PaymentFee, true +} + +// HasPaymentFee returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasPaymentFee() bool { + if o != nil && !common.IsNil(o.PaymentFee) { + return true + } + + return false } -// SetPaymentFee sets field value +// SetPaymentFee gets a reference to the given string and assigns it to the PaymentFee field. func (o *SplitConfigurationLogic) SetPaymentFee(v string) { - o.PaymentFee = v + o.PaymentFee = &v } // GetRemainder returns the Remainder field value if set, zero value otherwise. @@ -198,6 +411,38 @@ func (o *SplitConfigurationLogic) SetRemainder(v string) { o.Remainder = &v } +// GetSchemeFee returns the SchemeFee field value if set, zero value otherwise. +func (o *SplitConfigurationLogic) GetSchemeFee() string { + if o == nil || common.IsNil(o.SchemeFee) { + var ret string + return ret + } + return *o.SchemeFee +} + +// GetSchemeFeeOk returns a tuple with the SchemeFee field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SplitConfigurationLogic) GetSchemeFeeOk() (*string, bool) { + if o == nil || common.IsNil(o.SchemeFee) { + return nil, false + } + return o.SchemeFee, true +} + +// HasSchemeFee returns a boolean if a field has been set. +func (o *SplitConfigurationLogic) HasSchemeFee() bool { + if o != nil && !common.IsNil(o.SchemeFee) { + return true + } + + return false +} + +// SetSchemeFee gets a reference to the given string and assigns it to the SchemeFee field. +func (o *SplitConfigurationLogic) SetSchemeFee(v string) { + o.SchemeFee = &v +} + // GetSplitLogicId returns the SplitLogicId field value if set, zero value otherwise. func (o *SplitConfigurationLogic) GetSplitLogicId() string { if o == nil || common.IsNil(o.SplitLogicId) { @@ -304,17 +549,40 @@ func (o SplitConfigurationLogic) MarshalJSON() ([]byte, error) { func (o SplitConfigurationLogic) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcquiringFees) { + toSerialize["acquiringFees"] = o.AcquiringFees + } if !common.IsNil(o.AdditionalCommission) { toSerialize["additionalCommission"] = o.AdditionalCommission } + if !common.IsNil(o.AdyenCommission) { + toSerialize["adyenCommission"] = o.AdyenCommission + } + if !common.IsNil(o.AdyenFees) { + toSerialize["adyenFees"] = o.AdyenFees + } + if !common.IsNil(o.AdyenMarkup) { + toSerialize["adyenMarkup"] = o.AdyenMarkup + } if !common.IsNil(o.Chargeback) { toSerialize["chargeback"] = o.Chargeback } + if !common.IsNil(o.ChargebackCostAllocation) { + toSerialize["chargebackCostAllocation"] = o.ChargebackCostAllocation + } toSerialize["commission"] = o.Commission - toSerialize["paymentFee"] = o.PaymentFee + if !common.IsNil(o.Interchange) { + toSerialize["interchange"] = o.Interchange + } + if !common.IsNil(o.PaymentFee) { + toSerialize["paymentFee"] = o.PaymentFee + } if !common.IsNil(o.Remainder) { toSerialize["remainder"] = o.Remainder } + if !common.IsNil(o.SchemeFee) { + toSerialize["schemeFee"] = o.SchemeFee + } if !common.IsNil(o.SplitLogicId) { toSerialize["splitLogicId"] = o.SplitLogicId } @@ -363,6 +631,42 @@ func (v *NullableSplitConfigurationLogic) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } +func (o *SplitConfigurationLogic) isValidAcquiringFees() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAcquiringFees() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidAdyenCommission() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenCommission() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidAdyenFees() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenFees() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidAdyenMarkup() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenMarkup() == allowed { + return true + } + } + return false +} func (o *SplitConfigurationLogic) isValidChargeback() bool { var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount", "deductAccordingToSplitRatio"} for _, allowed := range allowedEnumValues { @@ -372,6 +676,24 @@ func (o *SplitConfigurationLogic) isValidChargeback() bool { } return false } +func (o *SplitConfigurationLogic) isValidChargebackCostAllocation() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetChargebackCostAllocation() == allowed { + return true + } + } + return false +} +func (o *SplitConfigurationLogic) isValidInterchange() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetInterchange() == allowed { + return true + } + } + return false +} func (o *SplitConfigurationLogic) isValidPaymentFee() bool { var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} for _, allowed := range allowedEnumValues { @@ -390,6 +712,15 @@ func (o *SplitConfigurationLogic) isValidRemainder() bool { } return false } +func (o *SplitConfigurationLogic) isValidSchemeFee() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetSchemeFee() == allowed { + return true + } + } + return false +} func (o *SplitConfigurationLogic) isValidSurcharge() bool { var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} for _, allowed := range allowedEnumValues { diff --git a/src/management/model_split_configuration_rule.go b/src/management/model_split_configuration_rule.go index 9870c95c7..e14e75e9c 100644 --- a/src/management/model_split_configuration_rule.go +++ b/src/management/model_split_configuration_rule.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_standalone.go b/src/management/model_standalone.go index 8f8a28b99..2d16514ca 100644 --- a/src/management/model_standalone.go +++ b/src/management/model_standalone.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_store.go b/src/management/model_store.go index 50fdc7484..c10d3fb04 100644 --- a/src/management/model_store.go +++ b/src/management/model_store.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -31,9 +31,9 @@ type Store struct { Id *string `json:"id,omitempty"` // The unique identifier of the merchant account that the store belongs to. MerchantId *string `json:"merchantId,omitempty"` - // The phone number of the store, including '+' and country code. + // The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. PhoneNumber *string `json:"phoneNumber,omitempty"` - // A reference to recognize the store by. Also known as the store code. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) + // A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) Reference *string `json:"reference,omitempty"` // The store name shown on the shopper's bank or credit card statement and on the shopper receipt. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/management/model_store_creation_request.go b/src/management/model_store_creation_request.go index b3cc54c44..072370774 100644 --- a/src/management/model_store_creation_request.go +++ b/src/management/model_store_creation_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,9 +24,9 @@ type StoreCreationRequest struct { BusinessLineIds []string `json:"businessLineIds,omitempty"` // Your description of the store. Description string `json:"description"` - // Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + // The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. ExternalReferenceId *string `json:"externalReferenceId,omitempty"` - // The phone number of the store, including '+' and country code. + // The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. PhoneNumber string `json:"phoneNumber"` // Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). Reference *string `json:"reference,omitempty"` diff --git a/src/management/model_store_creation_with_merchant_code_request.go b/src/management/model_store_creation_with_merchant_code_request.go index 52d42346c..df3cb99ee 100644 --- a/src/management/model_store_creation_with_merchant_code_request.go +++ b/src/management/model_store_creation_with_merchant_code_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,11 +24,11 @@ type StoreCreationWithMerchantCodeRequest struct { BusinessLineIds []string `json:"businessLineIds,omitempty"` // Your description of the store. Description string `json:"description"` - // Used by certain payment methods and tax authorities to uniquely identify the store. For CNPJ in Brazil, ZIP in Australia and SIRET in France. This field is conditionally required if the store is in Brazil, Australia or France. For CNPJ the format is 00.000.000/0000-00, can be submitted as just digits, or with dots, slash & hyphen. For Australian stores ZIP an optional field used by the Zip payment method. For SIRET the format is 14 digits. + // The unique identifier of the store, used by certain payment methods and tax authorities. Accepts up to 14 digits. Required for CNPJ in Brazil, in the format 00.000.000/00git00-00 separated by dots, slashes, hyphens, or without separators. Optional for Zip in Australia and SIRET in France, required except for nonprofit organizations and incorporated associations. ExternalReferenceId *string `json:"externalReferenceId,omitempty"` // The unique identifier of the merchant account that the store belongs to. MerchantId string `json:"merchantId"` - // The phone number of the store, including '+' and country code. + // The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. PhoneNumber string `json:"phoneNumber"` // Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). Reference *string `json:"reference,omitempty"` diff --git a/src/management/model_store_location.go b/src/management/model_store_location.go index eb0c11731..0701d9163 100644 --- a/src/management/model_store_location.go +++ b/src/management/model_store_location.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_store_split_configuration.go b/src/management/model_store_split_configuration.go index 9acf28132..bd1b2b033 100644 --- a/src/management/model_store_split_configuration.go +++ b/src/management/model_store_split_configuration.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_surcharge.go b/src/management/model_surcharge.go index 78298630d..1aa5d9150 100644 --- a/src/management/model_surcharge.go +++ b/src/management/model_surcharge.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_swish_info.go b/src/management/model_swish_info.go index d2a7d95d9..7217828df 100644 --- a/src/management/model_swish_info.go +++ b/src/management/model_swish_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,15 +20,16 @@ var _ common.MappedNullable = &SwishInfo{} // SwishInfo struct for SwishInfo type SwishInfo struct { // Swish number. Format: 10 digits without spaces. For example, **1231111111**. - SwishNumber *string `json:"swishNumber,omitempty"` + SwishNumber string `json:"swishNumber"` } // NewSwishInfo instantiates a new SwishInfo 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 NewSwishInfo() *SwishInfo { +func NewSwishInfo(swishNumber string) *SwishInfo { this := SwishInfo{} + this.SwishNumber = swishNumber return &this } @@ -40,36 +41,28 @@ func NewSwishInfoWithDefaults() *SwishInfo { return &this } -// GetSwishNumber returns the SwishNumber field value if set, zero value otherwise. +// GetSwishNumber returns the SwishNumber field value func (o *SwishInfo) GetSwishNumber() string { - if o == nil || common.IsNil(o.SwishNumber) { + if o == nil { var ret string return ret } - return *o.SwishNumber + + return o.SwishNumber } -// GetSwishNumberOk returns a tuple with the SwishNumber field value if set, nil otherwise +// GetSwishNumberOk returns a tuple with the SwishNumber field value // and a boolean to check if the value has been set. func (o *SwishInfo) GetSwishNumberOk() (*string, bool) { - if o == nil || common.IsNil(o.SwishNumber) { + if o == nil { return nil, false } - return o.SwishNumber, true -} - -// HasSwishNumber returns a boolean if a field has been set. -func (o *SwishInfo) HasSwishNumber() bool { - if o != nil && !common.IsNil(o.SwishNumber) { - return true - } - - return false + return &o.SwishNumber, true } -// SetSwishNumber gets a reference to the given string and assigns it to the SwishNumber field. +// SetSwishNumber sets field value func (o *SwishInfo) SetSwishNumber(v string) { - o.SwishNumber = &v + o.SwishNumber = v } func (o SwishInfo) MarshalJSON() ([]byte, error) { @@ -82,9 +75,7 @@ func (o SwishInfo) MarshalJSON() ([]byte, error) { func (o SwishInfo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !common.IsNil(o.SwishNumber) { - toSerialize["swishNumber"] = o.SwishNumber - } + toSerialize["swishNumber"] = o.SwishNumber return toSerialize, nil } diff --git a/src/management/model_terminal.go b/src/management/model_terminal.go index 6567d399c..d4e79635b 100644 --- a/src/management/model_terminal.go +++ b/src/management/model_terminal.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,50 +20,20 @@ var _ common.MappedNullable = &Terminal{} // Terminal struct for Terminal type Terminal struct { - // The [assignment status](https://docs.adyen.com/point-of-sale/automating-terminal-management/assign-terminals-api) of the terminal. If true, the terminal is assigned. If false, the terminal is in inventory and can't be boarded. - Assigned *bool `json:"assigned,omitempty"` - // The Bluetooth IP address of the terminal. - BluetoothIp *string `json:"bluetoothIp,omitempty"` - // The Bluetooth MAC address of the terminal. - BluetoothMac *string `json:"bluetoothMac,omitempty"` - // The city where the terminal is located. - City *string `json:"city,omitempty"` - // The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - CompanyAccount *string `json:"companyAccount,omitempty"` - // The country code of the country where the terminal is located. - CountryCode *string `json:"countryCode,omitempty"` - // The model name of the terminal. - DeviceModel *string `json:"deviceModel,omitempty"` - // The ethernet IP address of the terminal. - EthernetIp *string `json:"ethernetIp,omitempty"` - // The ethernet MAC address of the terminal. - EthernetMac *string `json:"ethernetMac,omitempty"` + Assignment *TerminalAssignment `json:"assignment,omitempty"` + Connectivity *TerminalConnectivity `json:"connectivity,omitempty"` // The software release currently in use on the terminal. FirmwareVersion *string `json:"firmwareVersion,omitempty"` - // The integrated circuit card identifier (ICCID) of the SIM card in the terminal. - Iccid *string `json:"iccid,omitempty"` // The unique identifier of the terminal. Id *string `json:"id,omitempty"` // Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - LastActivityDateTime *time.Time `json:"lastActivityDateTime,omitempty"` + LastActivityAt *time.Time `json:"lastActivityAt,omitempty"` // Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - LastTransactionDateTime *time.Time `json:"lastTransactionDateTime,omitempty"` - // The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex - LinkNegotiation *string `json:"linkNegotiation,omitempty"` + LastTransactionAt *time.Time `json:"lastTransactionAt,omitempty"` + // The model name of the terminal. + Model *string `json:"model,omitempty"` // The serial number of the terminal. SerialNumber *string `json:"serialNumber,omitempty"` - // On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. - SimStatus *string `json:"simStatus,omitempty"` - // Indicates when the terminal was last online, whether the terminal is being reassigned, or whether the terminal is turned off. If the terminal was last online more that a week ago, it is also shown as turned off. - Status *string `json:"status,omitempty"` - // The status of the store that the terminal is assigned to. - StoreStatus *string `json:"storeStatus,omitempty"` - // The terminal's IP address in your Wi-Fi network. - WifiIp *string `json:"wifiIp,omitempty"` - // The terminal's MAC address in your Wi-Fi network. - WifiMac *string `json:"wifiMac,omitempty"` - // The SSID of the Wi-Fi network that your terminal is connected to. - WifiSsid *string `json:"wifiSsid,omitempty"` } // NewTerminal instantiates a new Terminal object @@ -83,292 +53,68 @@ func NewTerminalWithDefaults() *Terminal { return &this } -// GetAssigned returns the Assigned field value if set, zero value otherwise. -func (o *Terminal) GetAssigned() bool { - if o == nil || common.IsNil(o.Assigned) { - var ret bool - return ret - } - return *o.Assigned -} - -// GetAssignedOk returns a tuple with the Assigned field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetAssignedOk() (*bool, bool) { - if o == nil || common.IsNil(o.Assigned) { - return nil, false - } - return o.Assigned, true -} - -// HasAssigned returns a boolean if a field has been set. -func (o *Terminal) HasAssigned() bool { - if o != nil && !common.IsNil(o.Assigned) { - return true - } - - return false -} - -// SetAssigned gets a reference to the given bool and assigns it to the Assigned field. -func (o *Terminal) SetAssigned(v bool) { - o.Assigned = &v -} - -// GetBluetoothIp returns the BluetoothIp field value if set, zero value otherwise. -func (o *Terminal) GetBluetoothIp() string { - if o == nil || common.IsNil(o.BluetoothIp) { - var ret string - return ret - } - return *o.BluetoothIp -} - -// GetBluetoothIpOk returns a tuple with the BluetoothIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetBluetoothIpOk() (*string, bool) { - if o == nil || common.IsNil(o.BluetoothIp) { - return nil, false - } - return o.BluetoothIp, true -} - -// HasBluetoothIp returns a boolean if a field has been set. -func (o *Terminal) HasBluetoothIp() bool { - if o != nil && !common.IsNil(o.BluetoothIp) { - return true - } - - return false -} - -// SetBluetoothIp gets a reference to the given string and assigns it to the BluetoothIp field. -func (o *Terminal) SetBluetoothIp(v string) { - o.BluetoothIp = &v -} - -// GetBluetoothMac returns the BluetoothMac field value if set, zero value otherwise. -func (o *Terminal) GetBluetoothMac() string { - if o == nil || common.IsNil(o.BluetoothMac) { - var ret string - return ret - } - return *o.BluetoothMac -} - -// GetBluetoothMacOk returns a tuple with the BluetoothMac field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetBluetoothMacOk() (*string, bool) { - if o == nil || common.IsNil(o.BluetoothMac) { - return nil, false - } - return o.BluetoothMac, true -} - -// HasBluetoothMac returns a boolean if a field has been set. -func (o *Terminal) HasBluetoothMac() bool { - if o != nil && !common.IsNil(o.BluetoothMac) { - return true - } - - return false -} - -// SetBluetoothMac gets a reference to the given string and assigns it to the BluetoothMac field. -func (o *Terminal) SetBluetoothMac(v string) { - o.BluetoothMac = &v -} - -// GetCity returns the City field value if set, zero value otherwise. -func (o *Terminal) GetCity() string { - if o == nil || common.IsNil(o.City) { - var ret string +// GetAssignment returns the Assignment field value if set, zero value otherwise. +func (o *Terminal) GetAssignment() TerminalAssignment { + if o == nil || common.IsNil(o.Assignment) { + var ret TerminalAssignment return ret } - return *o.City + return *o.Assignment } -// GetCityOk returns a tuple with the City field value if set, nil otherwise +// GetAssignmentOk returns a tuple with the Assignment field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Terminal) GetCityOk() (*string, bool) { - if o == nil || common.IsNil(o.City) { +func (o *Terminal) GetAssignmentOk() (*TerminalAssignment, bool) { + if o == nil || common.IsNil(o.Assignment) { return nil, false } - return o.City, true + return o.Assignment, true } -// HasCity returns a boolean if a field has been set. -func (o *Terminal) HasCity() bool { - if o != nil && !common.IsNil(o.City) { +// HasAssignment returns a boolean if a field has been set. +func (o *Terminal) HasAssignment() bool { + if o != nil && !common.IsNil(o.Assignment) { return true } return false } -// SetCity gets a reference to the given string and assigns it to the City field. -func (o *Terminal) SetCity(v string) { - o.City = &v +// SetAssignment gets a reference to the given TerminalAssignment and assigns it to the Assignment field. +func (o *Terminal) SetAssignment(v TerminalAssignment) { + o.Assignment = &v } -// GetCompanyAccount returns the CompanyAccount field value if set, zero value otherwise. -func (o *Terminal) GetCompanyAccount() string { - if o == nil || common.IsNil(o.CompanyAccount) { - var ret string +// GetConnectivity returns the Connectivity field value if set, zero value otherwise. +func (o *Terminal) GetConnectivity() TerminalConnectivity { + if o == nil || common.IsNil(o.Connectivity) { + var ret TerminalConnectivity return ret } - return *o.CompanyAccount + return *o.Connectivity } -// GetCompanyAccountOk returns a tuple with the CompanyAccount field value if set, nil otherwise +// GetConnectivityOk returns a tuple with the Connectivity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Terminal) GetCompanyAccountOk() (*string, bool) { - if o == nil || common.IsNil(o.CompanyAccount) { +func (o *Terminal) GetConnectivityOk() (*TerminalConnectivity, bool) { + if o == nil || common.IsNil(o.Connectivity) { return nil, false } - return o.CompanyAccount, true + return o.Connectivity, true } -// HasCompanyAccount returns a boolean if a field has been set. -func (o *Terminal) HasCompanyAccount() bool { - if o != nil && !common.IsNil(o.CompanyAccount) { +// HasConnectivity returns a boolean if a field has been set. +func (o *Terminal) HasConnectivity() bool { + if o != nil && !common.IsNil(o.Connectivity) { return true } return false } -// SetCompanyAccount gets a reference to the given string and assigns it to the CompanyAccount field. -func (o *Terminal) SetCompanyAccount(v string) { - o.CompanyAccount = &v -} - -// GetCountryCode returns the CountryCode field value if set, zero value otherwise. -func (o *Terminal) GetCountryCode() string { - if o == nil || common.IsNil(o.CountryCode) { - var ret string - return ret - } - return *o.CountryCode -} - -// GetCountryCodeOk returns a tuple with the CountryCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetCountryCodeOk() (*string, bool) { - if o == nil || common.IsNil(o.CountryCode) { - return nil, false - } - return o.CountryCode, true -} - -// HasCountryCode returns a boolean if a field has been set. -func (o *Terminal) HasCountryCode() bool { - if o != nil && !common.IsNil(o.CountryCode) { - return true - } - - return false -} - -// SetCountryCode gets a reference to the given string and assigns it to the CountryCode field. -func (o *Terminal) SetCountryCode(v string) { - o.CountryCode = &v -} - -// GetDeviceModel returns the DeviceModel field value if set, zero value otherwise. -func (o *Terminal) GetDeviceModel() string { - if o == nil || common.IsNil(o.DeviceModel) { - var ret string - return ret - } - return *o.DeviceModel -} - -// GetDeviceModelOk returns a tuple with the DeviceModel field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetDeviceModelOk() (*string, bool) { - if o == nil || common.IsNil(o.DeviceModel) { - return nil, false - } - return o.DeviceModel, true -} - -// HasDeviceModel returns a boolean if a field has been set. -func (o *Terminal) HasDeviceModel() bool { - if o != nil && !common.IsNil(o.DeviceModel) { - return true - } - - return false -} - -// SetDeviceModel gets a reference to the given string and assigns it to the DeviceModel field. -func (o *Terminal) SetDeviceModel(v string) { - o.DeviceModel = &v -} - -// GetEthernetIp returns the EthernetIp field value if set, zero value otherwise. -func (o *Terminal) GetEthernetIp() string { - if o == nil || common.IsNil(o.EthernetIp) { - var ret string - return ret - } - return *o.EthernetIp -} - -// GetEthernetIpOk returns a tuple with the EthernetIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetEthernetIpOk() (*string, bool) { - if o == nil || common.IsNil(o.EthernetIp) { - return nil, false - } - return o.EthernetIp, true -} - -// HasEthernetIp returns a boolean if a field has been set. -func (o *Terminal) HasEthernetIp() bool { - if o != nil && !common.IsNil(o.EthernetIp) { - return true - } - - return false -} - -// SetEthernetIp gets a reference to the given string and assigns it to the EthernetIp field. -func (o *Terminal) SetEthernetIp(v string) { - o.EthernetIp = &v -} - -// GetEthernetMac returns the EthernetMac field value if set, zero value otherwise. -func (o *Terminal) GetEthernetMac() string { - if o == nil || common.IsNil(o.EthernetMac) { - var ret string - return ret - } - return *o.EthernetMac -} - -// GetEthernetMacOk returns a tuple with the EthernetMac field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetEthernetMacOk() (*string, bool) { - if o == nil || common.IsNil(o.EthernetMac) { - return nil, false - } - return o.EthernetMac, true -} - -// HasEthernetMac returns a boolean if a field has been set. -func (o *Terminal) HasEthernetMac() bool { - if o != nil && !common.IsNil(o.EthernetMac) { - return true - } - - return false -} - -// SetEthernetMac gets a reference to the given string and assigns it to the EthernetMac field. -func (o *Terminal) SetEthernetMac(v string) { - o.EthernetMac = &v +// SetConnectivity gets a reference to the given TerminalConnectivity and assigns it to the Connectivity field. +func (o *Terminal) SetConnectivity(v TerminalConnectivity) { + o.Connectivity = &v } // GetFirmwareVersion returns the FirmwareVersion field value if set, zero value otherwise. @@ -403,38 +149,6 @@ func (o *Terminal) SetFirmwareVersion(v string) { o.FirmwareVersion = &v } -// GetIccid returns the Iccid field value if set, zero value otherwise. -func (o *Terminal) GetIccid() string { - if o == nil || common.IsNil(o.Iccid) { - var ret string - return ret - } - return *o.Iccid -} - -// GetIccidOk returns a tuple with the Iccid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetIccidOk() (*string, bool) { - if o == nil || common.IsNil(o.Iccid) { - return nil, false - } - return o.Iccid, true -} - -// HasIccid returns a boolean if a field has been set. -func (o *Terminal) HasIccid() bool { - if o != nil && !common.IsNil(o.Iccid) { - return true - } - - return false -} - -// SetIccid gets a reference to the given string and assigns it to the Iccid field. -func (o *Terminal) SetIccid(v string) { - o.Iccid = &v -} - // GetId returns the Id field value if set, zero value otherwise. func (o *Terminal) GetId() string { if o == nil || common.IsNil(o.Id) { @@ -467,100 +181,100 @@ func (o *Terminal) SetId(v string) { o.Id = &v } -// GetLastActivityDateTime returns the LastActivityDateTime field value if set, zero value otherwise. -func (o *Terminal) GetLastActivityDateTime() time.Time { - if o == nil || common.IsNil(o.LastActivityDateTime) { +// GetLastActivityAt returns the LastActivityAt field value if set, zero value otherwise. +func (o *Terminal) GetLastActivityAt() time.Time { + if o == nil || common.IsNil(o.LastActivityAt) { var ret time.Time return ret } - return *o.LastActivityDateTime + return *o.LastActivityAt } -// GetLastActivityDateTimeOk returns a tuple with the LastActivityDateTime field value if set, nil otherwise +// GetLastActivityAtOk returns a tuple with the LastActivityAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Terminal) GetLastActivityDateTimeOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.LastActivityDateTime) { +func (o *Terminal) GetLastActivityAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.LastActivityAt) { return nil, false } - return o.LastActivityDateTime, true + return o.LastActivityAt, true } -// HasLastActivityDateTime returns a boolean if a field has been set. -func (o *Terminal) HasLastActivityDateTime() bool { - if o != nil && !common.IsNil(o.LastActivityDateTime) { +// HasLastActivityAt returns a boolean if a field has been set. +func (o *Terminal) HasLastActivityAt() bool { + if o != nil && !common.IsNil(o.LastActivityAt) { return true } return false } -// SetLastActivityDateTime gets a reference to the given time.Time and assigns it to the LastActivityDateTime field. -func (o *Terminal) SetLastActivityDateTime(v time.Time) { - o.LastActivityDateTime = &v +// SetLastActivityAt gets a reference to the given time.Time and assigns it to the LastActivityAt field. +func (o *Terminal) SetLastActivityAt(v time.Time) { + o.LastActivityAt = &v } -// GetLastTransactionDateTime returns the LastTransactionDateTime field value if set, zero value otherwise. -func (o *Terminal) GetLastTransactionDateTime() time.Time { - if o == nil || common.IsNil(o.LastTransactionDateTime) { +// GetLastTransactionAt returns the LastTransactionAt field value if set, zero value otherwise. +func (o *Terminal) GetLastTransactionAt() time.Time { + if o == nil || common.IsNil(o.LastTransactionAt) { var ret time.Time return ret } - return *o.LastTransactionDateTime + return *o.LastTransactionAt } -// GetLastTransactionDateTimeOk returns a tuple with the LastTransactionDateTime field value if set, nil otherwise +// GetLastTransactionAtOk returns a tuple with the LastTransactionAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Terminal) GetLastTransactionDateTimeOk() (*time.Time, bool) { - if o == nil || common.IsNil(o.LastTransactionDateTime) { +func (o *Terminal) GetLastTransactionAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.LastTransactionAt) { return nil, false } - return o.LastTransactionDateTime, true + return o.LastTransactionAt, true } -// HasLastTransactionDateTime returns a boolean if a field has been set. -func (o *Terminal) HasLastTransactionDateTime() bool { - if o != nil && !common.IsNil(o.LastTransactionDateTime) { +// HasLastTransactionAt returns a boolean if a field has been set. +func (o *Terminal) HasLastTransactionAt() bool { + if o != nil && !common.IsNil(o.LastTransactionAt) { return true } return false } -// SetLastTransactionDateTime gets a reference to the given time.Time and assigns it to the LastTransactionDateTime field. -func (o *Terminal) SetLastTransactionDateTime(v time.Time) { - o.LastTransactionDateTime = &v +// SetLastTransactionAt gets a reference to the given time.Time and assigns it to the LastTransactionAt field. +func (o *Terminal) SetLastTransactionAt(v time.Time) { + o.LastTransactionAt = &v } -// GetLinkNegotiation returns the LinkNegotiation field value if set, zero value otherwise. -func (o *Terminal) GetLinkNegotiation() string { - if o == nil || common.IsNil(o.LinkNegotiation) { +// GetModel returns the Model field value if set, zero value otherwise. +func (o *Terminal) GetModel() string { + if o == nil || common.IsNil(o.Model) { var ret string return ret } - return *o.LinkNegotiation + return *o.Model } -// GetLinkNegotiationOk returns a tuple with the LinkNegotiation field value if set, nil otherwise +// GetModelOk returns a tuple with the Model field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Terminal) GetLinkNegotiationOk() (*string, bool) { - if o == nil || common.IsNil(o.LinkNegotiation) { +func (o *Terminal) GetModelOk() (*string, bool) { + if o == nil || common.IsNil(o.Model) { return nil, false } - return o.LinkNegotiation, true + return o.Model, true } -// HasLinkNegotiation returns a boolean if a field has been set. -func (o *Terminal) HasLinkNegotiation() bool { - if o != nil && !common.IsNil(o.LinkNegotiation) { +// HasModel returns a boolean if a field has been set. +func (o *Terminal) HasModel() bool { + if o != nil && !common.IsNil(o.Model) { return true } return false } -// SetLinkNegotiation gets a reference to the given string and assigns it to the LinkNegotiation field. -func (o *Terminal) SetLinkNegotiation(v string) { - o.LinkNegotiation = &v +// SetModel gets a reference to the given string and assigns it to the Model field. +func (o *Terminal) SetModel(v string) { + o.Model = &v } // GetSerialNumber returns the SerialNumber field value if set, zero value otherwise. @@ -595,198 +309,6 @@ func (o *Terminal) SetSerialNumber(v string) { o.SerialNumber = &v } -// GetSimStatus returns the SimStatus field value if set, zero value otherwise. -func (o *Terminal) GetSimStatus() string { - if o == nil || common.IsNil(o.SimStatus) { - var ret string - return ret - } - return *o.SimStatus -} - -// GetSimStatusOk returns a tuple with the SimStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetSimStatusOk() (*string, bool) { - if o == nil || common.IsNil(o.SimStatus) { - return nil, false - } - return o.SimStatus, true -} - -// HasSimStatus returns a boolean if a field has been set. -func (o *Terminal) HasSimStatus() bool { - if o != nil && !common.IsNil(o.SimStatus) { - return true - } - - return false -} - -// SetSimStatus gets a reference to the given string and assigns it to the SimStatus field. -func (o *Terminal) SetSimStatus(v string) { - o.SimStatus = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Terminal) 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 *Terminal) 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 *Terminal) 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 *Terminal) SetStatus(v string) { - o.Status = &v -} - -// GetStoreStatus returns the StoreStatus field value if set, zero value otherwise. -func (o *Terminal) GetStoreStatus() string { - if o == nil || common.IsNil(o.StoreStatus) { - var ret string - return ret - } - return *o.StoreStatus -} - -// GetStoreStatusOk returns a tuple with the StoreStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetStoreStatusOk() (*string, bool) { - if o == nil || common.IsNil(o.StoreStatus) { - return nil, false - } - return o.StoreStatus, true -} - -// HasStoreStatus returns a boolean if a field has been set. -func (o *Terminal) HasStoreStatus() bool { - if o != nil && !common.IsNil(o.StoreStatus) { - return true - } - - return false -} - -// SetStoreStatus gets a reference to the given string and assigns it to the StoreStatus field. -func (o *Terminal) SetStoreStatus(v string) { - o.StoreStatus = &v -} - -// GetWifiIp returns the WifiIp field value if set, zero value otherwise. -func (o *Terminal) GetWifiIp() string { - if o == nil || common.IsNil(o.WifiIp) { - var ret string - return ret - } - return *o.WifiIp -} - -// GetWifiIpOk returns a tuple with the WifiIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetWifiIpOk() (*string, bool) { - if o == nil || common.IsNil(o.WifiIp) { - return nil, false - } - return o.WifiIp, true -} - -// HasWifiIp returns a boolean if a field has been set. -func (o *Terminal) HasWifiIp() bool { - if o != nil && !common.IsNil(o.WifiIp) { - return true - } - - return false -} - -// SetWifiIp gets a reference to the given string and assigns it to the WifiIp field. -func (o *Terminal) SetWifiIp(v string) { - o.WifiIp = &v -} - -// GetWifiMac returns the WifiMac field value if set, zero value otherwise. -func (o *Terminal) GetWifiMac() string { - if o == nil || common.IsNil(o.WifiMac) { - var ret string - return ret - } - return *o.WifiMac -} - -// GetWifiMacOk returns a tuple with the WifiMac field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetWifiMacOk() (*string, bool) { - if o == nil || common.IsNil(o.WifiMac) { - return nil, false - } - return o.WifiMac, true -} - -// HasWifiMac returns a boolean if a field has been set. -func (o *Terminal) HasWifiMac() bool { - if o != nil && !common.IsNil(o.WifiMac) { - return true - } - - return false -} - -// SetWifiMac gets a reference to the given string and assigns it to the WifiMac field. -func (o *Terminal) SetWifiMac(v string) { - o.WifiMac = &v -} - -// GetWifiSsid returns the WifiSsid field value if set, zero value otherwise. -func (o *Terminal) GetWifiSsid() string { - if o == nil || common.IsNil(o.WifiSsid) { - var ret string - return ret - } - return *o.WifiSsid -} - -// GetWifiSsidOk returns a tuple with the WifiSsid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Terminal) GetWifiSsidOk() (*string, bool) { - if o == nil || common.IsNil(o.WifiSsid) { - return nil, false - } - return o.WifiSsid, true -} - -// HasWifiSsid returns a boolean if a field has been set. -func (o *Terminal) HasWifiSsid() bool { - if o != nil && !common.IsNil(o.WifiSsid) { - return true - } - - return false -} - -// SetWifiSsid gets a reference to the given string and assigns it to the WifiSsid field. -func (o *Terminal) SetWifiSsid(v string) { - o.WifiSsid = &v -} - func (o Terminal) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -797,72 +319,30 @@ func (o Terminal) MarshalJSON() ([]byte, error) { func (o Terminal) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !common.IsNil(o.Assigned) { - toSerialize["assigned"] = o.Assigned - } - if !common.IsNil(o.BluetoothIp) { - toSerialize["bluetoothIp"] = o.BluetoothIp - } - if !common.IsNil(o.BluetoothMac) { - toSerialize["bluetoothMac"] = o.BluetoothMac - } - if !common.IsNil(o.City) { - toSerialize["city"] = o.City - } - if !common.IsNil(o.CompanyAccount) { - toSerialize["companyAccount"] = o.CompanyAccount - } - if !common.IsNil(o.CountryCode) { - toSerialize["countryCode"] = o.CountryCode - } - if !common.IsNil(o.DeviceModel) { - toSerialize["deviceModel"] = o.DeviceModel + if !common.IsNil(o.Assignment) { + toSerialize["assignment"] = o.Assignment } - if !common.IsNil(o.EthernetIp) { - toSerialize["ethernetIp"] = o.EthernetIp - } - if !common.IsNil(o.EthernetMac) { - toSerialize["ethernetMac"] = o.EthernetMac + if !common.IsNil(o.Connectivity) { + toSerialize["connectivity"] = o.Connectivity } if !common.IsNil(o.FirmwareVersion) { toSerialize["firmwareVersion"] = o.FirmwareVersion } - if !common.IsNil(o.Iccid) { - toSerialize["iccid"] = o.Iccid - } if !common.IsNil(o.Id) { toSerialize["id"] = o.Id } - if !common.IsNil(o.LastActivityDateTime) { - toSerialize["lastActivityDateTime"] = o.LastActivityDateTime + if !common.IsNil(o.LastActivityAt) { + toSerialize["lastActivityAt"] = o.LastActivityAt } - if !common.IsNil(o.LastTransactionDateTime) { - toSerialize["lastTransactionDateTime"] = o.LastTransactionDateTime + if !common.IsNil(o.LastTransactionAt) { + toSerialize["lastTransactionAt"] = o.LastTransactionAt } - if !common.IsNil(o.LinkNegotiation) { - toSerialize["linkNegotiation"] = o.LinkNegotiation + if !common.IsNil(o.Model) { + toSerialize["model"] = o.Model } if !common.IsNil(o.SerialNumber) { toSerialize["serialNumber"] = o.SerialNumber } - if !common.IsNil(o.SimStatus) { - toSerialize["simStatus"] = o.SimStatus - } - if !common.IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !common.IsNil(o.StoreStatus) { - toSerialize["storeStatus"] = o.StoreStatus - } - if !common.IsNil(o.WifiIp) { - toSerialize["wifiIp"] = o.WifiIp - } - if !common.IsNil(o.WifiMac) { - toSerialize["wifiMac"] = o.WifiMac - } - if !common.IsNil(o.WifiSsid) { - toSerialize["wifiSsid"] = o.WifiSsid - } return toSerialize, nil } diff --git a/src/management/model_terminal_action_schedule_detail.go b/src/management/model_terminal_action_schedule_detail.go index 9c63bd72a..983243ecd 100644 --- a/src/management/model_terminal_action_schedule_detail.go +++ b/src/management/model_terminal_action_schedule_detail.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_assignment.go b/src/management/model_terminal_assignment.go new file mode 100644 index 000000000..cda4a5155 --- /dev/null +++ b/src/management/model_terminal_assignment.go @@ -0,0 +1,264 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalAssignment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalAssignment{} + +// TerminalAssignment struct for TerminalAssignment +type TerminalAssignment struct { + // The unique identifier of the company account to which terminal is assigned. + CompanyId string `json:"companyId"` + // The unique identifier of the merchant account to which terminal is assigned. + MerchantId *string `json:"merchantId,omitempty"` + ReassignmentTarget *TerminalReassignmentTarget `json:"reassignmentTarget,omitempty"` + // The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. + Status string `json:"status"` + // The unique identifier of the store to which terminal is assigned. + StoreId *string `json:"storeId,omitempty"` +} + +// NewTerminalAssignment instantiates a new TerminalAssignment 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 NewTerminalAssignment(companyId string, status string) *TerminalAssignment { + this := TerminalAssignment{} + this.CompanyId = companyId + this.Status = status + return &this +} + +// NewTerminalAssignmentWithDefaults instantiates a new TerminalAssignment 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 NewTerminalAssignmentWithDefaults() *TerminalAssignment { + this := TerminalAssignment{} + return &this +} + +// GetCompanyId returns the CompanyId field value +func (o *TerminalAssignment) GetCompanyId() string { + if o == nil { + var ret string + return ret + } + + return o.CompanyId +} + +// GetCompanyIdOk returns a tuple with the CompanyId field value +// and a boolean to check if the value has been set. +func (o *TerminalAssignment) GetCompanyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CompanyId, true +} + +// SetCompanyId sets field value +func (o *TerminalAssignment) SetCompanyId(v string) { + o.CompanyId = v +} + +// GetMerchantId returns the MerchantId field value if set, zero value otherwise. +func (o *TerminalAssignment) GetMerchantId() string { + if o == nil || common.IsNil(o.MerchantId) { + var ret string + return ret + } + return *o.MerchantId +} + +// GetMerchantIdOk returns a tuple with the MerchantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalAssignment) GetMerchantIdOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantId) { + return nil, false + } + return o.MerchantId, true +} + +// HasMerchantId returns a boolean if a field has been set. +func (o *TerminalAssignment) HasMerchantId() bool { + if o != nil && !common.IsNil(o.MerchantId) { + return true + } + + return false +} + +// SetMerchantId gets a reference to the given string and assigns it to the MerchantId field. +func (o *TerminalAssignment) SetMerchantId(v string) { + o.MerchantId = &v +} + +// GetReassignmentTarget returns the ReassignmentTarget field value if set, zero value otherwise. +func (o *TerminalAssignment) GetReassignmentTarget() TerminalReassignmentTarget { + if o == nil || common.IsNil(o.ReassignmentTarget) { + var ret TerminalReassignmentTarget + return ret + } + return *o.ReassignmentTarget +} + +// GetReassignmentTargetOk returns a tuple with the ReassignmentTarget field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalAssignment) GetReassignmentTargetOk() (*TerminalReassignmentTarget, bool) { + if o == nil || common.IsNil(o.ReassignmentTarget) { + return nil, false + } + return o.ReassignmentTarget, true +} + +// HasReassignmentTarget returns a boolean if a field has been set. +func (o *TerminalAssignment) HasReassignmentTarget() bool { + if o != nil && !common.IsNil(o.ReassignmentTarget) { + return true + } + + return false +} + +// SetReassignmentTarget gets a reference to the given TerminalReassignmentTarget and assigns it to the ReassignmentTarget field. +func (o *TerminalAssignment) SetReassignmentTarget(v TerminalReassignmentTarget) { + o.ReassignmentTarget = &v +} + +// GetStatus returns the Status field value +func (o *TerminalAssignment) 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 *TerminalAssignment) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *TerminalAssignment) SetStatus(v string) { + o.Status = v +} + +// GetStoreId returns the StoreId field value if set, zero value otherwise. +func (o *TerminalAssignment) GetStoreId() string { + if o == nil || common.IsNil(o.StoreId) { + var ret string + return ret + } + return *o.StoreId +} + +// GetStoreIdOk returns a tuple with the StoreId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalAssignment) GetStoreIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoreId) { + return nil, false + } + return o.StoreId, true +} + +// HasStoreId returns a boolean if a field has been set. +func (o *TerminalAssignment) HasStoreId() bool { + if o != nil && !common.IsNil(o.StoreId) { + return true + } + + return false +} + +// SetStoreId gets a reference to the given string and assigns it to the StoreId field. +func (o *TerminalAssignment) SetStoreId(v string) { + o.StoreId = &v +} + +func (o TerminalAssignment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalAssignment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["companyId"] = o.CompanyId + if !common.IsNil(o.MerchantId) { + toSerialize["merchantId"] = o.MerchantId + } + if !common.IsNil(o.ReassignmentTarget) { + toSerialize["reassignmentTarget"] = o.ReassignmentTarget + } + toSerialize["status"] = o.Status + if !common.IsNil(o.StoreId) { + toSerialize["storeId"] = o.StoreId + } + return toSerialize, nil +} + +type NullableTerminalAssignment struct { + value *TerminalAssignment + isSet bool +} + +func (v NullableTerminalAssignment) Get() *TerminalAssignment { + return v.value +} + +func (v *NullableTerminalAssignment) Set(val *TerminalAssignment) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalAssignment) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalAssignment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalAssignment(val *TerminalAssignment) *NullableTerminalAssignment { + return &NullableTerminalAssignment{value: val, isSet: true} +} + +func (v NullableTerminalAssignment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalAssignment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TerminalAssignment) isValidStatus() bool { + var allowedEnumValues = []string{"reassignmentInProgress", "deployed", "inventory"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_terminal_connectivity.go b/src/management/model_terminal_connectivity.go new file mode 100644 index 000000000..1396c8117 --- /dev/null +++ b/src/management/model_terminal_connectivity.go @@ -0,0 +1,232 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalConnectivity type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalConnectivity{} + +// TerminalConnectivity struct for TerminalConnectivity +type TerminalConnectivity struct { + Bluetooth *TerminalConnectivityBluetooth `json:"bluetooth,omitempty"` + Cellular *TerminalConnectivityCellular `json:"cellular,omitempty"` + Ethernet *TerminalConnectivityEthernet `json:"ethernet,omitempty"` + Wifi *TerminalConnectivityWifi `json:"wifi,omitempty"` +} + +// NewTerminalConnectivity instantiates a new TerminalConnectivity 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 NewTerminalConnectivity() *TerminalConnectivity { + this := TerminalConnectivity{} + return &this +} + +// NewTerminalConnectivityWithDefaults instantiates a new TerminalConnectivity 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 NewTerminalConnectivityWithDefaults() *TerminalConnectivity { + this := TerminalConnectivity{} + return &this +} + +// GetBluetooth returns the Bluetooth field value if set, zero value otherwise. +func (o *TerminalConnectivity) GetBluetooth() TerminalConnectivityBluetooth { + if o == nil || common.IsNil(o.Bluetooth) { + var ret TerminalConnectivityBluetooth + return ret + } + return *o.Bluetooth +} + +// GetBluetoothOk returns a tuple with the Bluetooth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivity) GetBluetoothOk() (*TerminalConnectivityBluetooth, bool) { + if o == nil || common.IsNil(o.Bluetooth) { + return nil, false + } + return o.Bluetooth, true +} + +// HasBluetooth returns a boolean if a field has been set. +func (o *TerminalConnectivity) HasBluetooth() bool { + if o != nil && !common.IsNil(o.Bluetooth) { + return true + } + + return false +} + +// SetBluetooth gets a reference to the given TerminalConnectivityBluetooth and assigns it to the Bluetooth field. +func (o *TerminalConnectivity) SetBluetooth(v TerminalConnectivityBluetooth) { + o.Bluetooth = &v +} + +// GetCellular returns the Cellular field value if set, zero value otherwise. +func (o *TerminalConnectivity) GetCellular() TerminalConnectivityCellular { + if o == nil || common.IsNil(o.Cellular) { + var ret TerminalConnectivityCellular + return ret + } + return *o.Cellular +} + +// GetCellularOk returns a tuple with the Cellular field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivity) GetCellularOk() (*TerminalConnectivityCellular, bool) { + if o == nil || common.IsNil(o.Cellular) { + return nil, false + } + return o.Cellular, true +} + +// HasCellular returns a boolean if a field has been set. +func (o *TerminalConnectivity) HasCellular() bool { + if o != nil && !common.IsNil(o.Cellular) { + return true + } + + return false +} + +// SetCellular gets a reference to the given TerminalConnectivityCellular and assigns it to the Cellular field. +func (o *TerminalConnectivity) SetCellular(v TerminalConnectivityCellular) { + o.Cellular = &v +} + +// GetEthernet returns the Ethernet field value if set, zero value otherwise. +func (o *TerminalConnectivity) GetEthernet() TerminalConnectivityEthernet { + if o == nil || common.IsNil(o.Ethernet) { + var ret TerminalConnectivityEthernet + return ret + } + return *o.Ethernet +} + +// GetEthernetOk returns a tuple with the Ethernet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivity) GetEthernetOk() (*TerminalConnectivityEthernet, bool) { + if o == nil || common.IsNil(o.Ethernet) { + return nil, false + } + return o.Ethernet, true +} + +// HasEthernet returns a boolean if a field has been set. +func (o *TerminalConnectivity) HasEthernet() bool { + if o != nil && !common.IsNil(o.Ethernet) { + return true + } + + return false +} + +// SetEthernet gets a reference to the given TerminalConnectivityEthernet and assigns it to the Ethernet field. +func (o *TerminalConnectivity) SetEthernet(v TerminalConnectivityEthernet) { + o.Ethernet = &v +} + +// GetWifi returns the Wifi field value if set, zero value otherwise. +func (o *TerminalConnectivity) GetWifi() TerminalConnectivityWifi { + if o == nil || common.IsNil(o.Wifi) { + var ret TerminalConnectivityWifi + return ret + } + return *o.Wifi +} + +// GetWifiOk returns a tuple with the Wifi field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivity) GetWifiOk() (*TerminalConnectivityWifi, bool) { + if o == nil || common.IsNil(o.Wifi) { + return nil, false + } + return o.Wifi, true +} + +// HasWifi returns a boolean if a field has been set. +func (o *TerminalConnectivity) HasWifi() bool { + if o != nil && !common.IsNil(o.Wifi) { + return true + } + + return false +} + +// SetWifi gets a reference to the given TerminalConnectivityWifi and assigns it to the Wifi field. +func (o *TerminalConnectivity) SetWifi(v TerminalConnectivityWifi) { + o.Wifi = &v +} + +func (o TerminalConnectivity) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalConnectivity) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Bluetooth) { + toSerialize["bluetooth"] = o.Bluetooth + } + if !common.IsNil(o.Cellular) { + toSerialize["cellular"] = o.Cellular + } + if !common.IsNil(o.Ethernet) { + toSerialize["ethernet"] = o.Ethernet + } + if !common.IsNil(o.Wifi) { + toSerialize["wifi"] = o.Wifi + } + return toSerialize, nil +} + +type NullableTerminalConnectivity struct { + value *TerminalConnectivity + isSet bool +} + +func (v NullableTerminalConnectivity) Get() *TerminalConnectivity { + return v.value +} + +func (v *NullableTerminalConnectivity) Set(val *TerminalConnectivity) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalConnectivity) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalConnectivity) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalConnectivity(val *TerminalConnectivity) *NullableTerminalConnectivity { + return &NullableTerminalConnectivity{value: val, isSet: true} +} + +func (v NullableTerminalConnectivity) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalConnectivity) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_connectivity_bluetooth.go b/src/management/model_terminal_connectivity_bluetooth.go new file mode 100644 index 000000000..3dae6dddd --- /dev/null +++ b/src/management/model_terminal_connectivity_bluetooth.go @@ -0,0 +1,162 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalConnectivityBluetooth type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalConnectivityBluetooth{} + +// TerminalConnectivityBluetooth struct for TerminalConnectivityBluetooth +type TerminalConnectivityBluetooth struct { + // The terminal's Bluetooth IP address. + IpAddress *string `json:"ipAddress,omitempty"` + // The terminal's Bluetooth MAC address. + MacAddress *string `json:"macAddress,omitempty"` +} + +// NewTerminalConnectivityBluetooth instantiates a new TerminalConnectivityBluetooth 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 NewTerminalConnectivityBluetooth() *TerminalConnectivityBluetooth { + this := TerminalConnectivityBluetooth{} + return &this +} + +// NewTerminalConnectivityBluetoothWithDefaults instantiates a new TerminalConnectivityBluetooth 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 NewTerminalConnectivityBluetoothWithDefaults() *TerminalConnectivityBluetooth { + this := TerminalConnectivityBluetooth{} + return &this +} + +// GetIpAddress returns the IpAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityBluetooth) GetIpAddress() string { + if o == nil || common.IsNil(o.IpAddress) { + var ret string + return ret + } + return *o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityBluetooth) GetIpAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.IpAddress) { + return nil, false + } + return o.IpAddress, true +} + +// HasIpAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityBluetooth) HasIpAddress() bool { + if o != nil && !common.IsNil(o.IpAddress) { + return true + } + + return false +} + +// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. +func (o *TerminalConnectivityBluetooth) SetIpAddress(v string) { + o.IpAddress = &v +} + +// GetMacAddress returns the MacAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityBluetooth) GetMacAddress() string { + if o == nil || common.IsNil(o.MacAddress) { + var ret string + return ret + } + return *o.MacAddress +} + +// GetMacAddressOk returns a tuple with the MacAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityBluetooth) GetMacAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.MacAddress) { + return nil, false + } + return o.MacAddress, true +} + +// HasMacAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityBluetooth) HasMacAddress() bool { + if o != nil && !common.IsNil(o.MacAddress) { + return true + } + + return false +} + +// SetMacAddress gets a reference to the given string and assigns it to the MacAddress field. +func (o *TerminalConnectivityBluetooth) SetMacAddress(v string) { + o.MacAddress = &v +} + +func (o TerminalConnectivityBluetooth) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalConnectivityBluetooth) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.IpAddress) { + toSerialize["ipAddress"] = o.IpAddress + } + if !common.IsNil(o.MacAddress) { + toSerialize["macAddress"] = o.MacAddress + } + return toSerialize, nil +} + +type NullableTerminalConnectivityBluetooth struct { + value *TerminalConnectivityBluetooth + isSet bool +} + +func (v NullableTerminalConnectivityBluetooth) Get() *TerminalConnectivityBluetooth { + return v.value +} + +func (v *NullableTerminalConnectivityBluetooth) Set(val *TerminalConnectivityBluetooth) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalConnectivityBluetooth) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalConnectivityBluetooth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalConnectivityBluetooth(val *TerminalConnectivityBluetooth) *NullableTerminalConnectivityBluetooth { + return &NullableTerminalConnectivityBluetooth{value: val, isSet: true} +} + +func (v NullableTerminalConnectivityBluetooth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalConnectivityBluetooth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_connectivity_cellular.go b/src/management/model_terminal_connectivity_cellular.go new file mode 100644 index 000000000..38d23696d --- /dev/null +++ b/src/management/model_terminal_connectivity_cellular.go @@ -0,0 +1,172 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalConnectivityCellular type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalConnectivityCellular{} + +// TerminalConnectivityCellular struct for TerminalConnectivityCellular +type TerminalConnectivityCellular struct { + // The integrated circuit card identifier (ICCID) of the SIM card in the terminal. + Iccid *string `json:"iccid,omitempty"` + // On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal. + Status *string `json:"status,omitempty"` +} + +// NewTerminalConnectivityCellular instantiates a new TerminalConnectivityCellular 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 NewTerminalConnectivityCellular() *TerminalConnectivityCellular { + this := TerminalConnectivityCellular{} + return &this +} + +// NewTerminalConnectivityCellularWithDefaults instantiates a new TerminalConnectivityCellular 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 NewTerminalConnectivityCellularWithDefaults() *TerminalConnectivityCellular { + this := TerminalConnectivityCellular{} + return &this +} + +// GetIccid returns the Iccid field value if set, zero value otherwise. +func (o *TerminalConnectivityCellular) GetIccid() string { + if o == nil || common.IsNil(o.Iccid) { + var ret string + return ret + } + return *o.Iccid +} + +// GetIccidOk returns a tuple with the Iccid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityCellular) GetIccidOk() (*string, bool) { + if o == nil || common.IsNil(o.Iccid) { + return nil, false + } + return o.Iccid, true +} + +// HasIccid returns a boolean if a field has been set. +func (o *TerminalConnectivityCellular) HasIccid() bool { + if o != nil && !common.IsNil(o.Iccid) { + return true + } + + return false +} + +// SetIccid gets a reference to the given string and assigns it to the Iccid field. +func (o *TerminalConnectivityCellular) SetIccid(v string) { + o.Iccid = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *TerminalConnectivityCellular) 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 *TerminalConnectivityCellular) 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 *TerminalConnectivityCellular) 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 *TerminalConnectivityCellular) SetStatus(v string) { + o.Status = &v +} + +func (o TerminalConnectivityCellular) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalConnectivityCellular) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Iccid) { + toSerialize["iccid"] = o.Iccid + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableTerminalConnectivityCellular struct { + value *TerminalConnectivityCellular + isSet bool +} + +func (v NullableTerminalConnectivityCellular) Get() *TerminalConnectivityCellular { + return v.value +} + +func (v *NullableTerminalConnectivityCellular) Set(val *TerminalConnectivityCellular) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalConnectivityCellular) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalConnectivityCellular) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalConnectivityCellular(val *TerminalConnectivityCellular) *NullableTerminalConnectivityCellular { + return &NullableTerminalConnectivityCellular{value: val, isSet: true} +} + +func (v NullableTerminalConnectivityCellular) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalConnectivityCellular) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TerminalConnectivityCellular) isValidStatus() bool { + var allowedEnumValues = []string{"activated", "deactivated", "deprecated", "inventory", "readyForActivation"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_terminal_connectivity_ethernet.go b/src/management/model_terminal_connectivity_ethernet.go new file mode 100644 index 000000000..ccbbccadf --- /dev/null +++ b/src/management/model_terminal_connectivity_ethernet.go @@ -0,0 +1,199 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalConnectivityEthernet type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalConnectivityEthernet{} + +// TerminalConnectivityEthernet struct for TerminalConnectivityEthernet +type TerminalConnectivityEthernet struct { + // The terminal's ethernet IP address. + IpAddress *string `json:"ipAddress,omitempty"` + // The ethernet link negotiation that the terminal uses. + LinkNegotiation *string `json:"linkNegotiation,omitempty"` + // The terminal's ethernet MAC address. + MacAddress *string `json:"macAddress,omitempty"` +} + +// NewTerminalConnectivityEthernet instantiates a new TerminalConnectivityEthernet 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 NewTerminalConnectivityEthernet() *TerminalConnectivityEthernet { + this := TerminalConnectivityEthernet{} + return &this +} + +// NewTerminalConnectivityEthernetWithDefaults instantiates a new TerminalConnectivityEthernet 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 NewTerminalConnectivityEthernetWithDefaults() *TerminalConnectivityEthernet { + this := TerminalConnectivityEthernet{} + return &this +} + +// GetIpAddress returns the IpAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityEthernet) GetIpAddress() string { + if o == nil || common.IsNil(o.IpAddress) { + var ret string + return ret + } + return *o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityEthernet) GetIpAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.IpAddress) { + return nil, false + } + return o.IpAddress, true +} + +// HasIpAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityEthernet) HasIpAddress() bool { + if o != nil && !common.IsNil(o.IpAddress) { + return true + } + + return false +} + +// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. +func (o *TerminalConnectivityEthernet) SetIpAddress(v string) { + o.IpAddress = &v +} + +// GetLinkNegotiation returns the LinkNegotiation field value if set, zero value otherwise. +func (o *TerminalConnectivityEthernet) GetLinkNegotiation() string { + if o == nil || common.IsNil(o.LinkNegotiation) { + var ret string + return ret + } + return *o.LinkNegotiation +} + +// GetLinkNegotiationOk returns a tuple with the LinkNegotiation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityEthernet) GetLinkNegotiationOk() (*string, bool) { + if o == nil || common.IsNil(o.LinkNegotiation) { + return nil, false + } + return o.LinkNegotiation, true +} + +// HasLinkNegotiation returns a boolean if a field has been set. +func (o *TerminalConnectivityEthernet) HasLinkNegotiation() bool { + if o != nil && !common.IsNil(o.LinkNegotiation) { + return true + } + + return false +} + +// SetLinkNegotiation gets a reference to the given string and assigns it to the LinkNegotiation field. +func (o *TerminalConnectivityEthernet) SetLinkNegotiation(v string) { + o.LinkNegotiation = &v +} + +// GetMacAddress returns the MacAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityEthernet) GetMacAddress() string { + if o == nil || common.IsNil(o.MacAddress) { + var ret string + return ret + } + return *o.MacAddress +} + +// GetMacAddressOk returns a tuple with the MacAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityEthernet) GetMacAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.MacAddress) { + return nil, false + } + return o.MacAddress, true +} + +// HasMacAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityEthernet) HasMacAddress() bool { + if o != nil && !common.IsNil(o.MacAddress) { + return true + } + + return false +} + +// SetMacAddress gets a reference to the given string and assigns it to the MacAddress field. +func (o *TerminalConnectivityEthernet) SetMacAddress(v string) { + o.MacAddress = &v +} + +func (o TerminalConnectivityEthernet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalConnectivityEthernet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.IpAddress) { + toSerialize["ipAddress"] = o.IpAddress + } + if !common.IsNil(o.LinkNegotiation) { + toSerialize["linkNegotiation"] = o.LinkNegotiation + } + if !common.IsNil(o.MacAddress) { + toSerialize["macAddress"] = o.MacAddress + } + return toSerialize, nil +} + +type NullableTerminalConnectivityEthernet struct { + value *TerminalConnectivityEthernet + isSet bool +} + +func (v NullableTerminalConnectivityEthernet) Get() *TerminalConnectivityEthernet { + return v.value +} + +func (v *NullableTerminalConnectivityEthernet) Set(val *TerminalConnectivityEthernet) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalConnectivityEthernet) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalConnectivityEthernet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalConnectivityEthernet(val *TerminalConnectivityEthernet) *NullableTerminalConnectivityEthernet { + return &NullableTerminalConnectivityEthernet{value: val, isSet: true} +} + +func (v NullableTerminalConnectivityEthernet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalConnectivityEthernet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_connectivity_wifi.go b/src/management/model_terminal_connectivity_wifi.go new file mode 100644 index 000000000..908bace70 --- /dev/null +++ b/src/management/model_terminal_connectivity_wifi.go @@ -0,0 +1,199 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalConnectivityWifi type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalConnectivityWifi{} + +// TerminalConnectivityWifi struct for TerminalConnectivityWifi +type TerminalConnectivityWifi struct { + // The terminal's IP address in the Wi-Fi network. + IpAddress *string `json:"ipAddress,omitempty"` + // The terminal's MAC address in the Wi-Fi network. + MacAddress *string `json:"macAddress,omitempty"` + // The SSID of the Wi-Fi network that the terminal is connected to. + Ssid *string `json:"ssid,omitempty"` +} + +// NewTerminalConnectivityWifi instantiates a new TerminalConnectivityWifi 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 NewTerminalConnectivityWifi() *TerminalConnectivityWifi { + this := TerminalConnectivityWifi{} + return &this +} + +// NewTerminalConnectivityWifiWithDefaults instantiates a new TerminalConnectivityWifi 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 NewTerminalConnectivityWifiWithDefaults() *TerminalConnectivityWifi { + this := TerminalConnectivityWifi{} + return &this +} + +// GetIpAddress returns the IpAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityWifi) GetIpAddress() string { + if o == nil || common.IsNil(o.IpAddress) { + var ret string + return ret + } + return *o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityWifi) GetIpAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.IpAddress) { + return nil, false + } + return o.IpAddress, true +} + +// HasIpAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityWifi) HasIpAddress() bool { + if o != nil && !common.IsNil(o.IpAddress) { + return true + } + + return false +} + +// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. +func (o *TerminalConnectivityWifi) SetIpAddress(v string) { + o.IpAddress = &v +} + +// GetMacAddress returns the MacAddress field value if set, zero value otherwise. +func (o *TerminalConnectivityWifi) GetMacAddress() string { + if o == nil || common.IsNil(o.MacAddress) { + var ret string + return ret + } + return *o.MacAddress +} + +// GetMacAddressOk returns a tuple with the MacAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityWifi) GetMacAddressOk() (*string, bool) { + if o == nil || common.IsNil(o.MacAddress) { + return nil, false + } + return o.MacAddress, true +} + +// HasMacAddress returns a boolean if a field has been set. +func (o *TerminalConnectivityWifi) HasMacAddress() bool { + if o != nil && !common.IsNil(o.MacAddress) { + return true + } + + return false +} + +// SetMacAddress gets a reference to the given string and assigns it to the MacAddress field. +func (o *TerminalConnectivityWifi) SetMacAddress(v string) { + o.MacAddress = &v +} + +// GetSsid returns the Ssid field value if set, zero value otherwise. +func (o *TerminalConnectivityWifi) GetSsid() string { + if o == nil || common.IsNil(o.Ssid) { + var ret string + return ret + } + return *o.Ssid +} + +// GetSsidOk returns a tuple with the Ssid field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalConnectivityWifi) GetSsidOk() (*string, bool) { + if o == nil || common.IsNil(o.Ssid) { + return nil, false + } + return o.Ssid, true +} + +// HasSsid returns a boolean if a field has been set. +func (o *TerminalConnectivityWifi) HasSsid() bool { + if o != nil && !common.IsNil(o.Ssid) { + return true + } + + return false +} + +// SetSsid gets a reference to the given string and assigns it to the Ssid field. +func (o *TerminalConnectivityWifi) SetSsid(v string) { + o.Ssid = &v +} + +func (o TerminalConnectivityWifi) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalConnectivityWifi) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.IpAddress) { + toSerialize["ipAddress"] = o.IpAddress + } + if !common.IsNil(o.MacAddress) { + toSerialize["macAddress"] = o.MacAddress + } + if !common.IsNil(o.Ssid) { + toSerialize["ssid"] = o.Ssid + } + return toSerialize, nil +} + +type NullableTerminalConnectivityWifi struct { + value *TerminalConnectivityWifi + isSet bool +} + +func (v NullableTerminalConnectivityWifi) Get() *TerminalConnectivityWifi { + return v.value +} + +func (v *NullableTerminalConnectivityWifi) Set(val *TerminalConnectivityWifi) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalConnectivityWifi) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalConnectivityWifi) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalConnectivityWifi(val *TerminalConnectivityWifi) *NullableTerminalConnectivityWifi { + return &NullableTerminalConnectivityWifi{value: val, isSet: true} +} + +func (v NullableTerminalConnectivityWifi) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalConnectivityWifi) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_models_response.go b/src/management/model_terminal_models_response.go index 969f25923..278d5cc2b 100644 --- a/src/management/model_terminal_models_response.go +++ b/src/management/model_terminal_models_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_order.go b/src/management/model_terminal_order.go index 16304d7fc..861f06a6a 100644 --- a/src/management/model_terminal_order.go +++ b/src/management/model_terminal_order.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_order_request.go b/src/management/model_terminal_order_request.go index 623b37687..3c1d91ec5 100644 --- a/src/management/model_terminal_order_request.go +++ b/src/management/model_terminal_order_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_orders_response.go b/src/management/model_terminal_orders_response.go index f44f57925..8a5988ac9 100644 --- a/src/management/model_terminal_orders_response.go +++ b/src/management/model_terminal_orders_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_product.go b/src/management/model_terminal_product.go index 833d8341c..9557816f5 100644 --- a/src/management/model_terminal_product.go +++ b/src/management/model_terminal_product.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_product_price.go b/src/management/model_terminal_product_price.go index 9b5ddd74b..cadbe4654 100644 --- a/src/management/model_terminal_product_price.go +++ b/src/management/model_terminal_product_price.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_products_response.go b/src/management/model_terminal_products_response.go index dfadae910..eb11098cd 100644 --- a/src/management/model_terminal_products_response.go +++ b/src/management/model_terminal_products_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_terminal_reassignment_request.go b/src/management/model_terminal_reassignment_request.go new file mode 100644 index 000000000..e9fec134e --- /dev/null +++ b/src/management/model_terminal_reassignment_request.go @@ -0,0 +1,236 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalReassignmentRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalReassignmentRequest{} + +// TerminalReassignmentRequest struct for TerminalReassignmentRequest +type TerminalReassignmentRequest struct { + // The unique identifier of the company account to which the terminal is reassigned. + CompanyId *string `json:"companyId,omitempty"` + // Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions. + Inventory *bool `json:"inventory,omitempty"` + // The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field. + MerchantId *string `json:"merchantId,omitempty"` + // The unique identifier of the store to which the terminal is reassigned. + StoreId *string `json:"storeId,omitempty"` +} + +// NewTerminalReassignmentRequest instantiates a new TerminalReassignmentRequest 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 NewTerminalReassignmentRequest() *TerminalReassignmentRequest { + this := TerminalReassignmentRequest{} + return &this +} + +// NewTerminalReassignmentRequestWithDefaults instantiates a new TerminalReassignmentRequest 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 NewTerminalReassignmentRequestWithDefaults() *TerminalReassignmentRequest { + this := TerminalReassignmentRequest{} + return &this +} + +// GetCompanyId returns the CompanyId field value if set, zero value otherwise. +func (o *TerminalReassignmentRequest) GetCompanyId() string { + if o == nil || common.IsNil(o.CompanyId) { + var ret string + return ret + } + return *o.CompanyId +} + +// GetCompanyIdOk returns a tuple with the CompanyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentRequest) GetCompanyIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CompanyId) { + return nil, false + } + return o.CompanyId, true +} + +// HasCompanyId returns a boolean if a field has been set. +func (o *TerminalReassignmentRequest) HasCompanyId() bool { + if o != nil && !common.IsNil(o.CompanyId) { + return true + } + + return false +} + +// SetCompanyId gets a reference to the given string and assigns it to the CompanyId field. +func (o *TerminalReassignmentRequest) SetCompanyId(v string) { + o.CompanyId = &v +} + +// GetInventory returns the Inventory field value if set, zero value otherwise. +func (o *TerminalReassignmentRequest) GetInventory() bool { + if o == nil || common.IsNil(o.Inventory) { + var ret bool + return ret + } + return *o.Inventory +} + +// GetInventoryOk returns a tuple with the Inventory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentRequest) GetInventoryOk() (*bool, bool) { + if o == nil || common.IsNil(o.Inventory) { + return nil, false + } + return o.Inventory, true +} + +// HasInventory returns a boolean if a field has been set. +func (o *TerminalReassignmentRequest) HasInventory() bool { + if o != nil && !common.IsNil(o.Inventory) { + return true + } + + return false +} + +// SetInventory gets a reference to the given bool and assigns it to the Inventory field. +func (o *TerminalReassignmentRequest) SetInventory(v bool) { + o.Inventory = &v +} + +// GetMerchantId returns the MerchantId field value if set, zero value otherwise. +func (o *TerminalReassignmentRequest) GetMerchantId() string { + if o == nil || common.IsNil(o.MerchantId) { + var ret string + return ret + } + return *o.MerchantId +} + +// GetMerchantIdOk returns a tuple with the MerchantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentRequest) GetMerchantIdOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantId) { + return nil, false + } + return o.MerchantId, true +} + +// HasMerchantId returns a boolean if a field has been set. +func (o *TerminalReassignmentRequest) HasMerchantId() bool { + if o != nil && !common.IsNil(o.MerchantId) { + return true + } + + return false +} + +// SetMerchantId gets a reference to the given string and assigns it to the MerchantId field. +func (o *TerminalReassignmentRequest) SetMerchantId(v string) { + o.MerchantId = &v +} + +// GetStoreId returns the StoreId field value if set, zero value otherwise. +func (o *TerminalReassignmentRequest) GetStoreId() string { + if o == nil || common.IsNil(o.StoreId) { + var ret string + return ret + } + return *o.StoreId +} + +// GetStoreIdOk returns a tuple with the StoreId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentRequest) GetStoreIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoreId) { + return nil, false + } + return o.StoreId, true +} + +// HasStoreId returns a boolean if a field has been set. +func (o *TerminalReassignmentRequest) HasStoreId() bool { + if o != nil && !common.IsNil(o.StoreId) { + return true + } + + return false +} + +// SetStoreId gets a reference to the given string and assigns it to the StoreId field. +func (o *TerminalReassignmentRequest) SetStoreId(v string) { + o.StoreId = &v +} + +func (o TerminalReassignmentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalReassignmentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CompanyId) { + toSerialize["companyId"] = o.CompanyId + } + if !common.IsNil(o.Inventory) { + toSerialize["inventory"] = o.Inventory + } + if !common.IsNil(o.MerchantId) { + toSerialize["merchantId"] = o.MerchantId + } + if !common.IsNil(o.StoreId) { + toSerialize["storeId"] = o.StoreId + } + return toSerialize, nil +} + +type NullableTerminalReassignmentRequest struct { + value *TerminalReassignmentRequest + isSet bool +} + +func (v NullableTerminalReassignmentRequest) Get() *TerminalReassignmentRequest { + return v.value +} + +func (v *NullableTerminalReassignmentRequest) Set(val *TerminalReassignmentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalReassignmentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalReassignmentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalReassignmentRequest(val *TerminalReassignmentRequest) *NullableTerminalReassignmentRequest { + return &NullableTerminalReassignmentRequest{value: val, isSet: true} +} + +func (v NullableTerminalReassignmentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalReassignmentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_reassignment_target.go b/src/management/model_terminal_reassignment_target.go new file mode 100644 index 000000000..4787abaf7 --- /dev/null +++ b/src/management/model_terminal_reassignment_target.go @@ -0,0 +1,227 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TerminalReassignmentTarget type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TerminalReassignmentTarget{} + +// TerminalReassignmentTarget struct for TerminalReassignmentTarget +type TerminalReassignmentTarget struct { + // The unique identifier of the company account to which the terminal is reassigned. + CompanyId *string `json:"companyId,omitempty"` + // Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions. + Inventory bool `json:"inventory"` + // The unique identifier of the merchant account to which the terminal is reassigned. + MerchantId *string `json:"merchantId,omitempty"` + // The unique identifier of the store to which the terminal is reassigned. + StoreId *string `json:"storeId,omitempty"` +} + +// NewTerminalReassignmentTarget instantiates a new TerminalReassignmentTarget 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 NewTerminalReassignmentTarget(inventory bool) *TerminalReassignmentTarget { + this := TerminalReassignmentTarget{} + this.Inventory = inventory + return &this +} + +// NewTerminalReassignmentTargetWithDefaults instantiates a new TerminalReassignmentTarget 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 NewTerminalReassignmentTargetWithDefaults() *TerminalReassignmentTarget { + this := TerminalReassignmentTarget{} + return &this +} + +// GetCompanyId returns the CompanyId field value if set, zero value otherwise. +func (o *TerminalReassignmentTarget) GetCompanyId() string { + if o == nil || common.IsNil(o.CompanyId) { + var ret string + return ret + } + return *o.CompanyId +} + +// GetCompanyIdOk returns a tuple with the CompanyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentTarget) GetCompanyIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CompanyId) { + return nil, false + } + return o.CompanyId, true +} + +// HasCompanyId returns a boolean if a field has been set. +func (o *TerminalReassignmentTarget) HasCompanyId() bool { + if o != nil && !common.IsNil(o.CompanyId) { + return true + } + + return false +} + +// SetCompanyId gets a reference to the given string and assigns it to the CompanyId field. +func (o *TerminalReassignmentTarget) SetCompanyId(v string) { + o.CompanyId = &v +} + +// GetInventory returns the Inventory field value +func (o *TerminalReassignmentTarget) GetInventory() bool { + if o == nil { + var ret bool + return ret + } + + return o.Inventory +} + +// GetInventoryOk returns a tuple with the Inventory field value +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentTarget) GetInventoryOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Inventory, true +} + +// SetInventory sets field value +func (o *TerminalReassignmentTarget) SetInventory(v bool) { + o.Inventory = v +} + +// GetMerchantId returns the MerchantId field value if set, zero value otherwise. +func (o *TerminalReassignmentTarget) GetMerchantId() string { + if o == nil || common.IsNil(o.MerchantId) { + var ret string + return ret + } + return *o.MerchantId +} + +// GetMerchantIdOk returns a tuple with the MerchantId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentTarget) GetMerchantIdOk() (*string, bool) { + if o == nil || common.IsNil(o.MerchantId) { + return nil, false + } + return o.MerchantId, true +} + +// HasMerchantId returns a boolean if a field has been set. +func (o *TerminalReassignmentTarget) HasMerchantId() bool { + if o != nil && !common.IsNil(o.MerchantId) { + return true + } + + return false +} + +// SetMerchantId gets a reference to the given string and assigns it to the MerchantId field. +func (o *TerminalReassignmentTarget) SetMerchantId(v string) { + o.MerchantId = &v +} + +// GetStoreId returns the StoreId field value if set, zero value otherwise. +func (o *TerminalReassignmentTarget) GetStoreId() string { + if o == nil || common.IsNil(o.StoreId) { + var ret string + return ret + } + return *o.StoreId +} + +// GetStoreIdOk returns a tuple with the StoreId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalReassignmentTarget) GetStoreIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoreId) { + return nil, false + } + return o.StoreId, true +} + +// HasStoreId returns a boolean if a field has been set. +func (o *TerminalReassignmentTarget) HasStoreId() bool { + if o != nil && !common.IsNil(o.StoreId) { + return true + } + + return false +} + +// SetStoreId gets a reference to the given string and assigns it to the StoreId field. +func (o *TerminalReassignmentTarget) SetStoreId(v string) { + o.StoreId = &v +} + +func (o TerminalReassignmentTarget) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TerminalReassignmentTarget) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CompanyId) { + toSerialize["companyId"] = o.CompanyId + } + toSerialize["inventory"] = o.Inventory + if !common.IsNil(o.MerchantId) { + toSerialize["merchantId"] = o.MerchantId + } + if !common.IsNil(o.StoreId) { + toSerialize["storeId"] = o.StoreId + } + return toSerialize, nil +} + +type NullableTerminalReassignmentTarget struct { + value *TerminalReassignmentTarget + isSet bool +} + +func (v NullableTerminalReassignmentTarget) Get() *TerminalReassignmentTarget { + return v.value +} + +func (v *NullableTerminalReassignmentTarget) Set(val *TerminalReassignmentTarget) { + v.value = val + v.isSet = true +} + +func (v NullableTerminalReassignmentTarget) IsSet() bool { + return v.isSet +} + +func (v *NullableTerminalReassignmentTarget) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTerminalReassignmentTarget(val *TerminalReassignmentTarget) *NullableTerminalReassignmentTarget { + return &NullableTerminalReassignmentTarget{value: val, isSet: true} +} + +func (v NullableTerminalReassignmentTarget) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTerminalReassignmentTarget) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_terminal_settings.go b/src/management/model_terminal_settings.go index b7aa89da3..7769b3f8e 100644 --- a/src/management/model_terminal_settings.go +++ b/src/management/model_terminal_settings.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -24,6 +24,7 @@ type TerminalSettings struct { // Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip. Gratuities []Gratuity `json:"gratuities,omitempty"` Hardware *Hardware `json:"hardware,omitempty"` + Localization *Localization `json:"localization,omitempty"` Nexo *Nexo `json:"nexo,omitempty"` OfflineProcessing *OfflineProcessing `json:"offlineProcessing,omitempty"` Opi *Opi `json:"opi,omitempty"` @@ -184,6 +185,38 @@ func (o *TerminalSettings) SetHardware(v Hardware) { o.Hardware = &v } +// GetLocalization returns the Localization field value if set, zero value otherwise. +func (o *TerminalSettings) GetLocalization() Localization { + if o == nil || common.IsNil(o.Localization) { + var ret Localization + return ret + } + return *o.Localization +} + +// GetLocalizationOk returns a tuple with the Localization field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalSettings) GetLocalizationOk() (*Localization, bool) { + if o == nil || common.IsNil(o.Localization) { + return nil, false + } + return o.Localization, true +} + +// HasLocalization returns a boolean if a field has been set. +func (o *TerminalSettings) HasLocalization() bool { + if o != nil && !common.IsNil(o.Localization) { + return true + } + + return false +} + +// SetLocalization gets a reference to the given Localization and assigns it to the Localization field. +func (o *TerminalSettings) SetLocalization(v Localization) { + o.Localization = &v +} + // GetNexo returns the Nexo field value if set, zero value otherwise. func (o *TerminalSettings) GetNexo() Nexo { if o == nil || common.IsNil(o.Nexo) { @@ -622,6 +655,9 @@ func (o TerminalSettings) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Hardware) { toSerialize["hardware"] = o.Hardware } + if !common.IsNil(o.Localization) { + toSerialize["localization"] = o.Localization + } if !common.IsNil(o.Nexo) { toSerialize["nexo"] = o.Nexo } diff --git a/src/management/model_test_company_webhook_request.go b/src/management/model_test_company_webhook_request.go index e858f11b8..9fcc12aec 100644 --- a/src/management/model_test_company_webhook_request.go +++ b/src/management/model_test_company_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_test_output.go b/src/management/model_test_output.go index 16d45e9a5..adb36a7b0 100644 --- a/src/management/model_test_output.go +++ b/src/management/model_test_output.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_test_webhook_request.go b/src/management/model_test_webhook_request.go index bec1b9ce1..9838bcb2a 100644 --- a/src/management/model_test_webhook_request.go +++ b/src/management/model_test_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_test_webhook_response.go b/src/management/model_test_webhook_response.go index 0a577b117..a0e531195 100644 --- a/src/management/model_test_webhook_response.go +++ b/src/management/model_test_webhook_response.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_timeouts.go b/src/management/model_timeouts.go index 953036533..8c3cb6d82 100644 --- a/src/management/model_timeouts.go +++ b/src/management/model_timeouts.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_transaction_description_info.go b/src/management/model_transaction_description_info.go new file mode 100644 index 000000000..ba3f33ff3 --- /dev/null +++ b/src/management/model_transaction_description_info.go @@ -0,0 +1,176 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the TransactionDescriptionInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransactionDescriptionInfo{} + +// TransactionDescriptionInfo struct for TransactionDescriptionInfo +type TransactionDescriptionInfo struct { + // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. + DoingBusinessAsName *string `json:"doingBusinessAsName,omitempty"` + // The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. + Type *string `json:"type,omitempty"` +} + +// NewTransactionDescriptionInfo instantiates a new TransactionDescriptionInfo 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 NewTransactionDescriptionInfo() *TransactionDescriptionInfo { + this := TransactionDescriptionInfo{} + var type_ string = "dynamic" + this.Type = &type_ + return &this +} + +// NewTransactionDescriptionInfoWithDefaults instantiates a new TransactionDescriptionInfo 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 NewTransactionDescriptionInfoWithDefaults() *TransactionDescriptionInfo { + this := TransactionDescriptionInfo{} + var type_ string = "dynamic" + this.Type = &type_ + return &this +} + +// GetDoingBusinessAsName returns the DoingBusinessAsName field value if set, zero value otherwise. +func (o *TransactionDescriptionInfo) GetDoingBusinessAsName() string { + if o == nil || common.IsNil(o.DoingBusinessAsName) { + var ret string + return ret + } + return *o.DoingBusinessAsName +} + +// GetDoingBusinessAsNameOk returns a tuple with the DoingBusinessAsName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactionDescriptionInfo) GetDoingBusinessAsNameOk() (*string, bool) { + if o == nil || common.IsNil(o.DoingBusinessAsName) { + return nil, false + } + return o.DoingBusinessAsName, true +} + +// HasDoingBusinessAsName returns a boolean if a field has been set. +func (o *TransactionDescriptionInfo) HasDoingBusinessAsName() bool { + if o != nil && !common.IsNil(o.DoingBusinessAsName) { + return true + } + + return false +} + +// SetDoingBusinessAsName gets a reference to the given string and assigns it to the DoingBusinessAsName field. +func (o *TransactionDescriptionInfo) SetDoingBusinessAsName(v string) { + o.DoingBusinessAsName = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransactionDescriptionInfo) 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 *TransactionDescriptionInfo) 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 *TransactionDescriptionInfo) 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 *TransactionDescriptionInfo) SetType(v string) { + o.Type = &v +} + +func (o TransactionDescriptionInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransactionDescriptionInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.DoingBusinessAsName) { + toSerialize["doingBusinessAsName"] = o.DoingBusinessAsName + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableTransactionDescriptionInfo struct { + value *TransactionDescriptionInfo + isSet bool +} + +func (v NullableTransactionDescriptionInfo) Get() *TransactionDescriptionInfo { + return v.value +} + +func (v *NullableTransactionDescriptionInfo) Set(val *TransactionDescriptionInfo) { + v.value = val + v.isSet = true +} + +func (v NullableTransactionDescriptionInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableTransactionDescriptionInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransactionDescriptionInfo(val *TransactionDescriptionInfo) *NullableTransactionDescriptionInfo { + return &NullableTransactionDescriptionInfo{value: val, isSet: true} +} + +func (v NullableTransactionDescriptionInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransactionDescriptionInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TransactionDescriptionInfo) isValidType() bool { + var allowedEnumValues = []string{"append", "dynamic", "fixed"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_twint_info.go b/src/management/model_twint_info.go index d1723dcf7..bf391f104 100644 --- a/src/management/model_twint_info.go +++ b/src/management/model_twint_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_uninstall_android_app_details.go b/src/management/model_uninstall_android_app_details.go index 44da44bb6..c7750b1fc 100644 --- a/src/management/model_uninstall_android_app_details.go +++ b/src/management/model_uninstall_android_app_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_uninstall_android_certificate_details.go b/src/management/model_uninstall_android_certificate_details.go index 0c7c1f14d..b818a7fc5 100644 --- a/src/management/model_uninstall_android_certificate_details.go +++ b/src/management/model_uninstall_android_certificate_details.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_updatable_address.go b/src/management/model_updatable_address.go index bc3511625..3e7245554 100644 --- a/src/management/model_updatable_address.go +++ b/src/management/model_updatable_address.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_company_api_credential_request.go b/src/management/model_update_company_api_credential_request.go index 3f993f5a6..886663f5d 100644 --- a/src/management/model_update_company_api_credential_request.go +++ b/src/management/model_update_company_api_credential_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_company_user_request.go b/src/management/model_update_company_user_request.go index e21f18988..6747ccbf9 100644 --- a/src/management/model_update_company_user_request.go +++ b/src/management/model_update_company_user_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_company_webhook_request.go b/src/management/model_update_company_webhook_request.go index f93a5ad8d..06308572b 100644 --- a/src/management/model_update_company_webhook_request.go +++ b/src/management/model_update_company_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,6 +32,8 @@ type UpdateCompanyWebhookRequest struct { CommunicationFormat *string `json:"communicationFormat,omitempty"` // Your description for this webhook configuration. Description *string `json:"description,omitempty"` + // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + EncryptionProtocol *string `json:"encryptionProtocol,omitempty"` // Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. FilterMerchantAccountType *string `json:"filterMerchantAccountType,omitempty"` // A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. @@ -42,8 +44,6 @@ type UpdateCompanyWebhookRequest struct { Password *string `json:"password,omitempty"` // Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. PopulateSoapActionHeader *bool `json:"populateSoapActionHeader,omitempty"` - // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - SslVersion *string `json:"sslVersion,omitempty"` // Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. Url *string `json:"url,omitempty"` // Username to access the webhook URL. @@ -291,6 +291,38 @@ func (o *UpdateCompanyWebhookRequest) SetDescription(v string) { o.Description = &v } +// GetEncryptionProtocol returns the EncryptionProtocol field value if set, zero value otherwise. +func (o *UpdateCompanyWebhookRequest) GetEncryptionProtocol() string { + if o == nil || common.IsNil(o.EncryptionProtocol) { + var ret string + return ret + } + return *o.EncryptionProtocol +} + +// GetEncryptionProtocolOk returns a tuple with the EncryptionProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateCompanyWebhookRequest) GetEncryptionProtocolOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptionProtocol) { + return nil, false + } + return o.EncryptionProtocol, true +} + +// HasEncryptionProtocol returns a boolean if a field has been set. +func (o *UpdateCompanyWebhookRequest) HasEncryptionProtocol() bool { + if o != nil && !common.IsNil(o.EncryptionProtocol) { + return true + } + + return false +} + +// SetEncryptionProtocol gets a reference to the given string and assigns it to the EncryptionProtocol field. +func (o *UpdateCompanyWebhookRequest) SetEncryptionProtocol(v string) { + o.EncryptionProtocol = &v +} + // GetFilterMerchantAccountType returns the FilterMerchantAccountType field value if set, zero value otherwise. func (o *UpdateCompanyWebhookRequest) GetFilterMerchantAccountType() string { if o == nil || common.IsNil(o.FilterMerchantAccountType) { @@ -451,38 +483,6 @@ func (o *UpdateCompanyWebhookRequest) SetPopulateSoapActionHeader(v bool) { o.PopulateSoapActionHeader = &v } -// GetSslVersion returns the SslVersion field value if set, zero value otherwise. -func (o *UpdateCompanyWebhookRequest) GetSslVersion() string { - if o == nil || common.IsNil(o.SslVersion) { - var ret string - return ret - } - return *o.SslVersion -} - -// GetSslVersionOk returns a tuple with the SslVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateCompanyWebhookRequest) GetSslVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SslVersion) { - return nil, false - } - return o.SslVersion, true -} - -// HasSslVersion returns a boolean if a field has been set. -func (o *UpdateCompanyWebhookRequest) HasSslVersion() bool { - if o != nil && !common.IsNil(o.SslVersion) { - return true - } - - return false -} - -// SetSslVersion gets a reference to the given string and assigns it to the SslVersion field. -func (o *UpdateCompanyWebhookRequest) SetSslVersion(v string) { - o.SslVersion = &v -} - // GetUrl returns the Url field value if set, zero value otherwise. func (o *UpdateCompanyWebhookRequest) GetUrl() string { if o == nil || common.IsNil(o.Url) { @@ -578,6 +578,9 @@ func (o UpdateCompanyWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.EncryptionProtocol) { + toSerialize["encryptionProtocol"] = o.EncryptionProtocol + } if !common.IsNil(o.FilterMerchantAccountType) { toSerialize["filterMerchantAccountType"] = o.FilterMerchantAccountType } @@ -593,9 +596,6 @@ func (o UpdateCompanyWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PopulateSoapActionHeader) { toSerialize["populateSoapActionHeader"] = o.PopulateSoapActionHeader } - if !common.IsNil(o.SslVersion) { - toSerialize["sslVersion"] = o.SslVersion - } if !common.IsNil(o.Url) { toSerialize["url"] = o.Url } @@ -650,28 +650,28 @@ func (o *UpdateCompanyWebhookRequest) isValidCommunicationFormat() bool { } return false } -func (o *UpdateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { - var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} +func (o *UpdateCompanyWebhookRequest) isValidEncryptionProtocol() bool { + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { - if o.GetFilterMerchantAccountType() == allowed { + if o.GetEncryptionProtocol() == allowed { return true } } return false } -func (o *UpdateCompanyWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"local", "public"} +func (o *UpdateCompanyWebhookRequest) isValidFilterMerchantAccountType() bool { + var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} for _, allowed := range allowedEnumValues { - if o.GetNetworkType() == allowed { + if o.GetFilterMerchantAccountType() == allowed { return true } } return false } -func (o *UpdateCompanyWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} +func (o *UpdateCompanyWebhookRequest) isValidNetworkType() bool { + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { - if o.GetSslVersion() == allowed { + if o.GetNetworkType() == allowed { return true } } diff --git a/src/management/model_update_merchant_api_credential_request.go b/src/management/model_update_merchant_api_credential_request.go index 3cd282de8..65085ec4f 100644 --- a/src/management/model_update_merchant_api_credential_request.go +++ b/src/management/model_update_merchant_api_credential_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_merchant_user_request.go b/src/management/model_update_merchant_user_request.go index e160c42a5..87eceea0a 100644 --- a/src/management/model_update_merchant_user_request.go +++ b/src/management/model_update_merchant_user_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_merchant_webhook_request.go b/src/management/model_update_merchant_webhook_request.go index f2f023a39..d7cb13ca1 100644 --- a/src/management/model_update_merchant_webhook_request.go +++ b/src/management/model_update_merchant_webhook_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,14 +32,14 @@ type UpdateMerchantWebhookRequest struct { CommunicationFormat *string `json:"communicationFormat,omitempty"` // Your description for this webhook configuration. Description *string `json:"description,omitempty"` + // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + EncryptionProtocol *string `json:"encryptionProtocol,omitempty"` // Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. NetworkType *string `json:"networkType,omitempty"` // Password to access the webhook URL. Password *string `json:"password,omitempty"` // Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. PopulateSoapActionHeader *bool `json:"populateSoapActionHeader,omitempty"` - // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - SslVersion *string `json:"sslVersion,omitempty"` // Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. Url *string `json:"url,omitempty"` // Username to access the webhook URL. @@ -287,6 +287,38 @@ func (o *UpdateMerchantWebhookRequest) SetDescription(v string) { o.Description = &v } +// GetEncryptionProtocol returns the EncryptionProtocol field value if set, zero value otherwise. +func (o *UpdateMerchantWebhookRequest) GetEncryptionProtocol() string { + if o == nil || common.IsNil(o.EncryptionProtocol) { + var ret string + return ret + } + return *o.EncryptionProtocol +} + +// GetEncryptionProtocolOk returns a tuple with the EncryptionProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateMerchantWebhookRequest) GetEncryptionProtocolOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptionProtocol) { + return nil, false + } + return o.EncryptionProtocol, true +} + +// HasEncryptionProtocol returns a boolean if a field has been set. +func (o *UpdateMerchantWebhookRequest) HasEncryptionProtocol() bool { + if o != nil && !common.IsNil(o.EncryptionProtocol) { + return true + } + + return false +} + +// SetEncryptionProtocol gets a reference to the given string and assigns it to the EncryptionProtocol field. +func (o *UpdateMerchantWebhookRequest) SetEncryptionProtocol(v string) { + o.EncryptionProtocol = &v +} + // GetNetworkType returns the NetworkType field value if set, zero value otherwise. func (o *UpdateMerchantWebhookRequest) GetNetworkType() string { if o == nil || common.IsNil(o.NetworkType) { @@ -383,38 +415,6 @@ func (o *UpdateMerchantWebhookRequest) SetPopulateSoapActionHeader(v bool) { o.PopulateSoapActionHeader = &v } -// GetSslVersion returns the SslVersion field value if set, zero value otherwise. -func (o *UpdateMerchantWebhookRequest) GetSslVersion() string { - if o == nil || common.IsNil(o.SslVersion) { - var ret string - return ret - } - return *o.SslVersion -} - -// GetSslVersionOk returns a tuple with the SslVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateMerchantWebhookRequest) GetSslVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SslVersion) { - return nil, false - } - return o.SslVersion, true -} - -// HasSslVersion returns a boolean if a field has been set. -func (o *UpdateMerchantWebhookRequest) HasSslVersion() bool { - if o != nil && !common.IsNil(o.SslVersion) { - return true - } - - return false -} - -// SetSslVersion gets a reference to the given string and assigns it to the SslVersion field. -func (o *UpdateMerchantWebhookRequest) SetSslVersion(v string) { - o.SslVersion = &v -} - // GetUrl returns the Url field value if set, zero value otherwise. func (o *UpdateMerchantWebhookRequest) GetUrl() string { if o == nil || common.IsNil(o.Url) { @@ -510,6 +510,9 @@ func (o UpdateMerchantWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.EncryptionProtocol) { + toSerialize["encryptionProtocol"] = o.EncryptionProtocol + } if !common.IsNil(o.NetworkType) { toSerialize["networkType"] = o.NetworkType } @@ -519,9 +522,6 @@ func (o UpdateMerchantWebhookRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PopulateSoapActionHeader) { toSerialize["populateSoapActionHeader"] = o.PopulateSoapActionHeader } - if !common.IsNil(o.SslVersion) { - toSerialize["sslVersion"] = o.SslVersion - } if !common.IsNil(o.Url) { toSerialize["url"] = o.Url } @@ -576,19 +576,19 @@ func (o *UpdateMerchantWebhookRequest) isValidCommunicationFormat() bool { } return false } -func (o *UpdateMerchantWebhookRequest) isValidNetworkType() bool { - var allowedEnumValues = []string{"local", "public"} +func (o *UpdateMerchantWebhookRequest) isValidEncryptionProtocol() bool { + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { - if o.GetNetworkType() == allowed { + if o.GetEncryptionProtocol() == allowed { return true } } return false } -func (o *UpdateMerchantWebhookRequest) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} +func (o *UpdateMerchantWebhookRequest) isValidNetworkType() bool { + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { - if o.GetSslVersion() == allowed { + if o.GetNetworkType() == allowed { return true } } diff --git a/src/management/model_update_payment_method_info.go b/src/management/model_update_payment_method_info.go index 86cbe8377..6a64f355a 100644 --- a/src/management/model_update_payment_method_info.go +++ b/src/management/model_update_payment_method_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,13 +22,24 @@ type UpdatePaymentMethodInfo struct { Bcmc *BcmcInfo `json:"bcmc,omitempty"` CartesBancaires *CartesBancairesInfo `json:"cartesBancaires,omitempty"` // The list of countries where a payment method is available. By default, all countries supported by the payment method. - Countries []string `json:"countries,omitempty"` + Countries []string `json:"countries,omitempty"` + Cup *GenericPmWithTdiInfo `json:"cup,omitempty"` // The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - Currencies []string `json:"currencies,omitempty"` + Currencies []string `json:"currencies,omitempty"` + Diners *GenericPmWithTdiInfo `json:"diners,omitempty"` + Discover *GenericPmWithTdiInfo `json:"discover,omitempty"` + EftposAustralia *GenericPmWithTdiInfo `json:"eftpos_australia,omitempty"` // Indicates whether the payment method is enabled (**true**) or disabled (**false**). - Enabled *bool `json:"enabled,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Girocard *GenericPmWithTdiInfo `json:"girocard,omitempty"` + Ideal *GenericPmWithTdiInfo `json:"ideal,omitempty"` + InteracCard *GenericPmWithTdiInfo `json:"interac_card,omitempty"` + Jcb *GenericPmWithTdiInfo `json:"jcb,omitempty"` + Maestro *GenericPmWithTdiInfo `json:"maestro,omitempty"` + Mc *GenericPmWithTdiInfo `json:"mc,omitempty"` // The list of stores for this payment method - StoreIds []string `json:"storeIds,omitempty"` + StoreIds []string `json:"storeIds,omitempty"` + Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` } // NewUpdatePaymentMethodInfo instantiates a new UpdatePaymentMethodInfo object @@ -144,6 +155,38 @@ func (o *UpdatePaymentMethodInfo) SetCountries(v []string) { o.Countries = v } +// GetCup returns the Cup field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetCup() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Cup) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Cup +} + +// GetCupOk returns a tuple with the Cup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetCupOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Cup) { + return nil, false + } + return o.Cup, true +} + +// HasCup returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasCup() bool { + if o != nil && !common.IsNil(o.Cup) { + return true + } + + return false +} + +// SetCup gets a reference to the given GenericPmWithTdiInfo and assigns it to the Cup field. +func (o *UpdatePaymentMethodInfo) SetCup(v GenericPmWithTdiInfo) { + o.Cup = &v +} + // GetCurrencies returns the Currencies field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetCurrencies() []string { if o == nil || common.IsNil(o.Currencies) { @@ -176,6 +219,102 @@ func (o *UpdatePaymentMethodInfo) SetCurrencies(v []string) { o.Currencies = v } +// GetDiners returns the Diners field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetDiners() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Diners) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Diners +} + +// GetDinersOk returns a tuple with the Diners field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetDinersOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Diners) { + return nil, false + } + return o.Diners, true +} + +// HasDiners returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasDiners() bool { + if o != nil && !common.IsNil(o.Diners) { + return true + } + + return false +} + +// SetDiners gets a reference to the given GenericPmWithTdiInfo and assigns it to the Diners field. +func (o *UpdatePaymentMethodInfo) SetDiners(v GenericPmWithTdiInfo) { + o.Diners = &v +} + +// GetDiscover returns the Discover field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetDiscover() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Discover) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Discover +} + +// GetDiscoverOk returns a tuple with the Discover field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetDiscoverOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Discover) { + return nil, false + } + return o.Discover, true +} + +// HasDiscover returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasDiscover() bool { + if o != nil && !common.IsNil(o.Discover) { + return true + } + + return false +} + +// SetDiscover gets a reference to the given GenericPmWithTdiInfo and assigns it to the Discover field. +func (o *UpdatePaymentMethodInfo) SetDiscover(v GenericPmWithTdiInfo) { + o.Discover = &v +} + +// GetEftposAustralia returns the EftposAustralia field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetEftposAustralia() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.EftposAustralia) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.EftposAustralia +} + +// GetEftposAustraliaOk returns a tuple with the EftposAustralia field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetEftposAustraliaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.EftposAustralia) { + return nil, false + } + return o.EftposAustralia, true +} + +// HasEftposAustralia returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasEftposAustralia() bool { + if o != nil && !common.IsNil(o.EftposAustralia) { + return true + } + + return false +} + +// SetEftposAustralia gets a reference to the given GenericPmWithTdiInfo and assigns it to the EftposAustralia field. +func (o *UpdatePaymentMethodInfo) SetEftposAustralia(v GenericPmWithTdiInfo) { + o.EftposAustralia = &v +} + // GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetEnabled() bool { if o == nil || common.IsNil(o.Enabled) { @@ -208,6 +347,198 @@ func (o *UpdatePaymentMethodInfo) SetEnabled(v bool) { o.Enabled = &v } +// GetGirocard returns the Girocard field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetGirocard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Girocard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Girocard +} + +// GetGirocardOk returns a tuple with the Girocard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetGirocardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Girocard) { + return nil, false + } + return o.Girocard, true +} + +// HasGirocard returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasGirocard() bool { + if o != nil && !common.IsNil(o.Girocard) { + return true + } + + return false +} + +// SetGirocard gets a reference to the given GenericPmWithTdiInfo and assigns it to the Girocard field. +func (o *UpdatePaymentMethodInfo) SetGirocard(v GenericPmWithTdiInfo) { + o.Girocard = &v +} + +// GetIdeal returns the Ideal field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetIdeal() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Ideal) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Ideal +} + +// GetIdealOk returns a tuple with the Ideal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetIdealOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Ideal) { + return nil, false + } + return o.Ideal, true +} + +// HasIdeal returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasIdeal() bool { + if o != nil && !common.IsNil(o.Ideal) { + return true + } + + return false +} + +// SetIdeal gets a reference to the given GenericPmWithTdiInfo and assigns it to the Ideal field. +func (o *UpdatePaymentMethodInfo) SetIdeal(v GenericPmWithTdiInfo) { + o.Ideal = &v +} + +// GetInteracCard returns the InteracCard field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetInteracCard() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.InteracCard) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.InteracCard +} + +// GetInteracCardOk returns a tuple with the InteracCard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetInteracCardOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.InteracCard) { + return nil, false + } + return o.InteracCard, true +} + +// HasInteracCard returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasInteracCard() bool { + if o != nil && !common.IsNil(o.InteracCard) { + return true + } + + return false +} + +// SetInteracCard gets a reference to the given GenericPmWithTdiInfo and assigns it to the InteracCard field. +func (o *UpdatePaymentMethodInfo) SetInteracCard(v GenericPmWithTdiInfo) { + o.InteracCard = &v +} + +// GetJcb returns the Jcb field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetJcb() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Jcb) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Jcb +} + +// GetJcbOk returns a tuple with the Jcb field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetJcbOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Jcb) { + return nil, false + } + return o.Jcb, true +} + +// HasJcb returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasJcb() bool { + if o != nil && !common.IsNil(o.Jcb) { + return true + } + + return false +} + +// SetJcb gets a reference to the given GenericPmWithTdiInfo and assigns it to the Jcb field. +func (o *UpdatePaymentMethodInfo) SetJcb(v GenericPmWithTdiInfo) { + o.Jcb = &v +} + +// GetMaestro returns the Maestro field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetMaestro() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Maestro) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Maestro +} + +// GetMaestroOk returns a tuple with the Maestro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetMaestroOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Maestro) { + return nil, false + } + return o.Maestro, true +} + +// HasMaestro returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasMaestro() bool { + if o != nil && !common.IsNil(o.Maestro) { + return true + } + + return false +} + +// SetMaestro gets a reference to the given GenericPmWithTdiInfo and assigns it to the Maestro field. +func (o *UpdatePaymentMethodInfo) SetMaestro(v GenericPmWithTdiInfo) { + o.Maestro = &v +} + +// GetMc returns the Mc field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetMc() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Mc) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Mc +} + +// GetMcOk returns a tuple with the Mc field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetMcOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Mc) { + return nil, false + } + return o.Mc, true +} + +// HasMc returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasMc() bool { + if o != nil && !common.IsNil(o.Mc) { + return true + } + + return false +} + +// SetMc gets a reference to the given GenericPmWithTdiInfo and assigns it to the Mc field. +func (o *UpdatePaymentMethodInfo) SetMc(v GenericPmWithTdiInfo) { + o.Mc = &v +} + // GetStoreIds returns the StoreIds field value if set, zero value otherwise. func (o *UpdatePaymentMethodInfo) GetStoreIds() []string { if o == nil || common.IsNil(o.StoreIds) { @@ -240,6 +571,38 @@ func (o *UpdatePaymentMethodInfo) SetStoreIds(v []string) { o.StoreIds = v } +// GetVisa returns the Visa field value if set, zero value otherwise. +func (o *UpdatePaymentMethodInfo) GetVisa() GenericPmWithTdiInfo { + if o == nil || common.IsNil(o.Visa) { + var ret GenericPmWithTdiInfo + return ret + } + return *o.Visa +} + +// GetVisaOk returns a tuple with the Visa field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePaymentMethodInfo) GetVisaOk() (*GenericPmWithTdiInfo, bool) { + if o == nil || common.IsNil(o.Visa) { + return nil, false + } + return o.Visa, true +} + +// HasVisa returns a boolean if a field has been set. +func (o *UpdatePaymentMethodInfo) HasVisa() bool { + if o != nil && !common.IsNil(o.Visa) { + return true + } + + return false +} + +// SetVisa gets a reference to the given GenericPmWithTdiInfo and assigns it to the Visa field. +func (o *UpdatePaymentMethodInfo) SetVisa(v GenericPmWithTdiInfo) { + o.Visa = &v +} + func (o UpdatePaymentMethodInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -259,15 +622,48 @@ func (o UpdatePaymentMethodInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Countries) { toSerialize["countries"] = o.Countries } + if !common.IsNil(o.Cup) { + toSerialize["cup"] = o.Cup + } if !common.IsNil(o.Currencies) { toSerialize["currencies"] = o.Currencies } + if !common.IsNil(o.Diners) { + toSerialize["diners"] = o.Diners + } + if !common.IsNil(o.Discover) { + toSerialize["discover"] = o.Discover + } + if !common.IsNil(o.EftposAustralia) { + toSerialize["eftpos_australia"] = o.EftposAustralia + } if !common.IsNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } + if !common.IsNil(o.Girocard) { + toSerialize["girocard"] = o.Girocard + } + if !common.IsNil(o.Ideal) { + toSerialize["ideal"] = o.Ideal + } + if !common.IsNil(o.InteracCard) { + toSerialize["interac_card"] = o.InteracCard + } + if !common.IsNil(o.Jcb) { + toSerialize["jcb"] = o.Jcb + } + if !common.IsNil(o.Maestro) { + toSerialize["maestro"] = o.Maestro + } + if !common.IsNil(o.Mc) { + toSerialize["mc"] = o.Mc + } if !common.IsNil(o.StoreIds) { toSerialize["storeIds"] = o.StoreIds } + if !common.IsNil(o.Visa) { + toSerialize["visa"] = o.Visa + } return toSerialize, nil } diff --git a/src/management/model_update_payout_settings_request.go b/src/management/model_update_payout_settings_request.go index f79e2c515..9701eaedb 100644 --- a/src/management/model_update_payout_settings_request.go +++ b/src/management/model_update_payout_settings_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_split_configuration_logic_request.go b/src/management/model_update_split_configuration_logic_request.go index 14b39b581..7db7ef053 100644 --- a/src/management/model_update_split_configuration_logic_request.go +++ b/src/management/model_update_split_configuration_logic_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,14 +19,28 @@ var _ common.MappedNullable = &UpdateSplitConfigurationLogicRequest{} // UpdateSplitConfigurationLogicRequest struct for UpdateSplitConfigurationLogicRequest type UpdateSplitConfigurationLogicRequest struct { + // Specifies the logic to apply when booking the transaction fees. Should be combined with adyenFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AcquiringFees *string `json:"acquiringFees,omitempty"` AdditionalCommission *AdditionalCommission `json:"additionalCommission,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, interchange & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenCommission *string `json:"adyenCommission,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with acquiringFees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenFees *string `json:"adyenFees,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & interchange. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + AdyenMarkup *string `json:"adyenMarkup,omitempty"` // Specifies the logic to apply when booking the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - Chargeback *string `json:"chargeback,omitempty"` - Commission Commission `json:"commission"` - // Specifies the logic to apply when booking the transaction fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - PaymentFee string `json:"paymentFee"` + Chargeback *string `json:"chargeback,omitempty"` + // Specifies the logic to apply when allocating the chargeback costs. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** + ChargebackCostAllocation *string `json:"chargebackCostAllocation,omitempty"` + Commission Commission `json:"commission"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with schemeFee, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + Interchange *string `json:"interchange,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Cannot be combined with other fees. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + PaymentFee *string `json:"paymentFee,omitempty"` // Specifies the logic to apply when booking the amount left over after currency conversion. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. Remainder *string `json:"remainder,omitempty"` + // Specifies the logic to apply when booking the transaction fees. Should be combined with interchange, adyenCommission & adyenMarkup. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. + SchemeFee *string `json:"schemeFee,omitempty"` // Unique identifier of the split logic that is applied when the split configuration conditions are met. SplitLogicId *string `json:"splitLogicId,omitempty"` // Specifies the logic to apply when booking the surcharge amount. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** @@ -39,10 +53,9 @@ type UpdateSplitConfigurationLogicRequest 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 NewUpdateSplitConfigurationLogicRequest(commission Commission, paymentFee string) *UpdateSplitConfigurationLogicRequest { +func NewUpdateSplitConfigurationLogicRequest(commission Commission) *UpdateSplitConfigurationLogicRequest { this := UpdateSplitConfigurationLogicRequest{} this.Commission = commission - this.PaymentFee = paymentFee return &this } @@ -54,6 +67,38 @@ func NewUpdateSplitConfigurationLogicRequestWithDefaults() *UpdateSplitConfigura return &this } +// GetAcquiringFees returns the AcquiringFees field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetAcquiringFees() string { + if o == nil || common.IsNil(o.AcquiringFees) { + var ret string + return ret + } + return *o.AcquiringFees +} + +// GetAcquiringFeesOk returns a tuple with the AcquiringFees field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetAcquiringFeesOk() (*string, bool) { + if o == nil || common.IsNil(o.AcquiringFees) { + return nil, false + } + return o.AcquiringFees, true +} + +// HasAcquiringFees returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasAcquiringFees() bool { + if o != nil && !common.IsNil(o.AcquiringFees) { + return true + } + + return false +} + +// SetAcquiringFees gets a reference to the given string and assigns it to the AcquiringFees field. +func (o *UpdateSplitConfigurationLogicRequest) SetAcquiringFees(v string) { + o.AcquiringFees = &v +} + // GetAdditionalCommission returns the AdditionalCommission field value if set, zero value otherwise. func (o *UpdateSplitConfigurationLogicRequest) GetAdditionalCommission() AdditionalCommission { if o == nil || common.IsNil(o.AdditionalCommission) { @@ -86,6 +131,102 @@ func (o *UpdateSplitConfigurationLogicRequest) SetAdditionalCommission(v Additio o.AdditionalCommission = &v } +// GetAdyenCommission returns the AdyenCommission field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenCommission() string { + if o == nil || common.IsNil(o.AdyenCommission) { + var ret string + return ret + } + return *o.AdyenCommission +} + +// GetAdyenCommissionOk returns a tuple with the AdyenCommission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenCommissionOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenCommission) { + return nil, false + } + return o.AdyenCommission, true +} + +// HasAdyenCommission returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasAdyenCommission() bool { + if o != nil && !common.IsNil(o.AdyenCommission) { + return true + } + + return false +} + +// SetAdyenCommission gets a reference to the given string and assigns it to the AdyenCommission field. +func (o *UpdateSplitConfigurationLogicRequest) SetAdyenCommission(v string) { + o.AdyenCommission = &v +} + +// GetAdyenFees returns the AdyenFees field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenFees() string { + if o == nil || common.IsNil(o.AdyenFees) { + var ret string + return ret + } + return *o.AdyenFees +} + +// GetAdyenFeesOk returns a tuple with the AdyenFees field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenFeesOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenFees) { + return nil, false + } + return o.AdyenFees, true +} + +// HasAdyenFees returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasAdyenFees() bool { + if o != nil && !common.IsNil(o.AdyenFees) { + return true + } + + return false +} + +// SetAdyenFees gets a reference to the given string and assigns it to the AdyenFees field. +func (o *UpdateSplitConfigurationLogicRequest) SetAdyenFees(v string) { + o.AdyenFees = &v +} + +// GetAdyenMarkup returns the AdyenMarkup field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenMarkup() string { + if o == nil || common.IsNil(o.AdyenMarkup) { + var ret string + return ret + } + return *o.AdyenMarkup +} + +// GetAdyenMarkupOk returns a tuple with the AdyenMarkup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetAdyenMarkupOk() (*string, bool) { + if o == nil || common.IsNil(o.AdyenMarkup) { + return nil, false + } + return o.AdyenMarkup, true +} + +// HasAdyenMarkup returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasAdyenMarkup() bool { + if o != nil && !common.IsNil(o.AdyenMarkup) { + return true + } + + return false +} + +// SetAdyenMarkup gets a reference to the given string and assigns it to the AdyenMarkup field. +func (o *UpdateSplitConfigurationLogicRequest) SetAdyenMarkup(v string) { + o.AdyenMarkup = &v +} + // GetChargeback returns the Chargeback field value if set, zero value otherwise. func (o *UpdateSplitConfigurationLogicRequest) GetChargeback() string { if o == nil || common.IsNil(o.Chargeback) { @@ -118,6 +259,38 @@ func (o *UpdateSplitConfigurationLogicRequest) SetChargeback(v string) { o.Chargeback = &v } +// GetChargebackCostAllocation returns the ChargebackCostAllocation field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetChargebackCostAllocation() string { + if o == nil || common.IsNil(o.ChargebackCostAllocation) { + var ret string + return ret + } + return *o.ChargebackCostAllocation +} + +// GetChargebackCostAllocationOk returns a tuple with the ChargebackCostAllocation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetChargebackCostAllocationOk() (*string, bool) { + if o == nil || common.IsNil(o.ChargebackCostAllocation) { + return nil, false + } + return o.ChargebackCostAllocation, true +} + +// HasChargebackCostAllocation returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasChargebackCostAllocation() bool { + if o != nil && !common.IsNil(o.ChargebackCostAllocation) { + return true + } + + return false +} + +// SetChargebackCostAllocation gets a reference to the given string and assigns it to the ChargebackCostAllocation field. +func (o *UpdateSplitConfigurationLogicRequest) SetChargebackCostAllocation(v string) { + o.ChargebackCostAllocation = &v +} + // GetCommission returns the Commission field value func (o *UpdateSplitConfigurationLogicRequest) GetCommission() Commission { if o == nil { @@ -142,28 +315,68 @@ func (o *UpdateSplitConfigurationLogicRequest) SetCommission(v Commission) { o.Commission = v } -// GetPaymentFee returns the PaymentFee field value -func (o *UpdateSplitConfigurationLogicRequest) GetPaymentFee() string { - if o == nil { +// GetInterchange returns the Interchange field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetInterchange() string { + if o == nil || common.IsNil(o.Interchange) { var ret string return ret } + return *o.Interchange +} + +// GetInterchangeOk returns a tuple with the Interchange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetInterchangeOk() (*string, bool) { + if o == nil || common.IsNil(o.Interchange) { + return nil, false + } + return o.Interchange, true +} + +// HasInterchange returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasInterchange() bool { + if o != nil && !common.IsNil(o.Interchange) { + return true + } + + return false +} + +// SetInterchange gets a reference to the given string and assigns it to the Interchange field. +func (o *UpdateSplitConfigurationLogicRequest) SetInterchange(v string) { + o.Interchange = &v +} - return o.PaymentFee +// GetPaymentFee returns the PaymentFee field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetPaymentFee() string { + if o == nil || common.IsNil(o.PaymentFee) { + var ret string + return ret + } + return *o.PaymentFee } -// GetPaymentFeeOk returns a tuple with the PaymentFee field value +// GetPaymentFeeOk returns a tuple with the PaymentFee field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateSplitConfigurationLogicRequest) GetPaymentFeeOk() (*string, bool) { - if o == nil { + if o == nil || common.IsNil(o.PaymentFee) { return nil, false } - return &o.PaymentFee, true + return o.PaymentFee, true +} + +// HasPaymentFee returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasPaymentFee() bool { + if o != nil && !common.IsNil(o.PaymentFee) { + return true + } + + return false } -// SetPaymentFee sets field value +// SetPaymentFee gets a reference to the given string and assigns it to the PaymentFee field. func (o *UpdateSplitConfigurationLogicRequest) SetPaymentFee(v string) { - o.PaymentFee = v + o.PaymentFee = &v } // GetRemainder returns the Remainder field value if set, zero value otherwise. @@ -198,6 +411,38 @@ func (o *UpdateSplitConfigurationLogicRequest) SetRemainder(v string) { o.Remainder = &v } +// GetSchemeFee returns the SchemeFee field value if set, zero value otherwise. +func (o *UpdateSplitConfigurationLogicRequest) GetSchemeFee() string { + if o == nil || common.IsNil(o.SchemeFee) { + var ret string + return ret + } + return *o.SchemeFee +} + +// GetSchemeFeeOk returns a tuple with the SchemeFee field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateSplitConfigurationLogicRequest) GetSchemeFeeOk() (*string, bool) { + if o == nil || common.IsNil(o.SchemeFee) { + return nil, false + } + return o.SchemeFee, true +} + +// HasSchemeFee returns a boolean if a field has been set. +func (o *UpdateSplitConfigurationLogicRequest) HasSchemeFee() bool { + if o != nil && !common.IsNil(o.SchemeFee) { + return true + } + + return false +} + +// SetSchemeFee gets a reference to the given string and assigns it to the SchemeFee field. +func (o *UpdateSplitConfigurationLogicRequest) SetSchemeFee(v string) { + o.SchemeFee = &v +} + // GetSplitLogicId returns the SplitLogicId field value if set, zero value otherwise. func (o *UpdateSplitConfigurationLogicRequest) GetSplitLogicId() string { if o == nil || common.IsNil(o.SplitLogicId) { @@ -304,17 +549,40 @@ func (o UpdateSplitConfigurationLogicRequest) MarshalJSON() ([]byte, error) { func (o UpdateSplitConfigurationLogicRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcquiringFees) { + toSerialize["acquiringFees"] = o.AcquiringFees + } if !common.IsNil(o.AdditionalCommission) { toSerialize["additionalCommission"] = o.AdditionalCommission } + if !common.IsNil(o.AdyenCommission) { + toSerialize["adyenCommission"] = o.AdyenCommission + } + if !common.IsNil(o.AdyenFees) { + toSerialize["adyenFees"] = o.AdyenFees + } + if !common.IsNil(o.AdyenMarkup) { + toSerialize["adyenMarkup"] = o.AdyenMarkup + } if !common.IsNil(o.Chargeback) { toSerialize["chargeback"] = o.Chargeback } + if !common.IsNil(o.ChargebackCostAllocation) { + toSerialize["chargebackCostAllocation"] = o.ChargebackCostAllocation + } toSerialize["commission"] = o.Commission - toSerialize["paymentFee"] = o.PaymentFee + if !common.IsNil(o.Interchange) { + toSerialize["interchange"] = o.Interchange + } + if !common.IsNil(o.PaymentFee) { + toSerialize["paymentFee"] = o.PaymentFee + } if !common.IsNil(o.Remainder) { toSerialize["remainder"] = o.Remainder } + if !common.IsNil(o.SchemeFee) { + toSerialize["schemeFee"] = o.SchemeFee + } if !common.IsNil(o.SplitLogicId) { toSerialize["splitLogicId"] = o.SplitLogicId } @@ -363,6 +631,42 @@ func (v *NullableUpdateSplitConfigurationLogicRequest) UnmarshalJSON(src []byte) return json.Unmarshal(src, &v.value) } +func (o *UpdateSplitConfigurationLogicRequest) isValidAcquiringFees() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAcquiringFees() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidAdyenCommission() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenCommission() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidAdyenFees() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenFees() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidAdyenMarkup() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetAdyenMarkup() == allowed { + return true + } + } + return false +} func (o *UpdateSplitConfigurationLogicRequest) isValidChargeback() bool { var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount", "deductAccordingToSplitRatio"} for _, allowed := range allowedEnumValues { @@ -372,6 +676,24 @@ func (o *UpdateSplitConfigurationLogicRequest) isValidChargeback() bool { } return false } +func (o *UpdateSplitConfigurationLogicRequest) isValidChargebackCostAllocation() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetChargebackCostAllocation() == allowed { + return true + } + } + return false +} +func (o *UpdateSplitConfigurationLogicRequest) isValidInterchange() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetInterchange() == allowed { + return true + } + } + return false +} func (o *UpdateSplitConfigurationLogicRequest) isValidPaymentFee() bool { var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} for _, allowed := range allowedEnumValues { @@ -390,6 +712,15 @@ func (o *UpdateSplitConfigurationLogicRequest) isValidRemainder() bool { } return false } +func (o *UpdateSplitConfigurationLogicRequest) isValidSchemeFee() bool { + var allowedEnumValues = []string{"deductFromLiableAccount", "deductFromOneBalanceAccount"} + for _, allowed := range allowedEnumValues { + if o.GetSchemeFee() == allowed { + return true + } + } + return false +} func (o *UpdateSplitConfigurationLogicRequest) isValidSurcharge() bool { var allowedEnumValues = []string{"addToLiableAccount", "addToOneBalanceAccount"} for _, allowed := range allowedEnumValues { diff --git a/src/management/model_update_split_configuration_request.go b/src/management/model_update_split_configuration_request.go index a6a56cb79..493fdc898 100644 --- a/src/management/model_update_split_configuration_request.go +++ b/src/management/model_update_split_configuration_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_split_configuration_rule_request.go b/src/management/model_update_split_configuration_rule_request.go index 458911a33..f5ad8fb15 100644 --- a/src/management/model_update_split_configuration_rule_request.go +++ b/src/management/model_update_split_configuration_rule_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_update_store_request.go b/src/management/model_update_store_request.go index 347daee3f..fb35d4962 100644 --- a/src/management/model_update_store_request.go +++ b/src/management/model_update_store_request.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,7 +20,7 @@ var _ common.MappedNullable = &UpdateStoreRequest{} // UpdateStoreRequest struct for UpdateStoreRequest type UpdateStoreRequest struct { Address *UpdatableAddress `json:"address,omitempty"` - // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. + // The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. BusinessLineIds []string `json:"businessLineIds,omitempty"` // The description of the store. Description *string `json:"description,omitempty"` diff --git a/src/management/model_upload_android_app_response.go b/src/management/model_upload_android_app_response.go new file mode 100644 index 000000000..40c26297a --- /dev/null +++ b/src/management/model_upload_android_app_response.go @@ -0,0 +1,125 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the UploadAndroidAppResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UploadAndroidAppResponse{} + +// UploadAndroidAppResponse struct for UploadAndroidAppResponse +type UploadAndroidAppResponse struct { + // The unique identifier of the uploaded Android app. + Id *string `json:"id,omitempty"` +} + +// NewUploadAndroidAppResponse instantiates a new UploadAndroidAppResponse 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 NewUploadAndroidAppResponse() *UploadAndroidAppResponse { + this := UploadAndroidAppResponse{} + return &this +} + +// NewUploadAndroidAppResponseWithDefaults instantiates a new UploadAndroidAppResponse 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 NewUploadAndroidAppResponseWithDefaults() *UploadAndroidAppResponse { + this := UploadAndroidAppResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UploadAndroidAppResponse) 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 *UploadAndroidAppResponse) 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 *UploadAndroidAppResponse) 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 *UploadAndroidAppResponse) SetId(v string) { + o.Id = &v +} + +func (o UploadAndroidAppResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UploadAndroidAppResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableUploadAndroidAppResponse struct { + value *UploadAndroidAppResponse + isSet bool +} + +func (v NullableUploadAndroidAppResponse) Get() *UploadAndroidAppResponse { + return v.value +} + +func (v *NullableUploadAndroidAppResponse) Set(val *UploadAndroidAppResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUploadAndroidAppResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUploadAndroidAppResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUploadAndroidAppResponse(val *UploadAndroidAppResponse) *NullableUploadAndroidAppResponse { + return &NullableUploadAndroidAppResponse{value: val, isSet: true} +} + +func (v NullableUploadAndroidAppResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUploadAndroidAppResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_url.go b/src/management/model_url.go index 894880e1e..b93c9d917 100644 --- a/src/management/model_url.go +++ b/src/management/model_url.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_user.go b/src/management/model_user.go index 22820866f..9c78aae8d 100644 --- a/src/management/model_user.go +++ b/src/management/model_user.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_vipps_info.go b/src/management/model_vipps_info.go index 5128091b7..42bb01990 100644 --- a/src/management/model_vipps_info.go +++ b/src/management/model_vipps_info.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_webhook.go b/src/management/model_webhook.go index f5b08b5b3..c86ddfb2c 100644 --- a/src/management/model_webhook.go +++ b/src/management/model_webhook.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -37,6 +37,8 @@ type Webhook struct { CommunicationFormat string `json:"communicationFormat"` // Your description for this webhook configuration. Description *string `json:"description,omitempty"` + // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. + EncryptionProtocol *string `json:"encryptionProtocol,omitempty"` // Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. FilterMerchantAccountType *string `json:"filterMerchantAccountType,omitempty"` // A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. @@ -53,9 +55,7 @@ type Webhook struct { NetworkType *string `json:"networkType,omitempty"` // Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. PopulateSoapActionHeader *bool `json:"populateSoapActionHeader,omitempty"` - // SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - SslVersion *string `json:"sslVersion,omitempty"` - // The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). + // The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). Type string `json:"type"` // Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. Url string `json:"url"` @@ -388,6 +388,38 @@ func (o *Webhook) SetDescription(v string) { o.Description = &v } +// GetEncryptionProtocol returns the EncryptionProtocol field value if set, zero value otherwise. +func (o *Webhook) GetEncryptionProtocol() string { + if o == nil || common.IsNil(o.EncryptionProtocol) { + var ret string + return ret + } + return *o.EncryptionProtocol +} + +// GetEncryptionProtocolOk returns a tuple with the EncryptionProtocol field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Webhook) GetEncryptionProtocolOk() (*string, bool) { + if o == nil || common.IsNil(o.EncryptionProtocol) { + return nil, false + } + return o.EncryptionProtocol, true +} + +// HasEncryptionProtocol returns a boolean if a field has been set. +func (o *Webhook) HasEncryptionProtocol() bool { + if o != nil && !common.IsNil(o.EncryptionProtocol) { + return true + } + + return false +} + +// SetEncryptionProtocol gets a reference to the given string and assigns it to the EncryptionProtocol field. +func (o *Webhook) SetEncryptionProtocol(v string) { + o.EncryptionProtocol = &v +} + // GetFilterMerchantAccountType returns the FilterMerchantAccountType field value if set, zero value otherwise. func (o *Webhook) GetFilterMerchantAccountType() string { if o == nil || common.IsNil(o.FilterMerchantAccountType) { @@ -644,38 +676,6 @@ func (o *Webhook) SetPopulateSoapActionHeader(v bool) { o.PopulateSoapActionHeader = &v } -// GetSslVersion returns the SslVersion field value if set, zero value otherwise. -func (o *Webhook) GetSslVersion() string { - if o == nil || common.IsNil(o.SslVersion) { - var ret string - return ret - } - return *o.SslVersion -} - -// GetSslVersionOk returns a tuple with the SslVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Webhook) GetSslVersionOk() (*string, bool) { - if o == nil || common.IsNil(o.SslVersion) { - return nil, false - } - return o.SslVersion, true -} - -// HasSslVersion returns a boolean if a field has been set. -func (o *Webhook) HasSslVersion() bool { - if o != nil && !common.IsNil(o.SslVersion) { - return true - } - - return false -} - -// SetSslVersion gets a reference to the given string and assigns it to the SslVersion field. -func (o *Webhook) SetSslVersion(v string) { - o.SslVersion = &v -} - // GetType returns the Type field value func (o *Webhook) GetType() string { if o == nil { @@ -792,6 +792,9 @@ func (o Webhook) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } + if !common.IsNil(o.EncryptionProtocol) { + toSerialize["encryptionProtocol"] = o.EncryptionProtocol + } if !common.IsNil(o.FilterMerchantAccountType) { toSerialize["filterMerchantAccountType"] = o.FilterMerchantAccountType } @@ -816,9 +819,6 @@ func (o Webhook) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PopulateSoapActionHeader) { toSerialize["populateSoapActionHeader"] = o.PopulateSoapActionHeader } - if !common.IsNil(o.SslVersion) { - toSerialize["sslVersion"] = o.SslVersion - } toSerialize["type"] = o.Type toSerialize["url"] = o.Url if !common.IsNil(o.Username) { @@ -872,28 +872,28 @@ func (o *Webhook) isValidCommunicationFormat() bool { } return false } -func (o *Webhook) isValidFilterMerchantAccountType() bool { - var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} +func (o *Webhook) isValidEncryptionProtocol() bool { + var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} for _, allowed := range allowedEnumValues { - if o.GetFilterMerchantAccountType() == allowed { + if o.GetEncryptionProtocol() == allowed { return true } } return false } -func (o *Webhook) isValidNetworkType() bool { - var allowedEnumValues = []string{"local", "public"} +func (o *Webhook) isValidFilterMerchantAccountType() bool { + var allowedEnumValues = []string{"allAccounts", "excludeAccounts", "includeAccounts"} for _, allowed := range allowedEnumValues { - if o.GetNetworkType() == allowed { + if o.GetFilterMerchantAccountType() == allowed { return true } } return false } -func (o *Webhook) isValidSslVersion() bool { - var allowedEnumValues = []string{"HTTP", "TLSv1.2", "TLSv1.3"} +func (o *Webhook) isValidNetworkType() bool { + var allowedEnumValues = []string{"local", "public"} for _, allowed := range allowedEnumValues { - if o.GetSslVersion() == allowed { + if o.GetNetworkType() == allowed { return true } } diff --git a/src/management/model_webhook_links.go b/src/management/model_webhook_links.go index b4cba88fd..fa88fae3c 100644 --- a/src/management/model_webhook_links.go +++ b/src/management/model_webhook_links.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/management/model_wifi_profiles.go b/src/management/model_wifi_profiles.go index 6e2657c25..5e5e9aa99 100644 --- a/src/management/model_wifi_profiles.go +++ b/src/management/model_wifi_profiles.go @@ -1,7 +1,7 @@ /* Management API -API version: 1 +API version: 3 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/managementwebhook/model_notification_data_message.go b/src/managementwebhook/model_notification_data_message.go new file mode 100644 index 000000000..6841ad2a2 --- /dev/null +++ b/src/managementwebhook/model_notification_data_message.go @@ -0,0 +1,200 @@ +/* +Management Webhooks + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package managementwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v7/src/common" +) + +// checks if the NotificationDataMessage type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NotificationDataMessage{} + +// NotificationDataMessage struct for NotificationDataMessage +type NotificationDataMessage struct { + // Timestamp for when the webhook was created. + CreatedAt time.Time `json:"createdAt"` + Data MidServiceNotificationData `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // Type of notification. + Type string `json:"type"` +} + +// NewNotificationDataMessage instantiates a new NotificationDataMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNotificationDataMessage(createdAt time.Time, data MidServiceNotificationData, environment string, type_ string) *NotificationDataMessage { + this := NotificationDataMessage{} + this.CreatedAt = createdAt + this.Data = data + this.Environment = environment + this.Type = type_ + return &this +} + +// NewNotificationDataMessageWithDefaults instantiates a new NotificationDataMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNotificationDataMessageWithDefaults() *NotificationDataMessage { + this := NotificationDataMessage{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *NotificationDataMessage) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *NotificationDataMessage) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *NotificationDataMessage) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetData returns the Data field value +func (o *NotificationDataMessage) GetData() MidServiceNotificationData { + if o == nil { + var ret MidServiceNotificationData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *NotificationDataMessage) GetDataOk() (*MidServiceNotificationData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *NotificationDataMessage) SetData(v MidServiceNotificationData) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *NotificationDataMessage) GetEnvironment() string { + if o == nil { + var ret string + return ret + } + + return o.Environment +} + +// GetEnvironmentOk returns a tuple with the Environment field value +// and a boolean to check if the value has been set. +func (o *NotificationDataMessage) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *NotificationDataMessage) SetEnvironment(v string) { + o.Environment = v +} + +// GetType returns the Type field value +func (o *NotificationDataMessage) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NotificationDataMessage) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NotificationDataMessage) SetType(v string) { + o.Type = v +} + +func (o NotificationDataMessage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotificationDataMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableNotificationDataMessage struct { + value *NotificationDataMessage + isSet bool +} + +func (v NullableNotificationDataMessage) Get() *NotificationDataMessage { + return v.value +} + +func (v *NullableNotificationDataMessage) Set(val *NotificationDataMessage) { + v.value = val + v.isSet = true +} + +func (v NullableNotificationDataMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableNotificationDataMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotificationDataMessage(val *NotificationDataMessage) *NullableNotificationDataMessage { + return &NullableNotificationDataMessage{value: val, isSet: true} +} + +func (v NullableNotificationDataMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotificationDataMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/.openapi-generator/VERSION b/src/transfers/.openapi-generator/VERSION deleted file mode 100644 index 4be2c727a..000000000 --- a/src/transfers/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.5.0 \ No newline at end of file diff --git a/src/transfers/api_capital.go b/src/transfers/api_capital.go index 1e4f8ffb7..5293c32ce 100644 --- a/src/transfers/api_capital.go +++ b/src/transfers/api_capital.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/api_transactions.go b/src/transfers/api_transactions.go index b675f3237..c55b469da 100644 --- a/src/transfers/api_transactions.go +++ b/src/transfers/api_transactions.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -47,25 +47,25 @@ func (r TransactionsApiGetAllTransactionsInput) CreatedUntil(createdUntil time.T return r } -// Unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). +// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. func (r TransactionsApiGetAllTransactionsInput) BalancePlatform(balancePlatform string) TransactionsApiGetAllTransactionsInput { r.balancePlatform = &balancePlatform return r } -// Unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). +// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. func (r TransactionsApiGetAllTransactionsInput) PaymentInstrumentId(paymentInstrumentId string) TransactionsApiGetAllTransactionsInput { r.paymentInstrumentId = &paymentInstrumentId return r } -// Unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). +// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. func (r TransactionsApiGetAllTransactionsInput) AccountHolderId(accountHolderId string) TransactionsApiGetAllTransactionsInput { r.accountHolderId = &accountHolderId return r } -// Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). +// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. func (r TransactionsApiGetAllTransactionsInput) BalanceAccountId(balanceAccountId string) TransactionsApiGetAllTransactionsInput { r.balanceAccountId = &balanceAccountId return r @@ -95,11 +95,18 @@ func (a *TransactionsApi) GetAllTransactionsInput() TransactionsApiGetAllTransac /* GetAllTransactions Get all transactions -Returns all transactions related to a balance account with a payment instrument of type **bankAccount**. +>Versions 1 and 2 of the Transfers API are deprecated. If you are just starting your implementation, use the latest version. + +Returns all the transactions related to a balance account, account holder, or balance platform. + +When making this request, you must include at least one of the following: +- `balanceAccountId` +- `accountHolderId` +- `balancePlatform`. + +This endpoint supports cursor-based pagination. The response returns the first page of results, and returns links to the next and previous pages when applicable. You can use the links to page through the results. -This endpoint supports cursor-based pagination. The response returns the first page of results, and returns links to the next page when applicable. You can use the links to page through the results. The response also returns links to the previous page when applicable. -Provide either `balanceAccountId`, `accountHolderId`, or `balancePlatform` when using this endpoint. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r TransactionsApiGetAllTransactionsInput - Request parameters, see GetAllTransactionsInput @@ -209,6 +216,8 @@ func (a *TransactionsApi) GetTransactionInput(id string) TransactionsApiGetTrans /* GetTransaction Get a transaction +>Versions 1 and 2 of the Transfers API are deprecated. If you are just starting your implementation, use the latest version. + Returns a transaction. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/src/transfers/api_transfers.go b/src/transfers/api_transfers.go index 34845be88..b8779cca3 100644 --- a/src/transfers/api_transfers.go +++ b/src/transfers/api_transfers.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/url" + "strings" "github.com/adyen/adyen-go-api-library/v7/src/common" ) @@ -21,9 +22,109 @@ import ( // TransfersApi service type TransfersApi common.Service +// All parameters accepted by TransfersApi.ReturnTransfer +type TransfersApiReturnTransferInput struct { + id string + returnTransferRequest *ReturnTransferRequest +} + +func (r TransfersApiReturnTransferInput) ReturnTransferRequest(returnTransferRequest ReturnTransferRequest) TransfersApiReturnTransferInput { + r.returnTransferRequest = &returnTransferRequest + return r +} + +/* +Prepare a request for ReturnTransfer +@param id The unique identifier of the transfer to be returned. +@return TransfersApiReturnTransferInput +*/ +func (a *TransfersApi) ReturnTransferInput(id string) TransfersApiReturnTransferInput { + return TransfersApiReturnTransferInput{ + id: id, + } +} + +/* +ReturnTransfer Return a transfer + +Returns previously transferred funds without creating a new `transferId`. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TransfersApiReturnTransferInput - Request parameters, see ReturnTransferInput +@return ReturnTransferResponse, *http.Response, error +*/ +func (a *TransfersApi) ReturnTransfer(ctx context.Context, r TransfersApiReturnTransferInput) (ReturnTransferResponse, *http.Response, error) { + res := &ReturnTransferResponse{} + path := "/transfers/{id}/returns" + 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.returnTransferRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + // All parameters accepted by TransfersApi.TransferFunds type TransfersApiTransferFundsInput struct { - transferInfo *TransferInfo + wWWAuthenticate *string + transferInfo *TransferInfo +} + +// Header for authenticating through SCA +func (r TransfersApiTransferFundsInput) WWWAuthenticate(wWWAuthenticate string) TransfersApiTransferFundsInput { + r.wWWAuthenticate = &wWWAuthenticate + return r } func (r TransfersApiTransferFundsInput) TransferInfo(transferInfo TransferInfo) TransfersApiTransferFundsInput { @@ -43,6 +144,8 @@ func (a *TransfersApi) TransferFundsInput() TransfersApiTransferFundsInput { /* TransferFunds Transfer funds +>Versions 1 and 2 of the Transfers API are deprecated. If you are just starting your implementation, use the latest version. + Starts a request to transfer funds to [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts), [transfer instruments](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments), or third-party bank accounts. Adyen sends the outcome of the transfer request through webhooks. To use this endpoint, you need an additional role for your API credential and transfers must be enabled for the source balance account. Your Adyen contact will set these up for you. @@ -56,6 +159,9 @@ func (a *TransfersApi) TransferFunds(ctx context.Context, r TransfersApiTransfer path := "/transfers" 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, diff --git a/src/transfers/client.go b/src/transfers/client.go index 3ff2e6ec9..fc816eb31 100644 --- a/src/transfers/client.go +++ b/src/transfers/client.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,7 +12,7 @@ import ( "github.com/adyen/adyen-go-api-library/v7/src/common" ) -// APIClient manages communication with the Transfers API API v3 +// APIClient manages communication with the Transfers API API v4 // 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. diff --git a/src/transfers/model_additional_bank_identification.go b/src/transfers/model_additional_bank_identification.go index b37f70c02..f3788b1f8 100644 --- a/src/transfers/model_additional_bank_identification.go +++ b/src/transfers/model_additional_bank_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_address_2.go b/src/transfers/model_address.go similarity index 74% rename from src/transfers/model_address_2.go rename to src/transfers/model_address.go index d324610f1..6a2d0aba5 100644 --- a/src/transfers/model_address_2.go +++ b/src/transfers/model_address.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ import ( "github.com/adyen/adyen-go-api-library/v7/src/common" ) -// checks if the Address2 type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Address2{} +// checks if the Address type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Address{} -// Address2 struct for Address2 -type Address2 struct { +// Address struct for Address +type Address struct { // The name of the city. City *string `json:"city,omitempty"` // The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. @@ -33,26 +33,26 @@ type Address2 struct { StateOrProvince *string `json:"stateOrProvince,omitempty"` } -// NewAddress2 instantiates a new Address2 object +// NewAddress instantiates a new Address 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 NewAddress2(country string) *Address2 { - this := Address2{} +func NewAddress(country string) *Address { + this := Address{} this.Country = country return &this } -// NewAddress2WithDefaults instantiates a new Address2 object +// NewAddressWithDefaults instantiates a new Address 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 NewAddress2WithDefaults() *Address2 { - this := Address2{} +func NewAddressWithDefaults() *Address { + this := Address{} return &this } // GetCity returns the City field value if set, zero value otherwise. -func (o *Address2) GetCity() string { +func (o *Address) GetCity() string { if o == nil || common.IsNil(o.City) { var ret string return ret @@ -62,7 +62,7 @@ func (o *Address2) GetCity() string { // GetCityOk returns a tuple with the City field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Address2) GetCityOk() (*string, bool) { +func (o *Address) GetCityOk() (*string, bool) { if o == nil || common.IsNil(o.City) { return nil, false } @@ -70,7 +70,7 @@ func (o *Address2) GetCityOk() (*string, bool) { } // HasCity returns a boolean if a field has been set. -func (o *Address2) HasCity() bool { +func (o *Address) HasCity() bool { if o != nil && !common.IsNil(o.City) { return true } @@ -79,12 +79,12 @@ func (o *Address2) HasCity() bool { } // SetCity gets a reference to the given string and assigns it to the City field. -func (o *Address2) SetCity(v string) { +func (o *Address) SetCity(v string) { o.City = &v } // GetCountry returns the Country field value -func (o *Address2) GetCountry() string { +func (o *Address) GetCountry() string { if o == nil { var ret string return ret @@ -95,7 +95,7 @@ func (o *Address2) GetCountry() string { // GetCountryOk returns a tuple with the Country field value // and a boolean to check if the value has been set. -func (o *Address2) GetCountryOk() (*string, bool) { +func (o *Address) GetCountryOk() (*string, bool) { if o == nil { return nil, false } @@ -103,12 +103,12 @@ func (o *Address2) GetCountryOk() (*string, bool) { } // SetCountry sets field value -func (o *Address2) SetCountry(v string) { +func (o *Address) SetCountry(v string) { o.Country = v } // GetLine1 returns the Line1 field value if set, zero value otherwise. -func (o *Address2) GetLine1() string { +func (o *Address) GetLine1() string { if o == nil || common.IsNil(o.Line1) { var ret string return ret @@ -118,7 +118,7 @@ func (o *Address2) GetLine1() string { // 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 *Address2) GetLine1Ok() (*string, bool) { +func (o *Address) GetLine1Ok() (*string, bool) { if o == nil || common.IsNil(o.Line1) { return nil, false } @@ -126,7 +126,7 @@ func (o *Address2) GetLine1Ok() (*string, bool) { } // HasLine1 returns a boolean if a field has been set. -func (o *Address2) HasLine1() bool { +func (o *Address) HasLine1() bool { if o != nil && !common.IsNil(o.Line1) { return true } @@ -135,12 +135,12 @@ func (o *Address2) HasLine1() bool { } // SetLine1 gets a reference to the given string and assigns it to the Line1 field. -func (o *Address2) SetLine1(v string) { +func (o *Address) SetLine1(v string) { o.Line1 = &v } // GetLine2 returns the Line2 field value if set, zero value otherwise. -func (o *Address2) GetLine2() string { +func (o *Address) GetLine2() string { if o == nil || common.IsNil(o.Line2) { var ret string return ret @@ -150,7 +150,7 @@ func (o *Address2) GetLine2() string { // 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 *Address2) GetLine2Ok() (*string, bool) { +func (o *Address) GetLine2Ok() (*string, bool) { if o == nil || common.IsNil(o.Line2) { return nil, false } @@ -158,7 +158,7 @@ func (o *Address2) GetLine2Ok() (*string, bool) { } // HasLine2 returns a boolean if a field has been set. -func (o *Address2) HasLine2() bool { +func (o *Address) HasLine2() bool { if o != nil && !common.IsNil(o.Line2) { return true } @@ -167,12 +167,12 @@ func (o *Address2) HasLine2() bool { } // SetLine2 gets a reference to the given string and assigns it to the Line2 field. -func (o *Address2) SetLine2(v string) { +func (o *Address) SetLine2(v string) { o.Line2 = &v } // GetPostalCode returns the PostalCode field value if set, zero value otherwise. -func (o *Address2) GetPostalCode() string { +func (o *Address) GetPostalCode() string { if o == nil || common.IsNil(o.PostalCode) { var ret string return ret @@ -182,7 +182,7 @@ func (o *Address2) GetPostalCode() string { // GetPostalCodeOk returns a tuple with the PostalCode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Address2) GetPostalCodeOk() (*string, bool) { +func (o *Address) GetPostalCodeOk() (*string, bool) { if o == nil || common.IsNil(o.PostalCode) { return nil, false } @@ -190,7 +190,7 @@ func (o *Address2) GetPostalCodeOk() (*string, bool) { } // HasPostalCode returns a boolean if a field has been set. -func (o *Address2) HasPostalCode() bool { +func (o *Address) HasPostalCode() bool { if o != nil && !common.IsNil(o.PostalCode) { return true } @@ -199,12 +199,12 @@ func (o *Address2) HasPostalCode() bool { } // SetPostalCode gets a reference to the given string and assigns it to the PostalCode field. -func (o *Address2) SetPostalCode(v string) { +func (o *Address) SetPostalCode(v string) { o.PostalCode = &v } // GetStateOrProvince returns the StateOrProvince field value if set, zero value otherwise. -func (o *Address2) GetStateOrProvince() string { +func (o *Address) GetStateOrProvince() string { if o == nil || common.IsNil(o.StateOrProvince) { var ret string return ret @@ -214,7 +214,7 @@ func (o *Address2) GetStateOrProvince() string { // GetStateOrProvinceOk returns a tuple with the StateOrProvince field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Address2) GetStateOrProvinceOk() (*string, bool) { +func (o *Address) GetStateOrProvinceOk() (*string, bool) { if o == nil || common.IsNil(o.StateOrProvince) { return nil, false } @@ -222,7 +222,7 @@ func (o *Address2) GetStateOrProvinceOk() (*string, bool) { } // HasStateOrProvince returns a boolean if a field has been set. -func (o *Address2) HasStateOrProvince() bool { +func (o *Address) HasStateOrProvince() bool { if o != nil && !common.IsNil(o.StateOrProvince) { return true } @@ -231,11 +231,11 @@ func (o *Address2) HasStateOrProvince() bool { } // SetStateOrProvince gets a reference to the given string and assigns it to the StateOrProvince field. -func (o *Address2) SetStateOrProvince(v string) { +func (o *Address) SetStateOrProvince(v string) { o.StateOrProvince = &v } -func (o Address2) MarshalJSON() ([]byte, error) { +func (o Address) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -243,7 +243,7 @@ func (o Address2) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o Address2) ToMap() (map[string]interface{}, error) { +func (o Address) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !common.IsNil(o.City) { toSerialize["city"] = o.City @@ -264,38 +264,38 @@ func (o Address2) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -type NullableAddress2 struct { - value *Address2 +type NullableAddress struct { + value *Address isSet bool } -func (v NullableAddress2) Get() *Address2 { +func (v NullableAddress) Get() *Address { return v.value } -func (v *NullableAddress2) Set(val *Address2) { +func (v *NullableAddress) Set(val *Address) { v.value = val v.isSet = true } -func (v NullableAddress2) IsSet() bool { +func (v NullableAddress) IsSet() bool { return v.isSet } -func (v *NullableAddress2) Unset() { +func (v *NullableAddress) Unset() { v.value = nil v.isSet = false } -func NewNullableAddress2(val *Address2) *NullableAddress2 { - return &NullableAddress2{value: val, isSet: true} +func NewNullableAddress(val *Address) *NullableAddress { + return &NullableAddress{value: val, isSet: true} } -func (v NullableAddress2) MarshalJSON() ([]byte, error) { +func (v NullableAddress) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableAddress2) UnmarshalJSON(src []byte) error { +func (v *NullableAddress) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/src/transfers/model_amount.go b/src/transfers/model_amount.go index 4fbcfaf21..7a586e508 100644 --- a/src/transfers/model_amount.go +++ b/src/transfers/model_amount.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_au_local_account_identification.go b/src/transfers/model_au_local_account_identification.go index 07f78a386..26ca4d1ed 100644 --- a/src/transfers/model_au_local_account_identification.go +++ b/src/transfers/model_au_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_bank_account_v3.go b/src/transfers/model_bank_account_v3.go index 82890a652..3029b129b 100644 --- a/src/transfers/model_bank_account_v3.go +++ b/src/transfers/model_bank_account_v3.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BankAccountV3{} // BankAccountV3 struct for BankAccountV3 type BankAccountV3 struct { - AccountHolder PartyIdentification2 `json:"accountHolder"` + AccountHolder PartyIdentification `json:"accountHolder"` AccountIdentification BankAccountV3AccountIdentification `json:"accountIdentification"` } @@ -27,7 +27,7 @@ type BankAccountV3 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 NewBankAccountV3(accountHolder PartyIdentification2, accountIdentification BankAccountV3AccountIdentification) *BankAccountV3 { +func NewBankAccountV3(accountHolder PartyIdentification, accountIdentification BankAccountV3AccountIdentification) *BankAccountV3 { this := BankAccountV3{} this.AccountHolder = accountHolder this.AccountIdentification = accountIdentification @@ -43,9 +43,9 @@ func NewBankAccountV3WithDefaults() *BankAccountV3 { } // GetAccountHolder returns the AccountHolder field value -func (o *BankAccountV3) GetAccountHolder() PartyIdentification2 { +func (o *BankAccountV3) GetAccountHolder() PartyIdentification { if o == nil { - var ret PartyIdentification2 + var ret PartyIdentification return ret } @@ -54,7 +54,7 @@ func (o *BankAccountV3) GetAccountHolder() PartyIdentification2 { // GetAccountHolderOk returns a tuple with the AccountHolder field value // and a boolean to check if the value has been set. -func (o *BankAccountV3) GetAccountHolderOk() (*PartyIdentification2, bool) { +func (o *BankAccountV3) GetAccountHolderOk() (*PartyIdentification, bool) { if o == nil { return nil, false } @@ -62,7 +62,7 @@ func (o *BankAccountV3) GetAccountHolderOk() (*PartyIdentification2, bool) { } // SetAccountHolder sets field value -func (o *BankAccountV3) SetAccountHolder(v PartyIdentification2) { +func (o *BankAccountV3) SetAccountHolder(v PartyIdentification) { o.AccountHolder = v } diff --git a/src/transfers/model_bank_account_v3_account_identification.go b/src/transfers/model_bank_account_v3_account_identification.go index eab19215d..6fed77b5c 100644 --- a/src/transfers/model_bank_account_v3_account_identification.go +++ b/src/transfers/model_bank_account_v3_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_bank_category_data.go b/src/transfers/model_bank_category_data.go new file mode 100644 index 000000000..c23e70609 --- /dev/null +++ b/src/transfers/model_bank_category_data.go @@ -0,0 +1,185 @@ +/* +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/v7/src/common" +) + +// checks if the BankCategoryData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BankCategoryData{} + +// BankCategoryData struct for BankCategoryData +type BankCategoryData struct { + // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + Priority *string `json:"priority,omitempty"` + // **bank** + Type *string `json:"type,omitempty"` +} + +// NewBankCategoryData instantiates a new BankCategoryData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBankCategoryData() *BankCategoryData { + this := BankCategoryData{} + var type_ string = "bank" + this.Type = &type_ + return &this +} + +// NewBankCategoryDataWithDefaults instantiates a new BankCategoryData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBankCategoryDataWithDefaults() *BankCategoryData { + this := BankCategoryData{} + var type_ string = "bank" + this.Type = &type_ + return &this +} + +// GetPriority returns the Priority field value if set, zero value otherwise. +func (o *BankCategoryData) GetPriority() string { + if o == nil || common.IsNil(o.Priority) { + var ret string + return ret + } + return *o.Priority +} + +// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankCategoryData) GetPriorityOk() (*string, bool) { + if o == nil || common.IsNil(o.Priority) { + return nil, false + } + return o.Priority, true +} + +// HasPriority returns a boolean if a field has been set. +func (o *BankCategoryData) HasPriority() bool { + if o != nil && !common.IsNil(o.Priority) { + return true + } + + return false +} + +// SetPriority gets a reference to the given string and assigns it to the Priority field. +func (o *BankCategoryData) SetPriority(v string) { + o.Priority = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *BankCategoryData) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankCategoryData) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *BankCategoryData) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *BankCategoryData) SetType(v string) { + o.Type = &v +} + +func (o BankCategoryData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BankCategoryData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Priority) { + toSerialize["priority"] = o.Priority + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableBankCategoryData struct { + value *BankCategoryData + isSet bool +} + +func (v NullableBankCategoryData) Get() *BankCategoryData { + return v.value +} + +func (v *NullableBankCategoryData) Set(val *BankCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableBankCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableBankCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBankCategoryData(val *BankCategoryData) *NullableBankCategoryData { + return &NullableBankCategoryData{value: val, isSet: true} +} + +func (v NullableBankCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBankCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *BankCategoryData) isValidPriority() bool { + var allowedEnumValues = []string{"crossBorder", "fast", "instant", "internal", "regular", "wire"} + for _, allowed := range allowedEnumValues { + if o.GetPriority() == allowed { + return true + } + } + return false +} +func (o *BankCategoryData) isValidType() bool { + var allowedEnumValues = []string{"bank"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_br_local_account_identification.go b/src/transfers/model_br_local_account_identification.go index d79fdba7e..71b8025a8 100644 --- a/src/transfers/model_br_local_account_identification.go +++ b/src/transfers/model_br_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_ca_local_account_identification.go b/src/transfers/model_ca_local_account_identification.go index b7ae37a20..cd0b47144 100644 --- a/src/transfers/model_ca_local_account_identification.go +++ b/src/transfers/model_ca_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_capital_balance.go b/src/transfers/model_capital_balance.go index 166aa5cbe..4771e1059 100644 --- a/src/transfers/model_capital_balance.go +++ b/src/transfers/model_capital_balance.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_capital_grant.go b/src/transfers/model_capital_grant.go index c1ab268e2..c780224d6 100644 --- a/src/transfers/model_capital_grant.go +++ b/src/transfers/model_capital_grant.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ common.MappedNullable = &CapitalGrant{} type CapitalGrant struct { Amount *Amount `json:"amount,omitempty"` Balances CapitalBalance `json:"balances"` - Counterparty *Counterparty2 `json:"counterparty,omitempty"` + Counterparty *Counterparty `json:"counterparty,omitempty"` Fee *Fee `json:"fee,omitempty"` // The identifier of the grant account used for the grant. GrantAccountId string `json:"grantAccountId"` @@ -113,9 +113,9 @@ func (o *CapitalGrant) SetBalances(v CapitalBalance) { } // GetCounterparty returns the Counterparty field value if set, zero value otherwise. -func (o *CapitalGrant) GetCounterparty() Counterparty2 { +func (o *CapitalGrant) GetCounterparty() Counterparty { if o == nil || common.IsNil(o.Counterparty) { - var ret Counterparty2 + var ret Counterparty return ret } return *o.Counterparty @@ -123,7 +123,7 @@ func (o *CapitalGrant) GetCounterparty() Counterparty2 { // GetCounterpartyOk returns a tuple with the Counterparty field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CapitalGrant) GetCounterpartyOk() (*Counterparty2, bool) { +func (o *CapitalGrant) GetCounterpartyOk() (*Counterparty, bool) { if o == nil || common.IsNil(o.Counterparty) { return nil, false } @@ -139,8 +139,8 @@ func (o *CapitalGrant) HasCounterparty() bool { return false } -// SetCounterparty gets a reference to the given Counterparty2 and assigns it to the Counterparty field. -func (o *CapitalGrant) SetCounterparty(v Counterparty2) { +// SetCounterparty gets a reference to the given Counterparty and assigns it to the Counterparty field. +func (o *CapitalGrant) SetCounterparty(v Counterparty) { o.Counterparty = &v } diff --git a/src/transfers/model_capital_grant_info.go b/src/transfers/model_capital_grant_info.go index 87391f035..d5d592c30 100644 --- a/src/transfers/model_capital_grant_info.go +++ b/src/transfers/model_capital_grant_info.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,7 +19,7 @@ var _ common.MappedNullable = &CapitalGrantInfo{} // CapitalGrantInfo struct for CapitalGrantInfo type CapitalGrantInfo struct { - Counterparty *Counterparty2 `json:"counterparty,omitempty"` + Counterparty *Counterparty `json:"counterparty,omitempty"` // The identifier of the grant account used for the grant. GrantAccountId string `json:"grantAccountId"` // The identifier of the grant offer that has been selected and from which the grant details will be used. @@ -46,9 +46,9 @@ func NewCapitalGrantInfoWithDefaults() *CapitalGrantInfo { } // GetCounterparty returns the Counterparty field value if set, zero value otherwise. -func (o *CapitalGrantInfo) GetCounterparty() Counterparty2 { +func (o *CapitalGrantInfo) GetCounterparty() Counterparty { if o == nil || common.IsNil(o.Counterparty) { - var ret Counterparty2 + var ret Counterparty return ret } return *o.Counterparty @@ -56,7 +56,7 @@ func (o *CapitalGrantInfo) GetCounterparty() Counterparty2 { // GetCounterpartyOk returns a tuple with the Counterparty field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CapitalGrantInfo) GetCounterpartyOk() (*Counterparty2, bool) { +func (o *CapitalGrantInfo) GetCounterpartyOk() (*Counterparty, bool) { if o == nil || common.IsNil(o.Counterparty) { return nil, false } @@ -72,8 +72,8 @@ func (o *CapitalGrantInfo) HasCounterparty() bool { return false } -// SetCounterparty gets a reference to the given Counterparty2 and assigns it to the Counterparty field. -func (o *CapitalGrantInfo) SetCounterparty(v Counterparty2) { +// SetCounterparty gets a reference to the given Counterparty and assigns it to the Counterparty field. +func (o *CapitalGrantInfo) SetCounterparty(v Counterparty) { o.Counterparty = &v } diff --git a/src/transfers/model_capital_grants.go b/src/transfers/model_capital_grants.go index 3ffabf4fb..a2403ea0d 100644 --- a/src/transfers/model_capital_grants.go +++ b/src/transfers/model_capital_grants.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_counterparty_2.go b/src/transfers/model_counterparty.go similarity index 69% rename from src/transfers/model_counterparty_2.go rename to src/transfers/model_counterparty.go index ae5dbb9af..3694690df 100644 --- a/src/transfers/model_counterparty_2.go +++ b/src/transfers/model_counterparty.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,11 +14,11 @@ import ( "github.com/adyen/adyen-go-api-library/v7/src/common" ) -// checks if the Counterparty2 type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &Counterparty2{} +// checks if the Counterparty type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Counterparty{} -// Counterparty2 struct for Counterparty2 -type Counterparty2 struct { +// Counterparty struct for Counterparty +type Counterparty struct { // The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided. AccountHolderId *string `json:"accountHolderId,omitempty"` // The identifier of the balance account that belongs to the receiving account holder. @@ -27,25 +27,25 @@ type Counterparty2 struct { TransferInstrumentId *string `json:"transferInstrumentId,omitempty"` } -// NewCounterparty2 instantiates a new Counterparty2 object +// NewCounterparty instantiates a new Counterparty object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCounterparty2() *Counterparty2 { - this := Counterparty2{} +func NewCounterparty() *Counterparty { + this := Counterparty{} return &this } -// NewCounterparty2WithDefaults instantiates a new Counterparty2 object +// NewCounterpartyWithDefaults instantiates a new Counterparty object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewCounterparty2WithDefaults() *Counterparty2 { - this := Counterparty2{} +func NewCounterpartyWithDefaults() *Counterparty { + this := Counterparty{} return &this } // GetAccountHolderId returns the AccountHolderId field value if set, zero value otherwise. -func (o *Counterparty2) GetAccountHolderId() string { +func (o *Counterparty) GetAccountHolderId() string { if o == nil || common.IsNil(o.AccountHolderId) { var ret string return ret @@ -55,7 +55,7 @@ func (o *Counterparty2) GetAccountHolderId() string { // GetAccountHolderIdOk returns a tuple with the AccountHolderId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Counterparty2) GetAccountHolderIdOk() (*string, bool) { +func (o *Counterparty) GetAccountHolderIdOk() (*string, bool) { if o == nil || common.IsNil(o.AccountHolderId) { return nil, false } @@ -63,7 +63,7 @@ func (o *Counterparty2) GetAccountHolderIdOk() (*string, bool) { } // HasAccountHolderId returns a boolean if a field has been set. -func (o *Counterparty2) HasAccountHolderId() bool { +func (o *Counterparty) HasAccountHolderId() bool { if o != nil && !common.IsNil(o.AccountHolderId) { return true } @@ -72,12 +72,12 @@ func (o *Counterparty2) HasAccountHolderId() bool { } // SetAccountHolderId gets a reference to the given string and assigns it to the AccountHolderId field. -func (o *Counterparty2) SetAccountHolderId(v string) { +func (o *Counterparty) SetAccountHolderId(v string) { o.AccountHolderId = &v } // GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. -func (o *Counterparty2) GetBalanceAccountId() string { +func (o *Counterparty) GetBalanceAccountId() string { if o == nil || common.IsNil(o.BalanceAccountId) { var ret string return ret @@ -87,7 +87,7 @@ func (o *Counterparty2) GetBalanceAccountId() string { // GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Counterparty2) GetBalanceAccountIdOk() (*string, bool) { +func (o *Counterparty) GetBalanceAccountIdOk() (*string, bool) { if o == nil || common.IsNil(o.BalanceAccountId) { return nil, false } @@ -95,7 +95,7 @@ func (o *Counterparty2) GetBalanceAccountIdOk() (*string, bool) { } // HasBalanceAccountId returns a boolean if a field has been set. -func (o *Counterparty2) HasBalanceAccountId() bool { +func (o *Counterparty) HasBalanceAccountId() bool { if o != nil && !common.IsNil(o.BalanceAccountId) { return true } @@ -104,12 +104,12 @@ func (o *Counterparty2) HasBalanceAccountId() bool { } // SetBalanceAccountId gets a reference to the given string and assigns it to the BalanceAccountId field. -func (o *Counterparty2) SetBalanceAccountId(v string) { +func (o *Counterparty) SetBalanceAccountId(v string) { o.BalanceAccountId = &v } // GetTransferInstrumentId returns the TransferInstrumentId field value if set, zero value otherwise. -func (o *Counterparty2) GetTransferInstrumentId() string { +func (o *Counterparty) GetTransferInstrumentId() string { if o == nil || common.IsNil(o.TransferInstrumentId) { var ret string return ret @@ -119,7 +119,7 @@ func (o *Counterparty2) GetTransferInstrumentId() string { // GetTransferInstrumentIdOk returns a tuple with the TransferInstrumentId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Counterparty2) GetTransferInstrumentIdOk() (*string, bool) { +func (o *Counterparty) GetTransferInstrumentIdOk() (*string, bool) { if o == nil || common.IsNil(o.TransferInstrumentId) { return nil, false } @@ -127,7 +127,7 @@ func (o *Counterparty2) GetTransferInstrumentIdOk() (*string, bool) { } // HasTransferInstrumentId returns a boolean if a field has been set. -func (o *Counterparty2) HasTransferInstrumentId() bool { +func (o *Counterparty) HasTransferInstrumentId() bool { if o != nil && !common.IsNil(o.TransferInstrumentId) { return true } @@ -136,11 +136,11 @@ func (o *Counterparty2) HasTransferInstrumentId() bool { } // SetTransferInstrumentId gets a reference to the given string and assigns it to the TransferInstrumentId field. -func (o *Counterparty2) SetTransferInstrumentId(v string) { +func (o *Counterparty) SetTransferInstrumentId(v string) { o.TransferInstrumentId = &v } -func (o Counterparty2) MarshalJSON() ([]byte, error) { +func (o Counterparty) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -148,7 +148,7 @@ func (o Counterparty2) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o Counterparty2) ToMap() (map[string]interface{}, error) { +func (o Counterparty) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !common.IsNil(o.AccountHolderId) { toSerialize["accountHolderId"] = o.AccountHolderId @@ -162,38 +162,38 @@ func (o Counterparty2) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -type NullableCounterparty2 struct { - value *Counterparty2 +type NullableCounterparty struct { + value *Counterparty isSet bool } -func (v NullableCounterparty2) Get() *Counterparty2 { +func (v NullableCounterparty) Get() *Counterparty { return v.value } -func (v *NullableCounterparty2) Set(val *Counterparty2) { +func (v *NullableCounterparty) Set(val *Counterparty) { v.value = val v.isSet = true } -func (v NullableCounterparty2) IsSet() bool { +func (v NullableCounterparty) IsSet() bool { return v.isSet } -func (v *NullableCounterparty2) Unset() { +func (v *NullableCounterparty) Unset() { v.value = nil v.isSet = false } -func NewNullableCounterparty2(val *Counterparty2) *NullableCounterparty2 { - return &NullableCounterparty2{value: val, isSet: true} +func NewNullableCounterparty(val *Counterparty) *NullableCounterparty { + return &NullableCounterparty{value: val, isSet: true} } -func (v NullableCounterparty2) MarshalJSON() ([]byte, error) { +func (v NullableCounterparty) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableCounterparty2) UnmarshalJSON(src []byte) error { +func (v *NullableCounterparty) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/src/transfers/model_counterparty_info_v3.go b/src/transfers/model_counterparty_info_v3.go index 0f1f2a58a..a03af90a9 100644 --- a/src/transfers/model_counterparty_info_v3.go +++ b/src/transfers/model_counterparty_info_v3.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_counterparty_v3.go b/src/transfers/model_counterparty_v3.go index d2a6d8c9d..d9c25af9f 100644 --- a/src/transfers/model_counterparty_v3.go +++ b/src/transfers/model_counterparty_v3.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_cz_local_account_identification.go b/src/transfers/model_cz_local_account_identification.go index 3ea888d5d..609a727fe 100644 --- a/src/transfers/model_cz_local_account_identification.go +++ b/src/transfers/model_cz_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_dk_local_account_identification.go b/src/transfers/model_dk_local_account_identification.go index 82d37af3e..955c72e20 100644 --- a/src/transfers/model_dk_local_account_identification.go +++ b/src/transfers/model_dk_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_fee.go b/src/transfers/model_fee.go index 67d4c2932..aa2917206 100644 --- a/src/transfers/model_fee.go +++ b/src/transfers/model_fee.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_hk_local_account_identification.go b/src/transfers/model_hk_local_account_identification.go index 334a6c9ad..6578c0bec 100644 --- a/src/transfers/model_hk_local_account_identification.go +++ b/src/transfers/model_hk_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,10 +19,10 @@ var _ common.MappedNullable = &HKLocalAccountIdentification{} // HKLocalAccountIdentification struct for HKLocalAccountIdentification type HKLocalAccountIdentification struct { - // The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + // The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. AccountNumber string `json:"accountNumber"` - // The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. - BankCode string `json:"bankCode"` + // The 3-digit clearing code, without separators or whitespace. + ClearingCode string `json:"clearingCode"` // **hkLocal** Type string `json:"type"` } @@ -31,10 +31,10 @@ type HKLocalAccountIdentification 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 NewHKLocalAccountIdentification(accountNumber string, bankCode string, type_ string) *HKLocalAccountIdentification { +func NewHKLocalAccountIdentification(accountNumber string, clearingCode string, type_ string) *HKLocalAccountIdentification { this := HKLocalAccountIdentification{} this.AccountNumber = accountNumber - this.BankCode = bankCode + this.ClearingCode = clearingCode this.Type = type_ return &this } @@ -73,28 +73,28 @@ func (o *HKLocalAccountIdentification) SetAccountNumber(v string) { o.AccountNumber = v } -// GetBankCode returns the BankCode field value -func (o *HKLocalAccountIdentification) GetBankCode() string { +// GetClearingCode returns the ClearingCode field value +func (o *HKLocalAccountIdentification) GetClearingCode() string { if o == nil { var ret string return ret } - return o.BankCode + return o.ClearingCode } -// GetBankCodeOk returns a tuple with the BankCode field value +// GetClearingCodeOk returns a tuple with the ClearingCode field value // and a boolean to check if the value has been set. -func (o *HKLocalAccountIdentification) GetBankCodeOk() (*string, bool) { +func (o *HKLocalAccountIdentification) GetClearingCodeOk() (*string, bool) { if o == nil { return nil, false } - return &o.BankCode, true + return &o.ClearingCode, true } -// SetBankCode sets field value -func (o *HKLocalAccountIdentification) SetBankCode(v string) { - o.BankCode = v +// SetClearingCode sets field value +func (o *HKLocalAccountIdentification) SetClearingCode(v string) { + o.ClearingCode = v } // GetType returns the Type field value @@ -132,7 +132,7 @@ func (o HKLocalAccountIdentification) MarshalJSON() ([]byte, error) { func (o HKLocalAccountIdentification) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["accountNumber"] = o.AccountNumber - toSerialize["bankCode"] = o.BankCode + toSerialize["clearingCode"] = o.ClearingCode toSerialize["type"] = o.Type return toSerialize, nil } diff --git a/src/transfers/model_hu_local_account_identification.go b/src/transfers/model_hu_local_account_identification.go index 4376ccc9e..cddc8bc59 100644 --- a/src/transfers/model_hu_local_account_identification.go +++ b/src/transfers/model_hu_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_iban_account_identification.go b/src/transfers/model_iban_account_identification.go index d95ac49e6..55d5aada1 100644 --- a/src/transfers/model_iban_account_identification.go +++ b/src/transfers/model_iban_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_internal_category_data.go b/src/transfers/model_internal_category_data.go new file mode 100644 index 000000000..ec6fc74e3 --- /dev/null +++ b/src/transfers/model_internal_category_data.go @@ -0,0 +1,213 @@ +/* +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/v7/src/common" +) + +// checks if the InternalCategoryData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &InternalCategoryData{} + +// InternalCategoryData struct for InternalCategoryData +type InternalCategoryData struct { + // The capture's merchant reference included in the transfer. + ModificationMerchantReference *string `json:"modificationMerchantReference,omitempty"` + // The capture reference included in the transfer. + ModificationPspReference *string `json:"modificationPspReference,omitempty"` + // **internal** + Type *string `json:"type,omitempty"` +} + +// NewInternalCategoryData instantiates a new InternalCategoryData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInternalCategoryData() *InternalCategoryData { + this := InternalCategoryData{} + var type_ string = "internal" + this.Type = &type_ + return &this +} + +// NewInternalCategoryDataWithDefaults instantiates a new InternalCategoryData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInternalCategoryDataWithDefaults() *InternalCategoryData { + this := InternalCategoryData{} + var type_ string = "internal" + this.Type = &type_ + return &this +} + +// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. +func (o *InternalCategoryData) GetModificationMerchantReference() string { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + var ret string + return ret + } + return *o.ModificationMerchantReference +} + +// GetModificationMerchantReferenceOk returns a tuple with the ModificationMerchantReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InternalCategoryData) GetModificationMerchantReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + return nil, false + } + return o.ModificationMerchantReference, true +} + +// HasModificationMerchantReference returns a boolean if a field has been set. +func (o *InternalCategoryData) HasModificationMerchantReference() bool { + if o != nil && !common.IsNil(o.ModificationMerchantReference) { + return true + } + + return false +} + +// SetModificationMerchantReference gets a reference to the given string and assigns it to the ModificationMerchantReference field. +func (o *InternalCategoryData) SetModificationMerchantReference(v string) { + o.ModificationMerchantReference = &v +} + +// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. +func (o *InternalCategoryData) GetModificationPspReference() string { + if o == nil || common.IsNil(o.ModificationPspReference) { + var ret string + return ret + } + return *o.ModificationPspReference +} + +// GetModificationPspReferenceOk returns a tuple with the ModificationPspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InternalCategoryData) GetModificationPspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationPspReference) { + return nil, false + } + return o.ModificationPspReference, true +} + +// HasModificationPspReference returns a boolean if a field has been set. +func (o *InternalCategoryData) HasModificationPspReference() bool { + if o != nil && !common.IsNil(o.ModificationPspReference) { + return true + } + + return false +} + +// SetModificationPspReference gets a reference to the given string and assigns it to the ModificationPspReference field. +func (o *InternalCategoryData) SetModificationPspReference(v string) { + o.ModificationPspReference = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *InternalCategoryData) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InternalCategoryData) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *InternalCategoryData) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *InternalCategoryData) SetType(v string) { + o.Type = &v +} + +func (o InternalCategoryData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InternalCategoryData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ModificationMerchantReference) { + toSerialize["modificationMerchantReference"] = o.ModificationMerchantReference + } + if !common.IsNil(o.ModificationPspReference) { + toSerialize["modificationPspReference"] = o.ModificationPspReference + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableInternalCategoryData struct { + value *InternalCategoryData + isSet bool +} + +func (v NullableInternalCategoryData) Get() *InternalCategoryData { + return v.value +} + +func (v *NullableInternalCategoryData) Set(val *InternalCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableInternalCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableInternalCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInternalCategoryData(val *InternalCategoryData) *NullableInternalCategoryData { + return &NullableInternalCategoryData{value: val, isSet: true} +} + +func (v NullableInternalCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInternalCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *InternalCategoryData) isValidType() bool { + var allowedEnumValues = []string{"internal"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_invalid_field.go b/src/transfers/model_invalid_field.go index e4ec77527..992dcb664 100644 --- a/src/transfers/model_invalid_field.go +++ b/src/transfers/model_invalid_field.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_issued_card.go b/src/transfers/model_issued_card.go new file mode 100644 index 000000000..23e18d784 --- /dev/null +++ b/src/transfers/model_issued_card.go @@ -0,0 +1,304 @@ +/* +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/v7/src/common" +) + +// checks if the IssuedCard type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &IssuedCard{} + +// IssuedCard struct for IssuedCard +type IssuedCard struct { + // Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. + PanEntryMode *string `json:"panEntryMode,omitempty"` + // Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. + ProcessingType *string `json:"processingType,omitempty"` + RelayedAuthorisationData *RelayedAuthorisationData `json:"relayedAuthorisationData,omitempty"` + // **issuedCard** + Type *string `json:"type,omitempty"` + // The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. + ValidationFacts []TransferNotificationValidationFact `json:"validationFacts,omitempty"` +} + +// NewIssuedCard instantiates a new IssuedCard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIssuedCard() *IssuedCard { + this := IssuedCard{} + var type_ string = "issuedCard" + this.Type = &type_ + return &this +} + +// NewIssuedCardWithDefaults instantiates a new IssuedCard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIssuedCardWithDefaults() *IssuedCard { + this := IssuedCard{} + var type_ string = "issuedCard" + this.Type = &type_ + return &this +} + +// GetPanEntryMode returns the PanEntryMode field value if set, zero value otherwise. +func (o *IssuedCard) GetPanEntryMode() string { + if o == nil || common.IsNil(o.PanEntryMode) { + var ret string + return ret + } + return *o.PanEntryMode +} + +// GetPanEntryModeOk returns a tuple with the PanEntryMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetPanEntryModeOk() (*string, bool) { + if o == nil || common.IsNil(o.PanEntryMode) { + return nil, false + } + return o.PanEntryMode, true +} + +// HasPanEntryMode returns a boolean if a field has been set. +func (o *IssuedCard) HasPanEntryMode() bool { + if o != nil && !common.IsNil(o.PanEntryMode) { + return true + } + + return false +} + +// SetPanEntryMode gets a reference to the given string and assigns it to the PanEntryMode field. +func (o *IssuedCard) SetPanEntryMode(v string) { + o.PanEntryMode = &v +} + +// GetProcessingType returns the ProcessingType field value if set, zero value otherwise. +func (o *IssuedCard) GetProcessingType() string { + if o == nil || common.IsNil(o.ProcessingType) { + var ret string + return ret + } + return *o.ProcessingType +} + +// GetProcessingTypeOk returns a tuple with the ProcessingType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetProcessingTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.ProcessingType) { + return nil, false + } + return o.ProcessingType, true +} + +// HasProcessingType returns a boolean if a field has been set. +func (o *IssuedCard) HasProcessingType() bool { + if o != nil && !common.IsNil(o.ProcessingType) { + return true + } + + return false +} + +// SetProcessingType gets a reference to the given string and assigns it to the ProcessingType field. +func (o *IssuedCard) SetProcessingType(v string) { + o.ProcessingType = &v +} + +// GetRelayedAuthorisationData returns the RelayedAuthorisationData field value if set, zero value otherwise. +func (o *IssuedCard) GetRelayedAuthorisationData() RelayedAuthorisationData { + if o == nil || common.IsNil(o.RelayedAuthorisationData) { + var ret RelayedAuthorisationData + return ret + } + return *o.RelayedAuthorisationData +} + +// GetRelayedAuthorisationDataOk returns a tuple with the RelayedAuthorisationData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetRelayedAuthorisationDataOk() (*RelayedAuthorisationData, bool) { + if o == nil || common.IsNil(o.RelayedAuthorisationData) { + return nil, false + } + return o.RelayedAuthorisationData, true +} + +// HasRelayedAuthorisationData returns a boolean if a field has been set. +func (o *IssuedCard) HasRelayedAuthorisationData() bool { + if o != nil && !common.IsNil(o.RelayedAuthorisationData) { + return true + } + + return false +} + +// SetRelayedAuthorisationData gets a reference to the given RelayedAuthorisationData and assigns it to the RelayedAuthorisationData field. +func (o *IssuedCard) SetRelayedAuthorisationData(v RelayedAuthorisationData) { + o.RelayedAuthorisationData = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *IssuedCard) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *IssuedCard) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *IssuedCard) SetType(v string) { + o.Type = &v +} + +// GetValidationFacts returns the ValidationFacts field value if set, zero value otherwise. +func (o *IssuedCard) GetValidationFacts() []TransferNotificationValidationFact { + if o == nil || common.IsNil(o.ValidationFacts) { + var ret []TransferNotificationValidationFact + return ret + } + return o.ValidationFacts +} + +// GetValidationFactsOk returns a tuple with the ValidationFacts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetValidationFactsOk() ([]TransferNotificationValidationFact, bool) { + if o == nil || common.IsNil(o.ValidationFacts) { + return nil, false + } + return o.ValidationFacts, true +} + +// HasValidationFacts returns a boolean if a field has been set. +func (o *IssuedCard) HasValidationFacts() bool { + if o != nil && !common.IsNil(o.ValidationFacts) { + return true + } + + return false +} + +// SetValidationFacts gets a reference to the given []TransferNotificationValidationFact and assigns it to the ValidationFacts field. +func (o *IssuedCard) SetValidationFacts(v []TransferNotificationValidationFact) { + o.ValidationFacts = v +} + +func (o IssuedCard) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IssuedCard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.PanEntryMode) { + toSerialize["panEntryMode"] = o.PanEntryMode + } + if !common.IsNil(o.ProcessingType) { + toSerialize["processingType"] = o.ProcessingType + } + if !common.IsNil(o.RelayedAuthorisationData) { + toSerialize["relayedAuthorisationData"] = o.RelayedAuthorisationData + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !common.IsNil(o.ValidationFacts) { + toSerialize["validationFacts"] = o.ValidationFacts + } + return toSerialize, nil +} + +type NullableIssuedCard struct { + value *IssuedCard + isSet bool +} + +func (v NullableIssuedCard) Get() *IssuedCard { + return v.value +} + +func (v *NullableIssuedCard) Set(val *IssuedCard) { + v.value = val + v.isSet = true +} + +func (v NullableIssuedCard) IsSet() bool { + return v.isSet +} + +func (v *NullableIssuedCard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIssuedCard(val *IssuedCard) *NullableIssuedCard { + return &NullableIssuedCard{value: val, isSet: true} +} + +func (v NullableIssuedCard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIssuedCard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *IssuedCard) isValidPanEntryMode() bool { + var allowedEnumValues = []string{"chip", "cof", "contactless", "ecommerce", "magstripe", "manual", "token"} + for _, allowed := range allowedEnumValues { + if o.GetPanEntryMode() == allowed { + return true + } + } + return false +} +func (o *IssuedCard) isValidProcessingType() bool { + var allowedEnumValues = []string{"atmWithdraw", "balanceInquiry", "ecommerce", "moto", "pos", "purchaseWithCashback", "recurring", "token"} + for _, allowed := range allowedEnumValues { + if o.GetProcessingType() == allowed { + return true + } + } + return false +} +func (o *IssuedCard) isValidType() bool { + var allowedEnumValues = []string{"issuedCard"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_json_object.go b/src/transfers/model_json_object.go index c0f9cfd2f..e71fbe86a 100644 --- a/src/transfers/model_json_object.go +++ b/src/transfers/model_json_object.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_json_path.go b/src/transfers/model_json_path.go index a22a367f6..dcc32abb8 100644 --- a/src/transfers/model_json_path.go +++ b/src/transfers/model_json_path.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_link.go b/src/transfers/model_link.go index dea1d665a..2e1ee92a2 100644 --- a/src/transfers/model_link.go +++ b/src/transfers/model_link.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_links.go b/src/transfers/model_links.go index 18d646ccf..a858b40f5 100644 --- a/src/transfers/model_links.go +++ b/src/transfers/model_links.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_merchant_data.go b/src/transfers/model_merchant_data.go index bf31f9f9e..58a397165 100644 --- a/src/transfers/model_merchant_data.go +++ b/src/transfers/model_merchant_data.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,6 +19,8 @@ var _ common.MappedNullable = &MerchantData{} // MerchantData struct for MerchantData type MerchantData struct { + // The unique identifier of the merchant's acquirer. + AcquirerId *string `json:"acquirerId,omitempty"` // The merchant category code. Mcc *string `json:"mcc,omitempty"` // The merchant identifier. @@ -45,6 +47,38 @@ func NewMerchantDataWithDefaults() *MerchantData { return &this } +// GetAcquirerId returns the AcquirerId field value if set, zero value otherwise. +func (o *MerchantData) GetAcquirerId() string { + if o == nil || common.IsNil(o.AcquirerId) { + var ret string + return ret + } + return *o.AcquirerId +} + +// GetAcquirerIdOk returns a tuple with the AcquirerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MerchantData) GetAcquirerIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AcquirerId) { + return nil, false + } + return o.AcquirerId, true +} + +// HasAcquirerId returns a boolean if a field has been set. +func (o *MerchantData) HasAcquirerId() bool { + if o != nil && !common.IsNil(o.AcquirerId) { + return true + } + + return false +} + +// SetAcquirerId gets a reference to the given string and assigns it to the AcquirerId field. +func (o *MerchantData) SetAcquirerId(v string) { + o.AcquirerId = &v +} + // GetMcc returns the Mcc field value if set, zero value otherwise. func (o *MerchantData) GetMcc() string { if o == nil || common.IsNil(o.Mcc) { @@ -183,6 +217,9 @@ func (o MerchantData) MarshalJSON() ([]byte, error) { func (o MerchantData) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcquirerId) { + toSerialize["acquirerId"] = o.AcquirerId + } if !common.IsNil(o.Mcc) { toSerialize["mcc"] = o.Mcc } diff --git a/src/transfers/model_name_location.go b/src/transfers/model_name_location.go index e0f6be78d..b8f756f67 100644 --- a/src/transfers/model_name_location.go +++ b/src/transfers/model_name_location.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_no_local_account_identification.go b/src/transfers/model_no_local_account_identification.go index 689b35c78..4fd99b4f4 100644 --- a/src/transfers/model_no_local_account_identification.go +++ b/src/transfers/model_no_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_number_and_bic_account_identification.go b/src/transfers/model_number_and_bic_account_identification.go index fa9bbc66d..01abfe050 100644 --- a/src/transfers/model_number_and_bic_account_identification.go +++ b/src/transfers/model_number_and_bic_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_nz_local_account_identification.go b/src/transfers/model_nz_local_account_identification.go index a31599b57..8bf07212e 100644 --- a/src/transfers/model_nz_local_account_identification.go +++ b/src/transfers/model_nz_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,12 +19,8 @@ var _ common.MappedNullable = &NZLocalAccountIdentification{} // NZLocalAccountIdentification struct for NZLocalAccountIdentification type NZLocalAccountIdentification struct { - // The 7-digit bank account number, without separators or whitespace. + // The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. AccountNumber string `json:"accountNumber"` - // The 2- to 3-digit account suffix, without separators or whitespace. - AccountSuffix string `json:"accountSuffix"` - // The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - BankCode string `json:"bankCode"` // **nzLocal** Type string `json:"type"` } @@ -33,11 +29,9 @@ type NZLocalAccountIdentification 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 NewNZLocalAccountIdentification(accountNumber string, accountSuffix string, bankCode string, type_ string) *NZLocalAccountIdentification { +func NewNZLocalAccountIdentification(accountNumber string, type_ string) *NZLocalAccountIdentification { this := NZLocalAccountIdentification{} this.AccountNumber = accountNumber - this.AccountSuffix = accountSuffix - this.BankCode = bankCode this.Type = type_ return &this } @@ -76,54 +70,6 @@ func (o *NZLocalAccountIdentification) SetAccountNumber(v string) { o.AccountNumber = v } -// GetAccountSuffix returns the AccountSuffix field value -func (o *NZLocalAccountIdentification) GetAccountSuffix() string { - if o == nil { - var ret string - return ret - } - - return o.AccountSuffix -} - -// GetAccountSuffixOk returns a tuple with the AccountSuffix field value -// and a boolean to check if the value has been set. -func (o *NZLocalAccountIdentification) GetAccountSuffixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccountSuffix, true -} - -// SetAccountSuffix sets field value -func (o *NZLocalAccountIdentification) SetAccountSuffix(v string) { - o.AccountSuffix = v -} - -// GetBankCode returns the BankCode field value -func (o *NZLocalAccountIdentification) GetBankCode() string { - if o == nil { - var ret string - return ret - } - - return o.BankCode -} - -// GetBankCodeOk returns a tuple with the BankCode field value -// and a boolean to check if the value has been set. -func (o *NZLocalAccountIdentification) GetBankCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.BankCode, true -} - -// SetBankCode sets field value -func (o *NZLocalAccountIdentification) SetBankCode(v string) { - o.BankCode = v -} - // GetType returns the Type field value func (o *NZLocalAccountIdentification) GetType() string { if o == nil { @@ -159,8 +105,6 @@ func (o NZLocalAccountIdentification) MarshalJSON() ([]byte, error) { func (o NZLocalAccountIdentification) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["accountNumber"] = o.AccountNumber - toSerialize["accountSuffix"] = o.AccountSuffix - toSerialize["bankCode"] = o.BankCode toSerialize["type"] = o.Type return toSerialize, nil } diff --git a/src/transfers/model_party_identification_2.go b/src/transfers/model_party_identification.go similarity index 69% rename from src/transfers/model_party_identification_2.go rename to src/transfers/model_party_identification.go index fd7fc4591..4728accff 100644 --- a/src/transfers/model_party_identification_2.go +++ b/src/transfers/model_party_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,12 +14,12 @@ import ( "github.com/adyen/adyen-go-api-library/v7/src/common" ) -// checks if the PartyIdentification2 type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PartyIdentification2{} +// checks if the PartyIdentification type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PartyIdentification{} -// PartyIdentification2 struct for PartyIdentification2 -type PartyIdentification2 struct { - Address *Address2 `json:"address,omitempty"` +// PartyIdentification struct for PartyIdentification +type PartyIdentification struct { + Address *Address `json:"address,omitempty"` // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` // First name of the individual. Allowed only when `type` is **individual**. @@ -34,32 +34,32 @@ type PartyIdentification2 struct { Type *string `json:"type,omitempty"` } -// NewPartyIdentification2 instantiates a new PartyIdentification2 object +// NewPartyIdentification instantiates a new PartyIdentification 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 NewPartyIdentification2(fullName string) *PartyIdentification2 { - this := PartyIdentification2{} +func NewPartyIdentification(fullName string) *PartyIdentification { + this := PartyIdentification{} this.FullName = fullName var type_ string = "unknown" this.Type = &type_ return &this } -// NewPartyIdentification2WithDefaults instantiates a new PartyIdentification2 object +// NewPartyIdentificationWithDefaults instantiates a new PartyIdentification 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 NewPartyIdentification2WithDefaults() *PartyIdentification2 { - this := PartyIdentification2{} +func NewPartyIdentificationWithDefaults() *PartyIdentification { + this := PartyIdentification{} var type_ string = "unknown" this.Type = &type_ return &this } // GetAddress returns the Address field value if set, zero value otherwise. -func (o *PartyIdentification2) GetAddress() Address2 { +func (o *PartyIdentification) GetAddress() Address { if o == nil || common.IsNil(o.Address) { - var ret Address2 + var ret Address return ret } return *o.Address @@ -67,7 +67,7 @@ func (o *PartyIdentification2) GetAddress() Address2 { // GetAddressOk returns a tuple with the Address field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartyIdentification2) GetAddressOk() (*Address2, bool) { +func (o *PartyIdentification) GetAddressOk() (*Address, bool) { if o == nil || common.IsNil(o.Address) { return nil, false } @@ -75,7 +75,7 @@ func (o *PartyIdentification2) GetAddressOk() (*Address2, bool) { } // HasAddress returns a boolean if a field has been set. -func (o *PartyIdentification2) HasAddress() bool { +func (o *PartyIdentification) HasAddress() bool { if o != nil && !common.IsNil(o.Address) { return true } @@ -83,13 +83,13 @@ func (o *PartyIdentification2) HasAddress() bool { return false } -// SetAddress gets a reference to the given Address2 and assigns it to the Address field. -func (o *PartyIdentification2) SetAddress(v Address2) { +// SetAddress gets a reference to the given Address and assigns it to the Address field. +func (o *PartyIdentification) SetAddress(v Address) { o.Address = &v } // GetDateOfBirth returns the DateOfBirth field value if set, zero value otherwise. -func (o *PartyIdentification2) GetDateOfBirth() string { +func (o *PartyIdentification) GetDateOfBirth() string { if o == nil || common.IsNil(o.DateOfBirth) { var ret string return ret @@ -99,7 +99,7 @@ func (o *PartyIdentification2) GetDateOfBirth() string { // GetDateOfBirthOk returns a tuple with the DateOfBirth field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartyIdentification2) GetDateOfBirthOk() (*string, bool) { +func (o *PartyIdentification) GetDateOfBirthOk() (*string, bool) { if o == nil || common.IsNil(o.DateOfBirth) { return nil, false } @@ -107,7 +107,7 @@ func (o *PartyIdentification2) GetDateOfBirthOk() (*string, bool) { } // HasDateOfBirth returns a boolean if a field has been set. -func (o *PartyIdentification2) HasDateOfBirth() bool { +func (o *PartyIdentification) HasDateOfBirth() bool { if o != nil && !common.IsNil(o.DateOfBirth) { return true } @@ -116,12 +116,12 @@ func (o *PartyIdentification2) HasDateOfBirth() bool { } // SetDateOfBirth gets a reference to the given string and assigns it to the DateOfBirth field. -func (o *PartyIdentification2) SetDateOfBirth(v string) { +func (o *PartyIdentification) SetDateOfBirth(v string) { o.DateOfBirth = &v } // GetFirstName returns the FirstName field value if set, zero value otherwise. -func (o *PartyIdentification2) GetFirstName() string { +func (o *PartyIdentification) GetFirstName() string { if o == nil || common.IsNil(o.FirstName) { var ret string return ret @@ -131,7 +131,7 @@ func (o *PartyIdentification2) GetFirstName() string { // GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartyIdentification2) GetFirstNameOk() (*string, bool) { +func (o *PartyIdentification) GetFirstNameOk() (*string, bool) { if o == nil || common.IsNil(o.FirstName) { return nil, false } @@ -139,7 +139,7 @@ func (o *PartyIdentification2) GetFirstNameOk() (*string, bool) { } // HasFirstName returns a boolean if a field has been set. -func (o *PartyIdentification2) HasFirstName() bool { +func (o *PartyIdentification) HasFirstName() bool { if o != nil && !common.IsNil(o.FirstName) { return true } @@ -148,12 +148,12 @@ func (o *PartyIdentification2) HasFirstName() bool { } // SetFirstName gets a reference to the given string and assigns it to the FirstName field. -func (o *PartyIdentification2) SetFirstName(v string) { +func (o *PartyIdentification) SetFirstName(v string) { o.FirstName = &v } // GetFullName returns the FullName field value -func (o *PartyIdentification2) GetFullName() string { +func (o *PartyIdentification) GetFullName() string { if o == nil { var ret string return ret @@ -164,7 +164,7 @@ func (o *PartyIdentification2) GetFullName() string { // GetFullNameOk returns a tuple with the FullName field value // and a boolean to check if the value has been set. -func (o *PartyIdentification2) GetFullNameOk() (*string, bool) { +func (o *PartyIdentification) GetFullNameOk() (*string, bool) { if o == nil { return nil, false } @@ -172,12 +172,12 @@ func (o *PartyIdentification2) GetFullNameOk() (*string, bool) { } // SetFullName sets field value -func (o *PartyIdentification2) SetFullName(v string) { +func (o *PartyIdentification) SetFullName(v string) { o.FullName = v } // GetLastName returns the LastName field value if set, zero value otherwise. -func (o *PartyIdentification2) GetLastName() string { +func (o *PartyIdentification) GetLastName() string { if o == nil || common.IsNil(o.LastName) { var ret string return ret @@ -187,7 +187,7 @@ func (o *PartyIdentification2) GetLastName() string { // GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PartyIdentification2) GetLastNameOk() (*string, bool) { +func (o *PartyIdentification) GetLastNameOk() (*string, bool) { if o == nil || common.IsNil(o.LastName) { return nil, false } @@ -195,7 +195,7 @@ func (o *PartyIdentification2) GetLastNameOk() (*string, bool) { } // HasLastName returns a boolean if a field has been set. -func (o *PartyIdentification2) HasLastName() bool { +func (o *PartyIdentification) HasLastName() bool { if o != nil && !common.IsNil(o.LastName) { return true } @@ -204,12 +204,12 @@ func (o *PartyIdentification2) HasLastName() bool { } // SetLastName gets a reference to the given string and assigns it to the LastName field. -func (o *PartyIdentification2) SetLastName(v string) { +func (o *PartyIdentification) SetLastName(v string) { o.LastName = &v } // GetReference returns the Reference field value if set, zero value otherwise. -func (o *PartyIdentification2) GetReference() string { +func (o *PartyIdentification) GetReference() string { if o == nil || common.IsNil(o.Reference) { var ret string return ret @@ -219,7 +219,7 @@ func (o *PartyIdentification2) GetReference() string { // 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 *PartyIdentification2) GetReferenceOk() (*string, bool) { +func (o *PartyIdentification) GetReferenceOk() (*string, bool) { if o == nil || common.IsNil(o.Reference) { return nil, false } @@ -227,7 +227,7 @@ func (o *PartyIdentification2) GetReferenceOk() (*string, bool) { } // HasReference returns a boolean if a field has been set. -func (o *PartyIdentification2) HasReference() bool { +func (o *PartyIdentification) HasReference() bool { if o != nil && !common.IsNil(o.Reference) { return true } @@ -236,12 +236,12 @@ func (o *PartyIdentification2) HasReference() bool { } // SetReference gets a reference to the given string and assigns it to the Reference field. -func (o *PartyIdentification2) SetReference(v string) { +func (o *PartyIdentification) SetReference(v string) { o.Reference = &v } // GetType returns the Type field value if set, zero value otherwise. -func (o *PartyIdentification2) GetType() string { +func (o *PartyIdentification) GetType() string { if o == nil || common.IsNil(o.Type) { var ret string return ret @@ -251,7 +251,7 @@ func (o *PartyIdentification2) GetType() string { // 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 *PartyIdentification2) GetTypeOk() (*string, bool) { +func (o *PartyIdentification) GetTypeOk() (*string, bool) { if o == nil || common.IsNil(o.Type) { return nil, false } @@ -259,7 +259,7 @@ func (o *PartyIdentification2) GetTypeOk() (*string, bool) { } // HasType returns a boolean if a field has been set. -func (o *PartyIdentification2) HasType() bool { +func (o *PartyIdentification) HasType() bool { if o != nil && !common.IsNil(o.Type) { return true } @@ -268,11 +268,11 @@ func (o *PartyIdentification2) HasType() bool { } // SetType gets a reference to the given string and assigns it to the Type field. -func (o *PartyIdentification2) SetType(v string) { +func (o *PartyIdentification) SetType(v string) { o.Type = &v } -func (o PartyIdentification2) MarshalJSON() ([]byte, error) { +func (o PartyIdentification) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -280,7 +280,7 @@ func (o PartyIdentification2) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PartyIdentification2) ToMap() (map[string]interface{}, error) { +func (o PartyIdentification) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !common.IsNil(o.Address) { toSerialize["address"] = o.Address @@ -304,43 +304,43 @@ func (o PartyIdentification2) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -type NullablePartyIdentification2 struct { - value *PartyIdentification2 +type NullablePartyIdentification struct { + value *PartyIdentification isSet bool } -func (v NullablePartyIdentification2) Get() *PartyIdentification2 { +func (v NullablePartyIdentification) Get() *PartyIdentification { return v.value } -func (v *NullablePartyIdentification2) Set(val *PartyIdentification2) { +func (v *NullablePartyIdentification) Set(val *PartyIdentification) { v.value = val v.isSet = true } -func (v NullablePartyIdentification2) IsSet() bool { +func (v NullablePartyIdentification) IsSet() bool { return v.isSet } -func (v *NullablePartyIdentification2) Unset() { +func (v *NullablePartyIdentification) Unset() { v.value = nil v.isSet = false } -func NewNullablePartyIdentification2(val *PartyIdentification2) *NullablePartyIdentification2 { - return &NullablePartyIdentification2{value: val, isSet: true} +func NewNullablePartyIdentification(val *PartyIdentification) *NullablePartyIdentification { + return &NullablePartyIdentification{value: val, isSet: true} } -func (v NullablePartyIdentification2) MarshalJSON() ([]byte, error) { +func (v NullablePartyIdentification) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePartyIdentification2) UnmarshalJSON(src []byte) error { +func (v *NullablePartyIdentification) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } -func (o *PartyIdentification2) isValidType() bool { +func (o *PartyIdentification) isValidType() bool { var allowedEnumValues = []string{"individual", "organization", "unknown"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { diff --git a/src/transfers/model_payment_instrument.go b/src/transfers/model_payment_instrument.go index 76e329e1e..e3870a7b4 100644 --- a/src/transfers/model_payment_instrument.go +++ b/src/transfers/model_payment_instrument.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_pl_local_account_identification.go b/src/transfers/model_pl_local_account_identification.go index 3156f8368..fcf1e72a5 100644 --- a/src/transfers/model_pl_local_account_identification.go +++ b/src/transfers/model_pl_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_platform_payment.go b/src/transfers/model_platform_payment.go new file mode 100644 index 000000000..05e336d81 --- /dev/null +++ b/src/transfers/model_platform_payment.go @@ -0,0 +1,333 @@ +/* +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/v7/src/common" +) + +// checks if the PlatformPayment type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &PlatformPayment{} + +// PlatformPayment struct for PlatformPayment +type PlatformPayment struct { + // The capture's merchant reference included in the transfer. + ModificationMerchantReference *string `json:"modificationMerchantReference,omitempty"` + // The capture reference included in the transfer. + ModificationPspReference *string `json:"modificationPspReference,omitempty"` + // The payment's merchant reference included in the transfer. + PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` + // The type of the related split. + PlatformPaymentType *string `json:"platformPaymentType,omitempty"` + // The payment reference included in the transfer. + PspPaymentReference *string `json:"pspPaymentReference,omitempty"` + // **platformPayment** + Type *string `json:"type,omitempty"` +} + +// NewPlatformPayment instantiates a new PlatformPayment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatformPayment() *PlatformPayment { + this := PlatformPayment{} + var type_ string = "platformPayment" + this.Type = &type_ + return &this +} + +// NewPlatformPaymentWithDefaults instantiates a new PlatformPayment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformPaymentWithDefaults() *PlatformPayment { + this := PlatformPayment{} + var type_ string = "platformPayment" + this.Type = &type_ + return &this +} + +// GetModificationMerchantReference returns the ModificationMerchantReference field value if set, zero value otherwise. +func (o *PlatformPayment) GetModificationMerchantReference() string { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + var ret string + return ret + } + return *o.ModificationMerchantReference +} + +// GetModificationMerchantReferenceOk returns a tuple with the ModificationMerchantReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetModificationMerchantReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationMerchantReference) { + return nil, false + } + return o.ModificationMerchantReference, true +} + +// HasModificationMerchantReference returns a boolean if a field has been set. +func (o *PlatformPayment) HasModificationMerchantReference() bool { + if o != nil && !common.IsNil(o.ModificationMerchantReference) { + return true + } + + return false +} + +// SetModificationMerchantReference gets a reference to the given string and assigns it to the ModificationMerchantReference field. +func (o *PlatformPayment) SetModificationMerchantReference(v string) { + o.ModificationMerchantReference = &v +} + +// GetModificationPspReference returns the ModificationPspReference field value if set, zero value otherwise. +func (o *PlatformPayment) GetModificationPspReference() string { + if o == nil || common.IsNil(o.ModificationPspReference) { + var ret string + return ret + } + return *o.ModificationPspReference +} + +// GetModificationPspReferenceOk returns a tuple with the ModificationPspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetModificationPspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.ModificationPspReference) { + return nil, false + } + return o.ModificationPspReference, true +} + +// HasModificationPspReference returns a boolean if a field has been set. +func (o *PlatformPayment) HasModificationPspReference() bool { + if o != nil && !common.IsNil(o.ModificationPspReference) { + return true + } + + return false +} + +// SetModificationPspReference gets a reference to the given string and assigns it to the ModificationPspReference field. +func (o *PlatformPayment) SetModificationPspReference(v string) { + o.ModificationPspReference = &v +} + +// GetPaymentMerchantReference returns the PaymentMerchantReference field value if set, zero value otherwise. +func (o *PlatformPayment) GetPaymentMerchantReference() string { + if o == nil || common.IsNil(o.PaymentMerchantReference) { + var ret string + return ret + } + return *o.PaymentMerchantReference +} + +// GetPaymentMerchantReferenceOk returns a tuple with the PaymentMerchantReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetPaymentMerchantReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PaymentMerchantReference) { + return nil, false + } + return o.PaymentMerchantReference, true +} + +// HasPaymentMerchantReference returns a boolean if a field has been set. +func (o *PlatformPayment) HasPaymentMerchantReference() bool { + if o != nil && !common.IsNil(o.PaymentMerchantReference) { + return true + } + + return false +} + +// SetPaymentMerchantReference gets a reference to the given string and assigns it to the PaymentMerchantReference field. +func (o *PlatformPayment) SetPaymentMerchantReference(v string) { + o.PaymentMerchantReference = &v +} + +// GetPlatformPaymentType returns the PlatformPaymentType field value if set, zero value otherwise. +func (o *PlatformPayment) GetPlatformPaymentType() string { + if o == nil || common.IsNil(o.PlatformPaymentType) { + var ret string + return ret + } + return *o.PlatformPaymentType +} + +// GetPlatformPaymentTypeOk returns a tuple with the PlatformPaymentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetPlatformPaymentTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.PlatformPaymentType) { + return nil, false + } + return o.PlatformPaymentType, true +} + +// HasPlatformPaymentType returns a boolean if a field has been set. +func (o *PlatformPayment) HasPlatformPaymentType() bool { + if o != nil && !common.IsNil(o.PlatformPaymentType) { + return true + } + + return false +} + +// SetPlatformPaymentType gets a reference to the given string and assigns it to the PlatformPaymentType field. +func (o *PlatformPayment) SetPlatformPaymentType(v string) { + o.PlatformPaymentType = &v +} + +// GetPspPaymentReference returns the PspPaymentReference field value if set, zero value otherwise. +func (o *PlatformPayment) GetPspPaymentReference() string { + if o == nil || common.IsNil(o.PspPaymentReference) { + var ret string + return ret + } + return *o.PspPaymentReference +} + +// GetPspPaymentReferenceOk returns a tuple with the PspPaymentReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetPspPaymentReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PspPaymentReference) { + return nil, false + } + return o.PspPaymentReference, true +} + +// HasPspPaymentReference returns a boolean if a field has been set. +func (o *PlatformPayment) HasPspPaymentReference() bool { + if o != nil && !common.IsNil(o.PspPaymentReference) { + return true + } + + return false +} + +// SetPspPaymentReference gets a reference to the given string and assigns it to the PspPaymentReference field. +func (o *PlatformPayment) SetPspPaymentReference(v string) { + o.PspPaymentReference = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PlatformPayment) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PlatformPayment) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PlatformPayment) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PlatformPayment) SetType(v string) { + o.Type = &v +} + +func (o PlatformPayment) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PlatformPayment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ModificationMerchantReference) { + toSerialize["modificationMerchantReference"] = o.ModificationMerchantReference + } + if !common.IsNil(o.ModificationPspReference) { + toSerialize["modificationPspReference"] = o.ModificationPspReference + } + if !common.IsNil(o.PaymentMerchantReference) { + toSerialize["paymentMerchantReference"] = o.PaymentMerchantReference + } + if !common.IsNil(o.PlatformPaymentType) { + toSerialize["platformPaymentType"] = o.PlatformPaymentType + } + if !common.IsNil(o.PspPaymentReference) { + toSerialize["pspPaymentReference"] = o.PspPaymentReference + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullablePlatformPayment struct { + value *PlatformPayment + isSet bool +} + +func (v NullablePlatformPayment) Get() *PlatformPayment { + return v.value +} + +func (v *NullablePlatformPayment) Set(val *PlatformPayment) { + v.value = val + v.isSet = true +} + +func (v NullablePlatformPayment) IsSet() bool { + return v.isSet +} + +func (v *NullablePlatformPayment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlatformPayment(val *PlatformPayment) *NullablePlatformPayment { + return &NullablePlatformPayment{value: val, isSet: true} +} + +func (v NullablePlatformPayment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlatformPayment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *PlatformPayment) isValidPlatformPaymentType() bool { + var allowedEnumValues = []string{"AcquiringFees", "AdyenCommission", "AdyenFees", "AdyenMarkup", "BalanceAccount", "Commission", "Default", "Interchange", "PaymentFee", "Remainder", "SchemeFee", "TopUp", "VAT"} + for _, allowed := range allowedEnumValues { + if o.GetPlatformPaymentType() == allowed { + return true + } + } + return false +} +func (o *PlatformPayment) isValidType() bool { + var allowedEnumValues = []string{"platformPayment"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_relayed_authorisation_data.go b/src/transfers/model_relayed_authorisation_data.go new file mode 100644 index 000000000..a120edfdd --- /dev/null +++ b/src/transfers/model_relayed_authorisation_data.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/v7/src/common" +) + +// checks if the RelayedAuthorisationData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RelayedAuthorisationData{} + +// RelayedAuthorisationData struct for RelayedAuthorisationData +type RelayedAuthorisationData struct { + // Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. + Metadata *map[string]string `json:"metadata,omitempty"` + // Your reference for the relayed authorisation data. + Reference *string `json:"reference,omitempty"` +} + +// NewRelayedAuthorisationData instantiates a new RelayedAuthorisationData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRelayedAuthorisationData() *RelayedAuthorisationData { + this := RelayedAuthorisationData{} + return &this +} + +// NewRelayedAuthorisationDataWithDefaults instantiates a new RelayedAuthorisationData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRelayedAuthorisationDataWithDefaults() *RelayedAuthorisationData { + this := RelayedAuthorisationData{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *RelayedAuthorisationData) GetMetadata() map[string]string { + if o == nil || common.IsNil(o.Metadata) { + var ret map[string]string + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelayedAuthorisationData) GetMetadataOk() (*map[string]string, bool) { + if o == nil || common.IsNil(o.Metadata) { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *RelayedAuthorisationData) HasMetadata() bool { + if o != nil && !common.IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. +func (o *RelayedAuthorisationData) SetMetadata(v map[string]string) { + o.Metadata = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *RelayedAuthorisationData) GetReference() string { + if o == nil || common.IsNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelayedAuthorisationData) GetReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *RelayedAuthorisationData) HasReference() bool { + if o != nil && !common.IsNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *RelayedAuthorisationData) SetReference(v string) { + o.Reference = &v +} + +func (o RelayedAuthorisationData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RelayedAuthorisationData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +type NullableRelayedAuthorisationData struct { + value *RelayedAuthorisationData + isSet bool +} + +func (v NullableRelayedAuthorisationData) Get() *RelayedAuthorisationData { + return v.value +} + +func (v *NullableRelayedAuthorisationData) Set(val *RelayedAuthorisationData) { + v.value = val + v.isSet = true +} + +func (v NullableRelayedAuthorisationData) IsSet() bool { + return v.isSet +} + +func (v *NullableRelayedAuthorisationData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelayedAuthorisationData(val *RelayedAuthorisationData) *NullableRelayedAuthorisationData { + return &NullableRelayedAuthorisationData{value: val, isSet: true} +} + +func (v NullableRelayedAuthorisationData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelayedAuthorisationData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_repayment.go b/src/transfers/model_repayment.go index da7e47e94..12591bdc5 100644 --- a/src/transfers/model_repayment.go +++ b/src/transfers/model_repayment.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_repayment_term.go b/src/transfers/model_repayment_term.go index 3eec8a274..1ceb23c6d 100644 --- a/src/transfers/model_repayment_term.go +++ b/src/transfers/model_repayment_term.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_resource_reference.go b/src/transfers/model_resource_reference.go index 14b8f1243..d5fe974ec 100644 --- a/src/transfers/model_resource_reference.go +++ b/src/transfers/model_resource_reference.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_rest_service_error.go b/src/transfers/model_rest_service_error.go index d1a239f84..4045f5bc4 100644 --- a/src/transfers/model_rest_service_error.go +++ b/src/transfers/model_rest_service_error.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_return_transfer_request.go b/src/transfers/model_return_transfer_request.go new file mode 100644 index 000000000..bada7f5ac --- /dev/null +++ b/src/transfers/model_return_transfer_request.go @@ -0,0 +1,152 @@ +/* +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/v7/src/common" +) + +// checks if the ReturnTransferRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ReturnTransferRequest{} + +// ReturnTransferRequest struct for ReturnTransferRequest +type ReturnTransferRequest struct { + Amount Amount `json:"amount"` + // Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). + Reference *string `json:"reference,omitempty"` +} + +// NewReturnTransferRequest instantiates a new ReturnTransferRequest 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 NewReturnTransferRequest(amount Amount) *ReturnTransferRequest { + this := ReturnTransferRequest{} + this.Amount = amount + return &this +} + +// NewReturnTransferRequestWithDefaults instantiates a new ReturnTransferRequest 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 NewReturnTransferRequestWithDefaults() *ReturnTransferRequest { + this := ReturnTransferRequest{} + return &this +} + +// GetAmount returns the Amount field value +func (o *ReturnTransferRequest) 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 *ReturnTransferRequest) GetAmountOk() (*Amount, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *ReturnTransferRequest) SetAmount(v Amount) { + o.Amount = v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *ReturnTransferRequest) 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 *ReturnTransferRequest) 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 *ReturnTransferRequest) 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 *ReturnTransferRequest) SetReference(v string) { + o.Reference = &v +} + +func (o ReturnTransferRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReturnTransferRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +type NullableReturnTransferRequest struct { + value *ReturnTransferRequest + isSet bool +} + +func (v NullableReturnTransferRequest) Get() *ReturnTransferRequest { + return v.value +} + +func (v *NullableReturnTransferRequest) Set(val *ReturnTransferRequest) { + v.value = val + v.isSet = true +} + +func (v NullableReturnTransferRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableReturnTransferRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReturnTransferRequest(val *ReturnTransferRequest) *NullableReturnTransferRequest { + return &NullableReturnTransferRequest{value: val, isSet: true} +} + +func (v NullableReturnTransferRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReturnTransferRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_return_transfer_response.go b/src/transfers/model_return_transfer_response.go new file mode 100644 index 000000000..4ff153281 --- /dev/null +++ b/src/transfers/model_return_transfer_response.go @@ -0,0 +1,246 @@ +/* +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/v7/src/common" +) + +// checks if the ReturnTransferResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ReturnTransferResponse{} + +// ReturnTransferResponse struct for ReturnTransferResponse +type ReturnTransferResponse struct { + // The unique identifier of the return. + Id *string `json:"id,omitempty"` + // Your internal reference for the return. + Reference *string `json:"reference,omitempty"` + // The resulting status of the return. For example: **authorised**, **booked**, **error**. + Status *string `json:"status,omitempty"` + // The unique identifier of the original transfer. + TransferId *string `json:"transferId,omitempty"` +} + +// NewReturnTransferResponse instantiates a new ReturnTransferResponse 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 NewReturnTransferResponse() *ReturnTransferResponse { + this := ReturnTransferResponse{} + return &this +} + +// NewReturnTransferResponseWithDefaults instantiates a new ReturnTransferResponse 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 NewReturnTransferResponseWithDefaults() *ReturnTransferResponse { + this := ReturnTransferResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) SetId(v string) { + o.Id = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) SetReference(v string) { + o.Reference = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) 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 *ReturnTransferResponse) SetStatus(v string) { + o.Status = &v +} + +// GetTransferId returns the TransferId field value if set, zero value otherwise. +func (o *ReturnTransferResponse) GetTransferId() string { + if o == nil || common.IsNil(o.TransferId) { + var ret string + return ret + } + return *o.TransferId +} + +// GetTransferIdOk returns a tuple with the TransferId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReturnTransferResponse) GetTransferIdOk() (*string, bool) { + if o == nil || common.IsNil(o.TransferId) { + return nil, false + } + return o.TransferId, true +} + +// HasTransferId returns a boolean if a field has been set. +func (o *ReturnTransferResponse) HasTransferId() bool { + if o != nil && !common.IsNil(o.TransferId) { + return true + } + + return false +} + +// SetTransferId gets a reference to the given string and assigns it to the TransferId field. +func (o *ReturnTransferResponse) SetTransferId(v string) { + o.TransferId = &v +} + +func (o ReturnTransferResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReturnTransferResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.TransferId) { + toSerialize["transferId"] = o.TransferId + } + return toSerialize, nil +} + +type NullableReturnTransferResponse struct { + value *ReturnTransferResponse + isSet bool +} + +func (v NullableReturnTransferResponse) Get() *ReturnTransferResponse { + return v.value +} + +func (v *NullableReturnTransferResponse) Set(val *ReturnTransferResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReturnTransferResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReturnTransferResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReturnTransferResponse(val *ReturnTransferResponse) *NullableReturnTransferResponse { + return &NullableReturnTransferResponse{value: val, isSet: true} +} + +func (v NullableReturnTransferResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReturnTransferResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *ReturnTransferResponse) isValidStatus() bool { + var allowedEnumValues = []string{"Authorised", "Declined"} + for _, allowed := range allowedEnumValues { + if o.GetStatus() == allowed { + return true + } + } + return false +} diff --git a/src/transfers/model_se_local_account_identification.go b/src/transfers/model_se_local_account_identification.go index 3d86666e6..ac478db23 100644 --- a/src/transfers/model_se_local_account_identification.go +++ b/src/transfers/model_se_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_service_error.go b/src/transfers/model_service_error.go new file mode 100644 index 000000000..abbf323dc --- /dev/null +++ b/src/transfers/model_service_error.go @@ -0,0 +1,273 @@ +/* +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/v7/src/common" +) + +// checks if the ServiceError type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ServiceError{} + +// ServiceError struct for ServiceError +type ServiceError struct { + // The error code mapped to the error message. + ErrorCode *string `json:"errorCode,omitempty"` + // The category of the error. + ErrorType *string `json:"errorType,omitempty"` + // A short explanation of the issue. + Message *string `json:"message,omitempty"` + // The PSP reference of the payment. + PspReference *string `json:"pspReference,omitempty"` + // The HTTP response status. + Status *int32 `json:"status,omitempty"` +} + +// NewServiceError instantiates a new ServiceError 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 NewServiceError() *ServiceError { + this := ServiceError{} + return &this +} + +// NewServiceErrorWithDefaults instantiates a new ServiceError 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 NewServiceErrorWithDefaults() *ServiceError { + this := ServiceError{} + return &this +} + +// GetErrorCode returns the ErrorCode field value if set, zero value otherwise. +func (o *ServiceError) 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 *ServiceError) 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 *ServiceError) 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 *ServiceError) SetErrorCode(v string) { + o.ErrorCode = &v +} + +// GetErrorType returns the ErrorType field value if set, zero value otherwise. +func (o *ServiceError) GetErrorType() string { + if o == nil || common.IsNil(o.ErrorType) { + var ret string + return ret + } + return *o.ErrorType +} + +// GetErrorTypeOk returns a tuple with the ErrorType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceError) GetErrorTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.ErrorType) { + return nil, false + } + return o.ErrorType, true +} + +// HasErrorType returns a boolean if a field has been set. +func (o *ServiceError) HasErrorType() bool { + if o != nil && !common.IsNil(o.ErrorType) { + return true + } + + return false +} + +// SetErrorType gets a reference to the given string and assigns it to the ErrorType field. +func (o *ServiceError) SetErrorType(v string) { + o.ErrorType = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ServiceError) GetMessage() string { + if o == nil || common.IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceError) GetMessageOk() (*string, bool) { + if o == nil || common.IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ServiceError) HasMessage() bool { + if o != nil && !common.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ServiceError) SetMessage(v string) { + o.Message = &v +} + +// GetPspReference returns the PspReference field value if set, zero value otherwise. +func (o *ServiceError) GetPspReference() string { + if o == nil || common.IsNil(o.PspReference) { + var ret string + return ret + } + return *o.PspReference +} + +// GetPspReferenceOk returns a tuple with the PspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceError) GetPspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.PspReference) { + return nil, false + } + return o.PspReference, true +} + +// HasPspReference returns a boolean if a field has been set. +func (o *ServiceError) HasPspReference() bool { + if o != nil && !common.IsNil(o.PspReference) { + return true + } + + return false +} + +// SetPspReference gets a reference to the given string and assigns it to the PspReference field. +func (o *ServiceError) SetPspReference(v string) { + o.PspReference = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ServiceError) 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 *ServiceError) 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 *ServiceError) 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 *ServiceError) SetStatus(v int32) { + o.Status = &v +} + +func (o ServiceError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.ErrorCode) { + toSerialize["errorCode"] = o.ErrorCode + } + if !common.IsNil(o.ErrorType) { + toSerialize["errorType"] = o.ErrorType + } + if !common.IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !common.IsNil(o.PspReference) { + toSerialize["pspReference"] = o.PspReference + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableServiceError struct { + value *ServiceError + isSet bool +} + +func (v NullableServiceError) Get() *ServiceError { + return v.value +} + +func (v *NullableServiceError) Set(val *ServiceError) { + v.value = val + v.isSet = true +} + +func (v NullableServiceError) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceError(val *ServiceError) *NullableServiceError { + return &NullableServiceError{value: val, isSet: true} +} + +func (v NullableServiceError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_sg_local_account_identification.go b/src/transfers/model_sg_local_account_identification.go index 7e92c1ae3..e71639d6f 100644 --- a/src/transfers/model_sg_local_account_identification.go +++ b/src/transfers/model_sg_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_threshold_repayment.go b/src/transfers/model_threshold_repayment.go index 1e5701091..5406c757d 100644 --- a/src/transfers/model_threshold_repayment.go +++ b/src/transfers/model_threshold_repayment.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_transaction.go b/src/transfers/model_transaction.go index f3840b73b..09d3fd890 100644 --- a/src/transfers/model_transaction.go +++ b/src/transfers/model_transaction.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,41 +20,22 @@ var _ common.MappedNullable = &Transaction{} // Transaction struct for Transaction type Transaction struct { - // Unique identifier of the account holder. - AccountHolderId string `json:"accountHolderId"` - Amount Amount `json:"amount"` - // Unique identifier of the balance account. - BalanceAccountId string `json:"balanceAccountId"` - // Unique identifier of the balance platform. + AccountHolder ResourceReference `json:"accountHolder"` + Amount Amount `json:"amount"` + BalanceAccount ResourceReference `json:"balanceAccount"` + // The unique identifier of the balance platform. BalancePlatform string `json:"balancePlatform"` - // The date the transaction was booked to the balance account. + // The date the transaction was booked into the balance account. BookingDate time.Time `json:"bookingDate"` - // The category of the transaction indicating the type of activity. Possible values: * **platformPayment**: The transaction is a payment or payment modification made with an Adyen merchant account. * **internal**: The transaction resulted from an internal adjustment such as a deposit correction or invoice deduction. * **bank**: The transaction is a bank-related activity, such as sending a payout or receiving funds. * **issuedCard**: The transaction is a card-related activity, such as using an Adyen-issued card to pay online. - Category *string `json:"category,omitempty"` - Counterparty CounterpartyV3 `json:"counterparty"` - // The date the transaction was created. - CreatedAt time.Time `json:"createdAt"` // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` - // The `description` from the `/transfers` request. - Description *string `json:"description,omitempty"` - // The PSP reference in the journal. + // The PSP reference of the transaction in the journal. EventId *string `json:"eventId,omitempty"` - // Unique identifier of the transaction. - Id string `json:"id"` - InstructedAmount *Amount `json:"instructedAmount,omitempty"` - // Unique identifier of the payment instrument that was used for the transaction. - PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` - // The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - Reference string `json:"reference"` - // The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - ReferenceForBeneficiary *string `json:"referenceForBeneficiary,omitempty"` + // The unique identifier of the transaction. + Id string `json:"id"` // The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - Status string `json:"status"` - // Unique identifier of the related transfer. - TransferId *string `json:"transferId,omitempty"` - // The type of the transaction. Possible values: **payment**, **capture**, **captureReversal**, **refund** **refundReversal**, **chargeback**, **chargebackReversal**, **secondChargeback**, **atmWithdrawal**, **atmWithdrawalReversal**, **internalTransfer**, **manualCorrection**, **invoiceDeduction**, **depositCorrection**, **bankTransfer**, **miscCost**, **paymentCost**, **fee** - Type *string `json:"type,omitempty"` + Status string `json:"status"` + Transfer *TransferData `json:"transfer,omitempty"` // The date the transfer amount becomes available in the balance account. ValueDate time.Time `json:"valueDate"` } @@ -63,17 +44,14 @@ type Transaction 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 NewTransaction(accountHolderId string, amount Amount, balanceAccountId string, balancePlatform string, bookingDate time.Time, counterparty CounterpartyV3, createdAt time.Time, id string, reference string, status string, valueDate time.Time) *Transaction { +func NewTransaction(accountHolder ResourceReference, amount Amount, balanceAccount ResourceReference, balancePlatform string, bookingDate time.Time, id string, status string, valueDate time.Time) *Transaction { this := Transaction{} - this.AccountHolderId = accountHolderId + this.AccountHolder = accountHolder this.Amount = amount - this.BalanceAccountId = balanceAccountId + this.BalanceAccount = balanceAccount this.BalancePlatform = balancePlatform this.BookingDate = bookingDate - this.Counterparty = counterparty - this.CreatedAt = createdAt this.Id = id - this.Reference = reference this.Status = status this.ValueDate = valueDate return &this @@ -87,28 +65,28 @@ func NewTransactionWithDefaults() *Transaction { return &this } -// GetAccountHolderId returns the AccountHolderId field value -func (o *Transaction) GetAccountHolderId() string { +// GetAccountHolder returns the AccountHolder field value +func (o *Transaction) GetAccountHolder() ResourceReference { if o == nil { - var ret string + var ret ResourceReference return ret } - return o.AccountHolderId + return o.AccountHolder } -// GetAccountHolderIdOk returns a tuple with the AccountHolderId field value +// GetAccountHolderOk returns a tuple with the AccountHolder field value // and a boolean to check if the value has been set. -func (o *Transaction) GetAccountHolderIdOk() (*string, bool) { +func (o *Transaction) GetAccountHolderOk() (*ResourceReference, bool) { if o == nil { return nil, false } - return &o.AccountHolderId, true + return &o.AccountHolder, true } -// SetAccountHolderId sets field value -func (o *Transaction) SetAccountHolderId(v string) { - o.AccountHolderId = v +// SetAccountHolder sets field value +func (o *Transaction) SetAccountHolder(v ResourceReference) { + o.AccountHolder = v } // GetAmount returns the Amount field value @@ -135,28 +113,28 @@ func (o *Transaction) SetAmount(v Amount) { o.Amount = v } -// GetBalanceAccountId returns the BalanceAccountId field value -func (o *Transaction) GetBalanceAccountId() string { +// GetBalanceAccount returns the BalanceAccount field value +func (o *Transaction) GetBalanceAccount() ResourceReference { if o == nil { - var ret string + var ret ResourceReference return ret } - return o.BalanceAccountId + return o.BalanceAccount } -// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value +// GetBalanceAccountOk returns a tuple with the BalanceAccount field value // and a boolean to check if the value has been set. -func (o *Transaction) GetBalanceAccountIdOk() (*string, bool) { +func (o *Transaction) GetBalanceAccountOk() (*ResourceReference, bool) { if o == nil { return nil, false } - return &o.BalanceAccountId, true + return &o.BalanceAccount, true } -// SetBalanceAccountId sets field value -func (o *Transaction) SetBalanceAccountId(v string) { - o.BalanceAccountId = v +// SetBalanceAccount sets field value +func (o *Transaction) SetBalanceAccount(v ResourceReference) { + o.BalanceAccount = v } // GetBalancePlatform returns the BalancePlatform field value @@ -207,86 +185,6 @@ func (o *Transaction) SetBookingDate(v time.Time) { o.BookingDate = v } -// GetCategory returns the Category field value if set, zero value otherwise. -func (o *Transaction) GetCategory() string { - if o == nil || common.IsNil(o.Category) { - var ret string - return ret - } - return *o.Category -} - -// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Transaction) GetCategoryOk() (*string, bool) { - if o == nil || common.IsNil(o.Category) { - return nil, false - } - return o.Category, true -} - -// HasCategory returns a boolean if a field has been set. -func (o *Transaction) HasCategory() bool { - if o != nil && !common.IsNil(o.Category) { - return true - } - - return false -} - -// SetCategory gets a reference to the given string and assigns it to the Category field. -func (o *Transaction) SetCategory(v string) { - o.Category = &v -} - -// GetCounterparty returns the Counterparty field value -func (o *Transaction) GetCounterparty() CounterpartyV3 { - if o == nil { - var ret CounterpartyV3 - return ret - } - - return o.Counterparty -} - -// GetCounterpartyOk returns a tuple with the Counterparty field value -// and a boolean to check if the value has been set. -func (o *Transaction) GetCounterpartyOk() (*CounterpartyV3, bool) { - if o == nil { - return nil, false - } - return &o.Counterparty, true -} - -// SetCounterparty sets field value -func (o *Transaction) SetCounterparty(v CounterpartyV3) { - o.Counterparty = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *Transaction) 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 *Transaction) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *Transaction) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - // GetCreationDate returns the CreationDate field value if set, zero value otherwise. func (o *Transaction) GetCreationDate() time.Time { if o == nil || common.IsNil(o.CreationDate) { @@ -319,38 +217,6 @@ func (o *Transaction) SetCreationDate(v time.Time) { o.CreationDate = &v } -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *Transaction) GetDescription() string { - if o == nil || common.IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Transaction) GetDescriptionOk() (*string, bool) { - if o == nil || common.IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *Transaction) HasDescription() bool { - if o != nil && !common.IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Transaction) SetDescription(v string) { - o.Description = &v -} - // GetEventId returns the EventId field value if set, zero value otherwise. func (o *Transaction) GetEventId() string { if o == nil || common.IsNil(o.EventId) { @@ -407,126 +273,6 @@ func (o *Transaction) SetId(v string) { o.Id = v } -// GetInstructedAmount returns the InstructedAmount field value if set, zero value otherwise. -func (o *Transaction) GetInstructedAmount() Amount { - if o == nil || common.IsNil(o.InstructedAmount) { - var ret Amount - return ret - } - return *o.InstructedAmount -} - -// GetInstructedAmountOk returns a tuple with the InstructedAmount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Transaction) GetInstructedAmountOk() (*Amount, bool) { - if o == nil || common.IsNil(o.InstructedAmount) { - return nil, false - } - return o.InstructedAmount, true -} - -// HasInstructedAmount returns a boolean if a field has been set. -func (o *Transaction) HasInstructedAmount() bool { - if o != nil && !common.IsNil(o.InstructedAmount) { - return true - } - - return false -} - -// SetInstructedAmount gets a reference to the given Amount and assigns it to the InstructedAmount field. -func (o *Transaction) SetInstructedAmount(v Amount) { - o.InstructedAmount = &v -} - -// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. -func (o *Transaction) 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 *Transaction) 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 *Transaction) 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 *Transaction) SetPaymentInstrumentId(v string) { - o.PaymentInstrumentId = &v -} - -// GetReference returns the Reference field value -func (o *Transaction) GetReference() string { - if o == nil { - var ret string - return ret - } - - return o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value -// and a boolean to check if the value has been set. -func (o *Transaction) GetReferenceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Reference, true -} - -// SetReference sets field value -func (o *Transaction) SetReference(v string) { - o.Reference = v -} - -// GetReferenceForBeneficiary returns the ReferenceForBeneficiary field value if set, zero value otherwise. -func (o *Transaction) GetReferenceForBeneficiary() string { - if o == nil || common.IsNil(o.ReferenceForBeneficiary) { - var ret string - return ret - } - return *o.ReferenceForBeneficiary -} - -// GetReferenceForBeneficiaryOk returns a tuple with the ReferenceForBeneficiary field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Transaction) GetReferenceForBeneficiaryOk() (*string, bool) { - if o == nil || common.IsNil(o.ReferenceForBeneficiary) { - return nil, false - } - return o.ReferenceForBeneficiary, true -} - -// HasReferenceForBeneficiary returns a boolean if a field has been set. -func (o *Transaction) HasReferenceForBeneficiary() bool { - if o != nil && !common.IsNil(o.ReferenceForBeneficiary) { - return true - } - - return false -} - -// SetReferenceForBeneficiary gets a reference to the given string and assigns it to the ReferenceForBeneficiary field. -func (o *Transaction) SetReferenceForBeneficiary(v string) { - o.ReferenceForBeneficiary = &v -} - // GetStatus returns the Status field value func (o *Transaction) GetStatus() string { if o == nil { @@ -551,68 +297,36 @@ func (o *Transaction) SetStatus(v string) { o.Status = v } -// GetTransferId returns the TransferId field value if set, zero value otherwise. -func (o *Transaction) GetTransferId() string { - if o == nil || common.IsNil(o.TransferId) { - var ret string +// GetTransfer returns the Transfer field value if set, zero value otherwise. +func (o *Transaction) GetTransfer() TransferData { + if o == nil || common.IsNil(o.Transfer) { + var ret TransferData return ret } - return *o.TransferId + return *o.Transfer } -// GetTransferIdOk returns a tuple with the TransferId field value if set, nil otherwise +// GetTransferOk returns a tuple with the Transfer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Transaction) GetTransferIdOk() (*string, bool) { - if o == nil || common.IsNil(o.TransferId) { +func (o *Transaction) GetTransferOk() (*TransferData, bool) { + if o == nil || common.IsNil(o.Transfer) { return nil, false } - return o.TransferId, true + return o.Transfer, true } -// HasTransferId returns a boolean if a field has been set. -func (o *Transaction) HasTransferId() bool { - if o != nil && !common.IsNil(o.TransferId) { +// HasTransfer returns a boolean if a field has been set. +func (o *Transaction) HasTransfer() bool { + if o != nil && !common.IsNil(o.Transfer) { return true } return false } -// SetTransferId gets a reference to the given string and assigns it to the TransferId field. -func (o *Transaction) SetTransferId(v string) { - o.TransferId = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Transaction) 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 *Transaction) 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 *Transaction) 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 *Transaction) SetType(v string) { - o.Type = &v +// SetTransfer gets a reference to the given TransferData and assigns it to the Transfer field. +func (o *Transaction) SetTransfer(v TransferData) { + o.Transfer = &v } // GetValueDate returns the ValueDate field value @@ -649,42 +363,21 @@ func (o Transaction) MarshalJSON() ([]byte, error) { func (o Transaction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["accountHolderId"] = o.AccountHolderId + toSerialize["accountHolder"] = o.AccountHolder toSerialize["amount"] = o.Amount - toSerialize["balanceAccountId"] = o.BalanceAccountId + toSerialize["balanceAccount"] = o.BalanceAccount toSerialize["balancePlatform"] = o.BalancePlatform toSerialize["bookingDate"] = o.BookingDate - if !common.IsNil(o.Category) { - toSerialize["category"] = o.Category - } - toSerialize["counterparty"] = o.Counterparty - toSerialize["createdAt"] = o.CreatedAt if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate } - if !common.IsNil(o.Description) { - toSerialize["description"] = o.Description - } if !common.IsNil(o.EventId) { toSerialize["eventId"] = o.EventId } toSerialize["id"] = o.Id - if !common.IsNil(o.InstructedAmount) { - toSerialize["instructedAmount"] = o.InstructedAmount - } - if !common.IsNil(o.PaymentInstrumentId) { - toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId - } - toSerialize["reference"] = o.Reference - if !common.IsNil(o.ReferenceForBeneficiary) { - toSerialize["referenceForBeneficiary"] = o.ReferenceForBeneficiary - } toSerialize["status"] = o.Status - if !common.IsNil(o.TransferId) { - toSerialize["transferId"] = o.TransferId - } - if !common.IsNil(o.Type) { - toSerialize["type"] = o.Type + if !common.IsNil(o.Transfer) { + toSerialize["transfer"] = o.Transfer } toSerialize["valueDate"] = o.ValueDate return toSerialize, nil @@ -726,15 +419,6 @@ func (v *NullableTransaction) UnmarshalJSON(src []byte) error { return json.Unmarshal(src, &v.value) } -func (o *Transaction) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "card", "grants", "internal", "issuedCard", "migration", "platformPayment"} - for _, allowed := range allowedEnumValues { - if o.GetCategory() == allowed { - return true - } - } - return false -} func (o *Transaction) isValidStatus() bool { var allowedEnumValues = []string{"booked", "pending"} for _, allowed := range allowedEnumValues { @@ -744,12 +428,3 @@ func (o *Transaction) isValidStatus() bool { } return false } -func (o *Transaction) isValidType() bool { - var allowedEnumValues = []string{"atmWithdrawal", "atmWithdrawalReversal", "balanceAdjustment", "balanceRollover", "bankTransfer", "capture", "captureReversal", "cardTransfer", "chargeback", "chargebackReversal", "depositCorrection", "fee", "grant", "installment", "installmentReversal", "internalTransfer", "invoiceDeduction", "leftover", "manualCorrection", "miscCost", "payment", "paymentCost", "refund", "refundReversal", "repayment", "reserveAdjustment", "secondChargeback"} - for _, allowed := range allowedEnumValues { - if o.GetType() == allowed { - return true - } - } - return false -} diff --git a/src/transfers/model_transaction_search_response.go b/src/transfers/model_transaction_search_response.go index 82787a3f1..24ac08f18 100644 --- a/src/transfers/model_transaction_search_response.go +++ b/src/transfers/model_transaction_search_response.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_transfer.go b/src/transfers/model_transfer.go index ba54ff674..e96dcb355 100644 --- a/src/transfers/model_transfer.go +++ b/src/transfers/model_transfer.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -23,12 +23,10 @@ type Transfer struct { AccountHolder *ResourceReference `json:"accountHolder,omitempty"` Amount Amount `json:"amount"` BalanceAccount *ResourceReference `json:"balanceAccount,omitempty"` - // The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). - // Deprecated - BalanceAccountId *string `json:"balanceAccountId,omitempty"` - // The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. - Category string `json:"category"` - Counterparty CounterpartyV3 `json:"counterparty"` + // The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + Category string `json:"category"` + CategoryData *TransferCategoryData `json:"categoryData,omitempty"` + Counterparty CounterpartyV3 `json:"counterparty"` // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** @@ -38,11 +36,6 @@ type Transfer struct { // The ID of the resource. Id *string `json:"id,omitempty"` PaymentInstrument *PaymentInstrument `json:"paymentInstrument,omitempty"` - // The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) used in the transfer. - // Deprecated - PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` - // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). - Priority *string `json:"priority,omitempty"` // Additional information about the status of the transfer. Reason *string `json:"reason,omitempty"` // Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. @@ -162,41 +155,6 @@ func (o *Transfer) SetBalanceAccount(v ResourceReference) { o.BalanceAccount = &v } -// GetBalanceAccountId returns the BalanceAccountId field value if set, zero value otherwise. -// Deprecated -func (o *Transfer) GetBalanceAccountId() string { - if o == nil || common.IsNil(o.BalanceAccountId) { - var ret string - return ret - } - return *o.BalanceAccountId -} - -// GetBalanceAccountIdOk returns a tuple with the BalanceAccountId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *Transfer) 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 *Transfer) HasBalanceAccountId() bool { - if o != nil && !common.IsNil(o.BalanceAccountId) { - return true - } - - return false -} - -// SetBalanceAccountId gets a reference to the given string and assigns it to the BalanceAccountId field. -// Deprecated -func (o *Transfer) SetBalanceAccountId(v string) { - o.BalanceAccountId = &v -} - // GetCategory returns the Category field value func (o *Transfer) GetCategory() string { if o == nil { @@ -221,6 +179,38 @@ func (o *Transfer) SetCategory(v string) { o.Category = v } +// GetCategoryData returns the CategoryData field value if set, zero value otherwise. +func (o *Transfer) GetCategoryData() TransferCategoryData { + if o == nil || common.IsNil(o.CategoryData) { + var ret TransferCategoryData + return ret + } + return *o.CategoryData +} + +// GetCategoryDataOk returns a tuple with the CategoryData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Transfer) GetCategoryDataOk() (*TransferCategoryData, bool) { + if o == nil || common.IsNil(o.CategoryData) { + return nil, false + } + return o.CategoryData, true +} + +// HasCategoryData returns a boolean if a field has been set. +func (o *Transfer) HasCategoryData() bool { + if o != nil && !common.IsNil(o.CategoryData) { + return true + } + + return false +} + +// SetCategoryData gets a reference to the given TransferCategoryData and assigns it to the CategoryData field. +func (o *Transfer) SetCategoryData(v TransferCategoryData) { + o.CategoryData = &v +} + // GetCounterparty returns the Counterparty field value func (o *Transfer) GetCounterparty() CounterpartyV3 { if o == nil { @@ -405,73 +395,6 @@ func (o *Transfer) SetPaymentInstrument(v PaymentInstrument) { o.PaymentInstrument = &v } -// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. -// Deprecated -func (o *Transfer) GetPaymentInstrumentId() string { - if o == nil || common.IsNil(o.PaymentInstrumentId) { - var ret string - return ret - } - return *o.PaymentInstrumentId -} - -// GetPaymentInstrumentIdOk returns a tuple with the PaymentInstrumentId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *Transfer) 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 *Transfer) HasPaymentInstrumentId() bool { - if o != nil && !common.IsNil(o.PaymentInstrumentId) { - return true - } - - return false -} - -// SetPaymentInstrumentId gets a reference to the given string and assigns it to the PaymentInstrumentId field. -// Deprecated -func (o *Transfer) SetPaymentInstrumentId(v string) { - o.PaymentInstrumentId = &v -} - -// GetPriority returns the Priority field value if set, zero value otherwise. -func (o *Transfer) GetPriority() string { - if o == nil || common.IsNil(o.Priority) { - var ret string - return ret - } - return *o.Priority -} - -// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Transfer) GetPriorityOk() (*string, bool) { - if o == nil || common.IsNil(o.Priority) { - return nil, false - } - return o.Priority, true -} - -// HasPriority returns a boolean if a field has been set. -func (o *Transfer) HasPriority() bool { - if o != nil && !common.IsNil(o.Priority) { - return true - } - - return false -} - -// SetPriority gets a reference to the given string and assigns it to the Priority field. -func (o *Transfer) SetPriority(v string) { - o.Priority = &v -} - // GetReason returns the Reason field value if set, zero value otherwise. func (o *Transfer) GetReason() string { if o == nil || common.IsNil(o.Reason) { @@ -609,10 +532,10 @@ func (o Transfer) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BalanceAccount) { toSerialize["balanceAccount"] = o.BalanceAccount } - if !common.IsNil(o.BalanceAccountId) { - toSerialize["balanceAccountId"] = o.BalanceAccountId - } toSerialize["category"] = o.Category + if !common.IsNil(o.CategoryData) { + toSerialize["categoryData"] = o.CategoryData + } toSerialize["counterparty"] = o.Counterparty if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate @@ -629,12 +552,6 @@ func (o Transfer) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.PaymentInstrument) { toSerialize["paymentInstrument"] = o.PaymentInstrument } - if !common.IsNil(o.PaymentInstrumentId) { - toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId - } - if !common.IsNil(o.Priority) { - toSerialize["priority"] = o.Priority - } if !common.IsNil(o.Reason) { toSerialize["reason"] = o.Reason } @@ -702,17 +619,8 @@ func (o *Transfer) isValidDirection() bool { } return false } -func (o *Transfer) isValidPriority() bool { - var allowedEnumValues = []string{"crossBorder", "directDebit", "fast", "instant", "internal", "regular", "wire"} - for _, allowed := range allowedEnumValues { - if o.GetPriority() == allowed { - return true - } - } - return false -} func (o *Transfer) isValidReason() bool { - var allowedEnumValues = []string{"amountLimitExceeded", "approved", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "error", "notEnoughBalance", "refusedByCounterpartyBank", "routeNotFound", "unknown"} + var allowedEnumValues = []string{"amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declinedByTransactionRule", "error", "notEnoughBalance", "refusedByCounterpartyBank", "routeNotFound", "scaFailed", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true @@ -721,7 +629,7 @@ func (o *Transfer) isValidReason() bool { return false } func (o *Transfer) isValidStatus() bool { - var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "capturedExternally", "chargeback", "chargebackExternally", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "operationAuthorized", "operationBooked", "operationPending", "operationReceived", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refundedExternally", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} + var allowedEnumValues = []string{"approvalPending", "atmWithdrawal", "atmWithdrawalReversalPending", "atmWithdrawalReversed", "authAdjustmentAuthorised", "authAdjustmentError", "authAdjustmentRefused", "authorised", "bankTransfer", "bankTransferPending", "booked", "bookingPending", "cancelled", "capturePending", "captureReversalPending", "captureReversed", "captured", "capturedExternally", "chargeback", "chargebackExternally", "chargebackPending", "chargebackReversalPending", "chargebackReversed", "credited", "depositCorrection", "depositCorrectionPending", "dispute", "disputeClosed", "disputeExpired", "disputeNeedsReview", "error", "expired", "failed", "fee", "feePending", "internalTransfer", "internalTransferPending", "invoiceDeduction", "invoiceDeductionPending", "manualCorrectionPending", "manuallyCorrected", "matchedStatement", "matchedStatementPending", "merchantPayin", "merchantPayinPending", "merchantPayinReversed", "merchantPayinReversedPending", "miscCost", "miscCostPending", "paymentCost", "paymentCostPending", "received", "refundPending", "refundReversalPending", "refundReversed", "refunded", "refundedExternally", "refused", "reserveAdjustment", "reserveAdjustmentPending", "returned", "secondChargeback", "secondChargebackPending", "undefined"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/transfers/model_transfer_category_data.go b/src/transfers/model_transfer_category_data.go new file mode 100644 index 000000000..2bd14af25 --- /dev/null +++ b/src/transfers/model_transfer_category_data.go @@ -0,0 +1,203 @@ +/* +Transfers API + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transfers + +import ( + "encoding/json" + "fmt" +) + +// TransferCategoryData - The relevant data according to the transfer category. +type TransferCategoryData struct { + BankCategoryData *BankCategoryData + InternalCategoryData *InternalCategoryData + IssuedCard *IssuedCard + PlatformPayment *PlatformPayment +} + +// BankCategoryDataAsTransferCategoryData is a convenience function that returns BankCategoryData wrapped in TransferCategoryData +func BankCategoryDataAsTransferCategoryData(v *BankCategoryData) TransferCategoryData { + return TransferCategoryData{ + BankCategoryData: v, + } +} + +// InternalCategoryDataAsTransferCategoryData is a convenience function that returns InternalCategoryData wrapped in TransferCategoryData +func InternalCategoryDataAsTransferCategoryData(v *InternalCategoryData) TransferCategoryData { + return TransferCategoryData{ + InternalCategoryData: v, + } +} + +// IssuedCardAsTransferCategoryData is a convenience function that returns IssuedCard wrapped in TransferCategoryData +func IssuedCardAsTransferCategoryData(v *IssuedCard) TransferCategoryData { + return TransferCategoryData{ + IssuedCard: v, + } +} + +// PlatformPaymentAsTransferCategoryData is a convenience function that returns PlatformPayment wrapped in TransferCategoryData +func PlatformPaymentAsTransferCategoryData(v *PlatformPayment) TransferCategoryData { + return TransferCategoryData{ + PlatformPayment: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TransferCategoryData) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BankCategoryData + err = json.Unmarshal(data, &dst.BankCategoryData) + if err == nil { + jsonBankCategoryData, _ := json.Marshal(dst.BankCategoryData) + if string(jsonBankCategoryData) == "{}" || !dst.BankCategoryData.isValidType() { // empty struct + dst.BankCategoryData = nil + } else { + match++ + } + } else { + dst.BankCategoryData = nil + } + + // try to unmarshal data into InternalCategoryData + err = json.Unmarshal(data, &dst.InternalCategoryData) + if err == nil { + jsonInternalCategoryData, _ := json.Marshal(dst.InternalCategoryData) + if string(jsonInternalCategoryData) == "{}" || !dst.InternalCategoryData.isValidType() { // empty struct + dst.InternalCategoryData = nil + } else { + match++ + } + } else { + dst.InternalCategoryData = nil + } + + // try to unmarshal data into IssuedCard + err = json.Unmarshal(data, &dst.IssuedCard) + if err == nil { + jsonIssuedCard, _ := json.Marshal(dst.IssuedCard) + if string(jsonIssuedCard) == "{}" || !dst.IssuedCard.isValidType() { // empty struct + dst.IssuedCard = nil + } else { + match++ + } + } else { + dst.IssuedCard = nil + } + + // try to unmarshal data into PlatformPayment + err = json.Unmarshal(data, &dst.PlatformPayment) + if err == nil { + jsonPlatformPayment, _ := json.Marshal(dst.PlatformPayment) + if string(jsonPlatformPayment) == "{}" || !dst.PlatformPayment.isValidType() { // empty struct + dst.PlatformPayment = nil + } else { + match++ + } + } else { + dst.PlatformPayment = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BankCategoryData = nil + dst.InternalCategoryData = nil + dst.IssuedCard = nil + dst.PlatformPayment = nil + + return fmt.Errorf("data matches more than one schema in oneOf(TransferCategoryData)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(TransferCategoryData)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TransferCategoryData) MarshalJSON() ([]byte, error) { + if src.BankCategoryData != nil { + return json.Marshal(&src.BankCategoryData) + } + + if src.InternalCategoryData != nil { + return json.Marshal(&src.InternalCategoryData) + } + + if src.IssuedCard != nil { + return json.Marshal(&src.IssuedCard) + } + + if src.PlatformPayment != nil { + return json.Marshal(&src.PlatformPayment) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TransferCategoryData) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.BankCategoryData != nil { + return obj.BankCategoryData + } + + if obj.InternalCategoryData != nil { + return obj.InternalCategoryData + } + + if obj.IssuedCard != nil { + return obj.IssuedCard + } + + if obj.PlatformPayment != nil { + return obj.PlatformPayment + } + + // all schemas are nil + return nil +} + +type NullableTransferCategoryData struct { + value *TransferCategoryData + isSet bool +} + +func (v NullableTransferCategoryData) Get() *TransferCategoryData { + return v.value +} + +func (v *NullableTransferCategoryData) Set(val *TransferCategoryData) { + v.value = val + v.isSet = true +} + +func (v NullableTransferCategoryData) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferCategoryData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferCategoryData(val *TransferCategoryData) *NullableTransferCategoryData { + return &NullableTransferCategoryData{value: val, isSet: true} +} + +func (v NullableTransferCategoryData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferCategoryData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_transfer_data.go b/src/transfers/model_transfer_data.go new file mode 100644 index 000000000..79b623618 --- /dev/null +++ b/src/transfers/model_transfer_data.go @@ -0,0 +1,153 @@ +/* +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/v7/src/common" +) + +// checks if the TransferData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferData{} + +// TransferData struct for TransferData +type TransferData struct { + // The ID of the resource. + Id *string `json:"id,omitempty"` + // The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. + Reference string `json:"reference"` +} + +// NewTransferData instantiates a new TransferData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransferData(reference string) *TransferData { + this := TransferData{} + this.Reference = reference + return &this +} + +// NewTransferDataWithDefaults instantiates a new TransferData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransferDataWithDefaults() *TransferData { + this := TransferData{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TransferData) GetId() string { + if o == nil || common.IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetIdOk() (*string, bool) { + if o == nil || common.IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TransferData) HasId() bool { + if o != nil && !common.IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *TransferData) SetId(v string) { + o.Id = &v +} + +// GetReference returns the Reference field value +func (o *TransferData) GetReference() string { + if o == nil { + var ret string + return ret + } + + return o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value +// and a boolean to check if the value has been set. +func (o *TransferData) GetReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reference, true +} + +// SetReference sets field value +func (o *TransferData) SetReference(v string) { + o.Reference = v +} + +func (o TransferData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["reference"] = o.Reference + return toSerialize, nil +} + +type NullableTransferData struct { + value *TransferData + isSet bool +} + +func (v NullableTransferData) Get() *TransferData { + return v.value +} + +func (v *NullableTransferData) Set(val *TransferData) { + v.value = val + v.isSet = true +} + +func (v NullableTransferData) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferData(val *TransferData) *NullableTransferData { + return &NullableTransferData{value: val, isSet: true} +} + +func (v NullableTransferData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_transfer_info.go b/src/transfers/model_transfer_info.go index 583e624ff..11614ab9b 100644 --- a/src/transfers/model_transfer_info.go +++ b/src/transfers/model_transfer_info.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -27,8 +27,6 @@ type TransferInfo struct { 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"` - // The ID of the resource. - Id *string `json:"id,omitempty"` // The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__resParam_id). PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). @@ -196,38 +194,6 @@ func (o *TransferInfo) SetDescription(v string) { o.Description = &v } -// GetId returns the Id field value if set, zero value otherwise. -func (o *TransferInfo) 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 *TransferInfo) 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 *TransferInfo) 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 *TransferInfo) SetId(v string) { - o.Id = &v -} - // GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. func (o *TransferInfo) GetPaymentInstrumentId() string { if o == nil || common.IsNil(o.PaymentInstrumentId) { @@ -407,9 +373,6 @@ func (o TransferInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Description) { toSerialize["description"] = o.Description } - if !common.IsNil(o.Id) { - toSerialize["id"] = o.Id - } if !common.IsNil(o.PaymentInstrumentId) { toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId } @@ -474,7 +437,7 @@ func (o *TransferInfo) isValidCategory() bool { return false } func (o *TransferInfo) isValidPriority() bool { - var allowedEnumValues = []string{"crossBorder", "directDebit", "fast", "instant", "internal", "regular", "wire"} + var allowedEnumValues = []string{"crossBorder", "fast", "instant", "internal", "regular", "wire"} for _, allowed := range allowedEnumValues { if o.GetPriority() == allowed { return true diff --git a/src/transfers/model_transfer_notification_validation_fact.go b/src/transfers/model_transfer_notification_validation_fact.go new file mode 100644 index 000000000..5d74c7071 --- /dev/null +++ b/src/transfers/model_transfer_notification_validation_fact.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/v7/src/common" +) + +// checks if the TransferNotificationValidationFact type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TransferNotificationValidationFact{} + +// TransferNotificationValidationFact struct for TransferNotificationValidationFact +type TransferNotificationValidationFact struct { + // The evaluation result of the validation fact. + Result *string `json:"result,omitempty"` + // The type of the validation fact. + Type *string `json:"type,omitempty"` +} + +// NewTransferNotificationValidationFact instantiates a new TransferNotificationValidationFact object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransferNotificationValidationFact() *TransferNotificationValidationFact { + this := TransferNotificationValidationFact{} + return &this +} + +// NewTransferNotificationValidationFactWithDefaults instantiates a new TransferNotificationValidationFact object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransferNotificationValidationFactWithDefaults() *TransferNotificationValidationFact { + this := TransferNotificationValidationFact{} + return &this +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *TransferNotificationValidationFact) GetResult() string { + if o == nil || common.IsNil(o.Result) { + var ret string + return ret + } + return *o.Result +} + +// GetResultOk returns a tuple with the Result field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferNotificationValidationFact) GetResultOk() (*string, bool) { + if o == nil || common.IsNil(o.Result) { + return nil, false + } + return o.Result, true +} + +// HasResult returns a boolean if a field has been set. +func (o *TransferNotificationValidationFact) HasResult() bool { + if o != nil && !common.IsNil(o.Result) { + return true + } + + return false +} + +// SetResult gets a reference to the given string and assigns it to the Result field. +func (o *TransferNotificationValidationFact) SetResult(v string) { + o.Result = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *TransferNotificationValidationFact) GetType() string { + if o == nil || common.IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferNotificationValidationFact) GetTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *TransferNotificationValidationFact) HasType() bool { + if o != nil && !common.IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *TransferNotificationValidationFact) SetType(v string) { + o.Type = &v +} + +func (o TransferNotificationValidationFact) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransferNotificationValidationFact) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Result) { + toSerialize["result"] = o.Result + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableTransferNotificationValidationFact struct { + value *TransferNotificationValidationFact + isSet bool +} + +func (v NullableTransferNotificationValidationFact) Get() *TransferNotificationValidationFact { + return v.value +} + +func (v *NullableTransferNotificationValidationFact) Set(val *TransferNotificationValidationFact) { + v.value = val + v.isSet = true +} + +func (v NullableTransferNotificationValidationFact) IsSet() bool { + return v.isSet +} + +func (v *NullableTransferNotificationValidationFact) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransferNotificationValidationFact(val *TransferNotificationValidationFact) *NullableTransferNotificationValidationFact { + return &NullableTransferNotificationValidationFact{value: val, isSet: true} +} + +func (v NullableTransferNotificationValidationFact) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransferNotificationValidationFact) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transfers/model_uk_local_account_identification.go b/src/transfers/model_uk_local_account_identification.go index c345fdad7..69c2ad16a 100644 --- a/src/transfers/model_uk_local_account_identification.go +++ b/src/transfers/model_uk_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/src/transfers/model_ultimate_party_identification.go b/src/transfers/model_ultimate_party_identification.go index fc895397a..c0d08fad4 100644 --- a/src/transfers/model_ultimate_party_identification.go +++ b/src/transfers/model_ultimate_party_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,7 +19,7 @@ var _ common.MappedNullable = &UltimatePartyIdentification{} // UltimatePartyIdentification struct for UltimatePartyIdentification type UltimatePartyIdentification struct { - Address *Address2 `json:"address,omitempty"` + 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**. Should not be before January 1, 1900. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` // First name of the individual. Allowed only when `type` is **individual**. @@ -57,9 +57,9 @@ func NewUltimatePartyIdentificationWithDefaults() *UltimatePartyIdentification { } // GetAddress returns the Address field value if set, zero value otherwise. -func (o *UltimatePartyIdentification) GetAddress() Address2 { +func (o *UltimatePartyIdentification) GetAddress() Address { if o == nil || common.IsNil(o.Address) { - var ret Address2 + var ret Address return ret } return *o.Address @@ -67,7 +67,7 @@ func (o *UltimatePartyIdentification) GetAddress() Address2 { // GetAddressOk returns a tuple with the Address field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UltimatePartyIdentification) GetAddressOk() (*Address2, bool) { +func (o *UltimatePartyIdentification) GetAddressOk() (*Address, bool) { if o == nil || common.IsNil(o.Address) { return nil, false } @@ -83,8 +83,8 @@ func (o *UltimatePartyIdentification) HasAddress() bool { return false } -// SetAddress gets a reference to the given Address2 and assigns it to the Address field. -func (o *UltimatePartyIdentification) SetAddress(v Address2) { +// SetAddress gets a reference to the given Address and assigns it to the Address field. +func (o *UltimatePartyIdentification) SetAddress(v Address) { o.Address = &v } diff --git a/src/transfers/model_us_local_account_identification.go b/src/transfers/model_us_local_account_identification.go index 9787d9b99..cef6ad9e9 100644 --- a/src/transfers/model_us_local_account_identification.go +++ b/src/transfers/model_us_local_account_identification.go @@ -1,7 +1,7 @@ /* Transfers API -API version: 3 +API version: 4 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/tests/balanceplatform_test.go b/tests/balanceplatform_test.go index 6327540c0..9fe475596 100644 --- a/tests/balanceplatform_test.go +++ b/tests/balanceplatform_test.go @@ -154,7 +154,7 @@ func Test_BalancePlatform(t *testing.T) { t.Run("Gateway Timeout error", func(t *testing.T) { req := service.BalanceAccountsApi.CreateBalanceAccountInput().BalanceAccountInfo(balanceplatform.BalanceAccountInfo{ AccountHolderId: "AH123ABC", - Description: common.PtrString("S.Hopper - Main balance account"), + Description: common.PtrString("S.Hopper - Main balance account"), }) _, httpRes, err := service.BalanceAccountsApi.CreateBalanceAccount(context.Background(), req) diff --git a/tests/fixtures/all_transactions.json b/tests/fixtures/all_transactions.json new file mode 100644 index 000000000..35a2a4a5f --- /dev/null +++ b/tests/fixtures/all_transactions.json @@ -0,0 +1,109 @@ +{ + "data": [ + { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T14:51:20+02:00", + "id": "EVJN42272224222B5JB8BRC84N686ZEUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, + "amount": { + "currency": "USD", + "value": -1000 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T14:51:33+02:00", + "eventId": "EVJN42272224222B5JB8BRC84N686Z", + "status": "booked", + "transfer": { + "id": "3JNC3O5ZVFLLGV4B", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T14:51:20+02:00" + }, + { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T15:34:31+02:00", + "id": "EVJN4227C224222B5JB8G3Q89N2NB6EUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, + "amount": { + "currency": "USD", + "value": 123 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T15:34:40+02:00", + "eventId": "EVJN4227C224222B5JB8G3Q89N2NB6", + "status": "booked", + "transfer": { + "id": "48POO45ZVG11166J", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T15:34:31+02:00" + }, + { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-11T13:45:46+02:00", + "id": "EVJN4227C224222B5JBD3XHF8P3L8GUSD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, + "amount": { + "currency": "USD", + "value": -10000 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-11T13:45:57+02:00", + "eventId": "EVJN4227C224222B5JBD3XHF8P3L8G", + "status": "booked", + "transfer": { + "id": "48RTTW5ZVT8KU9DV", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:46+02:00" + }, + { + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-11T13:45:51+02:00", + "id": "EVJN42272224222B5JBD3XJGHF4J26USD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, + "amount": { + "currency": "USD", + "value": 1000 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-11T13:45:58+02:00", + "eventId": "EVJN42272224222B5JBD3XJGHF4J26", + "status": "booked", + "transfer": { + "id": "48TYZO5ZVT8M1K47", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:51+02:00" + } + ], + "_links": { + "next": { + "href": "https://balanceplatform-api-test.adyen.com/btl/v4/transactions?balancePlatform=TestBalancePlatform&createdUntil=2023-08-20T13%3A07%3A40Z&createdSince=2023-08-10T10%3A50%3A40Z&cursor=S2B-c0p1N0tdN0l6RGhYK1YpM0lgOTUyMDlLXElyKE9LMCtyaFEuMj1NMHgidCsrJi1ZNnhqXCtqVi5JPGpRK1F2fCFqWzU33JTojSVNJc1J1VXhncS10QDd6JX9FQFl5Zn0uNyUvSXJNQTo" + } + } +} \ No newline at end of file diff --git a/tests/management/integration_test.go b/tests/management/integration_test.go index 523cb3003..d130b20e4 100644 --- a/tests/management/integration_test.go +++ b/tests/management/integration_test.go @@ -2,15 +2,14 @@ package management import ( "context" - "os" - "reflect" - "testing" - + "errors" "github.com/adyen/adyen-go-api-library/v7/src/adyen" "github.com/adyen/adyen-go-api-library/v7/src/common" "github.com/joho/godotenv" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "os" + "testing" ) func Test_ManagementAPI_Integration(t *testing.T) { @@ -48,12 +47,24 @@ func Test_ManagementAPI_Integration(t *testing.T) { _, httpRes, serviceErr := invalidKeyClient.Management().MyAPICredentialApi.GetApiCredentialDetails(context.Background(), req) - restServiceErr := serviceErr.(common.RestServiceError) + var restServiceErr common.RestServiceError + errors.As(serviceErr, &restServiceErr) assert.Equal(t, 401, httpRes.StatusCode) require.NotNil(t, restServiceErr) }) }) + t.Run("List merchant accounts", func(t *testing.T) { + req := service.AccountMerchantLevelApi.ListMerchantAccountsInput() + req = req.PageNumber(1).PageSize(1) + + resp, httpRes, serviceErr := service.AccountMerchantLevelApi.ListMerchantAccounts(context.Background(), req) + + require.Nil(t, serviceErr) + assert.Equal(t, 200, httpRes.StatusCode) + require.Equal(t, 1, len(resp.Data), "Should contain only one merchant account") + }) + t.Run("List terminals", func(t *testing.T) { req := service.TerminalsTerminalLevelApi.ListTerminalsInput() req = req.Countries("NL").PageSize(1) @@ -71,11 +82,11 @@ func Test_ManagementAPI_Integration(t *testing.T) { _, httpRes, serviceErr := service.AccountCompanyLevelApi.GetCompanyAccount(context.Background(), req) - restServiceErr := serviceErr.(common.RestServiceError) + var restServiceErr common.RestServiceError + errors.As(serviceErr, &restServiceErr) assert.NotEmpty(t, restServiceErr.GetRequestId()) assert.Equal(t, "010", restServiceErr.GetErrorCode()) assert.Equal(t, int32(403), restServiceErr.GetStatus()) assert.Equal(t, 403, httpRes.StatusCode) - assert.Equal(t, reflect.TypeOf(serviceErr), reflect.TypeOf(common.RestServiceError{})) }) } diff --git a/tests/management/unit_test.go b/tests/management/unit_test.go index 514b96b34..3003b066c 100644 --- a/tests/management/unit_test.go +++ b/tests/management/unit_test.go @@ -3,6 +3,7 @@ package management import ( "context" "encoding/json" + "errors" "fmt" "github.com/adyen/adyen-go-api-library/v7/src/adyen" "github.com/adyen/adyen-go-api-library/v7/src/common" @@ -68,11 +69,11 @@ func Test_ManagementAPI(t *testing.T) { testClient := adyen.NewClient(&common.Config{ Environment: common.TestEnv, }) - assert.Equal(t, "https://management-test.adyen.com/v1", testClient.Management().MyAPICredentialApi.BasePath()) + assert.Equal(t, "https://management-test.adyen.com/v3", testClient.Management().MyAPICredentialApi.BasePath()) liveClient := adyen.NewClient(&common.Config{ Environment: common.LiveEnv, }) - assert.Equal(t, "https://management-live.adyen.com/v1", liveClient.Management().WebhooksCompanyLevelApi.BasePath()) + assert.Equal(t, "https://management-live.adyen.com/v3", liveClient.Management().WebhooksCompanyLevelApi.BasePath()) }) t.Run("Test ListCompanyAccounts", func(t *testing.T) { @@ -104,7 +105,8 @@ func Test_ManagementAPI(t *testing.T) { companyId := "notExisting" req := service.AccountCompanyLevelApi.GetCompanyAccountInput(companyId) resp, httpRes, serviceError := service.AccountCompanyLevelApi.GetCompanyAccount(context.Background(), req) - restServiceErr := serviceError.(common.RestServiceError) + var restServiceErr common.RestServiceError + errors.As(serviceError, &restServiceErr) if restServiceErr.ErrorCode != "500" { fmt.Fprintf(os.Stderr, "Error: %v\n", serviceError) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -133,7 +135,8 @@ func Test_ManagementAPI(t *testing.T) { companyId := "notExisting" req := service.AccountCompanyLevelApi.ListMerchantAccountsInput(companyId) resp, httpRes, serviceError := service.AccountCompanyLevelApi.ListMerchantAccounts(context.Background(), req) - restServiceErr := serviceError.(common.RestServiceError) + var restServiceErr common.RestServiceError + errors.As(serviceError, &restServiceErr) if restServiceErr.ErrorCode != "500" { fmt.Fprintf(os.Stderr, "Error: %v\n", serviceError) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) diff --git a/tests/transfers_test.go b/tests/transfers_test.go index d6de33506..5e7f89e85 100644 --- a/tests/transfers_test.go +++ b/tests/transfers_test.go @@ -2,11 +2,14 @@ package tests import ( "context" + "errors" "github.com/adyen/adyen-go-api-library/v7/src/transfers" "io" "net/http" "net/http/httptest" + "os" "testing" + "time" "github.com/adyen/adyen-go-api-library/v7/src/adyen" "github.com/adyen/adyen-go-api-library/v7/src/common" @@ -89,9 +92,16 @@ func Test_Transfers(t *testing.T) { "status": "Pending" }`) }) + mux.HandleFunc("/transactions", func(w http.ResponseWriter, r *http.Request) { + require.Equal(t, "GET", r.Method) + assert.Equal(t, "2022-01-01T01:02:03Z", r.URL.Query().Get("createdSince")) + w.Header().Set("Content-Type", "application/json") + file, _ := os.Open("fixtures/all_transactions.json") + io.Copy(w, file) + }) // Error case - mux.HandleFunc("/transactions", func(w http.ResponseWriter, r *http.Request) { + mux.HandleFunc("/transactions/ERRForbidden403", func(w http.ResponseWriter, r *http.Request) { require.Equal(t, "GET", r.Method) w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusForbidden) @@ -109,6 +119,17 @@ func Test_Transfers(t *testing.T) { client.Transfers().TransfersApi.BasePath = func() string { return mockServer.URL } service := client.Transfers() + t.Run("Configuration", func(t *testing.T) { + testClient := adyen.NewClient(&common.Config{ + Environment: common.TestEnv, + }) + assert.Equal(t, "https://balanceplatform-api-test.adyen.com/btl/v4", testClient.Transfers().CapitalApi.BasePath()) + liveClient := adyen.NewClient(&common.Config{ + Environment: common.LiveEnv, + }) + assert.Equal(t, "https://balanceplatform-api-live.adyen.com/btl/v4", liveClient.Transfers().TransfersApi.BasePath()) + }) + t.Run("make successful transfer", func(t *testing.T) { request := service.TransfersApi.TransferFundsInput() @@ -119,26 +140,40 @@ func Test_Transfers(t *testing.T) { require.Nil(t, err) }) - t.Run("make unsuccessful get transactions call", func(t *testing.T) { - _, httpRes, err := service.TransactionsApi.GetAllTransactions( - context.Background(), - service.TransactionsApi.GetAllTransactionsInput(), - ) + t.Run("Get a transaction", func(t *testing.T) { + req := service.TransactionsApi.GetTransactionInput("ERRForbidden403") + + _, httpRes, err := service.TransactionsApi.GetTransaction(context.Background(), req) assert.Equal(t, 403, httpRes.StatusCode) require.NotNil(t, err) - serviceError := err.(common.RestServiceError) + var serviceError common.RestServiceError + errors.As(err, &serviceError) assert.Equal(t, int32(403), serviceError.Status) assert.Equal(t, "00_403", serviceError.GetErrorCode()) assert.Equal(t, "Forbidden", serviceError.GetTitle()) assert.Equal(t, "Not allowed", serviceError.GetDetail()) }) + t.Run("Get all transactions", func(t *testing.T) { + req := service.TransactionsApi.GetAllTransactionsInput() + since := time.Date(2022, 1, 1, 1, 2, 3, 0, time.UTC) + until := time.Date(2022, 12, 31, 0, 0, 0, 0, time.UTC) + req = req.BalancePlatform("Your balance platform").CreatedSince(since).CreatedUntil(until) + + res, httpRes, err := service.TransactionsApi.GetAllTransactions(context.Background(), req) + + assert.Equal(t, 200, httpRes.StatusCode) + require.NoError(t, err) + require.Len(t, res.Data, 4) + assert.Equal(t, 2023, res.GetData()[0].GetCreationDate().Year()) + }) + t.Run("Request a grant payout", func(t *testing.T) { request := service.CapitalApi.RequestGrantPayoutInput().CapitalGrantInfo(transfers.CapitalGrantInfo{ GrantAccountId: "CG00000000000000000000001", GrantOfferId: "0000000000000001", - Counterparty: &transfers.Counterparty2{ + Counterparty: &transfers.Counterparty{ AccountHolderId: common.PtrString("AH00000000000000000000001"), BalanceAccountId: common.PtrString("BA00000000000000000000001"), },