DealMakerAPI 0.85.3 → 0.85.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -12
  3. data/docs/InvestorProfileApi.md +48 -54
  4. data/docs/{PatchCorporationProfileRequest.md → PatchInvestorProfilesCorporations.md} +4 -34
  5. data/docs/PatchInvestorProfilesCorporationsBeneficialOwnersInner.md +42 -0
  6. data/docs/{PatchIndividualProfileRequest.md → PatchInvestorProfilesIndividuals.md} +2 -4
  7. data/docs/{PatchJointProfileRequest.md → PatchInvestorProfilesJoints.md} +2 -6
  8. data/docs/{PatchTrustProfileRequest.md → PatchInvestorProfilesTrusts.md} +2 -6
  9. data/docs/{CreateCorporationProfileRequest.md → PostInvestorProfilesCorporations.md} +4 -30
  10. data/docs/PostInvestorProfilesCorporationsBeneficialOwnersInner.md +38 -0
  11. data/docs/{CreateIndividualProfileRequest.md → PostInvestorProfilesIndividuals.md} +2 -4
  12. data/docs/{CreateJointProfileRequest.md → PostInvestorProfilesJoints.md} +2 -6
  13. data/docs/PostInvestorProfilesTrusts.md +46 -0
  14. data/docs/PostInvestorProfilesTrustsTrusteesInner.md +36 -0
  15. data/lib/DealMakerAPI/api/investor_profile_api.rb +75 -63
  16. data/lib/DealMakerAPI/models/patch_investor_profiles_corporations.rb +503 -0
  17. data/lib/DealMakerAPI/models/patch_investor_profiles_corporations_beneficial_owners_inner.rb +342 -0
  18. data/lib/DealMakerAPI/models/{patch_individual_profile_request.rb → patch_investor_profiles_individuals.rb} +5 -14
  19. data/lib/DealMakerAPI/models/{patch_joint_profile_request.rb → patch_investor_profiles_joints.rb} +5 -24
  20. data/lib/DealMakerAPI/models/{patch_trust_profile_request.rb → patch_investor_profiles_trusts.rb} +5 -24
  21. data/lib/DealMakerAPI/models/{create_corporation_profile_request.rb → post_investor_profiles_corporations.rb} +14 -166
  22. data/lib/DealMakerAPI/models/post_investor_profiles_corporations_beneficial_owners_inner.rb +315 -0
  23. data/lib/DealMakerAPI/models/{create_individual_profile_request.rb → post_investor_profiles_individuals.rb} +5 -14
  24. data/lib/DealMakerAPI/models/{create_joint_profile_request.rb → post_investor_profiles_joints.rb} +5 -24
  25. data/lib/DealMakerAPI/models/{create_trust_profile_request.rb → post_investor_profiles_trusts.rb} +12 -142
  26. data/lib/DealMakerAPI/models/post_investor_profiles_trusts_trustees_inner.rb +305 -0
  27. data/lib/DealMakerAPI/version.rb +1 -1
  28. data/lib/DealMakerAPI.rb +11 -8
  29. data/spec/api/investor_profile_api_spec.rb +8 -8
  30. data/spec/models/patch_investor_profiles_corporations_beneficial_owners_inner_spec.rb +106 -0
  31. data/spec/models/patch_investor_profiles_corporations_spec.rb +186 -0
  32. data/spec/models/{create_individual_profile_request_spec.rb → patch_investor_profiles_individuals_spec.rb} +6 -18
  33. data/spec/models/{create_joint_profile_request_spec.rb → patch_investor_profiles_joints_spec.rb} +6 -24
  34. data/spec/models/{patch_trust_profile_request_spec.rb → patch_investor_profiles_trusts_spec.rb} +6 -18
  35. data/spec/models/post_investor_profiles_corporations_beneficial_owners_inner_spec.rb +94 -0
  36. data/spec/models/{create_trust_profile_request_spec.rb → post_investor_profiles_corporations_spec.rb} +30 -30
  37. data/spec/models/{patch_individual_profile_request_spec.rb → post_investor_profiles_individuals_spec.rb} +12 -12
  38. data/spec/models/{patch_joint_profile_request_spec.rb → post_investor_profiles_joints_spec.rb} +12 -18
  39. data/spec/models/post_investor_profiles_trusts_spec.rb +126 -0
  40. data/spec/models/post_investor_profiles_trusts_trustees_inner_spec.rb +88 -0
  41. metadata +46 -34
  42. data/docs/CreateTrustProfileRequest.md +0 -68
  43. data/lib/DealMakerAPI/models/patch_corporation_profile_request.rb +0 -686
  44. data/spec/models/create_corporation_profile_request_spec.rb +0 -270
  45. data/spec/models/patch_corporation_profile_request_spec.rb +0 -276
