DealMakerAPI 0.93.0 → 0.93.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module DealMakerAPI
23
23
  # Create new corporation investor profile associated to the user by email.
24
24
  # @param investor_profiles_corporations [PostInvestorProfilesCorporations]
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [V1EntitiesInvestorProfileCorporation]
26
+ # @return [V1EntitiesInvestorProfileId]
27
27
  def create_corporation_profile(investor_profiles_corporations, opts = {})
28
28
  data, _status_code, _headers = create_corporation_profile_with_http_info(investor_profiles_corporations, opts)
29
29
  data
@@ -33,7 +33,7 @@ module DealMakerAPI
33
33
  # Create new corporation investor profile associated to the user by email.
34
34
  # @param investor_profiles_corporations [PostInvestorProfilesCorporations]
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(V1EntitiesInvestorProfileCorporation, Integer, Hash)>] V1EntitiesInvestorProfileCorporation data, response status code and response headers
36
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
37
37
  def create_corporation_profile_with_http_info(investor_profiles_corporations, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.create_corporation_profile ...'
@@ -65,7 +65,7 @@ module DealMakerAPI
65
65
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_corporations)
66
66
 
67
67
  # return_type
68
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileCorporation'
68
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
69
69
 
70
70
  # auth_names
71
71
  auth_names = opts[:debug_auth_names] || []
@@ -91,7 +91,7 @@ module DealMakerAPI
91
91
  # Create new individual investor profile associated to the user by email.
92
92
  # @param investor_profiles_individuals [PostInvestorProfilesIndividuals]
93
93
  # @param [Hash] opts the optional parameters
94
- # @return [V1EntitiesInvestorProfileIndividual]
94
+ # @return [V1EntitiesInvestorProfileId]
95
95
  def create_individual_profile(investor_profiles_individuals, opts = {})
96
96
  data, _status_code, _headers = create_individual_profile_with_http_info(investor_profiles_individuals, opts)
97
97
  data
@@ -101,7 +101,7 @@ module DealMakerAPI
101
101
  # Create new individual investor profile associated to the user by email.
102
102
  # @param investor_profiles_individuals [PostInvestorProfilesIndividuals]
103
103
  # @param [Hash] opts the optional parameters
104
- # @return [Array<(V1EntitiesInvestorProfileIndividual, Integer, Hash)>] V1EntitiesInvestorProfileIndividual data, response status code and response headers
104
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
105
105
  def create_individual_profile_with_http_info(investor_profiles_individuals, opts = {})
106
106
  if @api_client.config.debugging
107
107
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.create_individual_profile ...'
@@ -133,7 +133,7 @@ module DealMakerAPI
133
133
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_individuals)
134
134
 
135
135
  # return_type
136
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileIndividual'
136
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
137
137
 
138
138
  # auth_names
139
139
  auth_names = opts[:debug_auth_names] || []
@@ -159,7 +159,7 @@ module DealMakerAPI
159
159
  # Create new joint investor profile associated to the user by email.
160
160
  # @param investor_profiles_joints [PostInvestorProfilesJoints]
161
161
  # @param [Hash] opts the optional parameters
162
- # @return [V1EntitiesInvestorProfileJoint]
162
+ # @return [V1EntitiesInvestorProfileId]
163
163
  def create_joint_profile(investor_profiles_joints, opts = {})
164
164
  data, _status_code, _headers = create_joint_profile_with_http_info(investor_profiles_joints, opts)
165
165
  data
@@ -169,7 +169,7 @@ module DealMakerAPI
169
169
  # Create new joint investor profile associated to the user by email.
170
170
  # @param investor_profiles_joints [PostInvestorProfilesJoints]
171
171
  # @param [Hash] opts the optional parameters
172
- # @return [Array<(V1EntitiesInvestorProfileJoint, Integer, Hash)>] V1EntitiesInvestorProfileJoint data, response status code and response headers
172
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
173
173
  def create_joint_profile_with_http_info(investor_profiles_joints, opts = {})
174
174
  if @api_client.config.debugging
175
175
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.create_joint_profile ...'
@@ -201,7 +201,7 @@ module DealMakerAPI
201
201
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_joints)
202
202
 
