diff --git a/src/checkout/model_card_details.go b/src/checkout/model_card_details.go index 3692c0f2b..8c9bf0747 100644 --- a/src/checkout/model_card_details.go +++ b/src/checkout/model_card_details.go @@ -52,6 +52,12 @@ type CardDetails struct { RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` // The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. ShopperNotificationReference *string `json:"shopperNotificationReference,omitempty"` + // An identifier used for the Click to Pay transaction. + SrcCorrelationId *string `json:"srcCorrelationId,omitempty"` + // The scheme that is being used for Click to Pay. + SrcScheme *string `json:"srcScheme,omitempty"` + // The reference for the Click to Pay token. + SrcTokenReference *string `json:"srcTokenReference,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` // Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. @@ -599,6 +605,102 @@ func (o *CardDetails) SetShopperNotificationReference(v string) { o.ShopperNotificationReference = &v } +// GetSrcCorrelationId returns the SrcCorrelationId field value if set, zero value otherwise. +func (o *CardDetails) GetSrcCorrelationId() string { + if o == nil || common.IsNil(o.SrcCorrelationId) { + var ret string + return ret + } + return *o.SrcCorrelationId +} + +// GetSrcCorrelationIdOk returns a tuple with the SrcCorrelationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetails) GetSrcCorrelationIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcCorrelationId) { + return nil, false + } + return o.SrcCorrelationId, true +} + +// HasSrcCorrelationId returns a boolean if a field has been set. +func (o *CardDetails) HasSrcCorrelationId() bool { + if o != nil && !common.IsNil(o.SrcCorrelationId) { + return true + } + + return false +} + +// SetSrcCorrelationId gets a reference to the given string and assigns it to the SrcCorrelationId field. +func (o *CardDetails) SetSrcCorrelationId(v string) { + o.SrcCorrelationId = &v +} + +// GetSrcScheme returns the SrcScheme field value if set, zero value otherwise. +func (o *CardDetails) GetSrcScheme() string { + if o == nil || common.IsNil(o.SrcScheme) { + var ret string + return ret + } + return *o.SrcScheme +} + +// GetSrcSchemeOk returns a tuple with the SrcScheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetails) GetSrcSchemeOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcScheme) { + return nil, false + } + return o.SrcScheme, true +} + +// HasSrcScheme returns a boolean if a field has been set. +func (o *CardDetails) HasSrcScheme() bool { + if o != nil && !common.IsNil(o.SrcScheme) { + return true + } + + return false +} + +// SetSrcScheme gets a reference to the given string and assigns it to the SrcScheme field. +func (o *CardDetails) SetSrcScheme(v string) { + o.SrcScheme = &v +} + +// GetSrcTokenReference returns the SrcTokenReference field value if set, zero value otherwise. +func (o *CardDetails) GetSrcTokenReference() string { + if o == nil || common.IsNil(o.SrcTokenReference) { + var ret string + return ret + } + return *o.SrcTokenReference +} + +// GetSrcTokenReferenceOk returns a tuple with the SrcTokenReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDetails) GetSrcTokenReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcTokenReference) { + return nil, false + } + return o.SrcTokenReference, true +} + +// HasSrcTokenReference returns a boolean if a field has been set. +func (o *CardDetails) HasSrcTokenReference() bool { + if o != nil && !common.IsNil(o.SrcTokenReference) { + return true + } + + return false +} + +// SetSrcTokenReference gets a reference to the given string and assigns it to the SrcTokenReference field. +func (o *CardDetails) SetSrcTokenReference(v string) { + o.SrcTokenReference = &v +} + // GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. func (o *CardDetails) GetStoredPaymentMethodId() string { if o == nil || common.IsNil(o.StoredPaymentMethodId) { @@ -753,6 +855,15 @@ func (o CardDetails) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ShopperNotificationReference) { toSerialize["shopperNotificationReference"] = o.ShopperNotificationReference } + if !common.IsNil(o.SrcCorrelationId) { + toSerialize["srcCorrelationId"] = o.SrcCorrelationId + } + if !common.IsNil(o.SrcScheme) { + toSerialize["srcScheme"] = o.SrcScheme + } + if !common.IsNil(o.SrcTokenReference) { + toSerialize["srcTokenReference"] = o.SrcTokenReference + } if !common.IsNil(o.StoredPaymentMethodId) { toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId } diff --git a/src/checkout/model_card_donations.go b/src/checkout/model_card_donations.go index 09c63bc62..37e8961ce 100644 --- a/src/checkout/model_card_donations.go +++ b/src/checkout/model_card_donations.go @@ -52,6 +52,12 @@ type CardDonations struct { RecurringDetailReference *string `json:"recurringDetailReference,omitempty"` // The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. ShopperNotificationReference *string `json:"shopperNotificationReference,omitempty"` + // An identifier used for the Click to Pay transaction. + SrcCorrelationId *string `json:"srcCorrelationId,omitempty"` + // The scheme that is being used for Click to Pay. + SrcScheme *string `json:"srcScheme,omitempty"` + // The reference for the Click to Pay token. + SrcTokenReference *string `json:"srcTokenReference,omitempty"` // This is the `recurringDetailReference` returned in the response when you created the token. StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"` // Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. @@ -599,6 +605,102 @@ func (o *CardDonations) SetShopperNotificationReference(v string) { o.ShopperNotificationReference = &v } +// GetSrcCorrelationId returns the SrcCorrelationId field value if set, zero value otherwise. +func (o *CardDonations) GetSrcCorrelationId() string { + if o == nil || common.IsNil(o.SrcCorrelationId) { + var ret string + return ret + } + return *o.SrcCorrelationId +} + +// GetSrcCorrelationIdOk returns a tuple with the SrcCorrelationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDonations) GetSrcCorrelationIdOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcCorrelationId) { + return nil, false + } + return o.SrcCorrelationId, true +} + +// HasSrcCorrelationId returns a boolean if a field has been set. +func (o *CardDonations) HasSrcCorrelationId() bool { + if o != nil && !common.IsNil(o.SrcCorrelationId) { + return true + } + + return false +} + +// SetSrcCorrelationId gets a reference to the given string and assigns it to the SrcCorrelationId field. +func (o *CardDonations) SetSrcCorrelationId(v string) { + o.SrcCorrelationId = &v +} + +// GetSrcScheme returns the SrcScheme field value if set, zero value otherwise. +func (o *CardDonations) GetSrcScheme() string { + if o == nil || common.IsNil(o.SrcScheme) { + var ret string + return ret + } + return *o.SrcScheme +} + +// GetSrcSchemeOk returns a tuple with the SrcScheme field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDonations) GetSrcSchemeOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcScheme) { + return nil, false + } + return o.SrcScheme, true +} + +// HasSrcScheme returns a boolean if a field has been set. +func (o *CardDonations) HasSrcScheme() bool { + if o != nil && !common.IsNil(o.SrcScheme) { + return true + } + + return false +} + +// SetSrcScheme gets a reference to the given string and assigns it to the SrcScheme field. +func (o *CardDonations) SetSrcScheme(v string) { + o.SrcScheme = &v +} + +// GetSrcTokenReference returns the SrcTokenReference field value if set, zero value otherwise. +func (o *CardDonations) GetSrcTokenReference() string { + if o == nil || common.IsNil(o.SrcTokenReference) { + var ret string + return ret + } + return *o.SrcTokenReference +} + +// GetSrcTokenReferenceOk returns a tuple with the SrcTokenReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CardDonations) GetSrcTokenReferenceOk() (*string, bool) { + if o == nil || common.IsNil(o.SrcTokenReference) { + return nil, false + } + return o.SrcTokenReference, true +} + +// HasSrcTokenReference returns a boolean if a field has been set. +func (o *CardDonations) HasSrcTokenReference() bool { + if o != nil && !common.IsNil(o.SrcTokenReference) { + return true + } + + return false +} + +// SetSrcTokenReference gets a reference to the given string and assigns it to the SrcTokenReference field. +func (o *CardDonations) SetSrcTokenReference(v string) { + o.SrcTokenReference = &v +} + // GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise. func (o *CardDonations) GetStoredPaymentMethodId() string { if o == nil || common.IsNil(o.StoredPaymentMethodId) { @@ -753,6 +855,15 @@ func (o CardDonations) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.ShopperNotificationReference) { toSerialize["shopperNotificationReference"] = o.ShopperNotificationReference } + if !common.IsNil(o.SrcCorrelationId) { + toSerialize["srcCorrelationId"] = o.SrcCorrelationId + } + if !common.IsNil(o.SrcScheme) { + toSerialize["srcScheme"] = o.SrcScheme + } + if !common.IsNil(o.SrcTokenReference) { + toSerialize["srcTokenReference"] = o.SrcTokenReference + } if !common.IsNil(o.StoredPaymentMethodId) { toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId } diff --git a/src/checkout/model_create_checkout_session_request.go b/src/checkout/model_create_checkout_session_request.go index 73ea29d8f..73050620e 100644 --- a/src/checkout/model_create_checkout_session_request.go +++ b/src/checkout/model_create_checkout_session_request.go @@ -44,11 +44,11 @@ type CreateCheckoutSessionRequest struct { // The date and time when the purchased goods should be delivered. [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**. DeliverAt *time.Time `json:"deliverAt,omitempty"` DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` - // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). EnableOneClick *bool `json:"enableOneClick,omitempty"` // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. EnablePayOut *bool `json:"enablePayOut,omitempty"` - // When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + // When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. EnableRecurring *bool `json:"enableRecurring,omitempty"` // The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. ExpiresAt *time.Time `json:"expiresAt,omitempty"` @@ -111,7 +111,7 @@ type CreateCheckoutSessionRequest struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. + // When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` diff --git a/src/checkout/model_create_checkout_session_response.go b/src/checkout/model_create_checkout_session_response.go index 6d08ef99d..7d0fae622 100644 --- a/src/checkout/model_create_checkout_session_response.go +++ b/src/checkout/model_create_checkout_session_response.go @@ -44,11 +44,11 @@ type CreateCheckoutSessionResponse struct { // The date and time when the purchased goods should be delivered. [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**. DeliverAt *time.Time `json:"deliverAt,omitempty"` DeliveryAddress *DeliveryAddress `json:"deliveryAddress,omitempty"` - // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). EnableOneClick *bool `json:"enableOneClick,omitempty"` // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. EnablePayOut *bool `json:"enablePayOut,omitempty"` - // When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + // When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. EnableRecurring *bool `json:"enableRecurring,omitempty"` // The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. ExpiresAt time.Time `json:"expiresAt"` @@ -115,7 +115,7 @@ type CreateCheckoutSessionResponse struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // When this is set to **true** and the `shopperReference` is provided, the payment details will be stored. + // When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. StorePaymentMethodMode *string `json:"storePaymentMethodMode,omitempty"` diff --git a/src/checkout/model_payment_request.go b/src/checkout/model_payment_request.go index 3861c50fa..85dbae549 100644 --- a/src/checkout/model_payment_request.go +++ b/src/checkout/model_payment_request.go @@ -52,11 +52,11 @@ type PaymentRequest struct { DeliveryDate *time.Time `json:"deliveryDate,omitempty"` // A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). DeviceFingerprint *string `json:"deviceFingerprint,omitempty"` - // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future one-click payments. + // When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). EnableOneClick *bool `json:"enableOneClick,omitempty"` // When true and `shopperReference` is provided, the payment details will be tokenized for payouts. EnablePayOut *bool `json:"enablePayOut,omitempty"` - // When true and `shopperReference` is provided, the payment details will be tokenized for recurring payments. + // When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. EnableRecurring *bool `json:"enableRecurring,omitempty"` // The type of the entity the payment is processed for. EntityType *string `json:"entityType,omitempty"` @@ -125,7 +125,7 @@ type PaymentRequest struct { Splits []Split `json:"splits,omitempty"` // Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. Store *string `json:"store,omitempty"` - // When true and `shopperReference` is provided, the payment details will be stored. + // When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). StorePaymentMethod *bool `json:"storePaymentMethod,omitempty"` // The shopper's telephone number. TelephoneNumber *string `json:"telephoneNumber,omitempty"` diff --git a/src/legalentity/model_legal_entity_association.go b/src/legalentity/model_legal_entity_association.go index 4baae0bb9..e0096ae61 100644 --- a/src/legalentity/model_legal_entity_association.go +++ b/src/legalentity/model_legal_entity_association.go @@ -329,7 +329,7 @@ func (v *NullableLegalEntityAssociation) UnmarshalJSON(src []byte) error { } func (o *LegalEntityAssociation) isValidType() bool { - var allowedEnumValues = []string{"definedBeneficiary", "director", "pciSignatory", "protector", "secondaryTrustee", "settlor", "signatory", "soleProprietorship", "trust", "trustOwnership", "uboThroughControl", "uboThroughOwnership", "ultimateParentCompany", "undefinedBeneficiary"} + var allowedEnumValues = []string{"definedBeneficiary", "director", "immediateParentCompany", "pciSignatory", "protector", "secondaryTrustee", "settlor", "signatory", "soleProprietorship", "trust", "trustOwnership", "uboThroughControl", "uboThroughOwnership", "ultimateParentCompany", "undefinedBeneficiary"} for _, allowed := range allowedEnumValues { if o.GetType() == allowed { return true diff --git a/src/legalentity/model_tax_reporting_classification.go b/src/legalentity/model_tax_reporting_classification.go index 13dc8c102..ee2e4a780 100644 --- a/src/legalentity/model_tax_reporting_classification.go +++ b/src/legalentity/model_tax_reporting_classification.go @@ -23,7 +23,7 @@ type TaxReportingClassification struct { BusinessType *string `json:"businessType,omitempty"` // The Global Intermediary Identification Number (GIIN) required for FATCA. Only required if the organization is a US financial institution and the `businessType` is **financialInstitution**. FinancialInstitutionNumber *string `json:"financialInstitutionNumber,omitempty"` - // The organization's main source of income. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. + // The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. MainSourceOfIncome *string `json:"mainSourceOfIncome,omitempty"` // The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**. Type *string `json:"type,omitempty"` diff --git a/src/management/api_android_files_company_level.go b/src/management/api_android_files_company_level.go index 17c0202f9..5eb39b718 100644 --- a/src/management/api_android_files_company_level.go +++ b/src/management/api_android_files_company_level.go @@ -387,6 +387,104 @@ func (a *AndroidFilesCompanyLevelApi) ListAndroidCertificates(ctx context.Contex return *res, httpRes, err } +// All parameters accepted by AndroidFilesCompanyLevelApi.ReprocessAndroidApp +type AndroidFilesCompanyLevelApiReprocessAndroidAppInput struct { + companyId string + id string +} + +/* +Prepare a request for ReprocessAndroidApp +@param companyId The unique identifier of the company account.@param id The unique identifier of the app. +@return AndroidFilesCompanyLevelApiReprocessAndroidAppInput +*/ +func (a *AndroidFilesCompanyLevelApi) ReprocessAndroidAppInput(companyId string, id string) AndroidFilesCompanyLevelApiReprocessAndroidAppInput { + return AndroidFilesCompanyLevelApiReprocessAndroidAppInput{ + companyId: companyId, + id: id, + } +} + +/* +ReprocessAndroidApp Reprocess Android App + +Reuploads the Android app identified in the path. +To make this request, your API credential must have this [role](https://docs.adyen.com/development-resources/api-credentials#api-permissions): +* Management API—Android files read and write + +>By choosing to upload, install, or run any third-party applications on an Adyen payment terminal, you accept full responsibility and liability for any consequences of uploading, installing, or running any such applications. + +@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@param r AndroidFilesCompanyLevelApiReprocessAndroidAppInput - Request parameters, see ReprocessAndroidAppInput +@return ReprocessAndroidAppResponse, *http.Response, error +*/ +func (a *AndroidFilesCompanyLevelApi) ReprocessAndroidApp(ctx context.Context, r AndroidFilesCompanyLevelApiReprocessAndroidAppInput) (ReprocessAndroidAppResponse, *http.Response, error) { + res := &ReprocessAndroidAppResponse{} + path := "/companies/{companyId}/androidApps/{id}" + path = strings.Replace(path, "{"+"companyId"+"}", url.PathEscape(common.ParameterValueToString(r.companyId, "companyId")), -1) + path = strings.Replace(path, "{"+"id"+"}", url.PathEscape(common.ParameterValueToString(r.id, "id")), -1) + queryParams := url.Values{} + headerParams := make(map[string]string) + httpRes, err := common.SendAPIRequest( + ctx, + a.Client, + nil, + res, + http.MethodPatch, + a.BasePath()+path, + queryParams, + headerParams, + ) + + if httpRes == nil { + return *res, httpRes, err + } + + var serviceError common.RestServiceError + if httpRes.StatusCode == 400 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 401 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 403 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 422 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + if httpRes.StatusCode == 500 { + body, _ := ioutil.ReadAll(httpRes.Body) + decodeError := json.Unmarshal([]byte(body), &serviceError) + if decodeError != nil { + return *res, httpRes, decodeError + } + return *res, httpRes, serviceError + } + + return *res, httpRes, err +} + // All parameters accepted by AndroidFilesCompanyLevelApi.UploadAndroidApp type AndroidFilesCompanyLevelApiUploadAndroidAppInput struct { companyId string diff --git a/src/management/model_payment_method.go b/src/management/model_payment_method.go index 92c781f25..17b74367f 100644 --- a/src/management/model_payment_method.go +++ b/src/management/model_payment_method.go @@ -69,6 +69,8 @@ type PaymentMethod struct { VerificationStatus *string `json:"verificationStatus,omitempty"` Vipps *VippsInfo `json:"vipps,omitempty"` Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` + Wechatpay *WeChatPayInfo `json:"wechatpay,omitempty"` + WechatpayPos *WeChatPayPosInfo `json:"wechatpay_pos,omitempty"` } // NewPaymentMethod instantiates a new PaymentMethod object @@ -1297,6 +1299,70 @@ func (o *PaymentMethod) SetVisa(v GenericPmWithTdiInfo) { o.Visa = &v } +// GetWechatpay returns the Wechatpay field value if set, zero value otherwise. +func (o *PaymentMethod) GetWechatpay() WeChatPayInfo { + if o == nil || common.IsNil(o.Wechatpay) { + var ret WeChatPayInfo + return ret + } + return *o.Wechatpay +} + +// GetWechatpayOk returns a tuple with the Wechatpay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetWechatpayOk() (*WeChatPayInfo, bool) { + if o == nil || common.IsNil(o.Wechatpay) { + return nil, false + } + return o.Wechatpay, true +} + +// HasWechatpay returns a boolean if a field has been set. +func (o *PaymentMethod) HasWechatpay() bool { + if o != nil && !common.IsNil(o.Wechatpay) { + return true + } + + return false +} + +// SetWechatpay gets a reference to the given WeChatPayInfo and assigns it to the Wechatpay field. +func (o *PaymentMethod) SetWechatpay(v WeChatPayInfo) { + o.Wechatpay = &v +} + +// GetWechatpayPos returns the WechatpayPos field value if set, zero value otherwise. +func (o *PaymentMethod) GetWechatpayPos() WeChatPayPosInfo { + if o == nil || common.IsNil(o.WechatpayPos) { + var ret WeChatPayPosInfo + return ret + } + return *o.WechatpayPos +} + +// GetWechatpayPosOk returns a tuple with the WechatpayPos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetWechatpayPosOk() (*WeChatPayPosInfo, bool) { + if o == nil || common.IsNil(o.WechatpayPos) { + return nil, false + } + return o.WechatpayPos, true +} + +// HasWechatpayPos returns a boolean if a field has been set. +func (o *PaymentMethod) HasWechatpayPos() bool { + if o != nil && !common.IsNil(o.WechatpayPos) { + return true + } + + return false +} + +// SetWechatpayPos gets a reference to the given WeChatPayPosInfo and assigns it to the WechatpayPos field. +func (o *PaymentMethod) SetWechatpayPos(v WeChatPayPosInfo) { + o.WechatpayPos = &v +} + func (o PaymentMethod) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -1419,6 +1485,12 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Visa) { toSerialize["visa"] = o.Visa } + if !common.IsNil(o.Wechatpay) { + toSerialize["wechatpay"] = o.Wechatpay + } + if !common.IsNil(o.WechatpayPos) { + toSerialize["wechatpay_pos"] = o.WechatpayPos + } return toSerialize, nil } diff --git a/src/management/model_payment_method_setup_info.go b/src/management/model_payment_method_setup_info.go index 7f4cec539..5483be45f 100644 --- a/src/management/model_payment_method_setup_info.go +++ b/src/management/model_payment_method_setup_info.go @@ -58,9 +58,11 @@ type PaymentMethodSetupInfo struct { Swish *SwishInfo `json:"swish,omitempty"` Twint *TwintInfo `json:"twint,omitempty"` // Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - Type string `json:"type"` - Vipps *VippsInfo `json:"vipps,omitempty"` - Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` + Type string `json:"type"` + Vipps *VippsInfo `json:"vipps,omitempty"` + Visa *GenericPmWithTdiInfo `json:"visa,omitempty"` + Wechatpay *WeChatPayInfo `json:"wechatpay,omitempty"` + WechatpayPos *WeChatPayPosInfo `json:"wechatpay_pos,omitempty"` } // NewPaymentMethodSetupInfo instantiates a new PaymentMethodSetupInfo object @@ -1161,6 +1163,70 @@ func (o *PaymentMethodSetupInfo) SetVisa(v GenericPmWithTdiInfo) { o.Visa = &v } +// GetWechatpay returns the Wechatpay field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetWechatpay() WeChatPayInfo { + if o == nil || common.IsNil(o.Wechatpay) { + var ret WeChatPayInfo + return ret + } + return *o.Wechatpay +} + +// GetWechatpayOk returns a tuple with the Wechatpay field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetWechatpayOk() (*WeChatPayInfo, bool) { + if o == nil || common.IsNil(o.Wechatpay) { + return nil, false + } + return o.Wechatpay, true +} + +// HasWechatpay returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasWechatpay() bool { + if o != nil && !common.IsNil(o.Wechatpay) { + return true + } + + return false +} + +// SetWechatpay gets a reference to the given WeChatPayInfo and assigns it to the Wechatpay field. +func (o *PaymentMethodSetupInfo) SetWechatpay(v WeChatPayInfo) { + o.Wechatpay = &v +} + +// GetWechatpayPos returns the WechatpayPos field value if set, zero value otherwise. +func (o *PaymentMethodSetupInfo) GetWechatpayPos() WeChatPayPosInfo { + if o == nil || common.IsNil(o.WechatpayPos) { + var ret WeChatPayPosInfo + return ret + } + return *o.WechatpayPos +} + +// GetWechatpayPosOk returns a tuple with the WechatpayPos field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodSetupInfo) GetWechatpayPosOk() (*WeChatPayPosInfo, bool) { + if o == nil || common.IsNil(o.WechatpayPos) { + return nil, false + } + return o.WechatpayPos, true +} + +// HasWechatpayPos returns a boolean if a field has been set. +func (o *PaymentMethodSetupInfo) HasWechatpayPos() bool { + if o != nil && !common.IsNil(o.WechatpayPos) { + return true + } + + return false +} + +// SetWechatpayPos gets a reference to the given WeChatPayPosInfo and assigns it to the WechatpayPos field. +func (o *PaymentMethodSetupInfo) SetWechatpayPos(v WeChatPayPosInfo) { + o.WechatpayPos = &v +} + func (o PaymentMethodSetupInfo) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -1271,6 +1337,12 @@ func (o PaymentMethodSetupInfo) ToMap() (map[string]interface{}, error) { if !common.IsNil(o.Visa) { toSerialize["visa"] = o.Visa } + if !common.IsNil(o.Wechatpay) { + toSerialize["wechatpay"] = o.Wechatpay + } + if !common.IsNil(o.WechatpayPos) { + toSerialize["wechatpay_pos"] = o.WechatpayPos + } return toSerialize, nil } diff --git a/src/management/model_reprocess_android_app_response.go b/src/management/model_reprocess_android_app_response.go new file mode 100644 index 000000000..f4ef1fe2e --- /dev/null +++ b/src/management/model_reprocess_android_app_response.go @@ -0,0 +1,125 @@ +/* +Management API + +API version: 3 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package management + +import ( + "encoding/json" + + "github.com/adyen/adyen-go-api-library/v9/src/common" +) + +// checks if the ReprocessAndroidAppResponse type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &ReprocessAndroidAppResponse{} + +// ReprocessAndroidAppResponse struct for ReprocessAndroidAppResponse +type ReprocessAndroidAppResponse struct { + // The result of the reprocess. + Message *string `json:"Message,omitempty"` +} + +// NewReprocessAndroidAppResponse instantiates a new ReprocessAndroidAppResponse 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 NewReprocessAndroidAppResponse() *ReprocessAndroidAppResponse { + this := ReprocessAndroidAppResponse{} + return &this +} + +// NewReprocessAndroidAppResponseWithDefaults instantiates a new ReprocessAndroidAppResponse 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 NewReprocessAndroidAppResponseWithDefaults() *ReprocessAndroidAppResponse { + this := ReprocessAndroidAppResponse{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ReprocessAndroidAppResponse) GetMessage() string { + if o == nil || common.IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReprocessAndroidAppResponse) GetMessageOk() (*string, bool) { + if o == nil || common.IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ReprocessAndroidAppResponse) HasMessage() bool { + if o != nil && !common.IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ReprocessAndroidAppResponse) SetMessage(v string) { + o.Message = &v +} + +func (o ReprocessAndroidAppResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReprocessAndroidAppResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !common.IsNil(o.Message) { + toSerialize["Message"] = o.Message + } + return toSerialize, nil +} + +type NullableReprocessAndroidAppResponse struct { + value *ReprocessAndroidAppResponse + isSet bool +} + +func (v NullableReprocessAndroidAppResponse) Get() *ReprocessAndroidAppResponse { + return v.value +} + +func (v *NullableReprocessAndroidAppResponse) Set(val *ReprocessAndroidAppResponse) { + v.value = val + v.isSet = true +} + +func (v NullableReprocessAndroidAppResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableReprocessAndroidAppResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReprocessAndroidAppResponse(val *ReprocessAndroidAppResponse) *NullableReprocessAndroidAppResponse { + return &NullableReprocessAndroidAppResponse{value: val, isSet: true} +} + +func (v NullableReprocessAndroidAppResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReprocessAndroidAppResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_we_chat_pay_info.go b/src/management/model_we_chat_pay_info.go new file mode 100644 index 000000000..38cd851a4 --- /dev/null +++ b/src/management/model_we_chat_pay_info.go @@ -0,0 +1,144 @@ +/* +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/v9/src/common" +) + +// checks if the WeChatPayInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &WeChatPayInfo{} + +// WeChatPayInfo struct for WeChatPayInfo +type WeChatPayInfo struct { + // The name of the contact person from merchant support. + ContactPersonName string `json:"contactPersonName"` + // The email address of merchant support. + Email string `json:"email"` +} + +// NewWeChatPayInfo instantiates a new WeChatPayInfo 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 NewWeChatPayInfo(contactPersonName string, email string) *WeChatPayInfo { + this := WeChatPayInfo{} + this.ContactPersonName = contactPersonName + this.Email = email + return &this +} + +// NewWeChatPayInfoWithDefaults instantiates a new WeChatPayInfo 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 NewWeChatPayInfoWithDefaults() *WeChatPayInfo { + this := WeChatPayInfo{} + return &this +} + +// GetContactPersonName returns the ContactPersonName field value +func (o *WeChatPayInfo) GetContactPersonName() string { + if o == nil { + var ret string + return ret + } + + return o.ContactPersonName +} + +// GetContactPersonNameOk returns a tuple with the ContactPersonName field value +// and a boolean to check if the value has been set. +func (o *WeChatPayInfo) GetContactPersonNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContactPersonName, true +} + +// SetContactPersonName sets field value +func (o *WeChatPayInfo) SetContactPersonName(v string) { + o.ContactPersonName = v +} + +// GetEmail returns the Email field value +func (o *WeChatPayInfo) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *WeChatPayInfo) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *WeChatPayInfo) SetEmail(v string) { + o.Email = v +} + +func (o WeChatPayInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WeChatPayInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contactPersonName"] = o.ContactPersonName + toSerialize["email"] = o.Email + return toSerialize, nil +} + +type NullableWeChatPayInfo struct { + value *WeChatPayInfo + isSet bool +} + +func (v NullableWeChatPayInfo) Get() *WeChatPayInfo { + return v.value +} + +func (v *NullableWeChatPayInfo) Set(val *WeChatPayInfo) { + v.value = val + v.isSet = true +} + +func (v NullableWeChatPayInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableWeChatPayInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWeChatPayInfo(val *WeChatPayInfo) *NullableWeChatPayInfo { + return &NullableWeChatPayInfo{value: val, isSet: true} +} + +func (v NullableWeChatPayInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWeChatPayInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/management/model_we_chat_pay_pos_info.go b/src/management/model_we_chat_pay_pos_info.go new file mode 100644 index 000000000..8d8ed52f6 --- /dev/null +++ b/src/management/model_we_chat_pay_pos_info.go @@ -0,0 +1,144 @@ +/* +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/v9/src/common" +) + +// checks if the WeChatPayPosInfo type satisfies the MappedNullable interface at compile time +var _ common.MappedNullable = &WeChatPayPosInfo{} + +// WeChatPayPosInfo struct for WeChatPayPosInfo +type WeChatPayPosInfo struct { + // The name of the contact person from merchant support. + ContactPersonName string `json:"contactPersonName"` + // The email address of merchant support. + Email string `json:"email"` +} + +// NewWeChatPayPosInfo instantiates a new WeChatPayPosInfo 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 NewWeChatPayPosInfo(contactPersonName string, email string) *WeChatPayPosInfo { + this := WeChatPayPosInfo{} + this.ContactPersonName = contactPersonName + this.Email = email + return &this +} + +// NewWeChatPayPosInfoWithDefaults instantiates a new WeChatPayPosInfo 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 NewWeChatPayPosInfoWithDefaults() *WeChatPayPosInfo { + this := WeChatPayPosInfo{} + return &this +} + +// GetContactPersonName returns the ContactPersonName field value +func (o *WeChatPayPosInfo) GetContactPersonName() string { + if o == nil { + var ret string + return ret + } + + return o.ContactPersonName +} + +// GetContactPersonNameOk returns a tuple with the ContactPersonName field value +// and a boolean to check if the value has been set. +func (o *WeChatPayPosInfo) GetContactPersonNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContactPersonName, true +} + +// SetContactPersonName sets field value +func (o *WeChatPayPosInfo) SetContactPersonName(v string) { + o.ContactPersonName = v +} + +// GetEmail returns the Email field value +func (o *WeChatPayPosInfo) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *WeChatPayPosInfo) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *WeChatPayPosInfo) SetEmail(v string) { + o.Email = v +} + +func (o WeChatPayPosInfo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WeChatPayPosInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contactPersonName"] = o.ContactPersonName + toSerialize["email"] = o.Email + return toSerialize, nil +} + +type NullableWeChatPayPosInfo struct { + value *WeChatPayPosInfo + isSet bool +} + +func (v NullableWeChatPayPosInfo) Get() *WeChatPayPosInfo { + return v.value +} + +func (v *NullableWeChatPayPosInfo) Set(val *WeChatPayPosInfo) { + v.value = val + v.isSet = true +} + +func (v NullableWeChatPayPosInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableWeChatPayPosInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWeChatPayPosInfo(val *WeChatPayPosInfo) *NullableWeChatPayPosInfo { + return &NullableWeChatPayPosInfo{value: val, isSet: true} +} + +func (v NullableWeChatPayPosInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWeChatPayPosInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/src/managementwebhook/model_account_notification_response.go b/src/managementwebhook/model_account_notification_response.go index 8277f06c0..ca6a08afc 100644 --- a/src/managementwebhook/model_account_notification_response.go +++ b/src/managementwebhook/model_account_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &AccountNotificationResponse{} // AccountNotificationResponse struct for AccountNotificationResponse type AccountNotificationResponse struct { - // Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_payment_method_notification_response.go b/src/managementwebhook/model_payment_method_notification_response.go index 89e625910..277282585 100644 --- a/src/managementwebhook/model_payment_method_notification_response.go +++ b/src/managementwebhook/model_payment_method_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &PaymentMethodNotificationResponse{} // PaymentMethodNotificationResponse struct for PaymentMethodNotificationResponse type PaymentMethodNotificationResponse struct { - // Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). NotificationResponse *string `json:"notificationResponse,omitempty"` } diff --git a/src/managementwebhook/model_terminal_settings_notification_response.go b/src/managementwebhook/model_terminal_settings_notification_response.go index 31bf99cb7..e782e1990 100644 --- a/src/managementwebhook/model_terminal_settings_notification_response.go +++ b/src/managementwebhook/model_terminal_settings_notification_response.go @@ -19,7 +19,7 @@ var _ common.MappedNullable = &TerminalSettingsNotificationResponse{} // TerminalSettingsNotificationResponse struct for TerminalSettingsNotificationResponse type TerminalSettingsNotificationResponse struct { - // Respond with **HTTP 200 OK** and `[accepted]` in the response body to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + // Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). NotificationResponse *string `json:"notificationResponse,omitempty"` }