DealMakerAPI 0.102.1 → 0.103.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -5
  3. data/docs/CompanyApi.md +68 -0
  4. data/docs/DealApi.md +80 -9
  5. data/docs/DefaultApi.md +69 -0
  6. data/docs/SetupSmsVerificationRequest.md +18 -0
  7. data/docs/TestDocumentUploadEmailRequest.md +22 -0
  8. data/docs/UpdateUserPasswordRequest.md +4 -2
  9. data/docs/UserApi.md +271 -0
  10. data/docs/V1EntitiesDealsInvestorsPaymentAchBankAccountSetupIntent.md +20 -0
  11. data/docs/V1EntitiesDealsProgress.md +20 -0
  12. data/docs/V1EntitiesDealsProgressColumn.md +20 -0
  13. data/docs/V1EntitiesUsersBinding.md +20 -0
  14. data/docs/V1EntitiesUsersFactor.md +22 -0
  15. data/docs/V1EntitiesUsersTwoFactorChannel.md +30 -0
  16. data/docs/V1EntitiesUsersTwoFactorChannels.md +18 -0
  17. data/docs/VerifyFactorRequest.md +18 -0
  18. data/lib/DealMakerAPI/api/company_api.rb +72 -0
  19. data/lib/DealMakerAPI/api/deal_api.rb +84 -9
  20. data/lib/DealMakerAPI/api/default_api.rb +74 -0
  21. data/lib/DealMakerAPI/api/user_api.rb +272 -0
  22. data/lib/DealMakerAPI/models/setup_sms_verification_request.rb +222 -0
  23. data/lib/DealMakerAPI/models/test_document_upload_email_request.rb +256 -0
  24. data/lib/DealMakerAPI/models/update_user_password_request.rb +15 -5
  25. data/lib/DealMakerAPI/models/v1_entities_deals_investors_payment_ach_bank_account_setup_intent.rb +226 -0
  26. data/lib/DealMakerAPI/models/v1_entities_deals_progress.rb +224 -0
  27. data/lib/DealMakerAPI/models/v1_entities_deals_progress_column.rb +225 -0
  28. data/lib/DealMakerAPI/models/v1_entities_users_binding.rb +225 -0
  29. data/lib/DealMakerAPI/models/v1_entities_users_factor.rb +235 -0
  30. data/lib/DealMakerAPI/models/v1_entities_users_two_factor_channel.rb +276 -0
  31. data/lib/DealMakerAPI/models/v1_entities_users_two_factor_channels.rb +215 -0
  32. data/lib/DealMakerAPI/models/verify_factor_request.rb +222 -0
  33. data/lib/DealMakerAPI/version.rb +1 -1
  34. data/lib/DealMakerAPI.rb +10 -0
  35. data/spec/api/company_api_spec.rb +13 -0
  36. data/spec/api/deal_api_spec.rb +16 -2
  37. data/spec/api/default_api_spec.rb +13 -0
  38. data/spec/api/user_api_spec.rb +50 -0
  39. data/spec/models/setup_sms_verification_request_spec.rb +36 -0
  40. data/spec/models/test_document_upload_email_request_spec.rb +48 -0
  41. data/spec/models/update_user_password_request_spec.rb +6 -0
  42. data/spec/models/v1_entities_deals_investors_payment_ach_bank_account_setup_intent_spec.rb +42 -0
  43. data/spec/models/v1_entities_deals_progress_column_spec.rb +42 -0
  44. data/spec/models/v1_entities_deals_progress_spec.rb +42 -0
  45. data/spec/models/v1_entities_users_binding_spec.rb +42 -0
  46. data/spec/models/v1_entities_users_factor_spec.rb +48 -0
  47. data/spec/models/v1_entities_users_two_factor_channel_spec.rb +72 -0
  48. data/spec/models/v1_entities_users_two_factor_channels_spec.rb +36 -0
  49. data/spec/models/verify_factor_request_spec.rb +36 -0
  50. metadata +151 -111
@@ -277,6 +277,80 @@ module DealMakerAPI
277
277
  return data, status_code, headers
278
278
  end
279
279
 