203
203
  # return_type
204
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileJoint'
204
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
205
205
 
206
206
  # auth_names
207
207
  auth_names = opts[:debug_auth_names] || []
@@ -227,7 +227,7 @@ module DealMakerAPI
227
227
  # Create new managed investor profile associated to the user by email.
228
228
  # @param investor_profiles_managed [PostInvestorProfilesManaged]
229
229
  # @param [Hash] opts the optional parameters
230
- # @return [V1EntitiesInvestorProfileManaged]
230
+ # @return [V1EntitiesInvestorProfileId]
231
231
  def create_managed_profile(investor_profiles_managed, opts = {})
232
232
  data, _status_code, _headers = create_managed_profile_with_http_info(investor_profiles_managed, opts)
233
233
  data
@@ -237,7 +237,7 @@ module DealMakerAPI
237
237
  # Create new managed investor profile associated to the user by email.
238
238
  # @param investor_profiles_managed [PostInvestorProfilesManaged]
239
239
  # @param [Hash] opts the optional parameters
240
- # @return [Array<(V1EntitiesInvestorProfileManaged, Integer, Hash)>] V1EntitiesInvestorProfileManaged data, response status code and response headers
240
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
241
241
  def create_managed_profile_with_http_info(investor_profiles_managed, opts = {})
242
242
  if @api_client.config.debugging
243
243
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.create_managed_profile ...'
@@ -269,7 +269,7 @@ module DealMakerAPI
269
269
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_managed)
270
270
 
271
271
  # return_type
272
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileManaged'
272
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
273
273
 
274
274
  # auth_names
275
275
  auth_names = opts[:debug_auth_names] || []
@@ -295,7 +295,7 @@ module DealMakerAPI
295
295
  # Create new trust investor profile associated to the user by email.
296
296
  # @param investor_profiles_trusts [PostInvestorProfilesTrusts]
297
297
  # @param [Hash] opts the optional parameters
298
- # @return [V1EntitiesInvestorProfileTrust]
298
+ # @return [V1EntitiesInvestorProfileId]
299
299
  def create_trust_profile(investor_profiles_trusts, opts = {})
300
300
  data, _status_code, _headers = create_trust_profile_with_http_info(investor_profiles_trusts, opts)
301
301
  data
@@ -305,7 +305,7 @@ module DealMakerAPI
305
305
  # Create new trust investor profile associated to the user by email.
306
306
  # @param investor_profiles_trusts [PostInvestorProfilesTrusts]
307
307
  # @param [Hash] opts the optional parameters
308
- # @return [Array<(V1EntitiesInvestorProfileTrust, Integer, Hash)>] V1EntitiesInvestorProfileTrust data, response status code and response headers
308
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
309
309
  def create_trust_profile_with_http_info(investor_profiles_trusts, opts = {})
310
310
  if @api_client.config.debugging
311
311
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.create_trust_profile ...'
@@ -337,7 +337,7 @@ module DealMakerAPI
337
337
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_trusts)
338
338
 
339
339
  # return_type
340
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileTrust'
340
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
341
341
 
342
342
  # auth_names
343
343
  auth_names = opts[:debug_auth_names] || []
@@ -360,7 +360,7 @@ module DealMakerAPI
360
360
  end
361
361
 
362
362
  # Get list of InvestorProfiles for a specific deal
363
- # Get investor profiles for a specific deal
363
+ # Get investor profiles for a specific deal. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
364
364
  # @param deal_id [Integer] The deal id.
365
365
  # @param [Hash] opts the optional parameters
366
366
  # @option opts [Integer] :page Page offset to fetch. (default to 1)
@@ -374,7 +374,7 @@ module DealMakerAPI
374
374
  end
375
375
 
376
376
  # Get list of InvestorProfiles for a specific deal
377
- # Get investor profiles for a specific deal
377
+ # Get investor profiles for a specific deal. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
378
378
  # @param deal_id [Integer] The deal id.
379
379
  # @param [Hash] opts the optional parameters
380
380
  # @option opts [Integer] :page Page offset to fetch. (default to 1)
