Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Require firstName, lastName for individuals and sole proprietor busin…
Browse files Browse the repository at this point in the history
…esses, and require business name for other businesses
  • Loading branch information
darwinz committed Nov 11, 2020
1 parent 8c6cc02 commit bd640b6
Show file tree
Hide file tree
Showing 32 changed files with 1,208 additions and 39 deletions.
122 changes: 118 additions & 4 deletions api/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1918,10 +1918,47 @@ components:
example:
paygateID: "23beb5fd"
required:
- firstName
- lastName
- type
- email
discriminator:
propertyName: type
mapping:
individual: '#/components/schemas/CreateCustomerIndividual'
business: '#/components/schemas/CreateCustomerBusiness'
CreateCustomerIndividual:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- type: object
required:
- firstName
- lastName
CreateCustomerBusinessIndividual:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- type: object
required:
- firstName
- lastName
CreateCustomerBusinessCorp:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- type: object
required:
- businessName
CreateCustomerBusiness:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- type: object
required:
- businessType
discriminator:
propertyName: businessType
mapping:
individual, sole proprietor, or single-member LLC: '#/components/schemas/CreateCustomerBusinessIndividual'
corporation: '#/components/schemas/CreateCustomerBusinessCorp'
non-profit organization: '#/components/schemas/CreateCustomerBusinessCorp'
partnership: '#/components/schemas/CreateCustomerBusinessCorp'
limited liability company: '#/components/schemas/CreateCustomerBusinessCorp'
Customer:
type: object
properties:
Expand Down Expand Up @@ -2022,13 +2059,90 @@ components:
example: '2016-08-29T09:12:33.001Z'
required:
- customerID
- firstName
- lastName
- type
- status
- email
- createdAt
- lastModified
discriminator:
propertyName: type
mapping:
individual: '#/components/schemas/CustomerIndividual'
business: '#/components/schemas/CustomerBusiness'
CustomerIndividual:
allOf:
- $ref: '#/components/schemas/Customer'
- type: object
properties:
createdAt:
type: string
format: date-time
example: '2016-08-29T09:12:33.001Z'
lastModified:
type: string
format: date-time
description: Last time the object was modified
example: '2016-08-29T09:12:33.001Z'
required:
- firstName
- lastName
CustomerBusinessIndividual:
allOf:
- $ref: '#/components/schemas/Customer'
- type: object
properties:
createdAt:
type: string
format: date-time
example: '2016-08-29T09:12:33.001Z'
lastModified:
type: string
format: date-time
description: Last time the object was modified
example: '2016-08-29T09:12:33.001Z'
required:
- firstName
- lastName
CustomerBusinessCorp:
allOf:
- $ref: '#/components/schemas/Customer'
- type: object
properties:
createdAt:
type: string
format: date-time
example: '2016-08-29T09:12:33.001Z'
lastModified:
type: string
format: date-time
description: Last time the object was modified
example: '2016-08-29T09:12:33.001Z'
required:
- businessName
CustomerBusiness:
allOf:
- $ref: '#/components/schemas/Customer'
- type: object
properties:
createdAt:
type: string
format: date-time
example: '2016-08-29T09:12:33.001Z'
lastModified:
type: string
format: date-time
description: Last time the object was modified
example: '2016-08-29T09:12:33.001Z'
required:
- businessType
discriminator:
propertyName: businessType
mapping:
individual, sole proprietor, or single-member LLC: '#/components/schemas/CustomerBusinessIndividual'
corporation: '#/components/schemas/CustomerBusinessCorp'
non-profit organization: '#/components/schemas/CustomerBusinessCorp'
partnership: '#/components/schemas/CustomerBusinessCorp'
limited liability company: '#/components/schemas/CustomerBusinessCorp'
Customers:
type: array
items:
Expand Down
11 changes: 11 additions & 0 deletions pkg/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,20 @@ Class | Method | HTTP request | Description
- [CreateAccount](docs/CreateAccount.md)
- [CreateAddress](docs/CreateAddress.md)
- [CreateCustomer](docs/CreateCustomer.md)
- [CreateCustomerBusiness](docs/CreateCustomerBusiness.md)
- [CreateCustomerBusinessCorp](docs/CreateCustomerBusinessCorp.md)
- [CreateCustomerBusinessIndividual](docs/CreateCustomerBusinessIndividual.md)
- [CreateCustomerIndividual](docs/CreateCustomerIndividual.md)
- [CreatePhone](docs/CreatePhone.md)
- [CreateRepresentative](docs/CreateRepresentative.md)
- [Customer](docs/Customer.md)
- [CustomerBusiness](docs/CustomerBusiness.md)
- [CustomerBusinessAllOf](docs/CustomerBusinessAllOf.md)
- [CustomerBusinessCorp](docs/CustomerBusinessCorp.md)
- [CustomerBusinessCorpAllOf](docs/CustomerBusinessCorpAllOf.md)
- [CustomerBusinessIndividual](docs/CustomerBusinessIndividual.md)
- [CustomerIndividual](docs/CustomerIndividual.md)
- [CustomerIndividualAllOf](docs/CustomerIndividualAllOf.md)
- [CustomerMetadata](docs/CustomerMetadata.md)
- [CustomerStatus](docs/CustomerStatus.md)
- [CustomerType](docs/CustomerType.md)
Expand Down
112 changes: 108 additions & 4 deletions pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2204,6 +2204,11 @@ components:
- legalEntity
- primaryAccount
CreateCustomer:
discriminator:
mapping:
individual: '#/components/schemas/CreateCustomerIndividual'
business: '#/components/schemas/CreateCustomerBusiness'
propertyName: type
example:
lastName: Smith
website: http://google.com
Expand Down Expand Up @@ -2376,11 +2381,48 @@ components:
type: object
required:
- email
- firstName
- lastName
- type
type: object
CreateCustomerIndividual:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- required:
- firstName
- lastName
type: object
CreateCustomerBusinessIndividual:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- required:
- firstName
- lastName
type: object
CreateCustomerBusinessCorp:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- required:
- businessName
type: object
CreateCustomerBusiness:
allOf:
- $ref: '#/components/schemas/CreateCustomer'
- required:
- businessType
type: object
discriminator:
mapping:
individual, sole proprietor, or single-member LLC: '#/components/schemas/CreateCustomerBusinessIndividual'
corporation: '#/components/schemas/CreateCustomerBusinessCorp'
non-profit organization: '#/components/schemas/CreateCustomerBusinessCorp'
partnership: '#/components/schemas/CreateCustomerBusinessCorp'
limited liability company: '#/components/schemas/CreateCustomerBusinessCorp'
propertyName: businessType
Customer:
discriminator:
mapping:
individual: '#/components/schemas/CustomerIndividual'
business: '#/components/schemas/CustomerBusiness'
propertyName: type
example:
lastName: Smith
addresses:
Expand Down Expand Up @@ -2587,12 +2629,34 @@ components:
- createdAt
- customerID
- email
- firstName
- lastModified
- lastName
- status
- type
type: object
CustomerIndividual:
allOf:
- $ref: '#/components/schemas/Customer'
- $ref: '#/components/schemas/CustomerIndividual_allOf'
CustomerBusinessIndividual:
allOf:
- $ref: '#/components/schemas/Customer'
- $ref: '#/components/schemas/CustomerIndividual_allOf'
CustomerBusinessCorp:
allOf:
- $ref: '#/components/schemas/Customer'
- $ref: '#/components/schemas/CustomerBusinessCorp_allOf'
CustomerBusiness:
allOf:
- $ref: '#/components/schemas/Customer'
- $ref: '#/components/schemas/CustomerBusiness_allOf'
discriminator:
mapping:
individual, sole proprietor, or single-member LLC: '#/components/schemas/CustomerBusinessIndividual'
corporation: '#/components/schemas/CustomerBusinessCorp'
non-profit organization: '#/components/schemas/CustomerBusinessCorp'
partnership: '#/components/schemas/CustomerBusinessCorp'
limited liability company: '#/components/schemas/CustomerBusinessCorp'
propertyName: businessType
Customers:
items:
$ref: '#/components/schemas/Customer'
Expand Down Expand Up @@ -3830,3 +3894,43 @@ components:
required:
- currency
- value
CustomerIndividual_allOf:
properties:
createdAt:
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
lastModified:
description: Last time the object was modified
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
required:
- firstName
- lastName
CustomerBusinessCorp_allOf:
properties:
createdAt:
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
lastModified:
description: Last time the object was modified
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
required:
- businessName
CustomerBusiness_allOf:
properties:
createdAt:
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
lastModified:
description: Last time the object was modified
example: 2016-08-29T09:12:33.001Z
format: date-time
type: string
required:
- businessType
4 changes: 2 additions & 2 deletions pkg/client/docs/CreateCustomer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FirstName** | **string** | Given Name or First Name |
**FirstName** | **string** | Given Name or First Name | [optional]
**MiddleName** | **string** | Middle Name | [optional]
**LastName** | **string** | Surname or Last Name |
**LastName** | **string** | Surname or Last Name | [optional]
**NickName** | **string** | Name Customer is preferred to be called | [optional]
**Suffix** | **string** | Customers name suffix. \"Jr\", \"PH.D.\" | [optional]
**Type** | [**CustomerType**](CustomerType.md) | |
Expand Down
32 changes: 32 additions & 0 deletions pkg/client/docs/CreateCustomerBusiness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CreateCustomerBusiness

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FirstName** | **string** | Given Name or First Name | [optional]
**MiddleName** | **string** | Middle Name | [optional]
**LastName** | **string** | Surname or Last Name | [optional]
**NickName** | **string** | Name Customer is preferred to be called | [optional]
**Suffix** | **string** | Customers name suffix. \"Jr\", \"PH.D.\" | [optional]
**Type** | [**CustomerType**](CustomerType.md) | |
**BusinessName** | **string** | Business Name for business type customers | [optional]
**DoingBusinessAs** | **string** | Doing Business As (DBA) name for business type customers | [optional]
**BusinessType** | [**BusinessType**](BusinessType.md) | |
**EIN** | **string** | Employer Identification Number (EIN) for business type customers | [optional]
**DUNS** | **string** | Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers | [optional]
**SICCode** | [**SicCode**](SICCode.md) | | [optional]
**NAICSCode** | [**NaicsCode**](NAICSCode.md) | | [optional]
**BirthDate** | **string** | Legal date of birth | [optional]
**Email** | **string** | Primary email address of customer name@domain.com |
**SSN** | **string** | Customer Social Security Number (SSN) | [optional]
**Website** | **string** | Company Website for business type customers | [optional]
**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional]
**Phones** | [**[]CreatePhone**](CreatePhone.md) | | [optional]
**Addresses** | [**[]CreateAddress**](CreateAddress.md) | | [optional]
**Representatives** | [**[]CreateRepresentative**](CreateRepresentative.md) | | [optional]
**Metadata** | **map[string]string** | Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