@@ -14,7 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- class CreateTrustProfileRequest
17
+ # Create new trust investor profile.
18
+ class PostInvestorProfilesTrusts
18
19
  # User email which is associated with investor profile (required).
19
20
  attr_accessor :email
20
21
 
@@ -30,9 +31,6 @@ module DealMakerAPI
30
31
  # The creation date of the trust (required).
31
32
  attr_accessor :date
32
33
 
33
- # The country of the trust (required).
34
- attr_accessor :country
35
-
36
34
  # Trust street address of the trust (required).
37
35
  attr_accessor :street_address
38
36
 
@@ -60,38 +58,7 @@ module DealMakerAPI
60
58
  # The prior offering amount of the trust.
61
59
  attr_accessor :reg_cf_prior_offerings_amount
62
60
 
63
- # The list of first names for the trustees (required for trustee 1).
64
- attr_accessor :trustees_first_name
65
-
66
- # The list of last names for the trustees (required for trustee 1).
67
- attr_accessor :trustees_last_name
68
-
69
- # The list of suffixes for the trustees.
70
- attr_accessor :trustees_suffix
71
-
72
- # The list of countries for the trustees (required for trustee 1).
73
- attr_accessor :trustees_country
74
-
75
- # The list of street addresses for the trustees (required for trustee 1).
76
- attr_accessor :trustees_street_address
77
-
78
- # The list of street address line 2 for the trustees.
79
- attr_accessor :trustees_unit2
80
-
81
- # The list of cities for the trustees (required for trustee 1).
82
- attr_accessor :trustees_city
83
-
84
- # The list of regions or states for the trustees (required for trustee 1).
85
- attr_accessor :trustees_region
86
-
87
- # The list of postal codes or zipcodes for the trustees (required) for trustee 1.
88
- attr_accessor :trustees_postal_code
89
-
90
- # The list of dates of birth for the trustees (required for trustee 1).
91
- attr_accessor :trustees_date_of_birth
92
-
93
- # The list of taxpayer identification numbers for the trustees (required for trustee 1).
94
- attr_accessor :trustees_taxpayer_id
61
+ attr_accessor :trustees
95
62
 
96
63
  class EnumAttributeValidator
97
64
  attr_reader :datatype
@@ -123,7 +90,6 @@ module DealMakerAPI
123
90
  :'ca_accredited_investor' => :'ca_accredited_investor',
124
91
  :'name' => :'name',
125
92
  :'date' => :'date',
126
- :'country' => :'country',
127
93
  :'street_address' => :'street_address',
128
94
  :'unit2' => :'unit2',
129
95
  :'city' => :'city',
@@ -133,17 +99,7 @@ module DealMakerAPI
133
99
  :'income' => :'income',
134
100
  :'net_worth' => :'net_worth',
135
101
  :'reg_cf_prior_offerings_amount' => :'reg_cf_prior_offerings_amount',
136
- :'trustees_first_name' => :'trustees[first_name]',
137
- :'trustees_last_name' => :'trustees[last_name]',
138
- :'trustees_suffix' => :'trustees[suffix]',
139
- :'trustees_country' => :'trustees[country]',
140
- :'trustees_street_address' => :'trustees[street_address]',
141
- :'trustees_unit2' => :'trustees[unit2]',
142
- :'trustees_city' => :'trustees[city]',
143
- :'trustees_region' => :'trustees[region]',
144
- :'trustees_postal_code' => :'trustees[postal_code]',
145
- :'trustees_date_of_birth' => :'trustees[date_of_birth]',
146
- :'trustees_taxpayer_id' => :'trustees[taxpayer_id]'
102
+ :'trustees' => :'trustees'
147
103
  }
148
104
  end
149
105
 
@@ -160,7 +116,6 @@ module DealMakerAPI
160
116
  :'ca_accredited_investor' => :'String',
161
117
  :'name' => :'String',
162
118
  :'date' => :'String',
163
- :'country' => :'String',
164
119
  :'street_address' => :'String',
165
120
  :'unit2' => :'String',
166
121
  :'city' => :'String',
@@ -170,17 +125,7 @@ module DealMakerAPI
170
125
  :'income' => :'Float',
