From 9fa2728eb49f6861afd1c59bd9234776f9feab1b Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 31 Jul 2024 11:04:54 +0000 Subject: [PATCH] false[adyen-sdk-automation] automated change --- Adyen/Model/LegalEntityManagement/Document.cs | 18 +- .../GetTermsOfServiceDocumentRequest.cs | 21 +- .../GetTermsOfServiceDocumentResponse.cs | 21 +- .../IdentificationData.cs | 10 +- .../LegalEntityManagement/LegalEntity.cs | 6 +- .../LegalEntityAssociation.cs | 61 +++-- .../LegalEntityManagement/LegalEntityInfo.cs | 6 +- .../LegalEntityInfoRequiredType.cs | 6 +- .../OnboardingLinkSettings.cs | 75 +++-- .../LegalEntityManagement/Organization.cs | 21 +- .../PaymentsApp/AbstractOpenAPISchema.cs | 81 ++++++ .../Model/PaymentsApp/BoardingTokenRequest.cs | 134 +++++++++ .../PaymentsApp/BoardingTokenResponse.cs | 153 +++++++++++ .../PaymentsApp/DefaultErrorResponseEntity.cs | 259 ++++++++++++++++++ Adyen/Model/PaymentsApp/InvalidField.cs | 172 ++++++++++++ Adyen/Model/PaymentsApp/PaymentsAppDto.cs | 191 +++++++++++++ .../Model/PaymentsApp/PaymentsAppResponse.cs | 135 +++++++++ Adyen/Model/TransferWebhooks/TransferData.cs | 240 ++++++++-------- Adyen/Model/Transfers/Transfer.cs | 240 ++++++++-------- Adyen/Model/Transfers/TransferData.cs | 240 ++++++++-------- Adyen/Service/PaymentsAppService.cs | 216 +++++++++++++++ 21 files changed, 1857 insertions(+), 449 deletions(-) create mode 100644 Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs create mode 100644 Adyen/Model/PaymentsApp/BoardingTokenRequest.cs create mode 100644 Adyen/Model/PaymentsApp/BoardingTokenResponse.cs create mode 100644 Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs create mode 100644 Adyen/Model/PaymentsApp/InvalidField.cs create mode 100644 Adyen/Model/PaymentsApp/PaymentsAppDto.cs create mode 100644 Adyen/Model/PaymentsApp/PaymentsAppResponse.cs create mode 100644 Adyen/Service/PaymentsAppService.cs diff --git a/Adyen/Model/LegalEntityManagement/Document.cs b/Adyen/Model/LegalEntityManagement/Document.cs index bc1cec7d2..0a14d3276 100644 --- a/Adyen/Model/LegalEntityManagement/Document.cs +++ b/Adyen/Model/LegalEntityManagement/Document.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class Document : IEquatable, IValidatableObject { /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -145,15 +145,21 @@ public enum TypeEnum /// Enum ProofOfFundingOrWealthSource for value: proofOfFundingOrWealthSource /// [EnumMember(Value = "proofOfFundingOrWealthSource")] - ProofOfFundingOrWealthSource = 18 + ProofOfFundingOrWealthSource = 18, + + /// + /// Enum ProofOfRelationship for value: proofOfRelationship + /// + [EnumMember(Value = "proofOfRelationship")] + ProofOfRelationship = 19 } /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -173,7 +179,7 @@ protected Document() { } /// The state or province where the document was issued (AU only).. /// The number in the document.. /// owner. - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, or **proofOfFundingOrWealthSource**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). (required). + /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). (required). public Document(Attachment attachment = default(Attachment), List attachments = default(List), string description = default(string), string expiryDate = default(string), string fileName = default(string), string issuerCountry = default(string), string issuerState = default(string), string number = default(string), OwnerEntity owner = default(OwnerEntity), TypeEnum type = default(TypeEnum)) { this.Description = description; diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs index ea5636355..759a3a7a6 100644 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs +++ b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs @@ -105,11 +105,13 @@ protected GetTermsOfServiceDocumentRequest() { } /// Initializes a new instance of the class. /// /// 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. (required). + /// The requested format for the Terms of Service document. Default value: JSON. Possible values: JSON or PDF.. /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** (required). - public GetTermsOfServiceDocumentRequest(string language = default(string), TypeEnum type = default(TypeEnum)) + public GetTermsOfServiceDocumentRequest(string language = default(string), string termsOfServiceDocumentFormat = default(string), TypeEnum type = default(TypeEnum)) { this.Language = language; this.Type = type; + this.TermsOfServiceDocumentFormat = termsOfServiceDocumentFormat; } /// @@ -119,6 +121,13 @@ protected GetTermsOfServiceDocumentRequest() { } [DataMember(Name = "language", IsRequired = false, EmitDefaultValue = false)] public string Language { get; set; } + /// + /// 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 or PDF. + [DataMember(Name = "termsOfServiceDocumentFormat", EmitDefaultValue = false)] + public string TermsOfServiceDocumentFormat { get; set; } + /// /// Returns the string presentation of the object /// @@ -128,6 +137,7 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class GetTermsOfServiceDocumentRequest {\n"); sb.Append(" Language: ").Append(Language).Append("\n"); + sb.Append(" TermsOfServiceDocumentFormat: ").Append(TermsOfServiceDocumentFormat).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -169,6 +179,11 @@ public bool Equals(GetTermsOfServiceDocumentRequest input) (this.Language != null && this.Language.Equals(input.Language)) ) && + ( + this.TermsOfServiceDocumentFormat == input.TermsOfServiceDocumentFormat || + (this.TermsOfServiceDocumentFormat != null && + this.TermsOfServiceDocumentFormat.Equals(input.TermsOfServiceDocumentFormat)) + ) && ( this.Type == input.Type || this.Type.Equals(input.Type) @@ -188,6 +203,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Language.GetHashCode(); } + if (this.TermsOfServiceDocumentFormat != null) + { + hashCode = (hashCode * 59) + this.TermsOfServiceDocumentFormat.GetHashCode(); + } hashCode = (hashCode * 59) + this.Type.GetHashCode(); return hashCode; } diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs index 5ad27f010..aa7f9d7aa 100644 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs +++ b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs @@ -102,13 +102,15 @@ public enum TypeEnum /// The Terms of Service document in Base64-encoded format.. /// The unique identifier of the legal entity.. /// The language 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.. + /// The format of the Terms of Service document.. /// The unique identifier of the Terms of Service document.. /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** . - public GetTermsOfServiceDocumentResponse(byte[] document = default(byte[]), string id = default(string), string language = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) + public GetTermsOfServiceDocumentResponse(byte[] document = default(byte[]), string id = default(string), string language = default(string), string termsOfServiceDocumentFormat = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) { this.Document = document; this.Id = id; this.Language = language; + this.TermsOfServiceDocumentFormat = termsOfServiceDocumentFormat; this.TermsOfServiceDocumentId = termsOfServiceDocumentId; this.Type = type; } @@ -134,6 +136,13 @@ public enum TypeEnum [DataMember(Name = "language", EmitDefaultValue = false)] public string Language { get; set; } + /// + /// The format of the Terms of Service document. + /// + /// The format of the Terms of Service document. + [DataMember(Name = "termsOfServiceDocumentFormat", EmitDefaultValue = false)] + public string TermsOfServiceDocumentFormat { get; set; } + /// /// The unique identifier of the Terms of Service document. /// @@ -152,6 +161,7 @@ public override string ToString() sb.Append(" Document: ").Append(Document).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Language: ").Append(Language).Append("\n"); + sb.Append(" TermsOfServiceDocumentFormat: ").Append(TermsOfServiceDocumentFormat).Append("\n"); sb.Append(" TermsOfServiceDocumentId: ").Append(TermsOfServiceDocumentId).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -204,6 +214,11 @@ public bool Equals(GetTermsOfServiceDocumentResponse input) (this.Language != null && this.Language.Equals(input.Language)) ) && + ( + this.TermsOfServiceDocumentFormat == input.TermsOfServiceDocumentFormat || + (this.TermsOfServiceDocumentFormat != null && + this.TermsOfServiceDocumentFormat.Equals(input.TermsOfServiceDocumentFormat)) + ) && ( this.TermsOfServiceDocumentId == input.TermsOfServiceDocumentId || (this.TermsOfServiceDocumentId != null && @@ -236,6 +251,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Language.GetHashCode(); } + if (this.TermsOfServiceDocumentFormat != null) + { + hashCode = (hashCode * 59) + this.TermsOfServiceDocumentFormat.GetHashCode(); + } if (this.TermsOfServiceDocumentId != null) { hashCode = (hashCode * 59) + this.TermsOfServiceDocumentId.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/IdentificationData.cs b/Adyen/Model/LegalEntityManagement/IdentificationData.cs index 4940df4d2..aef357684 100644 --- a/Adyen/Model/LegalEntityManagement/IdentificationData.cs +++ b/Adyen/Model/LegalEntityManagement/IdentificationData.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class IdentificationData : IEquatable, IValidatableObject { /// - /// Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** + /// Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber /// - /// Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** + /// Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -67,9 +67,9 @@ public enum TypeEnum /// - /// Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** + /// Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber /// - /// Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** + /// Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -86,7 +86,7 @@ protected IdentificationData() { } /// The state or province where the document was issued (AU only).. /// Applies only to individuals in the US. Set to **true** if the individual does not have an SSN. To verify their identity, Adyen will require them to upload an ID document.. /// The number in the document.. - /// Type of identity data. For individuals, the `type` value is **nationalIdNumber**. For individuals in these countries, the following types are supported. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** (required). + /// Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber (required). public IdentificationData(string cardNumber = default(string), string expiryDate = default(string), string issuerCountry = default(string), string issuerState = default(string), bool? nationalIdExempt = default(bool?), string number = default(string), TypeEnum type = default(TypeEnum)) { this.Type = type; diff --git a/Adyen/Model/LegalEntityManagement/LegalEntity.cs b/Adyen/Model/LegalEntityManagement/LegalEntity.cs index 8623ef664..3ece2bf91 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntity.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntity.cs @@ -96,7 +96,7 @@ protected LegalEntity() { } /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).. + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. public LegalEntity(List documentDetails = default(List), List documents = default(List), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), List problems = default(List), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), string verificationPlan = default(string)) { this.DocumentDetails = documentDetails; @@ -201,9 +201,9 @@ protected LegalEntity() { } public List VerificationDeadlines { get; private set; } /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] public string VerificationPlan { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs b/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs index f8d892b5b..1cc75315d 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs @@ -33,9 +33,9 @@ namespace Adyen.Model.LegalEntityManagement public partial class LegalEntityAssociation : IEquatable, IValidatableObject { /// - /// Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. /// - /// Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. [JsonConverter(typeof(StringEnumConverter))] public enum TypeEnum { @@ -57,85 +57,91 @@ public enum TypeEnum [EnumMember(Value = "immediateParentCompany")] ImmediateParentCompany = 3, + /// + /// Enum LegalRepresentative for value: legalRepresentative + /// + [EnumMember(Value = "legalRepresentative")] + LegalRepresentative = 4, + /// /// Enum PciSignatory for value: pciSignatory /// [EnumMember(Value = "pciSignatory")] - PciSignatory = 4, + PciSignatory = 5, /// /// Enum Protector for value: protector /// [EnumMember(Value = "protector")] - Protector = 5, + Protector = 6, /// /// Enum SecondaryTrustee for value: secondaryTrustee /// [EnumMember(Value = "secondaryTrustee")] - SecondaryTrustee = 6, + SecondaryTrustee = 7, /// /// Enum Settlor for value: settlor /// [EnumMember(Value = "settlor")] - Settlor = 7, + Settlor = 8, /// /// Enum Signatory for value: signatory /// [EnumMember(Value = "signatory")] - Signatory = 8, + Signatory = 9, /// /// Enum SoleProprietorship for value: soleProprietorship /// [EnumMember(Value = "soleProprietorship")] - SoleProprietorship = 9, + SoleProprietorship = 10, /// /// Enum Trust for value: trust /// [EnumMember(Value = "trust")] - Trust = 10, + Trust = 11, /// /// Enum TrustOwnership for value: trustOwnership /// [EnumMember(Value = "trustOwnership")] - TrustOwnership = 11, + TrustOwnership = 12, /// /// Enum UboThroughControl for value: uboThroughControl /// [EnumMember(Value = "uboThroughControl")] - UboThroughControl = 12, + UboThroughControl = 13, /// /// Enum UboThroughOwnership for value: uboThroughOwnership /// [EnumMember(Value = "uboThroughOwnership")] - UboThroughOwnership = 13, + UboThroughOwnership = 14, /// /// Enum UltimateParentCompany for value: ultimateParentCompany /// [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 14, + UltimateParentCompany = 15, /// /// Enum UndefinedBeneficiary for value: undefinedBeneficiary /// [EnumMember(Value = "undefinedBeneficiary")] - UndefinedBeneficiary = 15 + UndefinedBeneficiary = 16 } /// - /// Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. /// - /// Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] public TypeEnum Type { get; set; } /// @@ -148,12 +154,14 @@ protected LegalEntityAssociation() { } /// /// The individual's job title if the `type` is **uboThroughControl** or **signatory**.. /// The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). (required). - /// Defines the relationship of the legal entity to the current legal entity. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust** Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. (required). - public LegalEntityAssociation(string jobTitle = default(string), string legalEntityId = default(string), TypeEnum type = default(TypeEnum)) + /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.. + /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. (required). + public LegalEntityAssociation(string jobTitle = default(string), string legalEntityId = default(string), string relationship = default(string), TypeEnum type = default(TypeEnum)) { this.LegalEntityId = legalEntityId; this.Type = type; this.JobTitle = jobTitle; + this.Relationship = relationship; } /// @@ -191,6 +199,13 @@ protected LegalEntityAssociation() { } [DataMember(Name = "name", EmitDefaultValue = false)] public string Name { get; private set; } + /// + /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. + /// + /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. + [DataMember(Name = "relationship", EmitDefaultValue = false)] + public string Relationship { get; set; } + /// /// Defines the Kyc Exemption Reason for a Settlor associated with a trust. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**. /// @@ -211,6 +226,7 @@ public override string ToString() sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Relationship: ").Append(Relationship).Append("\n"); sb.Append(" SettlorExemptionReason: ").Append(SettlorExemptionReason).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -273,6 +289,11 @@ public bool Equals(LegalEntityAssociation input) (this.Name != null && this.Name.Equals(input.Name)) ) && + ( + this.Relationship == input.Relationship || + (this.Relationship != null && + this.Relationship.Equals(input.Relationship)) + ) && ( this.SettlorExemptionReason == input.SettlorExemptionReason || this.SettlorExemptionReason != null && @@ -314,6 +335,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.Name.GetHashCode(); } + if (this.Relationship != null) + { + hashCode = (hashCode * 59) + this.Relationship.GetHashCode(); + } if (this.SettlorExemptionReason != null) { hashCode = (hashCode * 59) + this.SettlorExemptionReason.GetHashCode(); diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs index 86ad76901..9b4168eb4 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs @@ -88,7 +88,7 @@ public enum TypeEnum /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).. + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. public LegalEntityInfo(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), string verificationPlan = default(string)) { this.EntityAssociations = entityAssociations; @@ -147,9 +147,9 @@ public enum TypeEnum public Trust Trust { get; set; } /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] public string VerificationPlan { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs index 2c88c9a08..f2cd20779 100644 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs +++ b/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs @@ -93,7 +93,7 @@ protected LegalEntityInfoRequiredType() { } /// soleProprietorship. /// trust. /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. (required). - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront).. + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. public LegalEntityInfoRequiredType(List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum type = default(TypeEnum), string verificationPlan = default(string)) { this.Type = type; @@ -152,9 +152,9 @@ protected LegalEntityInfoRequiredType() { } public Trust Trust { get; set; } /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/onboard-users#upfront). + /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] public string VerificationPlan { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs b/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs index 8a80ffc98..fbe668e15 100644 --- a/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs +++ b/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs @@ -35,21 +35,21 @@ public partial class OnboardingLinkSettings : IEquatable /// /// Initializes a new instance of the class. /// - /// acceptedCountries. - /// allowBankAccountFormatSelection. - /// allowIntraRegionCrossBorderPayout. - /// changeLegalEntityType. - /// editPrefilledCountry. - /// hideOnboardingIntroductionIndividual. - /// hideOnboardingIntroductionOrganization. - /// hideOnboardingIntroductionSoleProprietor. - /// hideOnboardingIntroductionTrust. - /// instantBankVerification. - /// requirePciSignEcomMoto. - /// requirePciSignEcommerce. - /// requirePciSignPos. - /// requirePciSignPosMoto. - /// transferInstrumentLimit. + /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding).. + /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable).. + /// 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.. + /// Default value: **true** Indicates if the user can change their legal entity type.. + /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization.. + /// Default value: **false** Indicates if the user of the individual legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. + /// Default value: **false** Indicates if the user of the organization legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. + /// Default value: **false** Indicates if the user of the sole proprietorship legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. + /// Default value: **false** Indicates if the user of the trust legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. + /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink.. + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type.. + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type.. + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type.. + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type.. + /// The maximum number of transfer instruments the user can create.. public OnboardingLinkSettings(List acceptedCountries = default(List), bool? allowBankAccountFormatSelection = default(bool?), bool? allowIntraRegionCrossBorderPayout = default(bool?), bool? changeLegalEntityType = default(bool?), bool? editPrefilledCountry = default(bool?), bool? hideOnboardingIntroductionIndividual = default(bool?), bool? hideOnboardingIntroductionOrganization = default(bool?), bool? hideOnboardingIntroductionSoleProprietor = default(bool?), bool? hideOnboardingIntroductionTrust = default(bool?), bool? instantBankVerification = default(bool?), bool? requirePciSignEcomMoto = default(bool?), bool? requirePciSignEcommerce = default(bool?), bool? requirePciSignPos = default(bool?), bool? requirePciSignPosMoto = default(bool?), int? transferInstrumentLimit = default(int?)) { this.AcceptedCountries = acceptedCountries; @@ -70,92 +70,107 @@ public partial class OnboardingLinkSettings : IEquatable } /// - /// Gets or Sets AcceptedCountries + /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding). /// + /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding). [DataMember(Name = "acceptedCountries", EmitDefaultValue = false)] public List AcceptedCountries { get; set; } /// - /// Gets or Sets AllowBankAccountFormatSelection + /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable). /// + /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable). [DataMember(Name = "allowBankAccountFormatSelection", EmitDefaultValue = false)] public bool? AllowBankAccountFormatSelection { get; set; } /// - /// Gets or Sets AllowIntraRegionCrossBorderPayout + /// 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. /// + /// 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. [DataMember(Name = "allowIntraRegionCrossBorderPayout", EmitDefaultValue = false)] public bool? AllowIntraRegionCrossBorderPayout { get; set; } /// - /// Gets or Sets ChangeLegalEntityType + /// Default value: **true** Indicates if the user can change their legal entity type. /// + /// Default value: **true** Indicates if the user can change their legal entity type. [DataMember(Name = "changeLegalEntityType", EmitDefaultValue = false)] public bool? ChangeLegalEntityType { get; set; } /// - /// Gets or Sets EditPrefilledCountry + /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization. /// + /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization. [DataMember(Name = "editPrefilledCountry", EmitDefaultValue = false)] public bool? EditPrefilledCountry { get; set; } /// - /// Gets or Sets HideOnboardingIntroductionIndividual + /// Default value: **false** Indicates if the user of the individual legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. /// + /// Default value: **false** Indicates if the user of the individual legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. [DataMember(Name = "hideOnboardingIntroductionIndividual", EmitDefaultValue = false)] public bool? HideOnboardingIntroductionIndividual { get; set; } /// - /// Gets or Sets HideOnboardingIntroductionOrganization + /// Default value: **false** Indicates if the user of the organization legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. /// + /// Default value: **false** Indicates if the user of the organization legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. [DataMember(Name = "hideOnboardingIntroductionOrganization", EmitDefaultValue = false)] public bool? HideOnboardingIntroductionOrganization { get; set; } /// - /// Gets or Sets HideOnboardingIntroductionSoleProprietor + /// Default value: **false** Indicates if the user of the sole proprietorship legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. /// + /// Default value: **false** Indicates if the user of the sole proprietorship legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. [DataMember(Name = "hideOnboardingIntroductionSoleProprietor", EmitDefaultValue = false)] public bool? HideOnboardingIntroductionSoleProprietor { get; set; } /// - /// Gets or Sets HideOnboardingIntroductionTrust + /// Default value: **false** Indicates if the user of the trust legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. /// + /// Default value: **false** Indicates if the user of the trust legal entity type can view the introduction screen. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. [DataMember(Name = "hideOnboardingIntroductionTrust", EmitDefaultValue = false)] public bool? HideOnboardingIntroductionTrust { get; set; } /// - /// Gets or Sets InstantBankVerification + /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink. /// + /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink. [DataMember(Name = "instantBankVerification", EmitDefaultValue = false)] public bool? InstantBankVerification { get; set; } /// - /// Gets or Sets RequirePciSignEcomMoto + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type. /// + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type. [DataMember(Name = "requirePciSignEcomMoto", EmitDefaultValue = false)] public bool? RequirePciSignEcomMoto { get; set; } /// - /// Gets or Sets RequirePciSignEcommerce + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type. /// + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type. [DataMember(Name = "requirePciSignEcommerce", EmitDefaultValue = false)] public bool? RequirePciSignEcommerce { get; set; } /// - /// Gets or Sets RequirePciSignPos + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type. /// + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type. [DataMember(Name = "requirePciSignPos", EmitDefaultValue = false)] public bool? RequirePciSignPos { get; set; } /// - /// Gets or Sets RequirePciSignPosMoto + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type. /// + /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type. [DataMember(Name = "requirePciSignPosMoto", EmitDefaultValue = false)] public bool? RequirePciSignPosMoto { get; set; } /// - /// Gets or Sets TransferInstrumentLimit + /// The maximum number of transfer instruments the user can create. /// + /// The maximum number of transfer instruments the user can create. [DataMember(Name = "transferInstrumentLimit", EmitDefaultValue = false)] public int? TransferInstrumentLimit { get; set; } diff --git a/Adyen/Model/LegalEntityManagement/Organization.cs b/Adyen/Model/LegalEntityManagement/Organization.cs index b823dd8f4..94f16b4fe 100644 --- a/Adyen/Model/LegalEntityManagement/Organization.cs +++ b/Adyen/Model/LegalEntityManagement/Organization.cs @@ -120,6 +120,7 @@ protected Organization() { } /// /// Initializes a new instance of the class. /// + /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country.. /// The date when the organization was incorporated in YYYY-MM-DD format.. /// Your description for the organization.. /// The organization's trading name, if different from the registered legal name.. @@ -136,10 +137,11 @@ protected Organization() { } /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. /// The organization's VAT number.. /// webData. - public Organization(string dateOfIncorporation = default(string), string description = default(string), string doingBusinessAs = default(string), string email = default(string), string legalName = default(string), PhoneNumber phone = default(PhoneNumber), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), StockData stockData = default(StockData), List taxInformation = default(List), TaxReportingClassification taxReportingClassification = default(TaxReportingClassification), TypeEnum? type = default(TypeEnum?), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string), WebData webData = default(WebData)) + public Organization(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string description = default(string), string doingBusinessAs = default(string), string email = default(string), string legalName = default(string), PhoneNumber phone = default(PhoneNumber), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), StockData stockData = default(StockData), List taxInformation = default(List), TaxReportingClassification taxReportingClassification = default(TaxReportingClassification), TypeEnum? type = default(TypeEnum?), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string), WebData webData = default(WebData)) { this.LegalName = legalName; this.RegisteredAddress = registeredAddress; + this.CountryOfGoverningLaw = countryOfGoverningLaw; this.DateOfIncorporation = dateOfIncorporation; this.Description = description; this.DoingBusinessAs = doingBusinessAs; @@ -156,6 +158,13 @@ protected Organization() { } this.WebData = webData; } + /// + /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + /// + /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + [DataMember(Name = "countryOfGoverningLaw", EmitDefaultValue = false)] + public string CountryOfGoverningLaw { get; set; } + /// /// The date when the organization was incorporated in YYYY-MM-DD format. /// @@ -256,6 +265,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Organization {\n"); + sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); @@ -307,6 +317,11 @@ public bool Equals(Organization input) return false; } return + ( + this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || + (this.CountryOfGoverningLaw != null && + this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) + ) && ( this.DateOfIncorporation == input.DateOfIncorporation || (this.DateOfIncorporation != null && @@ -397,6 +412,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; + if (this.CountryOfGoverningLaw != null) + { + hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); + } if (this.DateOfIncorporation != null) { hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); diff --git a/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs b/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs new file mode 100644 index 000000000..2ea557709 --- /dev/null +++ b/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs @@ -0,0 +1,81 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// + public abstract partial class AbstractOpenAPISchema + { + /// + /// Custom JSON serializer + /// + static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); + + // Check if the contains TypeEnum value + protected static bool ContainsValue(string type) where T : struct, IConvertible + { + // Search for type in .TypeEnum + List list = new List(); + var members = typeof(T).GetTypeInfo().DeclaredMembers; + foreach (var member in members) + { + var val = member?.GetCustomAttribute(false)?.Value; + if (!string.IsNullOrEmpty(val)) + { + list.Add(val); + } + } + + return list.Contains(type); + } + } +} diff --git a/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs b/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs new file mode 100644 index 000000000..65d6e80e9 --- /dev/null +++ b/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs @@ -0,0 +1,134 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// BoardingTokenRequest + /// + [DataContract(Name = "BoardingTokenRequest")] + public partial class BoardingTokenRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BoardingTokenRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The boardingToken request token. (required). + public BoardingTokenRequest(string boardingRequestToken = default(string)) + { + this.BoardingRequestToken = boardingRequestToken; + } + + /// + /// The boardingToken request token. + /// + /// The boardingToken request token. + [DataMember(Name = "boardingRequestToken", IsRequired = false, EmitDefaultValue = false)] + public string BoardingRequestToken { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BoardingTokenRequest {\n"); + sb.Append(" BoardingRequestToken: ").Append(BoardingRequestToken).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BoardingTokenRequest); + } + + /// + /// Returns true if BoardingTokenRequest instances are equal + /// + /// Instance of BoardingTokenRequest to be compared + /// Boolean + public bool Equals(BoardingTokenRequest input) + { + if (input == null) + { + return false; + } + return + ( + this.BoardingRequestToken == input.BoardingRequestToken || + (this.BoardingRequestToken != null && + this.BoardingRequestToken.Equals(input.BoardingRequestToken)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.BoardingRequestToken != null) + { + hashCode = (hashCode * 59) + this.BoardingRequestToken.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs b/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs new file mode 100644 index 000000000..60e754525 --- /dev/null +++ b/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs @@ -0,0 +1,153 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// BoardingTokenResponse + /// + [DataContract(Name = "BoardingTokenResponse")] + public partial class BoardingTokenResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BoardingTokenResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// The boarding token that allows the Payments App to board. (required). + /// The unique identifier of the Payments App instance. (required). + public BoardingTokenResponse(string boardingToken = default(string), string installationId = default(string)) + { + this.BoardingToken = boardingToken; + this.InstallationId = installationId; + } + + /// + /// The boarding token that allows the Payments App to board. + /// + /// The boarding token that allows the Payments App to board. + [DataMember(Name = "boardingToken", IsRequired = false, EmitDefaultValue = false)] + public string BoardingToken { get; set; } + + /// + /// The unique identifier of the Payments App instance. + /// + /// The unique identifier of the Payments App instance. + [DataMember(Name = "installationId", IsRequired = false, EmitDefaultValue = false)] + public string InstallationId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BoardingTokenResponse {\n"); + sb.Append(" BoardingToken: ").Append(BoardingToken).Append("\n"); + sb.Append(" InstallationId: ").Append(InstallationId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BoardingTokenResponse); + } + + /// + /// Returns true if BoardingTokenResponse instances are equal + /// + /// Instance of BoardingTokenResponse to be compared + /// Boolean + public bool Equals(BoardingTokenResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.BoardingToken == input.BoardingToken || + (this.BoardingToken != null && + this.BoardingToken.Equals(input.BoardingToken)) + ) && + ( + this.InstallationId == input.InstallationId || + (this.InstallationId != null && + this.InstallationId.Equals(input.InstallationId)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.BoardingToken != null) + { + hashCode = (hashCode * 59) + this.BoardingToken.GetHashCode(); + } + if (this.InstallationId != null) + { + hashCode = (hashCode * 59) + this.InstallationId.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs b/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs new file mode 100644 index 000000000..8eb7552b6 --- /dev/null +++ b/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs @@ -0,0 +1,259 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// Standardized error response following RFC-7807 format + /// + [DataContract(Name = "DefaultErrorResponseEntity")] + public partial class DefaultErrorResponseEntity : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// A human-readable explanation specific to this occurrence of the problem.. + /// Unique business error code.. + /// A URI that identifies the specific occurrence of the problem if applicable.. + /// Array of fields with validation errors when applicable.. + /// The unique reference for the request.. + /// The HTTP status code.. + /// A short, human-readable summary of the problem type.. + /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type.. + public DefaultErrorResponseEntity(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), int? status = default(int?), string title = default(string), string type = default(string)) + { + this.Detail = detail; + this.ErrorCode = errorCode; + this.Instance = instance; + this.InvalidFields = invalidFields; + this.RequestId = requestId; + this.Status = status; + this.Title = title; + this.Type = type; + } + + /// + /// A human-readable explanation specific to this occurrence of the problem. + /// + /// A human-readable explanation specific to this occurrence of the problem. + [DataMember(Name = "detail", EmitDefaultValue = false)] + public string Detail { get; set; } + + /// + /// Unique business error code. + /// + /// Unique business error code. + [DataMember(Name = "errorCode", EmitDefaultValue = false)] + public string ErrorCode { get; set; } + + /// + /// A URI that identifies the specific occurrence of the problem if applicable. + /// + /// A URI that identifies the specific occurrence of the problem if applicable. + [DataMember(Name = "instance", EmitDefaultValue = false)] + public string Instance { get; set; } + + /// + /// Array of fields with validation errors when applicable. + /// + /// Array of fields with validation errors when applicable. + [DataMember(Name = "invalidFields", EmitDefaultValue = false)] + public List InvalidFields { get; set; } + + /// + /// The unique reference for the request. + /// + /// The unique reference for the request. + [DataMember(Name = "requestId", EmitDefaultValue = false)] + public string RequestId { get; set; } + + /// + /// The HTTP status code. + /// + /// The HTTP status code. + [DataMember(Name = "status", EmitDefaultValue = false)] + public int? Status { get; set; } + + /// + /// A short, human-readable summary of the problem type. + /// + /// A short, human-readable summary of the problem type. + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + /// + /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + [DataMember(Name = "type", EmitDefaultValue = false)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DefaultErrorResponseEntity {\n"); + sb.Append(" Detail: ").Append(Detail).Append("\n"); + sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" Instance: ").Append(Instance).Append("\n"); + sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); + sb.Append(" RequestId: ").Append(RequestId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DefaultErrorResponseEntity); + } + + /// + /// Returns true if DefaultErrorResponseEntity instances are equal + /// + /// Instance of DefaultErrorResponseEntity to be compared + /// Boolean + public bool Equals(DefaultErrorResponseEntity input) + { + if (input == null) + { + return false; + } + return + ( + this.Detail == input.Detail || + (this.Detail != null && + this.Detail.Equals(input.Detail)) + ) && + ( + this.ErrorCode == input.ErrorCode || + (this.ErrorCode != null && + this.ErrorCode.Equals(input.ErrorCode)) + ) && + ( + this.Instance == input.Instance || + (this.Instance != null && + this.Instance.Equals(input.Instance)) + ) && + ( + this.InvalidFields == input.InvalidFields || + this.InvalidFields != null && + input.InvalidFields != null && + this.InvalidFields.SequenceEqual(input.InvalidFields) + ) && + ( + this.RequestId == input.RequestId || + (this.RequestId != null && + this.RequestId.Equals(input.RequestId)) + ) && + ( + this.Status == input.Status || + this.Status.Equals(input.Status) + ) && + ( + this.Title == input.Title || + (this.Title != null && + this.Title.Equals(input.Title)) + ) && + ( + this.Type == input.Type || + (this.Type != null && + this.Type.Equals(input.Type)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Detail != null) + { + hashCode = (hashCode * 59) + this.Detail.GetHashCode(); + } + if (this.ErrorCode != null) + { + hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); + } + if (this.Instance != null) + { + hashCode = (hashCode * 59) + this.Instance.GetHashCode(); + } + if (this.InvalidFields != null) + { + hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); + } + if (this.RequestId != null) + { + hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); + } + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + if (this.Title != null) + { + hashCode = (hashCode * 59) + this.Title.GetHashCode(); + } + if (this.Type != null) + { + hashCode = (hashCode * 59) + this.Type.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/PaymentsApp/InvalidField.cs b/Adyen/Model/PaymentsApp/InvalidField.cs new file mode 100644 index 000000000..903c312dd --- /dev/null +++ b/Adyen/Model/PaymentsApp/InvalidField.cs @@ -0,0 +1,172 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// InvalidField + /// + [DataContract(Name = "InvalidField")] + public partial class InvalidField : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InvalidField() { } + /// + /// Initializes a new instance of the class. + /// + /// The field that has an invalid value. (required). + /// The invalid value. (required). + /// Description of the validation error. (required). + public InvalidField(string name = default(string), string value = default(string), string message = default(string)) + { + this.Name = name; + this.Value = value; + this.Message = message; + } + + /// + /// The field that has an invalid value. + /// + /// The field that has an invalid value. + [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// The invalid value. + /// + /// The invalid value. + [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] + public string Value { get; set; } + + /// + /// Description of the validation error. + /// + /// Description of the validation error. + [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InvalidField {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InvalidField); + } + + /// + /// Returns true if InvalidField instances are equal + /// + /// Instance of InvalidField to be compared + /// Boolean + public bool Equals(InvalidField input) + { + if (input == null) + { + return false; + } + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Value == input.Value || + (this.Value != null && + this.Value.Equals(input.Value)) + ) && + ( + this.Message == input.Message || + (this.Message != null && + this.Message.Equals(input.Message)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + { + hashCode = (hashCode * 59) + this.Name.GetHashCode(); + } + if (this.Value != null) + { + hashCode = (hashCode * 59) + this.Value.GetHashCode(); + } + if (this.Message != null) + { + hashCode = (hashCode * 59) + this.Message.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/PaymentsApp/PaymentsAppDto.cs b/Adyen/Model/PaymentsApp/PaymentsAppDto.cs new file mode 100644 index 000000000..299067e58 --- /dev/null +++ b/Adyen/Model/PaymentsApp/PaymentsAppDto.cs @@ -0,0 +1,191 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// PaymentsAppDto + /// + [DataContract(Name = "PaymentsAppDto")] + public partial class PaymentsAppDto : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PaymentsAppDto() { } + /// + /// Initializes a new instance of the class. + /// + /// The unique identifier of the Payments App instance. (required). + /// The account code associated with the Payments App instance. (required). + /// The store code associated with the Payments App instance.. + /// The status of the Payments App instance. (required). + public PaymentsAppDto(string installationId = default(string), string merchantAccountCode = default(string), string merchantStoreCode = default(string), string status = default(string)) + { + this.InstallationId = installationId; + this.MerchantAccountCode = merchantAccountCode; + this.Status = status; + this.MerchantStoreCode = merchantStoreCode; + } + + /// + /// The unique identifier of the Payments App instance. + /// + /// The unique identifier of the Payments App instance. + [DataMember(Name = "installationId", IsRequired = false, EmitDefaultValue = false)] + public string InstallationId { get; set; } + + /// + /// The account code associated with the Payments App instance. + /// + /// The account code associated with the Payments App instance. + [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] + public string MerchantAccountCode { get; set; } + + /// + /// The store code associated with the Payments App instance. + /// + /// The store code associated with the Payments App instance. + [DataMember(Name = "merchantStoreCode", EmitDefaultValue = false)] + public string MerchantStoreCode { get; set; } + + /// + /// The status of the Payments App instance. + /// + /// The status of the Payments App instance. + [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PaymentsAppDto {\n"); + sb.Append(" InstallationId: ").Append(InstallationId).Append("\n"); + sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); + sb.Append(" MerchantStoreCode: ").Append(MerchantStoreCode).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaymentsAppDto); + } + + /// + /// Returns true if PaymentsAppDto instances are equal + /// + /// Instance of PaymentsAppDto to be compared + /// Boolean + public bool Equals(PaymentsAppDto input) + { + if (input == null) + { + return false; + } + return + ( + this.InstallationId == input.InstallationId || + (this.InstallationId != null && + this.InstallationId.Equals(input.InstallationId)) + ) && + ( + this.MerchantAccountCode == input.MerchantAccountCode || + (this.MerchantAccountCode != null && + this.MerchantAccountCode.Equals(input.MerchantAccountCode)) + ) && + ( + this.MerchantStoreCode == input.MerchantStoreCode || + (this.MerchantStoreCode != null && + this.MerchantStoreCode.Equals(input.MerchantStoreCode)) + ) && + ( + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.InstallationId != null) + { + hashCode = (hashCode * 59) + this.InstallationId.GetHashCode(); + } + if (this.MerchantAccountCode != null) + { + hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); + } + if (this.MerchantStoreCode != null) + { + hashCode = (hashCode * 59) + this.MerchantStoreCode.GetHashCode(); + } + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs b/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs new file mode 100644 index 000000000..6936546f1 --- /dev/null +++ b/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs @@ -0,0 +1,135 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; + +namespace Adyen.Model.PaymentsApp +{ + /// + /// PaymentsAppResponse + /// + [DataContract(Name = "PaymentsAppResponse")] + public partial class PaymentsAppResponse : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PaymentsAppResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// List of Payments Apps. (required). + public PaymentsAppResponse(List paymentsApps = default(List)) + { + this.PaymentsApps = paymentsApps; + } + + /// + /// List of Payments Apps. + /// + /// List of Payments Apps. + [DataMember(Name = "paymentsApps", IsRequired = false, EmitDefaultValue = false)] + public List PaymentsApps { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PaymentsAppResponse {\n"); + sb.Append(" PaymentsApps: ").Append(PaymentsApps).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as PaymentsAppResponse); + } + + /// + /// Returns true if PaymentsAppResponse instances are equal + /// + /// Instance of PaymentsAppResponse to be compared + /// Boolean + public bool Equals(PaymentsAppResponse input) + { + if (input == null) + { + return false; + } + return + ( + this.PaymentsApps == input.PaymentsApps || + this.PaymentsApps != null && + input.PaymentsApps != null && + this.PaymentsApps.SequenceEqual(input.PaymentsApps) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.PaymentsApps != null) + { + hashCode = (hashCode * 59) + this.PaymentsApps.GetHashCode(); + } + return hashCode; + } + } + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + public IEnumerable Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/Adyen/Model/TransferWebhooks/TransferData.cs b/Adyen/Model/TransferWebhooks/TransferData.cs index 109cdde07..c7fd37c4e 100644 --- a/Adyen/Model/TransferWebhooks/TransferData.cs +++ b/Adyen/Model/TransferWebhooks/TransferData.cs @@ -644,244 +644,232 @@ public enum StatusEnum public enum TypeEnum { /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 1, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 2, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 3, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 4, - - /// - /// Enum BalanceRollover for value: balanceRollover + /// Enum Payment for value: payment /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 5, + [EnumMember(Value = "payment")] + Payment = 1, /// - /// Enum BankDirectDebit for value: bankDirectDebit + /// Enum Capture for value: capture /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 6, + [EnumMember(Value = "capture")] + Capture = 2, /// - /// Enum BankTransfer for value: bankTransfer + /// Enum CaptureReversal for value: captureReversal /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 7, + [EnumMember(Value = "captureReversal")] + CaptureReversal = 3, /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection + /// Enum Refund for value: refund /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 8, + [EnumMember(Value = "refund")] + Refund = 4, /// - /// Enum Capture for value: capture + /// Enum RefundReversal for value: refundReversal /// - [EnumMember(Value = "capture")] - Capture = 9, + [EnumMember(Value = "refundReversal")] + RefundReversal = 5, /// - /// Enum CaptureReversal for value: captureReversal + /// Enum Chargeback for value: chargeback /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 10, + [EnumMember(Value = "chargeback")] + Chargeback = 6, /// - /// Enum CardTransfer for value: cardTransfer + /// Enum ChargebackCorrection for value: chargebackCorrection /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 11, + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 7, /// - /// Enum CashOutFee for value: cashOutFee + /// Enum ChargebackReversal for value: chargebackReversal /// - [EnumMember(Value = "cashOutFee")] - CashOutFee = 12, + [EnumMember(Value = "chargebackReversal")] + ChargebackReversal = 8, /// - /// Enum CashOutFunding for value: cashOutFunding + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection /// - [EnumMember(Value = "cashOutFunding")] - CashOutFunding = 13, + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 9, /// - /// Enum CashOutInstruction for value: cashOutInstruction + /// Enum SecondChargeback for value: secondChargeback /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 14, + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 10, /// - /// Enum CashoutFee for value: cashoutFee + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 15, + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 11, /// - /// Enum CashoutFunding for value: cashoutFunding + /// Enum AtmWithdrawal for value: atmWithdrawal /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 16, + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 12, /// - /// Enum CashoutRepayment for value: cashoutRepayment + /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 17, + [EnumMember(Value = "atmWithdrawalReversal")] + AtmWithdrawalReversal = 13, /// - /// Enum Chargeback for value: chargeback + /// Enum InternalTransfer for value: internalTransfer /// - [EnumMember(Value = "chargeback")] - Chargeback = 18, + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 14, /// - /// Enum ChargebackCorrection for value: chargebackCorrection + /// Enum InternalDirectDebit for value: internalDirectDebit /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 19, + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 15, /// - /// Enum ChargebackReversal for value: chargebackReversal + /// Enum ManualCorrection for value: manualCorrection /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 20, + [EnumMember(Value = "manualCorrection")] + ManualCorrection = 16, /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// Enum InvoiceDeduction for value: invoiceDeduction /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 21, + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 17, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 22, + DepositCorrection = 18, /// - /// Enum Fee for value: fee + /// Enum ReserveAdjustment for value: reserveAdjustment /// - [EnumMember(Value = "fee")] - Fee = 23, + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 19, /// - /// Enum Grant for value: grant + /// Enum BankTransfer for value: bankTransfer /// - [EnumMember(Value = "grant")] - Grant = 24, + [EnumMember(Value = "bankTransfer")] + BankTransfer = 20, /// - /// Enum Installment for value: installment + /// Enum BankDirectDebit for value: bankDirectDebit /// - [EnumMember(Value = "installment")] - Installment = 25, + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 21, /// - /// Enum InstallmentReversal for value: installmentReversal + /// Enum CardTransfer for value: cardTransfer /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 26, + [EnumMember(Value = "cardTransfer")] + CardTransfer = 22, /// - /// Enum InternalDirectDebit for value: internalDirectDebit + /// Enum MiscCost for value: miscCost /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 27, + [EnumMember(Value = "miscCost")] + MiscCost = 23, /// - /// Enum InternalTransfer for value: internalTransfer + /// Enum PaymentCost for value: paymentCost /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 28, + [EnumMember(Value = "paymentCost")] + PaymentCost = 24, /// - /// Enum InvoiceDeduction for value: invoiceDeduction + /// Enum Fee for value: fee /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 29, + [EnumMember(Value = "fee")] + Fee = 25, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 30, + Leftover = 26, /// - /// Enum ManualCorrection for value: manualCorrection + /// Enum Grant for value: grant /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 31, + [EnumMember(Value = "grant")] + Grant = 27, /// - /// Enum MiscCost for value: miscCost + /// Enum CapitalFundsCollection for value: capitalFundsCollection /// - [EnumMember(Value = "miscCost")] - MiscCost = 32, + [EnumMember(Value = "capitalFundsCollection")] + CapitalFundsCollection = 28, /// - /// Enum Payment for value: payment + /// Enum CashOutInstruction for value: cashOutInstruction /// - [EnumMember(Value = "payment")] - Payment = 33, + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 29, /// - /// Enum PaymentCost for value: paymentCost + /// Enum CashoutFee for value: cashoutFee /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 34, + [EnumMember(Value = "cashoutFee")] + CashoutFee = 30, /// - /// Enum Refund for value: refund + /// Enum CashoutRepayment for value: cashoutRepayment /// - [EnumMember(Value = "refund")] - Refund = 35, + [EnumMember(Value = "cashoutRepayment")] + CashoutRepayment = 31, /// - /// Enum RefundReversal for value: refundReversal + /// Enum CashoutFunding for value: cashoutFunding /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 36, + [EnumMember(Value = "cashoutFunding")] + CashoutFunding = 32, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 37, + Repayment = 33, /// - /// Enum ReserveAdjustment for value: reserveAdjustment + /// Enum Installment for value: installment /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 38, + [EnumMember(Value = "installment")] + Installment = 34, /// - /// Enum SecondChargeback for value: secondChargeback + /// Enum InstallmentReversal for value: installmentReversal /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 39, + [EnumMember(Value = "installmentReversal")] + InstallmentReversal = 35, /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// Enum BalanceAdjustment for value: balanceAdjustment /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 40 + [EnumMember(Value = "balanceAdjustment")] + BalanceAdjustment = 36, + + /// + /// Enum BalanceRollover for value: balanceRollover + /// + [EnumMember(Value = "balanceRollover")] + BalanceRollover = 37, + + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 38 } diff --git a/Adyen/Model/Transfers/Transfer.cs b/Adyen/Model/Transfers/Transfer.cs index a342e47a2..d4ca793d3 100644 --- a/Adyen/Model/Transfers/Transfer.cs +++ b/Adyen/Model/Transfers/Transfer.cs @@ -644,244 +644,232 @@ public enum StatusEnum public enum TypeEnum { /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 1, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 2, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 3, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 4, - - /// - /// Enum BalanceRollover for value: balanceRollover + /// Enum Payment for value: payment /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 5, + [EnumMember(Value = "payment")] + Payment = 1, /// - /// Enum BankDirectDebit for value: bankDirectDebit + /// Enum Capture for value: capture /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 6, + [EnumMember(Value = "capture")] + Capture = 2, /// - /// Enum BankTransfer for value: bankTransfer + /// Enum CaptureReversal for value: captureReversal /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 7, + [EnumMember(Value = "captureReversal")] + CaptureReversal = 3, /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection + /// Enum Refund for value: refund /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 8, + [EnumMember(Value = "refund")] + Refund = 4, /// - /// Enum Capture for value: capture + /// Enum RefundReversal for value: refundReversal /// - [EnumMember(Value = "capture")] - Capture = 9, + [EnumMember(Value = "refundReversal")] + RefundReversal = 5, /// - /// Enum CaptureReversal for value: captureReversal + /// Enum Chargeback for value: chargeback /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 10, + [EnumMember(Value = "chargeback")] + Chargeback = 6, /// - /// Enum CardTransfer for value: cardTransfer + /// Enum ChargebackCorrection for value: chargebackCorrection /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 11, + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 7, /// - /// Enum CashOutFee for value: cashOutFee + /// Enum ChargebackReversal for value: chargebackReversal /// - [EnumMember(Value = "cashOutFee")] - CashOutFee = 12, + [EnumMember(Value = "chargebackReversal")] + ChargebackReversal = 8, /// - /// Enum CashOutFunding for value: cashOutFunding + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection /// - [EnumMember(Value = "cashOutFunding")] - CashOutFunding = 13, + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 9, /// - /// Enum CashOutInstruction for value: cashOutInstruction + /// Enum SecondChargeback for value: secondChargeback /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 14, + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 10, /// - /// Enum CashoutFee for value: cashoutFee + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 15, + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 11, /// - /// Enum CashoutFunding for value: cashoutFunding + /// Enum AtmWithdrawal for value: atmWithdrawal /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 16, + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 12, /// - /// Enum CashoutRepayment for value: cashoutRepayment + /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 17, + [EnumMember(Value = "atmWithdrawalReversal")] + AtmWithdrawalReversal = 13, /// - /// Enum Chargeback for value: chargeback + /// Enum InternalTransfer for value: internalTransfer /// - [EnumMember(Value = "chargeback")] - Chargeback = 18, + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 14, /// - /// Enum ChargebackCorrection for value: chargebackCorrection + /// Enum InternalDirectDebit for value: internalDirectDebit /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 19, + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 15, /// - /// Enum ChargebackReversal for value: chargebackReversal + /// Enum ManualCorrection for value: manualCorrection /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 20, + [EnumMember(Value = "manualCorrection")] + ManualCorrection = 16, /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// Enum InvoiceDeduction for value: invoiceDeduction /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 21, + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 17, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 22, + DepositCorrection = 18, /// - /// Enum Fee for value: fee + /// Enum ReserveAdjustment for value: reserveAdjustment /// - [EnumMember(Value = "fee")] - Fee = 23, + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 19, /// - /// Enum Grant for value: grant + /// Enum BankTransfer for value: bankTransfer /// - [EnumMember(Value = "grant")] - Grant = 24, + [EnumMember(Value = "bankTransfer")] + BankTransfer = 20, /// - /// Enum Installment for value: installment + /// Enum BankDirectDebit for value: bankDirectDebit /// - [EnumMember(Value = "installment")] - Installment = 25, + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 21, /// - /// Enum InstallmentReversal for value: installmentReversal + /// Enum CardTransfer for value: cardTransfer /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 26, + [EnumMember(Value = "cardTransfer")] + CardTransfer = 22, /// - /// Enum InternalDirectDebit for value: internalDirectDebit + /// Enum MiscCost for value: miscCost /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 27, + [EnumMember(Value = "miscCost")] + MiscCost = 23, /// - /// Enum InternalTransfer for value: internalTransfer + /// Enum PaymentCost for value: paymentCost /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 28, + [EnumMember(Value = "paymentCost")] + PaymentCost = 24, /// - /// Enum InvoiceDeduction for value: invoiceDeduction + /// Enum Fee for value: fee /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 29, + [EnumMember(Value = "fee")] + Fee = 25, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 30, + Leftover = 26, /// - /// Enum ManualCorrection for value: manualCorrection + /// Enum Grant for value: grant /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 31, + [EnumMember(Value = "grant")] + Grant = 27, /// - /// Enum MiscCost for value: miscCost + /// Enum CapitalFundsCollection for value: capitalFundsCollection /// - [EnumMember(Value = "miscCost")] - MiscCost = 32, + [EnumMember(Value = "capitalFundsCollection")] + CapitalFundsCollection = 28, /// - /// Enum Payment for value: payment + /// Enum CashOutInstruction for value: cashOutInstruction /// - [EnumMember(Value = "payment")] - Payment = 33, + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 29, /// - /// Enum PaymentCost for value: paymentCost + /// Enum CashoutFee for value: cashoutFee /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 34, + [EnumMember(Value = "cashoutFee")] + CashoutFee = 30, /// - /// Enum Refund for value: refund + /// Enum CashoutRepayment for value: cashoutRepayment /// - [EnumMember(Value = "refund")] - Refund = 35, + [EnumMember(Value = "cashoutRepayment")] + CashoutRepayment = 31, /// - /// Enum RefundReversal for value: refundReversal + /// Enum CashoutFunding for value: cashoutFunding /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 36, + [EnumMember(Value = "cashoutFunding")] + CashoutFunding = 32, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 37, + Repayment = 33, /// - /// Enum ReserveAdjustment for value: reserveAdjustment + /// Enum Installment for value: installment /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 38, + [EnumMember(Value = "installment")] + Installment = 34, /// - /// Enum SecondChargeback for value: secondChargeback + /// Enum InstallmentReversal for value: installmentReversal /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 39, + [EnumMember(Value = "installmentReversal")] + InstallmentReversal = 35, /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// Enum BalanceAdjustment for value: balanceAdjustment /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 40 + [EnumMember(Value = "balanceAdjustment")] + BalanceAdjustment = 36, + + /// + /// Enum BalanceRollover for value: balanceRollover + /// + [EnumMember(Value = "balanceRollover")] + BalanceRollover = 37, + + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 38 } diff --git a/Adyen/Model/Transfers/TransferData.cs b/Adyen/Model/Transfers/TransferData.cs index 1e2be2296..96a838cd0 100644 --- a/Adyen/Model/Transfers/TransferData.cs +++ b/Adyen/Model/Transfers/TransferData.cs @@ -644,244 +644,232 @@ public enum StatusEnum public enum TypeEnum { /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 1, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 2, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 3, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 4, - - /// - /// Enum BalanceRollover for value: balanceRollover + /// Enum Payment for value: payment /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 5, + [EnumMember(Value = "payment")] + Payment = 1, /// - /// Enum BankDirectDebit for value: bankDirectDebit + /// Enum Capture for value: capture /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 6, + [EnumMember(Value = "capture")] + Capture = 2, /// - /// Enum BankTransfer for value: bankTransfer + /// Enum CaptureReversal for value: captureReversal /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 7, + [EnumMember(Value = "captureReversal")] + CaptureReversal = 3, /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection + /// Enum Refund for value: refund /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 8, + [EnumMember(Value = "refund")] + Refund = 4, /// - /// Enum Capture for value: capture + /// Enum RefundReversal for value: refundReversal /// - [EnumMember(Value = "capture")] - Capture = 9, + [EnumMember(Value = "refundReversal")] + RefundReversal = 5, /// - /// Enum CaptureReversal for value: captureReversal + /// Enum Chargeback for value: chargeback /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 10, + [EnumMember(Value = "chargeback")] + Chargeback = 6, /// - /// Enum CardTransfer for value: cardTransfer + /// Enum ChargebackCorrection for value: chargebackCorrection /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 11, + [EnumMember(Value = "chargebackCorrection")] + ChargebackCorrection = 7, /// - /// Enum CashOutFee for value: cashOutFee + /// Enum ChargebackReversal for value: chargebackReversal /// - [EnumMember(Value = "cashOutFee")] - CashOutFee = 12, + [EnumMember(Value = "chargebackReversal")] + ChargebackReversal = 8, /// - /// Enum CashOutFunding for value: cashOutFunding + /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection /// - [EnumMember(Value = "cashOutFunding")] - CashOutFunding = 13, + [EnumMember(Value = "chargebackReversalCorrection")] + ChargebackReversalCorrection = 9, /// - /// Enum CashOutInstruction for value: cashOutInstruction + /// Enum SecondChargeback for value: secondChargeback /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 14, + [EnumMember(Value = "secondChargeback")] + SecondChargeback = 10, /// - /// Enum CashoutFee for value: cashoutFee + /// Enum SecondChargebackCorrection for value: secondChargebackCorrection /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 15, + [EnumMember(Value = "secondChargebackCorrection")] + SecondChargebackCorrection = 11, /// - /// Enum CashoutFunding for value: cashoutFunding + /// Enum AtmWithdrawal for value: atmWithdrawal /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 16, + [EnumMember(Value = "atmWithdrawal")] + AtmWithdrawal = 12, /// - /// Enum CashoutRepayment for value: cashoutRepayment + /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 17, + [EnumMember(Value = "atmWithdrawalReversal")] + AtmWithdrawalReversal = 13, /// - /// Enum Chargeback for value: chargeback + /// Enum InternalTransfer for value: internalTransfer /// - [EnumMember(Value = "chargeback")] - Chargeback = 18, + [EnumMember(Value = "internalTransfer")] + InternalTransfer = 14, /// - /// Enum ChargebackCorrection for value: chargebackCorrection + /// Enum InternalDirectDebit for value: internalDirectDebit /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 19, + [EnumMember(Value = "internalDirectDebit")] + InternalDirectDebit = 15, /// - /// Enum ChargebackReversal for value: chargebackReversal + /// Enum ManualCorrection for value: manualCorrection /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 20, + [EnumMember(Value = "manualCorrection")] + ManualCorrection = 16, /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection + /// Enum InvoiceDeduction for value: invoiceDeduction /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 21, + [EnumMember(Value = "invoiceDeduction")] + InvoiceDeduction = 17, /// /// Enum DepositCorrection for value: depositCorrection /// [EnumMember(Value = "depositCorrection")] - DepositCorrection = 22, + DepositCorrection = 18, /// - /// Enum Fee for value: fee + /// Enum ReserveAdjustment for value: reserveAdjustment /// - [EnumMember(Value = "fee")] - Fee = 23, + [EnumMember(Value = "reserveAdjustment")] + ReserveAdjustment = 19, /// - /// Enum Grant for value: grant + /// Enum BankTransfer for value: bankTransfer /// - [EnumMember(Value = "grant")] - Grant = 24, + [EnumMember(Value = "bankTransfer")] + BankTransfer = 20, /// - /// Enum Installment for value: installment + /// Enum BankDirectDebit for value: bankDirectDebit /// - [EnumMember(Value = "installment")] - Installment = 25, + [EnumMember(Value = "bankDirectDebit")] + BankDirectDebit = 21, /// - /// Enum InstallmentReversal for value: installmentReversal + /// Enum CardTransfer for value: cardTransfer /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 26, + [EnumMember(Value = "cardTransfer")] + CardTransfer = 22, /// - /// Enum InternalDirectDebit for value: internalDirectDebit + /// Enum MiscCost for value: miscCost /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 27, + [EnumMember(Value = "miscCost")] + MiscCost = 23, /// - /// Enum InternalTransfer for value: internalTransfer + /// Enum PaymentCost for value: paymentCost /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 28, + [EnumMember(Value = "paymentCost")] + PaymentCost = 24, /// - /// Enum InvoiceDeduction for value: invoiceDeduction + /// Enum Fee for value: fee /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 29, + [EnumMember(Value = "fee")] + Fee = 25, /// /// Enum Leftover for value: leftover /// [EnumMember(Value = "leftover")] - Leftover = 30, + Leftover = 26, /// - /// Enum ManualCorrection for value: manualCorrection + /// Enum Grant for value: grant /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 31, + [EnumMember(Value = "grant")] + Grant = 27, /// - /// Enum MiscCost for value: miscCost + /// Enum CapitalFundsCollection for value: capitalFundsCollection /// - [EnumMember(Value = "miscCost")] - MiscCost = 32, + [EnumMember(Value = "capitalFundsCollection")] + CapitalFundsCollection = 28, /// - /// Enum Payment for value: payment + /// Enum CashOutInstruction for value: cashOutInstruction /// - [EnumMember(Value = "payment")] - Payment = 33, + [EnumMember(Value = "cashOutInstruction")] + CashOutInstruction = 29, /// - /// Enum PaymentCost for value: paymentCost + /// Enum CashoutFee for value: cashoutFee /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 34, + [EnumMember(Value = "cashoutFee")] + CashoutFee = 30, /// - /// Enum Refund for value: refund + /// Enum CashoutRepayment for value: cashoutRepayment /// - [EnumMember(Value = "refund")] - Refund = 35, + [EnumMember(Value = "cashoutRepayment")] + CashoutRepayment = 31, /// - /// Enum RefundReversal for value: refundReversal + /// Enum CashoutFunding for value: cashoutFunding /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 36, + [EnumMember(Value = "cashoutFunding")] + CashoutFunding = 32, /// /// Enum Repayment for value: repayment /// [EnumMember(Value = "repayment")] - Repayment = 37, + Repayment = 33, /// - /// Enum ReserveAdjustment for value: reserveAdjustment + /// Enum Installment for value: installment /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 38, + [EnumMember(Value = "installment")] + Installment = 34, /// - /// Enum SecondChargeback for value: secondChargeback + /// Enum InstallmentReversal for value: installmentReversal /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 39, + [EnumMember(Value = "installmentReversal")] + InstallmentReversal = 35, /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection + /// Enum BalanceAdjustment for value: balanceAdjustment /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 40 + [EnumMember(Value = "balanceAdjustment")] + BalanceAdjustment = 36, + + /// + /// Enum BalanceRollover for value: balanceRollover + /// + [EnumMember(Value = "balanceRollover")] + BalanceRollover = 37, + + /// + /// Enum BalanceMigration for value: balanceMigration + /// + [EnumMember(Value = "balanceMigration")] + BalanceMigration = 38 } diff --git a/Adyen/Service/PaymentsAppService.cs b/Adyen/Service/PaymentsAppService.cs new file mode 100644 index 000000000..43c0a2764 --- /dev/null +++ b/Adyen/Service/PaymentsAppService.cs @@ -0,0 +1,216 @@ +/* +* Payments App API +* +* +* The version of the OpenAPI document: 1 +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + +using System; +using System.Collections.Generic; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Adyen.Model; +using Adyen.Model.PaymentsApp; + +namespace Adyen.Service +{ + /// + /// PaymentsAppService Interface + /// + public interface IPaymentsAppService + { + /// + /// Create a boarding token - merchant level + /// + /// - The unique identifier of the merchant account. + /// - + /// - Additional request options. + /// . + Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForMerchant(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default); + + /// + /// Create a boarding token - merchant level + /// + /// - The unique identifier of the merchant account. + /// - + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task GeneratePaymentsAppBoardingTokenForMerchantAsync(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + /// + /// Create a boarding token - store level + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the store. + /// - + /// - Additional request options. + /// . + Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForStore(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default); + + /// + /// Create a boarding token - store level + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the store. + /// - + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task GeneratePaymentsAppBoardingTokenForStoreAsync(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + /// + /// Get a list of Payments Apps - merchant level + /// + /// - The unique identifier of the merchant account. + /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDED** * **REVOKED** + /// - The number of items to return. + /// - The number of items to skip. + /// - Additional request options. + /// . + Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForMerchant(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default); + + /// + /// Get a list of Payments Apps - merchant level + /// + /// - The unique identifier of the merchant account. + /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDED** * **REVOKED** + /// - The number of items to return. + /// - The number of items to skip. + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task ListPaymentsAppForMerchantAsync(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + /// + /// Get a list of Payments Apps - store level + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the store. + /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDED** * **REVOKED** + /// - The number of items to return. + /// - The number of items to skip. + /// - Additional request options. + /// . + Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForStore(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default); + + /// + /// Get a list of Payments Apps - store level + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the store. + /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDED** * **REVOKED** + /// - The number of items to return. + /// - The number of items to skip. + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + /// Task of . + Task ListPaymentsAppForStoreAsync(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + /// + /// Revoke Payments App instance authentication + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the Payments App instance on a device. + /// - Additional request options. + void RevokePaymentsApp(string merchantId, string installationId, RequestOptions requestOptions = default); + + /// + /// Revoke Payments App instance authentication + /// + /// - The unique identifier of the merchant account. + /// - The unique identifier of the Payments App instance on a device. + /// - Additional request options. + /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. + Task RevokePaymentsAppAsync(string merchantId, string installationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); + + } + + /// + /// Represents a collection of functions to interact with the PaymentsAppService API endpoints + /// + public class PaymentsAppService : AbstractService, IPaymentsAppService + { + private readonly string _baseUrl; + + public PaymentsAppService(Client client) : base(client) + { + _baseUrl = CreateBaseUrl("https://management-live.adyen.com/v1"); + } + + public Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForMerchant(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default) + { + return GeneratePaymentsAppBoardingTokenForMerchantAsync(merchantId, boardingTokenRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task GeneratePaymentsAppBoardingTokenForMerchantAsync(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + var endpoint = _baseUrl + $"/merchants/{merchantId}/generatePaymentsAppBoardingToken"; + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(boardingTokenRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); + } + + public Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForStore(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default) + { + return GeneratePaymentsAppBoardingTokenForStoreAsync(merchantId, storeId, boardingTokenRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task GeneratePaymentsAppBoardingTokenForStoreAsync(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken"; + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(boardingTokenRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); + } + + public Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForMerchant(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default) + { + return ListPaymentsAppForMerchantAsync(merchantId, statuses, limit, offset, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task ListPaymentsAppForMerchantAsync(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + // Build the query string + var queryParams = new Dictionary(); + if (statuses != null) queryParams.Add("statuses", statuses); + if (limit != null) queryParams.Add("limit", limit.ToString()); + if (offset != null) queryParams.Add("offset", offset.ToString()); + var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentsApps" + ToQueryString(queryParams); + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); + } + + public Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForStore(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default) + { + return ListPaymentsAppForStoreAsync(merchantId, storeId, statuses, limit, offset, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task ListPaymentsAppForStoreAsync(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + // Build the query string + var queryParams = new Dictionary(); + if (statuses != null) queryParams.Add("statuses", statuses); + if (limit != null) queryParams.Add("limit", limit.ToString()); + if (offset != null) queryParams.Add("offset", offset.ToString()); + var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}/paymentsApps" + ToQueryString(queryParams); + var resource = new ServiceResource(this, endpoint); + return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); + } + + public void RevokePaymentsApp(string merchantId, string installationId, RequestOptions requestOptions = default) + { + RevokePaymentsAppAsync(merchantId, installationId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + public async Task RevokePaymentsAppAsync(string merchantId, string installationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) + { + var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentsApps/{installationId}/revoke"; + var resource = new ServiceResource(this, endpoint); + await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file