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

Commit

Permalink
Merge pull request #269 from darwinz/business-customer-profiles
Browse files Browse the repository at this point in the history
business customer profiles
  • Loading branch information
darwinz authored Nov 5, 2020
2 parents 4592904 + 8a6da2d commit 9d67f87
Show file tree
Hide file tree
Showing 65 changed files with 4,692 additions and 431 deletions.
668 changes: 658 additions & 10 deletions api/client.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func main() {
accounts.RegisterRoutes(logger, router, accountsRepo, validationsRepo, fedClient, stringKeeper, transitStringKeeper, validationStrategies, &accountOfacSeacher, appSalt)
customers.AddCustomerRoutes(logger, router, customerRepo, customerSSNStorage, ofac)
customers.AddCustomerAddressRoutes(logger, router, customerRepo)
customers.AddRepresentativeRoutes(logger, router, customerRepo, customerSSNStorage)
documents.AddDisclaimerRoutes(logger, router, disclaimerRepo)

docsStorageProvider := util.Or(os.Getenv("DOCUMENTS_STORAGE_PROVIDER"), "file")
Expand Down
1 change: 1 addition & 0 deletions migrations/016_add_business_name_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN business_name varchar(255) default null;
1 change: 1 addition & 0 deletions migrations/017_add_doing_business_as_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN doing_business_as varchar(255) default null;
1 change: 1 addition & 0 deletions migrations/018_add_business_type_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN business_type varchar(50) default null;
1 change: 1 addition & 0 deletions migrations/019_add_ein_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN ein varchar(40) default null;
1 change: 1 addition & 0 deletions migrations/020_add_duns_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN duns varchar(40) default null;
1 change: 1 addition & 0 deletions migrations/021_add_sic_code_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN sic_code varchar(5) default null;
1 change: 1 addition & 0 deletions migrations/022_add_naics_code_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN naics_code varchar(5) default null;
1 change: 1 addition & 0 deletions migrations/023_add_website_to_customers.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN website varchar(255) default null;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers ADD COLUMN date_business_established varchar(40) default null;
11 changes: 11 additions & 0 deletions migrations/025_create_representatives.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE if not exists representatives (
representative_id varchar(40) primary key,
customer_id varchar(40),
first_name varchar(40),
last_name varchar(40),
job_title varchar(50),
birth_date datetime,
created_at datetime,
last_modified datetime,
deleted_at datetime
);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customer_ssn RENAME COLUMN customer_id TO owner_id;
1 change: 1 addition & 0 deletions migrations/027_add_owner_type_to_customer_ssn.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customer_ssn ADD COLUMN owner_type varchar(25) NOT NULL default 'customer';
1 change: 1 addition & 0 deletions migrations/028_alter_rename_customer_ssn_to_ssn.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customer_ssn RENAME TO ssn;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_addresses RENAME COLUMN customer_id TO owner_id;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_addresses ADD COLUMN owner_type varchar(25) NOT NULL default 'customer';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_addresses RENAME TO addresses;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_phones RENAME COLUMN customer_id TO owner_id;
1 change: 1 addition & 0 deletions migrations/033_add_owner_type_to_customers_phones.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_phones ADD COLUMN owner_type varchar(25) NOT NULL default 'customer';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE customers_phones RENAME TO phones;
24 changes: 18 additions & 6 deletions pkg/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ Class | Method | HTTP request | Description
*ConfigurationApi* | [**GetOrganizationLogo**](docs/ConfigurationApi.md#getorganizationlogo) | **Get** /configuration/logo | Get Organization Logo
*ConfigurationApi* | [**UpdateOrganizationConfiguration**](docs/ConfigurationApi.md#updateorganizationconfiguration) | **Put** /configuration/customers | Update Organization Configuration
*ConfigurationApi* | [**UploadOrganizationLogo**](docs/ConfigurationApi.md#uploadorganizationlogo) | **Put** /configuration/logo | Update Organization Logo
*CustomersApi* | [**AddCustomerAddress**](docs/CustomersApi.md#addcustomeraddress) | **Post** /customers/{customerID}/address | Add Customer Address
*CustomersApi* | [**AddAddress**](docs/CustomersApi.md#addaddress) | **Post** /customers/{customerID}/address | Add Customer Address
*CustomersApi* | [**CreateCustomer**](docs/CustomersApi.md#createcustomer) | **Post** /customers | Create Customer
*CustomersApi* | [**DeleteAddress**](docs/CustomersApi.md#deleteaddress) | **Delete** /customers/{customerID}/addresses/{addressID} | Delete Customer Address
*CustomersApi* | [**DeleteCustomer**](docs/CustomersApi.md#deletecustomer) | **Delete** /customers/{customerID} | Delete Customer
*CustomersApi* | [**DeleteCustomerAddress**](docs/CustomersApi.md#deletecustomeraddress) | **Delete** /customers/{customerID}/addresses/{addressID} | Delete Customer Address
*CustomersApi* | [**GetCustomer**](docs/CustomersApi.md#getcustomer) | **Get** /customers/{customerID} | Get Customer
*CustomersApi* | [**GetLatestOFACSearch**](docs/CustomersApi.md#getlatestofacsearch) | **Get** /customers/{customerID}/ofac | Latest Customer OFAC search
*CustomersApi* | [**Ping**](docs/CustomersApi.md#ping) | **Get** /ping | Ping Customers Service
*CustomersApi* | [**RefreshOFACSearch**](docs/CustomersApi.md#refreshofacsearch) | **Put** /customers/{customerID}/refresh/ofac | Refresh Customer OFAC search
*CustomersApi* | [**ReplaceCustomerMetadata**](docs/CustomersApi.md#replacecustomermetadata) | **Put** /customers/{customerID}/metadata | Update Customer Metadata
*CustomersApi* | [**SearchCustomers**](docs/CustomersApi.md#searchcustomers) | **Get** /customers | Search Customers
*CustomersApi* | [**UpdateAddress**](docs/CustomersApi.md#updateaddress) | **Put** /customers/{customerID}/addresses/{addressID} | Update Customer Address
*CustomersApi* | [**UpdateCustomer**](docs/CustomersApi.md#updatecustomer) | **Put** /customers/{customerID} | Update Customer
*CustomersApi* | [**UpdateCustomerAddress**](docs/CustomersApi.md#updatecustomeraddress) | **Put** /customers/{customerID}/addresses/{addressID} | Update Customer Address
*CustomersApi* | [**UpdateCustomerStatus**](docs/CustomersApi.md#updatecustomerstatus) | **Put** /customers/{customerID}/status | Update Customer Status
*DisclaimersApi* | [**AcceptDisclaimer**](docs/DisclaimersApi.md#acceptdisclaimer) | **Post** /customers/{customerID}/disclaimers/{disclaimerID} | Accept Customer Disclaimer
*DisclaimersApi* | [**GetCustomerDisclaimers**](docs/DisclaimersApi.md#getcustomerdisclaimers) | **Get** /customers/{customerID}/disclaimers | Get Customer Disclaimers
Expand All @@ -73,6 +73,12 @@ Class | Method | HTTP request | Description
*DocumentsApi* | [**GetCustomerDocuments**](docs/DocumentsApi.md#getcustomerdocuments) | **Get** /customers/{customerID}/documents | Get Customer Documents
*DocumentsApi* | [**UploadCustomerDocument**](docs/DocumentsApi.md#uploadcustomerdocument) | **Post** /customers/{customerID}/documents | Upload Customer Document
*ReportsApi* | [**GetReportOfCustomerAccounts**](docs/ReportsApi.md#getreportofcustomeraccounts) | **Get** /reports/accounts | Create Report of Accounts
*RepresentativesApi* | [**AddRepresentative**](docs/RepresentativesApi.md#addrepresentative) | **Post** /customers/{customerID}/representatives | Add Customer Representative
*RepresentativesApi* | [**AddRepresentativeAddress**](docs/RepresentativesApi.md#addrepresentativeaddress) | **Post** /customers/{customerID}/representatives/{representativeID}/address | Add Customer Representative Address
*RepresentativesApi* | [**DeleteRepresentative**](docs/RepresentativesApi.md#deleterepresentative) | **Delete** /customers/{customerID}/representatives/{representativeID} | Delete Customer Representative
*RepresentativesApi* | [**DeleteRepresentativeAddress**](docs/RepresentativesApi.md#deleterepresentativeaddress) | **Delete** /customers/{customerID}/representatives/{representativeID}/addresses/{addressID} | Delete a Customer Representative Address
*RepresentativesApi* | [**UpdateRepresentative**](docs/RepresentativesApi.md#updaterepresentative) | **Put** /customers/{customerID}/representatives/{representativeID} | Update Customer Representative
*RepresentativesApi* | [**UpdateRepresentativeAddress**](docs/RepresentativesApi.md#updaterepresentativeaddress) | **Put** /customers/{customerID}/representatives/{representativeID}/addresses/{addressID} | Update Customer Representative Address


## Documentation For Models
Expand All @@ -81,16 +87,18 @@ Class | Method | HTTP request | Description
- [AccountStatus](docs/AccountStatus.md)
- [AccountType](docs/AccountType.md)
- [AccountValidationResponse](docs/AccountValidationResponse.md)
- [Address](docs/Address.md)
- [AddressType](docs/AddressType.md)
- [Amount](docs/Amount.md)
- [BusinessType](docs/BusinessType.md)
- [CompleteAccountValidationRequest](docs/CompleteAccountValidationRequest.md)
- [CompleteAccountValidationResponse](docs/CompleteAccountValidationResponse.md)
- [CreateAccount](docs/CreateAccount.md)
- [CreateAddress](docs/CreateAddress.md)
- [CreateCustomer](docs/CreateCustomer.md)
- [CreateCustomerAddress](docs/CreateCustomerAddress.md)
- [CreatePhone](docs/CreatePhone.md)
- [CreateRepresentative](docs/CreateRepresentative.md)
- [Customer](docs/Customer.md)
- [CustomerAddress](docs/CustomerAddress.md)
- [CustomerMetadata](docs/CustomerMetadata.md)
- [CustomerStatus](docs/CustomerStatus.md)
- [CustomerType](docs/CustomerType.md)
Expand All @@ -101,14 +109,18 @@ Class | Method | HTTP request | Description
- [InitAccountValidationResponse](docs/InitAccountValidationResponse.md)
- [InstitutionAddress](docs/InstitutionAddress.md)
- [InstitutionDetails](docs/InstitutionDetails.md)
- [NaicsCode](docs/NaicsCode.md)
- [OfacSearch](docs/OfacSearch.md)
- [OrganizationConfiguration](docs/OrganizationConfiguration.md)
- [OwnerType](docs/OwnerType.md)
- [Phone](docs/Phone.md)
- [PhoneType](docs/PhoneType.md)
- [ReportAccountResponse](docs/ReportAccountResponse.md)
- [Representative](docs/Representative.md)
- [SicCode](docs/SicCode.md)
- [TransitAccountNumber](docs/TransitAccountNumber.md)
- [UpdateAccountStatus](docs/UpdateAccountStatus.md)
- [UpdateCustomerAddress](docs/UpdateCustomerAddress.md)
- [UpdateAddress](docs/UpdateAddress.md)
- [UpdateCustomerStatus](docs/UpdateCustomerStatus.md)
- [UpdateValidation](docs/UpdateValidation.md)

Expand Down
Loading

0 comments on commit 9d67f87

Please sign in to comment.