171
126
  :'net_worth' => :'Float',
172
127
  :'reg_cf_prior_offerings_amount' => :'Float',
173
- :'trustees_first_name' => :'Array<String>',
174
- :'trustees_last_name' => :'Array<String>',
175
- :'trustees_suffix' => :'Array<String>',
176
- :'trustees_country' => :'Array<String>',
177
- :'trustees_street_address' => :'Array<String>',
178
- :'trustees_unit2' => :'Array<String>',
179
- :'trustees_city' => :'Array<String>',
180
- :'trustees_region' => :'Array<String>',
181
- :'trustees_postal_code' => :'Array<String>',
182
- :'trustees_date_of_birth' => :'Array<String>',
183
- :'trustees_taxpayer_id' => :'Array<String>'
128
+ :'trustees' => :'Array<PostInvestorProfilesTrustsTrusteesInner>'
184
129
  }
185
130
  end
186
131
 
@@ -194,13 +139,13 @@ module DealMakerAPI
194
139
  # @param [Hash] attributes Model attributes in the form of hash
195
140
  def initialize(attributes = {})
196
141
  if (!attributes.is_a?(Hash))
197
- fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::CreateTrustProfileRequest` initialize method"
142
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::PostInvestorProfilesTrusts` initialize method"
198
143
  end
199
144
 
200
145
  # check to see if the attribute exists and convert string to symbol for hash key
201
146
  attributes = attributes.each_with_object({}) { |(k, v), h|
202
147
  if (!self.class.attribute_map.key?(k.to_sym))
203
- fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::CreateTrustProfileRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
148
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::PostInvestorProfilesTrusts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
204
149
  end
205
150
  h[k.to_sym] = v
206
151
  }
@@ -227,10 +172,6 @@ module DealMakerAPI
227
172
  self.date = attributes[:'date']
228
173
  end
229
174
 
230
- if attributes.key?(:'country')
231
- self.country = attributes[:'country']
232
- end
233
-
234
175
  if attributes.key?(:'street_address')
235
176
  self.street_address = attributes[:'street_address']
236
177
  end
@@ -267,69 +208,9 @@ module DealMakerAPI
267
208
  self.reg_cf_prior_offerings_amount = attributes[:'reg_cf_prior_offerings_amount']
268
209
  end
269
210
 
270
- if attributes.key?(:'trustees_first_name')
271
- if (value = attributes[:'trustees_first_name']).is_a?(Array)
272
- self.trustees_first_name = value
273
- end
274
- end
275
-
276
- if attributes.key?(:'trustees_last_name')
277
- if (value = attributes[:'trustees_last_name']).is_a?(Array)
278
- self.trustees_last_name = value
279
- end
280
- end
281
-
282
- if attributes.key?(:'trustees_suffix')
283
- if (value = attributes[:'trustees_suffix']).is_a?(Array)
284
- self.trustees_suffix = value
285
- end
286
- end
287
-
288
- if attributes.key?(:'trustees_country')
289
- if (value = attributes[:'trustees_country']).is_a?(Array)
290
- self.trustees_country = value
291
- end
292
- end
293
-
294
- if attributes.key?(:'trustees_street_address')
295
- if (value = attributes[:'trustees_street_address']).is_a?(Array)
296
- self.trustees_street_address = value
297
- end
298
- end
299
-
300
- if attributes.key?(:'trustees_unit2')
301
- if (value = attributes[:'trustees_unit2']).is_a?(Array)
302
- self.trustees_unit2 = value
303
- end
304
- end
305
-
306
- if attributes.key?(:'trustees_city')
307
- if (value = attributes[:'trustees_city']).is_a?(Array)
308
- self.trustees_city = value
309
- end
310
- end
311
-
312
- if attributes.key?(:'trustees_region')
313
- if (value = attributes[:'trustees_region']).is_a?(Array)
314
- self.trustees_region = value
315
- end
316
- end
317
-
318
- if attributes.key?(:'trustees_postal_code')
319
- if (value = attributes[:'trustees_postal_code']).is_a?(Array)
320
- self.trustees_postal_code = value
321
- end
322
- end
323
-
324
- if attributes.key?(:'trustees_date_of_birth')
325
- if (value = attributes[:'trustees_date_of_birth']).is_a?(Array)
326
- self.trustees_date_of_birth = value
327
- end
328
- end
329
-
330
- if attributes.key?(:'trustees_taxpayer_id')
331
- if (value = attributes[:'trustees_taxpayer_id']).is_a?(Array)
332
- self.trustees_taxpayer_id = value
211
+ if attributes.key?(:'trustees')
212
+ if (value = attributes[:'trustees']).is_a?(Array)
213
+ self.trustees = value
333
214
  end