@@ -435,7 +435,7 @@ module DealMakerAPI
435
435
  end
436
436
 
437
437
  # Get an investor profile by id
438
- # Get an investor profile
438
+ # Get an investor profile. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
439
439
  # @param id [Integer] The id of the investor profile.
440
440
  # @param [Hash] opts the optional parameters
441
441
  # @return [V1EntitiesInvestorProfileItem]
@@ -445,7 +445,7 @@ module DealMakerAPI
445
445
  end
446
446
 
447
447
  # Get an investor profile by id
448
- # Get an investor profile
448
+ # Get an investor profile. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
449
449
  # @param id [Integer] The id of the investor profile.
450
450
  # @param [Hash] opts the optional parameters
451
451
  # @return [Array<(V1EntitiesInvestorProfileItem, Integer, Hash)>] V1EntitiesInvestorProfileItem data, response status code and response headers
@@ -498,7 +498,7 @@ module DealMakerAPI
498
498
  end
499
499
 
500
500
  # Get list of InvestorProfiles
501
- # Get investor profiles
501
+ # Get investor profiles. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
502
502
  # @param [Hash] opts the optional parameters
503
503
  # @option opts [Integer] :page Page offset to fetch. (default to 1)
504
504
  # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
@@ -510,7 +510,7 @@ module DealMakerAPI
510
510
  end
511
511
 
512
512
  # Get list of InvestorProfiles
513
- # Get investor profiles
513
+ # Get investor profiles. Because an investor profile belongs to the user associated with it, external applications may not use this endpoint for other profiles. Only the user may use this endpoint for their own profiles (i.e. to see existing profiles within the DealMaker application).
514
514
  # @param [Hash] opts the optional parameters
515
515
  # @option opts [Integer] :page Page offset to fetch. (default to 1)
516
516
  # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
@@ -568,7 +568,7 @@ module DealMakerAPI
568
568
  # @param investor_profile_id [Integer]
569
569
  # @param investor_profiles_corporations [PatchInvestorProfilesCorporations]
570
570
  # @param [Hash] opts the optional parameters
571
- # @return [V1EntitiesInvestorProfileCorporation]
571
+ # @return [V1EntitiesInvestorProfileId]
572
572
  def patch_corporation_profile(investor_profile_id, investor_profiles_corporations, opts = {})
573
573
  data, _status_code, _headers = patch_corporation_profile_with_http_info(investor_profile_id, investor_profiles_corporations, opts)
574
574
  data
@@ -579,7 +579,7 @@ module DealMakerAPI
579
579
  # @param investor_profile_id [Integer]
580
580
  # @param investor_profiles_corporations [PatchInvestorProfilesCorporations]
581
581
  # @param [Hash] opts the optional parameters
582
- # @return [Array<(V1EntitiesInvestorProfileCorporation, Integer, Hash)>] V1EntitiesInvestorProfileCorporation data, response status code and response headers
582
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
583
583
  def patch_corporation_profile_with_http_info(investor_profile_id, investor_profiles_corporations, opts = {})
584
584
  if @api_client.config.debugging
585
585
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.patch_corporation_profile ...'
@@ -615,7 +615,7 @@ module DealMakerAPI
615
615
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_corporations)
616
616
 
617
617
  # return_type
618
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileCorporation'
618
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
619
619
 
620
620
  # auth_names
621
621
  auth_names = opts[:debug_auth_names] || []
@@ -642,7 +642,7 @@ module DealMakerAPI
642
642
  # @param investor_profile_id [Integer]
643
643
  # @param investor_profiles_individuals [PatchInvestorProfilesIndividuals]
644
644
  # @param [Hash] opts the optional parameters
645
- # @return [V1EntitiesInvestorProfileIndividual]
645
+ # @return [V1EntitiesInvestorProfileId]
646
646
  def patch_individual_profile(investor_profile_id, investor_profiles_individuals, opts = {})
647
647
  data, _status_code, _headers = patch_individual_profile_with_http_info(investor_profile_id, investor_profiles_individuals, opts)
648
648
  data
@@ -653,7 +653,7 @@ module DealMakerAPI
653
653
  # @param investor_profile_id [Integer]