32 changes: 32 additions & 0 deletions pkg/client/docs/CreateCustomerBusinessCorp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CreateCustomerBusinessCorp

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FirstName** | **string** | Given Name or First Name | [optional]
**MiddleName** | **string** | Middle Name | [optional]
**LastName** | **string** | Surname or Last Name | [optional]
**NickName** | **string** | Name Customer is preferred to be called | [optional]
**Suffix** | **string** | Customers name suffix. \"Jr\", \"PH.D.\" | [optional]
**Type** | [**CustomerType**](CustomerType.md) | |
**BusinessName** | **string** | Business Name for business type customers |
**DoingBusinessAs** | **string** | Doing Business As (DBA) name for business type customers | [optional]
**BusinessType** | [**BusinessType**](BusinessType.md) | | [optional]
**EIN** | **string** | Employer Identification Number (EIN) for business type customers | [optional]
**DUNS** | **string** | Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers | [optional]
**SICCode** | [**SicCode**](SICCode.md) | | [optional]
**NAICSCode** | [**NaicsCode**](NAICSCode.md) | | [optional]
**BirthDate** | **string** | Legal date of birth | [optional]
**Email** | **string** | Primary email address of customer name@domain.com |
**SSN** | **string** | Customer Social Security Number (SSN) | [optional]
**Website** | **string** | Company Website for business type customers | [optional]
**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional]
**Phones** | [**[]CreatePhone**](CreatePhone.md) | | [optional]
**Addresses** | [**[]CreateAddress**](CreateAddress.md) | | [optional]
**Representatives** | [**[]CreateRepresentative**](CreateRepresentative.md) | | [optional]
**Metadata** | **map[string]string** | Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit bd640b6

Please sign in to comment.