DealMakerAPI 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/DealMakerAPI.gemspec +38 -0
  3. data/Gemfile +9 -0
  4. data/README.md +371 -0
  5. data/Rakefile +10 -0
  6. data/docs/DealApi.md +289 -0
  7. data/docs/V1EntitiesAttachment.md +22 -0
  8. data/docs/V1EntitiesBackgroundCheckSearch.md +18 -0
  9. data/docs/V1EntitiesDeal.md +20 -0
  10. data/docs/V1EntitiesInvestor.md +58 -0
  11. data/docs/V1EntitiesInvestors.md +18 -0
  12. data/docs/V1EntitiesSubscriptionAgreement.md +20 -0
  13. data/git_push.sh +57 -0
  14. data/lib/DealMakerAPI/api/deal_api.rb +299 -0
  15. data/lib/DealMakerAPI/api_client.rb +389 -0
  16. data/lib/DealMakerAPI/api_error.rb +57 -0
  17. data/lib/DealMakerAPI/configuration.rb +271 -0
  18. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +239 -0
  19. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +219 -0
  20. data/lib/DealMakerAPI/models/v1_entities_deal.rb +230 -0
  21. data/lib/DealMakerAPI/models/v1_entities_investor.rb +487 -0
  22. data/lib/DealMakerAPI/models/v1_entities_investors.rb +219 -0
  23. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +229 -0
  24. data/lib/DealMakerAPI/version.rb +15 -0
  25. data/lib/DealMakerAPI.rb +46 -0
  26. data/spec/api/deal_api_spec.rb +89 -0
  27. data/spec/api_client_spec.rb +226 -0
  28. data/spec/configuration_spec.rb +42 -0
  29. data/spec/models/v1_entities_attachment_spec.rb +46 -0
  30. data/spec/models/v1_entities_background_check_search_spec.rb +34 -0
  31. data/spec/models/v1_entities_deal_spec.rb +40 -0
  32. data/spec/models/v1_entities_investor_spec.rb +170 -0
  33. data/spec/models/v1_entities_investors_spec.rb +34 -0
  34. data/spec/models/v1_entities_subscription_agreement_spec.rb +40 -0
  35. data/spec/spec_helper.rb +111 -0
  36. metadata +127 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e1e8bd9c8cf599b2a4beba700bd2cc92d6c778033a1cc2db16278c0454fe9748
