diff --git a/src/checkout/model_card_details_response.go b/src/checkout/model_card_details_response.go index f2272eca3..4393ef4a0 100644 --- a/src/checkout/model_card_details_response.go +++ b/src/checkout/model_card_details_response.go @@ -21,6 +21,10 @@ var _ common.MappedNullable = &CardDetailsResponse{} type CardDetailsResponse struct { // The list of brands identified for the card. Brands []CardBrandDetails `json:"brands,omitempty"` + // The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**. + FundingSource *string `json:"fundingSource,omitempty"` + // Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card. + IsCardCommercial *bool `json:"isCardCommercial,omitempty"` // The two-letter country code of the country where the card was issued. IssuingCountryCode *string `json:"issuingCountryCode,omitempty"` } @@ -74,6 +78,70 @@ func (o *CardDetailsResponse) SetBrands(v []CardBrandDetails) { o.Brands = v } +// GetFundingSource returns the FundingSource field value if set, zero value otherwise. +func (o *CardDetailsResponse) GetFundingSource() string { + if o == nil || common.IsNil(o.FundingSource) { + var ret string + return ret + } + return *o.FundingSource +} + +// GetFundingSourceOk returns a tuple with the FundingSource field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetailsResponse) GetFundingSourceOk() (*string, bool) { + if o == nil || common.IsNil(o.FundingSource) { + return nil, false + } + return o.FundingSource, true +} + +// HasFundingSource returns a boolean if a field has been set. +func (o *CardDetailsResponse) HasFundingSource() bool { + if o != nil && !common.IsNil(o.FundingSource) { + return true + } + + return false +} + +// SetFundingSource gets a reference to the given string and assigns it to the FundingSource field. +func (o *CardDetailsResponse) SetFundingSource(v string) { + o.FundingSource = &v +} + +// GetIsCardCommercial returns the IsCardCommercial field value if set, zero value otherwise. +func (o *CardDetailsResponse) GetIsCardCommercial() bool { + if o == nil || common.IsNil(o.IsCardCommercial) { + var ret bool + return ret + } + return *o.IsCardCommercial +} + +// GetIsCardCommercialOk returns a tuple with the IsCardCommercial field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetailsResponse) GetIsCardCommercialOk() (*bool, bool) { + if o == nil || common.IsNil(o.IsCardCommercial) { + return nil, false + } + return o.IsCardCommercial, true +} + +// HasIsCardCommercial returns a boolean if a field has been set. +func (o *CardDetailsResponse) HasIsCardCommercial() bool { + if o != nil && !common.IsNil(o.IsCardCommercial) { + return true + } + + return false +} + +// SetIsCardCommercial gets a reference to the given bool and assigns it to the IsCardCommercial field. +func (o *CardDetailsResponse) SetIsCardCommercial(v bool) { + o.IsCardCommercial = &v +} + // GetIssuingCountryCode returns the IssuingCountryCode field value if set, zero value otherwise. func (o *CardDetailsResponse) GetIssuingCountryCode() string { if o == nil || common.IsNil(o.IssuingCountryCode) { @@ -119,6 +187,12 @@ func (o CardDetailsResponse) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Brands) { toSerialize["brands"] = o.Brands } + if !common.IsNil(o.FundingSource) { + toSerialize["fundingSource"] = o.FundingSource + } + if !common.IsNil(o.IsCardCommercial) { + toSerialize["isCardCommercial"] = o.IsCardCommercial + } if !common.IsNil(o.IssuingCountryCode) { toSerialize["issuingCountryCode"] = o.IssuingCountryCode } diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index 928272d62..48eaf107f 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -56,7 +56,7 @@ type CreateCheckoutSessionRequest struct { FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]CheckoutSessionInstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` Mandate *Mandate `json:"mandate,omitempty"` // The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. @@ -83,7 +83,7 @@ type CreateCheckoutSessionRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The shopper's email address. diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 28d678da8..3e1d42cd2 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -58,7 +58,7 @@ type CreateCheckoutSessionResponse struct { Id string `json:"id"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]CheckoutSessionInstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` Mandate *Mandate `json:"mandate,omitempty"` // The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. @@ -85,7 +85,7 @@ type CreateCheckoutSessionResponse struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The payment session data you need to pass to your front end. diff --git a/src/checkout/model_create_order_request.go b/src/checkout/model_create_order_request.go index 073a703bc..76e2cc889 100644 --- a/src/checkout/model_create_order_request.go +++ b/src/checkout/model_create_order_request.go @@ -20,7 +20,7 @@ var _ common.MappedNullable = &CreateOrderRequest{} // CreateOrderRequest struct for CreateOrderRequest type CreateOrderRequest struct { Amount Amount `json:"amount"` - // The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day. + // The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. ExpiresAt *string `json:"expiresAt,omitempty"` // The merchant account identifier, with which you want to process the order. MerchantAccount string `json:"merchantAccount"` diff --git a/src/checkout/model_donation_payment_request.go b/src/checkout/model_donation_payment_request.go index cdc5b2af6..dfaf782bd 100644 --- a/src/checkout/model_donation_payment_request.go +++ b/src/checkout/model_donation_payment_request.go @@ -52,7 +52,7 @@ type DonationPaymentRequest struct { DonationOriginalPspReference *string `json:"donationOriginalPspReference,omitempty"` // Donation token received in the `/payments` call. DonationToken *string `json:"donationToken,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // The merchant account identifier, with which you want to process the transaction. MerchantAccount string `json:"merchantAccount"` @@ -71,7 +71,7 @@ type DonationPaymentRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` // The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 SessionValidity *string `json:"sessionValidity,omitempty"` diff --git a/src/checkout/model_fund_recipient.go b/src/checkout/model_fund_recipient.go index a18e79704..428e7d8e4 100644 --- a/src/checkout/model_fund_recipient.go +++ b/src/checkout/model_fund_recipient.go @@ -35,8 +35,10 @@ type FundRecipient struct { TelephoneNumber *string `json:"telephoneNumber,omitempty"` // Indicates where the money is going. WalletIdentifier *string `json:"walletIdentifier,omitempty"` - // Indicates the tax identifier of the fund recepient + // Indicates the tax identifier of the fund recipient WalletOwnerTaxId *string `json:"walletOwnerTaxId,omitempty"` + // The purpose of a digital wallet transaction + WalletPurpose *string `json:"walletPurpose,omitempty"` } // NewFundRecipient instantiates a new FundRecipient object @@ -408,6 +410,38 @@ func (o *FundRecipient) SetWalletOwnerTaxId(v string) { o.WalletOwnerTaxId = &v } +// GetWalletPurpose returns the WalletPurpose field value if set, zero value otherwise. +func (o *FundRecipient) GetWalletPurpose() string { + if o == nil || common.IsNil(o.WalletPurpose) { + var ret string + return ret + } + return *o.WalletPurpose +} + +// GetWalletPurposeOk returns a tuple with the WalletPurpose field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FundRecipient) GetWalletPurposeOk() (*string, bool) { + if o == nil || common.IsNil(o.WalletPurpose) { + return nil, false + } + return o.WalletPurpose, true +} + +// HasWalletPurpose returns a boolean if a field has been set. +func (o *FundRecipient) HasWalletPurpose() bool { + if o != nil && !common.IsNil(o.WalletPurpose) { + return true + } + + return false +} + +// SetWalletPurpose gets a reference to the given string and assigns it to the WalletPurpose field. +func (o *FundRecipient) SetWalletPurpose(v string) { + o.WalletPurpose = &v +} + func (o FundRecipient) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -451,6 +485,9 @@ func (o FundRecipient) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.WalletOwnerTaxId) { toSerialize["walletOwnerTaxId"] = o.WalletOwnerTaxId } + if !common.IsNil(o.WalletPurpose) { + toSerialize["walletPurpose"] = o.WalletPurpose + } return toSerialize, nil } @@ -489,3 +526,13 @@ func (v *NullableFundRecipient) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + +func (o *FundRecipient) isValidWalletPurpose() bool { + var allowedEnumValues = []string{"identifiedBoleto", "transferDifferentWallet", "transferOwnWallet", "transferSameWallet", "unidentifiedBoleto"} + for _, allowed := range allowedEnumValues { + if o.GetWalletPurpose() == allowed { + return true + } + } + return false +} diff --git a/src/checkout/model_mandate.go b/src/checkout/model_mandate.go index 608a4de8f..d2a0d58cc 100644 --- a/src/checkout/model_mandate.go +++ b/src/checkout/model_mandate.go @@ -27,6 +27,8 @@ type Mandate struct { BillingAttemptsRule *string `json:"billingAttemptsRule,omitempty"` // The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. BillingDay *string `json:"billingDay,omitempty"` + // The number of transactions that can be performed within the given frequency. + Count *string `json:"count,omitempty"` // End date of the billing plan, in YYYY-MM-DD format. EndsAt string `json:"endsAt"` // The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. @@ -177,6 +179,38 @@ func (o *Mandate) SetBillingDay(v string) { o.BillingDay = &v } +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Mandate) GetCount() string { + if o == nil || common.IsNil(o.Count) { + var ret string + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mandate) GetCountOk() (*string, bool) { + if o == nil || common.IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Mandate) HasCount() bool { + if o != nil && !common.IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given string and assigns it to the Count field. +func (o *Mandate) SetCount(v string) { + o.Count = &v +} + // GetEndsAt returns the EndsAt field value func (o *Mandate) GetEndsAt() string { if o == nil { @@ -309,6 +343,9 @@ func (o Mandate) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BillingDay) { toSerialize["billingDay"] = o.BillingDay } + if !common.IsNil(o.Count) { + toSerialize["count"] = o.Count + } toSerialize["endsAt"] = o.EndsAt toSerialize["frequency"] = o.Frequency if !common.IsNil(o.Remarks) { diff --git a/src/checkout/model_pay_to_details.go b/src/checkout/model_pay_to_details.go index 87a11110d..df1ea8d83 100644 --- a/src/checkout/model_pay_to_details.go +++ b/src/checkout/model_pay_to_details.go @@ -21,8 +21,13 @@ var _ common.MappedNullable = &PayToDetails{} type PayToDetails struct { // The checkout attempt identifier. CheckoutAttemptId *string `json:"checkoutAttemptId,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + // Deprecated + RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` // The shopper's banking details or payId reference, used to complete payment. ShopperAccountIdentifier *string `json:"shopperAccountIdentifier,omitempty"` + // This is the `recurringDetailReference` returned in the response when you created the token. + StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` // **payto** Type *string `json:"type,omitempty"` } @@ -80,6 +85,41 @@ func (o *PayToDetails) SetCheckoutAttemptId(v string) { o.CheckoutAttemptId = &v } +// GetRecurringDetailReference returns the RecurringDetailReference field value if set, zero value otherwise. +// Deprecated +func (o *PayToDetails) GetRecurringDetailReference() string { + if o == nil || common.IsNil(o.RecurringDetailReference) { + var ret string + return ret + } + return *o.RecurringDetailReference +} + +// GetRecurringDetailReferenceOk returns a tuple with the RecurringDetailReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// Deprecated +func (o *PayToDetails) GetRecurringDetailReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.RecurringDetailReference) { + return nil, false + } + return o.RecurringDetailReference, true +} + +// HasRecurringDetailReference returns a boolean if a field has been set. +func (o *PayToDetails) HasRecurringDetailReference() bool { + if o != nil && !common.IsNil(o.RecurringDetailReference) { + return true + } + + return false +} + +// SetRecurringDetailReference gets a reference to the given string and assigns it to the RecurringDetailReference field. +// Deprecated +func (o *PayToDetails) SetRecurringDetailReference(v string) { + o.RecurringDetailReference = &v +} + // GetShopperAccountIdentifier returns the ShopperAccountIdentifier field value if set, zero value otherwise. func (o *PayToDetails) GetShopperAccountIdentifier() string { if o == nil || common.IsNil(o.ShopperAccountIdentifier) { @@ -112,6 +152,38 @@ func (o *PayToDetails) SetShopperAccountIdentifier(v string) { o.ShopperAccountIdentifier = &v } +// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. +func (o *PayToDetails) GetStoredPaymentMethodId() string { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + var ret string + return ret + } + return *o.StoredPaymentMethodId +} + +// GetStoredPaymentMethodIdOk returns a tuple with the StoredPaymentMethodId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PayToDetails) GetStoredPaymentMethodIdOk() (*string, bool) { + if o == nil || common.IsNil(o.StoredPaymentMethodId) { + return nil, false + } + return o.StoredPaymentMethodId, true +} + +// HasStoredPaymentMethodId returns a boolean if a field has been set. +func (o *PayToDetails) HasStoredPaymentMethodId() bool { + if o != nil && !common.IsNil(o.StoredPaymentMethodId) { + return true + } + + return false +} + +// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field. +func (o *PayToDetails) SetStoredPaymentMethodId(v string) { + o.StoredPaymentMethodId = &v +} + // GetType returns the Type field value if set, zero value otherwise. func (o *PayToDetails) GetType() string { if o == nil || common.IsNil(o.Type) { @@ -157,9 +229,15 @@ func (o PayToDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.CheckoutAttemptId) { toSerialize["checkoutAttemptId"] = o.CheckoutAttemptId } + if !common.IsNil(o.RecurringDetailReference) { + toSerialize["recurringDetailReference"] = o.RecurringDetailReference + } if !common.IsNil(o.ShopperAccountIdentifier) { toSerialize["shopperAccountIdentifier"] = o.ShopperAccountIdentifier } + if !common.IsNil(o.StoredPaymentMethodId) { + toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId + } if !common.IsNil(o.Type) { toSerialize["type"] = o.Type } diff --git a/src/checkout/model_payment_details.go b/src/checkout/model_payment_details.go index 4cc26b5c9..4e8c0411a 100644 --- a/src/checkout/model_payment_details.go +++ b/src/checkout/model_payment_details.go @@ -162,7 +162,7 @@ func (v *NullablePaymentDetails) UnmarshalJSON(src []byte) error { } func (o *PaymentDetails) isValidType() bool { - var allowedEnumValues = []string{"alipay", "multibanco", "bankTransfer_IBAN", "paybright", "paynow", "affirm", "affirm_pos", "trustly", "trustlyvector", "oney", "facilypay", "facilypay_3x", "facilypay_4x", "facilypay_6x", "facilypay_10x", "facilypay_12x", "unionpay", "kcp_banktransfer", "kcp_payco", "kcp_creditcard", "wechatpaySDK", "wechatpayQR", "wechatpayWeb", "molpay_boost", "wallet_IN", "payu_IN_cashcard", "payu_IN_nb", "upi_qr", "paytm", "molpay_ebanking_VN", "ebanking_FI", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "pix", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "paysafecard", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} + var allowedEnumValues = []string{"alipay", "multibanco", "bankTransfer_IBAN", "paybright", "paynow", "affirm", "affirm_pos", "trustly", "trustlyvector", "oney", "facilypay", "facilypay_3x", "facilypay_4x", "facilypay_6x", "facilypay_10x", "facilypay_12x", "unionpay", "kcp_banktransfer", "kcp_payco", "kcp_creditcard", "wechatpaySDK", "wechatpayQR", "wechatpayWeb", "molpay_boost", "wallet_IN", "payu_IN_cashcard", "payu_IN_nb", "upi_qr", "paytm", "molpay_ebanking_VN", "ebanking_FI", "molpay_ebanking_MY", "molpay_ebanking_direct_MY", "swish", "pix", "bizum", "walley", "walley_b2b", "alma", "paypo", "scalapay", "scalapay_3x", "scalapay_4x", "molpay_fpx", "konbini", "directEbanking", "boletobancario", "neteller", "paysafecard", "cashticket", "ikano", "karenmillen", "oasis", "warehouse", "primeiropay_boleto", "mada", "benefit", "knet", "omannet", "gopay_wallet", "kcp_naverpay", "onlinebanking_IN", "fawry", "atome", "moneybookers", "naps", "nordea", "boletobancario_bradesco", "boletobancario_itau", "boletobancario_santander", "boletobancario_bancodobrasil", "boletobancario_hsbc", "molpay_maybank2u", "molpay_cimb", "molpay_rhb", "molpay_amb", "molpay_hlb", "molpay_affin_epg", "molpay_bankislam", "molpay_publicbank", "fpx_agrobank", "touchngo", "maybank2u_mae", "duitnow", "promptpay", "twint_pos", "alipay_hk", "alipay_hk_web", "alipay_hk_wap", "alipay_wap", "balanceplatform"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/checkout/model_payment_link_request.go b/src/checkout/model_payment_link_request.go index fed69c2ad..e057f2ce1 100644 --- a/src/checkout/model_payment_link_request.go +++ b/src/checkout/model_payment_link_request.go @@ -44,7 +44,7 @@ type PaymentLinkRequest struct { FundRecipient *FundRecipient `json:"fundRecipient,omitempty"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]InstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). ManualCapture *bool `json:"manualCapture,omitempty"` diff --git a/src/checkout/model_payment_link_response.go b/src/checkout/model_payment_link_response.go index 367217c20..bb6ca6ddd 100644 --- a/src/checkout/model_payment_link_response.go +++ b/src/checkout/model_payment_link_response.go @@ -46,7 +46,7 @@ type PaymentLinkResponse struct { Id string `json:"id"` // A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. InstallmentOptions *map[string]InstallmentOption `json:"installmentOptions,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). ManualCapture *bool `json:"manualCapture,omitempty"` diff --git a/src/checkout/model_payment_request.go b/src/checkout/model_payment_request.go index 321a74b52..45ae2f3d5 100644 --- a/src/checkout/model_payment_request.go +++ b/src/checkout/model_payment_request.go @@ -67,7 +67,7 @@ type PaymentRequest struct { // The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** IndustryUsage *string `json:"industryUsage,omitempty"` Installments *Installments `json:"installments,omitempty"` - // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, and Zip. + // Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. LineItems []LineItem `json:"lineItems,omitempty"` // The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. LocalizedShopperStatement *map[string]string `json:"localizedShopperStatement,omitempty"` @@ -101,7 +101,7 @@ type PaymentRequest struct { RedirectToIssuerMethod *string `json:"redirectToIssuerMethod,omitempty"` // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 diff --git a/src/checkout/model_payment_setup_request.go b/src/checkout/model_payment_setup_request.go index bbaaf94c9..38f87c484 100644 --- a/src/checkout/model_payment_setup_request.go +++ b/src/checkout/model_payment_setup_request.go @@ -84,7 +84,7 @@ type PaymentSetupRequest struct { RecurringFrequency *string `json:"recurringFrequency,omitempty"` // The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. Reference string `json:"reference"` - // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. + // The URL to return to in case of a redirection. The format depends on the channel. This URL can have a maximum of 1024 characters. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. > The URL must not include personally identifiable information (PII), for example name or email address. ReturnUrl string `json:"returnUrl"` RiskData *RiskData `json:"riskData,omitempty"` // The version of the SDK you are using (for Web SDK integrations only). diff --git a/src/checkout/model_split.go b/src/checkout/model_split.go index 18338de94..64a746a8e 100644 --- a/src/checkout/model_split.go +++ b/src/checkout/model_split.go @@ -26,7 +26,7 @@ type Split struct { Description *string `json:"description,omitempty"` // Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). 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 part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. + // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. Type string `json:"type"` } diff --git a/src/legalentity/api_tax_e_delivery_consent.go b/src/legalentity/api_tax_e_delivery_consent.go new file mode 100644 index 000000000..4d9dfb175 --- /dev/null +++ b/src/legalentity/api_tax_e_delivery_consent.go @@ -0,0 +1,117 @@ +/* +Legal Entity Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package legalentity + +import ( + "context" + "net/http" + "net/url" + "strings" + + "github.com/adyen/adyen-go-api-library/v12/src/common" +) + +// TaxEDeliveryConsentApi service +type TaxEDeliveryConsentApi common.Service + +// All parameters accepted by TaxEDeliveryConsentApi.CheckStatusOfConsentForElectronicDeliveryOfTaxForms +type TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput struct { + id string +} + +/* +Prepare a request for CheckStatusOfConsentForElectronicDeliveryOfTaxForms +@param id The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. +@return TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput +*/ +func (a *TaxEDeliveryConsentApi) CheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput(id string) TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput { + return TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput{ + id: id, + } +} + +/* +CheckStatusOfConsentForElectronicDeliveryOfTaxForms Check the status of consent for electronic delivery of tax forms + +Returns the consent status for electronic delivery of tax forms. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput - Request parameters, see CheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput +@return CheckTaxElectronicDeliveryConsentResponse, *http.Response, error +*/ +func (a *TaxEDeliveryConsentApi) CheckStatusOfConsentForElectronicDeliveryOfTaxForms(ctx context.Context, r TaxEDeliveryConsentApiCheckStatusOfConsentForElectronicDeliveryOfTaxFormsInput) (CheckTaxElectronicDeliveryConsentResponse, *http.Response, error) { + res := &CheckTaxElectronicDeliveryConsentResponse{} + path := "/legalEntities/{id}/checkTaxElectronicDeliveryConsent" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return *res, httpRes, err +} + +// All parameters accepted by TaxEDeliveryConsentApi.SetConsentStatusForElectronicDeliveryOfTaxForms +type TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput struct { + id string + setTaxElectronicDeliveryConsentRequest *SetTaxElectronicDeliveryConsentRequest +} + +func (r TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput) SetTaxElectronicDeliveryConsentRequest(setTaxElectronicDeliveryConsentRequest SetTaxElectronicDeliveryConsentRequest) TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput { + r.setTaxElectronicDeliveryConsentRequest = &setTaxElectronicDeliveryConsentRequest + return r +} + +/* +Prepare a request for SetConsentStatusForElectronicDeliveryOfTaxForms +@param id The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. +@return TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput +*/ +func (a *TaxEDeliveryConsentApi) SetConsentStatusForElectronicDeliveryOfTaxFormsInput(id string) TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput { + return TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput{ + id: id, + } +} + +/* +SetConsentStatusForElectronicDeliveryOfTaxForms Set the consent status for electronic delivery of tax forms + +Set the consent status for electronic delivery of tax forms. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput - Request parameters, see SetConsentStatusForElectronicDeliveryOfTaxFormsInput +@return *http.Response, error +*/ +func (a *TaxEDeliveryConsentApi) SetConsentStatusForElectronicDeliveryOfTaxForms(ctx context.Context, r TaxEDeliveryConsentApiSetConsentStatusForElectronicDeliveryOfTaxFormsInput) (*http.Response, error) { + var res interface{} + path := "/legalEntities/{id}/setTaxElectronicDeliveryConsent" + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + r.setTaxElectronicDeliveryConsentRequest, + res, + http.MethodPost, + a.BasePath()+path, + queryParams, + headerParams, + ) + + return httpRes, err +} diff --git a/src/legalentity/api_terms_of_service.go b/src/legalentity/api_terms_of_service.go index 17c86ccb3..94f896cfb 100644 --- a/src/legalentity/api_terms_of_service.go +++ b/src/legalentity/api_terms_of_service.go @@ -34,7 +34,7 @@ func (r TermsOfServiceApiAcceptTermsOfServiceInput) AcceptTermsOfServiceRequest( /* Prepare a request for AcceptTermsOfService -@param id The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.@param termsofservicedocumentid The unique identifier of the Terms of Service document. +@param id The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. For legal representatives of individuals, this is the ID of the individual. @param termsofservicedocumentid The unique identifier of the Terms of Service document. @return TermsOfServiceApiAcceptTermsOfServiceInput */ func (a *TermsOfServiceApi) AcceptTermsOfServiceInput(id string, termsofservicedocumentid string) TermsOfServiceApiAcceptTermsOfServiceInput { diff --git a/src/legalentity/client.go b/src/legalentity/client.go index 61727a44a..c3386d86d 100644 --- a/src/legalentity/client.go +++ b/src/legalentity/client.go @@ -29,6 +29,8 @@ type APIClient struct { PCIQuestionnairesApi *PCIQuestionnairesApi + TaxEDeliveryConsentApi *TaxEDeliveryConsentApi + TermsOfServiceApi *TermsOfServiceApi TransferInstrumentsApi *TransferInstrumentsApi @@ -48,6 +50,7 @@ func NewAPIClient(client *common.Client) *APIClient { c.HostedOnboardingApi = (*HostedOnboardingApi)(&c.common) c.LegalEntitiesApi = (*LegalEntitiesApi)(&c.common) c.PCIQuestionnairesApi = (*PCIQuestionnairesApi)(&c.common) + c.TaxEDeliveryConsentApi = (*TaxEDeliveryConsentApi)(&c.common) c.TermsOfServiceApi = (*TermsOfServiceApi)(&c.common) c.TransferInstrumentsApi = (*TransferInstrumentsApi)(&c.common) diff --git a/src/legalentity/model_accept_terms_of_service_request.go b/src/legalentity/model_accept_terms_of_service_request.go index f2d360a4a..7f92cfb35 100644 --- a/src/legalentity/model_accept_terms_of_service_request.go +++ b/src/legalentity/model_accept_terms_of_service_request.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &AcceptTermsOfServiceRequest{} // AcceptTermsOfServiceRequest struct for AcceptTermsOfServiceRequest type AcceptTermsOfServiceRequest struct { - // The legal entity ID of the user accepting the Terms of Service. For organizations, this must be the individual legal entity ID of an authorized signatory for the organization. For sole proprietorships, this must be the individual legal entity ID of the owner. + // The legal entity ID of the user accepting the Terms of Service. For organizations, this must be the individual legal entity ID of an authorized signatory for the organization. For sole proprietorships, this must be the individual legal entity ID of the owner. For individuals, this must be the individual legal entity id of either the individual, parent, or guardian. AcceptedBy string `json:"acceptedBy"` // The IP address of the user accepting the Terms of Service. IpAddress *string `json:"ipAddress,omitempty"` diff --git a/src/legalentity/model_accept_terms_of_service_response.go b/src/legalentity/model_accept_terms_of_service_response.go index cdf0b9041..43fa557bd 100644 --- a/src/legalentity/model_accept_terms_of_service_response.go +++ b/src/legalentity/model_accept_terms_of_service_response.go @@ -29,7 +29,7 @@ type AcceptTermsOfServiceResponse struct { Language *string `json:"language,omitempty"` // The unique identifier of the Terms of Service document. TermsOfServiceDocumentId *string `json:"termsOfServiceDocumentId,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableAcceptTermsOfServiceResponse) UnmarshalJSON(src []byte) error { } func (o *AcceptTermsOfServiceResponse) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_business_line_info_update.go b/src/legalentity/model_business_line_info_update.go index 7f11940bf..6dabb2f54 100644 --- a/src/legalentity/model_business_line_info_update.go +++ b/src/legalentity/model_business_line_info_update.go @@ -19,17 +19,10 @@ var _ common.MappedNullable = &BusinessLineInfoUpdate{} // BusinessLineInfoUpdate struct for BusinessLineInfoUpdate type BusinessLineInfoUpdate struct { - // The capability for which you are creating the business line. For example, **receivePayments**. - // Deprecated - Capability *string `json:"capability,omitempty"` // A code that represents the industry of your legal entity. For example, **4431A** for computer software stores. IndustryCode *string `json:"industryCode,omitempty"` - // Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. - LegalEntityId *string `json:"legalEntityId,omitempty"` // A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - SalesChannels []string `json:"salesChannels,omitempty"` - // The service for which you are creating the business line. Possible values: * **paymentProcessing** * **banking** - Service *string `json:"service,omitempty"` + SalesChannels []string `json:"salesChannels,omitempty"` SourceOfFunds *SourceOfFunds `json:"sourceOfFunds,omitempty"` // List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. WebData []WebData `json:"webData,omitempty"` @@ -53,41 +46,6 @@ func NewBusinessLineInfoUpdateWithDefaults() *BusinessLineInfoUpdate { return &this } -// GetCapability returns the Capability field value if set, zero value otherwise. -// Deprecated -func (o *BusinessLineInfoUpdate) GetCapability() string { - if o == nil || common.IsNil(o.Capability) { - var ret string - return ret - } - return *o.Capability -} - -// GetCapabilityOk returns a tuple with the Capability field value if set, nil otherwise -// and a boolean to check if the value has been set. -// Deprecated -func (o *BusinessLineInfoUpdate) GetCapabilityOk() (*string, bool) { - if o == nil || common.IsNil(o.Capability) { - return nil, false - } - return o.Capability, true -} - -// HasCapability returns a boolean if a field has been set. -func (o *BusinessLineInfoUpdate) HasCapability() bool { - if o != nil && !common.IsNil(o.Capability) { - return true - } - - return false -} - -// SetCapability gets a reference to the given string and assigns it to the Capability field. -// Deprecated -func (o *BusinessLineInfoUpdate) SetCapability(v string) { - o.Capability = &v -} - // GetIndustryCode returns the IndustryCode field value if set, zero value otherwise. func (o *BusinessLineInfoUpdate) GetIndustryCode() string { if o == nil || common.IsNil(o.IndustryCode) { @@ -120,38 +78,6 @@ func (o *BusinessLineInfoUpdate) SetIndustryCode(v string) { o.IndustryCode = &v } -// GetLegalEntityId returns the LegalEntityId field value if set, zero value otherwise. -func (o *BusinessLineInfoUpdate) GetLegalEntityId() string { - if o == nil || common.IsNil(o.LegalEntityId) { - var ret string - return ret - } - return *o.LegalEntityId -} - -// GetLegalEntityIdOk returns a tuple with the LegalEntityId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BusinessLineInfoUpdate) GetLegalEntityIdOk() (*string, bool) { - if o == nil || common.IsNil(o.LegalEntityId) { - return nil, false - } - return o.LegalEntityId, true -} - -// HasLegalEntityId returns a boolean if a field has been set. -func (o *BusinessLineInfoUpdate) HasLegalEntityId() bool { - if o != nil && !common.IsNil(o.LegalEntityId) { - return true - } - - return false -} - -// SetLegalEntityId gets a reference to the given string and assigns it to the LegalEntityId field. -func (o *BusinessLineInfoUpdate) SetLegalEntityId(v string) { - o.LegalEntityId = &v -} - // GetSalesChannels returns the SalesChannels field value if set, zero value otherwise. func (o *BusinessLineInfoUpdate) GetSalesChannels() []string { if o == nil || common.IsNil(o.SalesChannels) { @@ -184,38 +110,6 @@ func (o *BusinessLineInfoUpdate) SetSalesChannels(v []string) { o.SalesChannels = v } -// GetService returns the Service field value if set, zero value otherwise. -func (o *BusinessLineInfoUpdate) GetService() string { - if o == nil || common.IsNil(o.Service) { - var ret string - return ret - } - return *o.Service -} - -// GetServiceOk returns a tuple with the Service field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BusinessLineInfoUpdate) GetServiceOk() (*string, bool) { - if o == nil || common.IsNil(o.Service) { - return nil, false - } - return o.Service, true -} - -// HasService returns a boolean if a field has been set. -func (o *BusinessLineInfoUpdate) HasService() bool { - if o != nil && !common.IsNil(o.Service) { - return true - } - - return false -} - -// SetService gets a reference to the given string and assigns it to the Service field. -func (o *BusinessLineInfoUpdate) SetService(v string) { - o.Service = &v -} - // GetSourceOfFunds returns the SourceOfFunds field value if set, zero value otherwise. func (o *BusinessLineInfoUpdate) GetSourceOfFunds() SourceOfFunds { if o == nil || common.IsNil(o.SourceOfFunds) { @@ -322,21 +216,12 @@ func (o BusinessLineInfoUpdate) MarshalJSON() ([]byte, error) { func (o BusinessLineInfoUpdate) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !common.IsNil(o.Capability) { - toSerialize["capability"] = o.Capability - } if !common.IsNil(o.IndustryCode) { toSerialize["industryCode"] = o.IndustryCode } - if !common.IsNil(o.LegalEntityId) { - toSerialize["legalEntityId"] = o.LegalEntityId - } if !common.IsNil(o.SalesChannels) { toSerialize["salesChannels"] = o.SalesChannels } - if !common.IsNil(o.Service) { - toSerialize["service"] = o.Service - } if !common.IsNil(o.SourceOfFunds) { toSerialize["sourceOfFunds"] = o.SourceOfFunds } @@ -384,22 +269,3 @@ func (v *NullableBusinessLineInfoUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - -func (o *BusinessLineInfoUpdate) isValidCapability() bool { - var allowedEnumValues = []string{"receivePayments", "receiveFromPlatformPayments", "issueBankAccount"} - for _, allowed := range allowedEnumValues { - if o.GetCapability() == allowed { - return true - } - } - return false -} -func (o *BusinessLineInfoUpdate) isValidService() bool { - var allowedEnumValues = []string{"paymentProcessing", "banking"} - for _, allowed := range allowedEnumValues { - if o.GetService() == allowed { - return true - } - } - return false -} diff --git a/src/legalentity/model_check_tax_electronic_delivery_consent_response.go b/src/legalentity/model_check_tax_electronic_delivery_consent_response.go new file mode 100644 index 000000000..8ff7c7cb6 --- /dev/null +++ b/src/legalentity/model_check_tax_electronic_delivery_consent_response.go @@ -0,0 +1,125 @@ +/* +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/v12/src/common" +) + +// checks if the CheckTaxElectronicDeliveryConsentResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &CheckTaxElectronicDeliveryConsentResponse{} + +// CheckTaxElectronicDeliveryConsentResponse struct for CheckTaxElectronicDeliveryConsentResponse +type CheckTaxElectronicDeliveryConsentResponse struct { + // Consent to electronically deliver tax form US1099-K. + US1099k *bool `json:"US1099k,omitempty"` +} + +// NewCheckTaxElectronicDeliveryConsentResponse instantiates a new CheckTaxElectronicDeliveryConsentResponse 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 NewCheckTaxElectronicDeliveryConsentResponse() *CheckTaxElectronicDeliveryConsentResponse { + this := CheckTaxElectronicDeliveryConsentResponse{} + return &this +} + +// NewCheckTaxElectronicDeliveryConsentResponseWithDefaults instantiates a new CheckTaxElectronicDeliveryConsentResponse 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 NewCheckTaxElectronicDeliveryConsentResponseWithDefaults() *CheckTaxElectronicDeliveryConsentResponse { + this := CheckTaxElectronicDeliveryConsentResponse{} + return &this +} + +// GetUS1099k returns the US1099k field value if set, zero value otherwise. +func (o *CheckTaxElectronicDeliveryConsentResponse) GetUS1099k() bool { + if o == nil || common.IsNil(o.US1099k) { + var ret bool + return ret + } + return *o.US1099k +} + +// GetUS1099kOk returns a tuple with the US1099k field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckTaxElectronicDeliveryConsentResponse) GetUS1099kOk() (*bool, bool) { + if o == nil || common.IsNil(o.US1099k) { + return nil, false + } + return o.US1099k, true +} + +// HasUS1099k returns a boolean if a field has been set. +func (o *CheckTaxElectronicDeliveryConsentResponse) HasUS1099k() bool { + if o != nil && !common.IsNil(o.US1099k) { + return true + } + + return false +} + +// SetUS1099k gets a reference to the given bool and assigns it to the US1099k field. +func (o *CheckTaxElectronicDeliveryConsentResponse) SetUS1099k(v bool) { + o.US1099k = &v +} + +func (o CheckTaxElectronicDeliveryConsentResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CheckTaxElectronicDeliveryConsentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.US1099k) { + toSerialize["US1099k"] = o.US1099k + } + return toSerialize, nil +} + +type NullableCheckTaxElectronicDeliveryConsentResponse struct { + value *CheckTaxElectronicDeliveryConsentResponse + isSet bool +} + +func (v NullableCheckTaxElectronicDeliveryConsentResponse) Get() *CheckTaxElectronicDeliveryConsentResponse { + return v.value +} + +func (v *NullableCheckTaxElectronicDeliveryConsentResponse) Set(val *CheckTaxElectronicDeliveryConsentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCheckTaxElectronicDeliveryConsentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCheckTaxElectronicDeliveryConsentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCheckTaxElectronicDeliveryConsentResponse(val *CheckTaxElectronicDeliveryConsentResponse) *NullableCheckTaxElectronicDeliveryConsentResponse { + return &NullableCheckTaxElectronicDeliveryConsentResponse{value: val, isSet: true} +} + +func (v NullableCheckTaxElectronicDeliveryConsentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCheckTaxElectronicDeliveryConsentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/model_get_terms_of_service_document_request.go b/src/legalentity/model_get_terms_of_service_document_request.go index 8abe6e050..b41134597 100644 --- a/src/legalentity/model_get_terms_of_service_document_request.go +++ b/src/legalentity/model_get_terms_of_service_document_request.go @@ -21,9 +21,9 @@ var _ common.MappedNullable = &GetTermsOfServiceDocumentRequest{} type GetTermsOfServiceDocumentRequest struct { // The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. Language string `json:"language"` - // The requested format for the Terms of Service document. Default value: JSON. Possible values: JSON or PDF. + // The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**. TermsOfServiceDocumentFormat *string `json:"termsOfServiceDocumentFormat,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type string `json:"type"` } @@ -181,7 +181,7 @@ func (v *NullableGetTermsOfServiceDocumentRequest) UnmarshalJSON(src []byte) err } func (o *GetTermsOfServiceDocumentRequest) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_get_terms_of_service_document_response.go b/src/legalentity/model_get_terms_of_service_document_response.go index 1a798f6b8..4bfa14772 100644 --- a/src/legalentity/model_get_terms_of_service_document_response.go +++ b/src/legalentity/model_get_terms_of_service_document_response.go @@ -29,7 +29,7 @@ type GetTermsOfServiceDocumentResponse struct { TermsOfServiceDocumentFormat *string `json:"termsOfServiceDocumentFormat,omitempty"` // The unique identifier of the Terms of Service document. TermsOfServiceDocumentId *string `json:"termsOfServiceDocumentId,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -310,7 +310,7 @@ func (v *NullableGetTermsOfServiceDocumentResponse) UnmarshalJSON(src []byte) er } func (o *GetTermsOfServiceDocumentResponse) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_onboarding_link_settings.go b/src/legalentity/model_onboarding_link_settings.go index b44d9bf0e..1da89d690 100644 --- a/src/legalentity/model_onboarding_link_settings.go +++ b/src/legalentity/model_onboarding_link_settings.go @@ -23,6 +23,8 @@ type OnboardingLinkSettings struct { AcceptedCountries []string `json:"acceptedCountries,omitempty"` // Default value: **false** Indicates if the user can select the format for their payout account (if applicable). AllowBankAccountFormatSelection *bool `json:"allowBankAccountFormatSelection,omitempty"` + // Default value: **true** Indicates if the user may press a hidden key combination to open the HO debugging UI. + AllowDebugUi *bool `json:"allowDebugUi,omitempty"` // Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity. AllowIntraRegionCrossBorderPayout *bool `json:"allowIntraRegionCrossBorderPayout,omitempty"` // Default value: **true** Indicates if the user can change their legal entity type. @@ -132,6 +134,38 @@ func (o *OnboardingLinkSettings) SetAllowBankAccountFormatSelection(v bool) { o.AllowBankAccountFormatSelection = &v } +// GetAllowDebugUi returns the AllowDebugUi field value if set, zero value otherwise. +func (o *OnboardingLinkSettings) GetAllowDebugUi() bool { + if o == nil || common.IsNil(o.AllowDebugUi) { + var ret bool + return ret + } + return *o.AllowDebugUi +} + +// GetAllowDebugUiOk returns a tuple with the AllowDebugUi field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OnboardingLinkSettings) GetAllowDebugUiOk() (*bool, bool) { + if o == nil || common.IsNil(o.AllowDebugUi) { + return nil, false + } + return o.AllowDebugUi, true +} + +// HasAllowDebugUi returns a boolean if a field has been set. +func (o *OnboardingLinkSettings) HasAllowDebugUi() bool { + if o != nil && !common.IsNil(o.AllowDebugUi) { + return true + } + + return false +} + +// SetAllowDebugUi gets a reference to the given bool and assigns it to the AllowDebugUi field. +func (o *OnboardingLinkSettings) SetAllowDebugUi(v bool) { + o.AllowDebugUi = &v +} + // GetAllowIntraRegionCrossBorderPayout returns the AllowIntraRegionCrossBorderPayout field value if set, zero value otherwise. func (o *OnboardingLinkSettings) GetAllowIntraRegionCrossBorderPayout() bool { if o == nil || common.IsNil(o.AllowIntraRegionCrossBorderPayout) { @@ -564,6 +598,9 @@ func (o OnboardingLinkSettings) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.AllowBankAccountFormatSelection) { toSerialize["allowBankAccountFormatSelection"] = o.AllowBankAccountFormatSelection } + if !common.IsNil(o.AllowDebugUi) { + toSerialize["allowDebugUi"] = o.AllowDebugUi + } if !common.IsNil(o.AllowIntraRegionCrossBorderPayout) { toSerialize["allowIntraRegionCrossBorderPayout"] = o.AllowIntraRegionCrossBorderPayout } diff --git a/src/legalentity/model_set_tax_electronic_delivery_consent_request.go b/src/legalentity/model_set_tax_electronic_delivery_consent_request.go new file mode 100644 index 000000000..4014ddd30 --- /dev/null +++ b/src/legalentity/model_set_tax_electronic_delivery_consent_request.go @@ -0,0 +1,125 @@ +/* +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/v12/src/common" +) + +// checks if the SetTaxElectronicDeliveryConsentRequest type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &SetTaxElectronicDeliveryConsentRequest{} + +// SetTaxElectronicDeliveryConsentRequest struct for SetTaxElectronicDeliveryConsentRequest +type SetTaxElectronicDeliveryConsentRequest struct { + // Consent to electronically deliver tax form US1099-K. + US1099k *bool `json:"US1099k,omitempty"` +} + +// NewSetTaxElectronicDeliveryConsentRequest instantiates a new SetTaxElectronicDeliveryConsentRequest 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 NewSetTaxElectronicDeliveryConsentRequest() *SetTaxElectronicDeliveryConsentRequest { + this := SetTaxElectronicDeliveryConsentRequest{} + return &this +} + +// NewSetTaxElectronicDeliveryConsentRequestWithDefaults instantiates a new SetTaxElectronicDeliveryConsentRequest 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 NewSetTaxElectronicDeliveryConsentRequestWithDefaults() *SetTaxElectronicDeliveryConsentRequest { + this := SetTaxElectronicDeliveryConsentRequest{} + return &this +} + +// GetUS1099k returns the US1099k field value if set, zero value otherwise. +func (o *SetTaxElectronicDeliveryConsentRequest) GetUS1099k() bool { + if o == nil || common.IsNil(o.US1099k) { + var ret bool + return ret + } + return *o.US1099k +} + +// GetUS1099kOk returns a tuple with the US1099k field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SetTaxElectronicDeliveryConsentRequest) GetUS1099kOk() (*bool, bool) { + if o == nil || common.IsNil(o.US1099k) { + return nil, false + } + return o.US1099k, true +} + +// HasUS1099k returns a boolean if a field has been set. +func (o *SetTaxElectronicDeliveryConsentRequest) HasUS1099k() bool { + if o != nil && !common.IsNil(o.US1099k) { + return true + } + + return false +} + +// SetUS1099k gets a reference to the given bool and assigns it to the US1099k field. +func (o *SetTaxElectronicDeliveryConsentRequest) SetUS1099k(v bool) { + o.US1099k = &v +} + +func (o SetTaxElectronicDeliveryConsentRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SetTaxElectronicDeliveryConsentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.US1099k) { + toSerialize["US1099k"] = o.US1099k + } + return toSerialize, nil +} + +type NullableSetTaxElectronicDeliveryConsentRequest struct { + value *SetTaxElectronicDeliveryConsentRequest + isSet bool +} + +func (v NullableSetTaxElectronicDeliveryConsentRequest) Get() *SetTaxElectronicDeliveryConsentRequest { + return v.value +} + +func (v *NullableSetTaxElectronicDeliveryConsentRequest) Set(val *SetTaxElectronicDeliveryConsentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSetTaxElectronicDeliveryConsentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSetTaxElectronicDeliveryConsentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSetTaxElectronicDeliveryConsentRequest(val *SetTaxElectronicDeliveryConsentRequest) *NullableSetTaxElectronicDeliveryConsentRequest { + return &NullableSetTaxElectronicDeliveryConsentRequest{value: val, isSet: true} +} + +func (v NullableSetTaxElectronicDeliveryConsentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSetTaxElectronicDeliveryConsentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/legalentity/model_terms_of_service_acceptance_info.go b/src/legalentity/model_terms_of_service_acceptance_info.go index af96465ec..daf5c4643 100644 --- a/src/legalentity/model_terms_of_service_acceptance_info.go +++ b/src/legalentity/model_terms_of_service_acceptance_info.go @@ -28,7 +28,7 @@ type TermsOfServiceAcceptanceInfo struct { CreatedAt *time.Time `json:"createdAt,omitempty"` // An Adyen-generated reference for the accepted Terms of Service. Id *string `json:"id,omitempty"` - // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** + // The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** Type *string `json:"type,omitempty"` } @@ -274,7 +274,7 @@ func (v *NullableTermsOfServiceAcceptanceInfo) UnmarshalJSON(src []byte) error { } func (o *TermsOfServiceAcceptanceInfo) isValidType() bool { - var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} + var allowedEnumValues = []string{"adyenAccount", "adyenCapital", "adyenCard", "adyenChargeCard", "adyenForPlatformsAdvanced", "adyenForPlatformsManage", "adyenFranchisee", "adyenIssuing", "adyenPccr"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/management/api_android_files_company_level.go b/src/management/api_android_files_company_level.go index 80c9dd89b..bb8d7cebd 100644 --- a/src/management/api_android_files_company_level.go +++ b/src/management/api_android_files_company_level.go @@ -300,7 +300,7 @@ func (a *AndroidFilesCompanyLevelApi) ListAndroidCertificatesInput(companyId str ListAndroidCertificates Get a list of Android certificates Returns a list of the Android certificates that are available for the company identified in the path. -Typically, these certificates enable running apps on Android payment terminals. The certifcates in the list have been uploaded to Adyen and can be installed or uninstalled on Android terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). +Typically, these certificates enable running apps on Android payment terminals. The certificates in the list have been uploaded to Adyen and can be installed or uninstalled on Android terminals through [terminal actions](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api). To make this request, your API credential must have one of the following [roles](https://docs.adyen.com/development-resources/api-credentials#api-permissions): * Management API—Android files read diff --git a/src/management/model_additional_settings.go b/src/management/model_additional_settings.go index 51145f029..19708f22c 100644 --- a/src/management/model_additional_settings.go +++ b/src/management/model_additional_settings.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &AdditionalSettings{} // AdditionalSettings struct for AdditionalSettings type AdditionalSettings struct { - // Object containing list of event codes for which the notifcation will be sent. + // Object containing list of event codes for which the notification will be sent. IncludeEventCodes []string `json:"includeEventCodes,omitempty"` // Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. Properties *map[string]bool `json:"properties,omitempty"` diff --git a/src/management/model_additional_settings_response.go b/src/management/model_additional_settings_response.go index a1e6cf83b..d3eed8729 100644 --- a/src/management/model_additional_settings_response.go +++ b/src/management/model_additional_settings_response.go @@ -19,9 +19,9 @@ var _ common.MappedNullable = &AdditionalSettingsResponse{} // AdditionalSettingsResponse struct for AdditionalSettingsResponse type AdditionalSettingsResponse struct { - // Object containing list of event codes for which the notifcation will not be sent. + // Object containing list of event codes for which the notification will not be sent. ExcludeEventCodes []string `json:"excludeEventCodes,omitempty"` - // Object containing list of event codes for which the notifcation will be sent. + // Object containing list of event codes for which the notification will be sent. IncludeEventCodes []string `json:"includeEventCodes,omitempty"` // Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. Properties *map[string]bool `json:"properties,omitempty"` diff --git a/src/management/model_custom_notification.go b/src/management/model_custom_notification.go index 46bbeed17..634502735 100644 --- a/src/management/model_custom_notification.go +++ b/src/management/model_custom_notification.go @@ -29,7 +29,7 @@ type CustomNotification struct { MerchantReference *string `json:"merchantReference,omitempty"` // The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit** PaymentMethod *string `json:"paymentMethod,omitempty"` - // A descripton of what caused the notification. + // A description of what caused the notification. Reason *string `json:"reason,omitempty"` // The outcome of the event which the notification is about. Set to either **true** or **false**. Success *bool `json:"success,omitempty"` diff --git a/src/management/model_jcb_info.go b/src/management/model_jcb_info.go new file mode 100644 index 000000000..b4a61e70e --- /dev/null +++ b/src/management/model_jcb_info.go @@ -0,0 +1,240 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v12/src/common" +) + +// checks if the JCBInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &JCBInfo{} + +// JCBInfo struct for JCBInfo +type JCBInfo struct { + // MID (Merchant ID) number. Format: 10 numeric characters. Must be provided for both `noContract` and `gatewayContract` service levels. + MidNumber *string `json:"midNumber,omitempty"` + // Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. This is applicable for both `noContract` and `gatewayContract` service levels. The default value is `false`. + ReuseMidNumber *bool `json:"reuseMidNumber,omitempty"` + // Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly. + ServiceLevel string `json:"serviceLevel"` + TransactionDescription *TransactionDescriptionInfo `json:"transactionDescription,omitempty"` +} + +// NewJCBInfo instantiates a new JCBInfo 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 NewJCBInfo(serviceLevel string) *JCBInfo { + this := JCBInfo{} + var reuseMidNumber bool = false + this.ReuseMidNumber = &reuseMidNumber + this.ServiceLevel = serviceLevel + return &this +} + +// NewJCBInfoWithDefaults instantiates a new JCBInfo 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 NewJCBInfoWithDefaults() *JCBInfo { + this := JCBInfo{} + var reuseMidNumber bool = false + this.ReuseMidNumber = &reuseMidNumber + return &this +} + +// GetMidNumber returns the MidNumber field value if set, zero value otherwise. +func (o *JCBInfo) GetMidNumber() string { + if o == nil || common.IsNil(o.MidNumber) { + var ret string + return ret + } + return *o.MidNumber +} + +// GetMidNumberOk returns a tuple with the MidNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JCBInfo) GetMidNumberOk() (*string, bool) { + if o == nil || common.IsNil(o.MidNumber) { + return nil, false + } + return o.MidNumber, true +} + +// HasMidNumber returns a boolean if a field has been set. +func (o *JCBInfo) HasMidNumber() bool { + if o != nil && !common.IsNil(o.MidNumber) { + return true + } + + return false +} + +// SetMidNumber gets a reference to the given string and assigns it to the MidNumber field. +func (o *JCBInfo) SetMidNumber(v string) { + o.MidNumber = &v +} + +// GetReuseMidNumber returns the ReuseMidNumber field value if set, zero value otherwise. +func (o *JCBInfo) GetReuseMidNumber() bool { + if o == nil || common.IsNil(o.ReuseMidNumber) { + var ret bool + return ret + } + return *o.ReuseMidNumber +} + +// GetReuseMidNumberOk returns a tuple with the ReuseMidNumber field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JCBInfo) GetReuseMidNumberOk() (*bool, bool) { + if o == nil || common.IsNil(o.ReuseMidNumber) { + return nil, false + } + return o.ReuseMidNumber, true +} + +// HasReuseMidNumber returns a boolean if a field has been set. +func (o *JCBInfo) HasReuseMidNumber() bool { + if o != nil && !common.IsNil(o.ReuseMidNumber) { + return true + } + + return false +} + +// SetReuseMidNumber gets a reference to the given bool and assigns it to the ReuseMidNumber field. +func (o *JCBInfo) SetReuseMidNumber(v bool) { + o.ReuseMidNumber = &v +} + +// GetServiceLevel returns the ServiceLevel field value +func (o *JCBInfo) GetServiceLevel() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceLevel +} + +// GetServiceLevelOk returns a tuple with the ServiceLevel field value +// and a boolean to check if the value has been set. +func (o *JCBInfo) GetServiceLevelOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceLevel, true +} + +// SetServiceLevel sets field value +func (o *JCBInfo) SetServiceLevel(v string) { + o.ServiceLevel = v +} + +// GetTransactionDescription returns the TransactionDescription field value if set, zero value otherwise. +func (o *JCBInfo) GetTransactionDescription() TransactionDescriptionInfo { + if o == nil || common.IsNil(o.TransactionDescription) { + var ret TransactionDescriptionInfo + return ret + } + return *o.TransactionDescription +} + +// GetTransactionDescriptionOk returns a tuple with the TransactionDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JCBInfo) GetTransactionDescriptionOk() (*TransactionDescriptionInfo, bool) { + if o == nil || common.IsNil(o.TransactionDescription) { + return nil, false + } + return o.TransactionDescription, true +} + +// HasTransactionDescription returns a boolean if a field has been set. +func (o *JCBInfo) HasTransactionDescription() bool { + if o != nil && !common.IsNil(o.TransactionDescription) { + return true + } + + return false +} + +// SetTransactionDescription gets a reference to the given TransactionDescriptionInfo and assigns it to the TransactionDescription field. +func (o *JCBInfo) SetTransactionDescription(v TransactionDescriptionInfo) { + o.TransactionDescription = &v +} + +func (o JCBInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JCBInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.MidNumber) { + toSerialize["midNumber"] = o.MidNumber + } + if !common.IsNil(o.ReuseMidNumber) { + toSerialize["reuseMidNumber"] = o.ReuseMidNumber + } + toSerialize["serviceLevel"] = o.ServiceLevel + if !common.IsNil(o.TransactionDescription) { + toSerialize["transactionDescription"] = o.TransactionDescription + } + return toSerialize, nil +} + +type NullableJCBInfo struct { + value *JCBInfo + isSet bool +} + +func (v NullableJCBInfo) Get() *JCBInfo { + return v.value +} + +func (v *NullableJCBInfo) Set(val *JCBInfo) { + v.value = val + v.isSet = true +} + +func (v NullableJCBInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableJCBInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJCBInfo(val *JCBInfo) *NullableJCBInfo { + return &NullableJCBInfo{value: val, isSet: true} +} + +func (v NullableJCBInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJCBInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +func (o *JCBInfo) isValidServiceLevel() bool { + var allowedEnumValues = []string{"noContract", "gatewayContract"} + for _, allowed := range allowedEnumValues { + if o.GetServiceLevel() == allowed { + return true + } + } + return false +} diff --git a/src/management/model_payment_method.go b/src/management/model_payment_method.go index ceba61397..c1e858c51 100644 --- a/src/management/model_payment_method.go +++ b/src/management/model_payment_method.go @@ -49,7 +49,7 @@ type PaymentMethod struct { Id string `json:"id"` Ideal *GenericPmWithTdiInfo `json:"ideal,omitempty"` InteracCard *GenericPmWithTdiInfo `json:"interac_card,omitempty"` - Jcb *GenericPmWithTdiInfo `json:"jcb,omitempty"` + Jcb *JCBInfo `json:"jcb,omitempty"` Klarna *KlarnaInfo `json:"klarna,omitempty"` Maestro *GenericPmWithTdiInfo `json:"maestro,omitempty"` Mc *GenericPmWithTdiInfo `json:"mc,omitempty"` @@ -827,9 +827,9 @@ func (o *PaymentMethod) SetInteracCard(v GenericPmWithTdiInfo) { } // GetJcb returns the Jcb field value if set, zero value otherwise. -func (o *PaymentMethod) GetJcb() GenericPmWithTdiInfo { +func (o *PaymentMethod) GetJcb() JCBInfo { if o == nil || common.IsNil(o.Jcb) { - var ret GenericPmWithTdiInfo + var ret JCBInfo return ret } return *o.Jcb @@ -837,7 +837,7 @@ func (o *PaymentMethod) GetJcb() GenericPmWithTdiInfo { // GetJcbOk returns a tuple with the Jcb field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethod) GetJcbOk() (*GenericPmWithTdiInfo, bool) { +func (o *PaymentMethod) GetJcbOk() (*JCBInfo, bool) { if o == nil || common.IsNil(o.Jcb) { return nil, false } @@ -853,8 +853,8 @@ func (o *PaymentMethod) HasJcb() bool { return false } -// SetJcb gets a reference to the given GenericPmWithTdiInfo and assigns it to the Jcb field. -func (o *PaymentMethod) SetJcb(v GenericPmWithTdiInfo) { +// SetJcb gets a reference to the given JCBInfo and assigns it to the Jcb field. +func (o *PaymentMethod) SetJcb(v JCBInfo) { o.Jcb = &v } diff --git a/src/management/model_payment_method_setup_info.go b/src/management/model_payment_method_setup_info.go index 7e0ad4aae..c1874c180 100644 --- a/src/management/model_payment_method_setup_info.go +++ b/src/management/model_payment_method_setup_info.go @@ -43,7 +43,7 @@ type PaymentMethodSetupInfo struct { GooglePay *GooglePayInfo `json:"googlePay,omitempty"` Ideal *GenericPmWithTdiInfo `json:"ideal,omitempty"` InteracCard *GenericPmWithTdiInfo `json:"interac_card,omitempty"` - Jcb *GenericPmWithTdiInfo `json:"jcb,omitempty"` + Jcb *JCBInfo `json:"jcb,omitempty"` Klarna *KlarnaInfo `json:"klarna,omitempty"` Maestro *GenericPmWithTdiInfo `json:"maestro,omitempty"` Mc *GenericPmWithTdiInfo `json:"mc,omitempty"` @@ -731,9 +731,9 @@ func (o *PaymentMethodSetupInfo) SetInteracCard(v GenericPmWithTdiInfo) { } // GetJcb returns the Jcb field value if set, zero value otherwise. -func (o *PaymentMethodSetupInfo) GetJcb() GenericPmWithTdiInfo { +func (o *PaymentMethodSetupInfo) GetJcb() JCBInfo { if o == nil || common.IsNil(o.Jcb) { - var ret GenericPmWithTdiInfo + var ret JCBInfo return ret } return *o.Jcb @@ -741,7 +741,7 @@ func (o *PaymentMethodSetupInfo) GetJcb() GenericPmWithTdiInfo { // GetJcbOk returns a tuple with the Jcb field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodSetupInfo) GetJcbOk() (*GenericPmWithTdiInfo, bool) { +func (o *PaymentMethodSetupInfo) GetJcbOk() (*JCBInfo, bool) { if o == nil || common.IsNil(o.Jcb) { return nil, false } @@ -757,8 +757,8 @@ func (o *PaymentMethodSetupInfo) HasJcb() bool { return false } -// SetJcb gets a reference to the given GenericPmWithTdiInfo and assigns it to the Jcb field. -func (o *PaymentMethodSetupInfo) SetJcb(v GenericPmWithTdiInfo) { +// SetJcb gets a reference to the given JCBInfo and assigns it to the Jcb field. +func (o *PaymentMethodSetupInfo) SetJcb(v JCBInfo) { o.Jcb = &v } diff --git a/src/payments/api_modifications.go b/src/payments/api_modifications.go index e017ecf9c..d402aec8f 100644 --- a/src/payments/api_modifications.go +++ b/src/payments/api_modifications.go @@ -203,7 +203,7 @@ Capture Capture an authorisation Captures the authorisation hold on a payment, returning a unique reference for this request. Usually the full authorisation amount is captured, however it's also possible to capture a smaller amount, which results in cancelling the remaining authorisation balance. -Payment methods that are captured automatically after authorisation don't need to be captured. However, submitting a capture request on these transactions will not result in double charges. If immediate or delayed auto-capture is enabled, calling the capture method is not neccessary. +Payment methods that are captured automatically after authorisation don't need to be captured. However, submitting a capture request on these transactions will not result in double charges. If immediate or delayed auto-capture is enabled, calling the capture method is not necessary. For more information refer to [Capture](https://docs.adyen.com/online-payments/classic-integrations/modify-payments/capture). diff --git a/src/payments/model_mandate.go b/src/payments/model_mandate.go index ff3d62f69..85fac3ff3 100644 --- a/src/payments/model_mandate.go +++ b/src/payments/model_mandate.go @@ -27,6 +27,8 @@ type Mandate struct { BillingAttemptsRule *string `json:"billingAttemptsRule,omitempty"` // The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. BillingDay *string `json:"billingDay,omitempty"` + // The number of transactions that can be performed within the given frequency. + Count *string `json:"count,omitempty"` // End date of the billing plan, in YYYY-MM-DD format. EndsAt string `json:"endsAt"` // The frequency with which a shopper should be charged. Possible values: **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. @@ -177,6 +179,38 @@ func (o *Mandate) SetBillingDay(v string) { o.BillingDay = &v } +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Mandate) GetCount() string { + if o == nil || common.IsNil(o.Count) { + var ret string + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mandate) GetCountOk() (*string, bool) { + if o == nil || common.IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Mandate) HasCount() bool { + if o != nil && !common.IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given string and assigns it to the Count field. +func (o *Mandate) SetCount(v string) { + o.Count = &v +} + // GetEndsAt returns the EndsAt field value func (o *Mandate) GetEndsAt() string { if o == nil { @@ -309,6 +343,9 @@ func (o Mandate) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.BillingDay) { toSerialize["billingDay"] = o.BillingDay } + if !common.IsNil(o.Count) { + toSerialize["count"] = o.Count + } toSerialize["endsAt"] = o.EndsAt toSerialize["frequency"] = o.Frequency if !common.IsNil(o.Remarks) { diff --git a/src/payments/model_split.go b/src/payments/model_split.go index e42b66a6a..1e9c14b21 100644 --- a/src/payments/model_split.go +++ b/src/payments/model_split.go @@ -26,7 +26,7 @@ type Split struct { Description *string `json:"description,omitempty"` // Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). 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 part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **Marketplace**, **PaymentFee**, **VAT**. + // The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. Type string `json:"type"` } diff --git a/src/payout/api_initialization.go b/src/payout/api_initialization.go index 6781e2f28..8b53f2155 100644 --- a/src/payout/api_initialization.go +++ b/src/payout/api_initialization.go @@ -41,6 +41,13 @@ func (a *InitializationApi) StoreDetailInput() InitializationApiStoreDetailInput /* StoreDetail Store payout details +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the [Transfers API](https://docs.adyen.com/api-explorer/transfers/latest/overview) instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + Stores payment details under the `PAYOUT` recurring contract. These payment details can be used later to submit a payout via the `/submitThirdParty` call. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -88,6 +95,13 @@ func (a *InitializationApi) StoreDetailAndSubmitThirdPartyInput() Initialization /* StoreDetailAndSubmitThirdParty Store details and submit a payout +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) endpoint instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + Submits a payout and stores its details for subsequent payouts. The submitted payout must be confirmed or declined either by a reviewer or via `/confirmThirdParty` or `/declineThirdParty` calls. @@ -137,6 +151,13 @@ func (a *InitializationApi) SubmitThirdPartyInput() InitializationApiSubmitThird /* SubmitThirdParty Submit a payout +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) endpoint instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + Submits a payout using the previously stored payment details. To store payment details, use the `/storeDetail` API call. The submitted payout must be confirmed or declined either by a reviewer or via `/confirmThirdParty` or `/declineThirdParty` calls. diff --git a/src/payout/api_instant_payouts.go b/src/payout/api_instant_payouts.go index 6f60c4636..b073eef94 100644 --- a/src/payout/api_instant_payouts.go +++ b/src/payout/api_instant_payouts.go @@ -41,6 +41,13 @@ func (a *InstantPayoutsApi) PayoutInput() InstantPayoutsApiPayoutInput { /* Payout Make an instant card payout +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) endpoint instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + With this call, you can pay out to your customers, and funds will be made available within 30 minutes on the cardholder's bank account (this is dependent on whether the issuer supports this functionality). Instant card payouts are only supported for Visa and Mastercard cards. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). diff --git a/src/payout/api_reviewing.go b/src/payout/api_reviewing.go index 126a1ceb4..8c029ca00 100644 --- a/src/payout/api_reviewing.go +++ b/src/payout/api_reviewing.go @@ -41,6 +41,13 @@ func (a *ReviewingApi) ConfirmThirdPartyInput() ReviewingApiConfirmThirdPartyInp /* ConfirmThirdParty Confirm a payout +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the [Transfers API](https://docs.adyen.com/api-explorer/transfers/latest/overview) instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + Confirms a previously submitted payout. To cancel a payout, use the `/declineThirdParty` endpoint. @@ -90,6 +97,13 @@ func (a *ReviewingApi) DeclineThirdPartyInput() ReviewingApiDeclineThirdPartyInp /* DeclineThirdParty Cancel a payout +> This endpoint is **deprecated** and no longer supports new integrations. If you are: +>- Building a new integration, use the [Transfers API](https://docs.adyen.com/api-explorer/transfers/latest/overview) instead. +> - Already using the Payout API, reach out to your Adyen contact to learn how to migrate to the Transfers API. +> +> For more information about the payout features of the Transfers API, see our [Payouts](https://docs.adyen.com/payouts/payout-service) documentation. + + Cancels a previously submitted payout. To confirm and send a payout, use the `/confirmThirdParty` endpoint.