DealMakerAPI 0.99.0 → 0.99.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -5
  3. data/docs/CompanyApi.md +207 -2
  4. data/docs/CreateBulkUploadRequest.md +3 -1
  5. data/docs/CreateMembersBulkUploadRequest.md +26 -0
  6. data/docs/V1EntitiesInvestor.md +2 -0
  7. data/docs/V1EntitiesInvestorSearchEntities.md +6 -0
  8. data/docs/V1EntitiesInvestorSearchEntitiesRequiredFields.md +3 -1
  9. data/docs/V1EntitiesMembersBulkUpload.md +42 -0
  10. data/docs/V1EntitiesMembersBulkUploads.md +18 -0
  11. data/lib/DealMakerAPI/api/company_api.rb +208 -2
  12. data/lib/DealMakerAPI/models/create_bulk_upload_request.rb +17 -4
  13. data/lib/DealMakerAPI/models/create_members_bulk_upload_request.rb +266 -0
  14. data/lib/DealMakerAPI/models/patch_investor_profiles_individuals.rb +2 -2
  15. data/lib/DealMakerAPI/models/patch_investor_profiles_joints.rb +2 -2
  16. data/lib/DealMakerAPI/models/post_investor_profiles_individuals.rb +2 -2
  17. data/lib/DealMakerAPI/models/post_investor_profiles_joints.rb +2 -2
  18. data/lib/DealMakerAPI/models/post_investor_profiles_managed.rb +2 -2
  19. data/lib/DealMakerAPI/models/v1_entities_investor.rb +11 -1
  20. data/lib/DealMakerAPI/models/v1_entities_investor_search_entities.rb +43 -1
  21. data/lib/DealMakerAPI/models/v1_entities_investor_search_entities_required_fields.rb +14 -4
  22. data/lib/DealMakerAPI/models/v1_entities_members_bulk_upload.rb +336 -0
  23. data/lib/DealMakerAPI/models/v1_entities_members_bulk_uploads.rb +215 -0
  24. data/lib/DealMakerAPI/version.rb +1 -1
  25. data/lib/DealMakerAPI.rb +3 -0
  26. data/spec/api/company_api_spec.rb +38 -0
  27. data/spec/models/create_bulk_upload_request_spec.rb +6 -0
  28. data/spec/models/create_members_bulk_upload_request_spec.rb +60 -0
  29. data/spec/models/patch_investor_profiles_individuals_spec.rb +1 -1
  30. data/spec/models/patch_investor_profiles_joints_spec.rb +1 -1
  31. data/spec/models/post_investor_profiles_individuals_spec.rb +1 -1
  32. data/spec/models/post_investor_profiles_joints_spec.rb +1 -1
  33. data/spec/models/post_investor_profiles_managed_spec.rb +1 -1
  34. data/spec/models/v1_entities_investor_search_entities_required_fields_spec.rb +6 -0
  35. data/spec/models/v1_entities_investor_search_entities_spec.rb +22 -0
  36. data/spec/models/v1_entities_investor_spec.rb +6 -0
  37. data/spec/models/v1_entities_members_bulk_upload_spec.rb +108 -0
  38. data/spec/models/v1_entities_members_bulk_uploads_spec.rb +36 -0
  39. metadata +14 -2
@@ -315,6 +315,80 @@ module DealMakerAPI
315
315
  return data, status_code, headers
316
316
  end
317
317
 
