diff --git a/api/client.yaml b/api/client.yaml index c05b3d7f5..6ff101590 100644 --- a/api/client.yaml +++ b/api/client.yaml @@ -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: @@ -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: diff --git a/pkg/client/README.md b/pkg/client/README.md index 9714dc561..9d2433fb4 100644 --- a/pkg/client/README.md +++ b/pkg/client/README.md @@ -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) diff --git a/pkg/client/api/openapi.yaml b/pkg/client/api/openapi.yaml index 5e7671b7f..82c4c6249 100644 --- a/pkg/client/api/openapi.yaml +++ b/pkg/client/api/openapi.yaml @@ -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 @@ -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: @@ -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' @@ -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 diff --git a/pkg/client/docs/CreateCustomer.md b/pkg/client/docs/CreateCustomer.md index 8594ae74b..2164a9398 100644 --- a/pkg/client/docs/CreateCustomer.md +++ b/pkg/client/docs/CreateCustomer.md @@ -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) | | diff --git a/pkg/client/docs/CreateCustomerBusiness.md b/pkg/client/docs/CreateCustomerBusiness.md new file mode 100644 index 000000000..df79d182f --- /dev/null +++ b/pkg/client/docs/CreateCustomerBusiness.md @@ -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) + + diff --git a/pkg/client/docs/CreateCustomerBusinessCorp.md b/pkg/client/docs/CreateCustomerBusinessCorp.md new file mode 100644 index 000000000..b875bff11 --- /dev/null +++ b/pkg/client/docs/CreateCustomerBusinessCorp.md @@ -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) + + diff --git a/pkg/client/docs/CreateCustomerBusinessIndividual.md b/pkg/client/docs/CreateCustomerBusinessIndividual.md new file mode 100644 index 000000000..c4045227d --- /dev/null +++ b/pkg/client/docs/CreateCustomerBusinessIndividual.md @@ -0,0 +1,32 @@ +# CreateCustomerBusinessIndividual + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | Given Name or First Name | +**MiddleName** | **string** | Middle Name | [optional] +**LastName** | **string** | Surname or Last Name | +**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) | | [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) + + diff --git a/pkg/client/docs/CreateCustomerIndividual.md b/pkg/client/docs/CreateCustomerIndividual.md new file mode 100644 index 000000000..66a733327 --- /dev/null +++ b/pkg/client/docs/CreateCustomerIndividual.md @@ -0,0 +1,32 @@ +# CreateCustomerIndividual + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | Given Name or First Name | +**MiddleName** | **string** | Middle Name | [optional] +**LastName** | **string** | Surname or Last Name | +**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) | | [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) + + diff --git a/pkg/client/docs/Customer.md b/pkg/client/docs/Customer.md index c81406ac0..e75eb4af7 100644 --- a/pkg/client/docs/Customer.md +++ b/pkg/client/docs/Customer.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CustomerID** | **string** | The unique identifier for the customer who owns the account | -**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) | | diff --git a/pkg/client/docs/CustomerBusiness.md b/pkg/client/docs/CustomerBusiness.md new file mode 100644 index 000000000..be0230d2b --- /dev/null +++ b/pkg/client/docs/CustomerBusiness.md @@ -0,0 +1,35 @@ +# CustomerBusiness + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | **string** | The unique identifier for the customer who owns the account | +**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] +**Status** | [**CustomerStatus**](CustomerStatus.md) | | +**Email** | **string** | Primary email address of customer name@domain.com | +**Website** | **string** | Company Website for business type customers | [optional] +**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional] +**Phones** | [**[]Phone**](Phone.md) | | [optional] +**Addresses** | [**[]Address**](Address.md) | | [optional] +**Representatives** | [**[]Representative**](Representative.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] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/client/docs/CustomerBusinessAllOf.md b/pkg/client/docs/CustomerBusinessAllOf.md new file mode 100644 index 000000000..eed4e0ecb --- /dev/null +++ b/pkg/client/docs/CustomerBusinessAllOf.md @@ -0,0 +1,12 @@ +# CustomerBusinessAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | [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) + + diff --git a/pkg/client/docs/CustomerBusinessCorp.md b/pkg/client/docs/CustomerBusinessCorp.md new file mode 100644 index 000000000..5e0e61bf7 --- /dev/null +++ b/pkg/client/docs/CustomerBusinessCorp.md @@ -0,0 +1,35 @@ +# CustomerBusinessCorp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | **string** | The unique identifier for the customer who owns the account | +**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] +**Status** | [**CustomerStatus**](CustomerStatus.md) | | +**Email** | **string** | Primary email address of customer name@domain.com | +**Website** | **string** | Company Website for business type customers | [optional] +**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional] +**Phones** | [**[]Phone**](Phone.md) | | [optional] +**Addresses** | [**[]Address**](Address.md) | | [optional] +**Representatives** | [**[]Representative**](Representative.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] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/client/docs/CustomerBusinessCorpAllOf.md b/pkg/client/docs/CustomerBusinessCorpAllOf.md new file mode 100644 index 000000000..35ee3a150 --- /dev/null +++ b/pkg/client/docs/CustomerBusinessCorpAllOf.md @@ -0,0 +1,12 @@ +# CustomerBusinessCorpAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | [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) + + diff --git a/pkg/client/docs/CustomerBusinessIndividual.md b/pkg/client/docs/CustomerBusinessIndividual.md new file mode 100644 index 000000000..455b1b14d --- /dev/null +++ b/pkg/client/docs/CustomerBusinessIndividual.md @@ -0,0 +1,35 @@ +# CustomerBusinessIndividual + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | **string** | The unique identifier for the customer who owns the account | +**FirstName** | **string** | Given Name or First Name | +**MiddleName** | **string** | Middle Name | [optional] +**LastName** | **string** | Surname or Last Name | +**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) | | [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] +**Status** | [**CustomerStatus**](CustomerStatus.md) | | +**Email** | **string** | Primary email address of customer name@domain.com | +**Website** | **string** | Company Website for business type customers | [optional] +**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional] +**Phones** | [**[]Phone**](Phone.md) | | [optional] +**Addresses** | [**[]Address**](Address.md) | | [optional] +**Representatives** | [**[]Representative**](Representative.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] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/client/docs/CustomerIndividual.md b/pkg/client/docs/CustomerIndividual.md new file mode 100644 index 000000000..1c9fabfd8 --- /dev/null +++ b/pkg/client/docs/CustomerIndividual.md @@ -0,0 +1,35 @@ +# CustomerIndividual + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerID** | **string** | The unique identifier for the customer who owns the account | +**FirstName** | **string** | Given Name or First Name | +**MiddleName** | **string** | Middle Name | [optional] +**LastName** | **string** | Surname or Last Name | +**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) | | [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] +**Status** | [**CustomerStatus**](CustomerStatus.md) | | +**Email** | **string** | Primary email address of customer name@domain.com | +**Website** | **string** | Company Website for business type customers | [optional] +**DateBusinessEstablished** | **string** | Date business was established for business type customers | [optional] +**Phones** | [**[]Phone**](Phone.md) | | [optional] +**Addresses** | [**[]Address**](Address.md) | | [optional] +**Representatives** | [**[]Representative**](Representative.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] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/pkg/client/docs/CustomerIndividualAllOf.md b/pkg/client/docs/CustomerIndividualAllOf.md new file mode 100644 index 000000000..c4ce9196f --- /dev/null +++ b/pkg/client/docs/CustomerIndividualAllOf.md @@ -0,0 +1,12 @@ +# CustomerIndividualAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] +**LastModified** | [**time.Time**](time.Time.md) | Last time the object was modified | [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) + + diff --git a/pkg/client/model_create_customer.go b/pkg/client/model_create_customer.go index 695707c27..20b32de83 100644 --- a/pkg/client/model_create_customer.go +++ b/pkg/client/model_create_customer.go @@ -12,11 +12,11 @@ package client // CreateCustomer struct for CreateCustomer type CreateCustomer struct { // Given Name or First Name - FirstName string `json:"firstName"` + FirstName string `json:"firstName,omitempty"` // Middle Name MiddleName string `json:"middleName,omitempty"` // Surname or Last Name - LastName string `json:"lastName"` + LastName string `json:"lastName,omitempty"` // Name Customer is preferred to be called NickName string `json:"nickName,omitempty"` // Customers name suffix. \"Jr\", \"PH.D.\" diff --git a/pkg/client/model_create_customer_business.go b/pkg/client/model_create_customer_business.go new file mode 100644 index 000000000..c73363456 --- /dev/null +++ b/pkg/client/model_create_customer_business.go @@ -0,0 +1,51 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +// CreateCustomerBusiness struct for CreateCustomerBusiness +type CreateCustomerBusiness struct { + // Given Name or First Name + FirstName string `json:"firstName,omitempty"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName,omitempty"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Customer Social Security Number (SSN) + SSN string `json:"SSN,omitempty"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []CreatePhone `json:"phones,omitempty"` + Addresses []CreateAddress `json:"addresses,omitempty"` + Representatives []CreateRepresentative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` +} diff --git a/pkg/client/model_create_customer_business_corp.go b/pkg/client/model_create_customer_business_corp.go new file mode 100644 index 000000000..d7b0534bb --- /dev/null +++ b/pkg/client/model_create_customer_business_corp.go @@ -0,0 +1,51 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +// CreateCustomerBusinessCorp struct for CreateCustomerBusinessCorp +type CreateCustomerBusinessCorp struct { + // Given Name or First Name + FirstName string `json:"firstName,omitempty"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName,omitempty"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Customer Social Security Number (SSN) + SSN string `json:"SSN,omitempty"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []CreatePhone `json:"phones,omitempty"` + Addresses []CreateAddress `json:"addresses,omitempty"` + Representatives []CreateRepresentative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` +} diff --git a/pkg/client/model_create_customer_business_individual.go b/pkg/client/model_create_customer_business_individual.go new file mode 100644 index 000000000..681f1008d --- /dev/null +++ b/pkg/client/model_create_customer_business_individual.go @@ -0,0 +1,51 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +// CreateCustomerBusinessIndividual struct for CreateCustomerBusinessIndividual +type CreateCustomerBusinessIndividual struct { + // Given Name or First Name + FirstName string `json:"firstName"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Customer Social Security Number (SSN) + SSN string `json:"SSN,omitempty"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []CreatePhone `json:"phones,omitempty"` + Addresses []CreateAddress `json:"addresses,omitempty"` + Representatives []CreateRepresentative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` +} diff --git a/pkg/client/model_create_customer_individual.go b/pkg/client/model_create_customer_individual.go new file mode 100644 index 000000000..cf49cfec2 --- /dev/null +++ b/pkg/client/model_create_customer_individual.go @@ -0,0 +1,51 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +// CreateCustomerIndividual struct for CreateCustomerIndividual +type CreateCustomerIndividual struct { + // Given Name or First Name + FirstName string `json:"firstName"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Customer Social Security Number (SSN) + SSN string `json:"SSN,omitempty"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []CreatePhone `json:"phones,omitempty"` + Addresses []CreateAddress `json:"addresses,omitempty"` + Representatives []CreateRepresentative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` +} diff --git a/pkg/client/model_customer.go b/pkg/client/model_customer.go index 81255f80e..a95d7b8db 100644 --- a/pkg/client/model_customer.go +++ b/pkg/client/model_customer.go @@ -18,11 +18,11 @@ type Customer struct { // The unique identifier for the customer who owns the account CustomerID string `json:"customerID"` // Given Name or First Name - FirstName string `json:"firstName"` + FirstName string `json:"firstName,omitempty"` // Middle Name MiddleName string `json:"middleName,omitempty"` // Surname or Last Name - LastName string `json:"lastName"` + LastName string `json:"lastName,omitempty"` // Name Customer is preferred to be called NickName string `json:"nickName,omitempty"` // Customers name suffix. \"Jr\", \"PH.D.\" diff --git a/pkg/client/model_customer_business.go b/pkg/client/model_customer_business.go new file mode 100644 index 000000000..ffc45a275 --- /dev/null +++ b/pkg/client/model_customer_business.go @@ -0,0 +1,59 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerBusiness struct for CustomerBusiness +type CustomerBusiness struct { + // The unique identifier for the customer who owns the account + CustomerID string `json:"customerID"` + // Given Name or First Name + FirstName string `json:"firstName,omitempty"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName,omitempty"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + Status CustomerStatus `json:"status"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []Phone `json:"phones,omitempty"` + Addresses []Address `json:"addresses,omitempty"` + Representatives []Representative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` + CreatedAt time.Time `json:"createdAt"` + // Last time the object was modified + LastModified time.Time `json:"lastModified"` +} diff --git a/pkg/client/model_customer_business_all_of.go b/pkg/client/model_customer_business_all_of.go new file mode 100644 index 000000000..cfcdce030 --- /dev/null +++ b/pkg/client/model_customer_business_all_of.go @@ -0,0 +1,21 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerBusinessAllOf struct for CustomerBusinessAllOf +type CustomerBusinessAllOf struct { + CreatedAt time.Time `json:"createdAt,omitempty"` + // Last time the object was modified + LastModified time.Time `json:"lastModified,omitempty"` +} diff --git a/pkg/client/model_customer_business_corp.go b/pkg/client/model_customer_business_corp.go new file mode 100644 index 000000000..7fc31cab5 --- /dev/null +++ b/pkg/client/model_customer_business_corp.go @@ -0,0 +1,59 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerBusinessCorp struct for CustomerBusinessCorp +type CustomerBusinessCorp struct { + // The unique identifier for the customer who owns the account + CustomerID string `json:"customerID"` + // Given Name or First Name + FirstName string `json:"firstName,omitempty"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName,omitempty"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + Status CustomerStatus `json:"status"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []Phone `json:"phones,omitempty"` + Addresses []Address `json:"addresses,omitempty"` + Representatives []Representative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` + CreatedAt time.Time `json:"createdAt"` + // Last time the object was modified + LastModified time.Time `json:"lastModified"` +} diff --git a/pkg/client/model_customer_business_corp_all_of.go b/pkg/client/model_customer_business_corp_all_of.go new file mode 100644 index 000000000..600660bcb --- /dev/null +++ b/pkg/client/model_customer_business_corp_all_of.go @@ -0,0 +1,21 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerBusinessCorpAllOf struct for CustomerBusinessCorpAllOf +type CustomerBusinessCorpAllOf struct { + CreatedAt time.Time `json:"createdAt,omitempty"` + // Last time the object was modified + LastModified time.Time `json:"lastModified,omitempty"` +} diff --git a/pkg/client/model_customer_business_individual.go b/pkg/client/model_customer_business_individual.go new file mode 100644 index 000000000..0146d083d --- /dev/null +++ b/pkg/client/model_customer_business_individual.go @@ -0,0 +1,59 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerBusinessIndividual struct for CustomerBusinessIndividual +type CustomerBusinessIndividual struct { + // The unique identifier for the customer who owns the account + CustomerID string `json:"customerID"` + // Given Name or First Name + FirstName string `json:"firstName"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + Status CustomerStatus `json:"status"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []Phone `json:"phones,omitempty"` + Addresses []Address `json:"addresses,omitempty"` + Representatives []Representative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` + CreatedAt time.Time `json:"createdAt"` + // Last time the object was modified + LastModified time.Time `json:"lastModified"` +} diff --git a/pkg/client/model_customer_individual.go b/pkg/client/model_customer_individual.go new file mode 100644 index 000000000..2d71ac4d9 --- /dev/null +++ b/pkg/client/model_customer_individual.go @@ -0,0 +1,59 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerIndividual struct for CustomerIndividual +type CustomerIndividual struct { + // The unique identifier for the customer who owns the account + CustomerID string `json:"customerID"` + // Given Name or First Name + FirstName string `json:"firstName"` + // Middle Name + MiddleName string `json:"middleName,omitempty"` + // Surname or Last Name + LastName string `json:"lastName"` + // Name Customer is preferred to be called + NickName string `json:"nickName,omitempty"` + // Customers name suffix. \"Jr\", \"PH.D.\" + Suffix string `json:"suffix,omitempty"` + Type CustomerType `json:"type"` + // Business Name for business type customers + BusinessName string `json:"businessName,omitempty"` + // Doing Business As (DBA) name for business type customers + DoingBusinessAs string `json:"doingBusinessAs,omitempty"` + BusinessType BusinessType `json:"businessType,omitempty"` + // Employer Identification Number (EIN) for business type customers + EIN string `json:"EIN,omitempty"` + // Dun & Bradstreet D-U-N-S Number (D-U-N-S) for business type customers + DUNS string `json:"DUNS,omitempty"` + SICCode SicCode `json:"SICCode,omitempty"` + NAICSCode NaicsCode `json:"NAICSCode,omitempty"` + // Legal date of birth + BirthDate string `json:"birthDate,omitempty"` + Status CustomerStatus `json:"status"` + // Primary email address of customer name@domain.com + Email string `json:"email"` + // Company Website for business type customers + Website string `json:"website,omitempty"` + // Date business was established for business type customers + DateBusinessEstablished string `json:"dateBusinessEstablished,omitempty"` + Phones []Phone `json:"phones,omitempty"` + Addresses []Address `json:"addresses,omitempty"` + Representatives []Representative `json:"representatives,omitempty"` + // Map of unique keys associated to values to act as foreign key relationships or arbitrary data associated to a Customer. + Metadata map[string]string `json:"metadata,omitempty"` + CreatedAt time.Time `json:"createdAt"` + // Last time the object was modified + LastModified time.Time `json:"lastModified"` +} diff --git a/pkg/client/model_customer_individual_all_of.go b/pkg/client/model_customer_individual_all_of.go new file mode 100644 index 000000000..b8cc7a4e7 --- /dev/null +++ b/pkg/client/model_customer_individual_all_of.go @@ -0,0 +1,21 @@ +/* + * Customers API + * + * Customers focuses on solving authentic identification of humans who are legally able to hold and transfer currency within the US. Primarily this project solves [Know Your Customer](https://en.wikipedia.org/wiki/Know_your_customer) (KYC), [Customer Identification Program](https://en.wikipedia.org/wiki/Customer_Identification_Program) (CIP), [Office of Foreign Asset Control](https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx) (OFAC) checks and verification workflows to comply with United States federal law and ensure authentic transfers. Customers has an objective to be a service for detailed due diligence on individuals and companies for Financial Institutions and services in a modernized and extensible way. Customer phone numbers and addresses are stored and partially used in KYC/OFAC validation. Arbitrary key/value pairs can be stored for a Customer. Documents and Disclaimers, and their acknowledgment are also stored under a Customer as they're accepted. Bank Accounts, which can be validated with micro-deposits currently, are stored under each Customer. ![](https://raw.githubusercontent.com/adamdecaf/customers/create-accounts/docs/images/customer.png) + * + * API version: v1 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package client + +import ( + "time" +) + +// CustomerIndividualAllOf struct for CustomerIndividualAllOf +type CustomerIndividualAllOf struct { + CreatedAt time.Time `json:"createdAt,omitempty"` + // Last time the object was modified + LastModified time.Time `json:"lastModified,omitempty"` +} diff --git a/pkg/customers/customer_representatives_test.go b/pkg/customers/customer_representatives_test.go index 3a8011213..60d69e00e 100644 --- a/pkg/customers/customer_representatives_test.go +++ b/pkg/customers/customer_representatives_test.go @@ -143,8 +143,8 @@ func TestCustomers__customerRepresentativeRequest(t *testing.T) { } req.Phones = append(req.Phones, phone{ - Number: "123.456.7890", - Type: "mobile", + Number: "123.456.7890", + Type: "mobile", }) if err := req.validate(); err != nil { t.Errorf("unexpected error: %v", err) @@ -269,8 +269,8 @@ func TestCustomers__updateRepresentative(t *testing.T) { JobTitle: "CEO", Phones: []phone{ { - Number: "123.456.7890", - Type: "mobile", + Number: "123.456.7890", + Type: "mobile", }, }, Addresses: []address{ @@ -420,15 +420,15 @@ func TestCustomerRepository__updateRepresentative(t *testing.T) { LastName: "Smith", Phones: []phone{ { - Number: "555.555.5555", - Type: "mobile", + Number: "555.555.5555", + Type: "mobile", }, }, Addresses: []address{ { - Address1: "555 5th st", - City: "real city", - Type: "primary", + Address1: "555 5th st", + City: "real city", + Type: "primary", }, }, } diff --git a/pkg/customers/customers.go b/pkg/customers/customers.go index c9a42705c..b07a6ce14 100644 --- a/pkg/customers/customers.go +++ b/pkg/customers/customers.go @@ -202,8 +202,16 @@ func (rep *customerRepresentative) validate() error { } func (req customerRequest) validate() error { - if req.FirstName == "" || req.LastName == "" { - return errors.New("invalid customer fields: empty name field(s)") + if req.Type == client.CUSTOMERTYPE_INDIVIDUAL || + (req.Type == client.CUSTOMERTYPE_BUSINESS && + req.BusinessType == client.BUSINESSTYPE_INDIVIDUAL_SOLE_PROPRIETOR_OR_SINGLE_MEMBER_LLC) { + if req.FirstName == "" || req.LastName == "" { + return errors.New("invalid customer fields: empty name field(s)") + } + } else { + if req.BusinessName == "" { + return errors.New("invalid customer fields: empty business name field") + } } if err := validateCustomerType(req.Type); err != nil { return fmt.Errorf("invalid customer type: %v", err) diff --git a/pkg/customers/customers_test.go b/pkg/customers/customers_test.go index 49a3a7959..0995d2079 100644 --- a/pkg/customers/customers_test.go +++ b/pkg/customers/customers_test.go @@ -316,8 +316,130 @@ func TestCustomers__customerRequest(t *testing.T) { } req.Phones = append(req.Phones, phone{ - Number: "123.456.7890", - Type: "mobile", + Number: "123.456.7890", + Type: "mobile", + }) + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Addresses = append(req.Addresses, address{ + Address1: "123 1st st", + City: "fake city", + State: "CA", + PostalCode: "90210", + Country: "US", + Type: "primary", + }) + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + // asCustomer + cust, _, _ := req.asCustomer(testCustomerSSNStorage(t)) + if cust.CustomerID == "" { + t.Errorf("empty Customer: %#v", cust) + } + if len(cust.Phones) != 1 { + t.Errorf("cust.Phones: %#v", cust.Phones) + } + if len(cust.Addresses) != 1 { + t.Errorf("cust.Addresses: %#v", cust.Addresses) + } +} + +func TestCustomers__soleProprietorCustomerRequest(t *testing.T) { + req := &customerRequest{ + Type: client.CUSTOMERTYPE_BUSINESS, + BusinessType: client.BUSINESSTYPE_INDIVIDUAL_SOLE_PROPRIETOR_OR_SINGLE_MEMBER_LLC, + } + if err := req.validate(); err == nil { + t.Error("expected error") + } + req.FirstName = "jane" + if err := req.validate(); err == nil { + t.Error("expected error") + } + + req.BusinessName = "janes business" + if err := req.validate(); err == nil { + t.Error("expected error") + } + + req.LastName = "doe" + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Email = "jane.doe@example.com" + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Phones = append(req.Phones, phone{ + Number: "123.456.7890", + Type: "mobile", + }) + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Addresses = append(req.Addresses, address{ + Address1: "123 1st st", + City: "fake city", + State: "CA", + PostalCode: "90210", + Country: "US", + Type: "primary", + }) + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + // asCustomer + cust, _, _ := req.asCustomer(testCustomerSSNStorage(t)) + if cust.CustomerID == "" { + t.Errorf("empty Customer: %#v", cust) + } + if len(cust.Phones) != 1 { + t.Errorf("cust.Phones: %#v", cust.Phones) + } + if len(cust.Addresses) != 1 { + t.Errorf("cust.Addresses: %#v", cust.Addresses) + } +} + +func TestCustomers__businessCustomerRequest(t *testing.T) { + req := &customerRequest{ + Type: client.CUSTOMERTYPE_BUSINESS, + BusinessType: client.BUSINESSTYPE_CORPORATION, + } + if err := req.validate(); err == nil { + t.Error("expected error") + } + req.FirstName = "jane" + if err := req.validate(); err == nil { + t.Error("expected error") + } + + req.LastName = "doe" + if err := req.validate(); err == nil { + t.Error("expected error") + } + + req.BusinessName = "janes business" + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Email = "jane.doe@example.com" + if err := req.validate(); err != nil { + t.Errorf("unexpected error: %v", err) + } + + req.Phones = append(req.Phones, phone{ + Number: "123.456.7890", + Type: "mobile", }) if err := req.validate(); err != nil { t.Errorf("unexpected error: %v", err) @@ -330,7 +452,6 @@ func TestCustomers__customerRequest(t *testing.T) { PostalCode: "90210", Country: "US", Type: "primary", - OwnerType: "customer", }) if err := req.validate(); err != nil { t.Errorf("unexpected error: %v", err) @@ -443,6 +564,7 @@ func TestCustomers__updateCustomer(t *testing.T) { { Number: "123.456.7890", Type: "mobile", + OwnerType: "customer", }, }, Addresses: []address{ @@ -453,6 +575,7 @@ func TestCustomers__updateCustomer(t *testing.T) { PostalCode: "90210", Country: "US", Type: "primary", + OwnerType: "customer", }, }, } @@ -476,6 +599,7 @@ func TestCustomers__updateCustomer(t *testing.T) { { Number: "555.555.5555", Type: "mobile", + OwnerType: "customer", }, } updateReq.Addresses = []address{ @@ -486,6 +610,7 @@ func TestCustomers__updateCustomer(t *testing.T) { PostalCode: "90210", Country: "US", Type: "primary", + OwnerType: "customer", }, } payload, err := json.Marshal(&updateReq) @@ -572,8 +697,8 @@ func TestCustomers__repository(t *testing.T) { Email: "jane@example.com", Phones: []phone{ { - Number: "123.456.7890", - Type: "mobile", + Number: "123.456.7890", + Type: "mobile", }, }, Addresses: []address{ @@ -676,8 +801,8 @@ func TestCustomerRepository__updateCustomer(t *testing.T) { Email: "jane@example.com", Phones: []phone{ { - Number: "123.456.7890", - Type: "mobile", + Number: "123.456.7890", + Type: "mobile", }, }, Addresses: []address{ @@ -701,15 +826,15 @@ func TestCustomerRepository__updateCustomer(t *testing.T) { Email: "jim@google.com", Phones: []phone{ { - Number: "555.555.5555", - Type: "mobile", + Number: "555.555.5555", + Type: "mobile", }, }, Addresses: []address{ { - Address1: "555 5th st", - City: "real city", - Type: "primary", + Address1: "555 5th st", + City: "real city", + Type: "primary", }, }, }