From 85dabc121885618fc1a2d0e7fa3462ac6a3366c8 Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Wed, 1 Oct 2025 08:01:38 -0500 Subject: [PATCH 1/2] Fixes issue 21 on dwolla-typescript repo --- openapi.yml | 30 +++++++------------ .../customers/listBusinessClassifications.yml | 12 +------- .../createListCustomerFundingSources.yml | 4 +-- .../BusinessClassifications.yml | 7 +++-- specs/schemas/common.yml | 3 ++ specs/schemas/customers/UpdateCustomer.yml | 4 --- 6 files changed, 20 insertions(+), 40 deletions(-) diff --git a/openapi.yml b/openapi.yml index a3b6b6d..8ce0678 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1114,17 +1114,7 @@ paths: content: application/vnd.dwolla.v1.hal+json: schema: - type: object - properties: - _links: - type: object - _embedded: - type: object - properties: - business-classifications: - type: array - items: - $ref: '#/components/schemas/BusinessClassifications' + $ref: '#/components/schemas/BusinessClassifications' '403': description: Forbidden headers: {} @@ -3010,9 +3000,7 @@ paths: content: application/vnd.dwolla.v1.hal+json: schema: - type: array - items: - $ref: '#/components/schemas/FundingSources' + $ref: '#/components/schemas/FundingSources' '403': description: forbidden headers: {} @@ -9554,6 +9542,9 @@ components: state: type: string example: IA + country: + type: string + example: US Account: title: Account type: object @@ -10942,7 +10933,6 @@ components: example: 6789 dateOfBirth: type: string - format: date example: '1980-01-31' address: type: object @@ -11020,7 +11010,6 @@ components: example: business dateOfBirth: type: string - format: date example: '1980-01-31' ssn: type: string @@ -11167,7 +11156,6 @@ components: example: 6789 dateOfBirth: type: string - format: date example: '1980-01-31' address: type: object @@ -11245,7 +11233,6 @@ components: example: business dateOfBirth: type: string - format: date example: '1980-01-31' ssn: type: string @@ -11308,16 +11295,19 @@ components: type: object properties: _links: - type: object additionalProperties: $ref: '#/components/schemas/HalLink' _embedded: type: object properties: - mass-payments: + business-classifications: type: array items: $ref: '#/components/schemas/BusinessClassification' + total: + type: integer + format: int32 + example: 3 BeneficialOwner: title: BeneficialOwner description: Request body model for a Beneficial Owner diff --git a/specs/resources/customers/listBusinessClassifications.yml b/specs/resources/customers/listBusinessClassifications.yml index c1eb76e..9ad9fce 100644 --- a/specs/resources/customers/listBusinessClassifications.yml +++ b/specs/resources/customers/listBusinessClassifications.yml @@ -45,17 +45,7 @@ get: content: application/vnd.dwolla.v1.hal+json: schema: - type: object - properties: - _links: - type: object - _embedded: - type: object - properties: - business-classifications: - type: array - items: - $ref: '../../schemas/business-classifications/BusinessClassifications.yml#/BusinessClassifications' + $ref: '../../schemas/business-classifications/BusinessClassifications.yml#/BusinessClassifications' '403': description: Forbidden headers: {} diff --git a/specs/resources/funding-sources/createListCustomerFundingSources.yml b/specs/resources/funding-sources/createListCustomerFundingSources.yml index 2752126..61b16fc 100644 --- a/specs/resources/funding-sources/createListCustomerFundingSources.yml +++ b/specs/resources/funding-sources/createListCustomerFundingSources.yml @@ -61,9 +61,7 @@ get: content: application/vnd.dwolla.v1.hal+json: schema: - type: array - items: - $ref: '../../schemas/funding-sources/FundingSources.yml#/FundingSources' + $ref: '../../schemas/funding-sources/FundingSources.yml#/FundingSources' '403': description: forbidden headers: {} diff --git a/specs/schemas/business-classifications/BusinessClassifications.yml b/specs/schemas/business-classifications/BusinessClassifications.yml index b604255..8b00eb0 100644 --- a/specs/schemas/business-classifications/BusinessClassifications.yml +++ b/specs/schemas/business-classifications/BusinessClassifications.yml @@ -3,13 +3,16 @@ BusinessClassifications: type: object properties: _links: - type: object additionalProperties: $ref: '../common.yml#/components/schemas/HalLink' _embedded: type: object properties: - mass-payments: + business-classifications: type: array items: $ref: './BusinessClassification.yml#/BusinessClassification' + total: + type: integer + format: int32 + example: 3 diff --git a/specs/schemas/common.yml b/specs/schemas/common.yml index 454a53d..6474830 100644 --- a/specs/schemas/common.yml +++ b/specs/schemas/common.yml @@ -219,6 +219,9 @@ components: state: type: string example: IA + country: + type: string + example: US InternationalAddress: title: InternationalAddress type: object diff --git a/specs/schemas/customers/UpdateCustomer.yml b/specs/schemas/customers/UpdateCustomer.yml index 3abfc64..87466c7 100644 --- a/specs/schemas/customers/UpdateCustomer.yml +++ b/specs/schemas/customers/UpdateCustomer.yml @@ -204,7 +204,6 @@ UpgradeToVerifiedBusiness: example: 6789 dateOfBirth: type: string - format: date example: 1980-01-31 address: type: object @@ -282,7 +281,6 @@ UpgradeToVerifiedSoleProp: example: business dateOfBirth: type: string - format: date example: 1980-01-31 ssn: type: string @@ -429,7 +427,6 @@ RetryVerifiedBusiness: example: 6789 dateOfBirth: type: string - format: date example: 1980-01-31 address: type: object @@ -507,7 +504,6 @@ RetryVerifiedSoleProp: example: business dateOfBirth: type: string - format: date example: 1980-01-31 ssn: type: string From d5da894419e5ec06b893273135bce914e24d17cc Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Wed, 1 Oct 2025 09:09:39 -0500 Subject: [PATCH 2/2] Add new schemas for handling business verified retry scenarios --- openapi.yml | 190 +++++++++++++++++- .../customers/retrieveUpdateCustomer.yml | 4 +- specs/schemas/customers/UpdateCustomer.yml | 186 ++++++++++++++++- 3 files changed, 370 insertions(+), 10 deletions(-) diff --git a/openapi.yml b/openapi.yml index 8ce0678..f564b67 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1023,7 +1023,9 @@ paths: - $ref: '#/components/schemas/UpgradeToVerifiedBusiness' - $ref: '#/components/schemas/UpgradeToVerifiedSoleProp' - $ref: '#/components/schemas/RetryVerifiedPersonal' - - $ref: '#/components/schemas/RetryVerifiedBusiness' + - $ref: '#/components/schemas/RetryVerifiedBusinessNoController' + - $ref: '#/components/schemas/RetryVerifiedBusinessWithController' + - $ref: '#/components/schemas/RetryVerifiedBusinessWithInternationalController' - $ref: '#/components/schemas/RetryVerifiedSoleProp' responses: '200': @@ -10777,6 +10779,7 @@ components: UpdateVerifiedPersonal: title: UpdateVerifiedPersonal description: Update Verified Personal Customer Information + type: object properties: email: type: string @@ -11087,9 +11090,66 @@ components: ssn: type: string example: 1234 - RetryVerifiedBusiness: - title: RetryVerifiedBusiness - description: Retry Verification for Verified Business Customer + RetryVerifiedBusinessNoController: + title: RetryVerifiedBusinessNoController + description: Retry Verification for Verified Business Customer where only Business Details need to be retried + type: object + required: + - firstName + - lastName + - email + - type + - address1 + - city + - state + - postalCode + - businessClassification + - businessType + - businessName + - ein + properties: + firstName: + type: string + example: Account + lastName: + type: string + example: Admin + email: + type: string + example: accountAdmin@email.com + ipAddress: + type: string + example: 143.156.7.8 + type: + type: string + example: business + address1: + type: string + example: 99-99 33rd St + city: + type: string + example: Some City + state: + type: string + example: NY + postalCode: + type: string + example: 11101 + businessClassification: + type: string + example: 9ed3f670-7d6f-11e3-b1ce-5404a6144203 + businessType: + type: string + example: llc + businessName: + type: string + example: Jane Corp + ein: + type: string + example: 00-0000000 + RetryVerifiedBusinessWithController: + title: RetryVerifiedBusinessWithController + description: Retry Verification for Verified Business Customer where Business Details as well as Controller Details need to be retried type: object required: - firstName @@ -11139,6 +11199,7 @@ components: - firstName - lastName - title + - ssn - dateOfBirth - address properties: @@ -11153,7 +11214,7 @@ components: example: CEO ssn: type: string - example: 6789 + example: 123456789 dateOfBirth: type: string example: '1980-01-31' @@ -11196,6 +11257,125 @@ components: ein: type: string example: 00-0000000 + RetryVerifiedBusinessWithInternationalController: + title: RetryVerifiedBusinessWithInternationalController + description: Retry Verification for Verified Business Customer where Business Details as well as International Controller Details need to be retried + type: object + required: + - firstName + - lastName + - email + - type + - address1 + - city + - state + - postalCode + - controller + - businessClassification + - businessType + - businessName + - ein + properties: + firstName: + type: string + example: Account + lastName: + type: string + example: Admin + email: + type: string + example: accountAdmin@email.com + ipAddress: + type: string + example: 143.156.7.8 + type: + type: string + example: business + address1: + type: string + example: 99-99 33rd St + city: + type: string + example: Some City + state: + type: string + example: NY + postalCode: + type: string + example: 11101 + controller: + type: object + required: + - firstName + - lastName + - title + - dateOfBirth + - address + - passport + properties: + firstName: + type: string + example: John + lastName: + type: string + example: Controller + title: + type: string + example: CEO + dateOfBirth: + type: string + example: '1980-01-31' + address: + type: object + required: + - address1 + - city + - country + - stateProvinceRegion + properties: + address1: + type: string + example: 462 Main Street + address2: + type: string + example: Suite 123 + address3: + type: string + example: Unit 123 + city: + type: string + example: Des Moines + postalCode: + type: string + example: '50309' + country: + type: string + example: USA + stateProvinceRegion: + type: string + example: IA + passport: + type: object + required: + - number + - country + properties: + number: + type: string + country: + type: string + businessClassification: + type: string + example: 9ed3f670-7d6f-11e3-b1ce-5404a6144203 + businessType: + type: string + example: llc + businessName: + type: string + example: Jane Corp + ein: + type: string + example: 00-0000000 RetryVerifiedSoleProp: title: RetryVerifiedSoleProp description: Retry Verification for Verified Business Customer (Sole Proprietorship) diff --git a/specs/resources/customers/retrieveUpdateCustomer.yml b/specs/resources/customers/retrieveUpdateCustomer.yml index 4349bcd..5b72a06 100644 --- a/specs/resources/customers/retrieveUpdateCustomer.yml +++ b/specs/resources/customers/retrieveUpdateCustomer.yml @@ -164,7 +164,9 @@ post: - $ref: '../../schemas/customers/UpdateCustomer.yml#/UpgradeToVerifiedBusiness' - $ref: '../../schemas/customers/UpdateCustomer.yml#/UpgradeToVerifiedSoleProp' - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedPersonal' - - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedBusiness' + - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedBusinessNoController' + - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedBusinessWithController' + - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedBusinessWithInternationalController' - $ref: '../../schemas/customers/UpdateCustomer.yml#/RetryVerifiedSoleProp' responses: '200': diff --git a/specs/schemas/customers/UpdateCustomer.yml b/specs/schemas/customers/UpdateCustomer.yml index 87466c7..8ed8239 100644 --- a/specs/schemas/customers/UpdateCustomer.yml +++ b/specs/schemas/customers/UpdateCustomer.yml @@ -48,6 +48,7 @@ UpdateUnverifiedAndReceiveOnly: UpdateVerifiedPersonal: title: UpdateVerifiedPersonal description: Update Verified Personal Customer Information + type: object properties: email: type: string @@ -358,9 +359,66 @@ RetryVerifiedPersonal: ssn: type: string example: 1234 -RetryVerifiedBusiness: - title: RetryVerifiedBusiness - description: Retry Verification for Verified Business Customer +RetryVerifiedBusinessNoController: + title: RetryVerifiedBusinessNoController + description: Retry Verification for Verified Business Customer where only Business Details need to be retried + type: object + required: + - firstName + - lastName + - email + - type + - address1 + - city + - state + - postalCode + - businessClassification + - businessType + - businessName + - ein + properties: + firstName: + type: string + example: Account + lastName: + type: string + example: Admin + email: + type: string + example: accountAdmin@email.com + ipAddress: + type: string + example: 143.156.7.8 + type: + type: string + example: business + address1: + type: string + example: 99-99 33rd St + city: + type: string + example: Some City + state: + type: string + example: NY + postalCode: + type: string + example: 11101 + businessClassification: + type: string + example: 9ed3f670-7d6f-11e3-b1ce-5404a6144203 + businessType: + type: string + example: llc + businessName: + type: string + example: Jane Corp + ein: + type: string + example: 00-0000000 +RetryVerifiedBusinessWithController: + title: RetryVerifiedBusinessWithController + description: Retry Verification for Verified Business Customer where Business Details as well as Controller Details need to be retried type: object required: - firstName @@ -410,6 +468,7 @@ RetryVerifiedBusiness: - firstName - lastName - title + - ssn - dateOfBirth - address properties: @@ -424,7 +483,7 @@ RetryVerifiedBusiness: example: CEO ssn: type: string - example: 6789 + example: 123456789 dateOfBirth: type: string example: 1980-01-31 @@ -467,6 +526,125 @@ RetryVerifiedBusiness: ein: type: string example: 00-0000000 +RetryVerifiedBusinessWithInternationalController: + title: RetryVerifiedBusinessWithInternationalController + description: Retry Verification for Verified Business Customer where Business Details as well as International Controller Details need to be retried + type: object + required: + - firstName + - lastName + - email + - type + - address1 + - city + - state + - postalCode + - controller + - businessClassification + - businessType + - businessName + - ein + properties: + firstName: + type: string + example: Account + lastName: + type: string + example: Admin + email: + type: string + example: accountAdmin@email.com + ipAddress: + type: string + example: 143.156.7.8 + type: + type: string + example: business + address1: + type: string + example: 99-99 33rd St + city: + type: string + example: Some City + state: + type: string + example: NY + postalCode: + type: string + example: 11101 + controller: + type: object + required: + - firstName + - lastName + - title + - dateOfBirth + - address + - passport + properties: + firstName: + type: string + example: John + lastName: + type: string + example: Controller + title: + type: string + example: CEO + dateOfBirth: + type: string + example: 1980-01-31 + address: + type: object + required: + - address1 + - city + - country + - stateProvinceRegion + properties: + address1: + type: string + example: 462 Main Street + address2: + type: string + example: Suite 123 + address3: + type: string + example: Unit 123 + city: + type: string + example: Des Moines + postalCode: + type: string + example: '50309' + country: + type: string + example: USA + stateProvinceRegion: + type: string + example: 'IA' + passport: + type: object + required: + - number + - country + properties: + number: + type: string + country: + type: string + businessClassification: + type: string + example: 9ed3f670-7d6f-11e3-b1ce-5404a6144203 + businessType: + type: string + example: llc + businessName: + type: string + example: Jane Corp + ein: + type: string + example: 00-0000000 RetryVerifiedSoleProp: title: RetryVerifiedSoleProp description: Retry Verification for Verified Business Customer (Sole Proprietorship)