DealMakerAPI 0.85.5 → 0.86.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/docs/CountryApi.md +71 -0
  4. data/docs/PatchInvestorProfilesCorporations.md +2 -0
  5. data/docs/PostInvestorProfilesCorporations.md +2 -0
  6. data/docs/UsersApi.md +82 -0
  7. data/docs/V1EntitiesCountries.md +18 -0
  8. data/docs/V1EntitiesCountry.md +22 -0
  9. data/docs/V1EntitiesInvestorProfileCorporation.md +1 -1
  10. data/docs/V1EntitiesInvestorProfileFieldsBeneficialOwner.md +30 -0
  11. data/docs/V1EntitiesInvestorProfileFieldsSigningOfficer.md +2 -0
  12. data/docs/V1EntitiesState.md +20 -0
  13. data/lib/DealMakerAPI/api/country_api.rb +79 -0
  14. data/lib/DealMakerAPI/api/users_api.rb +95 -0
  15. data/lib/DealMakerAPI/models/create_deal_setup_request.rb +2 -2
  16. data/lib/DealMakerAPI/models/patch_investor_profiles_corporations.rb +11 -1
  17. data/lib/DealMakerAPI/models/post_investor_profiles_corporations.rb +11 -1
  18. data/lib/DealMakerAPI/models/v1_entities_countries.rb +215 -0
  19. data/lib/DealMakerAPI/models/v1_entities_country.rb +234 -0
  20. data/lib/DealMakerAPI/models/v1_entities_investor_profile_corporation.rb +1 -1
  21. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_beneficial_owner.rb +274 -0
  22. data/lib/DealMakerAPI/models/v1_entities_investor_profile_fields_signing_officer.rb +11 -1
  23. data/lib/DealMakerAPI/models/v1_entities_state.rb +225 -0
  24. data/lib/DealMakerAPI/version.rb +1 -1
  25. data/lib/DealMakerAPI.rb +6 -0
  26. data/spec/api/country_api_spec.rb +46 -0
  27. data/spec/api/users_api_spec.rb +50 -0
  28. data/spec/models/create_deal_setup_request_spec.rb +1 -1
  29. data/spec/models/patch_investor_profiles_corporations_spec.rb +6 -0
  30. data/spec/models/post_investor_profiles_corporations_spec.rb +6 -0
  31. data/spec/models/v1_entities_countries_spec.rb +34 -0
  32. data/spec/models/v1_entities_country_spec.rb +46 -0
  33. data/spec/models/v1_entities_investor_profile_fields_beneficial_owner_spec.rb +70 -0
  34. data/spec/models/v1_entities_investor_profile_fields_signing_officer_spec.rb +6 -0
  35. data/spec/models/v1_entities_state_spec.rb +40 -0
  36. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e99d1c006ef356a61061ea533261275a44af6de7149107b979dc3297cead9b0
4
- data.tar.gz: 258211a774e87b86133f48acbbaad71e2503f68e2dee25ffa2a60e49dcb486c6
3
+ metadata.gz: 713b1c587f251e8884e403b9cbe0ca85f04e8f8c406160bd024391d9de06e36a
4
+ data.tar.gz: 7fff745d0fd0248c20837d14d8a99cfcfd9db548aabbc5338fd6b078ae88b7d2
5
5
  SHA512:
6
- metadata.gz: 4554d45d1a62b7430990aa11cb8e4f089649d83854af2520f3cd435b91884ad4d9afec26d062bc3ad28eb84147885b35be71efcd21056924a4263b5415df5e9f
7
- data.tar.gz: 330a12967890e7e582e691176b0e85ae3e7c255273fff07d577dcec119cddf4318281b1a63b90ebb617984de3e5fac7c7119cd253342fdb2a9a1e449a5007417
6
+ metadata.gz: 56bf835f6c281d2533e1498b168b9225bbc218701bebad62975c6626f3d3ae13af9c6c124e295c1b57920e23b9ae28d6e79e0eeb1af7b20ec00174a2569dce0a
7
+ data.tar.gz: a1c4171412a78853437b8ac69963b6469ec73f76ce0b0fe7ea5a9e83a345bbdf3260b918f6d334f491e01c6c409b955d84fe94f708cba85c56d15bd74e75e593
data/README.md CHANGED
@@ -338,7 +338,7 @@ Given the high number of updates our platform performs on any investor, we’ve
338
338
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
339
339
 
340
340
  - API version: 1.75.0
341
- - Package version: 0.85.5
341
+ - Package version: 0.86.0
342
342
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
343
343
 
344
344
  ## Installation
@@ -354,16 +354,16 @@ gem build DealMakerAPI.gemspec
354
354
  Then either install the gem locally:
355
355
 
