DealMakerAPI 0.100.3 → 0.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1d9f5fb7028f6ed99986025cc4e3257d0f69cca9f412c83ce9794316d6c6528
4
- data.tar.gz: b77e8290800e189f20488bd614acf05ba76538dfd21f58c826cfd3557ca181bf
3
+ metadata.gz: b07b09510ffc5abbfaf6ce4fca554fd01c2ecb1aa00f815b85de2b7cd7830452
4
+ data.tar.gz: ceed1aa79cf61997a0b42100ff54bc9a4590eaa90efdcb26ecf9dc98f1525d8b
5
5
  SHA512:
6
- metadata.gz: e445619a5c48f0937a6e80bdcd2ac29f209057a1b80faa36b699b742ef12290a752721ee3027183ee58dea9fa594fd66f97fa443868e36e4f75681cf46a40459
7
- data.tar.gz: 303760146f8bd49839d19521279e34d36092c51d1034941ffe48be0ce24663d12b41b0eec5a6914d3116f32110ddecb47ca1a94fd1b649511ef12823b6a1316d
6
+ metadata.gz: b1c1018a9795db6216910f421d9790fb99494a08ea3453ad6be49e92b8d2bbd5c4d8e617067b3677d8aa727ef08fa30b77360875f49cb2b97c766a152797a90e
7
+ data.tar.gz: 653ca54a5fc6b2a52b780a45d789d916dac2e05d1aa7509000f4ee26e51bc89f18820afce3db6211cfa7e00e066c113ca43c2fd48ea21056ff445bdc7644141d
data/README.md CHANGED
@@ -338,7 +338,7 @@ Given the high number of updates our platform performs on any investor, we’ve
338
338
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
339
339
 
340
340
  - API version: 1.75.0
341
- - Package version: 0.100.3
341
+ - Package version: 0.101.0
342
342
  - Generator version: 7.5.0-SNAPSHOT
343
343
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
344
344
 
@@ -355,16 +355,16 @@ gem build DealMakerAPI.gemspec
355
355
  Then either install the gem locally:
356
356
 
357
357
  ```shell
358
- gem install ./DealMakerAPI-0.100.3.gem
358
+ gem install ./DealMakerAPI-0.101.0.gem
359
359
  ```
360
360
 
361
- (for development, run `gem install --dev ./DealMakerAPI-0.100.3.gem` to install the development dependencies)
361
+ (for development, run `gem install --dev ./DealMakerAPI-0.101.0.gem` to install the development dependencies)
362
362
 
363
363
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
364
364
 
365
365
  Finally add this to the Gemfile:
366
366
 
367
- gem 'DealMakerAPI', '~> 0.100.3'
367
+ gem 'DealMakerAPI', '~> 0.101.0'
368
368
 
369
369
  ### Install from Git
370
370
 