654
654
  # @param investor_profiles_individuals [PatchInvestorProfilesIndividuals]
655
655
  # @param [Hash] opts the optional parameters
656
- # @return [Array<(V1EntitiesInvestorProfileIndividual, Integer, Hash)>] V1EntitiesInvestorProfileIndividual data, response status code and response headers
656
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
657
657
  def patch_individual_profile_with_http_info(investor_profile_id, investor_profiles_individuals, opts = {})
658
658
  if @api_client.config.debugging
659
659
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.patch_individual_profile ...'
@@ -689,7 +689,7 @@ module DealMakerAPI
689
689
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_individuals)
690
690
 
691
691
  # return_type
692
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileIndividual'
692
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
693
693
 
694
694
  # auth_names
695
695
  auth_names = opts[:debug_auth_names] || []
@@ -716,7 +716,7 @@ module DealMakerAPI
716
716
  # @param investor_profile_id [Integer]
717
717
  # @param investor_profiles_joints [PatchInvestorProfilesJoints]
718
718
  # @param [Hash] opts the optional parameters
719
- # @return [V1EntitiesInvestorProfileJoint]
719
+ # @return [V1EntitiesInvestorProfileId]
720
720
  def patch_joint_profile(investor_profile_id, investor_profiles_joints, opts = {})
721
721
  data, _status_code, _headers = patch_joint_profile_with_http_info(investor_profile_id, investor_profiles_joints, opts)
722
722
  data
@@ -727,7 +727,7 @@ module DealMakerAPI
727
727
  # @param investor_profile_id [Integer]
728
728
  # @param investor_profiles_joints [PatchInvestorProfilesJoints]
729
729
  # @param [Hash] opts the optional parameters
730
- # @return [Array<(V1EntitiesInvestorProfileJoint, Integer, Hash)>] V1EntitiesInvestorProfileJoint data, response status code and response headers
730
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
731
731
  def patch_joint_profile_with_http_info(investor_profile_id, investor_profiles_joints, opts = {})
732
732
  if @api_client.config.debugging
733
733
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.patch_joint_profile ...'
@@ -763,7 +763,7 @@ module DealMakerAPI
763
763
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_joints)
764
764
 
765
765
  # return_type
766
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileJoint'
766
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
767
767
 
768
768
  # auth_names
769
769
  auth_names = opts[:debug_auth_names] || []
@@ -790,7 +790,7 @@ module DealMakerAPI
790
790
  # @param investor_profile_id [Integer]
791
791
  # @param investor_profiles_trusts [PatchInvestorProfilesTrusts]
792
792
  # @param [Hash] opts the optional parameters
793
- # @return [V1EntitiesInvestorProfileTrust]
793
+ # @return [V1EntitiesInvestorProfileId]
794
794
  def patch_trust_profile(investor_profile_id, investor_profiles_trusts, opts = {})
795
795
  data, _status_code, _headers = patch_trust_profile_with_http_info(investor_profile_id, investor_profiles_trusts, opts)
796
796
  data
@@ -801,7 +801,7 @@ module DealMakerAPI
801
801
  # @param investor_profile_id [Integer]
802
802
  # @param investor_profiles_trusts [PatchInvestorProfilesTrusts]
803
803
  # @param [Hash] opts the optional parameters
804
- # @return [Array<(V1EntitiesInvestorProfileTrust, Integer, Hash)>] V1EntitiesInvestorProfileTrust data, response status code and response headers
804
+ # @return [Array<(V1EntitiesInvestorProfileId, Integer, Hash)>] V1EntitiesInvestorProfileId data, response status code and response headers
805
805
  def patch_trust_profile_with_http_info(investor_profile_id, investor_profiles_trusts, opts = {})
806
806
  if @api_client.config.debugging
807
807
  @api_client.config.logger.debug 'Calling API: InvestorProfileApi.patch_trust_profile ...'
@@ -837,7 +837,7 @@ module DealMakerAPI
837
837
  post_body = opts[:debug_body] || @api_client.object_to_http_body(investor_profiles_trusts)
838
838
 
839
839
  # return_type
840
- return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileTrust'
840
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestorProfileId'
841
841
 