334
215
  end
335
216
  end
@@ -388,7 +269,6 @@ module DealMakerAPI
388
269
  ca_accredited_investor == o.ca_accredited_investor &&
389
270
  name == o.name &&
390
271
  date == o.date &&
391
- country == o.country &&
392
272
  street_address == o.street_address &&
393
273
  unit2 == o.unit2 &&
394
274
  city == o.city &&
@@ -398,17 +278,7 @@ module DealMakerAPI
398
278
  income == o.income &&
399
279
  net_worth == o.net_worth &&
400
280
  reg_cf_prior_offerings_amount == o.reg_cf_prior_offerings_amount &&
401
- trustees_first_name == o.trustees_first_name &&
402
- trustees_last_name == o.trustees_last_name &&
403
- trustees_suffix == o.trustees_suffix &&
404
- trustees_country == o.trustees_country &&
405
- trustees_street_address == o.trustees_street_address &&
406
- trustees_unit2 == o.trustees_unit2 &&
407
- trustees_city == o.trustees_city &&
408
- trustees_region == o.trustees_region &&
409
- trustees_postal_code == o.trustees_postal_code &&
410
- trustees_date_of_birth == o.trustees_date_of_birth &&
411
- trustees_taxpayer_id == o.trustees_taxpayer_id
281
+ trustees == o.trustees
412
282
  end
413
283
 
414
284
  # @see the `==` method
@@ -420,7 +290,7 @@ module DealMakerAPI
420
290
  # Calculates hash code according to all attributes.
421
291
  # @return [Integer] Hash code
422
292
  def hash
423
- [email, us_accredited_category, ca_accredited_investor, name, date, country, street_address, unit2, city, region, postal_code, phone_number, income, net_worth, reg_cf_prior_offerings_amount, trustees_first_name, trustees_last_name, trustees_suffix, trustees_country, trustees_street_address, trustees_unit2, trustees_city, trustees_region, trustees_postal_code, trustees_date_of_birth, trustees_taxpayer_id].hash
293
+ [email, us_accredited_category, ca_accredited_investor, name, date, street_address, unit2, city, region, postal_code, phone_number, income, net_worth, reg_cf_prior_offerings_amount, trustees].hash
424
294
  end
425
295
 
426
296
  # Builds the object from hash