318
+ # Create bulk upload record
319
+ # Create members bulk upload record
320
+ # @param id [Integer] The company id
321
+ # @param create_members_bulk_upload_request [CreateMembersBulkUploadRequest]
322
+ # @param [Hash] opts the optional parameters
323
+ # @return [V1EntitiesMembersBulkUpload]
324
+ def create_members_bulk_upload(id, create_members_bulk_upload_request, opts = {})
325
+ data, _status_code, _headers = create_members_bulk_upload_with_http_info(id, create_members_bulk_upload_request, opts)
326
+ data
327
+ end
328
+
329
+ # Create bulk upload record
330
+ # Create members bulk upload record
331
+ # @param id [Integer] The company id
332
+ # @param create_members_bulk_upload_request [CreateMembersBulkUploadRequest]
333
+ # @param [Hash] opts the optional parameters
334
+ # @return [Array<(V1EntitiesMembersBulkUpload, Integer, Hash)>] V1EntitiesMembersBulkUpload data, response status code and response headers
335
+ def create_members_bulk_upload_with_http_info(id, create_members_bulk_upload_request, opts = {})
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug 'Calling API: CompanyApi.create_members_bulk_upload ...'
338
+ end
339
+ # verify the required parameter 'id' is set
340
+ if @api_client.config.client_side_validation && id.nil?
341
+ fail ArgumentError, "Missing the required parameter 'id' when calling CompanyApi.create_members_bulk_upload"
342
+ end
343
+ # verify the required parameter 'create_members_bulk_upload_request' is set
344
+ if @api_client.config.client_side_validation && create_members_bulk_upload_request.nil?
345
+ fail ArgumentError, "Missing the required parameter 'create_members_bulk_upload_request' when calling CompanyApi.create_members_bulk_upload"
346
+ end
347
+ # resource path
348
+ local_var_path = '/companies/{id}/members/bulk_uploads'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
349
+
350
+ # query parameters
351
+ query_params = opts[:query_params] || {}
352
+
353
+ # header parameters
354
+ header_params = opts[:header_params] || {}
355
+ # HTTP header 'Accept' (if needed)
356
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
357
+ # HTTP header 'Content-Type'
358
+ content_type = @api_client.select_header_content_type(['application/json'])
359
+ if !content_type.nil?
360
+ header_params['Content-Type'] = content_type
361
+ end
362
+
363
+ # form parameters
364
+ form_params = opts[:form_params] || {}
365
+
366
+ # http body (model)
367
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_members_bulk_upload_request)
368
+
369
+ # return_type
370
+ return_type = opts[:debug_return_type] || 'V1EntitiesMembersBulkUpload'
371
+
372
+ # auth_names
373
+ auth_names = opts[:debug_auth_names] || []
374
+
375
+ new_options = opts.merge(
376
+ :operation => :"CompanyApi.create_members_bulk_upload",
377
+ :header_params => header_params,
378
+ :query_params => query_params,
379
+ :form_params => form_params,
380
+ :body => post_body,
381
+ :auth_names => auth_names,
382
+ :return_type => return_type
383
+ )
384
+
385
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug "API called: CompanyApi#create_members_bulk_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
388
+ end
389
+ return data, status_code, headers
390
+ end
391
+
318
392
  # Create a shareholder action
319
393
  # Create a shareholder action
320
394
  # @param company_id [Integer] The company id
@@ -1011,7 +1085,7 @@ module DealMakerAPI
1011
1085
  # Get list of email template
1012
1086
  # @param id [Integer] The company id
1013
1087
  # @param [Hash] opts the optional parameters
1014
- # @option opts [Integer] :page The page number (default to 1)
1088
+ # @option opts [Integer] :page The page number (default to 0)
1015
1089
  # @option opts [Integer] :per_page The number of items per page (default to 10)
1016
1090
  # @option opts [Boolean] :public_template The public template (default to false)
1017
1091
  # @return [V1EntitiesEmailTemplate]
@@ -1024,7 +1098,7 @@ module DealMakerAPI
1024
1098
  # Get list of email template
1025
1099
  # @param id [Integer] The company id
1026
1100
  # @param [Hash] opts the optional parameters
1027
- # @option opts [Integer] :page The page number (default to 1)
1101
+ # @option opts [Integer] :page The page number (default to 0)
1028
1102
  # @option opts [Integer] :per_page The number of items per page (default to 10)
1029
1103
  # @option opts [Boolean] :public_template The public template (default to false)
1030
1104
  # @return [Array<(V1EntitiesEmailTemplate, Integer, Hash)>] V1EntitiesEmailTemplate data, response status code and response headers
@@ -1079,6 +1153,138 @@ module DealMakerAPI
1079
1153
  return data, status_code, headers
1080
1154
  end
1081
1155
 
