diff --git a/src/balanceplatform/api_grant_accounts.go b/src/balanceplatform/api_grant_accounts.go index 882603562..98d29e4cb 100644 --- a/src/balanceplatform/api_grant_accounts.go +++ b/src/balanceplatform/api_grant_accounts.go @@ -31,6 +31,9 @@ type GrantAccountsApiGetGrantAccountInput struct { Prepare a request for GetGrantAccount @param id The unique identifier of the grant account. @return GrantAccountsApiGetGrantAccountInput + +Deprecated since Configuration API v2 +Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead. */ func (a *GrantAccountsApi) GetGrantAccountInput(id string) GrantAccountsApiGetGrantAccountInput { return GrantAccountsApiGetGrantAccountInput{ @@ -46,6 +49,9 @@ Returns the details of the [grant account](https://docs.adyen.com/platforms/capi @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GrantAccountsApiGetGrantAccountInput - Request parameters, see GetGrantAccountInput @return CapitalGrantAccount, *http.Response, error + +Deprecated since Configuration API v2 +Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead. */ func (a *GrantAccountsApi) GetGrantAccount(ctx context.Context, r GrantAccountsApiGetGrantAccountInput) (CapitalGrantAccount, *http.Response, error) { res := &CapitalGrantAccount{} diff --git a/src/balanceplatform/api_grant_offers.go b/src/balanceplatform/api_grant_offers.go index e26b1583e..d2cb17526 100644 --- a/src/balanceplatform/api_grant_offers.go +++ b/src/balanceplatform/api_grant_offers.go @@ -37,6 +37,9 @@ func (r GrantOffersApiGetAllAvailableGrantOffersInput) AccountHolderId(accountHo Prepare a request for GetAllAvailableGrantOffers @return GrantOffersApiGetAllAvailableGrantOffersInput + +Deprecated since Configuration API v2 +Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead. */ func (a *GrantOffersApi) GetAllAvailableGrantOffersInput() GrantOffersApiGetAllAvailableGrantOffersInput { return GrantOffersApiGetAllAvailableGrantOffersInput{} @@ -50,6 +53,9 @@ Returns a list of all [grant offers](https://docs.adyen.com/platforms/capital#gr @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GrantOffersApiGetAllAvailableGrantOffersInput - Request parameters, see GetAllAvailableGrantOffersInput @return GrantOffers, *http.Response, error + +Deprecated since Configuration API v2 +Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead. */ func (a *GrantOffersApi) GetAllAvailableGrantOffers(ctx context.Context, r GrantOffersApiGetAllAvailableGrantOffersInput) (GrantOffers, *http.Response, error) { res := &GrantOffers{} @@ -128,6 +134,9 @@ type GrantOffersApiGetGrantOfferInput struct { Prepare a request for GetGrantOffer @param grantOfferId The unique identifier of the grant offer. @return GrantOffersApiGetGrantOfferInput + +Deprecated since Configuration API v2 +Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead. */ func (a *GrantOffersApi) GetGrantOfferInput(grantOfferId string) GrantOffersApiGetGrantOfferInput { return GrantOffersApiGetGrantOfferInput{ @@ -143,6 +152,9 @@ Returns the details of a single grant offer. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param r GrantOffersApiGetGrantOfferInput - Request parameters, see GetGrantOfferInput @return GrantOffer, *http.Response, error + +Deprecated since Configuration API v2 +Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead. */ func (a *GrantOffersApi) GetGrantOffer(ctx context.Context, r GrantOffersApiGetGrantOfferInput) (GrantOffer, *http.Response, error) { res := &GrantOffer{} diff --git a/src/balanceplatform/api_manage_sca_devices.go b/src/balanceplatform/api_manage_sca_devices.go index 7b554b863..f727fab1a 100644 --- a/src/balanceplatform/api_manage_sca_devices.go +++ b/src/balanceplatform/api_manage_sca_devices.go @@ -22,6 +22,105 @@ import ( // ManageSCADevicesApi service type ManageSCADevicesApi common.Service +// All parameters accepted by ManageSCADevicesApi.CompleteAssociationBetweenScaDeviceAndResource +type ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput struct { + deviceId string + associationFinaliseRequest *AssociationFinaliseRequest +} + +func (r ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput) AssociationFinaliseRequest(associationFinaliseRequest AssociationFinaliseRequest) ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput { + r.associationFinaliseRequest = &associationFinaliseRequest + return r +} + +/* +Prepare a request for CompleteAssociationBetweenScaDeviceAndResource +@param deviceId The unique identifier of the SCA device that you are associating with a resource. +@return ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput +*/ +func (a *ManageSCADevicesApi) CompleteAssociationBetweenScaDeviceAndResourceInput(deviceId string) ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput { + return ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput{ + deviceId: deviceId, + } +} + +/* +CompleteAssociationBetweenScaDeviceAndResource Complete an association between an SCA device and a resource + +Completes an association between a user's registered SCA device and an Adyen resource. For example, you can associate an SCA device with additional [business accounts](https://docs.adyen.com/platforms/business-accounts/sca/register-devices) or [Adyen-issued cards](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/register-devices). + +To complete the association, this endpoint validates the authentication data of the registered device. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput - Request parameters, see CompleteAssociationBetweenScaDeviceAndResourceInput +@return AssociationFinaliseResponse, *http.Response, error +*/ +func (a *ManageSCADevicesApi) CompleteAssociationBetweenScaDeviceAndResource(ctx context.Context, r ManageSCADevicesApiCompleteAssociationBetweenScaDeviceAndResourceInput) (AssociationFinaliseResponse, *http.Response, error) { + res := &AssociationFinaliseResponse{} + path := "/registeredDevices/{deviceId}/associations" + path = strings.Replace(path, "{"+"deviceId"+"}", url.PathEscape(common.ParameterValueToString(r.deviceId, "deviceId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.associationFinaliseRequest, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 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 ManageSCADevicesApi.CompleteRegistrationOfScaDevice type ManageSCADevicesApiCompleteRegistrationOfScaDeviceInput struct { id string @@ -222,6 +321,103 @@ func (a *ManageSCADevicesApi) DeleteRegistrationOfScaDevice(ctx context.Context, return httpRes, err } +// All parameters accepted by ManageSCADevicesApi.InitiateAssociationBetweenScaDeviceAndResource +type ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput struct { + deviceId string + associationInitiateRequest *AssociationInitiateRequest +} + +func (r ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput) AssociationInitiateRequest(associationInitiateRequest AssociationInitiateRequest) ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput { + r.associationInitiateRequest = &associationInitiateRequest + return r +} + +/* +Prepare a request for InitiateAssociationBetweenScaDeviceAndResource +@param deviceId The unique identifier of the SCA device that you are associating with a resource. +@return ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput +*/ +func (a *ManageSCADevicesApi) InitiateAssociationBetweenScaDeviceAndResourceInput(deviceId string) ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput { + return ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput{ + deviceId: deviceId, + } +} + +/* +InitiateAssociationBetweenScaDeviceAndResource Initiate an association between an SCA device and a resource + +Initiates an association between a user's registered SCA device and an Adyen resource. For example, you can associate an SCA device with additional [business accounts](https://docs.adyen.com/platforms/business-accounts/sca/register-devices) or [Adyen-issued cards](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/register-devices). + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput - Request parameters, see InitiateAssociationBetweenScaDeviceAndResourceInput +@return AssociationInitiateResponse, *http.Response, error +*/ +func (a *ManageSCADevicesApi) InitiateAssociationBetweenScaDeviceAndResource(ctx context.Context, r ManageSCADevicesApiInitiateAssociationBetweenScaDeviceAndResourceInput) (AssociationInitiateResponse, *http.Response, error) { + res := &AssociationInitiateResponse{} + path := "/registeredDevices/{deviceId}/associations" + path = strings.Replace(path, "{"+"deviceId"+"}", url.PathEscape(common.ParameterValueToString(r.deviceId, "deviceId")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.associationInitiateRequest, + 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 ManageSCADevicesApi.InitiateRegistrationOfScaDevice type ManageSCADevicesApiInitiateRegistrationOfScaDeviceInput struct { registerSCARequest *RegisterSCARequest diff --git a/src/balanceplatform/model_account_holder.go b/src/balanceplatform/model_account_holder.go index 3609827ca..74359dee9 100644 --- a/src/balanceplatform/model_account_holder.go +++ b/src/balanceplatform/model_account_holder.go @@ -39,7 +39,7 @@ type AccountHolder struct { PrimaryBalanceAccount *string `json:"primaryBalanceAccount,omitempty"` // Your reference for the account holder. Reference *string `json:"reference,omitempty"` - // The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + // The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. Status *string `json:"status,omitempty"` // The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` diff --git a/src/balanceplatform/model_account_holder_update_request.go b/src/balanceplatform/model_account_holder_update_request.go index 99600f0d8..6d301aaef 100644 --- a/src/balanceplatform/model_account_holder_update_request.go +++ b/src/balanceplatform/model_account_holder_update_request.go @@ -35,7 +35,7 @@ type AccountHolderUpdateRequest struct { PrimaryBalanceAccount *string `json:"primaryBalanceAccount,omitempty"` // Your reference for the account holder. Reference *string `json:"reference,omitempty"` - // The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + // The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. Status *string `json:"status,omitempty"` // The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` diff --git a/src/balanceplatform/model_association_delegated_authentication_data.go b/src/balanceplatform/model_association_delegated_authentication_data.go new file mode 100644 index 000000000..aa94363ed --- /dev/null +++ b/src/balanceplatform/model_association_delegated_authentication_data.go @@ -0,0 +1,116 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the AssociationDelegatedAuthenticationData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationDelegatedAuthenticationData{} + +// AssociationDelegatedAuthenticationData struct for AssociationDelegatedAuthenticationData +type AssociationDelegatedAuthenticationData struct { + // A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. + SdkOutput string `json:"sdkOutput"` +} + +// NewAssociationDelegatedAuthenticationData instantiates a new AssociationDelegatedAuthenticationData 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 NewAssociationDelegatedAuthenticationData(sdkOutput string) *AssociationDelegatedAuthenticationData { + this := AssociationDelegatedAuthenticationData{} + this.SdkOutput = sdkOutput + return &this +} + +// NewAssociationDelegatedAuthenticationDataWithDefaults instantiates a new AssociationDelegatedAuthenticationData 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 NewAssociationDelegatedAuthenticationDataWithDefaults() *AssociationDelegatedAuthenticationData { + this := AssociationDelegatedAuthenticationData{} + return &this +} + +// GetSdkOutput returns the SdkOutput field value +func (o *AssociationDelegatedAuthenticationData) GetSdkOutput() string { + if o == nil { + var ret string + return ret + } + + return o.SdkOutput +} + +// GetSdkOutputOk returns a tuple with the SdkOutput field value +// and a boolean to check if the value has been set. +func (o *AssociationDelegatedAuthenticationData) GetSdkOutputOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SdkOutput, true +} + +// SetSdkOutput sets field value +func (o *AssociationDelegatedAuthenticationData) SetSdkOutput(v string) { + o.SdkOutput = v +} + +func (o AssociationDelegatedAuthenticationData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationDelegatedAuthenticationData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["sdkOutput"] = o.SdkOutput + return toSerialize, nil +} + +type NullableAssociationDelegatedAuthenticationData struct { + value *AssociationDelegatedAuthenticationData + isSet bool +} + +func (v NullableAssociationDelegatedAuthenticationData) Get() *AssociationDelegatedAuthenticationData { + return v.value +} + +func (v *NullableAssociationDelegatedAuthenticationData) Set(val *AssociationDelegatedAuthenticationData) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationDelegatedAuthenticationData) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationDelegatedAuthenticationData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationDelegatedAuthenticationData(val *AssociationDelegatedAuthenticationData) *NullableAssociationDelegatedAuthenticationData { + return &NullableAssociationDelegatedAuthenticationData{value: val, isSet: true} +} + +func (v NullableAssociationDelegatedAuthenticationData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationDelegatedAuthenticationData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_association_finalise_request.go b/src/balanceplatform/model_association_finalise_request.go new file mode 100644 index 000000000..e0c8a6d9d --- /dev/null +++ b/src/balanceplatform/model_association_finalise_request.go @@ -0,0 +1,181 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the AssociationFinaliseRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationFinaliseRequest{} + +// AssociationFinaliseRequest struct for AssociationFinaliseRequest +type AssociationFinaliseRequest struct { + // The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + Ids []string `json:"ids"` + StrongCustomerAuthentication AssociationDelegatedAuthenticationData `json:"strongCustomerAuthentication"` + // The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + Type string `json:"type"` +} + +// NewAssociationFinaliseRequest instantiates a new AssociationFinaliseRequest 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 NewAssociationFinaliseRequest(ids []string, strongCustomerAuthentication AssociationDelegatedAuthenticationData, type_ string) *AssociationFinaliseRequest { + this := AssociationFinaliseRequest{} + this.Ids = ids + this.StrongCustomerAuthentication = strongCustomerAuthentication + this.Type = type_ + return &this +} + +// NewAssociationFinaliseRequestWithDefaults instantiates a new AssociationFinaliseRequest 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 NewAssociationFinaliseRequestWithDefaults() *AssociationFinaliseRequest { + this := AssociationFinaliseRequest{} + return &this +} + +// GetIds returns the Ids field value +func (o *AssociationFinaliseRequest) GetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value +// and a boolean to check if the value has been set. +func (o *AssociationFinaliseRequest) GetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Ids, true +} + +// SetIds sets field value +func (o *AssociationFinaliseRequest) SetIds(v []string) { + o.Ids = v +} + +// GetStrongCustomerAuthentication returns the StrongCustomerAuthentication field value +func (o *AssociationFinaliseRequest) GetStrongCustomerAuthentication() AssociationDelegatedAuthenticationData { + if o == nil { + var ret AssociationDelegatedAuthenticationData + return ret + } + + return o.StrongCustomerAuthentication +} + +// GetStrongCustomerAuthenticationOk returns a tuple with the StrongCustomerAuthentication field value +// and a boolean to check if the value has been set. +func (o *AssociationFinaliseRequest) GetStrongCustomerAuthenticationOk() (*AssociationDelegatedAuthenticationData, bool) { + if o == nil { + return nil, false + } + return &o.StrongCustomerAuthentication, true +} + +// SetStrongCustomerAuthentication sets field value +func (o *AssociationFinaliseRequest) SetStrongCustomerAuthentication(v AssociationDelegatedAuthenticationData) { + o.StrongCustomerAuthentication = v +} + +// GetType returns the Type field value +func (o *AssociationFinaliseRequest) 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 *AssociationFinaliseRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AssociationFinaliseRequest) SetType(v string) { + o.Type = v +} + +func (o AssociationFinaliseRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationFinaliseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ids"] = o.Ids + toSerialize["strongCustomerAuthentication"] = o.StrongCustomerAuthentication + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableAssociationFinaliseRequest struct { + value *AssociationFinaliseRequest + isSet bool +} + +func (v NullableAssociationFinaliseRequest) Get() *AssociationFinaliseRequest { + return v.value +} + +func (v *NullableAssociationFinaliseRequest) Set(val *AssociationFinaliseRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationFinaliseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationFinaliseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationFinaliseRequest(val *AssociationFinaliseRequest) *NullableAssociationFinaliseRequest { + return &NullableAssociationFinaliseRequest{value: val, isSet: true} +} + +func (v NullableAssociationFinaliseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationFinaliseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *AssociationFinaliseRequest) isValidType() bool { + var allowedEnumValues = []string{"PaymentInstrument"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_association_finalise_response.go b/src/balanceplatform/model_association_finalise_response.go new file mode 100644 index 000000000..54c3a4c3d --- /dev/null +++ b/src/balanceplatform/model_association_finalise_response.go @@ -0,0 +1,200 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the AssociationFinaliseResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationFinaliseResponse{} + +// AssociationFinaliseResponse struct for AssociationFinaliseResponse +type AssociationFinaliseResponse struct { + // The unique identifier of the SCA device you associated with a resource. + DeviceId *string `json:"deviceId,omitempty"` + // The list of unique identifiers of the resources that you associated with the SCA device. + Ids []string `json:"ids,omitempty"` + // The type of resource that you associated with the SCA device. + Type string `json:"type"` +} + +// NewAssociationFinaliseResponse instantiates a new AssociationFinaliseResponse 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 NewAssociationFinaliseResponse(type_ string) *AssociationFinaliseResponse { + this := AssociationFinaliseResponse{} + this.Type = type_ + return &this +} + +// NewAssociationFinaliseResponseWithDefaults instantiates a new AssociationFinaliseResponse 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 NewAssociationFinaliseResponseWithDefaults() *AssociationFinaliseResponse { + this := AssociationFinaliseResponse{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *AssociationFinaliseResponse) GetDeviceId() string { + if o == nil || common.IsNil(o.DeviceId) { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssociationFinaliseResponse) GetDeviceIdOk() (*string, bool) { + if o == nil || common.IsNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *AssociationFinaliseResponse) HasDeviceId() bool { + if o != nil && !common.IsNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *AssociationFinaliseResponse) SetDeviceId(v string) { + o.DeviceId = &v +} + +// GetIds returns the Ids field value if set, zero value otherwise. +func (o *AssociationFinaliseResponse) GetIds() []string { + if o == nil || common.IsNil(o.Ids) { + var ret []string + return ret + } + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssociationFinaliseResponse) GetIdsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Ids) { + return nil, false + } + return o.Ids, true +} + +// HasIds returns a boolean if a field has been set. +func (o *AssociationFinaliseResponse) HasIds() bool { + if o != nil && !common.IsNil(o.Ids) { + return true + } + + return false +} + +// SetIds gets a reference to the given []string and assigns it to the Ids field. +func (o *AssociationFinaliseResponse) SetIds(v []string) { + o.Ids = v +} + +// GetType returns the Type field value +func (o *AssociationFinaliseResponse) 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 *AssociationFinaliseResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AssociationFinaliseResponse) SetType(v string) { + o.Type = v +} + +func (o AssociationFinaliseResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationFinaliseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.DeviceId) { + toSerialize["deviceId"] = o.DeviceId + } + if !common.IsNil(o.Ids) { + toSerialize["ids"] = o.Ids + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableAssociationFinaliseResponse struct { + value *AssociationFinaliseResponse + isSet bool +} + +func (v NullableAssociationFinaliseResponse) Get() *AssociationFinaliseResponse { + return v.value +} + +func (v *NullableAssociationFinaliseResponse) Set(val *AssociationFinaliseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationFinaliseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationFinaliseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationFinaliseResponse(val *AssociationFinaliseResponse) *NullableAssociationFinaliseResponse { + return &NullableAssociationFinaliseResponse{value: val, isSet: true} +} + +func (v NullableAssociationFinaliseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationFinaliseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *AssociationFinaliseResponse) isValidType() bool { + var allowedEnumValues = []string{"PAYMENT_INSTRUMENT"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_association_initiate_request.go b/src/balanceplatform/model_association_initiate_request.go new file mode 100644 index 000000000..74a7bd585 --- /dev/null +++ b/src/balanceplatform/model_association_initiate_request.go @@ -0,0 +1,154 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the AssociationInitiateRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationInitiateRequest{} + +// AssociationInitiateRequest struct for AssociationInitiateRequest +type AssociationInitiateRequest struct { + // The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. + Ids []string `json:"ids"` + // The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** + Type string `json:"type"` +} + +// NewAssociationInitiateRequest instantiates a new AssociationInitiateRequest 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 NewAssociationInitiateRequest(ids []string, type_ string) *AssociationInitiateRequest { + this := AssociationInitiateRequest{} + this.Ids = ids + this.Type = type_ + return &this +} + +// NewAssociationInitiateRequestWithDefaults instantiates a new AssociationInitiateRequest 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 NewAssociationInitiateRequestWithDefaults() *AssociationInitiateRequest { + this := AssociationInitiateRequest{} + return &this +} + +// GetIds returns the Ids field value +func (o *AssociationInitiateRequest) GetIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value +// and a boolean to check if the value has been set. +func (o *AssociationInitiateRequest) GetIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Ids, true +} + +// SetIds sets field value +func (o *AssociationInitiateRequest) SetIds(v []string) { + o.Ids = v +} + +// GetType returns the Type field value +func (o *AssociationInitiateRequest) 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 *AssociationInitiateRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AssociationInitiateRequest) SetType(v string) { + o.Type = v +} + +func (o AssociationInitiateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationInitiateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ids"] = o.Ids + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableAssociationInitiateRequest struct { + value *AssociationInitiateRequest + isSet bool +} + +func (v NullableAssociationInitiateRequest) Get() *AssociationInitiateRequest { + return v.value +} + +func (v *NullableAssociationInitiateRequest) Set(val *AssociationInitiateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationInitiateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationInitiateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationInitiateRequest(val *AssociationInitiateRequest) *NullableAssociationInitiateRequest { + return &NullableAssociationInitiateRequest{value: val, isSet: true} +} + +func (v NullableAssociationInitiateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationInitiateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *AssociationInitiateRequest) isValidType() bool { + var allowedEnumValues = []string{"PaymentInstrument"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/balanceplatform/model_association_initiate_response.go b/src/balanceplatform/model_association_initiate_response.go new file mode 100644 index 000000000..93a389df1 --- /dev/null +++ b/src/balanceplatform/model_association_initiate_response.go @@ -0,0 +1,125 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the AssociationInitiateResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &AssociationInitiateResponse{} + +// AssociationInitiateResponse struct for AssociationInitiateResponse +type AssociationInitiateResponse struct { + // A string that you must pass to the authentication SDK to continue with the association process. + SdkInput *string `json:"sdkInput,omitempty"` +} + +// NewAssociationInitiateResponse instantiates a new AssociationInitiateResponse 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 NewAssociationInitiateResponse() *AssociationInitiateResponse { + this := AssociationInitiateResponse{} + return &this +} + +// NewAssociationInitiateResponseWithDefaults instantiates a new AssociationInitiateResponse 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 NewAssociationInitiateResponseWithDefaults() *AssociationInitiateResponse { + this := AssociationInitiateResponse{} + return &this +} + +// GetSdkInput returns the SdkInput field value if set, zero value otherwise. +func (o *AssociationInitiateResponse) GetSdkInput() string { + if o == nil || common.IsNil(o.SdkInput) { + var ret string + return ret + } + return *o.SdkInput +} + +// GetSdkInputOk returns a tuple with the SdkInput field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AssociationInitiateResponse) GetSdkInputOk() (*string, bool) { + if o == nil || common.IsNil(o.SdkInput) { + return nil, false + } + return o.SdkInput, true +} + +// HasSdkInput returns a boolean if a field has been set. +func (o *AssociationInitiateResponse) HasSdkInput() bool { + if o != nil && !common.IsNil(o.SdkInput) { + return true + } + + return false +} + +// SetSdkInput gets a reference to the given string and assigns it to the SdkInput field. +func (o *AssociationInitiateResponse) SetSdkInput(v string) { + o.SdkInput = &v +} + +func (o AssociationInitiateResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssociationInitiateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.SdkInput) { + toSerialize["sdkInput"] = o.SdkInput + } + return toSerialize, nil +} + +type NullableAssociationInitiateResponse struct { + value *AssociationInitiateResponse + isSet bool +} + +func (v NullableAssociationInitiateResponse) Get() *AssociationInitiateResponse { + return v.value +} + +func (v *NullableAssociationInitiateResponse) Set(val *AssociationInitiateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableAssociationInitiateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableAssociationInitiateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssociationInitiateResponse(val *AssociationInitiateResponse) *NullableAssociationInitiateResponse { + return &NullableAssociationInitiateResponse{value: val, isSet: true} +} + +func (v NullableAssociationInitiateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssociationInitiateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_network_token.go b/src/balanceplatform/model_network_token.go index 8af9ef3a7..8980684bb 100644 --- a/src/balanceplatform/model_network_token.go +++ b/src/balanceplatform/model_network_token.go @@ -33,7 +33,7 @@ type NetworkToken struct { Status *string `json:"status,omitempty"` // The last four digits of the network token `id`. TokenLastFour *string `json:"tokenLastFour,omitempty"` - // The type of wallet the network token is associated with. For example, **applePay**. + // The type of network token. For example, **wallet**, **cof**. Type *string `json:"type,omitempty"` } diff --git a/src/balanceplatform/model_priority_restriction.go b/src/balanceplatform/model_token_requestors_restriction.go similarity index 53% rename from src/balanceplatform/model_priority_restriction.go rename to src/balanceplatform/model_token_requestors_restriction.go index 740d76f97..c1563ce4d 100644 --- a/src/balanceplatform/model_priority_restriction.go +++ b/src/balanceplatform/model_token_requestors_restriction.go @@ -14,36 +14,36 @@ import ( "github.com/adyen/adyen-go-api-library/v18/src/common" ) -// checks if the PriorityRestriction type satisfies the MappedNullable interface at compile time -var _ common.MappedNullable = &PriorityRestriction{} +// checks if the TokenRequestorsRestriction type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenRequestorsRestriction{} -// PriorityRestriction struct for PriorityRestriction -type PriorityRestriction struct { +// TokenRequestorsRestriction struct for TokenRequestorsRestriction +type TokenRequestorsRestriction struct { // Defines how the condition must be evaluated. Operation string `json:"operation"` Value []string `json:"value,omitempty"` } -// NewPriorityRestriction instantiates a new PriorityRestriction object +// NewTokenRequestorsRestriction instantiates a new TokenRequestorsRestriction 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 NewPriorityRestriction(operation string) *PriorityRestriction { - this := PriorityRestriction{} +func NewTokenRequestorsRestriction(operation string) *TokenRequestorsRestriction { + this := TokenRequestorsRestriction{} this.Operation = operation return &this } -// NewPriorityRestrictionWithDefaults instantiates a new PriorityRestriction object +// NewTokenRequestorsRestrictionWithDefaults instantiates a new TokenRequestorsRestriction 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 NewPriorityRestrictionWithDefaults() *PriorityRestriction { - this := PriorityRestriction{} +func NewTokenRequestorsRestrictionWithDefaults() *TokenRequestorsRestriction { + this := TokenRequestorsRestriction{} return &this } // GetOperation returns the Operation field value -func (o *PriorityRestriction) GetOperation() string { +func (o *TokenRequestorsRestriction) GetOperation() string { if o == nil { var ret string return ret @@ -54,7 +54,7 @@ func (o *PriorityRestriction) GetOperation() string { // GetOperationOk returns a tuple with the Operation field value // and a boolean to check if the value has been set. -func (o *PriorityRestriction) GetOperationOk() (*string, bool) { +func (o *TokenRequestorsRestriction) GetOperationOk() (*string, bool) { if o == nil { return nil, false } @@ -62,12 +62,12 @@ func (o *PriorityRestriction) GetOperationOk() (*string, bool) { } // SetOperation sets field value -func (o *PriorityRestriction) SetOperation(v string) { +func (o *TokenRequestorsRestriction) SetOperation(v string) { o.Operation = v } // GetValue returns the Value field value if set, zero value otherwise. -func (o *PriorityRestriction) GetValue() []string { +func (o *TokenRequestorsRestriction) GetValue() []string { if o == nil || common.IsNil(o.Value) { var ret []string return ret @@ -77,7 +77,7 @@ func (o *PriorityRestriction) GetValue() []string { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PriorityRestriction) GetValueOk() ([]string, bool) { +func (o *TokenRequestorsRestriction) GetValueOk() ([]string, bool) { if o == nil || common.IsNil(o.Value) { return nil, false } @@ -85,7 +85,7 @@ func (o *PriorityRestriction) GetValueOk() ([]string, bool) { } // HasValue returns a boolean if a field has been set. -func (o *PriorityRestriction) HasValue() bool { +func (o *TokenRequestorsRestriction) HasValue() bool { if o != nil && !common.IsNil(o.Value) { return true } @@ -94,11 +94,11 @@ func (o *PriorityRestriction) HasValue() bool { } // SetValue gets a reference to the given []string and assigns it to the Value field. -func (o *PriorityRestriction) SetValue(v []string) { +func (o *TokenRequestorsRestriction) SetValue(v []string) { o.Value = v } -func (o PriorityRestriction) MarshalJSON() ([]byte, error) { +func (o TokenRequestorsRestriction) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -106,7 +106,7 @@ func (o PriorityRestriction) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o PriorityRestriction) ToMap() (map[string]interface{}, error) { +func (o TokenRequestorsRestriction) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["operation"] = o.Operation if !common.IsNil(o.Value) { @@ -115,38 +115,38 @@ func (o PriorityRestriction) ToMap() (map[string]interface{}, error) { return toSerialize, nil } -type NullablePriorityRestriction struct { - value *PriorityRestriction +type NullableTokenRequestorsRestriction struct { + value *TokenRequestorsRestriction isSet bool } -func (v NullablePriorityRestriction) Get() *PriorityRestriction { +func (v NullableTokenRequestorsRestriction) Get() *TokenRequestorsRestriction { return v.value } -func (v *NullablePriorityRestriction) Set(val *PriorityRestriction) { +func (v *NullableTokenRequestorsRestriction) Set(val *TokenRequestorsRestriction) { v.value = val v.isSet = true } -func (v NullablePriorityRestriction) IsSet() bool { +func (v NullableTokenRequestorsRestriction) IsSet() bool { return v.isSet } -func (v *NullablePriorityRestriction) Unset() { +func (v *NullableTokenRequestorsRestriction) Unset() { v.value = nil v.isSet = false } -func NewNullablePriorityRestriction(val *PriorityRestriction) *NullablePriorityRestriction { - return &NullablePriorityRestriction{value: val, isSet: true} +func NewNullableTokenRequestorsRestriction(val *TokenRequestorsRestriction) *NullableTokenRequestorsRestriction { + return &NullableTokenRequestorsRestriction{value: val, isSet: true} } -func (v NullablePriorityRestriction) MarshalJSON() ([]byte, error) { +func (v NullableTokenRequestorsRestriction) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePriorityRestriction) UnmarshalJSON(src []byte) error { +func (v *NullableTokenRequestorsRestriction) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/src/balanceplatform/model_transaction_rule_restrictions.go b/src/balanceplatform/model_transaction_rule_restrictions.go index e34919929..281585b68 100644 --- a/src/balanceplatform/model_transaction_rule_restrictions.go +++ b/src/balanceplatform/model_transaction_rule_restrictions.go @@ -33,13 +33,13 @@ type TransactionRuleRestrictions struct { Mccs *MccsRestriction `json:"mccs,omitempty"` MerchantNames *MerchantNamesRestriction `json:"merchantNames,omitempty"` Merchants *MerchantsRestriction `json:"merchants,omitempty"` - Priority *PriorityRestriction `json:"priority,omitempty"` ProcessingTypes *ProcessingTypesRestriction `json:"processingTypes,omitempty"` RiskScores *RiskScoresRestriction `json:"riskScores,omitempty"` SameAmountRestriction *SameAmountRestriction `json:"sameAmountRestriction,omitempty"` SameCounterpartyRestriction *SameCounterpartyRestriction `json:"sameCounterpartyRestriction,omitempty"` SourceAccountTypes *SourceAccountTypesRestriction `json:"sourceAccountTypes,omitempty"` TimeOfDay *TimeOfDayRestriction `json:"timeOfDay,omitempty"` + TokenRequestors *TokenRequestorsRestriction `json:"tokenRequestors,omitempty"` TotalAmount *TotalAmountRestriction `json:"totalAmount,omitempty"` } @@ -508,38 +508,6 @@ func (o *TransactionRuleRestrictions) SetMerchants(v MerchantsRestriction) { o.Merchants = &v } -// GetPriority returns the Priority field value if set, zero value otherwise. -func (o *TransactionRuleRestrictions) GetPriority() PriorityRestriction { - if o == nil || common.IsNil(o.Priority) { - var ret PriorityRestriction - 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 *TransactionRuleRestrictions) GetPriorityOk() (*PriorityRestriction, 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 *TransactionRuleRestrictions) HasPriority() bool { - if o != nil && !common.IsNil(o.Priority) { - return true - } - - return false -} - -// SetPriority gets a reference to the given PriorityRestriction and assigns it to the Priority field. -func (o *TransactionRuleRestrictions) SetPriority(v PriorityRestriction) { - o.Priority = &v -} - // GetProcessingTypes returns the ProcessingTypes field value if set, zero value otherwise. func (o *TransactionRuleRestrictions) GetProcessingTypes() ProcessingTypesRestriction { if o == nil || common.IsNil(o.ProcessingTypes) { @@ -732,6 +700,38 @@ func (o *TransactionRuleRestrictions) SetTimeOfDay(v TimeOfDayRestriction) { o.TimeOfDay = &v } +// GetTokenRequestors returns the TokenRequestors field value if set, zero value otherwise. +func (o *TransactionRuleRestrictions) GetTokenRequestors() TokenRequestorsRestriction { + if o == nil || common.IsNil(o.TokenRequestors) { + var ret TokenRequestorsRestriction + return ret + } + return *o.TokenRequestors +} + +// GetTokenRequestorsOk returns a tuple with the TokenRequestors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactionRuleRestrictions) GetTokenRequestorsOk() (*TokenRequestorsRestriction, bool) { + if o == nil || common.IsNil(o.TokenRequestors) { + return nil, false + } + return o.TokenRequestors, true +} + +// HasTokenRequestors returns a boolean if a field has been set. +func (o *TransactionRuleRestrictions) HasTokenRequestors() bool { + if o != nil && !common.IsNil(o.TokenRequestors) { + return true + } + + return false +} + +// SetTokenRequestors gets a reference to the given TokenRequestorsRestriction and assigns it to the TokenRequestors field. +func (o *TransactionRuleRestrictions) SetTokenRequestors(v TokenRequestorsRestriction) { + o.TokenRequestors = &v +} + // GetTotalAmount returns the TotalAmount field value if set, zero value otherwise. func (o *TransactionRuleRestrictions) GetTotalAmount() TotalAmountRestriction { if o == nil || common.IsNil(o.TotalAmount) { @@ -816,9 +816,6 @@ func (o TransactionRuleRestrictions) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Merchants) { toSerialize["merchants"] = o.Merchants } - if !common.IsNil(o.Priority) { - toSerialize["priority"] = o.Priority - } if !common.IsNil(o.ProcessingTypes) { toSerialize["processingTypes"] = o.ProcessingTypes } @@ -837,6 +834,9 @@ func (o TransactionRuleRestrictions) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.TimeOfDay) { toSerialize["timeOfDay"] = o.TimeOfDay } + if !common.IsNil(o.TokenRequestors) { + toSerialize["tokenRequestors"] = o.TokenRequestors + } if !common.IsNil(o.TotalAmount) { toSerialize["totalAmount"] = o.TotalAmount } diff --git a/src/checkout/api_payment_links.go b/src/checkout/api_payment_links.go index e5051af4c..7a35f929d 100644 --- a/src/checkout/api_payment_links.go +++ b/src/checkout/api_payment_links.go @@ -94,7 +94,7 @@ func (a *PaymentLinksApi) PaymentLinksInput() PaymentLinksApiPaymentLinksInput { /* PaymentLinks Create a payment link -Creates a payment link to our hosted payment form where shoppers can pay. The list of payment methods presented to the shopper depends on the `currency` and `country` parameters sent in the request. +Creates a payment link to a [Pay by Link](https://docs.adyen.com/unified-commerce/pay-by-link/) page where the shopper can pay. The list of payment methods presented to the shopper depends on the `currency` and `country` parameters sent in the request. For more information, refer to [Pay by Link documentation](https://docs.adyen.com/online-payments/pay-by-link#create-payment-links-through-api). diff --git a/src/checkout/api_payments.go b/src/checkout/api_payments.go index 413ea455b..43ff77a49 100644 --- a/src/checkout/api_payments.go +++ b/src/checkout/api_payments.go @@ -345,7 +345,7 @@ func (a *PaymentsApi) SessionsInput() PaymentsApiSessionsInput { /* Sessions Create a payment session -Creates a payment session for [Web Drop-in](https://docs.adyen.com/online-payments/web-drop-in) and [Web Components](https://docs.adyen.com/online-payments/web-components) integrations. +Creates a payment session for [Drop-in](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Web&integration=Drop-in), [Components](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Web&integration=Components), and [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/sessions-flow/?platform=Web&integration=Hosted+Checkout) integrations. The response contains encrypted payment session data. The front end then uses the session data to make any required server-side calls for the payment flow. diff --git a/src/checkout/model_balance_check_request.go b/src/checkout/model_balance_check_request.go index 6ba9a6fc4..26c362fde 100644 --- a/src/checkout/model_balance_check_request.go +++ b/src/checkout/model_balance_check_request.go @@ -76,7 +76,7 @@ type BalanceCheckRequest struct { // The combination of a language code and a country code to specify the language to be used in the payment. ShopperLocale *string `json:"shopperLocale,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/checkout/model_card_details.go b/src/checkout/model_card_details.go index ea3221840..ad88b674d 100644 --- a/src/checkout/model_card_details.go +++ b/src/checkout/model_card_details.go @@ -41,6 +41,8 @@ type CardDetails struct { ExpiryMonth *string `json:"expiryMonth,omitempty"` // The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). ExpiryYear *string `json:"expiryYear,omitempty"` + // The encoded fastlane data blob + FastlaneData *string `json:"fastlaneData,omitempty"` // The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. FundingSource *string `json:"fundingSource,omitempty"` // The name of the card holder. @@ -447,6 +449,38 @@ func (o *CardDetails) SetExpiryYear(v string) { o.ExpiryYear = &v } +// GetFastlaneData returns the FastlaneData field value if set, zero value otherwise. +func (o *CardDetails) GetFastlaneData() string { + if o == nil || common.IsNil(o.FastlaneData) { + var ret string + return ret + } + return *o.FastlaneData +} + +// GetFastlaneDataOk returns a tuple with the FastlaneData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetails) GetFastlaneDataOk() (*string, bool) { + if o == nil || common.IsNil(o.FastlaneData) { + return nil, false + } + return o.FastlaneData, true +} + +// HasFastlaneData returns a boolean if a field has been set. +func (o *CardDetails) HasFastlaneData() bool { + if o != nil && !common.IsNil(o.FastlaneData) { + return true + } + + return false +} + +// SetFastlaneData gets a reference to the given string and assigns it to the FastlaneData field. +func (o *CardDetails) SetFastlaneData(v string) { + o.FastlaneData = &v +} + // GetFundingSource returns the FundingSource field value if set, zero value otherwise. func (o *CardDetails) GetFundingSource() string { if o == nil || common.IsNil(o.FundingSource) { @@ -912,6 +946,9 @@ func (o CardDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ExpiryYear) { toSerialize["expiryYear"] = o.ExpiryYear } + if !common.IsNil(o.FastlaneData) { + toSerialize["fastlaneData"] = o.FastlaneData + } if !common.IsNil(o.FundingSource) { toSerialize["fundingSource"] = o.FundingSource } diff --git a/src/checkout/model_card_donations.go b/src/checkout/model_card_donations.go index 69dbfea0f..75ed0fad7 100644 --- a/src/checkout/model_card_donations.go +++ b/src/checkout/model_card_donations.go @@ -41,6 +41,8 @@ type CardDonations struct { ExpiryMonth *string `json:"expiryMonth,omitempty"` // The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). ExpiryYear *string `json:"expiryYear,omitempty"` + // The encoded fastlane data blob + FastlaneData *string `json:"fastlaneData,omitempty"` // The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. FundingSource *string `json:"fundingSource,omitempty"` // The name of the card holder. @@ -447,6 +449,38 @@ func (o *CardDonations) SetExpiryYear(v string) { o.ExpiryYear = &v } +// GetFastlaneData returns the FastlaneData field value if set, zero value otherwise. +func (o *CardDonations) GetFastlaneData() string { + if o == nil || common.IsNil(o.FastlaneData) { + var ret string + return ret + } + return *o.FastlaneData +} + +// GetFastlaneDataOk returns a tuple with the FastlaneData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDonations) GetFastlaneDataOk() (*string, bool) { + if o == nil || common.IsNil(o.FastlaneData) { + return nil, false + } + return o.FastlaneData, true +} + +// HasFastlaneData returns a boolean if a field has been set. +func (o *CardDonations) HasFastlaneData() bool { + if o != nil && !common.IsNil(o.FastlaneData) { + return true + } + + return false +} + +// SetFastlaneData gets a reference to the given string and assigns it to the FastlaneData field. +func (o *CardDonations) SetFastlaneData(v string) { + o.FastlaneData = &v +} + // GetFundingSource returns the FundingSource field value if set, zero value otherwise. func (o *CardDonations) GetFundingSource() string { if o == nil || common.IsNil(o.FundingSource) { @@ -912,6 +946,9 @@ func (o CardDonations) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ExpiryYear) { toSerialize["expiryYear"] = o.ExpiryYear } + if !common.IsNil(o.FastlaneData) { + toSerialize["fastlaneData"] = o.FastlaneData + } if !common.IsNil(o.FundingSource) { toSerialize["fundingSource"] = o.FundingSource } diff --git a/src/checkout/model_checkout_payment_method.go b/src/checkout/model_checkout_payment_method.go index 483535c3c..f863612f0 100644 --- a/src/checkout/model_checkout_payment_method.go +++ b/src/checkout/model_checkout_payment_method.go @@ -34,6 +34,7 @@ type CheckoutPaymentMethod struct { EBankingFinlandDetails *EBankingFinlandDetails EcontextVoucherDetails *EcontextVoucherDetails EftDetails *EftDetails + FastlaneDetails *FastlaneDetails GenericIssuerPaymentMethodDetails *GenericIssuerPaymentMethodDetails GiropayDetails *GiropayDetails GooglePayDetails *GooglePayDetails @@ -201,6 +202,13 @@ func EftDetailsAsCheckoutPaymentMethod(v *EftDetails) CheckoutPaymentMethod { } } +// FastlaneDetailsAsCheckoutPaymentMethod is a convenience function that returns FastlaneDetails wrapped in CheckoutPaymentMethod +func FastlaneDetailsAsCheckoutPaymentMethod(v *FastlaneDetails) CheckoutPaymentMethod { + return CheckoutPaymentMethod{ + FastlaneDetails: v, + } +} + // GenericIssuerPaymentMethodDetailsAsCheckoutPaymentMethod is a convenience function that returns GenericIssuerPaymentMethodDetails wrapped in CheckoutPaymentMethod func GenericIssuerPaymentMethodDetailsAsCheckoutPaymentMethod(v *GenericIssuerPaymentMethodDetails) CheckoutPaymentMethod { return CheckoutPaymentMethod{ @@ -676,6 +684,19 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.EftDetails = nil } + // try to unmarshal data into FastlaneDetails + err = json.Unmarshal(data, &dst.FastlaneDetails) + if err == nil { + jsonFastlaneDetails, _ := json.Marshal(dst.FastlaneDetails) + if string(jsonFastlaneDetails) == "{}" || !dst.FastlaneDetails.isValidType() { // empty struct + dst.FastlaneDetails = nil + } else { + match++ + } + } else { + dst.FastlaneDetails = nil + } + // try to unmarshal data into GenericIssuerPaymentMethodDetails err = json.Unmarshal(data, &dst.GenericIssuerPaymentMethodDetails) if err == nil { @@ -1113,6 +1134,7 @@ func (dst *CheckoutPaymentMethod) UnmarshalJSON(data []byte) error { dst.EBankingFinlandDetails = nil dst.EcontextVoucherDetails = nil dst.EftDetails = nil + dst.FastlaneDetails = nil dst.GenericIssuerPaymentMethodDetails = nil dst.GiropayDetails = nil dst.GooglePayDetails = nil @@ -1232,6 +1254,10 @@ func (src CheckoutPaymentMethod) MarshalJSON() ([]byte, error) { return json.Marshal(&src.EftDetails) } + if src.FastlaneDetails != nil { + return json.Marshal(&src.FastlaneDetails) + } + if src.GenericIssuerPaymentMethodDetails != nil { return json.Marshal(&src.GenericIssuerPaymentMethodDetails) } @@ -1444,6 +1470,10 @@ func (obj *CheckoutPaymentMethod) GetActualInstance() interface{} { return obj.EftDetails } + if obj.FastlaneDetails != nil { + return obj.FastlaneDetails + } + if obj.GenericIssuerPaymentMethodDetails != nil { return obj.GenericIssuerPaymentMethodDetails } diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index 34c0452e6..efd772f4c 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -95,7 +95,7 @@ type CreateCheckoutSessionRequest struct { // The combination of a language code and a country code to specify the language to be used in the payment. ShopperLocale *string `json:"shopperLocale,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 75ecde320..3bb20610a 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -99,7 +99,7 @@ type CreateCheckoutSessionResponse struct { // The combination of a language code and a country code to specify the language to be used in the payment. ShopperLocale *string `json:"shopperLocale,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/checkout/model_fastlane_details.go b/src/checkout/model_fastlane_details.go new file mode 100644 index 000000000..969fed2a9 --- /dev/null +++ b/src/checkout/model_fastlane_details.go @@ -0,0 +1,275 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v18/src/common" +) + +// checks if the FastlaneDetails type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &FastlaneDetails{} + +// FastlaneDetails struct for FastlaneDetails +type FastlaneDetails struct { + // The checkout attempt identifier. + CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // The encoded fastlane data blob + FastlaneData string `json:"fastlaneData"` + // This is the `recurringDetailReference` returned in the response when you created the token. + // Deprecated since Adyen Checkout API v49 + // Use `storedPaymentMethodId` instead. + RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` + // **fastlane** + Type string `json:"type"` +} + +// NewFastlaneDetails instantiates a new FastlaneDetails 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 NewFastlaneDetails(fastlaneData string, type_ string) *FastlaneDetails { + this := FastlaneDetails{} + this.FastlaneData = fastlaneData + this.Type = type_ + return &this +} + +// NewFastlaneDetailsWithDefaults instantiates a new FastlaneDetails 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 NewFastlaneDetailsWithDefaults() *FastlaneDetails { + this := FastlaneDetails{} + var type_ string = "fastlane" + this.Type = type_ + return &this +} + +// GetCheckoutAttemptId returns the CheckoutAttemptId field value if set, zero value otherwise. +func (o *FastlaneDetails) GetCheckoutAttemptId() string { + if o == nil || common.IsNil(o.CheckoutAttemptId) { + var ret string + return ret + } + return *o.CheckoutAttemptId +} + +// GetCheckoutAttemptIdOk returns a tuple with the CheckoutAttemptId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FastlaneDetails) GetCheckoutAttemptIdOk() (*string, bool) { + if o == nil || common.IsNil(o.CheckoutAttemptId) { + return nil, false + } + return o.CheckoutAttemptId, true +} + +// HasCheckoutAttemptId returns a boolean if a field has been set. +func (o *FastlaneDetails) HasCheckoutAttemptId() bool { + if o != nil && !common.IsNil(o.CheckoutAttemptId) { + return true + } + + return false +} + +// SetCheckoutAttemptId gets a reference to the given string and assigns it to the CheckoutAttemptId field. +func (o *FastlaneDetails) SetCheckoutAttemptId(v string) { + o.CheckoutAttemptId = &v +} + +// GetFastlaneData returns the FastlaneData field value +func (o *FastlaneDetails) GetFastlaneData() string { + if o == nil { + var ret string + return ret + } + + return o.FastlaneData +} + +// GetFastlaneDataOk returns a tuple with the FastlaneData field value +// and a boolean to check if the value has been set. +func (o *FastlaneDetails) GetFastlaneDataOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FastlaneData, true +} + +// SetFastlaneData sets field value +func (o *FastlaneDetails) SetFastlaneData(v string) { + o.FastlaneData = v +} + +// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *FastlaneDetails) GetRecurringDetailReference() string { + if o == nil || common.IsNil(o.RecurringDetailReference) { + var ret string + return ret + } + return *o.RecurringDetailReference +} + +// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *FastlaneDetails) GetRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.RecurringDetailReference) { + return nil, false + } + return o.RecurringDetailReference, true +} + +// HasRecurringDetailReference returns a boolean if a field has been set. +func (o *FastlaneDetails) HasRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.RecurringDetailReference) { + return true + } + + return false +} + +// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. +// Deprecated since Adyen Checkout API v49 +// Use `storedPaymentMethodId` instead. +func (o *FastlaneDetails) SetRecurringDetailReference(v string) { + o.RecurringDetailReference = &v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. +func (o *FastlaneDetails) GetStoredPaymentMethodId() string { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + var ret string + return ret + } + return *o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FastlaneDetails) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + return nil, false + } + return o.StoredPaymentMethodId, true +} + +// HasStoredPaymentMethodId returns a boolean if a field has been set. +func (o *FastlaneDetails) HasStoredPaymentMethodId() bool { + if o != nil && !common.IsNil(o.StoredPaymentMethodId) { + return true + } + + return false +} + +// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field. +func (o *FastlaneDetails) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = &v +} + +// GetType returns the Type field value +func (o *FastlaneDetails) 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 *FastlaneDetails) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FastlaneDetails) SetType(v string) { + o.Type = v +} + +func (o FastlaneDetails) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FastlaneDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.CheckoutAttemptId) { + toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId + } + toSerialize["fastlaneData"] = o.FastlaneData + if !common.IsNil(o.RecurringDetailReference) { + toSerialize["recurringDetailReference"] = o.RecurringDetailReference + } + if !common.IsNil(o.StoredPaymentMethodId) { + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableFastlaneDetails struct { + value *FastlaneDetails + isSet bool +} + +func (v NullableFastlaneDetails) Get() *FastlaneDetails { + return v.value +} + +func (v *NullableFastlaneDetails) Set(val *FastlaneDetails) { + v.value = val + v.isSet = true +} + +func (v NullableFastlaneDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableFastlaneDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFastlaneDetails(val *FastlaneDetails) *NullableFastlaneDetails { + return &NullableFastlaneDetails{value: val, isSet: true} +} + +func (v NullableFastlaneDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFastlaneDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *FastlaneDetails) isValidType() bool { + var allowedEnumValues = []string{"fastlane"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_fund_recipient.go b/src/checkout/model_fund_recipient.go index 2b4c4d923..246c9b2f6 100644 --- a/src/checkout/model_fund_recipient.go +++ b/src/checkout/model_fund_recipient.go @@ -26,7 +26,7 @@ type FundRecipient struct { // The email address of the shopper. ShopperEmail *string `json:"shopperEmail,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` diff --git a/src/checkout/model_payment_link_request.go b/src/checkout/model_payment_link_request.go index 803517d35..7fadf2ae0 100644 --- a/src/checkout/model_payment_link_request.go +++ b/src/checkout/model_payment_link_request.go @@ -73,7 +73,7 @@ type PaymentLinkRequest struct { // The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). ShopperLocale *string `json:"shopperLocale,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/checkout/model_payment_link_response.go b/src/checkout/model_payment_link_response.go index 76d833e54..a2a86efd8 100644 --- a/src/checkout/model_payment_link_response.go +++ b/src/checkout/model_payment_link_response.go @@ -75,7 +75,7 @@ type PaymentLinkResponse struct { // The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). ShopperLocale *string `json:"shopperLocale,omitempty"` ShopperName *Name `json:"shopperName,omitempty"` - // Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. ShopperStatement *string `json:"shopperStatement,omitempty"` diff --git a/src/checkout/model_payment_methods_request.go b/src/checkout/model_payment_methods_request.go index 3df12db8e..d6213cc64 100644 --- a/src/checkout/model_payment_methods_request.go +++ b/src/checkout/model_payment_methods_request.go @@ -37,7 +37,7 @@ type PaymentMethodsRequest struct { ShopperConversionId *string `json:"shopperConversionId,omitempty"` // The combination of a language code and a country code to specify the language to be used in the payment. ShopperLocale *string `json:"shopperLocale,omitempty"` - // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // Boolean value indicating whether the card payment method should be split into separate debit and credit options. SplitCardFundingSources *bool `json:"splitCardFundingSources,omitempty"` diff --git a/src/checkout/model_payment_refund_response.go b/src/checkout/model_payment_refund_response.go index aa68107f6..16328bb7f 100644 --- a/src/checkout/model_payment_refund_response.go +++ b/src/checkout/model_payment_refund_response.go @@ -20,6 +20,8 @@ var _ common.MappedNullable = &PaymentRefundResponse{} // PaymentRefundResponse struct for PaymentRefundResponse type PaymentRefundResponse struct { Amount Amount `json:"amount"` + // This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. + CapturePspReference *string `json:"capturePspReference,omitempty"` // Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account that is used to process the payment. @@ -86,6 +88,38 @@ func (o *PaymentRefundResponse) SetAmount(v Amount) { o.Amount = v } +// GetCapturePspReference returns the CapturePspReference field value if set, zero value otherwise. +func (o *PaymentRefundResponse) GetCapturePspReference() string { + if o == nil || common.IsNil(o.CapturePspReference) { + var ret string + return ret + } + return *o.CapturePspReference +} + +// GetCapturePspReferenceOk returns a tuple with the CapturePspReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentRefundResponse) GetCapturePspReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.CapturePspReference) { + return nil, false + } + return o.CapturePspReference, true +} + +// HasCapturePspReference returns a boolean if a field has been set. +func (o *PaymentRefundResponse) HasCapturePspReference() bool { + if o != nil && !common.IsNil(o.CapturePspReference) { + return true + } + + return false +} + +// SetCapturePspReference gets a reference to the given string and assigns it to the CapturePspReference field. +func (o *PaymentRefundResponse) SetCapturePspReference(v string) { + o.CapturePspReference = &v +} + // GetLineItems returns the LineItems field value if set, zero value otherwise. func (o *PaymentRefundResponse) GetLineItems() []LineItem { if o == nil || common.IsNil(o.LineItems) { @@ -364,6 +398,9 @@ func (o PaymentRefundResponse) MarshalJSON() ([]byte, error) { func (o PaymentRefundResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["amount"] = o.Amount + if !common.IsNil(o.CapturePspReference) { + toSerialize["capturePspReference"] = o.CapturePspReference + } if !common.IsNil(o.LineItems) { toSerialize["lineItems"] = o.LineItems } diff --git a/src/checkout/model_stored_payment_method_resource.go b/src/checkout/model_stored_payment_method_resource.go index ecf3420f6..f4aae7a08 100644 --- a/src/checkout/model_stored_payment_method_resource.go +++ b/src/checkout/model_stored_payment_method_resource.go @@ -47,7 +47,7 @@ type StoredPaymentMethodResource struct { OwnerName *string `json:"ownerName,omitempty"` // The shopper’s email address. ShopperEmail *string `json:"shopperEmail,omitempty"` - // Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. + // Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. ShopperReference *string `json:"shopperReference,omitempty"` // Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. SupportedRecurringProcessingModels []string `json:"supportedRecurringProcessingModels,omitempty"` diff --git a/src/configurationwebhook/model_account_holder.go b/src/configurationwebhook/model_account_holder.go index e3e14542a..9561846e4 100644 --- a/src/configurationwebhook/model_account_holder.go +++ b/src/configurationwebhook/model_account_holder.go @@ -39,7 +39,7 @@ type AccountHolder struct { PrimaryBalanceAccount *string `json:"primaryBalanceAccount,omitempty"` // Your reference for the account holder. Reference *string `json:"reference,omitempty"` - // The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone. + // The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. Status *string `json:"status,omitempty"` // The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` diff --git a/src/legalentity/api_business_lines.go b/src/legalentity/api_business_lines.go index f37eb04aa..1a8e42f27 100644 --- a/src/legalentity/api_business_lines.go +++ b/src/legalentity/api_business_lines.go @@ -46,7 +46,7 @@ Creates a business line. This resource contains information about your user's line of business, including their industry and their source of funds. Adyen uses this information to verify your users as required by payment industry regulations.Adyen informs you of the verification results through webhooks or API responses. -You can create a maximum of 3 business lines per legal entity for payment processing. +You can create a maximum of 200 business lines per legal entity for payment processing. diff --git a/src/legalentity/model_legal_entity_association.go b/src/legalentity/model_legal_entity_association.go index 61b53ff3a..acddc09bc 100644 --- a/src/legalentity/model_legal_entity_association.go +++ b/src/legalentity/model_legal_entity_association.go @@ -29,7 +29,7 @@ type LegalEntityAssociation struct { LegalEntityId string `json:"legalEntityId"` // The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`. Name *string `json:"name,omitempty"` - // Default value: **false**Indicates if the `type` **director**, **secondaryPartner** or **shareholder** is a nominee. Only applicable to New Zealand. + // Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. Nominee *bool `json:"nominee,omitempty"` // The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. Relationship *string `json:"relationship,omitempty"` diff --git a/src/legalentity/model_source_of_funds.go b/src/legalentity/model_source_of_funds.go index 73a5fedc4..67382aae4 100644 --- a/src/legalentity/model_source_of_funds.go +++ b/src/legalentity/model_source_of_funds.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &SourceOfFunds{} // SourceOfFunds struct for SourceOfFunds type SourceOfFunds struct { - // The unique identifier of the business line that will be the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. + // The unique identifier of the business line that is the source of funds.This must be a business line for a **receivePayments** or **receiveFromPlatformPayments** capability. // Deprecated since Legal Entity Management API v3 // This field will be removed in v4. AcquiringBusinessLineId *string `json:"acquiringBusinessLineId,omitempty"`