280
+ # Get deal progress for a specific kind
281
+ # Get deal progress
282
+ # @param id [Integer] The deal id.
283
+ # @param kind [String] Kind of progress.
284
+ # @param [Hash] opts the optional parameters
285
+ # @return [V1EntitiesDealsProgress]
286
+ def get_deals_id_progress_page_kind(id, kind, opts = {})
287
+ data, _status_code, _headers = get_deals_id_progress_page_kind_with_http_info(id, kind, opts)
288
+ data
289
+ end
290
+
291
+ # Get deal progress for a specific kind
292
+ # Get deal progress
293
+ # @param id [Integer] The deal id.
294
+ # @param kind [String] Kind of progress.
295
+ # @param [Hash] opts the optional parameters
296
+ # @return [Array<(V1EntitiesDealsProgress, Integer, Hash)>] V1EntitiesDealsProgress data, response status code and response headers
297
+ def get_deals_id_progress_page_kind_with_http_info(id, kind, opts = {})
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_deals_id_progress_page_kind ...'
300
+ end
301
+ # verify the required parameter 'id' is set
302
+ if @api_client.config.client_side_validation && id.nil?
303
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_deals_id_progress_page_kind"
304
+ end
305
+ # verify the required parameter 'kind' is set
306
+ if @api_client.config.client_side_validation && kind.nil?
307
+ fail ArgumentError, "Missing the required parameter 'kind' when calling DefaultApi.get_deals_id_progress_page_kind"
308
+ end
309
+ # verify enum value
310
+ allowable_values = ["investment_amount", "number_of_securities", "number_of_investments"]
311
+ if @api_client.config.client_side_validation && !allowable_values.include?(kind)
312
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{allowable_values}"
313
+ end
314
+ # resource path
315
+ local_var_path = '/deals/{id}/progress_page/{kind}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'kind' + '}', CGI.escape(kind.to_s))
316
+
317
+ # query parameters
318
+ query_params = opts[:query_params] || {}
319
+
320
+ # header parameters
321
+ header_params = opts[:header_params] || {}
322
+ # HTTP header 'Accept' (if needed)
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:debug_body]
330
+
331
+ # return_type
332
+ return_type = opts[:debug_return_type] || 'V1EntitiesDealsProgress'
333
+
334
+ # auth_names
335
+ auth_names = opts[:debug_auth_names] || []
336
+
337
+ new_options = opts.merge(
338
+ :operation => :"DefaultApi.get_deals_id_progress_page_kind",
339
+ :header_params => header_params,
340
+ :query_params => query_params,
341
+ :form_params => form_params,
342
+ :body => post_body,
343
+ :auth_names => auth_names,
344
+ :return_type => return_type
345
+ )
346
+
347
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug "API called: DefaultApi#get_deals_id_progress_page_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
350
+ end
351
+ return data, status_code, headers
352
+ end
353
+
280
354
  # Get Deal Overview
281
355
  # Get Deal Overview
282
356
  # @param id [Integer]
