From 68d1a0f244ba77a29c99ea9a88db40d9e30ec56f Mon Sep 17 00:00:00 2001 From: BlockChyp SDK Builder Date: Wed, 18 Sep 2024 15:34:16 +0000 Subject: [PATCH] Merge pull request #283 from blockchyp/develop Develop --- README.md | 42 ++- src/BlockChyp/Client/BlockChypClient.cs | 19 ++ src/BlockChyp/Entities/AddMerchantRequest.cs | 323 ++++++++++++++++++ src/BlockChyp/Entities/ApplicationAccount.cs | 46 +++ src/BlockChyp/Entities/MerchantApplication.cs | 311 +++++++++++++++++ src/BlockChyp/Entities/Owner.cs | 100 ++++++ .../Entities/SubmitApplicationRequest.cs | 323 ++++++++++++++++++ .../Integration/SubmitApplicationTest.cs | 154 +++++++++ 8 files changed, 1317 insertions(+), 1 deletion(-) create mode 100644 src/BlockChyp/Entities/AddMerchantRequest.cs create mode 100644 src/BlockChyp/Entities/ApplicationAccount.cs create mode 100644 src/BlockChyp/Entities/MerchantApplication.cs create mode 100644 src/BlockChyp/Entities/Owner.cs create mode 100644 src/BlockChyp/Entities/SubmitApplicationRequest.cs create mode 100644 tests/BlockChypTest/Integration/SubmitApplicationTest.cs diff --git a/README.md b/README.md index 4fdd3c7..9c22a1a 100644 --- a/README.md +++ b/README.md @@ -3628,7 +3628,7 @@ By default no roles will be assigned unless valid, comma-delimited, role codes a // Populate request parameters. MerchantCredentialGenerationRequest request = new MerchantCredentialGenerationRequest { - + MerchantId = "", }; // Run the transaction. @@ -3639,6 +3639,46 @@ Console.WriteLine(response); ``` +#### Submit Application + + + +* **API Credential Types:** Partner +* **Required Role:** INVITE MERCHANT + +This is a partner level API that can be used to submit applications to add new merchant accounts. The application requires a significant amount of detailed information about the merchant and their business. Rather than providing an exhaustive list of required fields, we recommend submitting as much information as possible in your initial request. + +If any required fields are missing or if there are any validation errors, the API will return specific error messages indicating which fields need to be addressed. Simply review these validation errors, fill in the missing information or correct any errors, and resubmit the application. + +Key areas of information include: +- Business details (name, type, tax information) +- Contact information +- Address information (physical and mailing) +- Owner details +- Bank account information +- Transaction volume estimates +- Operational settings (timezone, batch close time, etc.) + +**Note:** Some fields may be conditionally required based on the values of other fields. The validation process will guide you through ensuring all necessary information is provided. + + + + +```c# +// Populate request parameters. +SubmitApplicationRequest request = new SubmitApplicationRequest +{ + +}; + +// Run the transaction. +Acknowledgement response = await blockchyp.SubmitApplicationAsync(request); + +// View the result. +Console.WriteLine(response); + +``` + diff --git a/src/BlockChyp/Client/BlockChypClient.cs b/src/BlockChyp/Client/BlockChypClient.cs index df24aea..739aa1a 100644 --- a/src/BlockChyp/Client/BlockChypClient.cs +++ b/src/BlockChyp/Client/BlockChypClient.cs @@ -974,6 +974,25 @@ public MerchantCredentialGenerationResponse MerchantCredentialGeneration(Merchan return DashboardRequest(HttpMethod.Post, "/api/generate-merchant-creds", request, null); } + /// + /// Submits and application to add a new merchant account. + /// + /// The request details. + public async Task SubmitApplicationAsync(SubmitApplicationRequest request) + { + return await DashboardRequestAsync(HttpMethod.Post, "/api/submit-application", request, null) + .ConfigureAwait(false); + } + + /// + /// Synchronous form of . + /// + /// The request details. + public Acknowledgement SubmitApplication(SubmitApplicationRequest request) + { + return DashboardRequest(HttpMethod.Post, "/api/submit-application", request, null); + } + /// /// Adds a test merchant account. /// diff --git a/src/BlockChyp/Entities/AddMerchantRequest.cs b/src/BlockChyp/Entities/AddMerchantRequest.cs new file mode 100644 index 0000000..eb9f66e --- /dev/null +++ b/src/BlockChyp/Entities/AddMerchantRequest.cs @@ -0,0 +1,323 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace BlockChyp.Entities +{ + /// + /// Models a merchant application form to add a merchant account. + /// + public class AddMerchantRequest : BaseEntity, ITimeoutRequest + { + /// + /// The request timeout in seconds. + /// + [JsonProperty(PropertyName = "timeout")] + public int Timeout { get; set; } + + /// + /// Whether or not to route transaction to the test gateway. + /// + [JsonProperty(PropertyName = "test")] + public bool Test { get; set; } + + /// + /// The offer code for the merchant. + /// + [JsonProperty(PropertyName = "offerCode")] + public string OfferCode { get; set; } + + /// + /// The business name your customers know you by (DBA Name). + /// + [JsonProperty(PropertyName = "dbaName")] + public string DbaName { get; set; } + + /// + /// The name of the legal entity you file your taxes under. + /// + [JsonProperty(PropertyName = "corporateName")] + public string CorporateName { get; set; } + + /// + /// The business website. + /// + [JsonProperty(PropertyName = "webSite")] + public string WebSite { get; set; } + + /// + /// The business tax identification number (EIN). + /// + [JsonProperty(PropertyName = "taxIdNumber")] + public string TaxIdNumber { get; set; } + + /// + /// The type of business entity. + /// + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// The state where the business is incorporated. + /// + [JsonProperty(PropertyName = "stateOfIncorporation")] + public string StateOfIncorporation { get; set; } + + /// + /// The primary type of business (e.g., Retail, Service, etc.). + /// + [JsonProperty(PropertyName = "merchantType")] + public string MerchantType { get; set; } + + /// + /// A short description of the products and services sold. + /// + [JsonProperty(PropertyName = "businessDescription")] + public string BusinessDescription { get; set; } + + /// + /// The number of years the business has been operating. + /// + [JsonProperty(PropertyName = "yearsInBusiness")] + public string YearsInBusiness { get; set; } + + /// + /// The business telephone number. + /// + [JsonProperty(PropertyName = "businessPhoneNumber")] + public string BusinessPhoneNumber { get; set; } + + /// + /// The physical address of the business. + /// + [JsonProperty(PropertyName = "physicalAddress")] + public Address PhysicalAddress { get; set; } + + /// + /// The mailing address of the business. + /// + [JsonProperty(PropertyName = "mailingAddress")] + public Address MailingAddress { get; set; } + + /// + /// The first name of the primary contact. + /// + [JsonProperty(PropertyName = "contactFirstName")] + public string ContactFirstName { get; set; } + + /// + /// The last name of the primary contact. + /// + [JsonProperty(PropertyName = "contactLastName")] + public string ContactLastName { get; set; } + + /// + /// The phone number of the primary contact. + /// + [JsonProperty(PropertyName = "contactPhoneNumber")] + public string ContactPhoneNumber { get; set; } + + /// + /// The email address of the primary contact. + /// + [JsonProperty(PropertyName = "contactEmail")] + public string ContactEmail { get; set; } + + /// + /// The job title of the primary contact. + /// + [JsonProperty(PropertyName = "contactTitle")] + public string ContactTitle { get; set; } + + /// + /// The tax identification number (SSN) of the primary contact. + /// + [JsonProperty(PropertyName = "contactTaxIdNumber")] + public string ContactTaxIdNumber { get; set; } + + /// + /// The date of birth of the primary contact. + /// + [JsonProperty(PropertyName = "contactDOB")] + public string ContactDob { get; set; } + + /// + /// The driver's license number of the primary contact. + /// + [JsonProperty(PropertyName = "contactDlNumber")] + public string ContactDlNumber { get; set; } + + /// + /// The state that issued the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlStateOrProvince")] + public string ContactDlStateOrProvince { get; set; } + + /// + /// The expiration date of the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlExpiration")] + public string ContactDlExpiration { get; set; } + + /// + /// The home address of the primary contact. + /// + [JsonProperty(PropertyName = "contactHomeAddress")] + public Address ContactHomeAddress { get; set; } + + /// + /// The role of the primary contact in the business. + /// + [JsonProperty(PropertyName = "contactRole")] + public string ContactRole { get; set; } + + /// + /// List of individuals with 25% or more ownership in the company. + /// + [JsonProperty(PropertyName = "owners")] + public List Owners { get; set; } + + /// + /// The bank account information for the business. + /// + [JsonProperty(PropertyName = "manualAccount")] + public BankAccount ManualAccount { get; set; } + + /// + /// The average transaction amount. + /// + [JsonProperty(PropertyName = "averageTransaction")] + public string AverageTransaction { get; set; } + + /// + /// The highest expected transaction amount. + /// + [JsonProperty(PropertyName = "highTransaction")] + public string HighTransaction { get; set; } + + /// + /// The average monthly transaction volume. + /// + [JsonProperty(PropertyName = "averageMonth")] + public string AverageMonth { get; set; } + + /// + /// The highest expected monthly transaction volume. + /// + [JsonProperty(PropertyName = "highMonth")] + public string HighMonth { get; set; } + + /// + /// The refund policy of the business. + /// + [JsonProperty(PropertyName = "refundPolicy")] + public string RefundPolicy { get; set; } + + /// + /// The number of days after purchase that refunds can be issued. + /// + [JsonProperty(PropertyName = "refundDays")] + public string RefundDays { get; set; } + + /// + /// The time zone of the business. + /// + [JsonProperty(PropertyName = "timeZone")] + public string TimeZone { get; set; } + + /// + /// The time when the daily batch should close. + /// + [JsonProperty(PropertyName = "batchCloseTime")] + public string BatchCloseTime { get; set; } + + /// + /// Indicates if the business has multiple locations. + /// + [JsonProperty(PropertyName = "multipleLocations")] + public string MultipleLocations { get; set; } + + /// + /// The name of this specific business location. + /// + [JsonProperty(PropertyName = "locationName")] + public string LocationName { get; set; } + + /// + /// The store number for this location. + /// + [JsonProperty(PropertyName = "storeNumber")] + public string StoreNumber { get; set; } + + /// + /// Indicates if the business wants to accept EBT cards. + /// + [JsonProperty(PropertyName = "ebtRequested")] + public string EbtRequested { get; set; } + + /// + /// The FNS number issued by the USDA for EBT processing. + /// + [JsonProperty(PropertyName = "fnsNumber")] + public string FnsNumber { get; set; } + + /// + /// Indicates if the business plans to accept payments through a website. + /// + [JsonProperty(PropertyName = "ecommerce")] + public string Ecommerce { get; set; } + + /// + /// Indicates if suppliers ship products directly to customers. + /// + [JsonProperty(PropertyName = "dropShipping")] + public bool DropShipping { get; set; } + + /// + /// The percentage of transactions that will be chip or swipe. + /// + [JsonProperty(PropertyName = "cardPresentPercentage")] + public string CardPresentPercentage { get; set; } + + /// + /// The percentage of transactions that will be phone orders. + /// + [JsonProperty(PropertyName = "phoneOrderPercentage")] + public string PhoneOrderPercentage { get; set; } + + /// + /// The percentage of transactions that will be e-commerce. + /// + [JsonProperty(PropertyName = "ecomPercentage")] + public string EcomPercentage { get; set; } + + /// + /// The number of days before shipment that customers are charged. + /// + [JsonProperty(PropertyName = "billBeforeShipmentDays")] + public string BillBeforeShipmentDays { get; set; } + + /// + /// Indicates if the business plans to process recurring payments. + /// + [JsonProperty(PropertyName = "subscriptionsSupported")] + public string SubscriptionsSupported { get; set; } + + /// + /// The frequency of recurring payments (if applicable). + /// + [JsonProperty(PropertyName = "subscriptionFrequency")] + public string SubscriptionFrequency { get; set; } + + /// + /// The full legal name of the person signing the application. + /// + [JsonProperty(PropertyName = "signerName")] + public string SignerName { get; set; } + } +} diff --git a/src/BlockChyp/Entities/ApplicationAccount.cs b/src/BlockChyp/Entities/ApplicationAccount.cs new file mode 100644 index 0000000..e3552f4 --- /dev/null +++ b/src/BlockChyp/Entities/ApplicationAccount.cs @@ -0,0 +1,46 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using Newtonsoft.Json; + +namespace BlockChyp.Entities +{ + /// + /// Models a bank account associated with an application. + /// + public class ApplicationAccount : BaseEntity + { + /// + /// The name of the bank account. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// The name of the bank. + /// + [JsonProperty(PropertyName = "bank")] + public string Bank { get; set; } + + /// + /// The name of the account holder. + /// + [JsonProperty(PropertyName = "accountHolderName")] + public string AccountHolderName { get; set; } + + /// + /// The routing number of the bank. + /// + [JsonProperty(PropertyName = "routingNumber")] + public string RoutingNumber { get; set; } + + /// + /// The account number. + /// + [JsonProperty(PropertyName = "accountNumber")] + public string AccountNumber { get; set; } + } +} diff --git a/src/BlockChyp/Entities/MerchantApplication.cs b/src/BlockChyp/Entities/MerchantApplication.cs new file mode 100644 index 0000000..066689d --- /dev/null +++ b/src/BlockChyp/Entities/MerchantApplication.cs @@ -0,0 +1,311 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace BlockChyp.Entities +{ + /// + /// Models a merchant application form to add a merchant account. + /// + public class MerchantApplication : BaseEntity + { + /// + /// The invite code for the merchant. + /// + [JsonProperty(PropertyName = "inviteCode")] + public string InviteCode { get; set; } + + /// + /// The business name your customers know you by (DBA Name). + /// + [JsonProperty(PropertyName = "dbaName")] + public string DbaName { get; set; } + + /// + /// The name of the legal entity you file your taxes under. + /// + [JsonProperty(PropertyName = "corporateName")] + public string CorporateName { get; set; } + + /// + /// The business website. + /// + [JsonProperty(PropertyName = "webSite")] + public string WebSite { get; set; } + + /// + /// The business tax identification number (EIN). + /// + [JsonProperty(PropertyName = "taxIdNumber")] + public string TaxIdNumber { get; set; } + + /// + /// The type of business entity. + /// + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// The state where the business is incorporated. + /// + [JsonProperty(PropertyName = "stateOfIncorporation")] + public string StateOfIncorporation { get; set; } + + /// + /// The primary type of business (e.g., Retail, Service, etc.). + /// + [JsonProperty(PropertyName = "merchantType")] + public string MerchantType { get; set; } + + /// + /// A short description of the products and services sold. + /// + [JsonProperty(PropertyName = "businessDescription")] + public string BusinessDescription { get; set; } + + /// + /// The number of years the business has been operating. + /// + [JsonProperty(PropertyName = "yearsInBusiness")] + public string YearsInBusiness { get; set; } + + /// + /// The business telephone number. + /// + [JsonProperty(PropertyName = "businessPhoneNumber")] + public string BusinessPhoneNumber { get; set; } + + /// + /// The physical address of the business. + /// + [JsonProperty(PropertyName = "physicalAddress")] + public Address PhysicalAddress { get; set; } + + /// + /// The mailing address of the business. + /// + [JsonProperty(PropertyName = "mailingAddress")] + public Address MailingAddress { get; set; } + + /// + /// The first name of the primary contact. + /// + [JsonProperty(PropertyName = "contactFirstName")] + public string ContactFirstName { get; set; } + + /// + /// The last name of the primary contact. + /// + [JsonProperty(PropertyName = "contactLastName")] + public string ContactLastName { get; set; } + + /// + /// The phone number of the primary contact. + /// + [JsonProperty(PropertyName = "contactPhoneNumber")] + public string ContactPhoneNumber { get; set; } + + /// + /// The email address of the primary contact. + /// + [JsonProperty(PropertyName = "contactEmail")] + public string ContactEmail { get; set; } + + /// + /// The job title of the primary contact. + /// + [JsonProperty(PropertyName = "contactTitle")] + public string ContactTitle { get; set; } + + /// + /// The tax identification number (SSN) of the primary contact. + /// + [JsonProperty(PropertyName = "contactTaxIdNumber")] + public string ContactTaxIdNumber { get; set; } + + /// + /// The date of birth of the primary contact. + /// + [JsonProperty(PropertyName = "contactDOB")] + public string ContactDob { get; set; } + + /// + /// The driver's license number of the primary contact. + /// + [JsonProperty(PropertyName = "contactDlNumber")] + public string ContactDlNumber { get; set; } + + /// + /// The state that issued the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlStateOrProvince")] + public string ContactDlStateOrProvince { get; set; } + + /// + /// The expiration date of the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlExpiration")] + public string ContactDlExpiration { get; set; } + + /// + /// The home address of the primary contact. + /// + [JsonProperty(PropertyName = "contactHomeAddress")] + public Address ContactHomeAddress { get; set; } + + /// + /// The role of the primary contact in the business. + /// + [JsonProperty(PropertyName = "contactRole")] + public string ContactRole { get; set; } + + /// + /// List of individuals with 25% or more ownership in the company. + /// + [JsonProperty(PropertyName = "owners")] + public List Owners { get; set; } + + /// + /// The bank account information for the business. + /// + [JsonProperty(PropertyName = "manualAccount")] + public ApplicationAccount ManualAccount { get; set; } + + /// + /// The average transaction amount. + /// + [JsonProperty(PropertyName = "averageTransaction")] + public string AverageTransaction { get; set; } + + /// + /// The highest expected transaction amount. + /// + [JsonProperty(PropertyName = "highTransaction")] + public string HighTransaction { get; set; } + + /// + /// The average monthly transaction volume. + /// + [JsonProperty(PropertyName = "averageMonth")] + public string AverageMonth { get; set; } + + /// + /// The highest expected monthly transaction volume. + /// + [JsonProperty(PropertyName = "highMonth")] + public string HighMonth { get; set; } + + /// + /// The refund policy of the business. + /// + [JsonProperty(PropertyName = "refundPolicy")] + public string RefundPolicy { get; set; } + + /// + /// The number of days after purchase that refunds can be issued. + /// + [JsonProperty(PropertyName = "refundDays")] + public string RefundDays { get; set; } + + /// + /// The time zone of the business. + /// + [JsonProperty(PropertyName = "timeZone")] + public string TimeZone { get; set; } + + /// + /// The time when the daily batch should close. + /// + [JsonProperty(PropertyName = "batchCloseTime")] + public string BatchCloseTime { get; set; } + + /// + /// Indicates if the business has multiple locations. + /// + [JsonProperty(PropertyName = "multipleLocations")] + public string MultipleLocations { get; set; } + + /// + /// The name of this specific business location. + /// + [JsonProperty(PropertyName = "locationName")] + public string LocationName { get; set; } + + /// + /// The store number for this location. + /// + [JsonProperty(PropertyName = "storeNumber")] + public string StoreNumber { get; set; } + + /// + /// Indicates if the business wants to accept EBT cards. + /// + [JsonProperty(PropertyName = "ebtRequested")] + public string EbtRequested { get; set; } + + /// + /// The FNS number issued by the USDA for EBT processing. + /// + [JsonProperty(PropertyName = "fnsNumber")] + public string FnsNumber { get; set; } + + /// + /// Indicates if the business plans to accept payments through a website. + /// + [JsonProperty(PropertyName = "ecommerce")] + public string Ecommerce { get; set; } + + /// + /// Indicates if suppliers ship products directly to customers. + /// + [JsonProperty(PropertyName = "dropShipping")] + public bool DropShipping { get; set; } + + /// + /// The percentage of transactions that will be chip or swipe. + /// + [JsonProperty(PropertyName = "cardPresentPercentage")] + public string CardPresentPercentage { get; set; } + + /// + /// The percentage of transactions that will be phone orders. + /// + [JsonProperty(PropertyName = "phoneOrderPercentage")] + public string PhoneOrderPercentage { get; set; } + + /// + /// The percentage of transactions that will be e-commerce. + /// + [JsonProperty(PropertyName = "ecomPercentage")] + public string EcomPercentage { get; set; } + + /// + /// The number of days before shipment that customers are charged. + /// + [JsonProperty(PropertyName = "billBeforeShipmentDays")] + public string BillBeforeShipmentDays { get; set; } + + /// + /// Indicates if the business plans to process recurring payments. + /// + [JsonProperty(PropertyName = "subscriptionsSupported")] + public string SubscriptionsSupported { get; set; } + + /// + /// The frequency of recurring payments (if applicable). + /// + [JsonProperty(PropertyName = "subscriptionFrequency")] + public string SubscriptionFrequency { get; set; } + + /// + /// The full legal name of the person signing the application. + /// + [JsonProperty(PropertyName = "signerName")] + public string SignerName { get; set; } + } +} diff --git a/src/BlockChyp/Entities/Owner.cs b/src/BlockChyp/Entities/Owner.cs new file mode 100644 index 0000000..9f4ae7e --- /dev/null +++ b/src/BlockChyp/Entities/Owner.cs @@ -0,0 +1,100 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using Newtonsoft.Json; + +namespace BlockChyp.Entities +{ + /// + /// Models an individual with 25% or more ownership interest in a company. + /// + public class Owner : BaseEntity + { + /// + /// The first name of the owner. + /// + [JsonProperty(PropertyName = "firstName")] + public string FirstName { get; set; } + + /// + /// The last name of the owner. + /// + [JsonProperty(PropertyName = "lastName")] + public string LastName { get; set; } + + /// + /// The job title of the owner. + /// + [JsonProperty(PropertyName = "jobTitle")] + public string JobTitle { get; set; } + + /// + /// The tax identification number (SSN) of the owner. + /// + [JsonProperty(PropertyName = "taxIdNumber")] + public string TaxIdNumber { get; set; } + + /// + /// The phone number of the owner. + /// + [JsonProperty(PropertyName = "phoneNumber")] + public string PhoneNumber { get; set; } + + /// + /// The date of birth of the owner in mm/dd/yyyy format. + /// + [JsonProperty(PropertyName = "dob")] + public string Dob { get; set; } + + /// + /// The percentage of ownership. + /// + [JsonProperty(PropertyName = "ownership")] + public string Ownership { get; set; } + + /// + /// The address of the owner. + /// + [JsonProperty(PropertyName = "address")] + public Address Address { get; set; } + + /// + /// The email address of the owner. + /// + [JsonProperty(PropertyName = "email")] + public string Email { get; set; } + + /// + /// A single line representation of the owner's address. + /// + [JsonProperty(PropertyName = "singleLineAddress")] + public string SingleLineAddress { get; set; } + + /// + /// The type of entity this owner represents. + /// + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// The driver's license number of the owner. + /// + [JsonProperty(PropertyName = "dlNumber")] + public string DlNumber { get; set; } + + /// + /// The state that issued the owner's driver's license. + /// + [JsonProperty(PropertyName = "dlStateOrProvince")] + public string DlStateOrProvince { get; set; } + + /// + /// The expiration date of the owner's driver's license. + /// + [JsonProperty(PropertyName = "dlExpiration")] + public string DlExpiration { get; set; } + } +} diff --git a/src/BlockChyp/Entities/SubmitApplicationRequest.cs b/src/BlockChyp/Entities/SubmitApplicationRequest.cs new file mode 100644 index 0000000..8022d8c --- /dev/null +++ b/src/BlockChyp/Entities/SubmitApplicationRequest.cs @@ -0,0 +1,323 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace BlockChyp.Entities +{ + /// + /// Models a merchant application submission request to add a new merchant account. + /// + public class SubmitApplicationRequest : BaseEntity, ITimeoutRequest + { + /// + /// The request timeout in seconds. + /// + [JsonProperty(PropertyName = "timeout")] + public int Timeout { get; set; } + + /// + /// Whether or not to route transaction to the test gateway. + /// + [JsonProperty(PropertyName = "test")] + public bool Test { get; set; } + + /// + /// The invite code for the merchant. + /// + [JsonProperty(PropertyName = "inviteCode")] + public string InviteCode { get; set; } + + /// + /// The business name your customers know you by (DBA Name). + /// + [JsonProperty(PropertyName = "dbaName")] + public string DbaName { get; set; } + + /// + /// The name of the legal entity you file your taxes under. + /// + [JsonProperty(PropertyName = "corporateName")] + public string CorporateName { get; set; } + + /// + /// The business website. + /// + [JsonProperty(PropertyName = "webSite")] + public string WebSite { get; set; } + + /// + /// The business tax identification number (EIN). + /// + [JsonProperty(PropertyName = "taxIdNumber")] + public string TaxIdNumber { get; set; } + + /// + /// The type of business entity. + /// + [JsonProperty(PropertyName = "entityType")] + public string EntityType { get; set; } + + /// + /// The state where the business is incorporated. + /// + [JsonProperty(PropertyName = "stateOfIncorporation")] + public string StateOfIncorporation { get; set; } + + /// + /// The primary type of business (e.g., Retail, Service, etc.). + /// + [JsonProperty(PropertyName = "merchantType")] + public string MerchantType { get; set; } + + /// + /// A short description of the products and services sold. + /// + [JsonProperty(PropertyName = "businessDescription")] + public string BusinessDescription { get; set; } + + /// + /// The number of years the business has been operating. + /// + [JsonProperty(PropertyName = "yearsInBusiness")] + public string YearsInBusiness { get; set; } + + /// + /// The business telephone number. + /// + [JsonProperty(PropertyName = "businessPhoneNumber")] + public string BusinessPhoneNumber { get; set; } + + /// + /// The physical address of the business. + /// + [JsonProperty(PropertyName = "physicalAddress")] + public Address PhysicalAddress { get; set; } + + /// + /// The mailing address of the business. + /// + [JsonProperty(PropertyName = "mailingAddress")] + public Address MailingAddress { get; set; } + + /// + /// The first name of the primary contact. + /// + [JsonProperty(PropertyName = "contactFirstName")] + public string ContactFirstName { get; set; } + + /// + /// The last name of the primary contact. + /// + [JsonProperty(PropertyName = "contactLastName")] + public string ContactLastName { get; set; } + + /// + /// The phone number of the primary contact. + /// + [JsonProperty(PropertyName = "contactPhoneNumber")] + public string ContactPhoneNumber { get; set; } + + /// + /// The email address of the primary contact. + /// + [JsonProperty(PropertyName = "contactEmail")] + public string ContactEmail { get; set; } + + /// + /// The job title of the primary contact. + /// + [JsonProperty(PropertyName = "contactTitle")] + public string ContactTitle { get; set; } + + /// + /// The tax identification number (SSN) of the primary contact. + /// + [JsonProperty(PropertyName = "contactTaxIdNumber")] + public string ContactTaxIdNumber { get; set; } + + /// + /// The date of birth of the primary contact. + /// + [JsonProperty(PropertyName = "contactDOB")] + public string ContactDob { get; set; } + + /// + /// The driver's license number of the primary contact. + /// + [JsonProperty(PropertyName = "contactDlNumber")] + public string ContactDlNumber { get; set; } + + /// + /// The state that issued the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlStateOrProvince")] + public string ContactDlStateOrProvince { get; set; } + + /// + /// The expiration date of the primary contact's driver's license. + /// + [JsonProperty(PropertyName = "contactDlExpiration")] + public string ContactDlExpiration { get; set; } + + /// + /// The home address of the primary contact. + /// + [JsonProperty(PropertyName = "contactHomeAddress")] + public Address ContactHomeAddress { get; set; } + + /// + /// The role of the primary contact in the business. + /// + [JsonProperty(PropertyName = "contactRole")] + public string ContactRole { get; set; } + + /// + /// List of individuals with 25% or more ownership in the company. + /// + [JsonProperty(PropertyName = "owners")] + public List Owners { get; set; } + + /// + /// The bank account information for the business. + /// + [JsonProperty(PropertyName = "manualAccount")] + public ApplicationAccount ManualAccount { get; set; } + + /// + /// The average transaction amount. + /// + [JsonProperty(PropertyName = "averageTransaction")] + public string AverageTransaction { get; set; } + + /// + /// The highest expected transaction amount. + /// + [JsonProperty(PropertyName = "highTransaction")] + public string HighTransaction { get; set; } + + /// + /// The average monthly transaction volume. + /// + [JsonProperty(PropertyName = "averageMonth")] + public string AverageMonth { get; set; } + + /// + /// The highest expected monthly transaction volume. + /// + [JsonProperty(PropertyName = "highMonth")] + public string HighMonth { get; set; } + + /// + /// The refund policy of the business. + /// + [JsonProperty(PropertyName = "refundPolicy")] + public string RefundPolicy { get; set; } + + /// + /// The number of days after purchase that refunds can be issued. + /// + [JsonProperty(PropertyName = "refundDays")] + public string RefundDays { get; set; } + + /// + /// The time zone of the business. + /// + [JsonProperty(PropertyName = "timeZone")] + public string TimeZone { get; set; } + + /// + /// The time when the daily batch should close. + /// + [JsonProperty(PropertyName = "batchCloseTime")] + public string BatchCloseTime { get; set; } + + /// + /// Indicates if the business has multiple locations. + /// + [JsonProperty(PropertyName = "multipleLocations")] + public string MultipleLocations { get; set; } + + /// + /// The name of this specific business location. + /// + [JsonProperty(PropertyName = "locationName")] + public string LocationName { get; set; } + + /// + /// The store number for this location. + /// + [JsonProperty(PropertyName = "storeNumber")] + public string StoreNumber { get; set; } + + /// + /// Indicates if the business wants to accept EBT cards. + /// + [JsonProperty(PropertyName = "ebtRequested")] + public string EbtRequested { get; set; } + + /// + /// The FNS number issued by the USDA for EBT processing. + /// + [JsonProperty(PropertyName = "fnsNumber")] + public string FnsNumber { get; set; } + + /// + /// Indicates if the business plans to accept payments through a website. + /// + [JsonProperty(PropertyName = "ecommerce")] + public string Ecommerce { get; set; } + + /// + /// Indicates if suppliers ship products directly to customers. + /// + [JsonProperty(PropertyName = "dropShipping")] + public bool DropShipping { get; set; } + + /// + /// The percentage of transactions that will be chip or swipe. + /// + [JsonProperty(PropertyName = "cardPresentPercentage")] + public string CardPresentPercentage { get; set; } + + /// + /// The percentage of transactions that will be phone orders. + /// + [JsonProperty(PropertyName = "phoneOrderPercentage")] + public string PhoneOrderPercentage { get; set; } + + /// + /// The percentage of transactions that will be e-commerce. + /// + [JsonProperty(PropertyName = "ecomPercentage")] + public string EcomPercentage { get; set; } + + /// + /// The number of days before shipment that customers are charged. + /// + [JsonProperty(PropertyName = "billBeforeShipmentDays")] + public string BillBeforeShipmentDays { get; set; } + + /// + /// Indicates if the business plans to process recurring payments. + /// + [JsonProperty(PropertyName = "subscriptionsSupported")] + public string SubscriptionsSupported { get; set; } + + /// + /// The frequency of recurring payments (if applicable). + /// + [JsonProperty(PropertyName = "subscriptionFrequency")] + public string SubscriptionFrequency { get; set; } + + /// + /// The full legal name of the person signing the application. + /// + [JsonProperty(PropertyName = "signerName")] + public string SignerName { get; set; } + } +} diff --git a/tests/BlockChypTest/Integration/SubmitApplicationTest.cs b/tests/BlockChypTest/Integration/SubmitApplicationTest.cs new file mode 100644 index 0000000..4997ac9 --- /dev/null +++ b/tests/BlockChypTest/Integration/SubmitApplicationTest.cs @@ -0,0 +1,154 @@ +// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is +// governed by a license that can be found in the LICENSE file. +// +// This file was generated automatically by the BlockChyp SDK Generator. Changes +// to this file will be lost every time the code is regenerated. + +using System; +using System.Collections.Generic; +using System.IO; +using BlockChyp.Entities; +using Xunit; +using Xunit.Abstractions; + +namespace BlockChypTest.Integration +{ + public class SubmitApplicationTest : IntegrationTest + { + private readonly ITestOutputHelper output; + + public SubmitApplicationTest(ITestOutputHelper output) + { + this.output = output; + } + + [Trait("Category", "partner")] + [Trait("Category", "Integration")] + [Fact] + public async void Run_SubmitApplicationTest() + { + + + + UseProfile("partner"); + + + SubmitApplicationRequest request = new SubmitApplicationRequest + { + Test = true, + InviteCode = "asdf", + DbaName = "BlockChyp", + CorporateName = "BlockChyp Inc.", + WebSite = "https://www.blockchyp.com", + TaxIdNumber = "123456789", + EntityType = "CORPORATION", + StateOfIncorporation = "UT", + MerchantType = "RETAIL", + BusinessDescription = "Payment processing solutions", + YearsInBusiness = "5", + BusinessPhoneNumber = "5555551234", + PhysicalAddress = new Address + { + Address1 = "355 S 520 W", + City = "Lindon", + StateOrProvince = "UT", + PostalCode = "84042", + CountryCode = "US", + }, + MailingAddress = new Address + { + Address1 = "355 S 520 W", + City = "Lindon", + StateOrProvince = "UT", + PostalCode = "84042", + CountryCode = "US", + }, + ContactFirstName = "John", + ContactLastName = "Doe", + ContactPhoneNumber = "5555555678", + ContactEmail = "john.doe@example.com", + ContactTitle = "CEO", + ContactTaxIdNumber = "987654321", + ContactDob = "1980-01-01", + ContactDlNumber = "D1234567", + ContactDlStateOrProvince = "NY", + ContactDlExpiration = "2025-12-31", + ContactHomeAddress = new Address + { + Address1 = "355 S 520 W", + City = "Lindon", + StateOrProvince = "UT", + PostalCode = "84042", + CountryCode = "US", + }, + ContactRole = "OWNER", + Owners = new List + { + new Owner + { + FirstName = "John", + LastName = "Doe", + JobTitle = "CEO", + TaxIdNumber = "876543210", + PhoneNumber = "5555559876", + Dob = "1981-02-02", + Ownership = "50", + Email = "john.doe@example.com", + DlNumber = "D7654321", + DlStateOrProvince = "UT", + DlExpiration = "2024-12-31", + Address = new Address + { + Address1 = "355 S 520 W", + City = "Lindon", + StateOrProvince = "UT", + PostalCode = "84042", + CountryCode = "US", + }, + } + }, + ManualAccount = new ApplicationAccount + { + Name = "Business Checking", + Bank = "Test Bank", + AccountHolderName = "BlockChyp Inc.", + RoutingNumber = "124001545", + AccountNumber = "987654321", + }, + AverageTransaction = "100.00", + HighTransaction = "1000.00", + AverageMonth = "10000.00", + HighMonth = "20000.00", + RefundPolicy = "30_DAYS", + RefundDays = "30", + TimeZone = "America/Denver", + BatchCloseTime = "23:59", + MultipleLocations = "false", + EbtRequested = "false", + Ecommerce = "true", + CardPresentPercentage = "70", + PhoneOrderPercentage = "10", + EcomPercentage = "20", + SignerName = "John Doe", + }; + + output.WriteLine("Request: {0}", request); + + Exception err = null; + try + { + Acknowledgement response = await blockchyp.SubmitApplicationAsync(request); + output.WriteLine("Response: {0}", response); + Assert.True(response.Success, "response.Success"); + } + catch (Exception e) { + err = e; + } + + + Assert.Null(err); + + + } + } +}