From 396e9ce92704dc8c37f1cce3b9dcbb303bdde87a Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Mon, 27 Nov 2023 10:42:35 +0000 Subject: [PATCH] [create-pull-request] automated change --- src/balanceplatform/api_account_holders.go | 2 +- .../model_rest_service_error.go | 20 +- .../model_same_amount_restriction.go | 152 ++++++ .../model_same_counterparty_restriction.go | 152 ++++++ .../model_transaction_rule_restrictions.go | 102 +++- src/balanceplatform/model_transfer_route.go | 2 +- src/checkout/model_apple_pay_details.go | 2 +- src/checkout/model_card_details.go | 2 +- src/checkout/model_checkout_await_action.go | 2 +- ...heckout_delegated_authentication_action.go | 2 +- src/checkout/model_checkout_qr_code_action.go | 2 +- src/checkout/model_checkout_sdk_action.go | 2 +- .../model_checkout_three_ds2_action.go | 2 +- src/checkout/model_checkout_voucher_action.go | 2 +- .../model_create_checkout_session_request.go | 37 ++ .../model_create_checkout_session_response.go | 74 +++ src/checkout/model_google_pay_details.go | 2 +- src/checkout/model_masterpass_details.go | 2 +- src/checkout/model_pay_with_google_details.go | 2 +- src/checkout/model_payment_details_request.go | 2 +- src/checkout/model_payment_method.go | 2 +- src/checkout/model_recurring_detail.go | 2 +- ...response_additional_data_domestic_error.go | 162 ++++++ src/checkout/model_samsung_pay_details.go | 2 +- src/checkout/model_split.go | 2 +- src/checkout/model_visa_checkout_details.go | 2 +- .../model_account_holder.go | 37 ++ .../model_account_holder_capability.go | 37 ++ .../model_verification_deadline.go | 182 +++++++ src/legalentity/model_legal_entity.go | 38 +- src/legalentity/model_legal_entity_info.go | 38 +- .../model_legal_entity_info_required_type.go | 38 +- .../model_unincorporated_partnership.go | 476 ++++++++++++++++++ ...response_additional_data_domestic_error.go | 162 ++++++ 34 files changed, 1698 insertions(+), 47 deletions(-) create mode 100644 src/balanceplatform/model_same_amount_restriction.go create mode 100644 src/balanceplatform/model_same_counterparty_restriction.go create mode 100644 src/checkout/model_response_additional_data_domestic_error.go create mode 100644 src/configurationwebhook/model_verification_deadline.go create mode 100644 src/legalentity/model_unincorporated_partnership.go create mode 100644 src/payout/model_response_additional_data_domestic_error.go diff --git a/src/balanceplatform/api_account_holders.go b/src/balanceplatform/api_account_holders.go index d2f272e21..1ed21e95a 100644 --- a/src/balanceplatform/api_account_holders.go +++ b/src/balanceplatform/api_account_holders.go @@ -328,7 +328,7 @@ type AccountHoldersApiGetTaxFormInput struct { year *int32 } -// The type of tax form you want to retrieve. Accepted values are **us1099k** and **us1099nec** +// The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec** func (r AccountHoldersApiGetTaxFormInput) FormType(formType string) AccountHoldersApiGetTaxFormInput { r.formType = &formType return r diff --git a/src/balanceplatform/model_rest_service_error.go b/src/balanceplatform/model_rest_service_error.go index 606309d99..e670cc549 100644 --- a/src/balanceplatform/model_rest_service_error.go +++ b/src/balanceplatform/model_rest_service_error.go @@ -28,8 +28,8 @@ type RestServiceError struct { // Detailed explanation of each validation error, when applicable. InvalidFields []InvalidField `json:"invalidFields,omitempty"` // A unique reference for the request, essentially the same as `pspReference`. - RequestId *string `json:"requestId,omitempty"` - Response *JSONObject `json:"response,omitempty"` + RequestId *string `json:"requestId,omitempty"` + Response map[string]interface{} `json:"response,omitempty"` // The HTTP status code. Status int32 `json:"status"` // A short, human-readable summary of the problem type. @@ -205,19 +205,19 @@ func (o *RestServiceError) SetRequestId(v string) { } // GetResponse returns the Response field value if set, zero value otherwise. -func (o *RestServiceError) GetResponse() JSONObject { +func (o *RestServiceError) GetResponse() map[string]interface{} { if o == nil || common.IsNil(o.Response) { - var ret JSONObject + var ret map[string]interface{} return ret } - return *o.Response + return o.Response } // GetResponseOk returns a tuple with the Response field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RestServiceError) GetResponseOk() (*JSONObject, bool) { +func (o *RestServiceError) GetResponseOk() (map[string]interface{}, bool) { if o == nil || common.IsNil(o.Response) { - return nil, false + return map[string]interface{}{}, false } return o.Response, true } @@ -231,9 +231,9 @@ func (o *RestServiceError) HasResponse() bool { return false } -// SetResponse gets a reference to the given JSONObject and assigns it to the Response field. -func (o *RestServiceError) SetResponse(v JSONObject) { - o.Response = &v +// SetResponse gets a reference to the given map[string]interface{} and assigns it to the Response field. +func (o *RestServiceError) SetResponse(v map[string]interface{}) { + o.Response = v } // GetStatus returns the Status field value diff --git a/src/balanceplatform/model_same_amount_restriction.go b/src/balanceplatform/model_same_amount_restriction.go new file mode 100644 index 000000000..8eb827d45 --- /dev/null +++ b/src/balanceplatform/model_same_amount_restriction.go @@ -0,0 +1,152 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the SameAmountRestriction type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SameAmountRestriction{} + +// SameAmountRestriction struct for SameAmountRestriction +type SameAmountRestriction struct { + // Defines how the condition must be evaluated. + Operation string `json:"operation"` + Value *bool `json:"value,omitempty"` +} + +// NewSameAmountRestriction instantiates a new SameAmountRestriction 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 NewSameAmountRestriction(operation string) *SameAmountRestriction { + this := SameAmountRestriction{} + this.Operation = operation + return &this +} + +// NewSameAmountRestrictionWithDefaults instantiates a new SameAmountRestriction 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 NewSameAmountRestrictionWithDefaults() *SameAmountRestriction { + this := SameAmountRestriction{} + return &this +} + +// GetOperation returns the Operation field value +func (o *SameAmountRestriction) 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 *SameAmountRestriction) GetOperationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operation, true +} + +// SetOperation sets field value +func (o *SameAmountRestriction) SetOperation(v string) { + o.Operation = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SameAmountRestriction) GetValue() bool { + if o == nil || common.IsNil(o.Value) { + var ret bool + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SameAmountRestriction) GetValueOk() (*bool, bool) { + if o == nil || common.IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SameAmountRestriction) HasValue() bool { + if o != nil && !common.IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given bool and assigns it to the Value field. +func (o *SameAmountRestriction) SetValue(v bool) { + o.Value = &v +} + +func (o SameAmountRestriction) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SameAmountRestriction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["operation"] = o.Operation + if !common.IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableSameAmountRestriction struct { + value *SameAmountRestriction + isSet bool +} + +func (v NullableSameAmountRestriction) Get() *SameAmountRestriction { + return v.value +} + +func (v *NullableSameAmountRestriction) Set(val *SameAmountRestriction) { + v.value = val + v.isSet = true +} + +func (v NullableSameAmountRestriction) IsSet() bool { + return v.isSet +} + +func (v *NullableSameAmountRestriction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSameAmountRestriction(val *SameAmountRestriction) *NullableSameAmountRestriction { + return &NullableSameAmountRestriction{value: val, isSet: true} +} + +func (v NullableSameAmountRestriction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSameAmountRestriction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_same_counterparty_restriction.go b/src/balanceplatform/model_same_counterparty_restriction.go new file mode 100644 index 000000000..c1f45c653 --- /dev/null +++ b/src/balanceplatform/model_same_counterparty_restriction.go @@ -0,0 +1,152 @@ +/* +Configuration API + +API version: 2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package balanceplatform + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the SameCounterpartyRestriction type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SameCounterpartyRestriction{} + +// SameCounterpartyRestriction struct for SameCounterpartyRestriction +type SameCounterpartyRestriction struct { + // Defines how the condition must be evaluated. + Operation string `json:"operation"` + Value *bool `json:"value,omitempty"` +} + +// NewSameCounterpartyRestriction instantiates a new SameCounterpartyRestriction 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 NewSameCounterpartyRestriction(operation string) *SameCounterpartyRestriction { + this := SameCounterpartyRestriction{} + this.Operation = operation + return &this +} + +// NewSameCounterpartyRestrictionWithDefaults instantiates a new SameCounterpartyRestriction 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 NewSameCounterpartyRestrictionWithDefaults() *SameCounterpartyRestriction { + this := SameCounterpartyRestriction{} + return &this +} + +// GetOperation returns the Operation field value +func (o *SameCounterpartyRestriction) 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 *SameCounterpartyRestriction) GetOperationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operation, true +} + +// SetOperation sets field value +func (o *SameCounterpartyRestriction) SetOperation(v string) { + o.Operation = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SameCounterpartyRestriction) GetValue() bool { + if o == nil || common.IsNil(o.Value) { + var ret bool + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SameCounterpartyRestriction) GetValueOk() (*bool, bool) { + if o == nil || common.IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SameCounterpartyRestriction) HasValue() bool { + if o != nil && !common.IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given bool and assigns it to the Value field. +func (o *SameCounterpartyRestriction) SetValue(v bool) { + o.Value = &v +} + +func (o SameCounterpartyRestriction) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SameCounterpartyRestriction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["operation"] = o.Operation + if !common.IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableSameCounterpartyRestriction struct { + value *SameCounterpartyRestriction + isSet bool +} + +func (v NullableSameCounterpartyRestriction) Get() *SameCounterpartyRestriction { + return v.value +} + +func (v *NullableSameCounterpartyRestriction) Set(val *SameCounterpartyRestriction) { + v.value = val + v.isSet = true +} + +func (v NullableSameCounterpartyRestriction) IsSet() bool { + return v.isSet +} + +func (v *NullableSameCounterpartyRestriction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSameCounterpartyRestriction(val *SameCounterpartyRestriction) *NullableSameCounterpartyRestriction { + return &NullableSameCounterpartyRestriction{value: val, isSet: true} +} + +func (v NullableSameCounterpartyRestriction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSameCounterpartyRestriction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/balanceplatform/model_transaction_rule_restrictions.go b/src/balanceplatform/model_transaction_rule_restrictions.go index 04b9c830b..b6a3de0e8 100644 --- a/src/balanceplatform/model_transaction_rule_restrictions.go +++ b/src/balanceplatform/model_transaction_rule_restrictions.go @@ -19,21 +19,23 @@ var _ common.MappedNullable = &TransactionRuleRestrictions{} // TransactionRuleRestrictions struct for TransactionRuleRestrictions type TransactionRuleRestrictions struct { - ActiveNetworkTokens *ActiveNetworkTokensRestriction `json:"activeNetworkTokens,omitempty"` - BrandVariants *BrandVariantsRestriction `json:"brandVariants,omitempty"` - CounterpartyBank *CounterpartyBankRestriction `json:"counterpartyBank,omitempty"` - Countries *CountriesRestriction `json:"countries,omitempty"` - DayOfWeek *DayOfWeekRestriction `json:"dayOfWeek,omitempty"` - DifferentCurrencies *DifferentCurrenciesRestriction `json:"differentCurrencies,omitempty"` - EntryModes *EntryModesRestriction `json:"entryModes,omitempty"` - InternationalTransaction *InternationalTransactionRestriction `json:"internationalTransaction,omitempty"` - MatchingTransactions *MatchingTransactionsRestriction `json:"matchingTransactions,omitempty"` - Mccs *MccsRestriction `json:"mccs,omitempty"` - MerchantNames *MerchantNamesRestriction `json:"merchantNames,omitempty"` - Merchants *MerchantsRestriction `json:"merchants,omitempty"` - ProcessingTypes *ProcessingTypesRestriction `json:"processingTypes,omitempty"` - TimeOfDay *TimeOfDayRestriction `json:"timeOfDay,omitempty"` - TotalAmount *TotalAmountRestriction `json:"totalAmount,omitempty"` + ActiveNetworkTokens *ActiveNetworkTokensRestriction `json:"activeNetworkTokens,omitempty"` + BrandVariants *BrandVariantsRestriction `json:"brandVariants,omitempty"` + CounterpartyBank *CounterpartyBankRestriction `json:"counterpartyBank,omitempty"` + Countries *CountriesRestriction `json:"countries,omitempty"` + DayOfWeek *DayOfWeekRestriction `json:"dayOfWeek,omitempty"` + DifferentCurrencies *DifferentCurrenciesRestriction `json:"differentCurrencies,omitempty"` + EntryModes *EntryModesRestriction `json:"entryModes,omitempty"` + InternationalTransaction *InternationalTransactionRestriction `json:"internationalTransaction,omitempty"` + MatchingTransactions *MatchingTransactionsRestriction `json:"matchingTransactions,omitempty"` + Mccs *MccsRestriction `json:"mccs,omitempty"` + MerchantNames *MerchantNamesRestriction `json:"merchantNames,omitempty"` + Merchants *MerchantsRestriction `json:"merchants,omitempty"` + ProcessingTypes *ProcessingTypesRestriction `json:"processingTypes,omitempty"` + SameAmountRestriction *SameAmountRestriction `json:"sameAmountRestriction,omitempty"` + SameCounterpartyRestriction *SameCounterpartyRestriction `json:"sameCounterpartyRestriction,omitempty"` + TimeOfDay *TimeOfDayRestriction `json:"timeOfDay,omitempty"` + TotalAmount *TotalAmountRestriction `json:"totalAmount,omitempty"` } // NewTransactionRuleRestrictions instantiates a new TransactionRuleRestrictions object @@ -469,6 +471,70 @@ func (o *TransactionRuleRestrictions) SetProcessingTypes(v ProcessingTypesRestri o.ProcessingTypes = &v } +// GetSameAmountRestriction returns the SameAmountRestriction field value if set, zero value otherwise. +func (o *TransactionRuleRestrictions) GetSameAmountRestriction() SameAmountRestriction { + if o == nil || common.IsNil(o.SameAmountRestriction) { + var ret SameAmountRestriction + return ret + } + return *o.SameAmountRestriction +} + +// GetSameAmountRestrictionOk returns a tuple with the SameAmountRestriction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactionRuleRestrictions) GetSameAmountRestrictionOk() (*SameAmountRestriction, bool) { + if o == nil || common.IsNil(o.SameAmountRestriction) { + return nil, false + } + return o.SameAmountRestriction, true +} + +// HasSameAmountRestriction returns a boolean if a field has been set. +func (o *TransactionRuleRestrictions) HasSameAmountRestriction() bool { + if o != nil && !common.IsNil(o.SameAmountRestriction) { + return true + } + + return false +} + +// SetSameAmountRestriction gets a reference to the given SameAmountRestriction and assigns it to the SameAmountRestriction field. +func (o *TransactionRuleRestrictions) SetSameAmountRestriction(v SameAmountRestriction) { + o.SameAmountRestriction = &v +} + +// GetSameCounterpartyRestriction returns the SameCounterpartyRestriction field value if set, zero value otherwise. +func (o *TransactionRuleRestrictions) GetSameCounterpartyRestriction() SameCounterpartyRestriction { + if o == nil || common.IsNil(o.SameCounterpartyRestriction) { + var ret SameCounterpartyRestriction + return ret + } + return *o.SameCounterpartyRestriction +} + +// GetSameCounterpartyRestrictionOk returns a tuple with the SameCounterpartyRestriction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TransactionRuleRestrictions) GetSameCounterpartyRestrictionOk() (*SameCounterpartyRestriction, bool) { + if o == nil || common.IsNil(o.SameCounterpartyRestriction) { + return nil, false + } + return o.SameCounterpartyRestriction, true +} + +// HasSameCounterpartyRestriction returns a boolean if a field has been set. +func (o *TransactionRuleRestrictions) HasSameCounterpartyRestriction() bool { + if o != nil && !common.IsNil(o.SameCounterpartyRestriction) { + return true + } + + return false +} + +// SetSameCounterpartyRestriction gets a reference to the given SameCounterpartyRestriction and assigns it to the SameCounterpartyRestriction field. +func (o *TransactionRuleRestrictions) SetSameCounterpartyRestriction(v SameCounterpartyRestriction) { + o.SameCounterpartyRestriction = &v +} + // GetTimeOfDay returns the TimeOfDay field value if set, zero value otherwise. func (o *TransactionRuleRestrictions) GetTimeOfDay() TimeOfDayRestriction { if o == nil || common.IsNil(o.TimeOfDay) { @@ -582,6 +648,12 @@ func (o TransactionRuleRestrictions) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ProcessingTypes) { toSerialize["processingTypes"] = o.ProcessingTypes } + if !common.IsNil(o.SameAmountRestriction) { + toSerialize["sameAmountRestriction"] = o.SameAmountRestriction + } + if !common.IsNil(o.SameCounterpartyRestriction) { + toSerialize["sameCounterpartyRestriction"] = o.SameCounterpartyRestriction + } if !common.IsNil(o.TimeOfDay) { toSerialize["timeOfDay"] = o.TimeOfDay } diff --git a/src/balanceplatform/model_transfer_route.go b/src/balanceplatform/model_transfer_route.go index d6e82ef49..0265c8d45 100644 --- a/src/balanceplatform/model_transfer_route.go +++ b/src/balanceplatform/model_transfer_route.go @@ -272,7 +272,7 @@ func (v *NullableTransferRoute) UnmarshalJSON(src []byte) error { } func (o *TransferRoute) isValidCategory() bool { - var allowedEnumValues = []string{"bank", "card", "grants", "internal", "issuedCard", "migration", "platformPayment", "upgrade"} + var allowedEnumValues = []string{"bank", "card", "grants", "internal", "issuedCard", "migration", "platformPayment", "topUp", "upgrade"} for _, allowed := range allowedEnumValues { if o.GetCategory() == allowed { return true diff --git a/src/checkout/model_apple_pay_details.go b/src/checkout/model_apple_pay_details.go index 2ae73e72b..560b38cae 100644 --- a/src/checkout/model_apple_pay_details.go +++ b/src/checkout/model_apple_pay_details.go @@ -309,7 +309,7 @@ func (v *NullableApplePayDetails) UnmarshalJSON(src []byte) error { } func (o *ApplePayDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_card_details.go b/src/checkout/model_card_details.go index c8e076295..d5630ce21 100644 --- a/src/checkout/model_card_details.go +++ b/src/checkout/model_card_details.go @@ -802,7 +802,7 @@ func (v *NullableCardDetails) UnmarshalJSON(src []byte) error { } func (o *CardDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_checkout_await_action.go b/src/checkout/model_checkout_await_action.go index 07ffbd0de..122dc23a0 100644 --- a/src/checkout/model_checkout_await_action.go +++ b/src/checkout/model_checkout_await_action.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &CheckoutAwaitAction{} // CheckoutAwaitAction struct for CheckoutAwaitAction type CheckoutAwaitAction struct { - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_checkout_delegated_authentication_action.go b/src/checkout/model_checkout_delegated_authentication_action.go index 7d3886f9a..8735f8a54 100644 --- a/src/checkout/model_checkout_delegated_authentication_action.go +++ b/src/checkout/model_checkout_delegated_authentication_action.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &CheckoutDelegatedAuthenticationAction{} type CheckoutDelegatedAuthenticationAction struct { // A token needed to authorise a payment. AuthorisationToken *string `json:"authorisationToken,omitempty"` - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_checkout_qr_code_action.go b/src/checkout/model_checkout_qr_code_action.go index a6d2e7888..fde44f829 100644 --- a/src/checkout/model_checkout_qr_code_action.go +++ b/src/checkout/model_checkout_qr_code_action.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &CheckoutQrCodeAction{} type CheckoutQrCodeAction struct { // Expiry time of the QR code. ExpiresAt *string `json:"expiresAt,omitempty"` - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_checkout_sdk_action.go b/src/checkout/model_checkout_sdk_action.go index 46bdb4fcd..0bfb29342 100644 --- a/src/checkout/model_checkout_sdk_action.go +++ b/src/checkout/model_checkout_sdk_action.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &CheckoutSDKAction{} // CheckoutSDKAction struct for CheckoutSDKAction type CheckoutSDKAction struct { - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_checkout_three_ds2_action.go b/src/checkout/model_checkout_three_ds2_action.go index 8f585e6d5..ed0415d88 100644 --- a/src/checkout/model_checkout_three_ds2_action.go +++ b/src/checkout/model_checkout_three_ds2_action.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &CheckoutThreeDS2Action{} type CheckoutThreeDS2Action struct { // A token needed to authorise a payment. AuthorisationToken *string `json:"authorisationToken,omitempty"` - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_checkout_voucher_action.go b/src/checkout/model_checkout_voucher_action.go index b5c07b3aa..3e1fb8b20 100644 --- a/src/checkout/model_checkout_voucher_action.go +++ b/src/checkout/model_checkout_voucher_action.go @@ -42,7 +42,7 @@ type CheckoutVoucherAction struct { MerchantReference *string `json:"merchantReference,omitempty"` // A base64 encoded signature of all properties PassCreationToken *string `json:"passCreationToken,omitempty"` - // A value that must be submitted to the `/payments/details` endpoint to verify this payment. + // Encoded payment data. PaymentData *string `json:"paymentData,omitempty"` // Specifies the payment method. PaymentMethodType *string `json:"paymentMethodType,omitempty"` diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index c71a4e6c1..c8f991014 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -115,6 +115,8 @@ type CreateCheckoutSessionRequest struct { StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` + // Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + ThemeId *string `json:"themeId,omitempty"` // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. // Deprecated ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` @@ -1883,6 +1885,38 @@ func (o *CreateCheckoutSessionRequest) SetTelephoneNumber(v string) { o.TelephoneNumber = &v } +// GetThemeId returns the ThemeId field value if set, zero value otherwise. +func (o *CreateCheckoutSessionRequest) GetThemeId() string { + if o == nil || common.IsNil(o.ThemeId) { + var ret string + return ret + } + return *o.ThemeId +} + +// GetThemeIdOk returns a tuple with the ThemeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCheckoutSessionRequest) GetThemeIdOk() (*string, bool) { + if o == nil || common.IsNil(o.ThemeId) { + return nil, false + } + return o.ThemeId, true +} + +// HasThemeId returns a boolean if a field has been set. +func (o *CreateCheckoutSessionRequest) HasThemeId() bool { + if o != nil && !common.IsNil(o.ThemeId) { + return true + } + + return false +} + +// SetThemeId gets a reference to the given string and assigns it to the ThemeId field. +func (o *CreateCheckoutSessionRequest) SetThemeId(v string) { + o.ThemeId = &v +} + // GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. // Deprecated func (o *CreateCheckoutSessionRequest) GetThreeDSAuthenticationOnly() bool { @@ -2117,6 +2151,9 @@ func (o CreateCheckoutSessionRequest) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.TelephoneNumber) { toSerialize["telephoneNumber"] = o.TelephoneNumber } + if !common.IsNil(o.ThemeId) { + toSerialize["themeId"] = o.ThemeId + } if !common.IsNil(o.ThreeDSAuthenticationOnly) { toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly } diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 1b32daa1d..deddba628 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -119,11 +119,15 @@ type CreateCheckoutSessionResponse struct { StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` + // Sets a custom theme for the Adyen-hosted payment page. The value can be any of the **Theme ID** values from your Customer Area. + ThemeId *string `json:"themeId,omitempty"` // If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. // Deprecated ThreeDSAuthenticationOnly *bool `json:"threeDSAuthenticationOnly,omitempty"` // Set to true if the payment should be routed to a trusted MID. TrustedShopper *bool `json:"trustedShopper,omitempty"` + // The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment. + Url *string `json:"url,omitempty"` } // NewCreateCheckoutSessionResponse instantiates a new CreateCheckoutSessionResponse object @@ -1937,6 +1941,38 @@ func (o *CreateCheckoutSessionResponse) SetTelephoneNumber(v string) { o.TelephoneNumber = &v } +// GetThemeId returns the ThemeId field value if set, zero value otherwise. +func (o *CreateCheckoutSessionResponse) GetThemeId() string { + if o == nil || common.IsNil(o.ThemeId) { + var ret string + return ret + } + return *o.ThemeId +} + +// GetThemeIdOk returns a tuple with the ThemeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCheckoutSessionResponse) GetThemeIdOk() (*string, bool) { + if o == nil || common.IsNil(o.ThemeId) { + return nil, false + } + return o.ThemeId, true +} + +// HasThemeId returns a boolean if a field has been set. +func (o *CreateCheckoutSessionResponse) HasThemeId() bool { + if o != nil && !common.IsNil(o.ThemeId) { + return true + } + + return false +} + +// SetThemeId gets a reference to the given string and assigns it to the ThemeId field. +func (o *CreateCheckoutSessionResponse) SetThemeId(v string) { + o.ThemeId = &v +} + // GetThreeDSAuthenticationOnly returns the ThreeDSAuthenticationOnly field value if set, zero value otherwise. // Deprecated func (o *CreateCheckoutSessionResponse) GetThreeDSAuthenticationOnly() bool { @@ -2004,6 +2040,38 @@ func (o *CreateCheckoutSessionResponse) SetTrustedShopper(v bool) { o.TrustedShopper = &v } +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *CreateCheckoutSessionResponse) 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 *CreateCheckoutSessionResponse) 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 *CreateCheckoutSessionResponse) 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 *CreateCheckoutSessionResponse) SetUrl(v string) { + o.Url = &v +} + func (o CreateCheckoutSessionResponse) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -2173,12 +2241,18 @@ func (o CreateCheckoutSessionResponse) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.TelephoneNumber) { toSerialize["telephoneNumber"] = o.TelephoneNumber } + if !common.IsNil(o.ThemeId) { + toSerialize["themeId"] = o.ThemeId + } if !common.IsNil(o.ThreeDSAuthenticationOnly) { toSerialize["threeDSAuthenticationOnly"] = o.ThreeDSAuthenticationOnly } if !common.IsNil(o.TrustedShopper) { toSerialize["trustedShopper"] = o.TrustedShopper } + if !common.IsNil(o.Url) { + toSerialize["url"] = o.Url + } return toSerialize, nil } diff --git a/src/checkout/model_google_pay_details.go b/src/checkout/model_google_pay_details.go index 3cf6fdd51..3ad9dbb4b 100644 --- a/src/checkout/model_google_pay_details.go +++ b/src/checkout/model_google_pay_details.go @@ -309,7 +309,7 @@ func (v *NullableGooglePayDetails) UnmarshalJSON(src []byte) error { } func (o *GooglePayDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_masterpass_details.go b/src/checkout/model_masterpass_details.go index d11041abe..0aea34f2d 100644 --- a/src/checkout/model_masterpass_details.go +++ b/src/checkout/model_masterpass_details.go @@ -231,7 +231,7 @@ func (v *NullableMasterpassDetails) UnmarshalJSON(src []byte) error { } func (o *MasterpassDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_pay_with_google_details.go b/src/checkout/model_pay_with_google_details.go index 1d71c37cc..d942fb4a8 100644 --- a/src/checkout/model_pay_with_google_details.go +++ b/src/checkout/model_pay_with_google_details.go @@ -309,7 +309,7 @@ func (v *NullablePayWithGoogleDetails) UnmarshalJSON(src []byte) error { } func (o *PayWithGoogleDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_payment_details_request.go b/src/checkout/model_payment_details_request.go index 77cb1205c..bae4ba8e4 100644 --- a/src/checkout/model_payment_details_request.go +++ b/src/checkout/model_payment_details_request.go @@ -21,7 +21,7 @@ var _ common.MappedNullable = &PaymentDetailsRequest{} type PaymentDetailsRequest struct { AuthenticationData *DetailsRequestAuthenticationData `json:"authenticationData,omitempty"` Details PaymentCompletionDetails `json:"details"` - // The `paymentData` value from the `/payments` response. Required if the `/payments` response returns this value. + // Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. PaymentData *string `json:"paymentData,omitempty"` // Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. // Deprecated diff --git a/src/checkout/model_payment_method.go b/src/checkout/model_payment_method.go index dec5bb9e9..421f84631 100644 --- a/src/checkout/model_payment_method.go +++ b/src/checkout/model_payment_method.go @@ -424,7 +424,7 @@ func (v *NullablePaymentMethod) UnmarshalJSON(src []byte) error { } func (o *PaymentMethod) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_recurring_detail.go b/src/checkout/model_recurring_detail.go index 7298af584..1f6eb92b4 100644 --- a/src/checkout/model_recurring_detail.go +++ b/src/checkout/model_recurring_detail.go @@ -497,7 +497,7 @@ func (v *NullableRecurringDetail) UnmarshalJSON(src []byte) error { } func (o *RecurringDetail) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_response_additional_data_domestic_error.go b/src/checkout/model_response_additional_data_domestic_error.go new file mode 100644 index 000000000..9793cf5e9 --- /dev/null +++ b/src/checkout/model_response_additional_data_domestic_error.go @@ -0,0 +1,162 @@ +/* +Adyen Checkout API + +API version: 71 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package checkout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the ResponseAdditionalDataDomesticError type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResponseAdditionalDataDomesticError{} + +// ResponseAdditionalDataDomesticError struct for ResponseAdditionalDataDomesticError +type ResponseAdditionalDataDomesticError struct { + // The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + DomesticRefusalReasonRaw *string `json:"domesticRefusalReasonRaw,omitempty"` + // The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + DomesticShopperAdvice *string `json:"domesticShopperAdvice,omitempty"` +} + +// NewResponseAdditionalDataDomesticError instantiates a new ResponseAdditionalDataDomesticError 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 NewResponseAdditionalDataDomesticError() *ResponseAdditionalDataDomesticError { + this := ResponseAdditionalDataDomesticError{} + return &this +} + +// NewResponseAdditionalDataDomesticErrorWithDefaults instantiates a new ResponseAdditionalDataDomesticError 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 NewResponseAdditionalDataDomesticErrorWithDefaults() *ResponseAdditionalDataDomesticError { + this := ResponseAdditionalDataDomesticError{} + return &this +} + +// GetDomesticRefusalReasonRaw returns the DomesticRefusalReasonRaw field value if set, zero value otherwise. +func (o *ResponseAdditionalDataDomesticError) GetDomesticRefusalReasonRaw() string { + if o == nil || common.IsNil(o.DomesticRefusalReasonRaw) { + var ret string + return ret + } + return *o.DomesticRefusalReasonRaw +} + +// GetDomesticRefusalReasonRawOk returns a tuple with the DomesticRefusalReasonRaw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataDomesticError) GetDomesticRefusalReasonRawOk() (*string, bool) { + if o == nil || common.IsNil(o.DomesticRefusalReasonRaw) { + return nil, false + } + return o.DomesticRefusalReasonRaw, true +} + +// HasDomesticRefusalReasonRaw returns a boolean if a field has been set. +func (o *ResponseAdditionalDataDomesticError) HasDomesticRefusalReasonRaw() bool { + if o != nil && !common.IsNil(o.DomesticRefusalReasonRaw) { + return true + } + + return false +} + +// SetDomesticRefusalReasonRaw gets a reference to the given string and assigns it to the DomesticRefusalReasonRaw field. +func (o *ResponseAdditionalDataDomesticError) SetDomesticRefusalReasonRaw(v string) { + o.DomesticRefusalReasonRaw = &v +} + +// GetDomesticShopperAdvice returns the DomesticShopperAdvice field value if set, zero value otherwise. +func (o *ResponseAdditionalDataDomesticError) GetDomesticShopperAdvice() string { + if o == nil || common.IsNil(o.DomesticShopperAdvice) { + var ret string + return ret + } + return *o.DomesticShopperAdvice +} + +// GetDomesticShopperAdviceOk returns a tuple with the DomesticShopperAdvice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataDomesticError) GetDomesticShopperAdviceOk() (*string, bool) { + if o == nil || common.IsNil(o.DomesticShopperAdvice) { + return nil, false + } + return o.DomesticShopperAdvice, true +} + +// HasDomesticShopperAdvice returns a boolean if a field has been set. +func (o *ResponseAdditionalDataDomesticError) HasDomesticShopperAdvice() bool { + if o != nil && !common.IsNil(o.DomesticShopperAdvice) { + return true + } + + return false +} + +// SetDomesticShopperAdvice gets a reference to the given string and assigns it to the DomesticShopperAdvice field. +func (o *ResponseAdditionalDataDomesticError) SetDomesticShopperAdvice(v string) { + o.DomesticShopperAdvice = &v +} + +func (o ResponseAdditionalDataDomesticError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAdditionalDataDomesticError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.DomesticRefusalReasonRaw) { + toSerialize["domesticRefusalReasonRaw"] = o.DomesticRefusalReasonRaw + } + if !common.IsNil(o.DomesticShopperAdvice) { + toSerialize["domesticShopperAdvice"] = o.DomesticShopperAdvice + } + return toSerialize, nil +} + +type NullableResponseAdditionalDataDomesticError struct { + value *ResponseAdditionalDataDomesticError + isSet bool +} + +func (v NullableResponseAdditionalDataDomesticError) Get() *ResponseAdditionalDataDomesticError { + return v.value +} + +func (v *NullableResponseAdditionalDataDomesticError) Set(val *ResponseAdditionalDataDomesticError) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAdditionalDataDomesticError) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAdditionalDataDomesticError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAdditionalDataDomesticError(val *ResponseAdditionalDataDomesticError) *NullableResponseAdditionalDataDomesticError { + return &NullableResponseAdditionalDataDomesticError{value: val, isSet: true} +} + +func (v NullableResponseAdditionalDataDomesticError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAdditionalDataDomesticError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/checkout/model_samsung_pay_details.go b/src/checkout/model_samsung_pay_details.go index 685e7fc9b..029f56d9f 100644 --- a/src/checkout/model_samsung_pay_details.go +++ b/src/checkout/model_samsung_pay_details.go @@ -309,7 +309,7 @@ func (v *NullableSamsungPayDetails) UnmarshalJSON(src []byte) error { } func (o *SamsungPayDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/checkout/model_split.go b/src/checkout/model_split.go index 33a8b594c..94e64de6a 100644 --- a/src/checkout/model_split.go +++ b/src/checkout/model_split.go @@ -24,7 +24,7 @@ type Split struct { Amount *SplitAmount `json:"amount,omitempty"` // Your description for the split item. Description *string `json:"description,omitempty"` - // Your reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. + // Your unique reference for the split item. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/marketplaces-and-platforms)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. Reference *string `json:"reference,omitempty"` // The type of the split item. Possible values: * [Classic Platforms integration](https://docs.adyen.com/marketplaces-and-platforms/classic): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. * [Balance Platform](https://docs.adyen.com/marketplaces-and-platforms): **BalanceAccount**, **Commission**, **Default**, **PaymentFee**, **Remainder**, **Surcharge**, **Tip**, **VAT**. Type string `json:"type"` diff --git a/src/checkout/model_visa_checkout_details.go b/src/checkout/model_visa_checkout_details.go index 63ee5662c..ea57a0d39 100644 --- a/src/checkout/model_visa_checkout_details.go +++ b/src/checkout/model_visa_checkout_details.go @@ -231,7 +231,7 @@ func (v *NullableVisaCheckoutDetails) UnmarshalJSON(src []byte) error { } func (o *VisaCheckoutDetails) isValidFundingSource() bool { - var allowedEnumValues = []string{"debit"} + var allowedEnumValues = []string{"credit", "debit"} for _, allowed := range allowedEnumValues { if o.GetFundingSource() == allowed { return true diff --git a/src/configurationwebhook/model_account_holder.go b/src/configurationwebhook/model_account_holder.go index a522919db..d711518aa 100644 --- a/src/configurationwebhook/model_account_holder.go +++ b/src/configurationwebhook/model_account_holder.go @@ -42,6 +42,8 @@ type AccountHolder struct { Status *string `json:"status,omitempty"` // The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). TimeZone *string `json:"timeZone,omitempty"` + // List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. + VerificationDeadlines []VerificationDeadline `json:"verificationDeadlines,omitempty"` } // NewAccountHolder instantiates a new AccountHolder object @@ -431,6 +433,38 @@ func (o *AccountHolder) SetTimeZone(v string) { o.TimeZone = &v } +// GetVerificationDeadlines returns the VerificationDeadlines field value if set, zero value otherwise. +func (o *AccountHolder) GetVerificationDeadlines() []VerificationDeadline { + if o == nil || common.IsNil(o.VerificationDeadlines) { + var ret []VerificationDeadline + return ret + } + return o.VerificationDeadlines +} + +// GetVerificationDeadlinesOk returns a tuple with the VerificationDeadlines field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountHolder) GetVerificationDeadlinesOk() ([]VerificationDeadline, bool) { + if o == nil || common.IsNil(o.VerificationDeadlines) { + return nil, false + } + return o.VerificationDeadlines, true +} + +// HasVerificationDeadlines returns a boolean if a field has been set. +func (o *AccountHolder) HasVerificationDeadlines() bool { + if o != nil && !common.IsNil(o.VerificationDeadlines) { + return true + } + + return false +} + +// SetVerificationDeadlines gets a reference to the given []VerificationDeadline and assigns it to the VerificationDeadlines field. +func (o *AccountHolder) SetVerificationDeadlines(v []VerificationDeadline) { + o.VerificationDeadlines = v +} + func (o AccountHolder) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -473,6 +507,9 @@ func (o AccountHolder) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.TimeZone) { toSerialize["timeZone"] = o.TimeZone } + if !common.IsNil(o.VerificationDeadlines) { + toSerialize["verificationDeadlines"] = o.VerificationDeadlines + } return toSerialize, nil } diff --git a/src/configurationwebhook/model_account_holder_capability.go b/src/configurationwebhook/model_account_holder_capability.go index f9f3dc10c..34f36ef24 100644 --- a/src/configurationwebhook/model_account_holder_capability.go +++ b/src/configurationwebhook/model_account_holder_capability.go @@ -33,6 +33,8 @@ type AccountHolderCapability struct { // The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. RequestedLevel *string `json:"requestedLevel,omitempty"` RequestedSettings *CapabilitySettings `json:"requestedSettings,omitempty"` + // Contains the status of the transfer instruments associated with this capability. + TransferInstruments []AccountSupportingEntityCapability `json:"transferInstruments,omitempty"` // The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. VerificationStatus *string `json:"verificationStatus,omitempty"` } @@ -310,6 +312,38 @@ func (o *AccountHolderCapability) SetRequestedSettings(v CapabilitySettings) { o.RequestedSettings = &v } +// GetTransferInstruments returns the TransferInstruments field value if set, zero value otherwise. +func (o *AccountHolderCapability) GetTransferInstruments() []AccountSupportingEntityCapability { + if o == nil || common.IsNil(o.TransferInstruments) { + var ret []AccountSupportingEntityCapability + return ret + } + return o.TransferInstruments +} + +// GetTransferInstrumentsOk returns a tuple with the TransferInstruments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountHolderCapability) GetTransferInstrumentsOk() ([]AccountSupportingEntityCapability, bool) { + if o == nil || common.IsNil(o.TransferInstruments) { + return nil, false + } + return o.TransferInstruments, true +} + +// HasTransferInstruments returns a boolean if a field has been set. +func (o *AccountHolderCapability) HasTransferInstruments() bool { + if o != nil && !common.IsNil(o.TransferInstruments) { + return true + } + + return false +} + +// SetTransferInstruments gets a reference to the given []AccountSupportingEntityCapability and assigns it to the TransferInstruments field. +func (o *AccountHolderCapability) SetTransferInstruments(v []AccountSupportingEntityCapability) { + o.TransferInstruments = v +} + // GetVerificationStatus returns the VerificationStatus field value if set, zero value otherwise. func (o *AccountHolderCapability) GetVerificationStatus() string { if o == nil || common.IsNil(o.VerificationStatus) { @@ -376,6 +410,9 @@ func (o AccountHolderCapability) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.RequestedSettings) { toSerialize["requestedSettings"] = o.RequestedSettings } + if !common.IsNil(o.TransferInstruments) { + toSerialize["transferInstruments"] = o.TransferInstruments + } if !common.IsNil(o.VerificationStatus) { toSerialize["verificationStatus"] = o.VerificationStatus } diff --git a/src/configurationwebhook/model_verification_deadline.go b/src/configurationwebhook/model_verification_deadline.go new file mode 100644 index 000000000..ae97baea1 --- /dev/null +++ b/src/configurationwebhook/model_verification_deadline.go @@ -0,0 +1,182 @@ +/* +Configuration webhooks + +API version: 1 +*/ + +// 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/v8/src/common" +) + +// checks if the VerificationDeadline type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &VerificationDeadline{} + +// VerificationDeadline struct for VerificationDeadline +type VerificationDeadline struct { + // The names of the capabilities to be disallowed. + Capabilities []string `json:"capabilities"` + // The unique identifiers of the bank account(s) that the deadline applies to + EntityIds []string `json:"entityIds,omitempty"` + // The date that verification is due by before capabilities are disallowed. + ExpiresAt time.Time `json:"expiresAt"` +} + +// NewVerificationDeadline instantiates a new VerificationDeadline 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 NewVerificationDeadline(capabilities []string, expiresAt time.Time) *VerificationDeadline { + this := VerificationDeadline{} + this.Capabilities = capabilities + this.ExpiresAt = expiresAt + return &this +} + +// NewVerificationDeadlineWithDefaults instantiates a new VerificationDeadline 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 NewVerificationDeadlineWithDefaults() *VerificationDeadline { + this := VerificationDeadline{} + return &this +} + +// GetCapabilities returns the Capabilities field value +func (o *VerificationDeadline) GetCapabilities() []string { + if o == nil { + var ret []string + return ret + } + + return o.Capabilities +} + +// GetCapabilitiesOk returns a tuple with the Capabilities field value +// and a boolean to check if the value has been set. +func (o *VerificationDeadline) GetCapabilitiesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Capabilities, true +} + +// SetCapabilities sets field value +func (o *VerificationDeadline) SetCapabilities(v []string) { + o.Capabilities = v +} + +// GetEntityIds returns the EntityIds field value if set, zero value otherwise. +func (o *VerificationDeadline) GetEntityIds() []string { + if o == nil || common.IsNil(o.EntityIds) { + var ret []string + return ret + } + return o.EntityIds +} + +// GetEntityIdsOk returns a tuple with the EntityIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerificationDeadline) GetEntityIdsOk() ([]string, bool) { + if o == nil || common.IsNil(o.EntityIds) { + return nil, false + } + return o.EntityIds, true +} + +// HasEntityIds returns a boolean if a field has been set. +func (o *VerificationDeadline) HasEntityIds() bool { + if o != nil && !common.IsNil(o.EntityIds) { + return true + } + + return false +} + +// SetEntityIds gets a reference to the given []string and assigns it to the EntityIds field. +func (o *VerificationDeadline) SetEntityIds(v []string) { + o.EntityIds = v +} + +// GetExpiresAt returns the ExpiresAt field value +func (o *VerificationDeadline) GetExpiresAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value +// and a boolean to check if the value has been set. +func (o *VerificationDeadline) GetExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.ExpiresAt, true +} + +// SetExpiresAt sets field value +func (o *VerificationDeadline) SetExpiresAt(v time.Time) { + o.ExpiresAt = v +} + +func (o VerificationDeadline) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerificationDeadline) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["capabilities"] = o.Capabilities + if !common.IsNil(o.EntityIds) { + toSerialize["entityIds"] = o.EntityIds + } + toSerialize["expiresAt"] = o.ExpiresAt + return toSerialize, nil +} + +type NullableVerificationDeadline struct { + value *VerificationDeadline + isSet bool +} + +func (v NullableVerificationDeadline) Get() *VerificationDeadline { + return v.value +} + +func (v *NullableVerificationDeadline) Set(val *VerificationDeadline) { + v.value = val + v.isSet = true +} + +func (v NullableVerificationDeadline) IsSet() bool { + return v.isSet +} + +func (v *NullableVerificationDeadline) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerificationDeadline(val *VerificationDeadline) *NullableVerificationDeadline { + return &NullableVerificationDeadline{value: val, isSet: true} +} + +func (v NullableVerificationDeadline) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerificationDeadline) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/model_legal_entity.go b/src/legalentity/model_legal_entity.go index ebe4de460..c360dc7b5 100644 --- a/src/legalentity/model_legal_entity.go +++ b/src/legalentity/model_legal_entity.go @@ -41,7 +41,8 @@ type LegalEntity struct { TransferInstruments []TransferInstrumentReference `json:"transferInstruments,omitempty"` Trust *Trust `json:"trust,omitempty"` // The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + UnincorporatedPartnership *UnincorporatedPartnership `json:"unincorporatedPartnership,omitempty"` // List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. VerificationDeadlines []VerificationDeadline `json:"verificationDeadlines,omitempty"` } @@ -475,6 +476,38 @@ func (o *LegalEntity) SetType(v string) { o.Type = &v } +// GetUnincorporatedPartnership returns the UnincorporatedPartnership field value if set, zero value otherwise. +func (o *LegalEntity) GetUnincorporatedPartnership() UnincorporatedPartnership { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + var ret UnincorporatedPartnership + return ret + } + return *o.UnincorporatedPartnership +} + +// GetUnincorporatedPartnershipOk returns a tuple with the UnincorporatedPartnership field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegalEntity) GetUnincorporatedPartnershipOk() (*UnincorporatedPartnership, bool) { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + return nil, false + } + return o.UnincorporatedPartnership, true +} + +// HasUnincorporatedPartnership returns a boolean if a field has been set. +func (o *LegalEntity) HasUnincorporatedPartnership() bool { + if o != nil && !common.IsNil(o.UnincorporatedPartnership) { + return true + } + + return false +} + +// SetUnincorporatedPartnership gets a reference to the given UnincorporatedPartnership and assigns it to the UnincorporatedPartnership field. +func (o *LegalEntity) SetUnincorporatedPartnership(v UnincorporatedPartnership) { + o.UnincorporatedPartnership = &v +} + // GetVerificationDeadlines returns the VerificationDeadlines field value if set, zero value otherwise. func (o *LegalEntity) GetVerificationDeadlines() []VerificationDeadline { if o == nil || common.IsNil(o.VerificationDeadlines) { @@ -554,6 +587,9 @@ func (o LegalEntity) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.UnincorporatedPartnership) { + toSerialize["unincorporatedPartnership"] = o.UnincorporatedPartnership + } if !common.IsNil(o.VerificationDeadlines) { toSerialize["verificationDeadlines"] = o.VerificationDeadlines } diff --git a/src/legalentity/model_legal_entity_info.go b/src/legalentity/model_legal_entity_info.go index 80574575a..51665ea6a 100644 --- a/src/legalentity/model_legal_entity_info.go +++ b/src/legalentity/model_legal_entity_info.go @@ -30,7 +30,8 @@ type LegalEntityInfo struct { SoleProprietorship *SoleProprietorship `json:"soleProprietorship,omitempty"` Trust *Trust `json:"trust,omitempty"` // The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty"` + UnincorporatedPartnership *UnincorporatedPartnership `json:"unincorporatedPartnership,omitempty"` } // NewLegalEntityInfo instantiates a new LegalEntityInfo object @@ -306,6 +307,38 @@ func (o *LegalEntityInfo) SetType(v string) { o.Type = &v } +// GetUnincorporatedPartnership returns the UnincorporatedPartnership field value if set, zero value otherwise. +func (o *LegalEntityInfo) GetUnincorporatedPartnership() UnincorporatedPartnership { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + var ret UnincorporatedPartnership + return ret + } + return *o.UnincorporatedPartnership +} + +// GetUnincorporatedPartnershipOk returns a tuple with the UnincorporatedPartnership field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegalEntityInfo) GetUnincorporatedPartnershipOk() (*UnincorporatedPartnership, bool) { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + return nil, false + } + return o.UnincorporatedPartnership, true +} + +// HasUnincorporatedPartnership returns a boolean if a field has been set. +func (o *LegalEntityInfo) HasUnincorporatedPartnership() bool { + if o != nil && !common.IsNil(o.UnincorporatedPartnership) { + return true + } + + return false +} + +// SetUnincorporatedPartnership gets a reference to the given UnincorporatedPartnership and assigns it to the UnincorporatedPartnership field. +func (o *LegalEntityInfo) SetUnincorporatedPartnership(v UnincorporatedPartnership) { + o.UnincorporatedPartnership = &v +} + func (o LegalEntityInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -340,6 +373,9 @@ func (o LegalEntityInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } + if !common.IsNil(o.UnincorporatedPartnership) { + toSerialize["unincorporatedPartnership"] = o.UnincorporatedPartnership + } return toSerialize, nil } diff --git a/src/legalentity/model_legal_entity_info_required_type.go b/src/legalentity/model_legal_entity_info_required_type.go index 8103555cf..5aa9b33bf 100644 --- a/src/legalentity/model_legal_entity_info_required_type.go +++ b/src/legalentity/model_legal_entity_info_required_type.go @@ -30,7 +30,8 @@ type LegalEntityInfoRequiredType struct { SoleProprietorship *SoleProprietorship `json:"soleProprietorship,omitempty"` Trust *Trust `json:"trust,omitempty"` // The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - Type string `json:"type"` + Type string `json:"type"` + UnincorporatedPartnership *UnincorporatedPartnership `json:"unincorporatedPartnership,omitempty"` } // NewLegalEntityInfoRequiredType instantiates a new LegalEntityInfoRequiredType object @@ -299,6 +300,38 @@ func (o *LegalEntityInfoRequiredType) SetType(v string) { o.Type = v } +// GetUnincorporatedPartnership returns the UnincorporatedPartnership field value if set, zero value otherwise. +func (o *LegalEntityInfoRequiredType) GetUnincorporatedPartnership() UnincorporatedPartnership { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + var ret UnincorporatedPartnership + return ret + } + return *o.UnincorporatedPartnership +} + +// GetUnincorporatedPartnershipOk returns a tuple with the UnincorporatedPartnership field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LegalEntityInfoRequiredType) GetUnincorporatedPartnershipOk() (*UnincorporatedPartnership, bool) { + if o == nil || common.IsNil(o.UnincorporatedPartnership) { + return nil, false + } + return o.UnincorporatedPartnership, true +} + +// HasUnincorporatedPartnership returns a boolean if a field has been set. +func (o *LegalEntityInfoRequiredType) HasUnincorporatedPartnership() bool { + if o != nil && !common.IsNil(o.UnincorporatedPartnership) { + return true + } + + return false +} + +// SetUnincorporatedPartnership gets a reference to the given UnincorporatedPartnership and assigns it to the UnincorporatedPartnership field. +func (o *LegalEntityInfoRequiredType) SetUnincorporatedPartnership(v UnincorporatedPartnership) { + o.UnincorporatedPartnership = &v +} + func (o LegalEntityInfoRequiredType) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -331,6 +364,9 @@ func (o LegalEntityInfoRequiredType) ToMap() (map[string]interface{}, error) { toSerialize["trust"] = o.Trust } toSerialize["type"] = o.Type + if !common.IsNil(o.UnincorporatedPartnership) { + toSerialize["unincorporatedPartnership"] = o.UnincorporatedPartnership + } return toSerialize, nil } diff --git a/src/legalentity/model_unincorporated_partnership.go b/src/legalentity/model_unincorporated_partnership.go new file mode 100644 index 000000000..5c39ecc5a --- /dev/null +++ b/src/legalentity/model_unincorporated_partnership.go @@ -0,0 +1,476 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the UnincorporatedPartnership type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &UnincorporatedPartnership{} + +// UnincorporatedPartnership struct for UnincorporatedPartnership +type UnincorporatedPartnership struct { + // The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + CountryOfGoverningLaw string `json:"countryOfGoverningLaw"` + // The date when the legal arrangement was incorporated in YYYY-MM-DD format. + DateOfIncorporation *string `json:"dateOfIncorporation,omitempty"` + // The registered name, if different from the `name`. + DoingBusinessAs *string `json:"doingBusinessAs,omitempty"` + // The legal name. + Name string `json:"name"` + PrincipalPlaceOfBusiness *Address `json:"principalPlaceOfBusiness,omitempty"` + RegisteredAddress Address `json:"registeredAddress"` + // The registration number. + RegistrationNumber *string `json:"registrationNumber,omitempty"` + // The tax information of the entity. + TaxInformation []TaxInformation `json:"taxInformation,omitempty"` + // Type of Partnership. Possible values: **limitedPartnership**, **generalPartnership**, **familyPartnership**, **commercialPartnership**, **publicPartnership**, **otherPartnership**, **gbr**, **kgaa**, **cv**, **vof**, **maatschap**, **privateFundLimitedPartnership**, **businessTrustEntity**, or **businessPartnership**. + Type string `json:"type"` + // The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + VatAbsenceReason *string `json:"vatAbsenceReason,omitempty"` + // The VAT number. + VatNumber *string `json:"vatNumber,omitempty"` +} + +// NewUnincorporatedPartnership instantiates a new UnincorporatedPartnership 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 NewUnincorporatedPartnership(countryOfGoverningLaw string, name string, registeredAddress Address, type_ string) *UnincorporatedPartnership { + this := UnincorporatedPartnership{} + this.CountryOfGoverningLaw = countryOfGoverningLaw + this.Name = name + this.RegisteredAddress = registeredAddress + this.Type = type_ + return &this +} + +// NewUnincorporatedPartnershipWithDefaults instantiates a new UnincorporatedPartnership 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 NewUnincorporatedPartnershipWithDefaults() *UnincorporatedPartnership { + this := UnincorporatedPartnership{} + return &this +} + +// GetCountryOfGoverningLaw returns the CountryOfGoverningLaw field value +func (o *UnincorporatedPartnership) GetCountryOfGoverningLaw() string { + if o == nil { + var ret string + return ret + } + + return o.CountryOfGoverningLaw +} + +// GetCountryOfGoverningLawOk returns a tuple with the CountryOfGoverningLaw field value +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetCountryOfGoverningLawOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CountryOfGoverningLaw, true +} + +// SetCountryOfGoverningLaw sets field value +func (o *UnincorporatedPartnership) SetCountryOfGoverningLaw(v string) { + o.CountryOfGoverningLaw = v +} + +// GetDateOfIncorporation returns the DateOfIncorporation field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetDateOfIncorporation() string { + if o == nil || common.IsNil(o.DateOfIncorporation) { + var ret string + return ret + } + return *o.DateOfIncorporation +} + +// GetDateOfIncorporationOk returns a tuple with the DateOfIncorporation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetDateOfIncorporationOk() (*string, bool) { + if o == nil || common.IsNil(o.DateOfIncorporation) { + return nil, false + } + return o.DateOfIncorporation, true +} + +// HasDateOfIncorporation returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasDateOfIncorporation() bool { + if o != nil && !common.IsNil(o.DateOfIncorporation) { + return true + } + + return false +} + +// SetDateOfIncorporation gets a reference to the given string and assigns it to the DateOfIncorporation field. +func (o *UnincorporatedPartnership) SetDateOfIncorporation(v string) { + o.DateOfIncorporation = &v +} + +// GetDoingBusinessAs returns the DoingBusinessAs field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetDoingBusinessAs() string { + if o == nil || common.IsNil(o.DoingBusinessAs) { + var ret string + return ret + } + return *o.DoingBusinessAs +} + +// GetDoingBusinessAsOk returns a tuple with the DoingBusinessAs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetDoingBusinessAsOk() (*string, bool) { + if o == nil || common.IsNil(o.DoingBusinessAs) { + return nil, false + } + return o.DoingBusinessAs, true +} + +// HasDoingBusinessAs returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasDoingBusinessAs() bool { + if o != nil && !common.IsNil(o.DoingBusinessAs) { + return true + } + + return false +} + +// SetDoingBusinessAs gets a reference to the given string and assigns it to the DoingBusinessAs field. +func (o *UnincorporatedPartnership) SetDoingBusinessAs(v string) { + o.DoingBusinessAs = &v +} + +// GetName returns the Name field value +func (o *UnincorporatedPartnership) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UnincorporatedPartnership) SetName(v string) { + o.Name = v +} + +// GetPrincipalPlaceOfBusiness returns the PrincipalPlaceOfBusiness field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetPrincipalPlaceOfBusiness() Address { + if o == nil || common.IsNil(o.PrincipalPlaceOfBusiness) { + var ret Address + return ret + } + return *o.PrincipalPlaceOfBusiness +} + +// GetPrincipalPlaceOfBusinessOk returns a tuple with the PrincipalPlaceOfBusiness field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetPrincipalPlaceOfBusinessOk() (*Address, bool) { + if o == nil || common.IsNil(o.PrincipalPlaceOfBusiness) { + return nil, false + } + return o.PrincipalPlaceOfBusiness, true +} + +// HasPrincipalPlaceOfBusiness returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasPrincipalPlaceOfBusiness() bool { + if o != nil && !common.IsNil(o.PrincipalPlaceOfBusiness) { + return true + } + + return false +} + +// SetPrincipalPlaceOfBusiness gets a reference to the given Address and assigns it to the PrincipalPlaceOfBusiness field. +func (o *UnincorporatedPartnership) SetPrincipalPlaceOfBusiness(v Address) { + o.PrincipalPlaceOfBusiness = &v +} + +// GetRegisteredAddress returns the RegisteredAddress field value +func (o *UnincorporatedPartnership) GetRegisteredAddress() Address { + if o == nil { + var ret Address + return ret + } + + return o.RegisteredAddress +} + +// GetRegisteredAddressOk returns a tuple with the RegisteredAddress field value +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetRegisteredAddressOk() (*Address, bool) { + if o == nil { + return nil, false + } + return &o.RegisteredAddress, true +} + +// SetRegisteredAddress sets field value +func (o *UnincorporatedPartnership) SetRegisteredAddress(v Address) { + o.RegisteredAddress = v +} + +// GetRegistrationNumber returns the RegistrationNumber field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetRegistrationNumber() string { + if o == nil || common.IsNil(o.RegistrationNumber) { + var ret string + return ret + } + return *o.RegistrationNumber +} + +// GetRegistrationNumberOk returns a tuple with the RegistrationNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetRegistrationNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.RegistrationNumber) { + return nil, false + } + return o.RegistrationNumber, true +} + +// HasRegistrationNumber returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasRegistrationNumber() bool { + if o != nil && !common.IsNil(o.RegistrationNumber) { + return true + } + + return false +} + +// SetRegistrationNumber gets a reference to the given string and assigns it to the RegistrationNumber field. +func (o *UnincorporatedPartnership) SetRegistrationNumber(v string) { + o.RegistrationNumber = &v +} + +// GetTaxInformation returns the TaxInformation field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetTaxInformation() []TaxInformation { + if o == nil || common.IsNil(o.TaxInformation) { + var ret []TaxInformation + return ret + } + return o.TaxInformation +} + +// GetTaxInformationOk returns a tuple with the TaxInformation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetTaxInformationOk() ([]TaxInformation, bool) { + if o == nil || common.IsNil(o.TaxInformation) { + return nil, false + } + return o.TaxInformation, true +} + +// HasTaxInformation returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasTaxInformation() bool { + if o != nil && !common.IsNil(o.TaxInformation) { + return true + } + + return false +} + +// SetTaxInformation gets a reference to the given []TaxInformation and assigns it to the TaxInformation field. +func (o *UnincorporatedPartnership) SetTaxInformation(v []TaxInformation) { + o.TaxInformation = v +} + +// GetType returns the Type field value +func (o *UnincorporatedPartnership) 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 *UnincorporatedPartnership) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *UnincorporatedPartnership) SetType(v string) { + o.Type = v +} + +// GetVatAbsenceReason returns the VatAbsenceReason field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetVatAbsenceReason() string { + if o == nil || common.IsNil(o.VatAbsenceReason) { + var ret string + return ret + } + return *o.VatAbsenceReason +} + +// GetVatAbsenceReasonOk returns a tuple with the VatAbsenceReason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetVatAbsenceReasonOk() (*string, bool) { + if o == nil || common.IsNil(o.VatAbsenceReason) { + return nil, false + } + return o.VatAbsenceReason, true +} + +// HasVatAbsenceReason returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasVatAbsenceReason() bool { + if o != nil && !common.IsNil(o.VatAbsenceReason) { + return true + } + + return false +} + +// SetVatAbsenceReason gets a reference to the given string and assigns it to the VatAbsenceReason field. +func (o *UnincorporatedPartnership) SetVatAbsenceReason(v string) { + o.VatAbsenceReason = &v +} + +// GetVatNumber returns the VatNumber field value if set, zero value otherwise. +func (o *UnincorporatedPartnership) GetVatNumber() string { + if o == nil || common.IsNil(o.VatNumber) { + var ret string + return ret + } + return *o.VatNumber +} + +// GetVatNumberOk returns a tuple with the VatNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UnincorporatedPartnership) GetVatNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.VatNumber) { + return nil, false + } + return o.VatNumber, true +} + +// HasVatNumber returns a boolean if a field has been set. +func (o *UnincorporatedPartnership) HasVatNumber() bool { + if o != nil && !common.IsNil(o.VatNumber) { + return true + } + + return false +} + +// SetVatNumber gets a reference to the given string and assigns it to the VatNumber field. +func (o *UnincorporatedPartnership) SetVatNumber(v string) { + o.VatNumber = &v +} + +func (o UnincorporatedPartnership) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UnincorporatedPartnership) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["countryOfGoverningLaw"] = o.CountryOfGoverningLaw + if !common.IsNil(o.DateOfIncorporation) { + toSerialize["dateOfIncorporation"] = o.DateOfIncorporation + } + if !common.IsNil(o.DoingBusinessAs) { + toSerialize["doingBusinessAs"] = o.DoingBusinessAs + } + toSerialize["name"] = o.Name + if !common.IsNil(o.PrincipalPlaceOfBusiness) { + toSerialize["principalPlaceOfBusiness"] = o.PrincipalPlaceOfBusiness + } + toSerialize["registeredAddress"] = o.RegisteredAddress + if !common.IsNil(o.RegistrationNumber) { + toSerialize["registrationNumber"] = o.RegistrationNumber + } + if !common.IsNil(o.TaxInformation) { + toSerialize["taxInformation"] = o.TaxInformation + } + toSerialize["type"] = o.Type + if !common.IsNil(o.VatAbsenceReason) { + toSerialize["vatAbsenceReason"] = o.VatAbsenceReason + } + if !common.IsNil(o.VatNumber) { + toSerialize["vatNumber"] = o.VatNumber + } + return toSerialize, nil +} + +type NullableUnincorporatedPartnership struct { + value *UnincorporatedPartnership + isSet bool +} + +func (v NullableUnincorporatedPartnership) Get() *UnincorporatedPartnership { + return v.value +} + +func (v *NullableUnincorporatedPartnership) Set(val *UnincorporatedPartnership) { + v.value = val + v.isSet = true +} + +func (v NullableUnincorporatedPartnership) IsSet() bool { + return v.isSet +} + +func (v *NullableUnincorporatedPartnership) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUnincorporatedPartnership(val *UnincorporatedPartnership) *NullableUnincorporatedPartnership { + return &NullableUnincorporatedPartnership{value: val, isSet: true} +} + +func (v NullableUnincorporatedPartnership) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUnincorporatedPartnership) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *UnincorporatedPartnership) isValidType() bool { + var allowedEnumValues = []string{"limitedPartnership", "generalPartnership", "familyPartnership", "commercialPartnership", "publicPartnership", "otherPartnership", "gbr", "gmbh", "kgaa", "cv", "vof", "maatschap", "privateFundLimitedPartnership", "businessTrustEntity", "businessPartnership"} + for _, allowed := range allowedEnumValues { + if o.GetType() == allowed { + return true + } + } + return false +} +func (o *UnincorporatedPartnership) isValidVatAbsenceReason() bool { + var allowedEnumValues = []string{"industryExemption", "belowTaxThreshold"} + for _, allowed := range allowedEnumValues { + if o.GetVatAbsenceReason() == allowed { + return true + } + } + return false +} diff --git a/src/payout/model_response_additional_data_domestic_error.go b/src/payout/model_response_additional_data_domestic_error.go new file mode 100644 index 000000000..60bd60bd8 --- /dev/null +++ b/src/payout/model_response_additional_data_domestic_error.go @@ -0,0 +1,162 @@ +/* +Adyen Payout API + +API version: 68 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package payout + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v8/src/common" +) + +// checks if the ResponseAdditionalDataDomesticError type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ResponseAdditionalDataDomesticError{} + +// ResponseAdditionalDataDomesticError struct for ResponseAdditionalDataDomesticError +type ResponseAdditionalDataDomesticError struct { + // The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. + DomesticRefusalReasonRaw *string `json:"domesticRefusalReasonRaw,omitempty"` + // The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. + DomesticShopperAdvice *string `json:"domesticShopperAdvice,omitempty"` +} + +// NewResponseAdditionalDataDomesticError instantiates a new ResponseAdditionalDataDomesticError 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 NewResponseAdditionalDataDomesticError() *ResponseAdditionalDataDomesticError { + this := ResponseAdditionalDataDomesticError{} + return &this +} + +// NewResponseAdditionalDataDomesticErrorWithDefaults instantiates a new ResponseAdditionalDataDomesticError 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 NewResponseAdditionalDataDomesticErrorWithDefaults() *ResponseAdditionalDataDomesticError { + this := ResponseAdditionalDataDomesticError{} + return &this +} + +// GetDomesticRefusalReasonRaw returns the DomesticRefusalReasonRaw field value if set, zero value otherwise. +func (o *ResponseAdditionalDataDomesticError) GetDomesticRefusalReasonRaw() string { + if o == nil || common.IsNil(o.DomesticRefusalReasonRaw) { + var ret string + return ret + } + return *o.DomesticRefusalReasonRaw +} + +// GetDomesticRefusalReasonRawOk returns a tuple with the DomesticRefusalReasonRaw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataDomesticError) GetDomesticRefusalReasonRawOk() (*string, bool) { + if o == nil || common.IsNil(o.DomesticRefusalReasonRaw) { + return nil, false + } + return o.DomesticRefusalReasonRaw, true +} + +// HasDomesticRefusalReasonRaw returns a boolean if a field has been set. +func (o *ResponseAdditionalDataDomesticError) HasDomesticRefusalReasonRaw() bool { + if o != nil && !common.IsNil(o.DomesticRefusalReasonRaw) { + return true + } + + return false +} + +// SetDomesticRefusalReasonRaw gets a reference to the given string and assigns it to the DomesticRefusalReasonRaw field. +func (o *ResponseAdditionalDataDomesticError) SetDomesticRefusalReasonRaw(v string) { + o.DomesticRefusalReasonRaw = &v +} + +// GetDomesticShopperAdvice returns the DomesticShopperAdvice field value if set, zero value otherwise. +func (o *ResponseAdditionalDataDomesticError) GetDomesticShopperAdvice() string { + if o == nil || common.IsNil(o.DomesticShopperAdvice) { + var ret string + return ret + } + return *o.DomesticShopperAdvice +} + +// GetDomesticShopperAdviceOk returns a tuple with the DomesticShopperAdvice field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAdditionalDataDomesticError) GetDomesticShopperAdviceOk() (*string, bool) { + if o == nil || common.IsNil(o.DomesticShopperAdvice) { + return nil, false + } + return o.DomesticShopperAdvice, true +} + +// HasDomesticShopperAdvice returns a boolean if a field has been set. +func (o *ResponseAdditionalDataDomesticError) HasDomesticShopperAdvice() bool { + if o != nil && !common.IsNil(o.DomesticShopperAdvice) { + return true + } + + return false +} + +// SetDomesticShopperAdvice gets a reference to the given string and assigns it to the DomesticShopperAdvice field. +func (o *ResponseAdditionalDataDomesticError) SetDomesticShopperAdvice(v string) { + o.DomesticShopperAdvice = &v +} + +func (o ResponseAdditionalDataDomesticError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAdditionalDataDomesticError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.DomesticRefusalReasonRaw) { + toSerialize["domesticRefusalReasonRaw"] = o.DomesticRefusalReasonRaw + } + if !common.IsNil(o.DomesticShopperAdvice) { + toSerialize["domesticShopperAdvice"] = o.DomesticShopperAdvice + } + return toSerialize, nil +} + +type NullableResponseAdditionalDataDomesticError struct { + value *ResponseAdditionalDataDomesticError + isSet bool +} + +func (v NullableResponseAdditionalDataDomesticError) Get() *ResponseAdditionalDataDomesticError { + return v.value +} + +func (v *NullableResponseAdditionalDataDomesticError) Set(val *ResponseAdditionalDataDomesticError) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAdditionalDataDomesticError) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAdditionalDataDomesticError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAdditionalDataDomesticError(val *ResponseAdditionalDataDomesticError) *NullableResponseAdditionalDataDomesticError { + return &NullableResponseAdditionalDataDomesticError{value: val, isSet: true} +} + +func (v NullableResponseAdditionalDataDomesticError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAdditionalDataDomesticError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}