842
842
  # auth_names
843
843
  auth_names = opts[:debug_auth_names] || []
@@ -187,14 +187,16 @@ module DealMakerAPI
187
187
  chunk.force_encoding(encoding)
188
188
  tempfile.write(chunk)
189
189
  end
190
- request.on_complete do |response|
191
- if tempfile
192
- tempfile.close
193
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
194
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
195
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
196
- "explicitly with `tempfile.delete`"
197
- end
190
+ # run the request to ensure the tempfile is created successfully before returning it
191
+ request.run
192
+ if tempfile
193
+ tempfile.close
194
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
195
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
196
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
197
+ "explicitly with `tempfile.delete`"
198
+ else
199
+ fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
198
200
  end
199
201
 
200
202
  tempfile
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- # V1_Entities_InvestorProfile_Corporation model
18
17
  class V1EntitiesInvestorProfileCorporation
19
18
  # Investor Profile id
20
19
  attr_accessor :id
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DealMakerAPI
17
+ # V1_Entities_InvestorProfile_Id model
18
+ class V1EntitiesInvestorProfileId
19
+ # Investor Profile id
20
+ attr_accessor :id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'id' => :'id'
26
+ }
27
+ end
28
+
29
+ # Returns all the JSON keys this model knows about
30
+ def self.acceptable_attributes
31
+ attribute_map.values
32
+ end
33
+
34
+ # Attribute type mapping.
35
+ def self.openapi_types
36
+ {
37
+ :'id' => :'Integer'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DealMakerAPI::V1EntitiesInvestorProfileId` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DealMakerAPI::V1EntitiesInvestorProfileId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'id')
63
+ self.id = attributes[:'id']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ warn '[DEPRECATED] the `valid?` method is obsolete'
79
+ true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ id == o.id
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Integer] Hash code
98
+ def hash
99
+ [id].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def self.build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ attributes = attributes.transform_keys(&:to_sym)
108
+ transformed_hash = {}
109
+ openapi_types.each_pair do |key, type|
110
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
111
+ transformed_hash["#{key}"] = nil
112
+ elsif type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[attribute_map[key]].is_a?(Array)
116
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
117
+ end
118
+ elsif !attributes[attribute_map[key]].nil?
119
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
120
+ end
121
+ end
122
+ new(transformed_hash)
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def self._deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = DealMakerAPI.const_get(type)
164
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- # V1_Entities_InvestorProfile_Individual model
18
17
  class V1EntitiesInvestorProfileIndividual
19
18
  # Investor Profile id
20
19
  attr_accessor :id
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- # V1_Entities_InvestorProfile_Joint model
18
17
  class V1EntitiesInvestorProfileJoint
19
18
  # Investor Profile id
20
19
  attr_accessor :id
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- # V1_Entities_InvestorProfile_Managed model
18
17
  class V1EntitiesInvestorProfileManaged
19
18
  # Investor Profile id
20
19
  attr_accessor :id
@@ -14,7 +14,6 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DealMakerAPI
17
- # V1_Entities_InvestorProfile_Trust model
18
17
  class V1EntitiesInvestorProfileTrust
19
18
  # Investor Profile id
20
19
  attr_accessor :id
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.2.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module DealMakerAPI
14
- VERSION = '0.93.0'
14
+ VERSION = '0.93.2'
15
15
  end
data/lib/DealMakerAPI.rb CHANGED
@@ -91,6 +91,7 @@ require 'DealMakerAPI/models/v1_entities_investor_profile_fields_provider'
91
91
  require 'DealMakerAPI/models/v1_entities_investor_profile_fields_signing_officer'
92
92
  require 'DealMakerAPI/models/v1_entities_investor_profile_fields_trust'
93
93
  require 'DealMakerAPI/models/v1_entities_investor_profile_fields_trustee'
94
+ require 'DealMakerAPI/models/v1_entities_investor_profile_id'
94
95
  require 'DealMakerAPI/models/v1_entities_investor_profile_individual'
95
96
  require 'DealMakerAPI/models/v1_entities_investor_profile_item'
96
97
  require 'DealMakerAPI/models/v1_entities_investor_profile_joint'