1156
+ # Get bulk upload record
1157
+ # Get members bulk upload record
1158
+ # @param id [Integer] The company id
1159
+ # @param id_members_bulk_upload [Integer] The bulk upload id
1160
+ # @param [Hash] opts the optional parameters
1161
+ # @return [V1EntitiesMembersBulkUpload]
1162
+ def get_members_bulk_upload(id, id_members_bulk_upload, opts = {})
1163
+ data, _status_code, _headers = get_members_bulk_upload_with_http_info(id, id_members_bulk_upload, opts)
1164
+ data
1165
+ end
1166
+
1167
+ # Get bulk upload record
1168
+ # Get members bulk upload record
1169
+ # @param id [Integer] The company id
1170
+ # @param id_members_bulk_upload [Integer] The bulk upload id
1171
+ # @param [Hash] opts the optional parameters
1172
+ # @return [Array<(V1EntitiesMembersBulkUpload, Integer, Hash)>] V1EntitiesMembersBulkUpload data, response status code and response headers
1173
+ def get_members_bulk_upload_with_http_info(id, id_members_bulk_upload, opts = {})
1174
+ if @api_client.config.debugging
1175
+ @api_client.config.logger.debug 'Calling API: CompanyApi.get_members_bulk_upload ...'
1176
+ end
1177
+ # verify the required parameter 'id' is set
1178
+ if @api_client.config.client_side_validation && id.nil?
1179
+ fail ArgumentError, "Missing the required parameter 'id' when calling CompanyApi.get_members_bulk_upload"
1180
+ end
1181
+ # verify the required parameter 'id_members_bulk_upload' is set
1182
+ if @api_client.config.client_side_validation && id_members_bulk_upload.nil?
1183
+ fail ArgumentError, "Missing the required parameter 'id_members_bulk_upload' when calling CompanyApi.get_members_bulk_upload"
1184
+ end
1185
+ # resource path
1186
+ local_var_path = '/companies/{id}/members/bulk_uploads/{id_members_bulk_upload}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'id_members_bulk_upload' + '}', CGI.escape(id_members_bulk_upload.to_s))
1187
+
1188
+ # query parameters
1189
+ query_params = opts[:query_params] || {}
1190
+
1191
+ # header parameters
1192
+ header_params = opts[:header_params] || {}
1193
+ # HTTP header 'Accept' (if needed)
1194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1195
+
1196
+ # form parameters
1197
+ form_params = opts[:form_params] || {}
1198
+
1199
+ # http body (model)
1200
+ post_body = opts[:debug_body]
1201
+
1202
+ # return_type
1203
+ return_type = opts[:debug_return_type] || 'V1EntitiesMembersBulkUpload'
1204
+
1205
+ # auth_names
1206
+ auth_names = opts[:debug_auth_names] || []
1207
+
1208
+ new_options = opts.merge(
1209
+ :operation => :"CompanyApi.get_members_bulk_upload",
1210
+ :header_params => header_params,
1211
+ :query_params => query_params,
1212
+ :form_params => form_params,
1213
+ :body => post_body,
1214
+ :auth_names => auth_names,
1215
+ :return_type => return_type
1216
+ )
1217
+
1218
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1219
+ if @api_client.config.debugging
1220
+ @api_client.config.logger.debug "API called: CompanyApi#get_members_bulk_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1221
+ end
1222
+ return data, status_code, headers
1223
+ end
1224
+
1225
+ # Get bulk uploads records
1226
+ # Get members bulk uploads records
1227
+ # @param id [Integer] The company id
1228
+ # @param [Hash] opts the optional parameters
1229
+ # @return [V1EntitiesMembersBulkUploads]
1230
+ def get_members_bulk_uploads(id, opts = {})
1231
+ data, _status_code, _headers = get_members_bulk_uploads_with_http_info(id, opts)
1232
+ data
1233
+ end
1234
+
1235
+ # Get bulk uploads records
1236
+ # Get members bulk uploads records
1237
+ # @param id [Integer] The company id
1238
+ # @param [Hash] opts the optional parameters
1239
+ # @return [Array<(V1EntitiesMembersBulkUploads, Integer, Hash)>] V1EntitiesMembersBulkUploads data, response status code and response headers
1240
+ def get_members_bulk_uploads_with_http_info(id, opts = {})
1241
+ if @api_client.config.debugging
1242
+ @api_client.config.logger.debug 'Calling API: CompanyApi.get_members_bulk_uploads ...'
1243
+ end
1244
+ # verify the required parameter 'id' is set
1245
+ if @api_client.config.client_side_validation && id.nil?
1246
+ fail ArgumentError, "Missing the required parameter 'id' when calling CompanyApi.get_members_bulk_uploads"
1247
+ end
1248
+ # resource path
1249
+ local_var_path = '/companies/{id}/members/bulk_uploads'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1250
+
1251
+ # query parameters
1252
+ query_params = opts[:query_params] || {}
1253
+
1254
+ # header parameters
1255
+ header_params = opts[:header_params] || {}
1256
+ # HTTP header 'Accept' (if needed)
1257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1258
+
1259
+ # form parameters
1260
+ form_params = opts[:form_params] || {}
1261
+
1262
+ # http body (model)
1263
+ post_body = opts[:debug_body]
1264
+
1265
+ # return_type
1266
+ return_type = opts[:debug_return_type] || 'V1EntitiesMembersBulkUploads'
1267
+
1268
+ # auth_names
1269
+ auth_names = opts[:debug_auth_names] || []
1270
+
1271
+ new_options = opts.merge(
1272
+ :operation => :"CompanyApi.get_members_bulk_uploads",
1273
+ :header_params => header_params,
1274
+ :query_params => query_params,
1275
+ :form_params => form_params,
1276
+ :body => post_body,
1277
+ :auth_names => auth_names,
1278
+ :return_type => return_type
1279
+ )
1280
+
1281
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1282
+ if @api_client.config.debugging
1283
+ @api_client.config.logger.debug "API called: CompanyApi#get_members_bulk_uploads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1284
+ end
1285
+ return data, status_code, headers
1286
+ end
1287
+
1082
1288
  # Get shareholder ledger by company