@@ -19,6 +19,132 @@ module DealMakerAPI
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Creates an API endpoint for creating a new TOTP factor
23
+ # Create an API endpoint for creating a new TOTP factor
24
+ # @param id [Integer]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [V1EntitiesUsersFactor]
27
+ def create_factor(id, opts = {})
28
+ data, _status_code, _headers = create_factor_with_http_info(id, opts)
29
+ data
30
+ end
31
+
32
+ # Creates an API endpoint for creating a new TOTP factor
33
+ # Create an API endpoint for creating a new TOTP factor
34
+ # @param id [Integer]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(V1EntitiesUsersFactor, Integer, Hash)>] V1EntitiesUsersFactor data, response status code and response headers
37
+ def create_factor_with_http_info(id, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: UserApi.create_factor ...'
40
+ end
41
+ # verify the required parameter 'id' is set
42
+ if @api_client.config.client_side_validation && id.nil?
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.create_factor"
44
+ end
45
+ # resource path
46
+ local_var_path = '/users/{id}/create_factor'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'V1EntitiesUsersFactor'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || []
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"UserApi.create_factor",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: UserApi#create_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Creates an API endpoint to return a list of existing TOTP factor
86
+ # Create an API endpoint to return a list of existing TOTP factor
87
+ # @param id [Integer]
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [V1EntitiesUsersTwoFactorChannels]
90
+ def get_two_factor_channels(id, opts = {})
91
+ data, _status_code, _headers = get_two_factor_channels_with_http_info(id, opts)
92
+ data
93
+ end
94
+
95
+ # Creates an API endpoint to return a list of existing TOTP factor
96
+ # Create an API endpoint to return a list of existing TOTP factor
97
+ # @param id [Integer]
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(V1EntitiesUsersTwoFactorChannels, Integer, Hash)>] V1EntitiesUsersTwoFactorChannels data, response status code and response headers
100
+ def get_two_factor_channels_with_http_info(id, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: UserApi.get_two_factor_channels ...'
103
+ end
104
+ # verify the required parameter 'id' is set
105
+ if @api_client.config.client_side_validation && id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.get_two_factor_channels"
107
+ end
108
+ # resource path
109
+ local_var_path = '/users/{id}/two_factor_channels'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+ # HTTP header 'Accept' (if needed)
117
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type] || 'V1EntitiesUsersTwoFactorChannels'
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || []
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"UserApi.get_two_factor_channels",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: UserApi#get_two_factor_channels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
22
148
  # Get user by User ID
23
149
  # Get a single user using the User ID
24
150
  # @param id [Integer]
@@ -82,6 +208,78 @@ module DealMakerAPI
82
208
  return data, status_code, headers
83
209
  end
84
210
 