@@ -472,6 +472,7 @@ Class | Method | HTTP request | Description
472
472
  *DealMakerAPI::InvestorApi* | [**get_investor_otp_link**](docs/InvestorApi.md#get_investor_otp_link) | **GET** /deals/{id}/investors/{investor_id}/otp_access_link | Get OTP access link for deal investor
473
473
  *DealMakerAPI::InvestorApi* | [**list_investors**](docs/InvestorApi.md#list_investors) | **GET** /deals/{id}/investors | List deal investors
474
474
  *DealMakerAPI::InvestorApi* | [**patch_investor**](docs/InvestorApi.md#patch_investor) | **PATCH** /deals/{id}/investors/{investor_id} | Patch a deal investor
475
+ *DealMakerAPI::InvestorApi* | [**request_new_document**](docs/InvestorApi.md#request_new_document) | **POST** /deals/{id}/investors/{investor_id}/background_checks/{search_entity_id}/send_review | Request new document for a specific entity
475
476
  *DealMakerAPI::InvestorApi* | [**run_background_search**](docs/InvestorApi.md#run_background_search) | **POST** /deals/{id}/investors/{investor_id}/background_checks/run | Run Alloy background search for the investor
476
477
  *DealMakerAPI::InvestorApi* | [**update_investor**](docs/InvestorApi.md#update_investor) | **PUT** /deals/{id}/investors/{investor_id} | Update a deal investor
477
478
  *DealMakerAPI::InvestorProfileApi* | [**create_corporation_profile**](docs/InvestorProfileApi.md#create_corporation_profile) | **POST** /investor_profiles/corporations | Create new corporation investor profile.
@@ -530,6 +531,7 @@ Class | Method | HTTP request | Description
530
531
  - [DealMakerAPI::PutDealsIdInvestors](docs/PutDealsIdInvestors.md)
531
532
  - [DealMakerAPI::PutDealsIdScriptTagEnvironmentRequest](docs/PutDealsIdScriptTagEnvironmentRequest.md)
532
533
  - [DealMakerAPI::PutWebhooksIdRequest](docs/PutWebhooksIdRequest.md)
534
+ - [DealMakerAPI::RequestNewDocumentRequest](docs/RequestNewDocumentRequest.md)
533
535
  - [DealMakerAPI::RunBackgroundSearchRequest](docs/RunBackgroundSearchRequest.md)
534
536
  - [DealMakerAPI::SendPortalInviteRequest](docs/SendPortalInviteRequest.md)
535
537
  - [DealMakerAPI::UpdateUserPasswordRequest](docs/UpdateUserPasswordRequest.md)
data/docs/InvestorApi.md CHANGED
@@ -18,6 +18,7 @@ All URIs are relative to *http://api.dealmaker.tech*
18
18
  | [**get_investor_otp_link**](InvestorApi.md#get_investor_otp_link) | **GET** /deals/{id}/investors/{investor_id}/otp_access_link | Get OTP access link for deal investor |
19
19
  | [**list_investors**](InvestorApi.md#list_investors) | **GET** /deals/{id}/investors | List deal investors |
20
20
  | [**patch_investor**](InvestorApi.md#patch_investor) | **PATCH** /deals/{id}/investors/{investor_id} | Patch a deal investor |
21
+ | [**request_new_document**](InvestorApi.md#request_new_document) | **POST** /deals/{id}/investors/{investor_id}/background_checks/{search_entity_id}/send_review | Request new document for a specific entity |
21
22
  | [**run_background_search**](InvestorApi.md#run_background_search) | **POST** /deals/{id}/investors/{investor_id}/background_checks/run | Run Alloy background search for the investor |
22
23
  | [**update_investor**](InvestorApi.md#update_investor) | **PUT** /deals/{id}/investors/{investor_id} | Update a deal investor |
23
24
 
@@ -994,6 +995,77 @@ No authorization required
994
995
  - **Accept**: application/json
995
996
 
996
997
 
998
+ ## request_new_document
999
+
1000
+ > request_new_document(id, investor_id, search_entity_id, request_new_document_request)
1001
+
1002
+ Request new document for a specific entity
1003
+
1004
+ Request new document to entity
1005
+
1006
+ ### Examples
1007
+
1008
+ ```ruby
1009
+ require 'time'
1010
+ require 'DealMakerAPI'
1011
+ # setup authorization
1012
+ DealMakerAPI.configure do |config|end
1013
+
1014
+ api_instance = DealMakerAPI::InvestorApi.new
1015
+ id = 56 # Integer |
1016
+ investor_id = 56 # Integer |
1017
+ search_entity_id = 56 # Integer |
1018
+ request_new_document_request = DealMakerAPI::RequestNewDocumentRequest.new({type: 'incomplete'}) # RequestNewDocumentRequest |
1019
+
1020
+ begin
1021
+ # Request new document for a specific entity
1022
+ api_instance.request_new_document(id, investor_id, search_entity_id, request_new_document_request)
1023
+ rescue DealMakerAPI::ApiError => e
1024
+ puts "Error when calling InvestorApi->request_new_document: #{e}"
1025
+ end
1026
+ ```
1027
+
1028
+ #### Using the request_new_document_with_http_info variant
1029
+
1030
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
1031
+
1032
+ > <Array(nil, Integer, Hash)> request_new_document_with_http_info(id, investor_id, search_entity_id, request_new_document_request)
1033
+
1034
+ ```ruby
1035
+ begin
1036
+ # Request new document for a specific entity
1037
+ data, status_code, headers = api_instance.request_new_document_with_http_info(id, investor_id, search_entity_id, request_new_document_request)
1038
+ p status_code # => 2xx
1039
+ p headers # => { ... }
1040
+ p data # => nil
1041
+ rescue DealMakerAPI::ApiError => e
1042
+ puts "Error when calling InvestorApi->request_new_document_with_http_info: #{e}"
1043
+ end
1044
+ ```
1045
+
1046
+ ### Parameters
1047
+
1048
+ | Name | Type | Description | Notes |
1049
+ | ---- | ---- | ----------- | ----- |
1050
+ | **id** | **Integer** | | |
1051
+ | **investor_id** | **Integer** | | |
1052
+ | **search_entity_id** | **Integer** | | |
1053
+ | **request_new_document_request** | [**RequestNewDocumentRequest**](RequestNewDocumentRequest.md) | | |
1054
+
1055
+ ### Return type
1056
+
1057
+ nil (empty response body)
1058
+
1059
+ ### Authorization
1060
+
1061
+ No authorization required
1062
+
1063
+ ### HTTP request headers
1064
+
1065
+ - **Content-Type**: application/json
1066
+ - **Accept**: Not defined
1067
+
1068
+
997
1069
  ## run_background_search
998
1070
 
999
1071
  > run_background_search(id, investor_id, run_background_search_request)
@@ -0,0 +1,20 @@
1
+ # DealMakerAPI::RequestNewDocumentRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | The type of request. | |
8
+ | **message** | **String** | The message added by the reviewer. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'DealMakerAPI'
14
+
15
+ instance = DealMakerAPI::RequestNewDocumentRequest.new(
16
+ type: null,
17
+ message: null
18
+ )
19
+ ```
20
+
@@ -1056,6 +1056,90 @@ module DealMakerAPI
1056
1056
  return data, status_code, headers
1057
1057
  end
1058
1058
 
1059
+ # Request new document for a specific entity
1060
+ # Request new document to entity
1061
+ # @param id [Integer]
1062
+ # @param investor_id [Integer]
1063
+ # @param search_entity_id [Integer]
1064
+ # @param request_new_document_request [RequestNewDocumentRequest]
1065
+ # @param [Hash] opts the optional parameters
1066
+ # @return [nil]
1067
+ def request_new_document(id, investor_id, search_entity_id, request_new_document_request, opts = {})
1068
+ request_new_document_with_http_info(id, investor_id, search_entity_id, request_new_document_request, opts)
1069
+ nil
1070
+ end
1071
+
1072
+ # Request new document for a specific entity
1073
+ # Request new document to entity
1074
+ # @param id [Integer]
1075
+ # @param investor_id [Integer]
1076
+ # @param search_entity_id [Integer]
1077
+ # @param request_new_document_request [RequestNewDocumentRequest]
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1080
+ def request_new_document_with_http_info(id, investor_id, search_entity_id, request_new_document_request, opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug 'Calling API: InvestorApi.request_new_document ...'
1083
+ end
1084
+ # verify the required parameter 'id' is set
1085
+ if @api_client.config.client_side_validation && id.nil?
1086
+ fail ArgumentError, "Missing the required parameter 'id' when calling InvestorApi.request_new_document"
1087
+ end
1088
+ # verify the required parameter 'investor_id' is set
1089
+ if @api_client.config.client_side_validation && investor_id.nil?
1090
+ fail ArgumentError, "Missing the required parameter 'investor_id' when calling InvestorApi.request_new_document"
1091
+ end
1092
+ # verify the required parameter 'search_entity_id' is set
1093
+ if @api_client.config.client_side_validation && search_entity_id.nil?
1094
+ fail ArgumentError, "Missing the required parameter 'search_entity_id' when calling InvestorApi.request_new_document"
1095
+ end
1096
+ # verify the required parameter 'request_new_document_request' is set
1097
+ if @api_client.config.client_side_validation && request_new_document_request.nil?
1098
+ fail ArgumentError, "Missing the required parameter 'request_new_document_request' when calling InvestorApi.request_new_document"
1099
+ end
1100
+ # resource path
1101
+ local_var_path = '/deals/{id}/investors/{investor_id}/background_checks/{search_entity_id}/send_review'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'investor_id' + '}', CGI.escape(investor_id.to_s)).sub('{' + 'search_entity_id' + '}', CGI.escape(search_entity_id.to_s))
1102
+
1103
+ # query parameters
1104
+ query_params = opts[:query_params] || {}
1105
+
1106
+ # header parameters
1107
+ header_params = opts[:header_params] || {}
1108
+ # HTTP header 'Content-Type'
1109
+ content_type = @api_client.select_header_content_type(['application/json'])
1110
+ if !content_type.nil?
1111
+ header_params['Content-Type'] = content_type
1112
+ end
1113
+
1114
+ # form parameters
1115
+ form_params = opts[:form_params] || {}
1116
+
1117
+ # http body (model)
1118
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_new_document_request)
1119
+
1120
+ # return_type
1121
+ return_type = opts[:debug_return_type]
1122
+
1123
+ # auth_names
1124
+ auth_names = opts[:debug_auth_names] || []
1125
+
1126
+ new_options = opts.merge(
1127
+ :operation => :"InvestorApi.request_new_document",
1128
+ :header_params => header_params,
1129
+ :query_params => query_params,
1130
+ :form_params => form_params,
1131
+ :body => post_body,
1132
+ :auth_names => auth_names,
1133
+ :return_type => return_type
1134
+ )
1135
+
1136
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1137
+ if @api_client.config.debugging
1138
+ @api_client.config.logger.debug "API called: InvestorApi#request_new_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1139
+ end
1140
+ return data, status_code, headers
1141
+ end
1142
+
1059
1143
  # Run Alloy background search for the investor
1060
1144
  # Run Alloy background search for the investor
1061
1145
  # @param id [Integer]
@@ -0,0 +1,266 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ class RequestNewDocumentRequest
18
+ # The type of request.
19
+ attr_accessor :type
20
+
21
+ # The message added by the reviewer.
22
+ attr_accessor :message
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'type' => :'type',
50
+ :'message' => :'message'
51
+ }
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'type' => :'String',
63
+ :'message' => :'String'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::RequestNewDocumentRequest` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::RequestNewDocumentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'type')
89
+ self.type = attributes[:'type']
90
+ else
91
+ self.type = nil
92
+ end
93
+
94
+ if attributes.key?(:'message')
95
+ self.message = attributes[:'message']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @type.nil?
105
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @type.nil?
116
+ type_validator = EnumAttributeValidator.new('String', ["incomplete", "approved", "additional_docs_requested", "flagged"])
117
+ return false unless type_validator.valid?(@type)
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method checking allowed values (enum).
122
+ # @param [Object] type Object to be assigned
123
+ def type=(type)
124
+ validator = EnumAttributeValidator.new('String', ["incomplete", "approved", "additional_docs_requested", "flagged"])
125
+ unless validator.valid?(type)
126
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
127
+ end
128
+ @type = type
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ type == o.type &&
137
+ message == o.message
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [type, message].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def self._deserialize(type, value)
180
+ case type.to_sym
181
+ when :Time
182
+ Time.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ # models (e.g. Pet) or oneOf
213
+ klass = DealMakerAPI.const_get(type)
214
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
+ end
216
+ end
217
+
218
+ # Returns the string representation of the object
219
+ # @return [String] String presentation of the object
220
+ def to_s
221
+ to_hash.to_s
222
+ end
223
+
224
+ # to_body is an alias to to_hash (backward compatibility)
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_body
227
+ to_hash
228
+ end
229
+
230
+ # Returns the object in the form of hash
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_hash
233
+ hash = {}
234
+ self.class.attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -11,5 +11,5 @@ Generator version: 7.5.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module DealMakerAPI
14
- VERSION = '0.100.3'
14
+ VERSION = '0.101.0'
15
15
  end
data/lib/DealMakerAPI.rb CHANGED
@@ -51,6 +51,7 @@ require 'DealMakerAPI/models/post_webhooks_request'
51
51
  require 'DealMakerAPI/models/put_deals_id_investors'
52
52
  require 'DealMakerAPI/models/put_deals_id_script_tag_environment_request'
53
53
  require 'DealMakerAPI/models/put_webhooks_id_request'
54
+ require 'DealMakerAPI/models/request_new_document_request'
54
55
  require 'DealMakerAPI/models/run_background_search_request'
55
56
  require 'DealMakerAPI/models/send_portal_invite_request'
56
57
  require 'DealMakerAPI/models/update_user_password_request'
@@ -224,6 +224,21 @@ describe 'InvestorApi' do
224
224
  end
225
225
  end
226
226
 
227
+ # unit tests for request_new_document
228
+ # Request new document for a specific entity
229
+ # Request new document to entity
230
+ # @param id
231
+ # @param investor_id
232
+ # @param search_entity_id
233
+ # @param request_new_document_request
234
+ # @param [Hash] opts the optional parameters
235
+ # @return [nil]
236
+ describe 'request_new_document test' do
237
+ it 'should work' do
238
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
239
+ end
240
+ end
241
+
227
242
  # unit tests for run_background_search
228
243
  # Run Alloy background search for the investor
229
244
  # Run Alloy background search for the investor
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DealMakerAPI::RequestNewDocumentRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DealMakerAPI::RequestNewDocumentRequest do
21
+ let(:instance) { DealMakerAPI::RequestNewDocumentRequest.new }
22
+
23
+ describe 'test an instance of RequestNewDocumentRequest' do
24
+ it 'should create an instance of RequestNewDocumentRequest' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DealMakerAPI::RequestNewDocumentRequest)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "type"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["incomplete", "approved", "additional_docs_requested", "flagged"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.type = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "message"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DealMakerAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.100.3
4
+ version: 0.101.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DealMaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-08 00:00:00.000000000 Z
11
+ date: 2024-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -104,6 +104,7 @@ files:
104
104
  - docs/PutDealsIdInvestors.md
105
105
  - docs/PutDealsIdScriptTagEnvironmentRequest.md
106
106
  - docs/PutWebhooksIdRequest.md
107
+ - docs/RequestNewDocumentRequest.md
107
108
  - docs/RunBackgroundSearchRequest.md
108
109
  - docs/SendPortalInviteRequest.md
109
110
  - docs/ShareholderApi.md
@@ -241,6 +242,7 @@ files:
241
242
  - lib/DealMakerAPI/models/put_deals_id_investors.rb
242
243
  - lib/DealMakerAPI/models/put_deals_id_script_tag_environment_request.rb
243
244
  - lib/DealMakerAPI/models/put_webhooks_id_request.rb
245
+ - lib/DealMakerAPI/models/request_new_document_request.rb
244
246
  - lib/DealMakerAPI/models/run_background_search_request.rb
245
247
  - lib/DealMakerAPI/models/send_portal_invite_request.rb
246
248
  - lib/DealMakerAPI/models/update_user_password_request.rb
@@ -370,6 +372,7 @@ files:
370
372
  - spec/models/put_deals_id_investors_spec.rb
371
373
  - spec/models/put_deals_id_script_tag_environment_request_spec.rb
372
374
  - spec/models/put_webhooks_id_request_spec.rb
375
+ - spec/models/request_new_document_request_spec.rb
373
376
  - spec/models/run_background_search_request_spec.rb
374
377
  - spec/models/send_portal_invite_request_spec.rb
375
378
  - spec/models/update_user_password_request_spec.rb
@@ -547,6 +550,7 @@ test_files:
547
550
  - spec/models/add506c_document_request_spec.rb
548
551
  - spec/models/v1_entities_investor_user_spec.rb
549
552
  - spec/models/v1_entities_company_deal_spec.rb
553
+ - spec/models/request_new_document_request_spec.rb
550
554
  - spec/models/create_company_request_spec.rb
551
555
  - spec/models/v1_entities_investor_profile_fields_primary_holder_spec.rb
552
556
  - spec/models/create_bulk_upload_request_spec.rb