1083
1289
  # Get shareholder ledger by company.
1084
1290
  # @param id [Integer]
@@ -30,6 +30,9 @@ module DealMakerAPI
30
30
  # Notification message
31
31
  attr_accessor :notification_message
32
32
 
33
+ # JSON notification message
34
+ attr_accessor :json_notification_message
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -37,7 +40,8 @@ module DealMakerAPI
37
40
  :'document_type' => :'document_type',
38
41
  :'upload_name' => :'upload_name',
39
42
  :'send_notification' => :'send_notification',
40
- :'notification_message' => :'notification_message'
43
+ :'notification_message' => :'notification_message',
44
+ :'json_notification_message' => :'json_notification_message'
41
45
  }
42
46
  end
43
47
 
@@ -53,13 +57,15 @@ module DealMakerAPI
53
57
  :'document_type' => :'String',
54
58
  :'upload_name' => :'String',
55
59
  :'send_notification' => :'Boolean',
56
- :'notification_message' => :'String'
60
+ :'notification_message' => :'String',
61
+ :'json_notification_message' => :'Object'
57
62
  }
58
63
  end
59
64
 
60
65
  # List of attributes with nullable: true
61
66
  def self.openapi_nullable
62
67
  Set.new([
68
+ :'json_notification_message'
63
69
  ])
64
70
  end
65
71
 
@@ -107,6 +113,12 @@ module DealMakerAPI
107
113
  else
108
114
  self.notification_message = nil
109
115
  end
116
+
117
+ if attributes.key?(:'json_notification_message')
118
+ self.json_notification_message = attributes[:'json_notification_message']
119
+ else
120
+ self.json_notification_message = nil
121
+ end
110
122
  end
111
123
 
112
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -158,7 +170,8 @@ module DealMakerAPI
158
170
  document_type == o.document_type &&
159
171
  upload_name == o.upload_name &&
160
172
  send_notification == o.send_notification &&
161
- notification_message == o.notification_message
173
+ notification_message == o.notification_message &&
174
+ json_notification_message == o.json_notification_message
162
175
  end
163
176
 
164
177
  # @see the `==` method
@@ -170,7 +183,7 @@ module DealMakerAPI
170
183
  # Calculates hash code according to all attributes.
171
184
  # @return [Integer] Hash code
172
185
  def hash
173
- [file_identifier, document_type, upload_name, send_notification, notification_message].hash
186
+ [file_identifier, document_type, upload_name, send_notification, notification_message, json_notification_message].hash
174
187
  end
175
188
 
176
189
  # Builds the object from hash