356
356
  ```shell
357
- gem install ./DealMakerAPI-0.85.5.gem
357
+ gem install ./DealMakerAPI-0.86.0.gem
358
358
  ```
359
359
 
360
- (for development, run `gem install --dev ./DealMakerAPI-0.85.5.gem` to install the development dependencies)
360
+ (for development, run `gem install --dev ./DealMakerAPI-0.86.0.gem` to install the development dependencies)
361
361
 
362
362
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
363
363
 
364
364
  Finally add this to the Gemfile:
365
365
 
366
- gem 'DealMakerAPI', '~> 0.85.5'
366
+ gem 'DealMakerAPI', '~> 0.86.0'
367
367
 
368
368
  ### Install from Git
369
369
 
@@ -420,6 +420,7 @@ Class | Method | HTTP request | Description
420
420
  *DealMakerAPI::CompanyApi* | [**get_companies**](docs/CompanyApi.md#get_companies) | **GET** /companies | Get list of Companies
421
421
  *DealMakerAPI::CompanyApi* | [**get_company**](docs/CompanyApi.md#get_company) | **GET** /companies/{id} | Get a Company
422
422
  *DealMakerAPI::CompanyApi* | [**get_details_errors_grouped**](docs/CompanyApi.md#get_details_errors_grouped) | **GET** /companies/{company_id}/documents/bulk_uploads/{bulk_upload_id}/details/grouped_errors | Return bulk upload details grouped by status
423
+ *DealMakerAPI::CountryApi* | [**get_country_states**](docs/CountryApi.md#get_country_states) | **GET** /country/states | Returns a list of all valid countries and it states
423
424
  *DealMakerAPI::DealApi* | [**get_analytics_dashboard_info**](docs/DealApi.md#get_analytics_dashboard_info) | **GET** /deals/{id}/analytics_dashboard_info | Get Analytics Dashboard Info
424
425
  *DealMakerAPI::DealApi* | [**get_deal**](docs/DealApi.md#get_deal) | **GET** /deals/{id} | Get deal by Deal ID
425
426
  *DealMakerAPI::DealApi* | [**list_deals**](docs/DealApi.md#list_deals) | **GET** /deals | List available deals
@@ -459,6 +460,7 @@ Class | Method | HTTP request | Description
459
460
  *DealMakerAPI::ShareholderApi* | [**get_shareholders**](docs/ShareholderApi.md#get_shareholders) | **GET** /companies/{id}/shareholders | Get a company shareholders list
460
461
  *DealMakerAPI::ShareholderApi* | [**get_shareholders_tags**](docs/ShareholderApi.md#get_shareholders_tags) | **GET** /companies/{id}/shareholders/tags | Get a company shareholders list grouped by tags
461
462
  *DealMakerAPI::UploadApi* | [**generate_url**](docs/UploadApi.md#generate_url) | **POST** /uploads/generate_url | Create a presigned URL for Amazon S3
463
+ *DealMakerAPI::UsersApi* | [**get_users_investments**](docs/UsersApi.md#get_users_investments) | **GET** /users/investments | Gets the investments for a specific user.
462
464
 
463
465
 
464
466
  ## Documentation for Models
@@ -501,6 +503,8 @@ Class | Method | HTTP request | Description
501
503
  - [DealMakerAPI::V1EntitiesCompany](docs/V1EntitiesCompany.md)
502
504
  - [DealMakerAPI::V1EntitiesCompanyDeal](docs/V1EntitiesCompanyDeal.md)
503
505
  - [DealMakerAPI::V1EntitiesCompanyDeals](docs/V1EntitiesCompanyDeals.md)
506
+ - [DealMakerAPI::V1EntitiesCountries](docs/V1EntitiesCountries.md)
507
+ - [DealMakerAPI::V1EntitiesCountry](docs/V1EntitiesCountry.md)
504
508
  - [DealMakerAPI::V1EntitiesDeal](docs/V1EntitiesDeal.md)
505
509
  - [DealMakerAPI::V1EntitiesDealEnterprise](docs/V1EntitiesDealEnterprise.md)
506
510
  - [DealMakerAPI::V1EntitiesDealFundingMetrics](docs/V1EntitiesDealFundingMetrics.md)
@@ -517,6 +521,7 @@ Class | Method | HTTP request | Description
517
521
  - [DealMakerAPI::V1EntitiesInvestorProfileAddress](docs/V1EntitiesInvestorProfileAddress.md)
518
522
  - [DealMakerAPI::V1EntitiesInvestorProfileCorporation](docs/V1EntitiesInvestorProfileCorporation.md)
519
523
  - [DealMakerAPI::V1EntitiesInvestorProfileFieldsAccountHolder](docs/V1EntitiesInvestorProfileFieldsAccountHolder.md)
524
+ - [DealMakerAPI::V1EntitiesInvestorProfileFieldsBeneficialOwner](docs/V1EntitiesInvestorProfileFieldsBeneficialOwner.md)
520
525
  - [DealMakerAPI::V1EntitiesInvestorProfileFieldsCorporation](docs/V1EntitiesInvestorProfileFieldsCorporation.md)
521
526
  - [DealMakerAPI::V1EntitiesInvestorProfileFieldsPrimaryHolder](docs/V1EntitiesInvestorProfileFieldsPrimaryHolder.md)
522
527
  - [DealMakerAPI::V1EntitiesInvestorProfileFieldsSigningOfficer](docs/V1EntitiesInvestorProfileFieldsSigningOfficer.md)
@@ -533,6 +538,7 @@ Class | Method | HTTP request | Description
533
538
  - [DealMakerAPI::V1EntitiesShareholder](docs/V1EntitiesShareholder.md)
534
539
  - [DealMakerAPI::V1EntitiesShareholders](docs/V1EntitiesShareholders.md)
535
540
  - [DealMakerAPI::V1EntitiesShareholdersTags](docs/V1EntitiesShareholdersTags.md)
541
+ - [DealMakerAPI::V1EntitiesState](docs/V1EntitiesState.md)
536
542
  - [DealMakerAPI::V1EntitiesSubscriptionAgreement](docs/V1EntitiesSubscriptionAgreement.md)
537
543
  - [DealMakerAPI::V1EntitiesWebhooksDeal](docs/V1EntitiesWebhooksDeal.md)
538
544
  - [DealMakerAPI::V1EntitiesWebhooksSecurityToken](docs/V1EntitiesWebhooksSecurityToken.md)
@@ -0,0 +1,71 @@
1
+ # DealMakerAPI::CountryApi
2
+
3
+ All URIs are relative to *http://api.dealmaker.tech*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_country_states**](CountryApi.md#get_country_states) | **GET** /country/states | Returns a list of all valid countries and it states |
8
+
9
+
10
+ ## get_country_states
11
+
12
+ > <V1EntitiesCountries> get_country_states
13
+
14
+ Returns a list of all valid countries and it states
15
+
16
+ Get countries and states
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'DealMakerAPI'
23
+ # setup authorization
24
+ DealMakerAPI.configure do |config|end
25
+
26
+ api_instance = DealMakerAPI::CountryApi.new
27
+
28
+ begin
29
+ # Returns a list of all valid countries and it states
30
+ result = api_instance.get_country_states
31
+ p result
32
+ rescue DealMakerAPI::ApiError => e
33
+ puts "Error when calling CountryApi->get_country_states: #{e}"
34
+ end
35
+ ```
36
+
37
+ #### Using the get_country_states_with_http_info variant
38
+
39
+ This returns an Array which contains the response data, status code and headers.
40
+
41
+ > <Array(<V1EntitiesCountries>, Integer, Hash)> get_country_states_with_http_info
42
+
43
+ ```ruby
44
+ begin
45
+ # Returns a list of all valid countries and it states
46
+ data, status_code, headers = api_instance.get_country_states_with_http_info
47
+ p status_code # => 2xx
48
+ p headers # => { ... }
49
+ p data # => <V1EntitiesCountries>
50
+ rescue DealMakerAPI::ApiError => e
51
+ puts "Error when calling CountryApi->get_country_states_with_http_info: #{e}"
52
+ end
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+ This endpoint does not need any parameter.
58
+
59
+ ### Return type
60
+
61
+ [**V1EntitiesCountries**](V1EntitiesCountries.md)
62
+
63
+ ### Authorization
64
+
65
+ No authorization required
66
+
67
+ ### HTTP request headers
68
+
69
+ - **Content-Type**: Not defined
70
+ - **Accept**: application/json
71
+
@@ -19,6 +19,7 @@
19
19
  | **reg_cf_prior_offerings_amount** | **Float** | The prior offering amount of the individual investor profile | [optional] |
20
20
  | **signing_officer_first_name** | **String** | Signing officer first name. | [optional] |
21
21
  | **signing_officer_last_name** | **String** | Signing officer last name. | [optional] |
22
+ | **signing_officer_title** | **String** | Signing officer title. | [optional] |
22
23
  | **signing_officer_suffix** | **String** | Signing officer suffix. | [optional] |
23
24
  | **signing_officer_street_address** | **String** | Signing officer street address. | [optional] |
24
25
  | **signing_officer_unit2** | **String** | Signing officer street address line 2. | [optional] |
@@ -51,6 +52,7 @@ instance = DealMakerAPI::PatchInvestorProfilesCorporations.new(
51
52
  reg_cf_prior_offerings_amount: null,
52
53
  signing_officer_first_name: null,
53
54
  signing_officer_last_name: null,
55
+ signing_officer_title: null,
54
56
  signing_officer_suffix: null,
55
57
  signing_officer_street_address: null,
56
58
  signing_officer_unit2: null,
@@ -20,6 +20,7 @@
20
20
  | **reg_cf_prior_offerings_amount** | **Float** | The prior offering amount of the individual investor profile | [optional] |
21
21
  | **signing_officer_first_name** | **String** | The first name of the signing officer (required). | [optional] |
22
22
  | **signing_officer_last_name** | **String** | The last name of the signing officer (required). | [optional] |
23
+ | **signing_officer_title** | **String** | The title of the signing officer. | [optional] |
23
24
  | **signing_officer_suffix** | **String** | The suffix of the signing officer. | [optional] |
24
25
  | **signing_officer_street_address** | **String** | The street address of the signing officer (required). | [optional] |
25
26
  | **signing_officer_unit2** | **String** | The street address line 2 of the signing officer. | [optional] |
@@ -53,6 +54,7 @@ instance = DealMakerAPI::PostInvestorProfilesCorporations.new(
53
54
  reg_cf_prior_offerings_amount: null,
54
55
  signing_officer_first_name: null,
55
56
  signing_officer_last_name: null,
57
+ signing_officer_title: null,
56
58
  signing_officer_suffix: null,
57
59
  signing_officer_street_address: null,
58
60
  signing_officer_unit2: null,
data/docs/UsersApi.md ADDED
@@ -0,0 +1,82 @@
1
+ # DealMakerAPI::UsersApi
2
+
3
+ All URIs are relative to *http://api.dealmaker.tech*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_users_investments**](UsersApi.md#get_users_investments) | **GET** /users/investments | Gets the investments for a specific user. |
8
+
9
+
10
+ ## get_users_investments
11
+
12
+ > <V1EntitiesInvestors> get_users_investments(email, opts)
13
+
14
+ Gets the investments for a specific user.
15
+
16
+ Get Investments
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'DealMakerAPI'
23
+ # setup authorization
24
+ DealMakerAPI.configure do |config|end
25
+
26
+ api_instance = DealMakerAPI::UsersApi.new
27
+ email = 'email_example' # String | The email of the user.
28
+ opts = {
29
+ page: 56, # Integer | Page offset to fetch.
30
+ per_page: 56, # Integer | Number of results to return per page.
31
+ offset: 56 # Integer | Pad a number of results.
32
+ }
33
+
34
+ begin
35
+ # Gets the investments for a specific user.
36
+ result = api_instance.get_users_investments(email, opts)
37
+ p result
38
+ rescue DealMakerAPI::ApiError => e
39
+ puts "Error when calling UsersApi->get_users_investments: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the get_users_investments_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<V1EntitiesInvestors>, Integer, Hash)> get_users_investments_with_http_info(email, opts)
48
+
49
+ ```ruby
50
+ begin
51
+ # Gets the investments for a specific user.
52
+ data, status_code, headers = api_instance.get_users_investments_with_http_info(email, opts)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <V1EntitiesInvestors>
56
+ rescue DealMakerAPI::ApiError => e
57
+ puts "Error when calling UsersApi->get_users_investments_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **email** | **String** | The email of the user. | |
66
+ | **page** | **Integer** | Page offset to fetch. | [optional][default to 1] |
67
+ | **per_page** | **Integer** | Number of results to return per page. | [optional][default to 25] |
68
+ | **offset** | **Integer** | Pad a number of results. | [optional][default to 0] |
69
+
70
+ ### Return type
71
+
72
+ [**V1EntitiesInvestors**](V1EntitiesInvestors.md)
73
+
74
+ ### Authorization
75
+
76
+ No authorization required
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: Not defined
81
+ - **Accept**: application/json
82
+
@@ -0,0 +1,18 @@
1
+ # DealMakerAPI::V1EntitiesCountries
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**V1EntitiesCountry**](V1EntitiesCountry.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'DealMakerAPI'
13
+
14
+ instance = DealMakerAPI::V1EntitiesCountries.new(
15
+ items: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # DealMakerAPI::V1EntitiesCountry
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **country** | **String** | The name of the country. | [optional] |
8
+ | **country_code** | **String** | The country code. | [optional] |
9
+ | **states** | [**V1EntitiesState**](V1EntitiesState.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'DealMakerAPI'
15
+
16
+ instance = DealMakerAPI::V1EntitiesCountry.new(
17
+ country: null,
18
+ country_code: null,
19
+ states: null
20
+ )
21
+ ```
22
+
@@ -15,7 +15,7 @@
15
15
  | **owner** | [**V1EntitiesInvestorProfileOwner**](V1EntitiesInvestorProfileOwner.md) | | [optional] |
16
16
  | **corporation** | [**V1EntitiesInvestorProfileFieldsCorporation**](V1EntitiesInvestorProfileFieldsCorporation.md) | | [optional] |
17
17
  | **signing_officer** | [**V1EntitiesInvestorProfileFieldsSigningOfficer**](V1EntitiesInvestorProfileFieldsSigningOfficer.md) | | [optional] |
18
- | **beneficial_owners** | [**V1EntitiesInvestorProfileFieldsSigningOfficer**](V1EntitiesInvestorProfileFieldsSigningOfficer.md) | | [optional] |
18
+ | **beneficial_owners** | [**V1EntitiesInvestorProfileFieldsBeneficialOwner**](V1EntitiesInvestorProfileFieldsBeneficialOwner.md) | | [optional] |
19
19
 
20
20
  ## Example
21
21
 
@@ -0,0 +1,30 @@
1
+ # DealMakerAPI::V1EntitiesInvestorProfileFieldsBeneficialOwner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **first_name** | **String** | Investor profile first name | [optional] |
8
+ | **last_name** | **String** | Investor profile last name | [optional] |
9
+ | **suffix** | **String** | Investor profile suffix | [optional] |
10
+ | **date_of_birth** | **String** | The date of birth | [optional] |
11
+ | **taxpayer_id** | **String** | The taxpayer identification number | [optional] |
12
+ | **address** | [**V1EntitiesInvestorProfileAddress**](V1EntitiesInvestorProfileAddress.md) | | [optional] |
13
+ | **phone_number** | **String** | Beneficial owner phone number | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'DealMakerAPI'
19
+
20
+ instance = DealMakerAPI::V1EntitiesInvestorProfileFieldsBeneficialOwner.new(
21
+ first_name: null,
22
+ last_name: null,
23
+ suffix: null,
24
+ date_of_birth: null,
25
+ taxpayer_id: null,
26
+ address: null,
27
+ phone_number: null
28
+ )
29
+ ```
30
+
@@ -10,6 +10,7 @@
10
10
  | **date_of_birth** | **String** | The date of birth | [optional] |
11
11
  | **taxpayer_id** | **String** | The taxpayer identification number | [optional] |
12
12
  | **address** | [**V1EntitiesInvestorProfileAddress**](V1EntitiesInvestorProfileAddress.md) | | [optional] |
13
+ | **title** | **String** | Signing officer title | [optional] |
13
14
  | **phone_number** | **String** | Signing officer phone number | [optional] |
14
15
 
15
16
  ## Example
@@ -24,6 +25,7 @@ instance = DealMakerAPI::V1EntitiesInvestorProfileFieldsSigningOfficer.new(
24
25
  date_of_birth: null,
25
26
  taxpayer_id: null,
26
27
  address: null,
28
+ title: null,
27
29
  phone_number: null
28
30
  )
29
31
  ```
@@ -0,0 +1,20 @@
1
+ # DealMakerAPI::V1EntitiesState
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The name of the state. | [optional] |
8
+ | **code** | **String** | The state code. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'DealMakerAPI'
14
+
15
+ instance = DealMakerAPI::V1EntitiesState.new(
16
+ name: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DealMakerAPI
16
+ class CountryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns a list of all valid countries and it states
23
+ # Get countries and states
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [V1EntitiesCountries]
26
+ def get_country_states(opts = {})
27
+ data, _status_code, _headers = get_country_states_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Returns a list of all valid countries and it states
32
+ # Get countries and states
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(V1EntitiesCountries, Integer, Hash)>] V1EntitiesCountries data, response status code and response headers
35
+ def get_country_states_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CountryApi.get_country_states ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/country/states'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'V1EntitiesCountries'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || []
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"CountryApi.get_country_states",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: CountryApi#get_country_states\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,95 @@
1
+ =begin
2
+ #DealMaker API
3
+
4
+ ## Introduction Welcome to DealMaker’s Web API v1! This API is RESTful, easy to integrate with, and offers support in 2 different languages. This is the technical documentation for our API. There are tutorials and examples of integrations with our API available on our [knowledge centre](https://help.dealmaker.tech/training-centre) as well. # Libraries - Javascript - Ruby # Authentication To authenticate, add an Authorization header to your API request that contains an access token. Before you [generate an access token](#how-to-generate-an-access-token) your must first [create an application](#create-an-application) on your portal and retrieve the your client ID and secret ## Create an Application DealMaker’s Web API v1 supports the use of OAuth applications. Applications can be generated in your [account](https://app.dealmaker.tech/developer/applications). To create an API Application, click on your user name in the top right corner to open a dropdown menu, and select \"Integrations\". Under the API settings tab, click the `Create New Application` button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-1.png) Name your application and assign the level of permissions for this application ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-2.png) Once your application is created, save in a secure space your client ID and secret. **WARNING**: The secret key will not be visible after you click the close button ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-3.png) From the developer tab, you will be able to view and manage all the available applications ![Screenshot](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/api-application-4.png) Each Application consists of a client id, secret and set of scopes. The scopes define what resources you want to have access to. The client ID and secret are used to generate an access token. You will need to create an application to use API endpoints. ## How to generate an access token After creating an application, you must make a call to obtain a bearer token using the Generate an OAuth token operation. This operation requires the following parameters: `token endpoint` - https://app.dealmaker.tech/oauth/token `grant_type` - must be set to `client_credentials` `client_id` - the Client ID displayed when you created the OAuth application in the previous step `client_secret` - the Client Secret displayed when you created the OAuth application in the previous step `scope` - the scope is established when you created the OAuth application in the previous step Note: The Generate an OAuth token response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call Generate an OAuth token again to generate a new one. To use the access token, you must set a plain text header named `Authorization` with the contents of the header being “Bearer XXX” where XXX is your generated access token. ### Example #### Postman Here's an example on how to generate the access token with Postman, where `{{CLIENT_ID}}` and `{{CLIENT_SECRET}}` are the values generated after following the steps on [Create an Application](#create-an-application) ![Get access token postman example](https://s3.ca-central-1.amazonaws.com/docs.dealmaker.tech/images/token-postman.png) # Status Codes ## Content-Type Header All responses are returned in JSON format. We specify this by sending the Content-Type header. ## Status Codes Below is a table containing descriptions of the various status codes we currently support against various resources. Sometimes your API call will generate an error. Here you will find additional information about what to expect if you don’t format your request properly, or we fail to properly process your request. | Status Code | Description | | ----------- | ----------- | | `200` | Success | | `403` | Forbidden | | `404` | Not found | # Pagination Pagination is used to divide large responses is smaller portions (pages). By default, all endpoints return a maximum of 25 records per page. You can change the number of records on a per request basis by passing a `per_page` parameter in the request header parameters. The largest supported `per_page` parameter is 100. When the response exceeds the `per_page` parameter, you can paginate through the records by increasing the `offset` parameter. Example: `offset=25` will return 25 records starting from 26th record. You may also paginate using the `page` parameter to indicate the page number you would like to show on the response. Please review the table below for the input parameters ## Inputs | Parameter | Description | | ---------- | ------------------------------------------------------------------------------- | | `per_page` | Amount of records included on each page (Default is 25) | | `page` | Page number | | `offset` | Amount of records offset on the API request where 0 represents the first record | ## Response Headers | Response Header | Description | | --------------- | -------------------------------------------- | | `X-Total` | Total number of records of response | | `X-Total-Pages` | Total number of pages of response | | `X-Per-Page` | Total number of records per page of response | | `X-Page` | Number of current page | | `X-Next-Page` | Number of next page | | `X-Prev-Page` | Number of previous page | | `X-Offset` | Total number of records offset | # Search and Filtering (The q parameter) The q optional parameter accepts a string as input and allows you to filter the request based on that string. Please note that search strings must be encoded according to ASCII. For example, \"john+investor&#64;dealmaker.tech\" should be passed as “john%2Binvestor%40dealmaker.tech”. There are two main ways to filter with it. ## Keyword filtering Some keywords allow you to filter investors based on a specific “scope” of the investors, for example using the string “Invited” will filter all investors with the status invited, and the keyword “Has attachments” will filter investors with attachments. Here’s a list of possible keywords and the “scope” each one of the keywords filters by: | Keywords | Scope | Decoded Example | Encoded Example | | ---------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | Signed on \\(date range\\) | Investors who signed in the provided date range | Signed on (date range) [2020-07-01:2020-07-31] | `Signed%20on%20%28date%20range%29%20%5B2020-07-01%3A2020-07-31%5D` | | Enabled for countersignature on \\(date range\\) | Investors who were enabled for counter signature in the provided date range | Enabled for countersignature on (date range) [2022-05-24:2022-05-25] | `Enabled%20for%20countersignature%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Accepted on \\(date range\\) | Investors accepted in the provided date rage | Accepted on (date range) [2022-05-24:2022-05-25] | `Accepted%20on%20(date%20range)%20%5B2022-05-24%3A2022-05-25%5D` | | Offline | Investors added to the deal offline | Offline | `Offline` | | Online | Investors added to the deal online | Online | `Online` | | Signed | Investors who signed their agreement | Signed | `Signed` | | Waiting for countersignature | Investors who have signed and are waiting for counter signature | Waiting for countersignature | `Waiting%20for%20countersignature` | | Invited | Investors on the Invited Status | Invited | `Invited` | | Accepted | Investors in the Accepted Status | Accepted | `Accepted` | | Questionnaire in progress | All Investors who have not finished completing the questionnaire | Questionnaire in progress | `Questionnaire%20in%20progress` | | Has attachments | All Investors with attachments | Has attachments | `Has%20attachments` | | Has notes | All Investors with notes | Has notes | `Has%20notes` | | Waiting for co-signature | Investors who have signed and are waiting for co-signature | Waiting for co-signature | `Waiting%20for%20co-signature` | | Background Check Approved | Investors with approved background check | Background Check Approved | `Background%20Check%20Approved` | | Document Review Pending | Investors with pending review | Document Review Pending | `Document%20Review%20Pending` | | Document Upload Pending | Investors with pending documents to upload | Document Upload Pending | `Document%20Upload%20Pending` | | Required adjudicator review | Investors who are required to be review by the adjudicator | Required adjudicator review | `Required%20adjudicator%20review` | --- **NOTE** Filtering keywords are case sensitive and need to be encoded --- ## Search String Any value for the parameter which does not match one of the keywords listed above, will use fields like `first name`, `last name`, `email`, `tags` to search for the investor. For example, if you search “Robert”, because this does not match one of the keywords listed above, it will then return any investors who have the string “Robert” in their name, email, or tags fields. # Versioning The latest version is v1. The version can be updated on the `Accept` header, just set the version as stated on the following example: ``` Accept:application/vnd.dealmaker-v1+json ``` | Version | Accept Header | | ------- | ----------------------------------- | | `v1` | application/vnd.dealmaker-`v1`+json | # SDK’s For instruction on installing SDKs, please view the following links - [Javascript](https://github.com/DealMakerTech/api/tree/main/v1/clients/javascript) - [Ruby](https://github.com/DealMakerTech/api/tree/main/v1/clients/ruby) # Webhooks Our webhooks functionality allows clients to automatically receive updates on a deal's investor data. Some of the data that the webhooks include: - Investor Name - Date created - Email - Phone - Allocation - Attachments - Accredited investor status - Accredited investor category - State (Draft, Invited, Signed, Accepted, Waiting, Inactive) Via webhooks clients can subscribe to the following events as they happen on Dealmaker: - Investor is created - Investor details are updated (any of the investor details above change or are updated) - Investor has signed their agreement - Invertor fully funded their investment - Investor has been accepted - Investor is deleted A URL supplied by the client will receive all the events with the information as part of the payload. Clients are able to add and update the URL within DealMaker. ## Configuration For a comprehensive guide on how to configure Webhooks please visit our support article: [Configuring Webhooks on DealMaker – DealMaker Support](https://help.dealmaker.tech/configuring-webhooks-on-dealmaker). As a developer user on DealMaker, you are able to configure webhooks by following the steps below: 1. Sign into Dealmaker 2. Go to **“Your profile”** in the top right corner 3. Access an **“Integrations”** configuration via the left menu 4. The developer configures webhooks by including: - The HTTPS URL where the request will be sent - Optionally, a security token that we would use to build a SHA1 hash that would be included in the request headers. The name of the header is `X-DealMaker-Signature`. If the secret is not specified, the hash won’t be included in the headers. - The Deal(s) to include in the webhook subscription - An email address that will be used to notify about errors. 5. The developers can disable webhooks temporarily if needed ## Specification ### Events The initial set of events will be related to the investor. The events are: 1. `investor.created` - Triggers every time a new investor is added to a deal 2. `investor.updated` - Triggers on updates to any of the following fields: - Status - Name - Email - (this is a user field so we trigger event for all investors with webhook subscription) - Allocated Amount - Investment Amount - Accredited investor fields - Adding or removing attachments - Tags - When the investor status is signed, the payload also includes a link to the signed document; the link expires after 30 minutes 3. `investor.signed` - Triggers when the investor signs their subscription agreement (terms and conditions) - When this happens the investor.state becomes `signed` - This event includes the same fields as the `investor.updated` event 4. `investor.funded` - Triggers when the investor becomes fully funded - This happens when the investor.funded_state becomes `funded` - This event includes the same fields as the `investor.updated` event 5. `investor.accepted` - Triggers when the investor is countersigned - When this happens the investor.state becomes `accepted` - This event includes the same fields as the `investor.updated` event 6. `investor.deleted` - Triggers when the investor is removed from the deal - The investor key of the payload only includes investor ID - The deal is not included in the payload. Due to our implementation it’s impossible to retrieve the deal the investor was part of ### Requests - The request is a `POST` - The payload’s `content-type` is `application/json` - Only `2XX` responses are considered successful. In the event of a different response, we consider it failed and queue the event for retry - We retry the request five times, after the initial attempt. Doubling the waiting time between intervals with each try. The first retry happens after 30 seconds, then 60 seconds, 2 mins, 4 minutes, and 8 minutes. This timing scheme gives the receiver about 1 hour if all the requests fail - If an event fails all the attempts to be delivered, we send an email to the address that the user configured ### Payload #### Common Properties There will be some properties that are common to all the events on the system. | Key | Type | Description | | ----------------- | ------ | -------------------------------------------------------------------------------------- | | event | String | The event that triggered the call | | event_id | String | A unique identifier for the event | | deal<sup>\\*</sup> | Object | The deal in which the event occurred. please see below for an example on the deal object<sup>\\*\\*</sup> | <sup>\\*</sup>This field is not included when deleting a resource <sup>\\*\\*</sup> Sample Deal Object in the webhook payload ```json \"deal\": { \"id\": 0, \"title\": \"string\", \"created_at\": \"2022-12-06T18:14:44.000Z\", \"updated_at\": \"2022-12-08T12:46:48.000Z\", \"state\": \"string\", \"currency\": \"string\", \"security_type\": \"string\", \"price_per_security\": 0.00, \"deal_type\": \"string\", \"minimum_investment\": 0, \"maximum_investment\": 0, \"issuer\": { \"id\": 0, \"name\": \"string\" }, \"enterprise\": { \"id\": 0, \"name\": \"string\" } } ``` #### Common Properties (investor scope) By design, we have incorporated on the webhooks payload the same investor-related fields included in the Investor model, for reference on the included fields, their types and values please click [here](https://docs.dealmaker.tech/#tag/investor_model). This will allow you to get all the necessary information you need about a particular investor without having to call the Get Investor by ID endpoint. | #### Investor State Here is a brief description of each investor state: - **Draft:** the investor is added to the platform but hasn't been invited yet and cannot access the portal - **Invited:** the investor was added to the platform but hasn’t completed the questionnaire - **Signed:** the investor signed the document (needs approval from Lawyer or Reviewer before countersignature) - **Waiting:** the investor was approved for countersignature by any of the Lawyers or Reviewers in the deal - **Accepted:** the investor's agreement was countersigned by the Signatory - **Inactive** the investor is no longer eligible to participate in the offering. This may be because their warrant expired, they requested a refund, or they opted out of the offering #### Update Delay Given the high number of updates our platform performs on any investor, we’ve added a cool down period on update events that allows us to “group” updates and trigger only one every minute. In consequence, update events will be delivered 1 minute after the initial request was made and will include the latest version of the investor data at delivery time.
5
+
6
+ The version of the OpenAPI document: 1.75.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DealMakerAPI
16
+ class UsersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Gets the investments for a specific user.
23
+ # Get Investments
24
+ # @param email [String] The email of the user.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page Page offset to fetch. (default to 1)
27
+ # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
28
+ # @option opts [Integer] :offset Pad a number of results. (default to 0)
29
+ # @return [V1EntitiesInvestors]
30
+ def get_users_investments(email, opts = {})
31
+ data, _status_code, _headers = get_users_investments_with_http_info(email, opts)
32
+ data
33
+ end
34
+
35
+ # Gets the investments for a specific user.
36
+ # Get Investments
37
+ # @param email [String] The email of the user.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Integer] :page Page offset to fetch. (default to 1)
40
+ # @option opts [Integer] :per_page Number of results to return per page. (default to 25)
41
+ # @option opts [Integer] :offset Pad a number of results. (default to 0)
42
+ # @return [Array<(V1EntitiesInvestors, Integer, Hash)>] V1EntitiesInvestors data, response status code and response headers
43
+ def get_users_investments_with_http_info(email, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: UsersApi.get_users_investments ...'
46
+ end
47
+ # verify the required parameter 'email' is set
48
+ if @api_client.config.client_side_validation && email.nil?
49
+ fail ArgumentError, "Missing the required parameter 'email' when calling UsersApi.get_users_investments"
50
+ end
51
+ # resource path
52
+ local_var_path = '/users/investments'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'email'] = email
57
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
58
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
59
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+
66
+ # form parameters
67
+ form_params = opts[:form_params] || {}
68
+
69
+ # http body (model)
70
+ post_body = opts[:debug_body]
71
+
72
+ # return_type
73
+ return_type = opts[:debug_return_type] || 'V1EntitiesInvestors'
74
+
75
+ # auth_names
76
+ auth_names = opts[:debug_auth_names] || []
77
+
78
+ new_options = opts.merge(
79
+ :operation => :"UsersApi.get_users_investments",
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => return_type
86
+ )
87
+
88
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug "API called: UsersApi#get_users_investments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
91
+ end
92
+ return data, status_code, headers
93
+ end
94
+ end
95
+ end