DealMakerAPI 0.91.4 → 0.92.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d51e0832687d864a317dfd25d6c628bacb7fa26da49b6a55605ebb2ab4ede14
4
- data.tar.gz: cb1d0616d5ca1f1278a3a5ceb23f21b3e432eb09e1801b0f15bf245c498bfa37
3
+ metadata.gz: 6416b9d2130f7ae1ce5c6d88813027879430484298c2e90206d7aa25b3646dc1
4
+ data.tar.gz: e89a4d02bb9f1ad30cca734bd918b8051d6dd3d797e0b7e9cb58944a2af131cc
5
5
  SHA512:
6
- metadata.gz: 805e5f134448cb906a584de0a3e7d3b22683c87195a94060b3b06ad4f2f3f427b25bb54acd26076ebf65d2ef34b4545f2863770f557a7df66e196b919517f71a
7
- data.tar.gz: 65d66fa14075b595473eafbae4ffa9fba59f0057303a3e94ee5fb6b98868ccc023dc79e22d231c4674d02a42f49ae9f01b7fcfc7cb13b8844f7769d8c455e8e4
6
+ metadata.gz: f174c4f630fff0a07cf858ef7fcebdaf1895662f2cac718cb12f1c55d36531b5039afc423c7dd4f238853a43d5e241dc559d203563b179bd7e652e073d34a1c5
7
+ data.tar.gz: 700663db1c8a878e00a658dcf2ee2c0bd79c94a0551fc81f35589e9bc57f81e0935cd4380a4267c9eb4c09133dd9830b5e15182e6726334d415200332353d732
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.91.4
341
+ - Package version: 0.92.1
342
342
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
343
343
 
344
344
  ## Installation
@@ -354,16 +354,16 @@ gem build DealMakerAPI.gemspec
354
354
  Then either install the gem locally:
355
355
 
356
356
  ```shell
357
- gem install ./DealMakerAPI-0.91.4.gem
357
+ gem install ./DealMakerAPI-0.92.1.gem
358
358
  ```
359
359
 
360
- (for development, run `gem install --dev ./DealMakerAPI-0.91.4.gem` to install the development dependencies)
360
+ (for development, run `gem install --dev ./DealMakerAPI-0.92.1.gem` to install the development dependencies)
361
361
 
362
362
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
363
363
 
364
364
  Finally add this to the Gemfile:
365
365
 
366
- gem 'DealMakerAPI', '~> 0.91.4'
366
+ gem 'DealMakerAPI', '~> 0.92.1'
367
367
 
368
368
  ### Install from Git
369
369
 