@@ -0,0 +1,266 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.5.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ class CreateMembersBulkUploadRequest
18
+ # The file csv
19
+ attr_accessor :csv_file
20
+
21
+ # Send notification to the user
22
+ attr_accessor :send_notification
23
+
24
+ # Offside shareholder
25
+ attr_accessor :offsite_shareholder
26
+
27
+ # Email subject
28
+ attr_accessor :email_subject
29
+
30
+ # Email content
31
+ attr_accessor :email_content
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'csv_file' => :'csv_file',
37
+ :'send_notification' => :'send_notification',
38
+ :'offsite_shareholder' => :'offsite_shareholder',
39
+ :'email_subject' => :'email_subject',
40
+ :'email_content' => :'email_content'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'csv_file' => :'File',
53
+ :'send_notification' => :'Boolean',
54
+ :'offsite_shareholder' => :'Boolean',
55
+ :'email_subject' => :'String',
56
+ :'email_content' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::CreateMembersBulkUploadRequest` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::CreateMembersBulkUploadRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'csv_file')
82
+ self.csv_file = attributes[:'csv_file']
83
+ else
84
+ self.csv_file = nil
85
+ end
86
+
87
+ if attributes.key?(:'send_notification')
88
+ self.send_notification = attributes[:'send_notification']
89
+ else
90
+ self.send_notification = false
91
+ end
92
+
93
+ if attributes.key?(:'offsite_shareholder')
94
+ self.offsite_shareholder = attributes[:'offsite_shareholder']
95
+ else
96
+ self.offsite_shareholder = false
97
+ end
98
+
99
+ if attributes.key?(:'email_subject')
100
+ self.email_subject = attributes[:'email_subject']
101
+ end
102
+
103
+ if attributes.key?(:'email_content')
104
+ self.email_content = attributes[:'email_content']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @csv_file.nil?
114
+ invalid_properties.push('invalid value for "csv_file", csv_file cannot be nil.')
115
+ end
116
+
117
+ invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
+ return false if @csv_file.nil?
125
+ true
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ csv_file == o.csv_file &&
134
+ send_notification == o.send_notification &&
135
+ offsite_shareholder == o.offsite_shareholder &&
136
+ email_subject == o.email_subject &&
137
+ email_content == o.email_content
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [csv_file, send_notification, offsite_shareholder, email_subject, email_content].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def self._deserialize(type, value)
180
+ case type.to_sym
181
+ when :Time
182
+ Time.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ # models (e.g. Pet) or oneOf
213
+ klass = DealMakerAPI.const_get(type)
214
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
215
+ end
216
+ end
217
+
218
+ # Returns the string representation of the object
219
+ # @return [String] String presentation of the object
220
+ def to_s
221
+ to_hash.to_s
222
+ end
223
+
224
+ # to_body is an alias to to_hash (backward compatibility)
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_body
227
+ to_hash
228
+ end
229
+
230
+ # Returns the object in the form of hash
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_hash
233
+ hash = {}
234
+ self.class.attribute_map.each_pair do |attr, param|
235
+ value = self.send(attr)
236
+ if value.nil?
237
+ is_nullable = self.class.openapi_nullable.include?(attr)
238
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
239
+ end
240
+
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+
266
+ end
@@ -244,7 +244,7 @@ module DealMakerAPI
244
244
  warn '[DEPRECATED] the `valid?` method is obsolete'
245
245
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
246
246
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
247
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
247
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
248
248
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
249
249
  true
250
250
  end
@@ -262,7 +262,7 @@ module DealMakerAPI
262
262
  # Custom attribute writer method checking allowed values (enum).
263
263
  # @param [Object] ca_accredited_investor Object to be assigned
264
264
  def ca_accredited_investor=(ca_accredited_investor)
265
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
265
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
266
266
  unless validator.valid?(ca_accredited_investor)
267
267
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
268
268
  end
@@ -343,7 +343,7 @@ module DealMakerAPI
343
343
  warn '[DEPRECATED] the `valid?` method is obsolete'
344
344
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
345
345
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
346
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
346
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
347
347
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
348
348
  joint_type_validator = EnumAttributeValidator.new('String', ["joint_tenant", "tenants_in_common", "community_property"])
349
349
  return false unless joint_type_validator.valid?(@joint_type)
@@ -363,7 +363,7 @@ module DealMakerAPI
363
363
  # Custom attribute writer method checking allowed values (enum).
364
364
  # @param [Object] ca_accredited_investor Object to be assigned
365
365
  def ca_accredited_investor=(ca_accredited_investor)
366
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
366
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
367
367
  unless validator.valid?(ca_accredited_investor)
368
368
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
369
369
  end
@@ -251,7 +251,7 @@ module DealMakerAPI
251
251
  return false if @email.nil?
252
252
  us_accredited_category_validator = EnumAttributeValidator.new('String', ["income_individual", "assets_individual", "director", "knowledgable_employee", "broker_or_dealer", "investment_advisor_registered", "investment_advisor_relying", "designated_accredited_investor", "not_accredited"])
253
253
  return false unless us_accredited_category_validator.valid?(@us_accredited_category)
254
- ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
254
+ ca_accredited_investor_validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
255
255
  return false unless ca_accredited_investor_validator.valid?(@ca_accredited_investor)
256
256
  true
257
257
  end
@@ -269,7 +269,7 @@ module DealMakerAPI
269
269
  # Custom attribute writer method checking allowed values (enum).
270
270
  # @param [Object] ca_accredited_investor Object to be assigned
271
271
  def ca_accredited_investor=(ca_accredited_investor)
272
- validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_alone", "k_spouse", "l", "q", "v", "x"])
272
+ validator = EnumAttributeValidator.new('String', ["d", "e", "e_1", "j", "j_1", "k_individual", "k_spouse", "l", "q", "v", "x"])
273
273
  unless validator.valid?(ca_accredited_investor)
274
274
  fail ArgumentError, "invalid value for \"ca_accredited_investor\", must be one of #{validator.allowable_values}."
275
275
  end