diff --git a/README.md b/README.md index d2bc665..5a99120 100644 --- a/README.md +++ b/README.md @@ -5858,7 +5858,9 @@ func merchantCredentialGenerationExample() { client := blockchyp.NewClient(creds) // setup request object - request := blockchyp.MerchantCredentialGenerationRequest{} + request := blockchyp.MerchantCredentialGenerationRequest{ + MerchantID: "", + } response, err := client.MerchantCredentialGeneration(request) @@ -5876,6 +5878,71 @@ func merchantCredentialGenerationExample() { ``` +#### 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. + + + + +```go +package main + +import ( + "fmt" + "log" + + blockchyp "github.com/blockchyp/blockchyp-go/v2" +) + +func submitApplicationExample() { + // sample credentials + creds := blockchyp.APICredentials{ + APIKey: "ZDSMMZLGRPBPRTJUBTAFBYZ33Q", + BearerToken: "ZLBW5NR4U5PKD5PNP3ZP3OZS5U", + SigningKey: "9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947", + } + + // instantiate the client + client := blockchyp.NewClient(creds) + + // setup request object + request := blockchyp.SubmitApplicationRequest{} + + response, err := client.SubmitApplication(request) + + if err != nil { + log.Fatal(err) + } + + //process the result + if response.Success { + fmt.Println("Success") + } + + fmt.Printf("Response: %+v\n", response) +} + +``` + diff --git a/blockchyp.go b/blockchyp.go index 49f15df..dc75090 100644 --- a/blockchyp.go +++ b/blockchyp.go @@ -1493,6 +1493,21 @@ func (client *Client) MerchantCredentialGeneration(request MerchantCredentialGen return &response, err } +// SubmitApplication submits and application to add a new merchant account. +func (client *Client) SubmitApplication(request SubmitApplicationRequest) (*Acknowledgement, error) { + var response Acknowledgement + + err := client.DashboardRequest("/api/submit-application", "POST", request, &response, request.Timeout) + + if err, ok := err.(net.Error); ok && err.Timeout() { + response.ResponseDescription = ResponseTimedOut + } else if err != nil { + response.ResponseDescription = err.Error() + } + + return &response, err +} + // GetMerchants adds a test merchant account. func (client *Client) GetMerchants(request GetMerchantsRequest) (*GetMerchantsResponse, error) { var response GetMerchantsResponse diff --git a/cmd/blockchyp/main.go b/cmd/blockchyp/main.go index 397c7b3..963af4f 100644 --- a/cmd/blockchyp/main.go +++ b/cmd/blockchyp/main.go @@ -186,24 +186,24 @@ func parseArgs() blockchyp.CommandLineArguments { flag.BoolVar(&args.Incremental, "incremental", false, "force incremental firmware downloads") flag.BoolVar(&args.ChipRejection, "chipRejection", false, "simulates a chip rejection") flag.BoolVar(&args.OutOfOrderReversal, "outOfOrderReversal", false, "simulates an out of order auto reversal") - flag.BoolVar(&args.AsyncReversals, "asyncReversals", false, "causes auto-reversals to run asynchronously") + flag.BoolVar(&args.AsyncReversals, "asyncReversals", false, "causes auto-reversals to run asynchronously.") flag.BoolVar(&args.CardOnFile, "cardOnFile", false, "flags a transaction as MOTO / card on file.") flag.BoolVar(&args.Recurring, "recurring", false, "flags a transaction as recurring.") flag.BoolVar(&args.MIT, "mit", false, "manually sets the MIT flag.") flag.BoolVar(&args.CIT, "cit", false, "manually sets the CIT flag.") flag.BoolVar(&args.Subscription, "subscription", false, "flags a transaction as a subscription.") flag.StringVar(&args.PONumber, "po", "", "purchase order for L2 transactions") - flag.StringVar(&args.SupplierReferenceNumber, "srn", "", "supplier reference number for L2 transactions") - flag.StringVar(&args.PolicyID, "policy", "", "policy id for pricing policy related operations") - flag.StringVar(&args.StatementID, "statementId", "", "statement id for partner or merchant statement operations") - flag.StringVar(&args.InvoiceID, "invoiceId", "", "invoice id for partner or merchant statement/invoice operations") + flag.StringVar(&args.SupplierReferenceNumber, "srn", "", "supplier reference number for L2 transactions.") + flag.StringVar(&args.PolicyID, "policy", "", "policy id for pricing policy related operations.") + flag.StringVar(&args.StatementID, "statementId", "", "statement id for partner or merchant statement operations.") + flag.StringVar(&args.InvoiceID, "invoiceId", "", "invoice id for partner or merchant statement/invoice operations.") flag.IntVar(&args.ShipmentNumber, "shipmentNumber", 0, "indicates the shipment number in a split shipment order.") flag.IntVar(&args.ShipmentCount, "shipmentCount", 0, "indicates the total number of shipments in a split shipment order.") flag.StringVar(&args.EntryMethod, "entryMethod", "", "is the method by which the payment card was entered.") - flag.BoolVar(&args.DeleteProtected, "deleteProtected", false, "protects the credentials from deletion") - flag.StringVar(&args.Roles, "roles", "", "an optional array of role codes that will be assigned to the credentials") - flag.StringVar(&args.Notes, "notes", "", "free form description of the purpose or intent behind the credentials") - flag.StringVar(&args.CredType, "credType", "", "is the type of credential to be generated, API or TOKENIZING") + flag.BoolVar(&args.DeleteProtected, "deleteProtected", false, "protects the credentials from deletion.") + flag.StringVar(&args.Roles, "roles", "", "an optional array of role codes that will be assigned to the credentials.") + flag.StringVar(&args.Notes, "notes", "", "free form description of the purpose or intent behind the credentials.") + flag.StringVar(&args.CredType, "credType", "", "is the type of credential to be generated, API or TOKENIZING.") flag.Parse() if args.Version { @@ -476,6 +476,8 @@ func processCommand(args blockchyp.CommandLineArguments) { processUnlinkToken(client, args) case "drop-terminal-socket": processDropSocket(client, args) + case "submit-application": + processSubmitApplication(client, args) default: fatalErrorf("unknown command: %s", cmd) } @@ -2747,6 +2749,24 @@ func processTokenDelete(client *blockchyp.Client, args blockchyp.CommandLineArgu dumpResponse(&args, res) } +func processSubmitApplication(client *blockchyp.Client, args blockchyp.CommandLineArguments) { + + request := &blockchyp.SubmitApplicationRequest{} + + if !parseJSONInput(args, request) { + if (args.JSON == "") && args.JSONFile == "" { + fatalError("-json or -jsonFile required") + } + } + + ack, err := client.SubmitApplication(*request) + if err != nil { + handleError(&args, err) + } + + dumpResponse(&args, ack) +} + func parseTimestamp(ts string) (time.Time, error) { parsedResult, err := parseTimestampWithFormat(ts, time.RFC3339) diff --git a/models.go b/models.go index e503f2d..71e2aae 100644 --- a/models.go +++ b/models.go @@ -7339,6 +7339,400 @@ type AggregateBillingLineItemStats struct { Max string `json:"max"` } +// Owner models an individual with 25% or more ownership interest in a +// company. +type Owner struct { + // FirstName is the first name of the owner. + FirstName string `json:"firstName"` + + // LastName is the last name of the owner. + LastName string `json:"lastName"` + + // JobTitle is the job title of the owner. + JobTitle string `json:"jobTitle"` + + // TaxIDNumber is the tax identification number (SSN) of the owner. + TaxIDNumber string `json:"taxIdNumber"` + + // PhoneNumber is the phone number of the owner. + PhoneNumber string `json:"phoneNumber"` + + // Dob is the date of birth of the owner in mm/dd/yyyy format. + Dob string `json:"dob"` + + // Ownership is the percentage of ownership. + Ownership string `json:"ownership"` + + // Address is the address of the owner. + Address Address `json:"address"` + + // Email is the email address of the owner. + Email string `json:"email"` + + // SingleLineAddress A single line representation of the owner's address. + SingleLineAddress string `json:"singleLineAddress"` + + // EntityType is the type of entity this owner represents. + EntityType string `json:"entityType"` + + // DlNumber is the driver's license number of the owner. + DlNumber string `json:"dlNumber"` + + // DlStateOrProvince is the state that issued the owner's driver's license. + DlStateOrProvince string `json:"dlStateOrProvince"` + + // DlExpiration is the expiration date of the owner's driver's license. + DlExpiration string `json:"dlExpiration"` +} + +// ApplicationAccount models a bank account associated with an application. +type ApplicationAccount struct { + // Name is the name of the bank account. + Name string `json:"name"` + + // Bank is the name of the bank. + Bank string `json:"bank"` + + // AccountHolderName is the name of the account holder. + AccountHolderName string `json:"accountHolderName"` + + // RoutingNumber is the routing number of the bank. + RoutingNumber string `json:"routingNumber"` + + // AccountNumber is the account number. + AccountNumber string `json:"accountNumber"` +} + +// MerchantApplication models a merchant application form to add a merchant +// account. +type MerchantApplication struct { + // InviteCode is the invite code for the merchant. + InviteCode string `json:"inviteCode"` + + // DBAName is the business name your customers know you by (DBA Name). + DBAName string `json:"dbaName"` + + // CorporateName is the name of the legal entity you file your taxes under. + CorporateName string `json:"corporateName"` + + // WebSite is the business website. + WebSite string `json:"webSite"` + + // TaxIDNumber is the business tax identification number (EIN). + TaxIDNumber string `json:"taxIdNumber"` + + // EntityType is the type of business entity. + EntityType string `json:"entityType"` + + // StateOfIncorporation is the state where the business is incorporated. + StateOfIncorporation string `json:"stateOfIncorporation"` + + // MerchantType is the primary type of business (e.g., Retail, Service, + // etc.). + MerchantType string `json:"merchantType"` + + // BusinessDescription A short description of the products and services sold. + BusinessDescription string `json:"businessDescription"` + + // YearsInBusiness is the number of years the business has been operating. + YearsInBusiness string `json:"yearsInBusiness"` + + // BusinessPhoneNumber is the business telephone number. + BusinessPhoneNumber string `json:"businessPhoneNumber"` + + // PhysicalAddress is the physical address of the business. + PhysicalAddress Address `json:"physicalAddress"` + + // MailingAddress is the mailing address of the business. + MailingAddress Address `json:"mailingAddress"` + + // ContactFirstName is the first name of the primary contact. + ContactFirstName string `json:"contactFirstName"` + + // ContactLastName is the last name of the primary contact. + ContactLastName string `json:"contactLastName"` + + // ContactPhoneNumber is the phone number of the primary contact. + ContactPhoneNumber string `json:"contactPhoneNumber"` + + // ContactEmail is the email address of the primary contact. + ContactEmail string `json:"contactEmail"` + + // ContactTitle is the job title of the primary contact. + ContactTitle string `json:"contactTitle"` + + // ContactTaxIDNumber is the tax identification number (SSN) of the primary + // contact. + ContactTaxIDNumber string `json:"contactTaxIdNumber"` + + // ContactDob is the date of birth of the primary contact. + ContactDob string `json:"contactDOB"` + + // ContactDlNumber is the driver's license number of the primary contact. + ContactDlNumber string `json:"contactDlNumber"` + + // ContactDlStateOrProvince is the state that issued the primary contact's + // driver's license. + ContactDlStateOrProvince string `json:"contactDlStateOrProvince"` + + // ContactDlExpiration is the expiration date of the primary contact's + // driver's license. + ContactDlExpiration string `json:"contactDlExpiration"` + + // ContactHomeAddress is the home address of the primary contact. + ContactHomeAddress Address `json:"contactHomeAddress"` + + // ContactRole is the role of the primary contact in the business. + ContactRole string `json:"contactRole"` + + // Owners List of individuals with 25% or more ownership in the company. + Owners []*Owner `json:"owners"` + + // ManualAccount is the bank account information for the business. + ManualAccount ApplicationAccount `json:"manualAccount"` + + // AverageTransaction is the average transaction amount. + AverageTransaction string `json:"averageTransaction"` + + // HighTransaction is the highest expected transaction amount. + HighTransaction string `json:"highTransaction"` + + // AverageMonth is the average monthly transaction volume. + AverageMonth string `json:"averageMonth"` + + // HighMonth is the highest expected monthly transaction volume. + HighMonth string `json:"highMonth"` + + // RefundPolicy is the refund policy of the business. + RefundPolicy string `json:"refundPolicy"` + + // RefundDays is the number of days after purchase that refunds can be + // issued. + RefundDays string `json:"refundDays"` + + // TimeZone is the time zone of the business. + TimeZone string `json:"timeZone"` + + // BatchCloseTime is the time when the daily batch should close. + BatchCloseTime string `json:"batchCloseTime"` + + // MultipleLocations Indicates if the business has multiple locations. + MultipleLocations string `json:"multipleLocations"` + + // LocationName is the name of this specific business location. + LocationName string `json:"locationName"` + + // StoreNumber is the store number for this location. + StoreNumber string `json:"storeNumber"` + + // EBTRequested Indicates if the business wants to accept EBT cards. + EBTRequested string `json:"ebtRequested"` + + // FnsNumber is the FNS number issued by the USDA for EBT processing. + FnsNumber string `json:"fnsNumber"` + + // Ecommerce Indicates if the business plans to accept payments through a + // website. + Ecommerce string `json:"ecommerce"` + + // DropShipping Indicates if suppliers ship products directly to customers. + DropShipping bool `json:"dropShipping"` + + // CardPresentPercentage is the percentage of transactions that will be chip + // or swipe. + CardPresentPercentage string `json:"cardPresentPercentage"` + + // PhoneOrderPercentage is the percentage of transactions that will be phone + // orders. + PhoneOrderPercentage string `json:"phoneOrderPercentage"` + + // EcomPercentage is the percentage of transactions that will be e-commerce. + EcomPercentage string `json:"ecomPercentage"` + + // BillBeforeShipmentDays is the number of days before shipment that + // customers are charged. + BillBeforeShipmentDays string `json:"billBeforeShipmentDays"` + + // SubscriptionsSupported Indicates if the business plans to process + // recurring payments. + SubscriptionsSupported string `json:"subscriptionsSupported"` + + // SubscriptionFrequency is the frequency of recurring payments (if + // applicable). + SubscriptionFrequency string `json:"subscriptionFrequency"` + + // SignerName is the full legal name of the person signing the application. + SignerName string `json:"signerName"` +} + +// SubmitApplicationRequest models a merchant application submission request +// to add a new merchant account. +type SubmitApplicationRequest struct { + // Timeout is the request timeout in seconds. + Timeout int `json:"timeout"` + + // Test specifies whether or not to route transaction to the test gateway. + Test bool `json:"test"` + + // InviteCode is the invite code for the merchant. + InviteCode string `json:"inviteCode"` + + // DBAName is the business name your customers know you by (DBA Name). + DBAName string `json:"dbaName"` + + // CorporateName is the name of the legal entity you file your taxes under. + CorporateName string `json:"corporateName"` + + // WebSite is the business website. + WebSite string `json:"webSite"` + + // TaxIDNumber is the business tax identification number (EIN). + TaxIDNumber string `json:"taxIdNumber"` + + // EntityType is the type of business entity. + EntityType string `json:"entityType"` + + // StateOfIncorporation is the state where the business is incorporated. + StateOfIncorporation string `json:"stateOfIncorporation"` + + // MerchantType is the primary type of business (e.g., Retail, Service, + // etc.). + MerchantType string `json:"merchantType"` + + // BusinessDescription A short description of the products and services sold. + BusinessDescription string `json:"businessDescription"` + + // YearsInBusiness is the number of years the business has been operating. + YearsInBusiness string `json:"yearsInBusiness"` + + // BusinessPhoneNumber is the business telephone number. + BusinessPhoneNumber string `json:"businessPhoneNumber"` + + // PhysicalAddress is the physical address of the business. + PhysicalAddress Address `json:"physicalAddress"` + + // MailingAddress is the mailing address of the business. + MailingAddress Address `json:"mailingAddress"` + + // ContactFirstName is the first name of the primary contact. + ContactFirstName string `json:"contactFirstName"` + + // ContactLastName is the last name of the primary contact. + ContactLastName string `json:"contactLastName"` + + // ContactPhoneNumber is the phone number of the primary contact. + ContactPhoneNumber string `json:"contactPhoneNumber"` + + // ContactEmail is the email address of the primary contact. + ContactEmail string `json:"contactEmail"` + + // ContactTitle is the job title of the primary contact. + ContactTitle string `json:"contactTitle"` + + // ContactTaxIDNumber is the tax identification number (SSN) of the primary + // contact. + ContactTaxIDNumber string `json:"contactTaxIdNumber"` + + // ContactDob is the date of birth of the primary contact. + ContactDob string `json:"contactDOB"` + + // ContactDlNumber is the driver's license number of the primary contact. + ContactDlNumber string `json:"contactDlNumber"` + + // ContactDlStateOrProvince is the state that issued the primary contact's + // driver's license. + ContactDlStateOrProvince string `json:"contactDlStateOrProvince"` + + // ContactDlExpiration is the expiration date of the primary contact's + // driver's license. + ContactDlExpiration string `json:"contactDlExpiration"` + + // ContactHomeAddress is the home address of the primary contact. + ContactHomeAddress Address `json:"contactHomeAddress"` + + // ContactRole is the role of the primary contact in the business. + ContactRole string `json:"contactRole"` + + // Owners List of individuals with 25% or more ownership in the company. + Owners []*Owner `json:"owners"` + + // ManualAccount is the bank account information for the business. + ManualAccount ApplicationAccount `json:"manualAccount"` + + // AverageTransaction is the average transaction amount. + AverageTransaction string `json:"averageTransaction"` + + // HighTransaction is the highest expected transaction amount. + HighTransaction string `json:"highTransaction"` + + // AverageMonth is the average monthly transaction volume. + AverageMonth string `json:"averageMonth"` + + // HighMonth is the highest expected monthly transaction volume. + HighMonth string `json:"highMonth"` + + // RefundPolicy is the refund policy of the business. + RefundPolicy string `json:"refundPolicy"` + + // RefundDays is the number of days after purchase that refunds can be + // issued. + RefundDays string `json:"refundDays"` + + // TimeZone is the time zone of the business. + TimeZone string `json:"timeZone"` + + // BatchCloseTime is the time when the daily batch should close. + BatchCloseTime string `json:"batchCloseTime"` + + // MultipleLocations Indicates if the business has multiple locations. + MultipleLocations string `json:"multipleLocations"` + + // LocationName is the name of this specific business location. + LocationName string `json:"locationName"` + + // StoreNumber is the store number for this location. + StoreNumber string `json:"storeNumber"` + + // EBTRequested Indicates if the business wants to accept EBT cards. + EBTRequested string `json:"ebtRequested"` + + // FnsNumber is the FNS number issued by the USDA for EBT processing. + FnsNumber string `json:"fnsNumber"` + + // Ecommerce Indicates if the business plans to accept payments through a + // website. + Ecommerce string `json:"ecommerce"` + + // DropShipping Indicates if suppliers ship products directly to customers. + DropShipping bool `json:"dropShipping"` + + // CardPresentPercentage is the percentage of transactions that will be chip + // or swipe. + CardPresentPercentage string `json:"cardPresentPercentage"` + + // PhoneOrderPercentage is the percentage of transactions that will be phone + // orders. + PhoneOrderPercentage string `json:"phoneOrderPercentage"` + + // EcomPercentage is the percentage of transactions that will be e-commerce. + EcomPercentage string `json:"ecomPercentage"` + + // BillBeforeShipmentDays is the number of days before shipment that + // customers are charged. + BillBeforeShipmentDays string `json:"billBeforeShipmentDays"` + + // SubscriptionsSupported Indicates if the business plans to process + // recurring payments. + SubscriptionsSupported string `json:"subscriptionsSupported"` + + // SubscriptionFrequency is the frequency of recurring payments (if + // applicable). + SubscriptionFrequency string `json:"subscriptionFrequency"` + + // SignerName is the full legal name of the person signing the application. + SignerName string `json:"signerName"` +} + // TerminalCaptureSignatureRequest contains a request for customer signature // data. type TerminalCaptureSignatureRequest struct { diff --git a/pkg/examples/merchant_credential_generation_example.go b/pkg/examples/merchant_credential_generation_example.go index 0c994ef..dd7741c 100644 --- a/pkg/examples/merchant_credential_generation_example.go +++ b/pkg/examples/merchant_credential_generation_example.go @@ -19,7 +19,9 @@ func merchantCredentialGenerationExample() { client := blockchyp.NewClient(creds) // setup request object - request := blockchyp.MerchantCredentialGenerationRequest{} + request := blockchyp.MerchantCredentialGenerationRequest{ + MerchantID: "", + } response, err := client.MerchantCredentialGeneration(request) diff --git a/pkg/examples/submit_application_example.go b/pkg/examples/submit_application_example.go new file mode 100644 index 0000000..5f160dc --- /dev/null +++ b/pkg/examples/submit_application_example.go @@ -0,0 +1,36 @@ +package main + +import ( + "fmt" + "log" + + blockchyp "github.com/blockchyp/blockchyp-go/v2" +) + +func submitApplicationExample() { + // sample credentials + creds := blockchyp.APICredentials{ + APIKey: "ZDSMMZLGRPBPRTJUBTAFBYZ33Q", + BearerToken: "ZLBW5NR4U5PKD5PNP3ZP3OZS5U", + SigningKey: "9c6a5e8e763df1c9256e3d72bd7f53dfbd07312938131c75b3bfd254da787947", + } + + // instantiate the client + client := blockchyp.NewClient(creds) + + // setup request object + request := blockchyp.SubmitApplicationRequest{} + + response, err := client.SubmitApplication(request) + + if err != nil { + log.Fatal(err) + } + + //process the result + if response.Success { + fmt.Println("Success") + } + + fmt.Printf("Response: %+v\n", response) +} diff --git a/pkg/itests/submit_application_test.go b/pkg/itests/submit_application_test.go new file mode 100644 index 0000000..14c9d81 --- /dev/null +++ b/pkg/itests/submit_application_test.go @@ -0,0 +1,128 @@ +//go:build integration +// +build integration + +// 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. + +package itests + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + blockchyp "github.com/blockchyp/blockchyp-go/v2" +) + +func TestSubmitApplication(t *testing.T) { + assert := assert.New(t) + + config := loadTestConfiguration(t) + client := config.newTestClient(t, "partner") + + // setup request object + request := blockchyp.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: blockchyp.Address{ + Address1: "355 S 520 W", + City: "Lindon", + StateOrProvince: "UT", + PostalCode: "84042", + CountryCode: "US", + }, + MailingAddress: blockchyp.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: blockchyp.Address{ + Address1: "355 S 520 W", + City: "Lindon", + StateOrProvince: "UT", + PostalCode: "84042", + CountryCode: "US", + }, + ContactRole: "OWNER", + Owners: []*blockchyp.Owner{ + &blockchyp.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: blockchyp.Address{ + Address1: "355 S 520 W", + City: "Lindon", + StateOrProvince: "UT", + PostalCode: "84042", + CountryCode: "US", + }, + }, + }, + ManualAccount: blockchyp.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", + } + + logObj(t, "Request:", request) + + response, err := client.SubmitApplication(request) + + assert.NoError(err) + + logObj(t, "Response:", response) + + // response assertions + assert.True(response.Success) +}