@@ -442,6 +442,7 @@ Class | Method | HTTP request | Description
442
442
  *DealMakerAPI::DefaultApi* | [**post_deals_deal_id_payment_onboarding_questionnaire_qualification_questionnaire_submit**](docs/DefaultApi.md#post_deals_deal_id_payment_onboarding_questionnaire_qualification_questionnaire_submit) | **POST** /deals/{deal_id}/payment_onboarding/questionnaire/qualification_questionnaire/submit | Submit a qualification questionnaire form
443
443
  *DealMakerAPI::DefaultApi* | [**post_webhooks**](docs/DefaultApi.md#post_webhooks) | **POST** /webhooks | Creates a webhook subscription which is associated to the user
444
444
  *DealMakerAPI::DefaultApi* | [**put_webhooks_id**](docs/DefaultApi.md#put_webhooks_id) | **PUT** /webhooks/{id} | Updates webhook subscription and webhooks subcription deals
445
+ *DealMakerAPI::IncentivePlanApi* | [**get_deal_incentive_plans_time**](docs/IncentivePlanApi.md#get_deal_incentive_plans_time) | **GET** /deals/{id}/incentive_plans/time | Get incentive plans by deal id
445
446
  *DealMakerAPI::InvestorApi* | [**add506c_document**](docs/InvestorApi.md#add506c_document) | **POST** /deals/{id}/investors/{investor_id}/add_506c_document | Add 506c document for deal investor
446
447
  *DealMakerAPI::InvestorApi* | [**add_document**](docs/InvestorApi.md#add_document) | **POST** /deals/{id}/investors/{investor_id}/add_document | Add document for deal investor
447
448
  *DealMakerAPI::InvestorApi* | [**bulk_upload_investors**](docs/InvestorApi.md#bulk_upload_investors) | **POST** /deals/{id}/investors/bulk_upload | Bulk upload investors for deal investor
@@ -0,0 +1,82 @@
1
+ # DealMakerAPI::IncentivePlanApi
2
+
3
+ All URIs are relative to *http://api.dealmaker.tech*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_deal_incentive_plans_time**](IncentivePlanApi.md#get_deal_incentive_plans_time) | **GET** /deals/{id}/incentive_plans/time | Get incentive plans by deal id |
8
+
9
+
10
+ ## get_deal_incentive_plans_time
11
+
12
+ > <V1EntitiesDealsPriceDetails> get_deal_incentive_plans_time(id, opts)
13
+
14
+ Get incentive plans by deal id
15
+
16
+ Gets incentive plans with time tiers from the deal given deal id.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'DealMakerAPI'
23
+ # setup authorization
24
+ DealMakerAPI.configure do |config|end
25
+
26
+ api_instance = DealMakerAPI::IncentivePlanApi.new
27
+ id = 56 # Integer | The deal id.
28
+ opts = {
29
+ page: 56, # Integer | Page offset to fetch.
30
+ per_page: 56, # Integer | Number of results to return per page.
31
+ offset: 56 # Integer | Pad a number of results.
32
+ }
33
+
34
+ begin
35
+ # Get incentive plans by deal id
36
+ result = api_instance.get_deal_incentive_plans_time(id, opts)
37
+ p result
38
+ rescue DealMakerAPI::ApiError => e
39
+ puts "Error when calling IncentivePlanApi->get_deal_incentive_plans_time: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the get_deal_incentive_plans_time_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<V1EntitiesDealsPriceDetails>, Integer, Hash)> get_deal_incentive_plans_time_with_http_info(id, opts)
48
+
49
+ ```ruby
50
+ begin
51
+ # Get incentive plans by deal id
52
+ data, status_code, headers = api_instance.get_deal_incentive_plans_time_with_http_info(id, opts)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <V1EntitiesDealsPriceDetails>
56
+ rescue DealMakerAPI::ApiError => e
57
+ puts "Error when calling IncentivePlanApi->get_deal_incentive_plans_time_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **id** | **Integer** | The deal id. | |
66
+ | **page** | **Integer** | Page offset to fetch. | [optional][default to 1] |
67
+ | **per_page** | **Integer** | Number of results to return per page. | [optional][default to 25] |
68
+ | **offset** | **Integer** | Pad a number of results. | [optional][default to 0] |
69
+
70
+ ### Return type
71
+
72
+ [**V1EntitiesDealsPriceDetails**](V1EntitiesDealsPriceDetails.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
+
@@ -11,6 +11,7 @@
11
11
  | **active_at** | **Time** | The incentive plan active date. | [optional] |
12
12
  | **created_at** | **Time** | The creation time. | [optional] |
13
13
  | **updated_at** | **Time** | The last update time. | [optional] |
14
+ | **tiers** | [**V1EntitiesDealsIncentivePlansIncentiveTier**](V1EntitiesDealsIncentivePlansIncentiveTier.md) | | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = DealMakerAPI::V1EntitiesDealsIncentivePlan.new(
24
25
  funded_by_offset: null,
25
26
  active_at: null,
26
27
  created_at: null,
27
- updated_at: null
28
+ updated_at: null,
29
+ tiers: null
28
30
  )
29
31
  ```
30
32
 
@@ -0,0 +1,94 @@
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
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DealMakerAPI
16
+ class IncentivePlanApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get incentive plans by deal id
23
+ # Gets incentive plans with time tiers from the deal given deal id.
24
+ # @param id [Integer] The deal id.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page Page offset to fetch. (default to 1)
27
+ # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
28
+ # @option opts [Integer] :offset Pad a number of results. (default to 0)
29
+ # @return [V1EntitiesDealsPriceDetails]
30
+ def get_deal_incentive_plans_time(id, opts = {})
31
+ data, _status_code, _headers = get_deal_incentive_plans_time_with_http_info(id, opts)
32
+ data
33
+ end
34
+
35
+ # Get incentive plans by deal id
36
+ # Gets incentive plans with time tiers from the deal given deal id.
37
+ # @param id [Integer] The deal id.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Integer] :page Page offset to fetch. (default to 1)
40
+ # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
41
+ # @option opts [Integer] :offset Pad a number of results. (default to 0)
42
+ # @return [Array<(V1EntitiesDealsPriceDetails, Integer, Hash)>] V1EntitiesDealsPriceDetails data, response status code and response headers
43
+ def get_deal_incentive_plans_time_with_http_info(id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: IncentivePlanApi.get_deal_incentive_plans_time ...'
46
+ end
47
+ # verify the required parameter 'id' is set
48
+ if @api_client.config.client_side_validation && id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'id' when calling IncentivePlanApi.get_deal_incentive_plans_time"
50
+ end
51
+ # resource path
52
+ local_var_path = '/deals/{id}/incentive_plans/time'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
57
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
58
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
59
+
60
+ # header parameters
61
+ header_params = opts[:header_params] || {}
62
+ # HTTP header 'Accept' (if needed)
63
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
64
+
65
+ # form parameters
66
+ form_params = opts[:form_params] || {}
67
+
68
+ # http body (model)
69
+ post_body = opts[:debug_body]
70
+
71
+ # return_type
72
+ return_type = opts[:debug_return_type] || 'V1EntitiesDealsPriceDetails'
73
+
74
+ # auth_names
75
+ auth_names = opts[:debug_auth_names] || []
76
+
77
+ new_options = opts.merge(
78
+ :operation => :"IncentivePlanApi.get_deal_incentive_plans_time",
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => return_type
85
+ )
86
+
87
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: IncentivePlanApi#get_deal_incentive_plans_time\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+ end
94
+ end
@@ -36,6 +36,8 @@ module DealMakerAPI
36
36
  # The last update time.
37
37
  attr_accessor :updated_at
38
38
 
39
+ attr_accessor :tiers
40
+
39
41
  class EnumAttributeValidator
40
42
  attr_reader :datatype
41
43
  attr_reader :allowable_values
@@ -67,7 +69,8 @@ module DealMakerAPI
67
69
  :'funded_by_offset' => :'funded_by_offset',
68
70
  :'active_at' => :'active_at',
69
71
  :'created_at' => :'created_at',
70
- :'updated_at' => :'updated_at'
72
+ :'updated_at' => :'updated_at',
73
+ :'tiers' => :'tiers'
71
74
  }
72
75
  end
73
76
 
@@ -85,7 +88,8 @@ module DealMakerAPI
85
88
  :'funded_by_offset' => :'Integer',
86
89
  :'active_at' => :'Time',
87
90
  :'created_at' => :'Time',
88
- :'updated_at' => :'Time'
91
+ :'updated_at' => :'Time',
92
+ :'tiers' => :'V1EntitiesDealsIncentivePlansIncentiveTier'
89
93
  }
90
94
  end
91
95
 
@@ -137,6 +141,10 @@ module DealMakerAPI
137
141
  if attributes.key?(:'updated_at')
138
142
  self.updated_at = attributes[:'updated_at']
139
143
  end
144
+
145
+ if attributes.key?(:'tiers')
146
+ self.tiers = attributes[:'tiers']
147
+ end
140
148
  end
141
149
 
142
150
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -177,7 +185,8 @@ module DealMakerAPI
177
185
  funded_by_offset == o.funded_by_offset &&
178
186
  active_at == o.active_at &&
179
187
  created_at == o.created_at &&
180
- updated_at == o.updated_at
188
+ updated_at == o.updated_at &&
189
+ tiers == o.tiers
181
190
  end
182
191
 
183
192
  # @see the `==` method
@@ -189,7 +198,7 @@ module DealMakerAPI
189
198
  # Calculates hash code according to all attributes.
190
199
  # @return [Integer] Hash code
191
200
  def hash
192
- [id, deal_id, plan_type, funded_by_offset, active_at, created_at, updated_at].hash
201
+ [id, deal_id, plan_type, funded_by_offset, active_at, created_at, updated_at, tiers].hash
193
202
  end
194
203
 
195
204
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.2.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module DealMakerAPI
14
- VERSION = '0.91.4'
14
+ VERSION = '0.92.1'
15
15
  end
data/lib/DealMakerAPI.rb CHANGED
@@ -124,6 +124,7 @@ require 'DealMakerAPI/api/country_api'
124
124
  require 'DealMakerAPI/api/deal_api'
125
125
  require 'DealMakerAPI/api/deals_api'
126
126
  require 'DealMakerAPI/api/default_api'
127
+ require 'DealMakerAPI/api/incentive_plan_api'
127
128
  require 'DealMakerAPI/api/investor_api'
128
129
  require 'DealMakerAPI/api/investor_profile_api'
129
130
  require 'DealMakerAPI/api/shareholder_api'
@@ -0,0 +1,50 @@
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
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for DealMakerAPI::IncentivePlanApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'IncentivePlanApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = DealMakerAPI::IncentivePlanApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of IncentivePlanApi' do
30
+ it 'should create an instance of IncentivePlanApi' do
31
+ expect(@api_instance).to be_instance_of(DealMakerAPI::IncentivePlanApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_deal_incentive_plans_time
36
+ # Get incentive plans by deal id
37
+ # Gets incentive plans with time tiers from the deal given deal id.
38
+ # @param id The deal id.
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [Integer] :page Page offset to fetch.
41
+ # @option opts [Integer] :per_page Number of results to return per page.
42
+ # @option opts [Integer] :offset Pad a number of results.
43
+ # @return [V1EntitiesDealsPriceDetails]
44
+ describe 'get_deal_incentive_plans_time test' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
47
+ end
48
+ end
49
+
50
+ end
@@ -73,4 +73,10 @@ describe DealMakerAPI::V1EntitiesDealsIncentivePlan do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'test attribute "tiers"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
+ end
80
+ end
81
+
76
82
  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.91.4
4
+ version: 0.92.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DealMaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-23 00:00:00.000000000 Z
11
+ date: 2023-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -76,6 +76,7 @@ files:
76
76
  - docs/DefaultApi.md
77
77
  - docs/EditInvestorTagsRequest.md
78
78
  - docs/GenerateUrlRequest.md
79
+ - docs/IncentivePlanApi.md
79
80
  - docs/InvestorApi.md
80
81
  - docs/InvestorProfileApi.md
81
82
  - docs/PatchInvestorProfilesCorporations.md
@@ -179,6 +180,7 @@ files:
179
180
  - lib/DealMakerAPI/api/deal_api.rb
180
181
  - lib/DealMakerAPI/api/deals_api.rb
181
182
  - lib/DealMakerAPI/api/default_api.rb
183
+ - lib/DealMakerAPI/api/incentive_plan_api.rb
182
184
  - lib/DealMakerAPI/api/investor_api.rb
183
185
  - lib/DealMakerAPI/api/investor_profile_api.rb
184
186
  - lib/DealMakerAPI/api/shareholder_api.rb
@@ -294,6 +296,7 @@ files:
294
296
  - spec/api/deal_api_spec.rb
295
297
  - spec/api/deals_api_spec.rb
296
298
  - spec/api/default_api_spec.rb
299
+ - spec/api/incentive_plan_api_spec.rb
297
300
  - spec/api/investor_api_spec.rb
298
301
  - spec/api/investor_profile_api_spec.rb
299
302
  - spec/api/shareholder_api_spec.rb
@@ -434,6 +437,7 @@ test_files:
434
437
  - spec/api/company_api_spec.rb
435
438
  - spec/api/upload_api_spec.rb
436
439
  - spec/api/default_api_spec.rb
440
+ - spec/api/incentive_plan_api_spec.rb
437
441
  - spec/api/investor_profile_api_spec.rb
438
442
  - spec/api/deal_api_spec.rb
439
443
  - spec/api/users_api_spec.rb