diff --git a/src/acswebhook/model_authentication_notification_data.go b/src/acswebhook/model_authentication_notification_data.go index 2dd2d6142..785892f22 100644 --- a/src/acswebhook/model_authentication_notification_data.go +++ b/src/acswebhook/model_authentication_notification_data.go @@ -22,9 +22,9 @@ type AuthenticationNotificationData struct { Authentication AuthenticationInfo `json:"authentication"` // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // Unique identifier of the authentication. + // The unique identifier of the authentication. Id string `json:"id"` - // Unique identifier of the payment instrument that was used for the authentication. + // The unique identifier of the payment instrument that was used for the authentication. PaymentInstrumentId string `json:"paymentInstrumentId"` Purchase PurchaseInfo `json:"purchase"` // Outcome of the authentication. Allowed values: * authenticated * rejected * error diff --git a/src/acswebhook/model_balance_platform_notification_response.go b/src/acswebhook/model_balance_platform_notification_response.go index 6a585b19f..34dd832bc 100644 --- a/src/acswebhook/model_balance_platform_notification_response.go +++ b/src/acswebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/acswebhook/model_purchase_info.go b/src/acswebhook/model_purchase_info.go index 3ab8a180b..2dc98b0b6 100644 --- a/src/acswebhook/model_purchase_info.go +++ b/src/acswebhook/model_purchase_info.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &PurchaseInfo{} // PurchaseInfo struct for PurchaseInfo type PurchaseInfo struct { - // Date of the purchase. + // The date of the purchase. Date string `json:"date"` - // Name of the merchant. + // The name of the business that the cardholder purchased from. MerchantName string `json:"merchantName"` OriginalAmount Amount `json:"originalAmount"` } diff --git a/src/acswebhook/model_relayed_authentication_request.go b/src/acswebhook/model_relayed_authentication_request.go index 2dbb469cc..29da544af 100644 --- a/src/acswebhook/model_relayed_authentication_request.go +++ b/src/acswebhook/model_relayed_authentication_request.go @@ -10,6 +10,7 @@ package acswebhook import ( "encoding/json" + "time" "github.com/adyen/adyen-go-api-library/v21/src/common" ) @@ -19,22 +20,32 @@ var _ common.MappedNullable = &RelayedAuthenticationRequest{} // RelayedAuthenticationRequest struct for RelayedAuthenticationRequest type RelayedAuthenticationRequest struct { + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` // The unique identifier of the challenge. Id string `json:"id"` // The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. PaymentInstrumentId string `json:"paymentInstrumentId"` Purchase Purchase `json:"purchase"` + // URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching. + ThreeDSRequestorAppURL *string `json:"threeDSRequestorAppURL,omitempty"` + // When the event was queued. + Timestamp *time.Time `json:"timestamp,omitempty"` + // Type of notification. + Type string `json:"type"` } // NewRelayedAuthenticationRequest instantiates a new RelayedAuthenticationRequest 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 NewRelayedAuthenticationRequest(id string, paymentInstrumentId string, purchase Purchase) *RelayedAuthenticationRequest { +func NewRelayedAuthenticationRequest(environment string, id string, paymentInstrumentId string, purchase Purchase, type_ string) *RelayedAuthenticationRequest { this := RelayedAuthenticationRequest{} + this.Environment = environment this.Id = id this.PaymentInstrumentId = paymentInstrumentId this.Purchase = purchase + this.Type = type_ return &this } @@ -46,6 +57,30 @@ func NewRelayedAuthenticationRequestWithDefaults() *RelayedAuthenticationRequest return &this } +// GetEnvironment returns the Environment field value +func (o *RelayedAuthenticationRequest) 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 *RelayedAuthenticationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *RelayedAuthenticationRequest) SetEnvironment(v string) { + o.Environment = v +} + // GetId returns the Id field value func (o *RelayedAuthenticationRequest) GetId() string { if o == nil { @@ -118,6 +153,94 @@ func (o *RelayedAuthenticationRequest) SetPurchase(v Purchase) { o.Purchase = v } +// GetThreeDSRequestorAppURL returns the ThreeDSRequestorAppURL field value if set, zero value otherwise. +func (o *RelayedAuthenticationRequest) GetThreeDSRequestorAppURL() string { + if o == nil || common.IsNil(o.ThreeDSRequestorAppURL) { + var ret string + return ret + } + return *o.ThreeDSRequestorAppURL +} + +// GetThreeDSRequestorAppURLOk returns a tuple with the ThreeDSRequestorAppURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelayedAuthenticationRequest) GetThreeDSRequestorAppURLOk() (*string, bool) { + if o == nil || common.IsNil(o.ThreeDSRequestorAppURL) { + return nil, false + } + return o.ThreeDSRequestorAppURL, true +} + +// HasThreeDSRequestorAppURL returns a boolean if a field has been set. +func (o *RelayedAuthenticationRequest) HasThreeDSRequestorAppURL() bool { + if o != nil && !common.IsNil(o.ThreeDSRequestorAppURL) { + return true + } + + return false +} + +// SetThreeDSRequestorAppURL gets a reference to the given string and assigns it to the ThreeDSRequestorAppURL field. +func (o *RelayedAuthenticationRequest) SetThreeDSRequestorAppURL(v string) { + o.ThreeDSRequestorAppURL = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *RelayedAuthenticationRequest) GetTimestamp() time.Time { + if o == nil || common.IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RelayedAuthenticationRequest) GetTimestampOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *RelayedAuthenticationRequest) HasTimestamp() bool { + if o != nil && !common.IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *RelayedAuthenticationRequest) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetType returns the Type field value +func (o *RelayedAuthenticationRequest) 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 *RelayedAuthenticationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RelayedAuthenticationRequest) SetType(v string) { + o.Type = v +} + func (o RelayedAuthenticationRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -128,9 +251,17 @@ func (o RelayedAuthenticationRequest) MarshalJSON() ([]byte, error) { func (o RelayedAuthenticationRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + toSerialize["environment"] = o.Environment toSerialize["id"] = o.Id toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId toSerialize["purchase"] = o.Purchase + if !common.IsNil(o.ThreeDSRequestorAppURL) { + toSerialize["threeDSRequestorAppURL"] = o.ThreeDSRequestorAppURL + } + if !common.IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + toSerialize["type"] = o.Type return toSerialize, nil } @@ -169,3 +300,13 @@ func (v *NullableRelayedAuthenticationRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +func (o *RelayedAuthenticationRequest) isValidType() bool { + var allowedEnumValues = []string{"balancePlatform.authentication.relayed"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/acswebhook/model_resource.go b/src/acswebhook/model_resource.go index 383cc597b..c5a4471b4 100644 --- a/src/acswebhook/model_resource.go +++ b/src/acswebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/balancewebhook/model_balance_notification_data.go b/src/balancewebhook/model_balance_notification_data.go index 1e37d3159..065285b83 100644 --- a/src/balancewebhook/model_balance_notification_data.go +++ b/src/balancewebhook/model_balance_notification_data.go @@ -25,9 +25,9 @@ type BalanceNotificationData struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` Balances Balances `json:"balances"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` - // TThe three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + // The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). Currency string `json:"currency"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/balancewebhook/model_balance_platform_notification_response.go b/src/balancewebhook/model_balance_platform_notification_response.go index c3a31bb9c..6032d6a06 100644 --- a/src/balancewebhook/model_balance_platform_notification_response.go +++ b/src/balancewebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/configurationwebhook/model_balance_account.go b/src/configurationwebhook/model_balance_account.go index 20003c1d0..725d27283 100644 --- a/src/configurationwebhook/model_balance_account.go +++ b/src/configurationwebhook/model_balance_account.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalanceAccount{} // BalanceAccount struct for BalanceAccount type BalanceAccount struct { - // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. + // The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-id) associated with the balance account. AccountHolderId string `json:"accountHolderId"` // List of balances with the amount and currency. Balances []Balance `json:"balances,omitempty"` diff --git a/src/configurationwebhook/model_balance_platform_notification_response.go b/src/configurationwebhook/model_balance_platform_notification_response.go index 306ed5207..77878769b 100644 --- a/src/configurationwebhook/model_balance_platform_notification_response.go +++ b/src/configurationwebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/configurationwebhook/model_bank_score_signal_triggered_data.go b/src/configurationwebhook/model_bank_score_signal_triggered_data.go new file mode 100644 index 000000000..ccb719f36 --- /dev/null +++ b/src/configurationwebhook/model_bank_score_signal_triggered_data.go @@ -0,0 +1,421 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the BankScoreSignalTriggeredData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &BankScoreSignalTriggeredData{} + +// BankScoreSignalTriggeredData struct for BankScoreSignalTriggeredData +type BankScoreSignalTriggeredData struct { + AccountHolder *ResourceReference `json:"accountHolder,omitempty"` + // The status of the account holder. + AccountHolderStatus *string `json:"accountHolderStatus,omitempty"` + // The automated action(s) taken as a result of the score signals that were triggered. + AutomatedActions []string `json:"automatedActions,omitempty"` + // The unique identifier of the balance platform. + BalancePlatform *string `json:"balancePlatform,omitempty"` + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. + CreationDate *time.Time `json:"creationDate,omitempty"` + // The ID of the resource. + Id *string `json:"id,omitempty"` + // The score of the identity resulting from the signal(s) that were triggered. + RiskScore *int32 `json:"riskScore,omitempty"` + // The name(s) of the score signals that were triggered. + ScoreSignalsTriggered []string `json:"scoreSignalsTriggered,omitempty"` + // The type(s) of the score signals that were triggered. + SignalSourceTypes []string `json:"signalSourceTypes,omitempty"` +} + +// NewBankScoreSignalTriggeredData instantiates a new BankScoreSignalTriggeredData 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 NewBankScoreSignalTriggeredData() *BankScoreSignalTriggeredData { + this := BankScoreSignalTriggeredData{} + return &this +} + +// NewBankScoreSignalTriggeredDataWithDefaults instantiates a new BankScoreSignalTriggeredData 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 NewBankScoreSignalTriggeredDataWithDefaults() *BankScoreSignalTriggeredData { + this := BankScoreSignalTriggeredData{} + return &this +} + +// GetAccountHolder returns the AccountHolder field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetAccountHolder() ResourceReference { + if o == nil || common.IsNil(o.AccountHolder) { + var ret ResourceReference + return ret + } + return *o.AccountHolder +} + +// GetAccountHolderOk returns a tuple with the AccountHolder field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetAccountHolderOk() (*ResourceReference, bool) { + if o == nil || common.IsNil(o.AccountHolder) { + return nil, false + } + return o.AccountHolder, true +} + +// HasAccountHolder returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasAccountHolder() bool { + if o != nil && !common.IsNil(o.AccountHolder) { + return true + } + + return false +} + +// SetAccountHolder gets a reference to the given ResourceReference and assigns it to the AccountHolder field. +func (o *BankScoreSignalTriggeredData) SetAccountHolder(v ResourceReference) { + o.AccountHolder = &v +} + +// GetAccountHolderStatus returns the AccountHolderStatus field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetAccountHolderStatus() string { + if o == nil || common.IsNil(o.AccountHolderStatus) { + var ret string + return ret + } + return *o.AccountHolderStatus +} + +// GetAccountHolderStatusOk returns a tuple with the AccountHolderStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetAccountHolderStatusOk() (*string, bool) { + if o == nil || common.IsNil(o.AccountHolderStatus) { + return nil, false + } + return o.AccountHolderStatus, true +} + +// HasAccountHolderStatus returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasAccountHolderStatus() bool { + if o != nil && !common.IsNil(o.AccountHolderStatus) { + return true + } + + return false +} + +// SetAccountHolderStatus gets a reference to the given string and assigns it to the AccountHolderStatus field. +func (o *BankScoreSignalTriggeredData) SetAccountHolderStatus(v string) { + o.AccountHolderStatus = &v +} + +// GetAutomatedActions returns the AutomatedActions field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetAutomatedActions() []string { + if o == nil || common.IsNil(o.AutomatedActions) { + var ret []string + return ret + } + return o.AutomatedActions +} + +// GetAutomatedActionsOk returns a tuple with the AutomatedActions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetAutomatedActionsOk() ([]string, bool) { + if o == nil || common.IsNil(o.AutomatedActions) { + return nil, false + } + return o.AutomatedActions, true +} + +// HasAutomatedActions returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasAutomatedActions() bool { + if o != nil && !common.IsNil(o.AutomatedActions) { + return true + } + + return false +} + +// SetAutomatedActions gets a reference to the given []string and assigns it to the AutomatedActions field. +func (o *BankScoreSignalTriggeredData) SetAutomatedActions(v []string) { + o.AutomatedActions = v +} + +// GetBalancePlatform returns the BalancePlatform field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetBalancePlatform() string { + if o == nil || common.IsNil(o.BalancePlatform) { + var ret string + return ret + } + return *o.BalancePlatform +} + +// GetBalancePlatformOk returns a tuple with the BalancePlatform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetBalancePlatformOk() (*string, bool) { + if o == nil || common.IsNil(o.BalancePlatform) { + return nil, false + } + return o.BalancePlatform, true +} + +// HasBalancePlatform returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasBalancePlatform() bool { + if o != nil && !common.IsNil(o.BalancePlatform) { + return true + } + + return false +} + +// SetBalancePlatform gets a reference to the given string and assigns it to the BalancePlatform field. +func (o *BankScoreSignalTriggeredData) SetBalancePlatform(v string) { + o.BalancePlatform = &v +} + +// GetCreationDate returns the CreationDate field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetCreationDate() time.Time { + if o == nil || common.IsNil(o.CreationDate) { + var ret time.Time + return ret + } + return *o.CreationDate +} + +// GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetCreationDateOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreationDate) { + return nil, false + } + return o.CreationDate, true +} + +// HasCreationDate returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasCreationDate() bool { + if o != nil && !common.IsNil(o.CreationDate) { + return true + } + + return false +} + +// SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +func (o *BankScoreSignalTriggeredData) SetCreationDate(v time.Time) { + o.CreationDate = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) 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 *BankScoreSignalTriggeredData) 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 *BankScoreSignalTriggeredData) 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 *BankScoreSignalTriggeredData) SetId(v string) { + o.Id = &v +} + +// GetRiskScore returns the RiskScore field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetRiskScore() int32 { + if o == nil || common.IsNil(o.RiskScore) { + var ret int32 + return ret + } + return *o.RiskScore +} + +// GetRiskScoreOk returns a tuple with the RiskScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetRiskScoreOk() (*int32, bool) { + if o == nil || common.IsNil(o.RiskScore) { + return nil, false + } + return o.RiskScore, true +} + +// HasRiskScore returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasRiskScore() bool { + if o != nil && !common.IsNil(o.RiskScore) { + return true + } + + return false +} + +// SetRiskScore gets a reference to the given int32 and assigns it to the RiskScore field. +func (o *BankScoreSignalTriggeredData) SetRiskScore(v int32) { + o.RiskScore = &v +} + +// GetScoreSignalsTriggered returns the ScoreSignalsTriggered field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetScoreSignalsTriggered() []string { + if o == nil || common.IsNil(o.ScoreSignalsTriggered) { + var ret []string + return ret + } + return o.ScoreSignalsTriggered +} + +// GetScoreSignalsTriggeredOk returns a tuple with the ScoreSignalsTriggered field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetScoreSignalsTriggeredOk() ([]string, bool) { + if o == nil || common.IsNil(o.ScoreSignalsTriggered) { + return nil, false + } + return o.ScoreSignalsTriggered, true +} + +// HasScoreSignalsTriggered returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasScoreSignalsTriggered() bool { + if o != nil && !common.IsNil(o.ScoreSignalsTriggered) { + return true + } + + return false +} + +// SetScoreSignalsTriggered gets a reference to the given []string and assigns it to the ScoreSignalsTriggered field. +func (o *BankScoreSignalTriggeredData) SetScoreSignalsTriggered(v []string) { + o.ScoreSignalsTriggered = v +} + +// GetSignalSourceTypes returns the SignalSourceTypes field value if set, zero value otherwise. +func (o *BankScoreSignalTriggeredData) GetSignalSourceTypes() []string { + if o == nil || common.IsNil(o.SignalSourceTypes) { + var ret []string + return ret + } + return o.SignalSourceTypes +} + +// GetSignalSourceTypesOk returns a tuple with the SignalSourceTypes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BankScoreSignalTriggeredData) GetSignalSourceTypesOk() ([]string, bool) { + if o == nil || common.IsNil(o.SignalSourceTypes) { + return nil, false + } + return o.SignalSourceTypes, true +} + +// HasSignalSourceTypes returns a boolean if a field has been set. +func (o *BankScoreSignalTriggeredData) HasSignalSourceTypes() bool { + if o != nil && !common.IsNil(o.SignalSourceTypes) { + return true + } + + return false +} + +// SetSignalSourceTypes gets a reference to the given []string and assigns it to the SignalSourceTypes field. +func (o *BankScoreSignalTriggeredData) SetSignalSourceTypes(v []string) { + o.SignalSourceTypes = v +} + +func (o BankScoreSignalTriggeredData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BankScoreSignalTriggeredData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AccountHolder) { + toSerialize["accountHolder"] = o.AccountHolder + } + if !common.IsNil(o.AccountHolderStatus) { + toSerialize["accountHolderStatus"] = o.AccountHolderStatus + } + if !common.IsNil(o.AutomatedActions) { + toSerialize["automatedActions"] = o.AutomatedActions + } + if !common.IsNil(o.BalancePlatform) { + toSerialize["balancePlatform"] = o.BalancePlatform + } + if !common.IsNil(o.CreationDate) { + toSerialize["creationDate"] = o.CreationDate + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.RiskScore) { + toSerialize["riskScore"] = o.RiskScore + } + if !common.IsNil(o.ScoreSignalsTriggered) { + toSerialize["scoreSignalsTriggered"] = o.ScoreSignalsTriggered + } + if !common.IsNil(o.SignalSourceTypes) { + toSerialize["signalSourceTypes"] = o.SignalSourceTypes + } + return toSerialize, nil +} + +type NullableBankScoreSignalTriggeredData struct { + value *BankScoreSignalTriggeredData + isSet bool +} + +func (v NullableBankScoreSignalTriggeredData) Get() *BankScoreSignalTriggeredData { + return v.value +} + +func (v *NullableBankScoreSignalTriggeredData) Set(val *BankScoreSignalTriggeredData) { + v.value = val + v.isSet = true +} + +func (v NullableBankScoreSignalTriggeredData) IsSet() bool { + return v.isSet +} + +func (v *NullableBankScoreSignalTriggeredData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBankScoreSignalTriggeredData(val *BankScoreSignalTriggeredData) *NullableBankScoreSignalTriggeredData { + return &NullableBankScoreSignalTriggeredData{value: val, isSet: true} +} + +func (v NullableBankScoreSignalTriggeredData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBankScoreSignalTriggeredData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_bulk_address.go b/src/configurationwebhook/model_bulk_address.go index c84efac89..aaec61a8b 100644 --- a/src/configurationwebhook/model_bulk_address.go +++ b/src/configurationwebhook/model_bulk_address.go @@ -29,6 +29,12 @@ type BulkAddress struct { Email *string `json:"email,omitempty"` // The house number or name. HouseNumberOrName *string `json:"houseNumberOrName,omitempty"` + // The name of the street and the number of the building. For example: **Simon Carmiggeltstraat 6-50**. + Line1 *string `json:"line1,omitempty"` + // Additional information about the delivery address. For example, an apartment number. + Line2 *string `json:"line2,omitempty"` + // Additional information about the delivery address. + Line3 *string `json:"line3,omitempty"` // The full telephone number. Mobile *string `json:"mobile,omitempty"` // The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. @@ -209,6 +215,102 @@ func (o *BulkAddress) SetHouseNumberOrName(v string) { o.HouseNumberOrName = &v } +// GetLine1 returns the Line1 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine1() string { + if o == nil || common.IsNil(o.Line1) { + var ret string + return ret + } + return *o.Line1 +} + +// GetLine1Ok returns a tuple with the Line1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine1Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line1) { + return nil, false + } + return o.Line1, true +} + +// HasLine1 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine1() bool { + if o != nil && !common.IsNil(o.Line1) { + return true + } + + return false +} + +// SetLine1 gets a reference to the given string and assigns it to the Line1 field. +func (o *BulkAddress) SetLine1(v string) { + o.Line1 = &v +} + +// GetLine2 returns the Line2 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine2() string { + if o == nil || common.IsNil(o.Line2) { + var ret string + return ret + } + return *o.Line2 +} + +// GetLine2Ok returns a tuple with the Line2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine2Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line2) { + return nil, false + } + return o.Line2, true +} + +// HasLine2 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine2() bool { + if o != nil && !common.IsNil(o.Line2) { + return true + } + + return false +} + +// SetLine2 gets a reference to the given string and assigns it to the Line2 field. +func (o *BulkAddress) SetLine2(v string) { + o.Line2 = &v +} + +// GetLine3 returns the Line3 field value if set, zero value otherwise. +func (o *BulkAddress) GetLine3() string { + if o == nil || common.IsNil(o.Line3) { + var ret string + return ret + } + return *o.Line3 +} + +// GetLine3Ok returns a tuple with the Line3 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkAddress) GetLine3Ok() (*string, bool) { + if o == nil || common.IsNil(o.Line3) { + return nil, false + } + return o.Line3, true +} + +// HasLine3 returns a boolean if a field has been set. +func (o *BulkAddress) HasLine3() bool { + if o != nil && !common.IsNil(o.Line3) { + return true + } + + return false +} + +// SetLine3 gets a reference to the given string and assigns it to the Line3 field. +func (o *BulkAddress) SetLine3(v string) { + o.Line3 = &v +} + // GetMobile returns the Mobile field value if set, zero value otherwise. func (o *BulkAddress) GetMobile() string { if o == nil || common.IsNil(o.Mobile) { @@ -360,6 +462,15 @@ func (o BulkAddress) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.HouseNumberOrName) { toSerialize["houseNumberOrName"] = o.HouseNumberOrName } + if !common.IsNil(o.Line1) { + toSerialize["line1"] = o.Line1 + } + if !common.IsNil(o.Line2) { + toSerialize["line2"] = o.Line2 + } + if !common.IsNil(o.Line3) { + toSerialize["line3"] = o.Line3 + } if !common.IsNil(o.Mobile) { toSerialize["mobile"] = o.Mobile } diff --git a/src/configurationwebhook/model_card.go b/src/configurationwebhook/model_card.go index 92d635cb6..a326b6e1f 100644 --- a/src/configurationwebhook/model_card.go +++ b/src/configurationwebhook/model_card.go @@ -39,8 +39,10 @@ type Card struct { LastFour *string `json:"lastFour,omitempty"` // The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. Number string `json:"number"` - // Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. + // The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration. ThreeDSecure *string `json:"threeDSecure,omitempty"` + // Specifies how many times the card can be used. Possible values: **singleUse**, **multiUse**. > Reach out to your Adyen contact to determine the value relevant for your integration. + Usage *string `json:"usage,omitempty"` } // NewCard instantiates a new Card object @@ -441,6 +443,38 @@ func (o *Card) SetThreeDSecure(v string) { o.ThreeDSecure = &v } +// GetUsage returns the Usage field value if set, zero value otherwise. +func (o *Card) GetUsage() string { + if o == nil || common.IsNil(o.Usage) { + var ret string + return ret + } + return *o.Usage +} + +// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Card) GetUsageOk() (*string, bool) { + if o == nil || common.IsNil(o.Usage) { + return nil, false + } + return o.Usage, true +} + +// HasUsage returns a boolean if a field has been set. +func (o *Card) HasUsage() bool { + if o != nil && !common.IsNil(o.Usage) { + return true + } + + return false +} + +// SetUsage gets a reference to the given string and assigns it to the Usage field. +func (o *Card) SetUsage(v string) { + o.Usage = &v +} + func (o Card) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -480,6 +514,9 @@ func (o Card) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ThreeDSecure) { toSerialize["threeDSecure"] = o.ThreeDSecure } + if !common.IsNil(o.Usage) { + toSerialize["usage"] = o.Usage + } return toSerialize, nil } diff --git a/src/configurationwebhook/model_card_order_item.go b/src/configurationwebhook/model_card_order_item.go index 2bdbc2b4c..30d90845d 100644 --- a/src/configurationwebhook/model_card_order_item.go +++ b/src/configurationwebhook/model_card_order_item.go @@ -25,7 +25,7 @@ type CardOrderItem struct { Card *CardOrderItemDeliveryStatus `json:"card,omitempty"` // The unique identifier of the card order item. CardOrderItemId *string `json:"cardOrderItemId,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/configurationwebhook/model_delivery_address.go b/src/configurationwebhook/model_delivery_address.go index 669e8e757..91899e13a 100644 --- a/src/configurationwebhook/model_delivery_address.go +++ b/src/configurationwebhook/model_delivery_address.go @@ -31,7 +31,7 @@ type DeliveryAddress struct { Line3 *string `json:"line3,omitempty"` // The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. PostalCode *string `json:"postalCode,omitempty"` - // The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. + // The state or province code, maximum 3 characters. For example, **CA** for California in the US or **ON** for Ontario in Canada. > Required for the US and Canada. StateOrProvince *string `json:"stateOrProvince,omitempty"` } diff --git a/src/configurationwebhook/model_device.go b/src/configurationwebhook/model_device.go new file mode 100644 index 000000000..931016c89 --- /dev/null +++ b/src/configurationwebhook/model_device.go @@ -0,0 +1,199 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the Device type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Device{} + +// Device struct for Device +type Device struct { + // The unique identifier of the device used for provisioning the network token. + DeviceId *string `json:"deviceId,omitempty"` + // The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc + FormFactor *string `json:"formFactor,omitempty"` + // The operating system of the device used for provisioning the network token. + OsName *string `json:"osName,omitempty"` +} + +// NewDevice instantiates a new Device 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 NewDevice() *Device { + this := Device{} + return &this +} + +// NewDeviceWithDefaults instantiates a new Device 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 NewDeviceWithDefaults() *Device { + this := Device{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *Device) 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 *Device) 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 *Device) 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 *Device) SetDeviceId(v string) { + o.DeviceId = &v +} + +// GetFormFactor returns the FormFactor field value if set, zero value otherwise. +func (o *Device) GetFormFactor() string { + if o == nil || common.IsNil(o.FormFactor) { + var ret string + return ret + } + return *o.FormFactor +} + +// GetFormFactorOk returns a tuple with the FormFactor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetFormFactorOk() (*string, bool) { + if o == nil || common.IsNil(o.FormFactor) { + return nil, false + } + return o.FormFactor, true +} + +// HasFormFactor returns a boolean if a field has been set. +func (o *Device) HasFormFactor() bool { + if o != nil && !common.IsNil(o.FormFactor) { + return true + } + + return false +} + +// SetFormFactor gets a reference to the given string and assigns it to the FormFactor field. +func (o *Device) SetFormFactor(v string) { + o.FormFactor = &v +} + +// GetOsName returns the OsName field value if set, zero value otherwise. +func (o *Device) GetOsName() string { + if o == nil || common.IsNil(o.OsName) { + var ret string + return ret + } + return *o.OsName +} + +// GetOsNameOk returns a tuple with the OsName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetOsNameOk() (*string, bool) { + if o == nil || common.IsNil(o.OsName) { + return nil, false + } + return o.OsName, true +} + +// HasOsName returns a boolean if a field has been set. +func (o *Device) HasOsName() bool { + if o != nil && !common.IsNil(o.OsName) { + return true + } + + return false +} + +// SetOsName gets a reference to the given string and assigns it to the OsName field. +func (o *Device) SetOsName(v string) { + o.OsName = &v +} + +func (o Device) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Device) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.DeviceId) { + toSerialize["deviceId"] = o.DeviceId + } + if !common.IsNil(o.FormFactor) { + toSerialize["formFactor"] = o.FormFactor + } + if !common.IsNil(o.OsName) { + toSerialize["osName"] = o.OsName + } + return toSerialize, nil +} + +type NullableDevice struct { + value *Device + isSet bool +} + +func (v NullableDevice) Get() *Device { + return v.value +} + +func (v *NullableDevice) Set(val *Device) { + v.value = val + v.isSet = true +} + +func (v NullableDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDevice(val *Device) *NullableDevice { + return &NullableDevice{value: val, isSet: true} +} + +func (v NullableDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_notification_data_v2.go b/src/configurationwebhook/model_network_token_notification_data_v2.go new file mode 100644 index 000000000..b4bc96e0f --- /dev/null +++ b/src/configurationwebhook/model_network_token_notification_data_v2.go @@ -0,0 +1,602 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenNotificationDataV2 type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenNotificationDataV2{} + +// NetworkTokenNotificationDataV2 struct for NetworkTokenNotificationDataV2 +type NetworkTokenNotificationDataV2 struct { + Authentication *TokenAuthentication `json:"authentication,omitempty"` + // Specifies whether the authentication process was triggered during token provisioning. + AuthenticationApplied *bool `json:"authenticationApplied,omitempty"` + // The unique identifier of the balance platform. + BalancePlatform *string `json:"balancePlatform,omitempty"` + // The decision about the network token provisioning. Possible values: **approved**, **declined**, **requiresAuthentication**. + Decision *string `json:"decision,omitempty"` + // The unique identifier of the network token. + Id *string `json:"id,omitempty"` + // The unique identifier of the payment instrument to which the network token is associated. + PaymentInstrumentId *string `json:"paymentInstrumentId,omitempty"` + // The confidence score of scheme, indicating the degree of risk associated with a token. A high score indicates a high level of risk. A low score indicates a low level of risk. Possible values for visa : **00** to **99**, a value of 00 signifies no score was provided by visa + SchemeRiskScore *string `json:"schemeRiskScore,omitempty"` + // The status of the network token. + Status *string `json:"status,omitempty"` + // The last four digits of the network token. Use this value to help your user to identify their network token. + TokenLastFour *string `json:"tokenLastFour,omitempty"` + TokenRequestor *NetworkTokenRequestor `json:"tokenRequestor,omitempty"` + TransactionRulesResult *NetworkTokenTransactionRulesResult `json:"transactionRulesResult,omitempty"` + // The type of network token. Possible values: **wallet**, **cof**. + Type *string `json:"type,omitempty"` + // The rules used to validate the request for provisioning the network token. + ValidationFacts []ValidationFacts `json:"validationFacts,omitempty"` + Wallet *Wallet `json:"wallet,omitempty"` +} + +// NewNetworkTokenNotificationDataV2 instantiates a new NetworkTokenNotificationDataV2 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 NewNetworkTokenNotificationDataV2() *NetworkTokenNotificationDataV2 { + this := NetworkTokenNotificationDataV2{} + return &this +} + +// NewNetworkTokenNotificationDataV2WithDefaults instantiates a new NetworkTokenNotificationDataV2 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 NewNetworkTokenNotificationDataV2WithDefaults() *NetworkTokenNotificationDataV2 { + this := NetworkTokenNotificationDataV2{} + return &this +} + +// GetAuthentication returns the Authentication field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetAuthentication() TokenAuthentication { + if o == nil || common.IsNil(o.Authentication) { + var ret TokenAuthentication + return ret + } + return *o.Authentication +} + +// GetAuthenticationOk returns a tuple with the Authentication field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetAuthenticationOk() (*TokenAuthentication, bool) { + if o == nil || common.IsNil(o.Authentication) { + return nil, false + } + return o.Authentication, true +} + +// HasAuthentication returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasAuthentication() bool { + if o != nil && !common.IsNil(o.Authentication) { + return true + } + + return false +} + +// SetAuthentication gets a reference to the given TokenAuthentication and assigns it to the Authentication field. +func (o *NetworkTokenNotificationDataV2) SetAuthentication(v TokenAuthentication) { + o.Authentication = &v +} + +// GetAuthenticationApplied returns the AuthenticationApplied field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetAuthenticationApplied() bool { + if o == nil || common.IsNil(o.AuthenticationApplied) { + var ret bool + return ret + } + return *o.AuthenticationApplied +} + +// GetAuthenticationAppliedOk returns a tuple with the AuthenticationApplied field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetAuthenticationAppliedOk() (*bool, bool) { + if o == nil || common.IsNil(o.AuthenticationApplied) { + return nil, false + } + return o.AuthenticationApplied, true +} + +// HasAuthenticationApplied returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasAuthenticationApplied() bool { + if o != nil && !common.IsNil(o.AuthenticationApplied) { + return true + } + + return false +} + +// SetAuthenticationApplied gets a reference to the given bool and assigns it to the AuthenticationApplied field. +func (o *NetworkTokenNotificationDataV2) SetAuthenticationApplied(v bool) { + o.AuthenticationApplied = &v +} + +// GetBalancePlatform returns the BalancePlatform field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetBalancePlatform() string { + if o == nil || common.IsNil(o.BalancePlatform) { + var ret string + return ret + } + return *o.BalancePlatform +} + +// GetBalancePlatformOk returns a tuple with the BalancePlatform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetBalancePlatformOk() (*string, bool) { + if o == nil || common.IsNil(o.BalancePlatform) { + return nil, false + } + return o.BalancePlatform, true +} + +// HasBalancePlatform returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasBalancePlatform() bool { + if o != nil && !common.IsNil(o.BalancePlatform) { + return true + } + + return false +} + +// SetBalancePlatform gets a reference to the given string and assigns it to the BalancePlatform field. +func (o *NetworkTokenNotificationDataV2) SetBalancePlatform(v string) { + o.BalancePlatform = &v +} + +// GetDecision returns the Decision field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetDecision() string { + if o == nil || common.IsNil(o.Decision) { + var ret string + return ret + } + return *o.Decision +} + +// GetDecisionOk returns a tuple with the Decision field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetDecisionOk() (*string, bool) { + if o == nil || common.IsNil(o.Decision) { + return nil, false + } + return o.Decision, true +} + +// HasDecision returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasDecision() bool { + if o != nil && !common.IsNil(o.Decision) { + return true + } + + return false +} + +// SetDecision gets a reference to the given string and assigns it to the Decision field. +func (o *NetworkTokenNotificationDataV2) SetDecision(v string) { + o.Decision = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) SetId(v string) { + o.Id = &v +} + +// GetPaymentInstrumentId returns the PaymentInstrumentId field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) SetPaymentInstrumentId(v string) { + o.PaymentInstrumentId = &v +} + +// GetSchemeRiskScore returns the SchemeRiskScore field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetSchemeRiskScore() string { + if o == nil || common.IsNil(o.SchemeRiskScore) { + var ret string + return ret + } + return *o.SchemeRiskScore +} + +// GetSchemeRiskScoreOk returns a tuple with the SchemeRiskScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetSchemeRiskScoreOk() (*string, bool) { + if o == nil || common.IsNil(o.SchemeRiskScore) { + return nil, false + } + return o.SchemeRiskScore, true +} + +// HasSchemeRiskScore returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasSchemeRiskScore() bool { + if o != nil && !common.IsNil(o.SchemeRiskScore) { + return true + } + + return false +} + +// SetSchemeRiskScore gets a reference to the given string and assigns it to the SchemeRiskScore field. +func (o *NetworkTokenNotificationDataV2) SetSchemeRiskScore(v string) { + o.SchemeRiskScore = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) SetStatus(v string) { + o.Status = &v +} + +// GetTokenLastFour returns the TokenLastFour field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetTokenLastFour() string { + if o == nil || common.IsNil(o.TokenLastFour) { + var ret string + return ret + } + return *o.TokenLastFour +} + +// GetTokenLastFourOk returns a tuple with the TokenLastFour field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetTokenLastFourOk() (*string, bool) { + if o == nil || common.IsNil(o.TokenLastFour) { + return nil, false + } + return o.TokenLastFour, true +} + +// HasTokenLastFour returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasTokenLastFour() bool { + if o != nil && !common.IsNil(o.TokenLastFour) { + return true + } + + return false +} + +// SetTokenLastFour gets a reference to the given string and assigns it to the TokenLastFour field. +func (o *NetworkTokenNotificationDataV2) SetTokenLastFour(v string) { + o.TokenLastFour = &v +} + +// GetTokenRequestor returns the TokenRequestor field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetTokenRequestor() NetworkTokenRequestor { + if o == nil || common.IsNil(o.TokenRequestor) { + var ret NetworkTokenRequestor + return ret + } + return *o.TokenRequestor +} + +// GetTokenRequestorOk returns a tuple with the TokenRequestor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetTokenRequestorOk() (*NetworkTokenRequestor, bool) { + if o == nil || common.IsNil(o.TokenRequestor) { + return nil, false + } + return o.TokenRequestor, true +} + +// HasTokenRequestor returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasTokenRequestor() bool { + if o != nil && !common.IsNil(o.TokenRequestor) { + return true + } + + return false +} + +// SetTokenRequestor gets a reference to the given NetworkTokenRequestor and assigns it to the TokenRequestor field. +func (o *NetworkTokenNotificationDataV2) SetTokenRequestor(v NetworkTokenRequestor) { + o.TokenRequestor = &v +} + +// GetTransactionRulesResult returns the TransactionRulesResult field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetTransactionRulesResult() NetworkTokenTransactionRulesResult { + if o == nil || common.IsNil(o.TransactionRulesResult) { + var ret NetworkTokenTransactionRulesResult + return ret + } + return *o.TransactionRulesResult +} + +// GetTransactionRulesResultOk returns a tuple with the TransactionRulesResult field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetTransactionRulesResultOk() (*NetworkTokenTransactionRulesResult, bool) { + if o == nil || common.IsNil(o.TransactionRulesResult) { + return nil, false + } + return o.TransactionRulesResult, true +} + +// HasTransactionRulesResult returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasTransactionRulesResult() bool { + if o != nil && !common.IsNil(o.TransactionRulesResult) { + return true + } + + return false +} + +// SetTransactionRulesResult gets a reference to the given NetworkTokenTransactionRulesResult and assigns it to the TransactionRulesResult field. +func (o *NetworkTokenNotificationDataV2) SetTransactionRulesResult(v NetworkTokenTransactionRulesResult) { + o.TransactionRulesResult = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) 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 *NetworkTokenNotificationDataV2) SetType(v string) { + o.Type = &v +} + +// GetValidationFacts returns the ValidationFacts field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetValidationFacts() []ValidationFacts { + if o == nil || common.IsNil(o.ValidationFacts) { + var ret []ValidationFacts + 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 *NetworkTokenNotificationDataV2) GetValidationFactsOk() ([]ValidationFacts, 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 *NetworkTokenNotificationDataV2) HasValidationFacts() bool { + if o != nil && !common.IsNil(o.ValidationFacts) { + return true + } + + return false +} + +// SetValidationFacts gets a reference to the given []ValidationFacts and assigns it to the ValidationFacts field. +func (o *NetworkTokenNotificationDataV2) SetValidationFacts(v []ValidationFacts) { + o.ValidationFacts = v +} + +// GetWallet returns the Wallet field value if set, zero value otherwise. +func (o *NetworkTokenNotificationDataV2) GetWallet() Wallet { + if o == nil || common.IsNil(o.Wallet) { + var ret Wallet + return ret + } + return *o.Wallet +} + +// GetWalletOk returns a tuple with the Wallet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationDataV2) GetWalletOk() (*Wallet, bool) { + if o == nil || common.IsNil(o.Wallet) { + return nil, false + } + return o.Wallet, true +} + +// HasWallet returns a boolean if a field has been set. +func (o *NetworkTokenNotificationDataV2) HasWallet() bool { + if o != nil && !common.IsNil(o.Wallet) { + return true + } + + return false +} + +// SetWallet gets a reference to the given Wallet and assigns it to the Wallet field. +func (o *NetworkTokenNotificationDataV2) SetWallet(v Wallet) { + o.Wallet = &v +} + +func (o NetworkTokenNotificationDataV2) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenNotificationDataV2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Authentication) { + toSerialize["authentication"] = o.Authentication + } + if !common.IsNil(o.AuthenticationApplied) { + toSerialize["authenticationApplied"] = o.AuthenticationApplied + } + if !common.IsNil(o.BalancePlatform) { + toSerialize["balancePlatform"] = o.BalancePlatform + } + if !common.IsNil(o.Decision) { + toSerialize["decision"] = o.Decision + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.PaymentInstrumentId) { + toSerialize["paymentInstrumentId"] = o.PaymentInstrumentId + } + if !common.IsNil(o.SchemeRiskScore) { + toSerialize["schemeRiskScore"] = o.SchemeRiskScore + } + if !common.IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !common.IsNil(o.TokenLastFour) { + toSerialize["tokenLastFour"] = o.TokenLastFour + } + if !common.IsNil(o.TokenRequestor) { + toSerialize["tokenRequestor"] = o.TokenRequestor + } + if !common.IsNil(o.TransactionRulesResult) { + toSerialize["transactionRulesResult"] = o.TransactionRulesResult + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !common.IsNil(o.ValidationFacts) { + toSerialize["validationFacts"] = o.ValidationFacts + } + if !common.IsNil(o.Wallet) { + toSerialize["wallet"] = o.Wallet + } + return toSerialize, nil +} + +type NullableNetworkTokenNotificationDataV2 struct { + value *NetworkTokenNotificationDataV2 + isSet bool +} + +func (v NullableNetworkTokenNotificationDataV2) Get() *NetworkTokenNotificationDataV2 { + return v.value +} + +func (v *NullableNetworkTokenNotificationDataV2) Set(val *NetworkTokenNotificationDataV2) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenNotificationDataV2) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenNotificationDataV2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenNotificationDataV2(val *NetworkTokenNotificationDataV2) *NullableNetworkTokenNotificationDataV2 { + return &NullableNetworkTokenNotificationDataV2{value: val, isSet: true} +} + +func (v NullableNetworkTokenNotificationDataV2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenNotificationDataV2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_notification_request.go b/src/configurationwebhook/model_network_token_notification_request.go new file mode 100644 index 000000000..fb0473f31 --- /dev/null +++ b/src/configurationwebhook/model_network_token_notification_request.go @@ -0,0 +1,219 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenNotificationRequest{} + +// NetworkTokenNotificationRequest struct for NetworkTokenNotificationRequest +type NetworkTokenNotificationRequest struct { + Data NetworkTokenNotificationDataV2 `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // When the event was queued. + Timestamp *time.Time `json:"timestamp,omitempty"` + // The type of webhook. + Type string `json:"type"` +} + +// NewNetworkTokenNotificationRequest instantiates a new NetworkTokenNotificationRequest 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 NewNetworkTokenNotificationRequest(data NetworkTokenNotificationDataV2, environment string, type_ string) *NetworkTokenNotificationRequest { + this := NetworkTokenNotificationRequest{} + this.Data = data + this.Environment = environment + this.Type = type_ + return &this +} + +// NewNetworkTokenNotificationRequestWithDefaults instantiates a new NetworkTokenNotificationRequest 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 NewNetworkTokenNotificationRequestWithDefaults() *NetworkTokenNotificationRequest { + this := NetworkTokenNotificationRequest{} + return &this +} + +// GetData returns the Data field value +func (o *NetworkTokenNotificationRequest) GetData() NetworkTokenNotificationDataV2 { + if o == nil { + var ret NetworkTokenNotificationDataV2 + 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 *NetworkTokenNotificationRequest) GetDataOk() (*NetworkTokenNotificationDataV2, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *NetworkTokenNotificationRequest) SetData(v NetworkTokenNotificationDataV2) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *NetworkTokenNotificationRequest) 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 *NetworkTokenNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *NetworkTokenNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *NetworkTokenNotificationRequest) GetTimestamp() time.Time { + if o == nil || common.IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenNotificationRequest) GetTimestampOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *NetworkTokenNotificationRequest) HasTimestamp() bool { + if o != nil && !common.IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *NetworkTokenNotificationRequest) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetType returns the Type field value +func (o *NetworkTokenNotificationRequest) 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 *NetworkTokenNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NetworkTokenNotificationRequest) SetType(v string) { + o.Type = v +} + +func (o NetworkTokenNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + if !common.IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableNetworkTokenNotificationRequest struct { + value *NetworkTokenNotificationRequest + isSet bool +} + +func (v NullableNetworkTokenNotificationRequest) Get() *NetworkTokenNotificationRequest { + return v.value +} + +func (v *NullableNetworkTokenNotificationRequest) Set(val *NetworkTokenNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenNotificationRequest(val *NetworkTokenNotificationRequest) *NullableNetworkTokenNotificationRequest { + return &NullableNetworkTokenNotificationRequest{value: val, isSet: true} +} + +func (v NullableNetworkTokenNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *NetworkTokenNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"balancePlatform.networkToken.created", "balancePlatform.networkToken.updated"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/configurationwebhook/model_network_token_requestor.go b/src/configurationwebhook/model_network_token_requestor.go new file mode 100644 index 000000000..fd9715f76 --- /dev/null +++ b/src/configurationwebhook/model_network_token_requestor.go @@ -0,0 +1,162 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenRequestor type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenRequestor{} + +// NetworkTokenRequestor struct for NetworkTokenRequestor +type NetworkTokenRequestor struct { + // The unique identifier of the network token requestor. + Id *string `json:"id,omitempty"` + // The name of the network token requestor. + Name *string `json:"name,omitempty"` +} + +// NewNetworkTokenRequestor instantiates a new NetworkTokenRequestor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkTokenRequestor() *NetworkTokenRequestor { + this := NetworkTokenRequestor{} + return &this +} + +// NewNetworkTokenRequestorWithDefaults instantiates a new NetworkTokenRequestor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkTokenRequestorWithDefaults() *NetworkTokenRequestor { + this := NetworkTokenRequestor{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NetworkTokenRequestor) GetId() string { + if o == nil || common.IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenRequestor) GetIdOk() (*string, bool) { + if o == nil || common.IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NetworkTokenRequestor) HasId() bool { + if o != nil && !common.IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *NetworkTokenRequestor) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NetworkTokenRequestor) GetName() string { + if o == nil || common.IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenRequestor) GetNameOk() (*string, bool) { + if o == nil || common.IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NetworkTokenRequestor) HasName() bool { + if o != nil && !common.IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NetworkTokenRequestor) SetName(v string) { + o.Name = &v +} + +func (o NetworkTokenRequestor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenRequestor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableNetworkTokenRequestor struct { + value *NetworkTokenRequestor + isSet bool +} + +func (v NullableNetworkTokenRequestor) Get() *NetworkTokenRequestor { + return v.value +} + +func (v *NullableNetworkTokenRequestor) Set(val *NetworkTokenRequestor) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenRequestor) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenRequestor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenRequestor(val *NetworkTokenRequestor) *NullableNetworkTokenRequestor { + return &NullableNetworkTokenRequestor{value: val, isSet: true} +} + +func (v NullableNetworkTokenRequestor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenRequestor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_risk_rule_data.go b/src/configurationwebhook/model_network_token_risk_rule_data.go new file mode 100644 index 000000000..b29540477 --- /dev/null +++ b/src/configurationwebhook/model_network_token_risk_rule_data.go @@ -0,0 +1,273 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenRiskRuleData type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenRiskRuleData{} + +// NetworkTokenRiskRuleData struct for NetworkTokenRiskRuleData +type NetworkTokenRiskRuleData struct { + // The description of the transaction rule. + Description *string `json:"description,omitempty"` + // The unique identifier of the transaction rule. + Id *string `json:"id,omitempty"` + // The outcome type of the transaction rule. + OutcomeType *string `json:"outcomeType,omitempty"` + // The reference for the transaction rule. + Reference *string `json:"reference,omitempty"` + // The transaction score determined by the rule. + Score *int32 `json:"score,omitempty"` +} + +// NewNetworkTokenRiskRuleData instantiates a new NetworkTokenRiskRuleData 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 NewNetworkTokenRiskRuleData() *NetworkTokenRiskRuleData { + this := NetworkTokenRiskRuleData{} + return &this +} + +// NewNetworkTokenRiskRuleDataWithDefaults instantiates a new NetworkTokenRiskRuleData 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 NewNetworkTokenRiskRuleDataWithDefaults() *NetworkTokenRiskRuleData { + this := NetworkTokenRiskRuleData{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) SetId(v string) { + o.Id = &v +} + +// GetOutcomeType returns the OutcomeType field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleData) GetOutcomeType() string { + if o == nil || common.IsNil(o.OutcomeType) { + var ret string + return ret + } + return *o.OutcomeType +} + +// GetOutcomeTypeOk returns a tuple with the OutcomeType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenRiskRuleData) GetOutcomeTypeOk() (*string, bool) { + if o == nil || common.IsNil(o.OutcomeType) { + return nil, false + } + return o.OutcomeType, true +} + +// HasOutcomeType returns a boolean if a field has been set. +func (o *NetworkTokenRiskRuleData) HasOutcomeType() bool { + if o != nil && !common.IsNil(o.OutcomeType) { + return true + } + + return false +} + +// SetOutcomeType gets a reference to the given string and assigns it to the OutcomeType field. +func (o *NetworkTokenRiskRuleData) SetOutcomeType(v string) { + o.OutcomeType = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) 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 *NetworkTokenRiskRuleData) SetReference(v string) { + o.Reference = &v +} + +// GetScore returns the Score field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleData) GetScore() int32 { + if o == nil || common.IsNil(o.Score) { + var ret int32 + return ret + } + return *o.Score +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenRiskRuleData) GetScoreOk() (*int32, bool) { + if o == nil || common.IsNil(o.Score) { + return nil, false + } + return o.Score, true +} + +// HasScore returns a boolean if a field has been set. +func (o *NetworkTokenRiskRuleData) HasScore() bool { + if o != nil && !common.IsNil(o.Score) { + return true + } + + return false +} + +// SetScore gets a reference to the given int32 and assigns it to the Score field. +func (o *NetworkTokenRiskRuleData) SetScore(v int32) { + o.Score = &v +} + +func (o NetworkTokenRiskRuleData) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenRiskRuleData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.OutcomeType) { + toSerialize["outcomeType"] = o.OutcomeType + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + if !common.IsNil(o.Score) { + toSerialize["score"] = o.Score + } + return toSerialize, nil +} + +type NullableNetworkTokenRiskRuleData struct { + value *NetworkTokenRiskRuleData + isSet bool +} + +func (v NullableNetworkTokenRiskRuleData) Get() *NetworkTokenRiskRuleData { + return v.value +} + +func (v *NullableNetworkTokenRiskRuleData) Set(val *NetworkTokenRiskRuleData) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenRiskRuleData) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenRiskRuleData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenRiskRuleData(val *NetworkTokenRiskRuleData) *NullableNetworkTokenRiskRuleData { + return &NullableNetworkTokenRiskRuleData{value: val, isSet: true} +} + +func (v NullableNetworkTokenRiskRuleData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenRiskRuleData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_risk_rule_source.go b/src/configurationwebhook/model_network_token_risk_rule_source.go new file mode 100644 index 000000000..4010cdf53 --- /dev/null +++ b/src/configurationwebhook/model_network_token_risk_rule_source.go @@ -0,0 +1,162 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenRiskRuleSource type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenRiskRuleSource{} + +// NetworkTokenRiskRuleSource struct for NetworkTokenRiskRuleSource +type NetworkTokenRiskRuleSource struct { + // The unique identifier of the resource to which the transaction rule applies. + Id *string `json:"id,omitempty"` + // Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. + Type *string `json:"type,omitempty"` +} + +// NewNetworkTokenRiskRuleSource instantiates a new NetworkTokenRiskRuleSource 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 NewNetworkTokenRiskRuleSource() *NetworkTokenRiskRuleSource { + this := NetworkTokenRiskRuleSource{} + return &this +} + +// NewNetworkTokenRiskRuleSourceWithDefaults instantiates a new NetworkTokenRiskRuleSource 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 NewNetworkTokenRiskRuleSourceWithDefaults() *NetworkTokenRiskRuleSource { + this := NetworkTokenRiskRuleSource{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) 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 *NetworkTokenRiskRuleSource) SetType(v string) { + o.Type = &v +} + +func (o NetworkTokenRiskRuleSource) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenRiskRuleSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableNetworkTokenRiskRuleSource struct { + value *NetworkTokenRiskRuleSource + isSet bool +} + +func (v NullableNetworkTokenRiskRuleSource) Get() *NetworkTokenRiskRuleSource { + return v.value +} + +func (v *NullableNetworkTokenRiskRuleSource) Set(val *NetworkTokenRiskRuleSource) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenRiskRuleSource) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenRiskRuleSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenRiskRuleSource(val *NetworkTokenRiskRuleSource) *NullableNetworkTokenRiskRuleSource { + return &NullableNetworkTokenRiskRuleSource{value: val, isSet: true} +} + +func (v NullableNetworkTokenRiskRuleSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenRiskRuleSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_transaction_rules_result.go b/src/configurationwebhook/model_network_token_transaction_rules_result.go new file mode 100644 index 000000000..02bdb9a8f --- /dev/null +++ b/src/configurationwebhook/model_network_token_transaction_rules_result.go @@ -0,0 +1,236 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenTransactionRulesResult type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenTransactionRulesResult{} + +// NetworkTokenTransactionRulesResult struct for NetworkTokenTransactionRulesResult +type NetworkTokenTransactionRulesResult struct { + // The advice given by the Risk analysis. + Advice *string `json:"advice,omitempty"` + // Indicates whether the transaction passed all rules with `outcomeType` **hardBlock**. + AllHardBlockRulesPassed *bool `json:"allHardBlockRulesPassed,omitempty"` + // The score of the Risk analysis. + Score *int32 `json:"score,omitempty"` + // Contains a list of all triggered transaction rules and the corresponding data. + TriggeredTransactionRules []NetworkTokenTriggeredRiskRule `json:"triggeredTransactionRules,omitempty"` +} + +// NewNetworkTokenTransactionRulesResult instantiates a new NetworkTokenTransactionRulesResult 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 NewNetworkTokenTransactionRulesResult() *NetworkTokenTransactionRulesResult { + this := NetworkTokenTransactionRulesResult{} + return &this +} + +// NewNetworkTokenTransactionRulesResultWithDefaults instantiates a new NetworkTokenTransactionRulesResult 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 NewNetworkTokenTransactionRulesResultWithDefaults() *NetworkTokenTransactionRulesResult { + this := NetworkTokenTransactionRulesResult{} + return &this +} + +// GetAdvice returns the Advice field value if set, zero value otherwise. +func (o *NetworkTokenTransactionRulesResult) GetAdvice() string { + if o == nil || common.IsNil(o.Advice) { + var ret string + return ret + } + return *o.Advice +} + +// GetAdviceOk returns a tuple with the Advice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTransactionRulesResult) GetAdviceOk() (*string, bool) { + if o == nil || common.IsNil(o.Advice) { + return nil, false + } + return o.Advice, true +} + +// HasAdvice returns a boolean if a field has been set. +func (o *NetworkTokenTransactionRulesResult) HasAdvice() bool { + if o != nil && !common.IsNil(o.Advice) { + return true + } + + return false +} + +// SetAdvice gets a reference to the given string and assigns it to the Advice field. +func (o *NetworkTokenTransactionRulesResult) SetAdvice(v string) { + o.Advice = &v +} + +// GetAllHardBlockRulesPassed returns the AllHardBlockRulesPassed field value if set, zero value otherwise. +func (o *NetworkTokenTransactionRulesResult) GetAllHardBlockRulesPassed() bool { + if o == nil || common.IsNil(o.AllHardBlockRulesPassed) { + var ret bool + return ret + } + return *o.AllHardBlockRulesPassed +} + +// GetAllHardBlockRulesPassedOk returns a tuple with the AllHardBlockRulesPassed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTransactionRulesResult) GetAllHardBlockRulesPassedOk() (*bool, bool) { + if o == nil || common.IsNil(o.AllHardBlockRulesPassed) { + return nil, false + } + return o.AllHardBlockRulesPassed, true +} + +// HasAllHardBlockRulesPassed returns a boolean if a field has been set. +func (o *NetworkTokenTransactionRulesResult) HasAllHardBlockRulesPassed() bool { + if o != nil && !common.IsNil(o.AllHardBlockRulesPassed) { + return true + } + + return false +} + +// SetAllHardBlockRulesPassed gets a reference to the given bool and assigns it to the AllHardBlockRulesPassed field. +func (o *NetworkTokenTransactionRulesResult) SetAllHardBlockRulesPassed(v bool) { + o.AllHardBlockRulesPassed = &v +} + +// GetScore returns the Score field value if set, zero value otherwise. +func (o *NetworkTokenTransactionRulesResult) GetScore() int32 { + if o == nil || common.IsNil(o.Score) { + var ret int32 + return ret + } + return *o.Score +} + +// GetScoreOk returns a tuple with the Score field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTransactionRulesResult) GetScoreOk() (*int32, bool) { + if o == nil || common.IsNil(o.Score) { + return nil, false + } + return o.Score, true +} + +// HasScore returns a boolean if a field has been set. +func (o *NetworkTokenTransactionRulesResult) HasScore() bool { + if o != nil && !common.IsNil(o.Score) { + return true + } + + return false +} + +// SetScore gets a reference to the given int32 and assigns it to the Score field. +func (o *NetworkTokenTransactionRulesResult) SetScore(v int32) { + o.Score = &v +} + +// GetTriggeredTransactionRules returns the TriggeredTransactionRules field value if set, zero value otherwise. +func (o *NetworkTokenTransactionRulesResult) GetTriggeredTransactionRules() []NetworkTokenTriggeredRiskRule { + if o == nil || common.IsNil(o.TriggeredTransactionRules) { + var ret []NetworkTokenTriggeredRiskRule + return ret + } + return o.TriggeredTransactionRules +} + +// GetTriggeredTransactionRulesOk returns a tuple with the TriggeredTransactionRules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTransactionRulesResult) GetTriggeredTransactionRulesOk() ([]NetworkTokenTriggeredRiskRule, bool) { + if o == nil || common.IsNil(o.TriggeredTransactionRules) { + return nil, false + } + return o.TriggeredTransactionRules, true +} + +// HasTriggeredTransactionRules returns a boolean if a field has been set. +func (o *NetworkTokenTransactionRulesResult) HasTriggeredTransactionRules() bool { + if o != nil && !common.IsNil(o.TriggeredTransactionRules) { + return true + } + + return false +} + +// SetTriggeredTransactionRules gets a reference to the given []NetworkTokenTriggeredRiskRule and assigns it to the TriggeredTransactionRules field. +func (o *NetworkTokenTransactionRulesResult) SetTriggeredTransactionRules(v []NetworkTokenTriggeredRiskRule) { + o.TriggeredTransactionRules = v +} + +func (o NetworkTokenTransactionRulesResult) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenTransactionRulesResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Advice) { + toSerialize["advice"] = o.Advice + } + if !common.IsNil(o.AllHardBlockRulesPassed) { + toSerialize["allHardBlockRulesPassed"] = o.AllHardBlockRulesPassed + } + if !common.IsNil(o.Score) { + toSerialize["score"] = o.Score + } + if !common.IsNil(o.TriggeredTransactionRules) { + toSerialize["triggeredTransactionRules"] = o.TriggeredTransactionRules + } + return toSerialize, nil +} + +type NullableNetworkTokenTransactionRulesResult struct { + value *NetworkTokenTransactionRulesResult + isSet bool +} + +func (v NullableNetworkTokenTransactionRulesResult) Get() *NetworkTokenTransactionRulesResult { + return v.value +} + +func (v *NullableNetworkTokenTransactionRulesResult) Set(val *NetworkTokenTransactionRulesResult) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenTransactionRulesResult) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenTransactionRulesResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenTransactionRulesResult(val *NetworkTokenTransactionRulesResult) *NullableNetworkTokenTransactionRulesResult { + return &NullableNetworkTokenTransactionRulesResult{value: val, isSet: true} +} + +func (v NullableNetworkTokenTransactionRulesResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenTransactionRulesResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_network_token_triggered_risk_rule.go b/src/configurationwebhook/model_network_token_triggered_risk_rule.go new file mode 100644 index 000000000..21217e398 --- /dev/null +++ b/src/configurationwebhook/model_network_token_triggered_risk_rule.go @@ -0,0 +1,197 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the NetworkTokenTriggeredRiskRule type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &NetworkTokenTriggeredRiskRule{} + +// NetworkTokenTriggeredRiskRule struct for NetworkTokenTriggeredRiskRule +type NetworkTokenTriggeredRiskRule struct { + // Explains why the transaction rule failed. + Reason *string `json:"reason,omitempty"` + TransactionRule *NetworkTokenRiskRuleData `json:"transactionRule,omitempty"` + TransactionRuleSource *NetworkTokenRiskRuleSource `json:"transactionRuleSource,omitempty"` +} + +// NewNetworkTokenTriggeredRiskRule instantiates a new NetworkTokenTriggeredRiskRule 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 NewNetworkTokenTriggeredRiskRule() *NetworkTokenTriggeredRiskRule { + this := NetworkTokenTriggeredRiskRule{} + return &this +} + +// NewNetworkTokenTriggeredRiskRuleWithDefaults instantiates a new NetworkTokenTriggeredRiskRule 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 NewNetworkTokenTriggeredRiskRuleWithDefaults() *NetworkTokenTriggeredRiskRule { + this := NetworkTokenTriggeredRiskRule{} + return &this +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *NetworkTokenTriggeredRiskRule) GetReason() string { + if o == nil || common.IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTriggeredRiskRule) GetReasonOk() (*string, bool) { + if o == nil || common.IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *NetworkTokenTriggeredRiskRule) HasReason() bool { + if o != nil && !common.IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *NetworkTokenTriggeredRiskRule) SetReason(v string) { + o.Reason = &v +} + +// GetTransactionRule returns the TransactionRule field value if set, zero value otherwise. +func (o *NetworkTokenTriggeredRiskRule) GetTransactionRule() NetworkTokenRiskRuleData { + if o == nil || common.IsNil(o.TransactionRule) { + var ret NetworkTokenRiskRuleData + return ret + } + return *o.TransactionRule +} + +// GetTransactionRuleOk returns a tuple with the TransactionRule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTriggeredRiskRule) GetTransactionRuleOk() (*NetworkTokenRiskRuleData, bool) { + if o == nil || common.IsNil(o.TransactionRule) { + return nil, false + } + return o.TransactionRule, true +} + +// HasTransactionRule returns a boolean if a field has been set. +func (o *NetworkTokenTriggeredRiskRule) HasTransactionRule() bool { + if o != nil && !common.IsNil(o.TransactionRule) { + return true + } + + return false +} + +// SetTransactionRule gets a reference to the given NetworkTokenRiskRuleData and assigns it to the TransactionRule field. +func (o *NetworkTokenTriggeredRiskRule) SetTransactionRule(v NetworkTokenRiskRuleData) { + o.TransactionRule = &v +} + +// GetTransactionRuleSource returns the TransactionRuleSource field value if set, zero value otherwise. +func (o *NetworkTokenTriggeredRiskRule) GetTransactionRuleSource() NetworkTokenRiskRuleSource { + if o == nil || common.IsNil(o.TransactionRuleSource) { + var ret NetworkTokenRiskRuleSource + return ret + } + return *o.TransactionRuleSource +} + +// GetTransactionRuleSourceOk returns a tuple with the TransactionRuleSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkTokenTriggeredRiskRule) GetTransactionRuleSourceOk() (*NetworkTokenRiskRuleSource, bool) { + if o == nil || common.IsNil(o.TransactionRuleSource) { + return nil, false + } + return o.TransactionRuleSource, true +} + +// HasTransactionRuleSource returns a boolean if a field has been set. +func (o *NetworkTokenTriggeredRiskRule) HasTransactionRuleSource() bool { + if o != nil && !common.IsNil(o.TransactionRuleSource) { + return true + } + + return false +} + +// SetTransactionRuleSource gets a reference to the given NetworkTokenRiskRuleSource and assigns it to the TransactionRuleSource field. +func (o *NetworkTokenTriggeredRiskRule) SetTransactionRuleSource(v NetworkTokenRiskRuleSource) { + o.TransactionRuleSource = &v +} + +func (o NetworkTokenTriggeredRiskRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkTokenTriggeredRiskRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + if !common.IsNil(o.TransactionRule) { + toSerialize["transactionRule"] = o.TransactionRule + } + if !common.IsNil(o.TransactionRuleSource) { + toSerialize["transactionRuleSource"] = o.TransactionRuleSource + } + return toSerialize, nil +} + +type NullableNetworkTokenTriggeredRiskRule struct { + value *NetworkTokenTriggeredRiskRule + isSet bool +} + +func (v NullableNetworkTokenTriggeredRiskRule) Get() *NetworkTokenTriggeredRiskRule { + return v.value +} + +func (v *NullableNetworkTokenTriggeredRiskRule) Set(val *NetworkTokenTriggeredRiskRule) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkTokenTriggeredRiskRule) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkTokenTriggeredRiskRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkTokenTriggeredRiskRule(val *NetworkTokenTriggeredRiskRule) *NullableNetworkTokenTriggeredRiskRule { + return &NullableNetworkTokenTriggeredRiskRule{value: val, isSet: true} +} + +func (v NullableNetworkTokenTriggeredRiskRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkTokenTriggeredRiskRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_platform_payment_configuration.go b/src/configurationwebhook/model_platform_payment_configuration.go index 21c2d933e..2a8fe8eba 100644 --- a/src/configurationwebhook/model_platform_payment_configuration.go +++ b/src/configurationwebhook/model_platform_payment_configuration.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &PlatformPaymentConfiguration{} // PlatformPaymentConfiguration struct for PlatformPaymentConfiguration type PlatformPaymentConfiguration struct { - // Specifies at what time a [sales day](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#sales-day) ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. + // Specifies at what time a sales day ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. SalesDayClosingTime *string `json:"salesDayClosingTime,omitempty"` - // Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **20**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**. + // Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**. SettlementDelayDays *int32 `json:"settlementDelayDays,omitempty"` } diff --git a/src/configurationwebhook/model_resource.go b/src/configurationwebhook/model_resource.go index 4c3dcf5d9..084313db5 100644 --- a/src/configurationwebhook/model_resource.go +++ b/src/configurationwebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/configurationwebhook/model_resource_reference.go b/src/configurationwebhook/model_resource_reference.go new file mode 100644 index 000000000..39c838ba1 --- /dev/null +++ b/src/configurationwebhook/model_resource_reference.go @@ -0,0 +1,199 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ResourceReference type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResourceReference{} + +// ResourceReference struct for ResourceReference +type ResourceReference struct { + // The description of the resource. + Description *string `json:"description,omitempty"` + // The unique identifier of the resource. + Id *string `json:"id,omitempty"` + // The reference for the resource. + Reference *string `json:"reference,omitempty"` +} + +// NewResourceReference instantiates a new ResourceReference 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 NewResourceReference() *ResourceReference { + this := ResourceReference{} + return &this +} + +// NewResourceReferenceWithDefaults instantiates a new ResourceReference 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 NewResourceReferenceWithDefaults() *ResourceReference { + this := ResourceReference{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) SetId(v string) { + o.Id = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) 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 *ResourceReference) SetReference(v string) { + o.Reference = &v +} + +func (o ResourceReference) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourceReference) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !common.IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !common.IsNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +type NullableResourceReference struct { + value *ResourceReference + isSet bool +} + +func (v NullableResourceReference) Get() *ResourceReference { + return v.value +} + +func (v *NullableResourceReference) Set(val *ResourceReference) { + v.value = val + v.isSet = true +} + +func (v NullableResourceReference) IsSet() bool { + return v.isSet +} + +func (v *NullableResourceReference) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResourceReference(val *ResourceReference) *NullableResourceReference { + return &NullableResourceReference{value: val, isSet: true} +} + +func (v NullableResourceReference) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResourceReference) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_score_notification_request.go b/src/configurationwebhook/model_score_notification_request.go new file mode 100644 index 000000000..ea010e080 --- /dev/null +++ b/src/configurationwebhook/model_score_notification_request.go @@ -0,0 +1,219 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ScoreNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ScoreNotificationRequest{} + +// ScoreNotificationRequest struct for ScoreNotificationRequest +type ScoreNotificationRequest struct { + Data BankScoreSignalTriggeredData `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // When the event was queued. + Timestamp *time.Time `json:"timestamp,omitempty"` + // Type of webhook. + Type string `json:"type"` +} + +// NewScoreNotificationRequest instantiates a new ScoreNotificationRequest 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 NewScoreNotificationRequest(data BankScoreSignalTriggeredData, environment string, type_ string) *ScoreNotificationRequest { + this := ScoreNotificationRequest{} + this.Data = data + this.Environment = environment + this.Type = type_ + return &this +} + +// NewScoreNotificationRequestWithDefaults instantiates a new ScoreNotificationRequest 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 NewScoreNotificationRequestWithDefaults() *ScoreNotificationRequest { + this := ScoreNotificationRequest{} + return &this +} + +// GetData returns the Data field value +func (o *ScoreNotificationRequest) GetData() BankScoreSignalTriggeredData { + if o == nil { + var ret BankScoreSignalTriggeredData + 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 *ScoreNotificationRequest) GetDataOk() (*BankScoreSignalTriggeredData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ScoreNotificationRequest) SetData(v BankScoreSignalTriggeredData) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *ScoreNotificationRequest) 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 *ScoreNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *ScoreNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *ScoreNotificationRequest) GetTimestamp() time.Time { + if o == nil || common.IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ScoreNotificationRequest) GetTimestampOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *ScoreNotificationRequest) HasTimestamp() bool { + if o != nil && !common.IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *ScoreNotificationRequest) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +// GetType returns the Type field value +func (o *ScoreNotificationRequest) 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 *ScoreNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ScoreNotificationRequest) SetType(v string) { + o.Type = v +} + +func (o ScoreNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ScoreNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + if !common.IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableScoreNotificationRequest struct { + value *ScoreNotificationRequest + isSet bool +} + +func (v NullableScoreNotificationRequest) Get() *ScoreNotificationRequest { + return v.value +} + +func (v *NullableScoreNotificationRequest) Set(val *ScoreNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableScoreNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableScoreNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableScoreNotificationRequest(val *ScoreNotificationRequest) *NullableScoreNotificationRequest { + return &NullableScoreNotificationRequest{value: val, isSet: true} +} + +func (v NullableScoreNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableScoreNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *ScoreNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"balancePlatform.score.triggered"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/configurationwebhook/model_sweep_configuration_v2.go b/src/configurationwebhook/model_sweep_configuration_v2.go index 1c7b3c284..1ccdf718a 100644 --- a/src/configurationwebhook/model_sweep_configuration_v2.go +++ b/src/configurationwebhook/model_sweep_configuration_v2.go @@ -28,7 +28,7 @@ type SweepConfigurationV2 struct { Description *string `json:"description,omitempty"` // The unique identifier of the sweep. Id string `json:"id"` - // The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). + // The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). Priorities []string `json:"priorities,omitempty"` // The reason for disabling the sweep. Reason *string `json:"reason,omitempty"` @@ -652,7 +652,7 @@ func (o *SweepConfigurationV2) isValidCategory() bool { return false } func (o *SweepConfigurationV2) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/configurationwebhook/model_token_authentication.go b/src/configurationwebhook/model_token_authentication.go new file mode 100644 index 000000000..29c1654a1 --- /dev/null +++ b/src/configurationwebhook/model_token_authentication.go @@ -0,0 +1,162 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenAuthentication type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenAuthentication{} + +// TokenAuthentication struct for TokenAuthentication +type TokenAuthentication struct { + // The method used to complete the authentication process. Possible values: **sms_OTP**, **email_OTP**. + Method *string `json:"method,omitempty"` + // The result of the authentication process. + Result *string `json:"result,omitempty"` +} + +// NewTokenAuthentication instantiates a new TokenAuthentication 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 NewTokenAuthentication() *TokenAuthentication { + this := TokenAuthentication{} + return &this +} + +// NewTokenAuthenticationWithDefaults instantiates a new TokenAuthentication 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 NewTokenAuthenticationWithDefaults() *TokenAuthentication { + this := TokenAuthentication{} + return &this +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *TokenAuthentication) GetMethod() string { + if o == nil || common.IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenAuthentication) GetMethodOk() (*string, bool) { + if o == nil || common.IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *TokenAuthentication) HasMethod() bool { + if o != nil && !common.IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *TokenAuthentication) SetMethod(v string) { + o.Method = &v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *TokenAuthentication) 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 *TokenAuthentication) 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 *TokenAuthentication) 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 *TokenAuthentication) SetResult(v string) { + o.Result = &v +} + +func (o TokenAuthentication) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenAuthentication) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !common.IsNil(o.Result) { + toSerialize["result"] = o.Result + } + return toSerialize, nil +} + +type NullableTokenAuthentication struct { + value *TokenAuthentication + isSet bool +} + +func (v NullableTokenAuthentication) Get() *TokenAuthentication { + return v.value +} + +func (v *NullableTokenAuthentication) Set(val *TokenAuthentication) { + v.value = val + v.isSet = true +} + +func (v NullableTokenAuthentication) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenAuthentication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenAuthentication(val *TokenAuthentication) *NullableTokenAuthentication { + return &NullableTokenAuthentication{value: val, isSet: true} +} + +func (v NullableTokenAuthentication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenAuthentication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/configurationwebhook/model_validation_facts.go b/src/configurationwebhook/model_validation_facts.go new file mode 100644 index 000000000..f89780f42 --- /dev/null +++ b/src/configurationwebhook/model_validation_facts.go @@ -0,0 +1,209 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ValidationFacts type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ValidationFacts{} + +// ValidationFacts struct for ValidationFacts +type ValidationFacts struct { + // The reason for the `result` of the validations. This field is only sent for `validationFacts.type` **walletValidation**, when `validationFacts.result` is **invalid**. + Reasons []string `json:"reasons,omitempty"` + // The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**. + Result *string `json:"result,omitempty"` + // The type of the validation fact. + Type *string `json:"type,omitempty"` +} + +// NewValidationFacts instantiates a new ValidationFacts 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 NewValidationFacts() *ValidationFacts { + this := ValidationFacts{} + return &this +} + +// NewValidationFactsWithDefaults instantiates a new ValidationFacts 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 NewValidationFactsWithDefaults() *ValidationFacts { + this := ValidationFacts{} + return &this +} + +// GetReasons returns the Reasons field value if set, zero value otherwise. +func (o *ValidationFacts) GetReasons() []string { + if o == nil || common.IsNil(o.Reasons) { + var ret []string + return ret + } + return o.Reasons +} + +// GetReasonsOk returns a tuple with the Reasons field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidationFacts) GetReasonsOk() ([]string, bool) { + if o == nil || common.IsNil(o.Reasons) { + return nil, false + } + return o.Reasons, true +} + +// HasReasons returns a boolean if a field has been set. +func (o *ValidationFacts) HasReasons() bool { + if o != nil && !common.IsNil(o.Reasons) { + return true + } + + return false +} + +// SetReasons gets a reference to the given []string and assigns it to the Reasons field. +func (o *ValidationFacts) SetReasons(v []string) { + o.Reasons = v +} + +// GetResult returns the Result field value if set, zero value otherwise. +func (o *ValidationFacts) 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 *ValidationFacts) 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 *ValidationFacts) 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 *ValidationFacts) SetResult(v string) { + o.Result = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *ValidationFacts) 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 *ValidationFacts) 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 *ValidationFacts) 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 *ValidationFacts) SetType(v string) { + o.Type = &v +} + +func (o ValidationFacts) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationFacts) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Reasons) { + toSerialize["reasons"] = o.Reasons + } + if !common.IsNil(o.Result) { + toSerialize["result"] = o.Result + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableValidationFacts struct { + value *ValidationFacts + isSet bool +} + +func (v NullableValidationFacts) Get() *ValidationFacts { + return v.value +} + +func (v *NullableValidationFacts) Set(val *ValidationFacts) { + v.value = val + v.isSet = true +} + +func (v NullableValidationFacts) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationFacts) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationFacts(val *ValidationFacts) *NullableValidationFacts { + return &NullableValidationFacts{value: val, isSet: true} +} + +func (v NullableValidationFacts) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationFacts) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *ValidationFacts) isValidResult() bool { + var allowedEnumValues = []string{"invalid", "notApplicable", "notValidated", "valid"} + for _, allowed := range allowedEnumValues { + if o.GetResult() == allowed { + return true + } + } + return false +} diff --git a/src/configurationwebhook/model_verification_error.go b/src/configurationwebhook/model_verification_error.go index 680294d95..7e7111c85 100644 --- a/src/configurationwebhook/model_verification_error.go +++ b/src/configurationwebhook/model_verification_error.go @@ -29,7 +29,7 @@ type VerificationError struct { RemediatingActions []RemediatingAction `json:"remediatingActions,omitempty"` // Contains more granular information about the verification error. SubErrors []VerificationErrorRecursive `json:"subErrors,omitempty"` - // The type of error. Possible values: **invalidInput**, **dataMissing**. + // The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableVerificationError) UnmarshalJSON(src []byte) error { } func (o *VerificationError) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/configurationwebhook/model_verification_error_recursive.go b/src/configurationwebhook/model_verification_error_recursive.go index 70553e2fd..c9e55793c 100644 --- a/src/configurationwebhook/model_verification_error_recursive.go +++ b/src/configurationwebhook/model_verification_error_recursive.go @@ -25,7 +25,7 @@ type VerificationErrorRecursive struct { Code *string `json:"code,omitempty"` // A description of the error. Message *string `json:"message,omitempty"` - // The type of error. Possible values: **invalidInput**, **dataMissing**. + // The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** Type *string `json:"type,omitempty"` // Contains the actions that you can take to resolve the verification error. RemediatingActions []RemediatingAction `json:"remediatingActions,omitempty"` @@ -273,7 +273,7 @@ func (v *NullableVerificationErrorRecursive) UnmarshalJSON(src []byte) error { } func (o *VerificationErrorRecursive) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/configurationwebhook/model_wallet.go b/src/configurationwebhook/model_wallet.go new file mode 100644 index 000000000..93b34450f --- /dev/null +++ b/src/configurationwebhook/model_wallet.go @@ -0,0 +1,317 @@ +/* +Configuration webhooks + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package configurationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the Wallet type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &Wallet{} + +// Wallet struct for Wallet +type Wallet struct { + // The confidence score of the wallet account, calculated by the wallet provider. A high score means that account is considered trustworthy. A low score means that the account is considered suspicious. Possible values: **1** to **5**. + AccountScore *string `json:"accountScore,omitempty"` + Device *Device `json:"device,omitempty"` + // The confidence score of the device, calculated by the wallet provider. A high score means that device is considered trustworthy. A low score means that the device is considered suspicious. Possible values: **1** to **5**. + DeviceScore *string `json:"deviceScore,omitempty"` + // The method used for provisioning the network token. Possible values: **push**, **manual**, **cof**, **unknown**. + ProvisioningMethod *string `json:"provisioningMethod,omitempty"` + // A list of risk indicators triggered at the time of provisioning the network token. Some example values of risk indicators are: * **accountTooNewSinceLaunch** * **tooManyRecentAttempts** * **lowDeviceScore** * **lowAccountScore** + RecommendationReasons []string `json:"recommendationReasons,omitempty"` + // The type of wallet that the network token is associated with. Possible values: **applePay**, **googlePay**, **garminPay**. + // Deprecated since Configuration webhooks v2 + // Use name of the `tokenRequestor` instead. + Type *string `json:"type,omitempty"` +} + +// NewWallet instantiates a new Wallet 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 NewWallet() *Wallet { + this := Wallet{} + return &this +} + +// NewWalletWithDefaults instantiates a new Wallet 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 NewWalletWithDefaults() *Wallet { + this := Wallet{} + return &this +} + +// GetAccountScore returns the AccountScore field value if set, zero value otherwise. +func (o *Wallet) GetAccountScore() string { + if o == nil || common.IsNil(o.AccountScore) { + var ret string + return ret + } + return *o.AccountScore +} + +// GetAccountScoreOk returns a tuple with the AccountScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Wallet) GetAccountScoreOk() (*string, bool) { + if o == nil || common.IsNil(o.AccountScore) { + return nil, false + } + return o.AccountScore, true +} + +// HasAccountScore returns a boolean if a field has been set. +func (o *Wallet) HasAccountScore() bool { + if o != nil && !common.IsNil(o.AccountScore) { + return true + } + + return false +} + +// SetAccountScore gets a reference to the given string and assigns it to the AccountScore field. +func (o *Wallet) SetAccountScore(v string) { + o.AccountScore = &v +} + +// GetDevice returns the Device field value if set, zero value otherwise. +func (o *Wallet) GetDevice() Device { + if o == nil || common.IsNil(o.Device) { + var ret Device + return ret + } + return *o.Device +} + +// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Wallet) GetDeviceOk() (*Device, bool) { + if o == nil || common.IsNil(o.Device) { + return nil, false + } + return o.Device, true +} + +// HasDevice returns a boolean if a field has been set. +func (o *Wallet) HasDevice() bool { + if o != nil && !common.IsNil(o.Device) { + return true + } + + return false +} + +// SetDevice gets a reference to the given Device and assigns it to the Device field. +func (o *Wallet) SetDevice(v Device) { + o.Device = &v +} + +// GetDeviceScore returns the DeviceScore field value if set, zero value otherwise. +func (o *Wallet) GetDeviceScore() string { + if o == nil || common.IsNil(o.DeviceScore) { + var ret string + return ret + } + return *o.DeviceScore +} + +// GetDeviceScoreOk returns a tuple with the DeviceScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Wallet) GetDeviceScoreOk() (*string, bool) { + if o == nil || common.IsNil(o.DeviceScore) { + return nil, false + } + return o.DeviceScore, true +} + +// HasDeviceScore returns a boolean if a field has been set. +func (o *Wallet) HasDeviceScore() bool { + if o != nil && !common.IsNil(o.DeviceScore) { + return true + } + + return false +} + +// SetDeviceScore gets a reference to the given string and assigns it to the DeviceScore field. +func (o *Wallet) SetDeviceScore(v string) { + o.DeviceScore = &v +} + +// GetProvisioningMethod returns the ProvisioningMethod field value if set, zero value otherwise. +func (o *Wallet) GetProvisioningMethod() string { + if o == nil || common.IsNil(o.ProvisioningMethod) { + var ret string + return ret + } + return *o.ProvisioningMethod +} + +// GetProvisioningMethodOk returns a tuple with the ProvisioningMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Wallet) GetProvisioningMethodOk() (*string, bool) { + if o == nil || common.IsNil(o.ProvisioningMethod) { + return nil, false + } + return o.ProvisioningMethod, true +} + +// HasProvisioningMethod returns a boolean if a field has been set. +func (o *Wallet) HasProvisioningMethod() bool { + if o != nil && !common.IsNil(o.ProvisioningMethod) { + return true + } + + return false +} + +// SetProvisioningMethod gets a reference to the given string and assigns it to the ProvisioningMethod field. +func (o *Wallet) SetProvisioningMethod(v string) { + o.ProvisioningMethod = &v +} + +// GetRecommendationReasons returns the RecommendationReasons field value if set, zero value otherwise. +func (o *Wallet) GetRecommendationReasons() []string { + if o == nil || common.IsNil(o.RecommendationReasons) { + var ret []string + return ret + } + return o.RecommendationReasons +} + +// GetRecommendationReasonsOk returns a tuple with the RecommendationReasons field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Wallet) GetRecommendationReasonsOk() ([]string, bool) { + if o == nil || common.IsNil(o.RecommendationReasons) { + return nil, false + } + return o.RecommendationReasons, true +} + +// HasRecommendationReasons returns a boolean if a field has been set. +func (o *Wallet) HasRecommendationReasons() bool { + if o != nil && !common.IsNil(o.RecommendationReasons) { + return true + } + + return false +} + +// SetRecommendationReasons gets a reference to the given []string and assigns it to the RecommendationReasons field. +func (o *Wallet) SetRecommendationReasons(v []string) { + o.RecommendationReasons = v +} + +// GetType returns the Type field value if set, zero value otherwise. +// Deprecated since Configuration webhooks v2 +// Use name of the `tokenRequestor` instead. +func (o *Wallet) 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. +// Deprecated since Configuration webhooks v2 +// Use name of the `tokenRequestor` instead. +func (o *Wallet) 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 *Wallet) 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. +// Deprecated since Configuration webhooks v2 +// Use name of the `tokenRequestor` instead. +func (o *Wallet) SetType(v string) { + o.Type = &v +} + +func (o Wallet) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Wallet) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AccountScore) { + toSerialize["accountScore"] = o.AccountScore + } + if !common.IsNil(o.Device) { + toSerialize["device"] = o.Device + } + if !common.IsNil(o.DeviceScore) { + toSerialize["deviceScore"] = o.DeviceScore + } + if !common.IsNil(o.ProvisioningMethod) { + toSerialize["provisioningMethod"] = o.ProvisioningMethod + } + if !common.IsNil(o.RecommendationReasons) { + toSerialize["recommendationReasons"] = o.RecommendationReasons + } + if !common.IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableWallet struct { + value *Wallet + isSet bool +} + +func (v NullableWallet) Get() *Wallet { + return v.value +} + +func (v *NullableWallet) Set(val *Wallet) { + v.value = val + v.isSet = true +} + +func (v NullableWallet) IsSet() bool { + return v.isSet +} + +func (v *NullableWallet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWallet(val *Wallet) *NullableWallet { + return &NullableWallet{value: val, isSet: true} +} + +func (v NullableWallet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWallet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/disputewebhook/model_balance_platform_notification_response.go b/src/disputewebhook/model_balance_platform_notification_response.go index 098541ffc..3071ea7a7 100644 --- a/src/disputewebhook/model_balance_platform_notification_response.go +++ b/src/disputewebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/disputewebhook/model_dispute_event_notification.go b/src/disputewebhook/model_dispute_event_notification.go index ad0f49f09..97e6117e0 100644 --- a/src/disputewebhook/model_dispute_event_notification.go +++ b/src/disputewebhook/model_dispute_event_notification.go @@ -24,7 +24,7 @@ type DisputeEventNotification struct { Arn *string `json:"arn,omitempty"` // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // Contains information about the dispute. Description *string `json:"description,omitempty"` @@ -458,7 +458,7 @@ func (v *NullableDisputeEventNotification) UnmarshalJSON(src []byte) error { } func (o *DisputeEventNotification) isValidType() bool { - var allowedEnumValues = []string{"fraud", "notDelivered", "duplicate"} + var allowedEnumValues = []string{"fraud", "notDelivered", "duplicate", "other"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/managementwebhook/model_account_capability_data.go b/src/managementwebhook/model_account_capability_data.go index aedc9026d..fa304b5a8 100644 --- a/src/managementwebhook/model_account_capability_data.go +++ b/src/managementwebhook/model_account_capability_data.go @@ -26,7 +26,7 @@ type AccountCapabilityData struct { AllowedLevel *string `json:"allowedLevel,omitempty"` // The name of the capability. For example, **sendToTransferInstrument**. Capability *string `json:"capability,omitempty"` - // List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. + // List of entities that have problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. Problems []CapabilityProblem `json:"problems,omitempty"` // Indicates whether you requested the capability. Requested bool `json:"requested"` diff --git a/src/managementwebhook/model_account_notification_response.go b/src/managementwebhook/model_account_notification_response.go index cc1dc0638..d101dee6e 100644 --- a/src/managementwebhook/model_account_notification_response.go +++ b/src/managementwebhook/model_account_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &AccountNotificationResponse{} // AccountNotificationResponse struct for AccountNotificationResponse type AccountNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_payment_method_notification_response.go b/src/managementwebhook/model_payment_method_notification_response.go index de46a1f6b..1e9863439 100644 --- a/src/managementwebhook/model_payment_method_notification_response.go +++ b/src/managementwebhook/model_payment_method_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &PaymentMethodNotificationResponse{} // PaymentMethodNotificationResponse struct for PaymentMethodNotificationResponse type PaymentMethodNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_terminal_assignment_notification_request.go b/src/managementwebhook/model_terminal_assignment_notification_request.go index 051fc56a1..cdb0c4792 100644 --- a/src/managementwebhook/model_terminal_assignment_notification_request.go +++ b/src/managementwebhook/model_terminal_assignment_notification_request.go @@ -21,8 +21,10 @@ var _ common.MappedNullable = &TerminalAssignmentNotificationRequest{} type TerminalAssignmentNotificationRequest struct { // The unique identifier of the merchant/company account to which the terminal is assigned. AssignedToAccount string `json:"assignedToAccount"` - // The unique identifier of the store to which the terminal is assigned. + // The store that the terminal is assigned to, identified by the store reference (also known as store code). AssignedToStore *string `json:"assignedToStore,omitempty"` + // The unique identifier of the store to which the terminal is assigned. + AssignedToStoreId *string `json:"assignedToStoreId,omitempty"` // The date and time when an event has been completed. EventDate string `json:"eventDate"` // The PSP reference of the request from which the notification originates. @@ -108,6 +110,38 @@ func (o *TerminalAssignmentNotificationRequest) SetAssignedToStore(v string) { o.AssignedToStore = &v } +// GetAssignedToStoreId returns the AssignedToStoreId field value if set, zero value otherwise. +func (o *TerminalAssignmentNotificationRequest) GetAssignedToStoreId() string { + if o == nil || common.IsNil(o.AssignedToStoreId) { + var ret string + return ret + } + return *o.AssignedToStoreId +} + +// GetAssignedToStoreIdOk returns a tuple with the AssignedToStoreId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TerminalAssignmentNotificationRequest) GetAssignedToStoreIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AssignedToStoreId) { + return nil, false + } + return o.AssignedToStoreId, true +} + +// HasAssignedToStoreId returns a boolean if a field has been set. +func (o *TerminalAssignmentNotificationRequest) HasAssignedToStoreId() bool { + if o != nil && !common.IsNil(o.AssignedToStoreId) { + return true + } + + return false +} + +// SetAssignedToStoreId gets a reference to the given string and assigns it to the AssignedToStoreId field. +func (o *TerminalAssignmentNotificationRequest) SetAssignedToStoreId(v string) { + o.AssignedToStoreId = &v +} + // GetEventDate returns the EventDate field value func (o *TerminalAssignmentNotificationRequest) GetEventDate() string { if o == nil { @@ -194,6 +228,9 @@ func (o TerminalAssignmentNotificationRequest) ToMap() (map[string]interface{}, if !common.IsNil(o.AssignedToStore) { toSerialize["assignedToStore"] = o.AssignedToStore } + if !common.IsNil(o.AssignedToStoreId) { + toSerialize["assignedToStoreId"] = o.AssignedToStoreId + } toSerialize["eventDate"] = o.EventDate toSerialize["pspReference"] = o.PspReference toSerialize["uniqueTerminalId"] = o.UniqueTerminalId diff --git a/src/managementwebhook/model_terminal_assignment_notification_response.go b/src/managementwebhook/model_terminal_assignment_notification_response.go index fcef8feaa..e13f72b09 100644 --- a/src/managementwebhook/model_terminal_assignment_notification_response.go +++ b/src/managementwebhook/model_terminal_assignment_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &TerminalAssignmentNotificationResponse{} // TerminalAssignmentNotificationResponse struct for TerminalAssignmentNotificationResponse type TerminalAssignmentNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_terminal_boarding_notification_response.go b/src/managementwebhook/model_terminal_boarding_notification_response.go index fe8ba9d00..7a22e8a6a 100644 --- a/src/managementwebhook/model_terminal_boarding_notification_response.go +++ b/src/managementwebhook/model_terminal_boarding_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &TerminalBoardingNotificationResponse{} // TerminalBoardingNotificationResponse struct for TerminalBoardingNotificationResponse type TerminalBoardingNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_terminal_settings_notification_response.go b/src/managementwebhook/model_terminal_settings_notification_response.go index 1664ad428..48cdcbc13 100644 --- a/src/managementwebhook/model_terminal_settings_notification_response.go +++ b/src/managementwebhook/model_terminal_settings_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &TerminalSettingsNotificationResponse{} // TerminalSettingsNotificationResponse struct for TerminalSettingsNotificationResponse type TerminalSettingsNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_verification_error.go b/src/managementwebhook/model_verification_error.go index 1ebc8e6c1..d15d1053f 100644 --- a/src/managementwebhook/model_verification_error.go +++ b/src/managementwebhook/model_verification_error.go @@ -273,7 +273,7 @@ func (v *NullableVerificationError) UnmarshalJSON(src []byte) error { } func (o *VerificationError) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/managementwebhook/model_verification_error_recursive.go b/src/managementwebhook/model_verification_error_recursive.go index df9e719ba..f21ff06a5 100644 --- a/src/managementwebhook/model_verification_error_recursive.go +++ b/src/managementwebhook/model_verification_error_recursive.go @@ -236,7 +236,7 @@ func (v *NullableVerificationErrorRecursive) UnmarshalJSON(src []byte) error { } func (o *VerificationErrorRecursive) isValidType() bool { - var allowedEnumValues = []string{"dataMissing", "invalidInput", "pendingStatus"} + var allowedEnumValues = []string{"dataMissing", "dataReview", "invalidInput", "pendingStatus"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/negativebalancewarningwebhook/model_negative_balance_compensation_warning_notification_data.go b/src/negativebalancewarningwebhook/model_negative_balance_compensation_warning_notification_data.go index 612c32211..559a43385 100644 --- a/src/negativebalancewarningwebhook/model_negative_balance_compensation_warning_notification_data.go +++ b/src/negativebalancewarningwebhook/model_negative_balance_compensation_warning_notification_data.go @@ -24,7 +24,7 @@ type NegativeBalanceCompensationWarningNotificationData struct { Amount *Amount `json:"amount,omitempty"` // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/negativebalancewarningwebhook/model_resource.go b/src/negativebalancewarningwebhook/model_resource.go index f2575675b..6559e24b5 100644 --- a/src/negativebalancewarningwebhook/model_resource.go +++ b/src/negativebalancewarningwebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/reportwebhook/model_balance_platform_notification_response.go b/src/reportwebhook/model_balance_platform_notification_response.go index d4949dcf2..e77506df9 100644 --- a/src/reportwebhook/model_balance_platform_notification_response.go +++ b/src/reportwebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/reportwebhook/model_report_notification_data.go b/src/reportwebhook/model_report_notification_data.go index a5b4bc0af..62aec4836 100644 --- a/src/reportwebhook/model_report_notification_data.go +++ b/src/reportwebhook/model_report_notification_data.go @@ -24,7 +24,7 @@ type ReportNotificationData struct { BalanceAccount *ResourceReference `json:"balanceAccount,omitempty"` // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The URL at which you can download the report. To download, you must authenticate your GET request with your [API credentials](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/overview). DownloadUrl string `json:"downloadUrl"` diff --git a/src/reportwebhook/model_resource.go b/src/reportwebhook/model_resource.go index 886f65dc9..9fe07b4c6 100644 --- a/src/reportwebhook/model_resource.go +++ b/src/reportwebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/tokenizationwebhook/model_recurring_token.go b/src/tokenizationwebhook/model_recurring_token.go new file mode 100644 index 000000000..14a6a1dca --- /dev/null +++ b/src/tokenizationwebhook/model_recurring_token.go @@ -0,0 +1,200 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the RecurringToken type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RecurringToken{} + +// RecurringToken struct for RecurringToken +type RecurringToken struct { + // The identifier of the merchant account related to the event that triggered the webhook. + MerchantAccount string `json:"merchantAccount"` + // Your unique shopper reference that is associated with the `storedPaymentMethodId`. + ShopperReference string `json:"shopperReference"` + // The ID of the token. + StoredPaymentMethodId string `json:"storedPaymentMethodId"` + // The type of the payment method. + Type string `json:"type"` +} + +// NewRecurringToken instantiates a new RecurringToken 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 NewRecurringToken(merchantAccount string, shopperReference string, storedPaymentMethodId string, type_ string) *RecurringToken { + this := RecurringToken{} + this.MerchantAccount = merchantAccount + this.ShopperReference = shopperReference + this.StoredPaymentMethodId = storedPaymentMethodId + this.Type = type_ + return &this +} + +// NewRecurringTokenWithDefaults instantiates a new RecurringToken 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 NewRecurringTokenWithDefaults() *RecurringToken { + this := RecurringToken{} + return &this +} + +// GetMerchantAccount returns the MerchantAccount field value +func (o *RecurringToken) GetMerchantAccount() string { + if o == nil { + var ret string + return ret + } + + return o.MerchantAccount +} + +// GetMerchantAccountOk returns a tuple with the MerchantAccount field value +// and a boolean to check if the value has been set. +func (o *RecurringToken) GetMerchantAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MerchantAccount, true +} + +// SetMerchantAccount sets field value +func (o *RecurringToken) SetMerchantAccount(v string) { + o.MerchantAccount = v +} + +// GetShopperReference returns the ShopperReference field value +func (o *RecurringToken) GetShopperReference() string { + if o == nil { + var ret string + return ret + } + + return o.ShopperReference +} + +// GetShopperReferenceOk returns a tuple with the ShopperReference field value +// and a boolean to check if the value has been set. +func (o *RecurringToken) GetShopperReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ShopperReference, true +} + +// SetShopperReference sets field value +func (o *RecurringToken) SetShopperReference(v string) { + o.ShopperReference = v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value +func (o *RecurringToken) GetStoredPaymentMethodId() string { + if o == nil { + var ret string + return ret + } + + return o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value +// and a boolean to check if the value has been set. +func (o *RecurringToken) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StoredPaymentMethodId, true +} + +// SetStoredPaymentMethodId sets field value +func (o *RecurringToken) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = v +} + +// GetType returns the Type field value +func (o *RecurringToken) 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 *RecurringToken) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RecurringToken) SetType(v string) { + o.Type = v +} + +func (o RecurringToken) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecurringToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["merchantAccount"] = o.MerchantAccount + toSerialize["shopperReference"] = o.ShopperReference + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableRecurringToken struct { + value *RecurringToken + isSet bool +} + +func (v NullableRecurringToken) Get() *RecurringToken { + return v.value +} + +func (v *NullableRecurringToken) Set(val *RecurringToken) { + v.value = val + v.isSet = true +} + +func (v NullableRecurringToken) IsSet() bool { + return v.isSet +} + +func (v *NullableRecurringToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecurringToken(val *RecurringToken) *NullableRecurringToken { + return &NullableRecurringToken{value: val, isSet: true} +} + +func (v NullableRecurringToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecurringToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/tokenizationwebhook/model_recurring_token_store_operation.go b/src/tokenizationwebhook/model_recurring_token_store_operation.go new file mode 100644 index 000000000..4ec0572f9 --- /dev/null +++ b/src/tokenizationwebhook/model_recurring_token_store_operation.go @@ -0,0 +1,228 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the RecurringTokenStoreOperation type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &RecurringTokenStoreOperation{} + +// RecurringTokenStoreOperation struct for RecurringTokenStoreOperation +type RecurringTokenStoreOperation struct { + // The identifier of the merchant account related to the event that triggered the webhook. + MerchantAccount string `json:"merchantAccount"` + // A text description that provides details about the operation, intended for audit purposes. + Operation string `json:"operation"` + // Your unique shopper reference that is associated with the `storedPaymentMethodId`. + ShopperReference string `json:"shopperReference"` + // The ID of the token. + StoredPaymentMethodId string `json:"storedPaymentMethodId"` + // The type of the payment method. + Type string `json:"type"` +} + +// NewRecurringTokenStoreOperation instantiates a new RecurringTokenStoreOperation 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 NewRecurringTokenStoreOperation(merchantAccount string, operation string, shopperReference string, storedPaymentMethodId string, type_ string) *RecurringTokenStoreOperation { + this := RecurringTokenStoreOperation{} + this.MerchantAccount = merchantAccount + this.Operation = operation + this.ShopperReference = shopperReference + this.StoredPaymentMethodId = storedPaymentMethodId + this.Type = type_ + return &this +} + +// NewRecurringTokenStoreOperationWithDefaults instantiates a new RecurringTokenStoreOperation 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 NewRecurringTokenStoreOperationWithDefaults() *RecurringTokenStoreOperation { + this := RecurringTokenStoreOperation{} + return &this +} + +// GetMerchantAccount returns the MerchantAccount field value +func (o *RecurringTokenStoreOperation) GetMerchantAccount() string { + if o == nil { + var ret string + return ret + } + + return o.MerchantAccount +} + +// GetMerchantAccountOk returns a tuple with the MerchantAccount field value +// and a boolean to check if the value has been set. +func (o *RecurringTokenStoreOperation) GetMerchantAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MerchantAccount, true +} + +// SetMerchantAccount sets field value +func (o *RecurringTokenStoreOperation) SetMerchantAccount(v string) { + o.MerchantAccount = v +} + +// GetOperation returns the Operation field value +func (o *RecurringTokenStoreOperation) GetOperation() string { + if o == nil { + var ret string + return ret + } + + return o.Operation +} + +// GetOperationOk returns a tuple with the Operation field value +// and a boolean to check if the value has been set. +func (o *RecurringTokenStoreOperation) GetOperationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operation, true +} + +// SetOperation sets field value +func (o *RecurringTokenStoreOperation) SetOperation(v string) { + o.Operation = v +} + +// GetShopperReference returns the ShopperReference field value +func (o *RecurringTokenStoreOperation) GetShopperReference() string { + if o == nil { + var ret string + return ret + } + + return o.ShopperReference +} + +// GetShopperReferenceOk returns a tuple with the ShopperReference field value +// and a boolean to check if the value has been set. +func (o *RecurringTokenStoreOperation) GetShopperReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ShopperReference, true +} + +// SetShopperReference sets field value +func (o *RecurringTokenStoreOperation) SetShopperReference(v string) { + o.ShopperReference = v +} + +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value +func (o *RecurringTokenStoreOperation) GetStoredPaymentMethodId() string { + if o == nil { + var ret string + return ret + } + + return o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value +// and a boolean to check if the value has been set. +func (o *RecurringTokenStoreOperation) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StoredPaymentMethodId, true +} + +// SetStoredPaymentMethodId sets field value +func (o *RecurringTokenStoreOperation) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = v +} + +// GetType returns the Type field value +func (o *RecurringTokenStoreOperation) 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 *RecurringTokenStoreOperation) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RecurringTokenStoreOperation) SetType(v string) { + o.Type = v +} + +func (o RecurringTokenStoreOperation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecurringTokenStoreOperation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["merchantAccount"] = o.MerchantAccount + toSerialize["operation"] = o.Operation + toSerialize["shopperReference"] = o.ShopperReference + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +type NullableRecurringTokenStoreOperation struct { + value *RecurringTokenStoreOperation + isSet bool +} + +func (v NullableRecurringTokenStoreOperation) Get() *RecurringTokenStoreOperation { + return v.value +} + +func (v *NullableRecurringTokenStoreOperation) Set(val *RecurringTokenStoreOperation) { + v.value = val + v.isSet = true +} + +func (v NullableRecurringTokenStoreOperation) IsSet() bool { + return v.isSet +} + +func (v *NullableRecurringTokenStoreOperation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecurringTokenStoreOperation(val *RecurringTokenStoreOperation) *NullableRecurringTokenStoreOperation { + return &NullableRecurringTokenStoreOperation{value: val, isSet: true} +} + +func (v NullableRecurringTokenStoreOperation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecurringTokenStoreOperation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/tokenizationwebhook/model_tokenization_already_existing_details_notification_request.go b/src/tokenizationwebhook/model_tokenization_already_existing_details_notification_request.go new file mode 100644 index 000000000..8a23a46ea --- /dev/null +++ b/src/tokenizationwebhook/model_tokenization_already_existing_details_notification_request.go @@ -0,0 +1,284 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenizationAlreadyExistingDetailsNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenizationAlreadyExistingDetailsNotificationRequest{} + +// TokenizationAlreadyExistingDetailsNotificationRequest struct for TokenizationAlreadyExistingDetailsNotificationRequest +type TokenizationAlreadyExistingDetailsNotificationRequest struct { + // The date and time when the event happened, in ISO 8601 extended format. + CreatedAt time.Time `json:"createdAt"` + Data RecurringTokenStoreOperation `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // The PSP reference of the event that triggered the webhook. + EventId string `json:"eventId"` + // The type of webhook. + Type string `json:"type"` + // The version of this entity. + Version *string `json:"version,omitempty"` +} + +// NewTokenizationAlreadyExistingDetailsNotificationRequest instantiates a new TokenizationAlreadyExistingDetailsNotificationRequest 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 NewTokenizationAlreadyExistingDetailsNotificationRequest(createdAt time.Time, data RecurringTokenStoreOperation, environment string, eventId string, type_ string) *TokenizationAlreadyExistingDetailsNotificationRequest { + this := TokenizationAlreadyExistingDetailsNotificationRequest{} + this.CreatedAt = createdAt + this.Data = data + this.Environment = environment + this.EventId = eventId + this.Type = type_ + return &this +} + +// NewTokenizationAlreadyExistingDetailsNotificationRequestWithDefaults instantiates a new TokenizationAlreadyExistingDetailsNotificationRequest 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 NewTokenizationAlreadyExistingDetailsNotificationRequestWithDefaults() *TokenizationAlreadyExistingDetailsNotificationRequest { + this := TokenizationAlreadyExistingDetailsNotificationRequest{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) 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 *TokenizationAlreadyExistingDetailsNotificationRequest) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetData returns the Data field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) GetData() RecurringTokenStoreOperation { + if o == nil { + var ret RecurringTokenStoreOperation + 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 *TokenizationAlreadyExistingDetailsNotificationRequest) GetDataOk() (*RecurringTokenStoreOperation, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetData(v RecurringTokenStoreOperation) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) 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 *TokenizationAlreadyExistingDetailsNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetEventId returns the EventId field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) GetEventId() string { + if o == nil { + var ret string + return ret + } + + return o.EventId +} + +// GetEventIdOk returns a tuple with the EventId field value +// and a boolean to check if the value has been set. +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) GetEventIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventId, true +} + +// SetEventId sets field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetEventId(v string) { + o.EventId = v +} + +// GetType returns the Type field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) 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 *TokenizationAlreadyExistingDetailsNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetType(v string) { + o.Type = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) GetVersion() string { + if o == nil || common.IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) GetVersionOk() (*string, bool) { + if o == nil || common.IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) HasVersion() bool { + if o != nil && !common.IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) SetVersion(v string) { + o.Version = &v +} + +func (o TokenizationAlreadyExistingDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenizationAlreadyExistingDetailsNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + toSerialize["eventId"] = o.EventId + toSerialize["type"] = o.Type + if !common.IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableTokenizationAlreadyExistingDetailsNotificationRequest struct { + value *TokenizationAlreadyExistingDetailsNotificationRequest + isSet bool +} + +func (v NullableTokenizationAlreadyExistingDetailsNotificationRequest) Get() *TokenizationAlreadyExistingDetailsNotificationRequest { + return v.value +} + +func (v *NullableTokenizationAlreadyExistingDetailsNotificationRequest) Set(val *TokenizationAlreadyExistingDetailsNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTokenizationAlreadyExistingDetailsNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenizationAlreadyExistingDetailsNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenizationAlreadyExistingDetailsNotificationRequest(val *TokenizationAlreadyExistingDetailsNotificationRequest) *NullableTokenizationAlreadyExistingDetailsNotificationRequest { + return &NullableTokenizationAlreadyExistingDetailsNotificationRequest{value: val, isSet: true} +} + +func (v NullableTokenizationAlreadyExistingDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenizationAlreadyExistingDetailsNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) isValidEnvironment() bool { + var allowedEnumValues = []string{"test", "live"} + for _, allowed := range allowedEnumValues { + if o.GetEnvironment() == allowed { + return true + } + } + return false +} +func (o *TokenizationAlreadyExistingDetailsNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"recurring.token.alreadyExisting"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/tokenizationwebhook/model_tokenization_created_details_notification_request.go b/src/tokenizationwebhook/model_tokenization_created_details_notification_request.go new file mode 100644 index 000000000..f036ac8d7 --- /dev/null +++ b/src/tokenizationwebhook/model_tokenization_created_details_notification_request.go @@ -0,0 +1,284 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenizationCreatedDetailsNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenizationCreatedDetailsNotificationRequest{} + +// TokenizationCreatedDetailsNotificationRequest struct for TokenizationCreatedDetailsNotificationRequest +type TokenizationCreatedDetailsNotificationRequest struct { + // The date and time when the event happened, in ISO 8601 extended format. + CreatedAt time.Time `json:"createdAt"` + Data RecurringTokenStoreOperation `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // The PSP reference of the event that triggered the webhook. + EventId string `json:"eventId"` + // The type of webhook. + Type string `json:"type"` + // The version of this entity. + Version *string `json:"version,omitempty"` +} + +// NewTokenizationCreatedDetailsNotificationRequest instantiates a new TokenizationCreatedDetailsNotificationRequest 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 NewTokenizationCreatedDetailsNotificationRequest(createdAt time.Time, data RecurringTokenStoreOperation, environment string, eventId string, type_ string) *TokenizationCreatedDetailsNotificationRequest { + this := TokenizationCreatedDetailsNotificationRequest{} + this.CreatedAt = createdAt + this.Data = data + this.Environment = environment + this.EventId = eventId + this.Type = type_ + return &this +} + +// NewTokenizationCreatedDetailsNotificationRequestWithDefaults instantiates a new TokenizationCreatedDetailsNotificationRequest 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 NewTokenizationCreatedDetailsNotificationRequestWithDefaults() *TokenizationCreatedDetailsNotificationRequest { + this := TokenizationCreatedDetailsNotificationRequest{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *TokenizationCreatedDetailsNotificationRequest) 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 *TokenizationCreatedDetailsNotificationRequest) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *TokenizationCreatedDetailsNotificationRequest) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetData returns the Data field value +func (o *TokenizationCreatedDetailsNotificationRequest) GetData() RecurringTokenStoreOperation { + if o == nil { + var ret RecurringTokenStoreOperation + 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 *TokenizationCreatedDetailsNotificationRequest) GetDataOk() (*RecurringTokenStoreOperation, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenizationCreatedDetailsNotificationRequest) SetData(v RecurringTokenStoreOperation) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *TokenizationCreatedDetailsNotificationRequest) 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 *TokenizationCreatedDetailsNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *TokenizationCreatedDetailsNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetEventId returns the EventId field value +func (o *TokenizationCreatedDetailsNotificationRequest) GetEventId() string { + if o == nil { + var ret string + return ret + } + + return o.EventId +} + +// GetEventIdOk returns a tuple with the EventId field value +// and a boolean to check if the value has been set. +func (o *TokenizationCreatedDetailsNotificationRequest) GetEventIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventId, true +} + +// SetEventId sets field value +func (o *TokenizationCreatedDetailsNotificationRequest) SetEventId(v string) { + o.EventId = v +} + +// GetType returns the Type field value +func (o *TokenizationCreatedDetailsNotificationRequest) 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 *TokenizationCreatedDetailsNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TokenizationCreatedDetailsNotificationRequest) SetType(v string) { + o.Type = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *TokenizationCreatedDetailsNotificationRequest) GetVersion() string { + if o == nil || common.IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenizationCreatedDetailsNotificationRequest) GetVersionOk() (*string, bool) { + if o == nil || common.IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *TokenizationCreatedDetailsNotificationRequest) HasVersion() bool { + if o != nil && !common.IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *TokenizationCreatedDetailsNotificationRequest) SetVersion(v string) { + o.Version = &v +} + +func (o TokenizationCreatedDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenizationCreatedDetailsNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + toSerialize["eventId"] = o.EventId + toSerialize["type"] = o.Type + if !common.IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableTokenizationCreatedDetailsNotificationRequest struct { + value *TokenizationCreatedDetailsNotificationRequest + isSet bool +} + +func (v NullableTokenizationCreatedDetailsNotificationRequest) Get() *TokenizationCreatedDetailsNotificationRequest { + return v.value +} + +func (v *NullableTokenizationCreatedDetailsNotificationRequest) Set(val *TokenizationCreatedDetailsNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTokenizationCreatedDetailsNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenizationCreatedDetailsNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenizationCreatedDetailsNotificationRequest(val *TokenizationCreatedDetailsNotificationRequest) *NullableTokenizationCreatedDetailsNotificationRequest { + return &NullableTokenizationCreatedDetailsNotificationRequest{value: val, isSet: true} +} + +func (v NullableTokenizationCreatedDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenizationCreatedDetailsNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TokenizationCreatedDetailsNotificationRequest) isValidEnvironment() bool { + var allowedEnumValues = []string{"test", "live"} + for _, allowed := range allowedEnumValues { + if o.GetEnvironment() == allowed { + return true + } + } + return false +} +func (o *TokenizationCreatedDetailsNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"recurring.token.created"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/tokenizationwebhook/model_tokenization_disabled_details_notification_request.go b/src/tokenizationwebhook/model_tokenization_disabled_details_notification_request.go new file mode 100644 index 000000000..464e4ebbd --- /dev/null +++ b/src/tokenizationwebhook/model_tokenization_disabled_details_notification_request.go @@ -0,0 +1,284 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenizationDisabledDetailsNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenizationDisabledDetailsNotificationRequest{} + +// TokenizationDisabledDetailsNotificationRequest struct for TokenizationDisabledDetailsNotificationRequest +type TokenizationDisabledDetailsNotificationRequest struct { + // The date and time when the event happened, in ISO 8601 extended format. + CreatedAt time.Time `json:"createdAt"` + Data RecurringToken `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // The PSP reference of the event that triggered the webhook. + EventId string `json:"eventId"` + // The type of webhook. + Type string `json:"type"` + // The version of this entity. + Version *string `json:"version,omitempty"` +} + +// NewTokenizationDisabledDetailsNotificationRequest instantiates a new TokenizationDisabledDetailsNotificationRequest 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 NewTokenizationDisabledDetailsNotificationRequest(createdAt time.Time, data RecurringToken, environment string, eventId string, type_ string) *TokenizationDisabledDetailsNotificationRequest { + this := TokenizationDisabledDetailsNotificationRequest{} + this.CreatedAt = createdAt + this.Data = data + this.Environment = environment + this.EventId = eventId + this.Type = type_ + return &this +} + +// NewTokenizationDisabledDetailsNotificationRequestWithDefaults instantiates a new TokenizationDisabledDetailsNotificationRequest 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 NewTokenizationDisabledDetailsNotificationRequestWithDefaults() *TokenizationDisabledDetailsNotificationRequest { + this := TokenizationDisabledDetailsNotificationRequest{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *TokenizationDisabledDetailsNotificationRequest) 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 *TokenizationDisabledDetailsNotificationRequest) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *TokenizationDisabledDetailsNotificationRequest) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetData returns the Data field value +func (o *TokenizationDisabledDetailsNotificationRequest) GetData() RecurringToken { + if o == nil { + var ret RecurringToken + 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 *TokenizationDisabledDetailsNotificationRequest) GetDataOk() (*RecurringToken, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenizationDisabledDetailsNotificationRequest) SetData(v RecurringToken) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *TokenizationDisabledDetailsNotificationRequest) 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 *TokenizationDisabledDetailsNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *TokenizationDisabledDetailsNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetEventId returns the EventId field value +func (o *TokenizationDisabledDetailsNotificationRequest) GetEventId() string { + if o == nil { + var ret string + return ret + } + + return o.EventId +} + +// GetEventIdOk returns a tuple with the EventId field value +// and a boolean to check if the value has been set. +func (o *TokenizationDisabledDetailsNotificationRequest) GetEventIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventId, true +} + +// SetEventId sets field value +func (o *TokenizationDisabledDetailsNotificationRequest) SetEventId(v string) { + o.EventId = v +} + +// GetType returns the Type field value +func (o *TokenizationDisabledDetailsNotificationRequest) 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 *TokenizationDisabledDetailsNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TokenizationDisabledDetailsNotificationRequest) SetType(v string) { + o.Type = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *TokenizationDisabledDetailsNotificationRequest) GetVersion() string { + if o == nil || common.IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenizationDisabledDetailsNotificationRequest) GetVersionOk() (*string, bool) { + if o == nil || common.IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *TokenizationDisabledDetailsNotificationRequest) HasVersion() bool { + if o != nil && !common.IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *TokenizationDisabledDetailsNotificationRequest) SetVersion(v string) { + o.Version = &v +} + +func (o TokenizationDisabledDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenizationDisabledDetailsNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + toSerialize["eventId"] = o.EventId + toSerialize["type"] = o.Type + if !common.IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableTokenizationDisabledDetailsNotificationRequest struct { + value *TokenizationDisabledDetailsNotificationRequest + isSet bool +} + +func (v NullableTokenizationDisabledDetailsNotificationRequest) Get() *TokenizationDisabledDetailsNotificationRequest { + return v.value +} + +func (v *NullableTokenizationDisabledDetailsNotificationRequest) Set(val *TokenizationDisabledDetailsNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTokenizationDisabledDetailsNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenizationDisabledDetailsNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenizationDisabledDetailsNotificationRequest(val *TokenizationDisabledDetailsNotificationRequest) *NullableTokenizationDisabledDetailsNotificationRequest { + return &NullableTokenizationDisabledDetailsNotificationRequest{value: val, isSet: true} +} + +func (v NullableTokenizationDisabledDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenizationDisabledDetailsNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TokenizationDisabledDetailsNotificationRequest) isValidEnvironment() bool { + var allowedEnumValues = []string{"test", "live"} + for _, allowed := range allowedEnumValues { + if o.GetEnvironment() == allowed { + return true + } + } + return false +} +func (o *TokenizationDisabledDetailsNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"recurring.token.disabled"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/tokenizationwebhook/model_tokenization_notification_response.go b/src/tokenizationwebhook/model_tokenization_notification_response.go new file mode 100644 index 000000000..bd911049d --- /dev/null +++ b/src/tokenizationwebhook/model_tokenization_notification_response.go @@ -0,0 +1,125 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenizationNotificationResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenizationNotificationResponse{} + +// TokenizationNotificationResponse struct for TokenizationNotificationResponse +type TokenizationNotificationResponse struct { + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). + NotificationResponse *string `json:"notificationResponse,omitempty"` +} + +// NewTokenizationNotificationResponse instantiates a new TokenizationNotificationResponse 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 NewTokenizationNotificationResponse() *TokenizationNotificationResponse { + this := TokenizationNotificationResponse{} + return &this +} + +// NewTokenizationNotificationResponseWithDefaults instantiates a new TokenizationNotificationResponse 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 NewTokenizationNotificationResponseWithDefaults() *TokenizationNotificationResponse { + this := TokenizationNotificationResponse{} + return &this +} + +// GetNotificationResponse returns the NotificationResponse field value if set, zero value otherwise. +func (o *TokenizationNotificationResponse) GetNotificationResponse() string { + if o == nil || common.IsNil(o.NotificationResponse) { + var ret string + return ret + } + return *o.NotificationResponse +} + +// GetNotificationResponseOk returns a tuple with the NotificationResponse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenizationNotificationResponse) GetNotificationResponseOk() (*string, bool) { + if o == nil || common.IsNil(o.NotificationResponse) { + return nil, false + } + return o.NotificationResponse, true +} + +// HasNotificationResponse returns a boolean if a field has been set. +func (o *TokenizationNotificationResponse) HasNotificationResponse() bool { + if o != nil && !common.IsNil(o.NotificationResponse) { + return true + } + + return false +} + +// SetNotificationResponse gets a reference to the given string and assigns it to the NotificationResponse field. +func (o *TokenizationNotificationResponse) SetNotificationResponse(v string) { + o.NotificationResponse = &v +} + +func (o TokenizationNotificationResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenizationNotificationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.NotificationResponse) { + toSerialize["notificationResponse"] = o.NotificationResponse + } + return toSerialize, nil +} + +type NullableTokenizationNotificationResponse struct { + value *TokenizationNotificationResponse + isSet bool +} + +func (v NullableTokenizationNotificationResponse) Get() *TokenizationNotificationResponse { + return v.value +} + +func (v *NullableTokenizationNotificationResponse) Set(val *TokenizationNotificationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTokenizationNotificationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenizationNotificationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenizationNotificationResponse(val *TokenizationNotificationResponse) *NullableTokenizationNotificationResponse { + return &NullableTokenizationNotificationResponse{value: val, isSet: true} +} + +func (v NullableTokenizationNotificationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenizationNotificationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/tokenizationwebhook/model_tokenization_updated_details_notification_request.go b/src/tokenizationwebhook/model_tokenization_updated_details_notification_request.go new file mode 100644 index 000000000..8ef04bdba --- /dev/null +++ b/src/tokenizationwebhook/model_tokenization_updated_details_notification_request.go @@ -0,0 +1,284 @@ +/* +Tokenization webhooks + +API version: 1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package tokenizationwebhook + +import ( + "encoding/json" + "time" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the TokenizationUpdatedDetailsNotificationRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &TokenizationUpdatedDetailsNotificationRequest{} + +// TokenizationUpdatedDetailsNotificationRequest struct for TokenizationUpdatedDetailsNotificationRequest +type TokenizationUpdatedDetailsNotificationRequest struct { + // The date and time when the event happened, in ISO 8601 extended format. + CreatedAt time.Time `json:"createdAt"` + Data RecurringTokenStoreOperation `json:"data"` + // The environment from which the webhook originated. Possible values: **test**, **live**. + Environment string `json:"environment"` + // The PSP reference of the event that triggered the webhook. + EventId string `json:"eventId"` + // The type of webhook. + Type string `json:"type"` + // The version of this entity. + Version *string `json:"version,omitempty"` +} + +// NewTokenizationUpdatedDetailsNotificationRequest instantiates a new TokenizationUpdatedDetailsNotificationRequest 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 NewTokenizationUpdatedDetailsNotificationRequest(createdAt time.Time, data RecurringTokenStoreOperation, environment string, eventId string, type_ string) *TokenizationUpdatedDetailsNotificationRequest { + this := TokenizationUpdatedDetailsNotificationRequest{} + this.CreatedAt = createdAt + this.Data = data + this.Environment = environment + this.EventId = eventId + this.Type = type_ + return &this +} + +// NewTokenizationUpdatedDetailsNotificationRequestWithDefaults instantiates a new TokenizationUpdatedDetailsNotificationRequest 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 NewTokenizationUpdatedDetailsNotificationRequestWithDefaults() *TokenizationUpdatedDetailsNotificationRequest { + this := TokenizationUpdatedDetailsNotificationRequest{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *TokenizationUpdatedDetailsNotificationRequest) 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 *TokenizationUpdatedDetailsNotificationRequest) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *TokenizationUpdatedDetailsNotificationRequest) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetData returns the Data field value +func (o *TokenizationUpdatedDetailsNotificationRequest) GetData() RecurringTokenStoreOperation { + if o == nil { + var ret RecurringTokenStoreOperation + 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 *TokenizationUpdatedDetailsNotificationRequest) GetDataOk() (*RecurringTokenStoreOperation, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenizationUpdatedDetailsNotificationRequest) SetData(v RecurringTokenStoreOperation) { + o.Data = v +} + +// GetEnvironment returns the Environment field value +func (o *TokenizationUpdatedDetailsNotificationRequest) 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 *TokenizationUpdatedDetailsNotificationRequest) GetEnvironmentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Environment, true +} + +// SetEnvironment sets field value +func (o *TokenizationUpdatedDetailsNotificationRequest) SetEnvironment(v string) { + o.Environment = v +} + +// GetEventId returns the EventId field value +func (o *TokenizationUpdatedDetailsNotificationRequest) GetEventId() string { + if o == nil { + var ret string + return ret + } + + return o.EventId +} + +// GetEventIdOk returns a tuple with the EventId field value +// and a boolean to check if the value has been set. +func (o *TokenizationUpdatedDetailsNotificationRequest) GetEventIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EventId, true +} + +// SetEventId sets field value +func (o *TokenizationUpdatedDetailsNotificationRequest) SetEventId(v string) { + o.EventId = v +} + +// GetType returns the Type field value +func (o *TokenizationUpdatedDetailsNotificationRequest) 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 *TokenizationUpdatedDetailsNotificationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TokenizationUpdatedDetailsNotificationRequest) SetType(v string) { + o.Type = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *TokenizationUpdatedDetailsNotificationRequest) GetVersion() string { + if o == nil || common.IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenizationUpdatedDetailsNotificationRequest) GetVersionOk() (*string, bool) { + if o == nil || common.IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *TokenizationUpdatedDetailsNotificationRequest) HasVersion() bool { + if o != nil && !common.IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *TokenizationUpdatedDetailsNotificationRequest) SetVersion(v string) { + o.Version = &v +} + +func (o TokenizationUpdatedDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenizationUpdatedDetailsNotificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["createdAt"] = o.CreatedAt + toSerialize["data"] = o.Data + toSerialize["environment"] = o.Environment + toSerialize["eventId"] = o.EventId + toSerialize["type"] = o.Type + if !common.IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableTokenizationUpdatedDetailsNotificationRequest struct { + value *TokenizationUpdatedDetailsNotificationRequest + isSet bool +} + +func (v NullableTokenizationUpdatedDetailsNotificationRequest) Get() *TokenizationUpdatedDetailsNotificationRequest { + return v.value +} + +func (v *NullableTokenizationUpdatedDetailsNotificationRequest) Set(val *TokenizationUpdatedDetailsNotificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTokenizationUpdatedDetailsNotificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenizationUpdatedDetailsNotificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenizationUpdatedDetailsNotificationRequest(val *TokenizationUpdatedDetailsNotificationRequest) *NullableTokenizationUpdatedDetailsNotificationRequest { + return &NullableTokenizationUpdatedDetailsNotificationRequest{value: val, isSet: true} +} + +func (v NullableTokenizationUpdatedDetailsNotificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenizationUpdatedDetailsNotificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *TokenizationUpdatedDetailsNotificationRequest) isValidEnvironment() bool { + var allowedEnumValues = []string{"test", "live"} + for _, allowed := range allowedEnumValues { + if o.GetEnvironment() == allowed { + return true + } + } + return false +} +func (o *TokenizationUpdatedDetailsNotificationRequest) isValidType() bool { + var allowedEnumValues = []string{"recurring.token.updated"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} diff --git a/src/transactionwebhook/model_balance_platform_notification_response.go b/src/transactionwebhook/model_balance_platform_notification_response.go index b431514a8..68dec2b0a 100644 --- a/src/transactionwebhook/model_balance_platform_notification_response.go +++ b/src/transactionwebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/transactionwebhook/model_bank_category_data.go b/src/transactionwebhook/model_bank_category_data.go index 2f68710d1..be377557e 100644 --- a/src/transactionwebhook/model_bank_category_data.go +++ b/src/transactionwebhook/model_bank_category_data.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BankCategoryData{} // BankCategoryData struct for BankCategoryData type BankCategoryData struct { - // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Priority *string `json:"priority,omitempty"` // **bank** Type *string `json:"type,omitempty"` diff --git a/src/transactionwebhook/model_issued_card.go b/src/transactionwebhook/model_issued_card.go index 32c0bc51a..2b7d222f9 100644 --- a/src/transactionwebhook/model_issued_card.go +++ b/src/transactionwebhook/model_issued_card.go @@ -29,7 +29,8 @@ type IssuedCard struct { // The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. SchemeTraceId *string `json:"schemeTraceId,omitempty"` // The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + ThreeDSecure *ThreeDSecure `json:"threeDSecure,omitempty"` // **issuedCard** Type *string `json:"type,omitempty"` // The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. @@ -249,6 +250,38 @@ func (o *IssuedCard) SetSchemeUniqueTransactionId(v string) { o.SchemeUniqueTransactionId = &v } +// GetThreeDSecure returns the ThreeDSecure field value if set, zero value otherwise. +func (o *IssuedCard) GetThreeDSecure() ThreeDSecure { + if o == nil || common.IsNil(o.ThreeDSecure) { + var ret ThreeDSecure + return ret + } + return *o.ThreeDSecure +} + +// GetThreeDSecureOk returns a tuple with the ThreeDSecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetThreeDSecureOk() (*ThreeDSecure, bool) { + if o == nil || common.IsNil(o.ThreeDSecure) { + return nil, false + } + return o.ThreeDSecure, true +} + +// HasThreeDSecure returns a boolean if a field has been set. +func (o *IssuedCard) HasThreeDSecure() bool { + if o != nil && !common.IsNil(o.ThreeDSecure) { + return true + } + + return false +} + +// SetThreeDSecure gets a reference to the given ThreeDSecure and assigns it to the ThreeDSecure field. +func (o *IssuedCard) SetThreeDSecure(v ThreeDSecure) { + o.ThreeDSecure = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *IssuedCard) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -341,6 +374,9 @@ func (o IssuedCard) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.SchemeUniqueTransactionId) { toSerialize["schemeUniqueTransactionId"] = o.SchemeUniqueTransactionId } + if !common.IsNil(o.ThreeDSecure) { + toSerialize["threeDSecure"] = o.ThreeDSecure + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/transactionwebhook/model_platform_payment.go b/src/transactionwebhook/model_platform_payment.go index 9a71283a9..0a50bd413 100644 --- a/src/transactionwebhook/model_platform_payment.go +++ b/src/transactionwebhook/model_platform_payment.go @@ -25,7 +25,7 @@ type PlatformPayment struct { ModificationPspReference *string `json:"modificationPspReference,omitempty"` // The payment's merchant reference included in the transfer. PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` - // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. + // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: the acquiring fee (the aggregated amount of interchange and scheme fee) incurred on a transaction. * **AdyenCommission**: the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: all transaction fees due to Adyen. This is the aggregated amount of Adyen's commission and markup. * **AdyenMarkup**: the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: the amount booked to your user after the deduction of the relevant fees. * **Commission**: your platform's or marketplace's commission on a transaction. * **DCCPlatformCommission**: the Dynamic Currency Conversion (DCC) fee on a transaction. * **Interchange**: the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: the aggregated amount of all transaction fees. * **Remainder**: the leftover amount after currency conversion. * **SchemeFee**: the scheme fee incurred on a transaction. * **Surcharge**: the surcharge paid by the customer on a transaction. * **Tip**: the tip paid by the customer. * **TopUp**: an incoming transfer to top up your user's balance account. * **VAT**: the value-added tax charged on the payment. PlatformPaymentType *string `json:"platformPaymentType,omitempty"` // The payment reference included in the transfer. PspPaymentReference *string `json:"pspPaymentReference,omitempty"` diff --git a/src/transactionwebhook/model_resource.go b/src/transactionwebhook/model_resource.go index 8dbaf89de..2c9135cda 100644 --- a/src/transactionwebhook/model_resource.go +++ b/src/transactionwebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/transactionwebhook/model_three_d_secure.go b/src/transactionwebhook/model_three_d_secure.go new file mode 100644 index 000000000..1795d15ce --- /dev/null +++ b/src/transactionwebhook/model_three_d_secure.go @@ -0,0 +1,125 @@ +/* +Transaction webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transactionwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ThreeDSecure type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ThreeDSecure{} + +// ThreeDSecure struct for ThreeDSecure +type ThreeDSecure struct { + // The transaction identifier for the Access Control Server + AcsTransactionId *string `json:"acsTransactionId,omitempty"` +} + +// NewThreeDSecure instantiates a new ThreeDSecure object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThreeDSecure() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// NewThreeDSecureWithDefaults instantiates a new ThreeDSecure object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThreeDSecureWithDefaults() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// GetAcsTransactionId returns the AcsTransactionId field value if set, zero value otherwise. +func (o *ThreeDSecure) GetAcsTransactionId() string { + if o == nil || common.IsNil(o.AcsTransactionId) { + var ret string + return ret + } + return *o.AcsTransactionId +} + +// GetAcsTransactionIdOk returns a tuple with the AcsTransactionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDSecure) GetAcsTransactionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AcsTransactionId) { + return nil, false + } + return o.AcsTransactionId, true +} + +// HasAcsTransactionId returns a boolean if a field has been set. +func (o *ThreeDSecure) HasAcsTransactionId() bool { + if o != nil && !common.IsNil(o.AcsTransactionId) { + return true + } + + return false +} + +// SetAcsTransactionId gets a reference to the given string and assigns it to the AcsTransactionId field. +func (o *ThreeDSecure) SetAcsTransactionId(v string) { + o.AcsTransactionId = &v +} + +func (o ThreeDSecure) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreeDSecure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcsTransactionId) { + toSerialize["acsTransactionId"] = o.AcsTransactionId + } + return toSerialize, nil +} + +type NullableThreeDSecure struct { + value *ThreeDSecure + isSet bool +} + +func (v NullableThreeDSecure) Get() *ThreeDSecure { + return v.value +} + +func (v *NullableThreeDSecure) Set(val *ThreeDSecure) { + v.value = val + v.isSet = true +} + +func (v NullableThreeDSecure) IsSet() bool { + return v.isSet +} + +func (v *NullableThreeDSecure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreeDSecure(val *ThreeDSecure) *NullableThreeDSecure { + return &NullableThreeDSecure{value: val, isSet: true} +} + +func (v NullableThreeDSecure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreeDSecure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transactionwebhook/model_transaction.go b/src/transactionwebhook/model_transaction.go index 926afe6ef..907ed785e 100644 --- a/src/transactionwebhook/model_transaction.go +++ b/src/transactionwebhook/model_transaction.go @@ -27,7 +27,7 @@ type Transaction struct { BalancePlatform string `json:"balancePlatform"` // The date the transaction was booked into the balance account. BookingDate time.Time `json:"bookingDate"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The `description` from the `/transfers` request. Description *string `json:"description,omitempty"` diff --git a/src/transferwebhook/model_additional_bank_identification.go b/src/transferwebhook/model_additional_bank_identification.go index c732d8674..c9c71b57a 100644 --- a/src/transferwebhook/model_additional_bank_identification.go +++ b/src/transferwebhook/model_additional_bank_identification.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &AdditionalBankIdentification{} type AdditionalBankIdentification struct { // The value of the additional bank identification. Code *string `json:"code,omitempty"` - // The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. + // The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. Type *string `json:"type,omitempty"` } @@ -162,7 +162,7 @@ func (v *NullableAdditionalBankIdentification) UnmarshalJSON(src []byte) error { } func (o *AdditionalBankIdentification) isValidType() bool { - var allowedEnumValues = []string{"gbSortCode", "usRoutingNumber"} + var allowedEnumValues = []string{"auBsbCode", "caRoutingNumber", "gbSortCode", "usRoutingNumber"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/transferwebhook/model_balance_platform_notification_response.go b/src/transferwebhook/model_balance_platform_notification_response.go index 228a4dc53..a7e6d3c1f 100644 --- a/src/transferwebhook/model_balance_platform_notification_response.go +++ b/src/transferwebhook/model_balance_platform_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BalancePlatformNotificationResponse{} // BalancePlatformNotificationResponse struct for BalancePlatformNotificationResponse type BalancePlatformNotificationResponse struct { - // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/transferwebhook/model_bank_category_data.go b/src/transferwebhook/model_bank_category_data.go index f6a50616b..5fe55b3f6 100644 --- a/src/transferwebhook/model_bank_category_data.go +++ b/src/transferwebhook/model_bank_category_data.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &BankCategoryData{} // BankCategoryData struct for BankCategoryData type BankCategoryData struct { - // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). + // The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Priority *string `json:"priority,omitempty"` // **bank** Type *string `json:"type,omitempty"` diff --git a/src/transferwebhook/model_confirmation_tracking_data.go b/src/transferwebhook/model_confirmation_tracking_data.go index 60a4764cd..187f515a9 100644 --- a/src/transferwebhook/model_confirmation_tracking_data.go +++ b/src/transferwebhook/model_confirmation_tracking_data.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &ConfirmationTrackingData{} // ConfirmationTrackingData struct for ConfirmationTrackingData type ConfirmationTrackingData struct { - // The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. + // The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account.- **accepted**: the request is accepted by the integration. Status string `json:"status"` // The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. Type string `json:"type"` @@ -146,7 +146,7 @@ func (v *NullableConfirmationTrackingData) UnmarshalJSON(src []byte) error { } func (o *ConfirmationTrackingData) isValidStatus() bool { - var allowedEnumValues = []string{"credited"} + var allowedEnumValues = []string{"credited", "accepted"} for _, allowed := range allowedEnumValues { if o.GetStatus() == allowed { return true diff --git a/src/transferwebhook/model_execution_date.go b/src/transferwebhook/model_execution_date.go new file mode 100644 index 000000000..453d54d04 --- /dev/null +++ b/src/transferwebhook/model_execution_date.go @@ -0,0 +1,162 @@ +/* +Transfer webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transferwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ExecutionDate type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ExecutionDate{} + +// ExecutionDate struct for ExecutionDate +type ExecutionDate struct { + // The date when the transfer will be processed. This date must be: * Within 30 days of the current date. * In the [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) **YYYY-MM-DD**. For example: 2025-01-31 + Date *string `json:"date,omitempty"` + // The timezone that applies to the execution date. Use a timezone identifier from the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). Example: **America/Los_Angeles**. Default value: **Europe/Amsterdam**. + Timezone *string `json:"timezone,omitempty"` +} + +// NewExecutionDate instantiates a new ExecutionDate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutionDate() *ExecutionDate { + this := ExecutionDate{} + return &this +} + +// NewExecutionDateWithDefaults instantiates a new ExecutionDate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutionDateWithDefaults() *ExecutionDate { + this := ExecutionDate{} + return &this +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *ExecutionDate) GetDate() string { + if o == nil || common.IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionDate) GetDateOk() (*string, bool) { + if o == nil || common.IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *ExecutionDate) HasDate() bool { + if o != nil && !common.IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *ExecutionDate) SetDate(v string) { + o.Date = &v +} + +// GetTimezone returns the Timezone field value if set, zero value otherwise. +func (o *ExecutionDate) GetTimezone() string { + if o == nil || common.IsNil(o.Timezone) { + var ret string + return ret + } + return *o.Timezone +} + +// GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExecutionDate) GetTimezoneOk() (*string, bool) { + if o == nil || common.IsNil(o.Timezone) { + return nil, false + } + return o.Timezone, true +} + +// HasTimezone returns a boolean if a field has been set. +func (o *ExecutionDate) HasTimezone() bool { + if o != nil && !common.IsNil(o.Timezone) { + return true + } + + return false +} + +// SetTimezone gets a reference to the given string and assigns it to the Timezone field. +func (o *ExecutionDate) SetTimezone(v string) { + o.Timezone = &v +} + +func (o ExecutionDate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutionDate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !common.IsNil(o.Timezone) { + toSerialize["timezone"] = o.Timezone + } + return toSerialize, nil +} + +type NullableExecutionDate struct { + value *ExecutionDate + isSet bool +} + +func (v NullableExecutionDate) Get() *ExecutionDate { + return v.value +} + +func (v *NullableExecutionDate) Set(val *ExecutionDate) { + v.value = val + v.isSet = true +} + +func (v NullableExecutionDate) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutionDate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutionDate(val *ExecutionDate) *NullableExecutionDate { + return &NullableExecutionDate{value: val, isSet: true} +} + +func (v NullableExecutionDate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutionDate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transferwebhook/model_hk_local_account_identification.go b/src/transferwebhook/model_hk_local_account_identification.go index f3bf147be..675edbc0e 100644 --- a/src/transferwebhook/model_hk_local_account_identification.go +++ b/src/transferwebhook/model_hk_local_account_identification.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &HKLocalAccountIdentification{} // HKLocalAccountIdentification struct for HKLocalAccountIdentification type HKLocalAccountIdentification struct { - // The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. + // The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. AccountNumber string `json:"accountNumber"` // The 3-digit clearing code, without separators or whitespace. ClearingCode string `json:"clearingCode"` diff --git a/src/transferwebhook/model_internal_review_tracking_data.go b/src/transferwebhook/model_internal_review_tracking_data.go index 59ea71677..d519acb6d 100644 --- a/src/transferwebhook/model_internal_review_tracking_data.go +++ b/src/transferwebhook/model_internal_review_tracking_data.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &InternalReviewTrackingData{} type InternalReviewTrackingData struct { // The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). Reason *string `json:"reason,omitempty"` - // The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. + // The status of the transfer. Possible values: - **pending**: the transfer is under internal review by Adyen. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. Status string `json:"status"` // The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. Type string `json:"type"` diff --git a/src/transferwebhook/model_issued_card.go b/src/transferwebhook/model_issued_card.go index 0d123ea9c..9e1a80338 100644 --- a/src/transferwebhook/model_issued_card.go +++ b/src/transferwebhook/model_issued_card.go @@ -29,7 +29,8 @@ type IssuedCard struct { // The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. SchemeTraceId *string `json:"schemeTraceId,omitempty"` // The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + SchemeUniqueTransactionId *string `json:"schemeUniqueTransactionId,omitempty"` + ThreeDSecure *ThreeDSecure `json:"threeDSecure,omitempty"` // **issuedCard** Type *string `json:"type,omitempty"` // The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. @@ -249,6 +250,38 @@ func (o *IssuedCard) SetSchemeUniqueTransactionId(v string) { o.SchemeUniqueTransactionId = &v } +// GetThreeDSecure returns the ThreeDSecure field value if set, zero value otherwise. +func (o *IssuedCard) GetThreeDSecure() ThreeDSecure { + if o == nil || common.IsNil(o.ThreeDSecure) { + var ret ThreeDSecure + return ret + } + return *o.ThreeDSecure +} + +// GetThreeDSecureOk returns a tuple with the ThreeDSecure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IssuedCard) GetThreeDSecureOk() (*ThreeDSecure, bool) { + if o == nil || common.IsNil(o.ThreeDSecure) { + return nil, false + } + return o.ThreeDSecure, true +} + +// HasThreeDSecure returns a boolean if a field has been set. +func (o *IssuedCard) HasThreeDSecure() bool { + if o != nil && !common.IsNil(o.ThreeDSecure) { + return true + } + + return false +} + +// SetThreeDSecure gets a reference to the given ThreeDSecure and assigns it to the ThreeDSecure field. +func (o *IssuedCard) SetThreeDSecure(v ThreeDSecure) { + o.ThreeDSecure = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *IssuedCard) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -341,6 +374,9 @@ func (o IssuedCard) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.SchemeUniqueTransactionId) { toSerialize["schemeUniqueTransactionId"] = o.SchemeUniqueTransactionId } + if !common.IsNil(o.ThreeDSecure) { + toSerialize["threeDSecure"] = o.ThreeDSecure + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/transferwebhook/model_party_identification.go b/src/transferwebhook/model_party_identification.go index abaa75085..791a7e78e 100644 --- a/src/transferwebhook/model_party_identification.go +++ b/src/transferwebhook/model_party_identification.go @@ -22,6 +22,8 @@ type PartyIdentification struct { Address *Address `json:"address,omitempty"` // The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. DateOfBirth *string `json:"dateOfBirth,omitempty"` + // The email address of the organization or individual. Maximum length: 254 characters. + Email *string `json:"email,omitempty"` // The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. FirstName *string `json:"firstName,omitempty"` // The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. @@ -32,6 +34,8 @@ type PartyIdentification struct { Reference *string `json:"reference,omitempty"` // The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. Type *string `json:"type,omitempty"` + // The URL of the organization or individual. Maximum length: 255 characters. + Url *string `json:"url,omitempty"` } // NewPartyIdentification instantiates a new PartyIdentification object @@ -119,6 +123,38 @@ func (o *PartyIdentification) SetDateOfBirth(v string) { o.DateOfBirth = &v } +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *PartyIdentification) GetEmail() string { + if o == nil || common.IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartyIdentification) GetEmailOk() (*string, bool) { + if o == nil || common.IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *PartyIdentification) HasEmail() bool { + if o != nil && !common.IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *PartyIdentification) SetEmail(v string) { + o.Email = &v +} + // GetFirstName returns the FirstName field value if set, zero value otherwise. func (o *PartyIdentification) GetFirstName() string { if o == nil || common.IsNil(o.FirstName) { @@ -279,6 +315,38 @@ func (o *PartyIdentification) SetType(v string) { o.Type = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PartyIdentification) GetUrl() string { + if o == nil || common.IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartyIdentification) GetUrlOk() (*string, bool) { + if o == nil || common.IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PartyIdentification) HasUrl() bool { + if o != nil && !common.IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PartyIdentification) SetUrl(v string) { + o.Url = &v +} + func (o PartyIdentification) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -295,6 +363,9 @@ func (o PartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.DateOfBirth) { toSerialize["dateOfBirth"] = o.DateOfBirth } + if !common.IsNil(o.Email) { + toSerialize["email"] = o.Email + } if !common.IsNil(o.FirstName) { toSerialize["firstName"] = o.FirstName } @@ -310,6 +381,9 @@ func (o PartyIdentification) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.Url) { + toSerialize["url"] = o.Url + } return toSerialize, nil } diff --git a/src/transferwebhook/model_platform_payment.go b/src/transferwebhook/model_platform_payment.go index 4c107e12d..12d02667d 100644 --- a/src/transferwebhook/model_platform_payment.go +++ b/src/transferwebhook/model_platform_payment.go @@ -25,7 +25,7 @@ type PlatformPayment struct { ModificationPspReference *string `json:"modificationPspReference,omitempty"` // The payment's merchant reference included in the transfer. PaymentMerchantReference *string `json:"paymentMerchantReference,omitempty"` - // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. + // Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: the acquiring fee (the aggregated amount of interchange and scheme fee) incurred on a transaction. * **AdyenCommission**: the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: all transaction fees due to Adyen. This is the aggregated amount of Adyen's commission and markup. * **AdyenMarkup**: the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: the amount booked to your user after the deduction of the relevant fees. * **Commission**: your platform's or marketplace's commission on a transaction. * **DCCPlatformCommission**: the Dynamic Currency Conversion (DCC) fee on a transaction. * **Interchange**: the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: the aggregated amount of all transaction fees. * **Remainder**: the leftover amount after currency conversion. * **SchemeFee**: the scheme fee incurred on a transaction. * **Surcharge**: the surcharge paid by the customer on a transaction. * **Tip**: the tip paid by the customer. * **TopUp**: an incoming transfer to top up your user's balance account. * **VAT**: the value-added tax charged on the payment. PlatformPaymentType *string `json:"platformPaymentType,omitempty"` // The payment reference included in the transfer. PspPaymentReference *string `json:"pspPaymentReference,omitempty"` diff --git a/src/transferwebhook/model_resource.go b/src/transferwebhook/model_resource.go index e57b960e9..5a03dcac1 100644 --- a/src/transferwebhook/model_resource.go +++ b/src/transferwebhook/model_resource.go @@ -22,7 +22,7 @@ var _ common.MappedNullable = &Resource{} type Resource struct { // The unique identifier of the balance platform. BalancePlatform *string `json:"balancePlatform,omitempty"` - // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. CreationDate *time.Time `json:"creationDate,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` diff --git a/src/transferwebhook/model_three_d_secure.go b/src/transferwebhook/model_three_d_secure.go new file mode 100644 index 000000000..8fa438e39 --- /dev/null +++ b/src/transferwebhook/model_three_d_secure.go @@ -0,0 +1,125 @@ +/* +Transfer webhooks + +API version: 4 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package transferwebhook + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v21/src/common" +) + +// checks if the ThreeDSecure type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ThreeDSecure{} + +// ThreeDSecure struct for ThreeDSecure +type ThreeDSecure struct { + // The transaction identifier for the Access Control Server + AcsTransactionId *string `json:"acsTransactionId,omitempty"` +} + +// NewThreeDSecure instantiates a new ThreeDSecure object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThreeDSecure() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// NewThreeDSecureWithDefaults instantiates a new ThreeDSecure object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThreeDSecureWithDefaults() *ThreeDSecure { + this := ThreeDSecure{} + return &this +} + +// GetAcsTransactionId returns the AcsTransactionId field value if set, zero value otherwise. +func (o *ThreeDSecure) GetAcsTransactionId() string { + if o == nil || common.IsNil(o.AcsTransactionId) { + var ret string + return ret + } + return *o.AcsTransactionId +} + +// GetAcsTransactionIdOk returns a tuple with the AcsTransactionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThreeDSecure) GetAcsTransactionIdOk() (*string, bool) { + if o == nil || common.IsNil(o.AcsTransactionId) { + return nil, false + } + return o.AcsTransactionId, true +} + +// HasAcsTransactionId returns a boolean if a field has been set. +func (o *ThreeDSecure) HasAcsTransactionId() bool { + if o != nil && !common.IsNil(o.AcsTransactionId) { + return true + } + + return false +} + +// SetAcsTransactionId gets a reference to the given string and assigns it to the AcsTransactionId field. +func (o *ThreeDSecure) SetAcsTransactionId(v string) { + o.AcsTransactionId = &v +} + +func (o ThreeDSecure) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThreeDSecure) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.AcsTransactionId) { + toSerialize["acsTransactionId"] = o.AcsTransactionId + } + return toSerialize, nil +} + +type NullableThreeDSecure struct { + value *ThreeDSecure + isSet bool +} + +func (v NullableThreeDSecure) Get() *ThreeDSecure { + return v.value +} + +func (v *NullableThreeDSecure) Set(val *ThreeDSecure) { + v.value = val + v.isSet = true +} + +func (v NullableThreeDSecure) IsSet() bool { + return v.isSet +} + +func (v *NullableThreeDSecure) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThreeDSecure(val *ThreeDSecure) *NullableThreeDSecure { + return &NullableThreeDSecure{value: val, isSet: true} +} + +func (v NullableThreeDSecure) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThreeDSecure) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/transferwebhook/model_transaction_rule_reference.go b/src/transferwebhook/model_transaction_rule_reference.go index 0077d92b6..28b819715 100644 --- a/src/transferwebhook/model_transaction_rule_reference.go +++ b/src/transferwebhook/model_transaction_rule_reference.go @@ -27,7 +27,7 @@ type TransactionRuleReference struct { OutcomeType *string `json:"outcomeType,omitempty"` // The reference for the resource. Reference *string `json:"reference,omitempty"` - // The score of the rule in case it's a scoreBased rule. + // The transaction score determined by the rule. Returned only when `outcomeType` is **scoreBased**. Score *int32 `json:"score,omitempty"` } diff --git a/src/transferwebhook/model_transfer_data.go b/src/transferwebhook/model_transfer_data.go index db7aafcdb..f1e7fe505 100644 --- a/src/transferwebhook/model_transfer_data.go +++ b/src/transferwebhook/model_transfer_data.go @@ -27,11 +27,15 @@ type TransferData struct { BalancePlatform *string `json:"balancePlatform,omitempty"` // The list of the latest balance statuses in the transfer. Balances []BalanceMutation `json:"balances,omitempty"` - // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. + // The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by an Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. Category string `json:"category"` CategoryData *TransferDataCategoryData `json:"categoryData,omitempty"` Counterparty *TransferNotificationCounterParty `json:"counterparty,omitempty"` + // The date and time when the transfer was created, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + CreatedAt *time.Time `json:"createdAt,omitempty"` // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + // Deprecated since Transfer webhooks v3 + // Use createdAt or updatedAt CreationDate *time.Time `json:"creationDate,omitempty"` // Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** Description *string `json:"description,omitempty"` @@ -42,6 +46,7 @@ type TransferData struct { EventId *string `json:"eventId,omitempty"` // The list of events leading up to the current status of the transfer. Events []TransferEvent `json:"events,omitempty"` + ExecutionDate *ExecutionDate `json:"executionDate,omitempty"` ExternalReason *ExternalReason `json:"externalReason,omitempty"` // The ID of the resource. Id *string `json:"id,omitempty"` @@ -55,12 +60,14 @@ type TransferData struct { Review *TransferReview `json:"review,omitempty"` // The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. SequenceNumber *int32 `json:"sequenceNumber,omitempty"` - // The result of the transfer. For example, **authorised**, **refused**, or **error**. + // The result of the transfer. For example: - **received**: an outgoing transfer request is created. - **authorised**: the transfer request is authorized and the funds are reserved. - **booked**: the funds are deducted from your user's balance account. - **failed**: the transfer is rejected by the counterparty's bank. - **returned**: the transfer is returned by the counterparty's bank. Status string `json:"status"` Tracking *TransferDataTracking `json:"tracking,omitempty"` TransactionRulesResult *TransactionRulesResult `json:"transactionRulesResult,omitempty"` // The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. Type *string `json:"type,omitempty"` + // The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + UpdatedAt *time.Time `json:"updatedAt,omitempty"` } // NewTransferData instantiates a new TransferData object @@ -323,7 +330,41 @@ func (o *TransferData) SetCounterparty(v TransferNotificationCounterParty) { o.Counterparty = &v } +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *TransferData) GetCreatedAt() time.Time { + if o == nil || common.IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *TransferData) HasCreatedAt() bool { + if o != nil && !common.IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *TransferData) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + // GetCreationDate returns the CreationDate field value if set, zero value otherwise. +// Deprecated since Transfer webhooks v3 +// Use createdAt or updatedAt func (o *TransferData) GetCreationDate() time.Time { if o == nil || common.IsNil(o.CreationDate) { var ret time.Time @@ -334,6 +375,8 @@ func (o *TransferData) GetCreationDate() time.Time { // GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated since Transfer webhooks v3 +// Use createdAt or updatedAt func (o *TransferData) GetCreationDateOk() (*time.Time, bool) { if o == nil || common.IsNil(o.CreationDate) { return nil, false @@ -351,6 +394,8 @@ func (o *TransferData) HasCreationDate() bool { } // SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field. +// Deprecated since Transfer webhooks v3 +// Use createdAt or updatedAt func (o *TransferData) SetCreationDate(v time.Time) { o.CreationDate = &v } @@ -515,6 +560,38 @@ func (o *TransferData) SetEvents(v []TransferEvent) { o.Events = v } +// GetExecutionDate returns the ExecutionDate field value if set, zero value otherwise. +func (o *TransferData) GetExecutionDate() ExecutionDate { + if o == nil || common.IsNil(o.ExecutionDate) { + var ret ExecutionDate + return ret + } + return *o.ExecutionDate +} + +// GetExecutionDateOk returns a tuple with the ExecutionDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetExecutionDateOk() (*ExecutionDate, bool) { + if o == nil || common.IsNil(o.ExecutionDate) { + return nil, false + } + return o.ExecutionDate, true +} + +// HasExecutionDate returns a boolean if a field has been set. +func (o *TransferData) HasExecutionDate() bool { + if o != nil && !common.IsNil(o.ExecutionDate) { + return true + } + + return false +} + +// SetExecutionDate gets a reference to the given ExecutionDate and assigns it to the ExecutionDate field. +func (o *TransferData) SetExecutionDate(v ExecutionDate) { + o.ExecutionDate = &v +} + // GetExternalReason returns the ExternalReason field value if set, zero value otherwise. func (o *TransferData) GetExternalReason() ExternalReason { if o == nil || common.IsNil(o.ExternalReason) { @@ -891,6 +968,38 @@ func (o *TransferData) SetType(v string) { o.Type = &v } +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *TransferData) GetUpdatedAt() time.Time { + if o == nil || common.IsNil(o.UpdatedAt) { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransferData) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || common.IsNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *TransferData) HasUpdatedAt() bool { + if o != nil && !common.IsNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *TransferData) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + func (o TransferData) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -921,6 +1030,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Counterparty) { toSerialize["counterparty"] = o.Counterparty } + if !common.IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } if !common.IsNil(o.CreationDate) { toSerialize["creationDate"] = o.CreationDate } @@ -939,6 +1051,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Events) { toSerialize["events"] = o.Events } + if !common.IsNil(o.ExecutionDate) { + toSerialize["executionDate"] = o.ExecutionDate + } if !common.IsNil(o.ExternalReason) { toSerialize["externalReason"] = o.ExternalReason } @@ -973,6 +1088,9 @@ func (o TransferData) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.UpdatedAt) { + toSerialize["updatedAt"] = o.UpdatedAt + } return toSerialize, nil } @@ -1031,7 +1149,7 @@ func (o *TransferData) isValidDirection() bool { return false } func (o *TransferData) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true diff --git a/src/transferwebhook/model_transfer_event.go b/src/transferwebhook/model_transfer_event.go index 7cb24dd30..8b7783125 100644 --- a/src/transferwebhook/model_transfer_event.go +++ b/src/transferwebhook/model_transfer_event.go @@ -750,7 +750,7 @@ func (v *NullableTransferEvent) UnmarshalJSON(src []byte) error { } func (o *TransferEvent) isValidReason() bool { - var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} + var allowedEnumValues = []string{"accountHierarchyNotActive", "amountLimitExceeded", "approvalExpired", "approved", "balanceAccountTemporarilyBlockedByTransactionRule", "counterpartyAccountBlocked", "counterpartyAccountClosed", "counterpartyAccountNotFound", "counterpartyAddressRequired", "counterpartyBankTimedOut", "counterpartyBankUnavailable", "declined", "declinedByTransactionRule", "directDebitNotSupported", "error", "notEnoughBalance", "pending", "pendingApproval", "pendingExecution", "refusedByCounterpartyBank", "refusedByCustomer", "routeNotFound", "scaFailed", "transferInstrumentDoesNotExist", "unknown"} for _, allowed := range allowedEnumValues { if o.GetReason() == allowed { return true