211
+ # Start a setup for a SMS Verification by creating a two factor channel of sms type
212
+ # Start a setup for a SMS Verification by creating a two factor channel of sms type
213
+ # @param id [Integer]
214
+ # @param setup_sms_verification_request [SetupSmsVerificationRequest]
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [nil]
217
+ def setup_sms_verification(id, setup_sms_verification_request, opts = {})
218
+ setup_sms_verification_with_http_info(id, setup_sms_verification_request, opts)
219
+ nil
220
+ end
221
+
222
+ # Start a setup for a SMS Verification by creating a two factor channel of sms type
223
+ # Start a setup for a SMS Verification by creating a two factor channel of sms type
224
+ # @param id [Integer]
225
+ # @param setup_sms_verification_request [SetupSmsVerificationRequest]
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
228
+ def setup_sms_verification_with_http_info(id, setup_sms_verification_request, opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: UserApi.setup_sms_verification ...'
231
+ end
232
+ # verify the required parameter 'id' is set
233
+ if @api_client.config.client_side_validation && id.nil?
234
+ fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.setup_sms_verification"
235
+ end
236
+ # verify the required parameter 'setup_sms_verification_request' is set
237
+ if @api_client.config.client_side_validation && setup_sms_verification_request.nil?
238
+ fail ArgumentError, "Missing the required parameter 'setup_sms_verification_request' when calling UserApi.setup_sms_verification"
239
+ end
240
+ # resource path
241
+ local_var_path = '/users/{id}/setup_sms_verification'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
242
+
243
+ # query parameters
244
+ query_params = opts[:query_params] || {}
245
+
246
+ # header parameters
247
+ header_params = opts[:header_params] || {}
248
+ # HTTP header 'Content-Type'
249
+ content_type = @api_client.select_header_content_type(['application/json'])
250
+ if !content_type.nil?
251
+ header_params['Content-Type'] = content_type
252
+ end
253
+
254
+ # form parameters
255
+ form_params = opts[:form_params] || {}
256
+
257
+ # http body (model)
258
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(setup_sms_verification_request)
259
+
260
+ # return_type
261
+ return_type = opts[:debug_return_type]
262
+
263
+ # auth_names
264
+ auth_names = opts[:debug_auth_names] || []
265
+
266
+ new_options = opts.merge(
267
+ :operation => :"UserApi.setup_sms_verification",
268
+ :header_params => header_params,
269
+ :query_params => query_params,
270
+ :form_params => form_params,
271
+ :body => post_body,
272
+ :auth_names => auth_names,
273
+ :return_type => return_type
274
+ )
275
+
276
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "API called: UserApi#setup_sms_verification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
279
+ end
280
+ return data, status_code, headers
281
+ end
282
+
85
283
  # Update user password
86
284
  # Update user password
87
285
  # @param id [Integer]
@@ -155,5 +353,79 @@ module DealMakerAPI
155
353
  end
156
354
  return data, status_code, headers
157
355
  end
356
+
357
+ # Creates an API endpoint to verify an existing TOTP factor
358
+ # Create an API endpoint to verify an existing TOTP factor
359
+ # @param id [Integer]
360
+ # @param verify_factor_request [VerifyFactorRequest]
361
+ # @param [Hash] opts the optional parameters
362
+ # @return [V1EntitiesUsersTwoFactorChannel]
363
+ def verify_factor(id, verify_factor_request, opts = {})
364
+ data, _status_code, _headers = verify_factor_with_http_info(id, verify_factor_request, opts)
365
+ data
366
+ end
367
+
368
+ # Creates an API endpoint to verify an existing TOTP factor
369
+ # Create an API endpoint to verify an existing TOTP factor
370
+ # @param id [Integer]
371
+ # @param verify_factor_request [VerifyFactorRequest]
372
+ # @param [Hash] opts the optional parameters
373
+ # @return [Array<(V1EntitiesUsersTwoFactorChannel, Integer, Hash)>] V1EntitiesUsersTwoFactorChannel data, response status code and response headers
374
+ def verify_factor_with_http_info(id, verify_factor_request, opts = {})
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug 'Calling API: UserApi.verify_factor ...'
377
+ end
378
+ # verify the required parameter 'id' is set
379
+ if @api_client.config.client_side_validation && id.nil?
380
+ fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.verify_factor"
381
+ end
382
+ # verify the required parameter 'verify_factor_request' is set
383
+ if @api_client.config.client_side_validation && verify_factor_request.nil?
384
+ fail ArgumentError, "Missing the required parameter 'verify_factor_request' when calling UserApi.verify_factor"
385
+ end
386
+ # resource path
387
+ local_var_path = '/users/{id}/verify_factor'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
388
+
389
+ # query parameters
390
+ query_params = opts[:query_params] || {}
391
+
392
+ # header parameters
393
+ header_params = opts[:header_params] || {}
394
+ # HTTP header 'Accept' (if needed)
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
396
+ # HTTP header 'Content-Type'
397
+ content_type = @api_client.select_header_content_type(['application/json'])
398
+ if !content_type.nil?
399
+ header_params['Content-Type'] = content_type
400
+ end
401
+
402
+ # form parameters
403
+ form_params = opts[:form_params] || {}
404
+
405
+ # http body (model)
406
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(verify_factor_request)
407
+
408
+ # return_type
409
+ return_type = opts[:debug_return_type] || 'V1EntitiesUsersTwoFactorChannel'
410
+
411
+ # auth_names
412
+ auth_names = opts[:debug_auth_names] || []
413
+
414
+ new_options = opts.merge(
415
+ :operation => :"UserApi.verify_factor",
416
+ :header_params => header_params,
417
+ :query_params => query_params,
418
+ :form_params => form_params,
419
+ :body => post_body,
420
+ :auth_names => auth_names,
421
+ :return_type => return_type
422
+ )
423
+
424
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
425
+ if @api_client.config.debugging
426
+ @api_client.config.logger.debug "API called: UserApi#verify_factor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
427
+ end
428
+ return data, status_code, headers
429
+ end
158
430
  end
159
431
  end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.6.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ class SetupSmsVerificationRequest
18
+ # The phone number of the given user
19
+ attr_accessor :phone_number
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'phone_number' => :'phone_number'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'phone_number' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::SetupSmsVerificationRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::SetupSmsVerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'phone_number')
62
+ self.phone_number = attributes[:'phone_number']
63
+ else
64
+ self.phone_number = nil
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ if @phone_number.nil?
74
+ invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ return false if @phone_number.nil?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ phone_number == o.phone_number
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [phone_number].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def self._deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = DealMakerAPI.const_get(type)
170
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end