@@ -0,0 +1,305 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ class PostInvestorProfilesTrustsTrusteesInner
18
+ # The list of first names for the trustees (required for trustee 1).
19
+ attr_accessor :first_name
20
+
21
+ # The list of last names for the trustees (required for trustee 1).
22
+ attr_accessor :last_name
23
+
24
+ # The list of suffixes for the trustees.
25
+ attr_accessor :suffix
26
+
27
+ # The list of street addresses for the trustees (required for trustee 1).
28
+ attr_accessor :street_address
29
+
30
+ # The list of street address line 2 for the trustees.
31
+ attr_accessor :unit2
32
+
33
+ # The list of cities for the trustees (required for trustee 1).
34
+ attr_accessor :city
35
+
36
+ # The list of regions or states for the trustees (required for trustee 1).
37
+ attr_accessor :region
38
+
39
+ # The list of postal codes or zipcodes for the trustees (required) for trustee 1.
40
+ attr_accessor :postal_code
41
+
42
+ # The list of dates of birth for the trustees (required for trustee 1).
43
+ attr_accessor :date_of_birth
44
+
45
+ # The list of taxpayer identification numbers for the trustees (required for trustee 1).
46
+ attr_accessor :taxpayer_id
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'first_name' => :'first_name',
52
+ :'last_name' => :'last_name',
53
+ :'suffix' => :'suffix',
54
+ :'street_address' => :'street_address',
55
+ :'unit2' => :'unit2',
56
+ :'city' => :'city',
57
+ :'region' => :'region',
58
+ :'postal_code' => :'postal_code',
59
+ :'date_of_birth' => :'date_of_birth',
60
+ :'taxpayer_id' => :'taxpayer_id'
61
+ }
62
+ end
63
+
64
+ # Returns all the JSON keys this model knows about
65
+ def self.acceptable_attributes
66
+ attribute_map.values
67
+ end
68
+
69
+ # Attribute type mapping.
70
+ def self.openapi_types
71
+ {
72
+ :'first_name' => :'String',
73
+ :'last_name' => :'String',
74
+ :'suffix' => :'String',
75
+ :'street_address' => :'String',
76
+ :'unit2' => :'String',
77
+ :'city' => :'String',
78
+ :'region' => :'String',
79
+ :'postal_code' => :'String',
80
+ :'date_of_birth' => :'String',
81
+ :'taxpayer_id' => :'String'
82
+ }
83
+ end
84
+
85
+ # List of attributes with nullable: true
86
+ def self.openapi_nullable
87
+ Set.new([
88
+ ])
89
+ end
90
+
91
+ # Initializes the object
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ def initialize(attributes = {})
94
+ if (!attributes.is_a?(Hash))
95
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::PostInvestorProfilesTrustsTrusteesInner` initialize method"
96
+ end
97
+
98
+ # check to see if the attribute exists and convert string to symbol for hash key
99
+ attributes = attributes.each_with_object({}) { |(k, v), h|
100
+ if (!self.class.attribute_map.key?(k.to_sym))
101
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::PostInvestorProfilesTrustsTrusteesInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
102
+ end
103
+ h[k.to_sym] = v
104
+ }
105
+
106
+ if attributes.key?(:'first_name')
107
+ self.first_name = attributes[:'first_name']
108
+ end
109
+
110
+ if attributes.key?(:'last_name')
111
+ self.last_name = attributes[:'last_name']
112
+ end
113
+
114
+ if attributes.key?(:'suffix')
115
+ self.suffix = attributes[:'suffix']
116
+ end
117
+
118
+ if attributes.key?(:'street_address')
119
+ self.street_address = attributes[:'street_address']
120
+ end
121
+
122
+ if attributes.key?(:'unit2')
123
+ self.unit2 = attributes[:'unit2']
124
+ end
125
+
126
+ if attributes.key?(:'city')
127
+ self.city = attributes[:'city']
128
+ end
129
+
130
+ if attributes.key?(:'region')
131
+ self.region = attributes[:'region']
132
+ end
133
+
134
+ if attributes.key?(:'postal_code')
135
+ self.postal_code = attributes[:'postal_code']
136
+ end
137
+
138
+ if attributes.key?(:'date_of_birth')
139
+ self.date_of_birth = attributes[:'date_of_birth']
140
+ end
141
+
142
+ if attributes.key?(:'taxpayer_id')
143
+ self.taxpayer_id = attributes[:'taxpayer_id']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ warn '[DEPRECATED] the `valid?` method is obsolete'
159
+ true
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ first_name == o.first_name &&
168
+ last_name == o.last_name &&
169
+ suffix == o.suffix &&
170
+ street_address == o.street_address &&
171
+ unit2 == o.unit2 &&
172
+ city == o.city &&
173
+ region == o.region &&
174
+ postal_code == o.postal_code &&
175
+ date_of_birth == o.date_of_birth &&
176
+ taxpayer_id == o.taxpayer_id
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [first_name, last_name, suffix, street_address, unit2, city, region, postal_code, date_of_birth, taxpayer_id].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ attributes = attributes.transform_keys(&:to_sym)
197
+ transformed_hash = {}
198
+ openapi_types.each_pair do |key, type|
199
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[attribute_map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
209
+ end
210
+ end
211
+ new(transformed_hash)
212
+ end
213
+
214
+ # Deserializes the data based on type
215
+ # @param string type Data type
216
+ # @param string value Value to be deserialized
217
+ # @return [Object] Deserialized data
218
+ def self._deserialize(type, value)
219
+ case type.to_sym
220
+ when :Time
221
+ Time.parse(value)
222
+ when :Date
223
+ Date.parse(value)
224
+ when :String
225
+ value.to_s
226
+ when :Integer
227
+ value.to_i
228
+ when :Float
229
+ value.to_f
230
+ when :Boolean
231
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
232
+ true
233
+ else
234
+ false
235
+ end
236
+ when :Object
237
+ # generic object (usually a Hash), return directly
238
+ value
239
+ when /\AArray<(?<inner_type>.+)>\z/
240
+ inner_type = Regexp.last_match[:inner_type]
241
+ value.map { |v| _deserialize(inner_type, v) }
242
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
243
+ k_type = Regexp.last_match[:k_type]
244
+ v_type = Regexp.last_match[:v_type]
245
+ {}.tap do |hash|
246
+ value.each do |k, v|
247
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
248
+ end
249
+ end
250
+ else # model
251
+ # models (e.g. Pet) or oneOf
252
+ klass = DealMakerAPI.const_get(type)
253
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
254
+ end
255
+ end
256
+
257
+ # Returns the string representation of the object
258
+ # @return [String] String presentation of the object
259
+ def to_s
260
+ to_hash.to_s
261
+ end
262
+
263
+ # to_body is an alias to to_hash (backward compatibility)
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_body
266
+ to_hash
267
+ end
268
+
269
+ # Returns the object in the form of hash
270
+ # @return [Hash] Returns the object in the form of hash
271
+ def to_hash
272
+ hash = {}
273
+ self.class.attribute_map.each_pair do |attr, param|
274
+ value = self.send(attr)
275
+ if value.nil?
276
+ is_nullable = self.class.openapi_nullable.include?(attr)
277
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
278
+ end
279
+
280
+ hash[param] = _to_hash(value)
281
+ end
282
+ hash
283
+ end
284
+
285
+ # Outputs non-array value in the form of hash
286
+ # For object, use to_hash. Otherwise, just return the value
287
+ # @param [Object] value Any valid value
288
+ # @return [Hash] Returns the value in the form of hash
289
+ def _to_hash(value)
290
+ if value.is_a?(Array)
291
+ value.compact.map { |v| _to_hash(v) }
292
+ elsif value.is_a?(Hash)
293
+ {}.tap do |hash|
294
+ value.each { |k, v| hash[k] = _to_hash(v) }
295
+ end
296
+ elsif value.respond_to? :to_hash
297
+ value.to_hash
298
+ else
299
+ value
300
+ end
301
+ end
302
+
303
+ end
304
+
305
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module DealMakerAPI
14
- VERSION = '0.85.3'
14
+ VERSION = '0.85.4'
15
15
  end
data/lib/DealMakerAPI.rb CHANGED
@@ -23,20 +23,23 @@ require 'DealMakerAPI/models/bulk_upload_investors_request'
23
23
  require 'DealMakerAPI/models/create_bulk_upload_detail_request'
24
24
  require 'DealMakerAPI/models/create_bulk_upload_request'
25
25
  require 'DealMakerAPI/models/create_company_request'
26
- require 'DealMakerAPI/models/create_corporation_profile_request'
27
26
  require 'DealMakerAPI/models/create_deal_setup_request'
28
- require 'DealMakerAPI/models/create_individual_profile_request'
29
27
  require 'DealMakerAPI/models/create_investor_request'
30
- require 'DealMakerAPI/models/create_joint_profile_request'
31
28
  require 'DealMakerAPI/models/create_shareholder_action_request'
32
- require 'DealMakerAPI/models/create_trust_profile_request'
33
29
  require 'DealMakerAPI/models/edit_investor_tags_request'
34
30
  require 'DealMakerAPI/models/generate_url_request'
35
- require 'DealMakerAPI/models/patch_corporation_profile_request'
36
- require 'DealMakerAPI/models/patch_individual_profile_request'
31
+ require 'DealMakerAPI/models/patch_investor_profiles_corporations'
32
+ require 'DealMakerAPI/models/patch_investor_profiles_corporations_beneficial_owners_inner'
33
+ require 'DealMakerAPI/models/patch_investor_profiles_individuals'
34
+ require 'DealMakerAPI/models/patch_investor_profiles_joints'
35
+ require 'DealMakerAPI/models/patch_investor_profiles_trusts'
37
36
  require 'DealMakerAPI/models/patch_investor_request'
38
- require 'DealMakerAPI/models/patch_joint_profile_request'
39
- require 'DealMakerAPI/models/patch_trust_profile_request'
37
+ require 'DealMakerAPI/models/post_investor_profiles_corporations'
38
+ require 'DealMakerAPI/models/post_investor_profiles_corporations_beneficial_owners_inner'
39
+ require 'DealMakerAPI/models/post_investor_profiles_individuals'
40
+ require 'DealMakerAPI/models/post_investor_profiles_joints'
41
+ require 'DealMakerAPI/models/post_investor_profiles_trusts'
42
+ require 'DealMakerAPI/models/post_investor_profiles_trusts_trustees_inner'
40
43
  require 'DealMakerAPI/models/post_webhooks_request'
41
44
  require 'DealMakerAPI/models/put_deals_id_script_tag_environment_request'
42
45
  require 'DealMakerAPI/models/put_webhooks_id_request'