4
+ data.tar.gz: 7f1b736993f3f9b60acf55d345ca86b1264d7cb8899893d4b142f8ce858f0a89
5
+ SHA512:
6
+ metadata.gz: 602847cc753696da0bf88409cbdbe191f083effadf6a25581b35e755f94784b82fa783d18a60a891ad42b80ed9935e9a08e454e349d67d5459d6cd57c6db1c61
7
+ data.tar.gz: b46aee1a95e2a67d1b8b3c704bf8f4b7fcffeb4e1c36187786dc876536fe8825061592cb7413f21143c91968aadf0b4ce68d3982e8ab2a83648a325d900a1cad
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #DealMaker API
5
+
6
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. # Libraries * Javascript * Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://www.dealmaker.tech/developer/applications). Unde the developer 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 public and secret keys. **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. # 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` | Forbiden | | `404` | Not found | # Pagination Pagination is used to divide large resposes 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. 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 | ## Respose Headers To review additional information about pagination on a specific response, including how to determine the total number of pages of the avaialble data set, the API returns the following header fields with every paginated response: | 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 | # 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. The type of data that the webhooks include: * Investor Name * Date created * Email * Phone * Allocation * Attachments * Accredited investor status * Accredited investor category * Status (Draft, Invited, Accepted, Waiting) 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 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. * 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: 1. Status 2. Name 3. Email - (this is a user field so we trigger event for all investors with webhook subscription) 4. Allocated Amount 5. Investment Amount 6. Accredited investor fields 7. Adding or removing attachments 8. 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.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. It includes id, title, created_at and updated_at| <sup>*</sup>This field is not included when deleting a resource #### Common Properties (investor scope) Every event on this scope must contain an investor object, here are some properties that are common to this object on all events in the investor scope: |Key|Type|Description| |--- |--- |--- | |id|Integer|The unique ID of the Investor| |name|String|Investor’s Name| |status|String|Current status of the investor<br />Possible states are: <br />draft<br />invited<br />signed<br />waiting<br />accepted| |email|String|| |phone_number|String|| |investment_amount|Double|| |allocated_amount|Double|| |accredited_investor|Object|See format in respective ticket| |attachments|Array of Objects|List of supporting documents uploaded to the investor, including URL (expire after 30 minutes) and title (caption)| |funding_state|String|Investor’s current funding state (unfunded, underfunded, funded, overfunded)| |funds_pending|Boolean|True if there are pending transactions, False otherwise| |created_at|Date|| |updated_at|Date|| |tags|Array of Strings|a list of the investor's tags, separated by comma.| ### investor.status >= signed Specific Properties |Key|Type|Description| |--- |--- |--- | |subscription_agreement|object|id, url (expiring URL)| #### Investor Status 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 #### 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.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 5.4.0-SNAPSHOT
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "DealMakerAPI/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "DealMakerAPI"
20
+ s.version = DealMakerAPI::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["DealMaker"]
23
+ s.email = ["api@dealmaker.tech"]
24
+ s.homepage = "https://dealmaker.tech"
25
+ s.summary = "A ruby wrapper for the DealMaker API"
26
+ s.description = "A ruby wrapper for the DealMaker API"
27
+ s.license = "TODO"
28
+ s.required_ruby_version = ">= 2.4"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+
32
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
+
34
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
35
+ s.test_files = `find spec/*`.split("\n")
36
+ s.executables = []
37
+ s.require_paths = ["lib"]
38
+ end
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,371 @@
1
+ # DealMakerAPI
2
+
3
+ DealMakerAPI - the Ruby gem for the DealMaker API
4
+
5
+ # Introduction
6
+
7
+ Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages.
8
+
9
+ # Libraries
10
+
11
+ * Javascript
12
+ * Ruby
13
+
14
+ # Authentication
15
+
16
+ To authenticate, add an Authorization header to your API request that contains an access token.
17
+
18
+ ## Create an Application
19
+
20
+ DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://www.dealmaker.tech/developer/applications).
21
+
22
+ Unde the developer tab, click the `Create New Application` button
23
+
24
+ ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png)
25
+
26
+ Name your application and assign the level of permissions for this application
27
+
28
+ ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png)
29
+
30
+ Once your application is created, save in a secure space your public and secret keys.
31
+
32
+ **WARNING**: The secret key will not be visible after you click the close button
33
+
34
+ ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png)
35
+
36
+ From the developer tab, you will be able to view and manage all the available applications
37
+
38
+ ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png)
39
+
40
+
41
+ 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.
42
+
43
+
44
+ ## How to generate an access token
45
+
46
+
47
+ 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:
48
+
49
+ `token endpoint` - https://app.dealmaker.tech/oauth/token
50
+
51
+ `grant_type` - must be set to `client_credentials`
52
+
53
+ `client_id` - the Client ID displayed when you created the OAuth application in the previous step
54
+
55
+ `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step
56
+
57
+
58
+ `scope` - the scope is established when you created the OAuth application in the previous step
59
+
60
+ 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.
61
+
62
+ 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.
63
+
64
+ # Status Codes
65
+
66
+ ## Content-Type Header
67
+
68
+
69
+ All responses are returned in JSON format. We specify this by sending the Content-Type header.
70
+
71
+
72
+ ## Status Codes
73
+
74
+ Below is a table containing descriptions of the various status codes we currently support against various resources.
75
+
76
+ 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.
77
+
78
+ | Status Code | Description |
79
+ | ----------- | ----------- |
80
+ | `200` | Success |
81
+ | `403` | Forbiden |
82
+ | `404` | Not found |
83
+
84
+
85
+ # Pagination
86
+
87
+ Pagination is used to divide large resposes 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.
88
+
89
+ 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.
90
+
91
+ Please review the table below for the input parameters
92
+
93
+ ## Inputs
94
+
95
+ | Parameter | Description |
96
+ | ----------- | ----------- |
97
+ | `per_page` | Amount of records included on each page (Default is 25) |
98
+ | `page` | Page number |
99
+ | `offset` | Amount of records offset on the API request where 0 represents the first record |
100
+
101
+
102
+ ## Respose Headers
103
+
104
+ To review additional information about pagination on a specific response, including how to determine the total number of pages of the avaialble data set, the API returns the following header fields with every paginated response:
105
+
106
+
107
+ | Response Header | Description |
108
+ | ----------- | ----------- |
109
+ | `X-Total` | Total number of records of response |
110
+ | `X-Total-Pages` | Total number of pages of response |
111
+ | `X-Per-Page` | Total number of records per page of response |
112
+ | `X-Page` | Number of current page |
113
+ | `X-Next-Page` | Number of next page |
114
+ | `X-Prev-Page` | Number of previous page|
115
+ | `X-Offset` | Total number of records offset |
116
+
117
+ # Versioning
118
+
119
+ The latest version is v1.
120
+
121
+ The version can be updated on the `Accept` header, just set the version as stated on the following example:
122
+
123
+ ```
124
+
125
+ Accept:application/vnd.dealmaker-v1+json
126
+
127
+ ```
128
+ | Version | Accept Header |
129
+ | ----------- | ----------- |
130
+ | `v1` | application/vnd.dealmaker-`v1`+json |
131
+
132
+ # SDK’s
133
+
134
+ For instruction on installing SDKs, please view the following links
135
+
136
+ * [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript)
137
+ * [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby)
138
+
139
+ # Webhooks
140
+
141
+ Our webhooks functionality allows clients to automatically receive updates on a deal's investor data.
142
+
143
+ The type of data that the webhooks include:
144
+
145
+ * Investor Name
146
+ * Date created
147
+ * Email
148
+ * Phone
149
+ * Allocation
150
+ * Attachments
151
+ * Accredited investor status
152
+ * Accredited investor category
153
+ * Status (Draft, Invited, Accepted, Waiting)
154
+
155
+ Via webhooks clients can subscribe to the following events as they happen on Dealmaker:
156
+
157
+ * Investor is created
158
+ * Investor details are updated (any of the investor details above change or are updated)
159
+ * Investor is deleted
160
+
161
+ 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.
162
+
163
+ ## Configuration
164
+
165
+ 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).
166
+
167
+
168
+ As a developer user on DealMaker, you are able to configure webhooks by following the steps below:
169
+
170
+ 1. Sign into Dealmaker
171
+ 2. Go to **“Your profile”** in the top right corner
172
+ 3. Access an **“Integrations”** configuration via the left menu
173
+ 4. The developer configures webhooks by including:
174
+ * The HTTPS URL where the request will be sent
175
+ * 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.
176
+ * An email address that will be used to notify about errors.
177
+ 5. The developers can disable webhooks temporarily if needed
178
+
179
+ ## Specification
180
+
181
+ ### Events
182
+
183
+ The initial set of events will be related to the investor. The events are:
184
+
185
+ 1. `investor.created`
186
+
187
+ * Triggers every time a new investor is added to a deal
188
+
189
+ 2. `investor.updated`
190
+
191
+ * Triggers on updates to any of the following fields:
192
+ 1. Status
193
+ 2. Name
194
+ 3. Email - (this is a user field so we trigger event for all investors with webhook subscription)
195
+ 4. Allocated Amount
196
+ 5. Investment Amount
197
+ 6. Accredited investor fields
198
+ 7. Adding or removing attachments
199
+ 8. Tags
200
+ * When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes
201
+
202
+ 3. `investor.deleted`
203
+
204
+ * Triggers when the investor is removed from the deal
205
+ * The investor key of the payload only includes investor ID
206
+ * The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of
207
+
208
+ ### Requests
209
+
210
+ * The request is a `POST`
211
+ * The payload’s `content-type` is `application/json`
212
+ * Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry
213
+ * 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
214
+ * If an event fails all the attempts to be delivered, we send an email to the address that the user configured
215
+
216
+ ### Payload
217
+
218
+ #### Common Properties
219
+
220
+ There will be some properties that are common to all the events on the system.
221
+
222
+ |Key|Type|Description|
223
+ |--- |--- |--- |
224
+ |event|String|The event that triggered the call|
225
+ |event_id|String|A unique identifier for the event|
226
+ |deal<sup>*</sup>|Object|The deal in which the event occurred. It includes id, title, created_at and updated_at|
227
+
228
+
229
+ <sup>*</sup>This field is not included when deleting a resource
230
+
231
+ #### Common Properties (investor scope)
232
+
233
+ Every event on this scope must contain an investor object, here are some properties that are common to this object on all events in the investor scope:
234
+
235
+ |Key|Type|Description|
236
+ |--- |--- |--- |
237
+ |id|Integer|The unique ID of the Investor|
238
+ |name|String|Investor’s Name|
239
+ |status|String|Current status of the investor<br />Possible states are: <br />draft<br />invited<br />signed<br />waiting<br />accepted|
240
+ |email|String||
241
+ |phone_number|String||
242
+ |investment_amount|Double||
243
+ |allocated_amount|Double||
244
+ |accredited_investor|Object|See format in respective ticket|
245
+ |attachments|Array of Objects|List of supporting documents uploaded to the investor, including URL (expire after 30 minutes) and title (caption)|
246
+ |funding_state|String|Investor’s current funding state (unfunded, underfunded, funded, overfunded)|
247
+ |funds_pending|Boolean|True if there are pending transactions, False otherwise|
248
+ |created_at|Date||
249
+ |updated_at|Date||
250
+ |tags|Array of Strings|a list of the investor's tags, separated by comma.|
251
+
252
+
253
+ ### investor.status >= signed Specific Properties
254
+
255
+
256
+ |Key|Type|Description|
257
+ |--- |--- |--- |
258
+ |subscription_agreement|object|id, url (expiring URL)|
259
+
260
+ #### Investor Status
261
+
262
+ Here is a brief description of each investor state:
263
+
264
+ * **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal
265
+ * **Invited:** the investor was added to the platform but hasn’t completed the questionnaire
266
+ * **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature)
267
+ * **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal
268
+ * **Accepted:** the investor's agreement was countersigned by the Signatory
269
+
270
+ #### Update Delay
271
+
272
+ 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.
273
+
274
+
275
+
276
+
277
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
278
+
279
+ - API version: 1.0.0
280
+ - Package version: 0.0.1
281
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
282
+
283
+ ## Installation
284
+
285
+ ### Build a gem
286
+
287
+ To build the Ruby code into a gem:
288
+
289
+ ```shell
290
+ gem build DealMakerAPI.gemspec
291
+ ```
292
+
293
+ Then either install the gem locally:
294
+
295
+ ```shell
296
+ gem install ./DealMakerAPI-0.0.1.gem
297
+ ```
298
+
299
+ (for development, run `gem install --dev ./DealMakerAPI-0.0.1.gem` to install the development dependencies)
300
+
301
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
302
+
303
+ Finally add this to the Gemfile:
304
+
305
+ gem 'DealMakerAPI', '~> 0.0.1'
306
+
307
+ ### Install from Git
308
+
309
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
310
+
311
+ gem 'DealMakerAPI', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
312
+
313
+ ### Include the Ruby code directly
314
+
315
+ Include the Ruby code directly using `-I` as follows:
316
+
317
+ ```shell
318
+ ruby -Ilib script.rb
319
+ ```
320
+
321
+ ## Getting Started
322
+
323
+ Please follow the [installation](#installation) procedure and then run the following code:
324
+
325
+ ```ruby
326
+ # Load the gem
327
+ require 'DealMakerAPI'
328
+
329
+ # Setup authorization
330
+ DealMakerAPI.configure do |config|end
331
+
332
+ api_instance = DealMakerAPI::DealApi.new
333
+ id = 56 # Integer | The deal id.
334
+ unknown_base_type = TODO # UNKNOWN_BASE_TYPE |
335
+
336
+ begin
337
+ #Create a deal investor
338
+ result = api_instance.create_investor(id, unknown_base_type)
339
+ p result
340
+ rescue DealMakerAPI::ApiError => e
341
+ puts "Exception when calling DealApi->create_investor: #{e}"
342
+ end
343
+
344
+ ```
345
+
346
+ ## Documentation for API Endpoints
347
+
348
+ All URIs are relative to *http://api.dealmaker.tech*
349
+
350
+ Class | Method | HTTP request | Description
351
+ ------------ | ------------- | ------------- | -------------
352
+ *DealMakerAPI::DealApi* | [**create_investor**](docs/DealApi.md#create_investor) | **POST** /deals/{id}/investors | Create a deal investor
353
+ *DealMakerAPI::DealApi* | [**get_deal**](docs/DealApi.md#get_deal) | **GET** /deals/{id} | Get a deal by id
354
+ *DealMakerAPI::DealApi* | [**get_investor**](docs/DealApi.md#get_investor) | **GET** /deals/{id}/investors/{investor_id} | Get a deal investor by id
355
+ *DealMakerAPI::DealApi* | [**list_investors**](docs/DealApi.md#list_investors) | **GET** /deals/{id}/investors | List deal investors
356
+
357
+
358
+ ## Documentation for Models
359
+
360
+ - [DealMakerAPI::V1EntitiesAttachment](docs/V1EntitiesAttachment.md)
361
+ - [DealMakerAPI::V1EntitiesBackgroundCheckSearch](docs/V1EntitiesBackgroundCheckSearch.md)
362
+ - [DealMakerAPI::V1EntitiesDeal](docs/V1EntitiesDeal.md)
363
+ - [DealMakerAPI::V1EntitiesInvestor](docs/V1EntitiesInvestor.md)
364
+ - [DealMakerAPI::V1EntitiesInvestors](docs/V1EntitiesInvestors.md)
365
+ - [DealMakerAPI::V1EntitiesSubscriptionAgreement](docs/V1EntitiesSubscriptionAgreement.md)
366
+
367
+
368
+ ## Documentation for Authorization
369
+
370
+ All endpoints do not require authorization.
371
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end