DealMakerAPI 0.101.3 → 0.101.5

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: 55765a5b64ddfca2093c2f5494bce0b5f6e54b0ff608663614840720c74fcf6e
4
- data.tar.gz: d3583c01449ce95219e8933824d5b084c4e32eb0ac2aa7b5db30198bed81bfa8
3
+ metadata.gz: 1a8e6e341ed61d9b8a86cca27ec62ab8c121c43849c6ff18907ebd18ff01be7e
4
+ data.tar.gz: 5307c78c7e812e9f228dadb3113004375f3e043cd38b2f93f4198b556db377f2
5
5
  SHA512:
6
- metadata.gz: aefbf1ae50c1b17c00a2e02697f68e4dfdfa05f95a1278465c944809dc710c86da9e3133c0d37eb0c5ca178ab625fa10eaba7db7e8aa566d590cd64d05ccf419
7
- data.tar.gz: 1ab8a5225bf46470df824626e73644dca1604f0b6b55efcde3ffa3917b56c342d7f4162e872f3f1ef6d3fa5896732c5ded51618970d62a0fc34da196ef5b9d85
6
+ metadata.gz: b4f4b27a07a54b6ac792852d1e0d5a8bc20247fde1228234a83944ae1b8ef5b661c766fc1c9a59764429bc40add02fe753e6754f1b984da2ec492ce61b7652fe
7
+ data.tar.gz: 49db98aacde6b8dac239f078016a6ef4f97961ad883a1ff0f5a5f0ea7f50b94370ca599bb22185f366139070842180393d1ec0ffabcc32b5ff6a0f91089e1646
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.101.3
341
+ - Package version: 0.101.5
342
342
  - Generator version: 7.6.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.101.3.gem
358
+ gem install ./DealMakerAPI-0.101.5.gem
359
359
  ```
360
360
 
361
- (for development, run `gem install --dev ./DealMakerAPI-0.101.3.gem` to install the development dependencies)
361
+ (for development, run `gem install --dev ./DealMakerAPI-0.101.5.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.101.3'
367
+ gem 'DealMakerAPI', '~> 0.101.5'
368
368
 
369
369
  ### Install from Git
370
370
 
@@ -434,6 +434,7 @@ Class | Method | HTTP request | Description
434
434
  *DealMakerAPI::CompanyApi* | [**send_portal_invite**](docs/CompanyApi.md#send_portal_invite) | **POST** /companies/{id}/shareholders/{shareholder_id}/send_portal_invite | Send portal invite to shareholder
435
435
  *DealMakerAPI::CountryApi* | [**get_country_states**](docs/CountryApi.md#get_country_states) | **GET** /country/states | Returns a list of all valid countries and it states
436
436
  *DealMakerAPI::CustomEmailsApi* | [**get_access_token**](docs/CustomEmailsApi.md#get_access_token) | **POST** /custom_emails/get_access_token | Generate authorization token information for initializing Beefree editor
437
+ *DealMakerAPI::DealApi* | [**bank_account_setup_intent**](docs/DealApi.md#bank_account_setup_intent) | **GET** /deals/{id}/investor/{investor_id}/subscription/{subscription_id}/payments/acss/bank_account_setup_intent | Prepares an investor for payment
437
438
  *DealMakerAPI::DealApi* | [**create_deal_setup**](docs/DealApi.md#create_deal_setup) | **POST** /deal_setups | Create deal setup
438
439
  *DealMakerAPI::DealApi* | [**get_deal**](docs/DealApi.md#get_deal) | **GET** /deals/{id} | Get deal by Deal ID
439
440
  *DealMakerAPI::DealApi* | [**get_deal_incentive_plan**](docs/DealApi.md#get_deal_incentive_plan) | **GET** /deals/{id}/incentive_plan | Get incentive plan by deal id
@@ -561,6 +562,7 @@ Class | Method | HTTP request | Description
561
562
  - [DealMakerAPI::V1EntitiesDeals](docs/V1EntitiesDeals.md)
562
563
  - [DealMakerAPI::V1EntitiesDealsIncentivePlan](docs/V1EntitiesDealsIncentivePlan.md)
563
564
  - [DealMakerAPI::V1EntitiesDealsIncentivePlansIncentiveTier](docs/V1EntitiesDealsIncentivePlansIncentiveTier.md)
565
+ - [DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent](docs/V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent.md)
564
566
  - [DealMakerAPI::V1EntitiesDealsPriceDetails](docs/V1EntitiesDealsPriceDetails.md)
565
567
  - [DealMakerAPI::V1EntitiesDividend](docs/V1EntitiesDividend.md)
566
568
  - [DealMakerAPI::V1EntitiesDividends](docs/V1EntitiesDividends.md)
data/docs/DealApi.md CHANGED
@@ -4,12 +4,83 @@ All URIs are relative to *http://api.dealmaker.tech*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**bank_account_setup_intent**](DealApi.md#bank_account_setup_intent) | **GET** /deals/{id}/investor/{investor_id}/subscription/{subscription_id}/payments/acss/bank_account_setup_intent | Prepares an investor for payment |
7
8
  | [**create_deal_setup**](DealApi.md#create_deal_setup) | **POST** /deal_setups | Create deal setup |
8
9
  | [**get_deal**](DealApi.md#get_deal) | **GET** /deals/{id} | Get deal by Deal ID |
9
10
  | [**get_deal_incentive_plan**](DealApi.md#get_deal_incentive_plan) | **GET** /deals/{id}/incentive_plan | Get incentive plan by deal id |
10
11
  | [**list_deals**](DealApi.md#list_deals) | **GET** /deals | List available deals |
11
12
 
12
13
 
14
+ ## bank_account_setup_intent
15
+
16
+ > <V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent> bank_account_setup_intent(id, investor_id, subscription_id)
17
+
18
+ Prepares an investor for payment
19
+
20
+ Prepare investor for payment
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'DealMakerAPI'
27
+ # setup authorization
28
+ DealMakerAPI.configure do |config|end
29
+
30
+ api_instance = DealMakerAPI::DealApi.new
31
+ id = 'id_example' # String | The deal id
32
+ investor_id = 56 # Integer | The investor id
33
+ subscription_id = 56 # Integer | The subscription id
34
+
35
+ begin
36
+ # Prepares an investor for payment
37
+ result = api_instance.bank_account_setup_intent(id, investor_id, subscription_id)
38
+ p result
39
+ rescue DealMakerAPI::ApiError => e
40
+ puts "Error when calling DealApi->bank_account_setup_intent: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the bank_account_setup_intent_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent>, Integer, Hash)> bank_account_setup_intent_with_http_info(id, investor_id, subscription_id)
49
+
50
+ ```ruby
51
+ begin
52
+ # Prepares an investor for payment
53
+ data, status_code, headers = api_instance.bank_account_setup_intent_with_http_info(id, investor_id, subscription_id)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent>
57
+ rescue DealMakerAPI::ApiError => e
58
+ puts "Error when calling DealApi->bank_account_setup_intent_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **id** | **String** | The deal id | |
67
+ | **investor_id** | **Integer** | The investor id | |
68
+ | **subscription_id** | **Integer** | The subscription id | |
69
+
70
+ ### Return type
71
+
72
+ [**V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent**](V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent.md)
73
+
74
+ ### Authorization
75
+
76
+ No authorization required
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: Not defined
81
+ - **Accept**: application/json
82
+
83
+
13
84
  ## create_deal_setup
14
85
 
15
86
  > <V1EntitiesDealSetup> create_deal_setup(create_deal_setup_request)
@@ -0,0 +1,22 @@
1
+ # DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **client_secret** | **String** | The client secret for the payment | [optional] |
8
+ | **name** | **String** | The name of the investor | [optional] |
9
+ | **email** | **String** | The email of the investor | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'DealMakerAPI'
15
+
16
+ instance = DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent.new(
17
+ client_secret: null,
18
+ name: null,
19
+ email: null
20
+ )
21
+ ```
22
+
@@ -12,6 +12,7 @@
12
12
  | **re_run_performed** | **Boolean** | Whether or not the entity has been re-run. | [optional] |
13
13
  | **email_content** | **String** | The custom message for the entity | [optional] |
14
14
  | **attachments** | [**V1EntitiesAttachment**](V1EntitiesAttachment.md) | | [optional] |
15
+ | **last_review_time** | **Time** | The last time that the search entity was manually reviewed | [optional] |
15
16
  | **required_fields** | [**V1EntitiesInvestorSearchEntitiesRequiredFields**](V1EntitiesInvestorSearchEntitiesRequiredFields.md) | | [optional] |
16
17
 
17
18
  ## Example
@@ -28,6 +29,7 @@ instance = DealMakerAPI::V1EntitiesInvestorSearchEntities.new(
28
29
  re_run_performed: null,
29
30
  email_content: null,
30
31
  attachments: null,
32
+ last_review_time: null,
31
33
  required_fields: null
32
34
  )
33
35
  ```
@@ -19,6 +19,81 @@ module DealMakerAPI
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Prepares an investor for payment
23
+ # Prepare investor for payment
24
+ # @param id [String] The deal id
25
+ # @param investor_id [Integer] The investor id
26
+ # @param subscription_id [Integer] The subscription id
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent]
29
+ def bank_account_setup_intent(id, investor_id, subscription_id, opts = {})
30
+ data, _status_code, _headers = bank_account_setup_intent_with_http_info(id, investor_id, subscription_id, opts)
31
+ data
32
+ end
33
+
34
+ # Prepares an investor for payment
35
+ # Prepare investor for payment
36
+ # @param id [String] The deal id
37
+ # @param investor_id [Integer] The investor id
38
+ # @param subscription_id [Integer] The subscription id
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent, Integer, Hash)>] V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent data, response status code and response headers
41
+ def bank_account_setup_intent_with_http_info(id, investor_id, subscription_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: DealApi.bank_account_setup_intent ...'
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealApi.bank_account_setup_intent"
48
+ end
49
+ # verify the required parameter 'investor_id' is set
50
+ if @api_client.config.client_side_validation && investor_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'investor_id' when calling DealApi.bank_account_setup_intent"
52
+ end
53
+ # verify the required parameter 'subscription_id' is set
54
+ if @api_client.config.client_side_validation && subscription_id.nil?
55
+ fail ArgumentError, "Missing the required parameter 'subscription_id' when calling DealApi.bank_account_setup_intent"
56
+ end
57
+ # resource path
58
+ local_var_path = '/deals/{id}/investor/{investor_id}/subscription/{subscription_id}/payments/acss/bank_account_setup_intent'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'investor_id' + '}', CGI.escape(investor_id.to_s)).sub('{' + 'subscription_id' + '}', CGI.escape(subscription_id.to_s))
59
+
60
+ # query parameters
61
+ query_params = opts[:query_params] || {}
62
+
63
+ # header parameters
64
+ header_params = opts[:header_params] || {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body]
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || []
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"DealApi.bank_account_setup_intent",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: DealApi#bank_account_setup_intent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
22
97
  # Create deal setup
23
98
  # Create deal setup
24
99
  # @param create_deal_setup_request [CreateDealSetupRequest]
@@ -0,0 +1,236 @@
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.6.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ # V1_Entities_Deals_Investors_Payment_Acss_BankAccountSetupIntent model
18
+ class V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent
19
+ # The client secret for the payment
20
+ attr_accessor :client_secret
21
+
22
+ # The name of the investor
23
+ attr_accessor :name
24
+
25
+ # The email of the investor
26
+ attr_accessor :email
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'client_secret' => :'clientSecret',
32
+ :'name' => :'name',
33
+ :'email' => :'email'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'client_secret' => :'String',
46
+ :'name' => :'String',
47
+ :'email' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'client_secret')
73
+ self.client_secret = attributes[:'client_secret']
74
+ end
75
+
76
+ if attributes.key?(:'name')
77
+ self.name = attributes[:'name']
78
+ end
79
+
80
+ if attributes.key?(:'email')
81
+ self.email = attributes[:'email']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ warn '[DEPRECATED] the `valid?` method is obsolete'
97
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param [Object] Object to be compared
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ client_secret == o.client_secret &&
106
+ name == o.name &&
107
+ email == o.email
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ def hash
119
+ [client_secret, name, email].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def self.build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ attributes = attributes.transform_keys(&:to_sym)
128
+ transformed_hash = {}
129
+ openapi_types.each_pair do |key, type|
130
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
131
+ transformed_hash["#{key}"] = nil
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[attribute_map[key]].is_a?(Array)
136
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
137
+ end
138
+ elsif !attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
140
+ end
141
+ end
142
+ new(transformed_hash)
143
+ end
144
+
145
+ # Deserializes the data based on type
146
+ # @param string type Data type
147
+ # @param string value Value to be deserialized
148
+ # @return [Object] Deserialized data
149
+ def self._deserialize(type, value)
150
+ case type.to_sym
151
+ when :Time
152
+ Time.parse(value)
153
+ when :Date
154
+ Date.parse(value)
155
+ when :String
156
+ value.to_s
157
+ when :Integer
158
+ value.to_i
159
+ when :Float
160
+ value.to_f
161
+ when :Boolean
162
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
+ true
164
+ else
165
+ false
166
+ end
167
+ when :Object
168
+ # generic object (usually a Hash), return directly
169
+ value
170
+ when /\AArray<(?<inner_type>.+)>\z/
171
+ inner_type = Regexp.last_match[:inner_type]
172
+ value.map { |v| _deserialize(inner_type, v) }
173
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
+ k_type = Regexp.last_match[:k_type]
175
+ v_type = Regexp.last_match[:v_type]
176
+ {}.tap do |hash|
177
+ value.each do |k, v|
178
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
+ end
180
+ end
181
+ else # model
182
+ # models (e.g. Pet) or oneOf
183
+ klass = DealMakerAPI.const_get(type)
184
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -39,6 +39,9 @@ module DealMakerAPI
39
39
 
40
40
  attr_accessor :attachments
41
41
 
42
+ # The last time that the search entity was manually reviewed
43
+ attr_accessor :last_review_time
44
+
42
45
  attr_accessor :required_fields
43
46
 
44
47
  class EnumAttributeValidator
@@ -74,6 +77,7 @@ module DealMakerAPI
74
77
  :'re_run_performed' => :'re_run_performed',
75
78
  :'email_content' => :'email_content',
76
79
  :'attachments' => :'attachments',
80
+ :'last_review_time' => :'last_review_time',
77
81
  :'required_fields' => :'required_fields'
78
82
  }
79
83
  end
@@ -94,6 +98,7 @@ module DealMakerAPI
94
98
  :'re_run_performed' => :'Boolean',
95
99
  :'email_content' => :'String',
96
100
  :'attachments' => :'V1EntitiesAttachment',
101
+ :'last_review_time' => :'Time',
97
102
  :'required_fields' => :'V1EntitiesInvestorSearchEntitiesRequiredFields'
98
103
  }
99
104
  end
@@ -151,6 +156,10 @@ module DealMakerAPI
151
156
  self.attachments = attributes[:'attachments']
152
157
  end
153
158
 
159
+ if attributes.key?(:'last_review_time')
160
+ self.last_review_time = attributes[:'last_review_time']
161
+ end
162
+
154
163
  if attributes.key?(:'required_fields')
155
164
  self.required_fields = attributes[:'required_fields']
156
165
  end
@@ -208,6 +217,7 @@ module DealMakerAPI
208
217
  re_run_performed == o.re_run_performed &&
209
218
  email_content == o.email_content &&
210
219
  attachments == o.attachments &&
220
+ last_review_time == o.last_review_time &&
211
221
  required_fields == o.required_fields
212
222
  end
213
223
 
@@ -220,7 +230,7 @@ module DealMakerAPI
220
230
  # Calculates hash code according to all attributes.
221
231
  # @return [Integer] Hash code
222
232
  def hash
223
- [id, name, type, type_num, status, re_run_performed, email_content, attachments, required_fields].hash
233
+ [id, name, type, type_num, status, re_run_performed, email_content, attachments, last_review_time, required_fields].hash
224
234
  end
225
235
 
226
236
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.6.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module DealMakerAPI
14
- VERSION = '0.101.3'
14
+ VERSION = '0.101.5'
15
15
  end
data/lib/DealMakerAPI.rb CHANGED
@@ -80,6 +80,7 @@ require 'DealMakerAPI/models/v1_entities_deal_setup_user'
80
80
  require 'DealMakerAPI/models/v1_entities_deals'
81
81
  require 'DealMakerAPI/models/v1_entities_deals_incentive_plan'
82
82
  require 'DealMakerAPI/models/v1_entities_deals_incentive_plans_incentive_tier'
83
+ require 'DealMakerAPI/models/v1_entities_deals_investors_payment_acss_bank_account_setup_intent'
83
84
  require 'DealMakerAPI/models/v1_entities_deals_price_details'
84
85
  require 'DealMakerAPI/models/v1_entities_dividend'
85
86
  require 'DealMakerAPI/models/v1_entities_dividends'
@@ -32,6 +32,20 @@ describe 'DealApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for bank_account_setup_intent
36
+ # Prepares an investor for payment
37
+ # Prepare investor for payment
38
+ # @param id The deal id
39
+ # @param investor_id The investor id
40
+ # @param subscription_id The subscription id
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent]
43
+ describe 'bank_account_setup_intent test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
35
49
  # unit tests for create_deal_setup
36
50
  # Create deal setup
37
51
  # Create deal setup
@@ -0,0 +1,48 @@
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.6.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent do
21
+ let(:instance) { DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent.new }
22
+
23
+ describe 'test an instance of V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent' do
24
+ it 'should create an instance of V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(DealMakerAPI::V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "client_secret"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "name"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "email"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -83,6 +83,12 @@ describe DealMakerAPI::V1EntitiesInvestorSearchEntities do
83
83
  end
84
84
  end
85
85
 
86
+ describe 'test attribute "last_review_time"' do
87
+ it 'should work' do
88
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
89
+ end
90
+ end
91
+
86
92
  describe 'test attribute "required_fields"' do
87
93
  it 'should work' do
88
94
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
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.101.3
4
+ version: 0.101.5
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-18 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -137,6 +137,7 @@ files:
137
137
  - docs/V1EntitiesDeals.md
138
138
  - docs/V1EntitiesDealsIncentivePlan.md
139
139
  - docs/V1EntitiesDealsIncentivePlansIncentiveTier.md
140
+ - docs/V1EntitiesDealsInvestorsPaymentAcssBankAccountSetupIntent.md
140
141
  - docs/V1EntitiesDealsPriceDetails.md
141
142
  - docs/V1EntitiesDividend.md
142
143
  - docs/V1EntitiesDividends.md
@@ -272,6 +273,7 @@ files:
272
273
  - lib/DealMakerAPI/models/v1_entities_deals.rb
273
274
  - lib/DealMakerAPI/models/v1_entities_deals_incentive_plan.rb
274
275
  - lib/DealMakerAPI/models/v1_entities_deals_incentive_plans_incentive_tier.rb
276
+ - lib/DealMakerAPI/models/v1_entities_deals_investors_payment_acss_bank_account_setup_intent.rb
275
277
  - lib/DealMakerAPI/models/v1_entities_deals_price_details.rb
276
278
  - lib/DealMakerAPI/models/v1_entities_dividend.rb
277
279
  - lib/DealMakerAPI/models/v1_entities_dividends.rb
@@ -402,6 +404,7 @@ files:
402
404
  - spec/models/v1_entities_deal_spec.rb
403
405
  - spec/models/v1_entities_deals_incentive_plan_spec.rb
404
406
  - spec/models/v1_entities_deals_incentive_plans_incentive_tier_spec.rb
407
+ - spec/models/v1_entities_deals_investors_payment_acss_bank_account_setup_intent_spec.rb
405
408
  - spec/models/v1_entities_deals_price_details_spec.rb
406
409
  - spec/models/v1_entities_deals_spec.rb
407
410
  - spec/models/v1_entities_dividend_spec.rb
@@ -540,6 +543,7 @@ test_files:
540
543
  - spec/models/v1_entities_bulk_upload_details_spec.rb
541
544
  - spec/models/v1_entities_investor_spec.rb
542
545
  - spec/models/v1_entities_investor_profile_corporation_spec.rb
546
+ - spec/models/v1_entities_deals_investors_payment_acss_bank_account_setup_intent_spec.rb
543
547
  - spec/models/v1_entities_attachment_spec.rb
544
548
  - spec/models/v1_entities_investor_profile_fields_beneficial_owner_spec.rb
545
549
  - spec/models/v1_entities_deal_investor_metrics_spec.rb