DealMakerAPI 0.0.1

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 +7 -0
  2. data/DealMakerAPI.gemspec +38 -0
  3. data/Gemfile +9 -0
  4. data/README.md +371 -0
  5. data/Rakefile +10 -0
  6. data/docs/DealApi.md +289 -0
  7. data/docs/V1EntitiesAttachment.md +22 -0
  8. data/docs/V1EntitiesBackgroundCheckSearch.md +18 -0
  9. data/docs/V1EntitiesDeal.md +20 -0
  10. data/docs/V1EntitiesInvestor.md +58 -0
  11. data/docs/V1EntitiesInvestors.md +18 -0
  12. data/docs/V1EntitiesSubscriptionAgreement.md +20 -0
  13. data/git_push.sh +57 -0
  14. data/lib/DealMakerAPI/api/deal_api.rb +299 -0
  15. data/lib/DealMakerAPI/api_client.rb +389 -0
  16. data/lib/DealMakerAPI/api_error.rb +57 -0
  17. data/lib/DealMakerAPI/configuration.rb +271 -0
  18. data/lib/DealMakerAPI/models/v1_entities_attachment.rb +239 -0
  19. data/lib/DealMakerAPI/models/v1_entities_background_check_search.rb +219 -0
  20. data/lib/DealMakerAPI/models/v1_entities_deal.rb +230 -0
  21. data/lib/DealMakerAPI/models/v1_entities_investor.rb +487 -0
  22. data/lib/DealMakerAPI/models/v1_entities_investors.rb +219 -0
  23. data/lib/DealMakerAPI/models/v1_entities_subscription_agreement.rb +229 -0
  24. data/lib/DealMakerAPI/version.rb +15 -0
  25. data/lib/DealMakerAPI.rb +46 -0
  26. data/spec/api/deal_api_spec.rb +89 -0
  27. data/spec/api_client_spec.rb +226 -0
  28. data/spec/configuration_spec.rb +42 -0
  29. data/spec/models/v1_entities_attachment_spec.rb +46 -0
  30. data/spec/models/v1_entities_background_check_search_spec.rb +34 -0
  31. data/spec/models/v1_entities_deal_spec.rb +40 -0
  32. data/spec/models/v1_entities_investor_spec.rb +170 -0
  33. data/spec/models/v1_entities_investors_spec.rb +34 -0
  34. data/spec/models/v1_entities_subscription_agreement_spec.rb +40 -0
  35. data/spec/spec_helper.rb +111 -0
  36. metadata +127 -0
data/docs/DealApi.md ADDED
@@ -0,0 +1,289 @@
1
+ # DealMakerAPI::DealApi
2
+
3
+ All URIs are relative to *http://api.dealmaker.tech*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_investor**](DealApi.md#create_investor) | **POST** /deals/{id}/investors | Create a deal investor |
8
+ | [**get_deal**](DealApi.md#get_deal) | **GET** /deals/{id} | Get a deal by id |
9
+ | [**get_investor**](DealApi.md#get_investor) | **GET** /deals/{id}/investors/{investor_id} | Get a deal investor by id |
10
+ | [**list_investors**](DealApi.md#list_investors) | **GET** /deals/{id}/investors | List deal investors |
11
+
12
+
13
+ ## create_investor
14
+
15
+ > <V1EntitiesInvestor> create_investor(id, unknown_base_type)
16
+
17
+ Create a deal investor
18
+
19
+ Create a single deal investor.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'DealMakerAPI'
26
+ # setup authorization
27
+ DealMakerAPI.configure do |config|end
28
+
29
+ api_instance = DealMakerAPI::DealApi.new
30
+ id = 56 # Integer | The deal id.
31
+ unknown_base_type = TODO # UNKNOWN_BASE_TYPE |
32
+
33
+ begin
34
+ # Create a deal investor
35
+ result = api_instance.create_investor(id, unknown_base_type)
36
+ p result
37
+ rescue DealMakerAPI::ApiError => e
38
+ puts "Error when calling DealApi->create_investor: #{e}"
39
+ end
40
+ ```
41
+
42
+ #### Using the create_investor_with_http_info variant
43
+
44
+ This returns an Array which contains the response data, status code and headers.
45
+
46
+ > <Array(<V1EntitiesInvestor>, Integer, Hash)> create_investor_with_http_info(id, unknown_base_type)
47
+
48
+ ```ruby
49
+ begin
50
+ # Create a deal investor
51
+ data, status_code, headers = api_instance.create_investor_with_http_info(id, unknown_base_type)
52
+ p status_code # => 2xx
53
+ p headers # => { ... }
54
+ p data # => <V1EntitiesInvestor>
55
+ rescue DealMakerAPI::ApiError => e
56
+ puts "Error when calling DealApi->create_investor_with_http_info: #{e}"
57
+ end
58
+ ```
59
+
60
+ ### Parameters
61
+
62
+ | Name | Type | Description | Notes |
63
+ | ---- | ---- | ----------- | ----- |
64
+ | **id** | **Integer** | The deal id. | |
65
+ | **unknown_base_type** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md) | | |
66
+
67
+ ### Return type
68
+
69
+ [**V1EntitiesInvestor**](V1EntitiesInvestor.md)
70
+
71
+ ### Authorization
72
+
73
+ No authorization required
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: application/json
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## get_deal
82
+
83
+ > <V1EntitiesDeal> get_deal(id)
84
+
85
+ Get a deal by id
86
+
87
+ Get a deal
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'DealMakerAPI'
94
+ # setup authorization
95
+ DealMakerAPI.configure do |config|end
96
+
97
+ api_instance = DealMakerAPI::DealApi.new
98
+ id = 56 # Integer | The deal id.
99
+
100
+ begin
101
+ # Get a deal by id
102
+ result = api_instance.get_deal(id)
103
+ p result
104
+ rescue DealMakerAPI::ApiError => e
105
+ puts "Error when calling DealApi->get_deal: #{e}"
106
+ end
107
+ ```
108
+
109
+ #### Using the get_deal_with_http_info variant
110
+
111
+ This returns an Array which contains the response data, status code and headers.
112
+
113
+ > <Array(<V1EntitiesDeal>, Integer, Hash)> get_deal_with_http_info(id)
114
+
115
+ ```ruby
116
+ begin
117
+ # Get a deal by id
118
+ data, status_code, headers = api_instance.get_deal_with_http_info(id)
119
+ p status_code # => 2xx
120
+ p headers # => { ... }
121
+ p data # => <V1EntitiesDeal>
122
+ rescue DealMakerAPI::ApiError => e
123
+ puts "Error when calling DealApi->get_deal_with_http_info: #{e}"
124
+ end
125
+ ```
126
+
127
+ ### Parameters
128
+
129
+ | Name | Type | Description | Notes |
130
+ | ---- | ---- | ----------- | ----- |
131
+ | **id** | **Integer** | The deal id. | |
132
+
133
+ ### Return type
134
+
135
+ [**V1EntitiesDeal**](V1EntitiesDeal.md)
136
+
137
+ ### Authorization
138
+
139
+ No authorization required
140
+
141
+ ### HTTP request headers
142
+
143
+ - **Content-Type**: Not defined
144
+ - **Accept**: application/json
145
+
146
+
147
+ ## get_investor
148
+
149
+ > <V1EntitiesInvestor> get_investor(id, investor_id)
150
+
151
+ Get a deal investor by id
152
+
153
+ Gets a single investor by the id.
154
+
155
+ ### Examples
156
+
157
+ ```ruby
158
+ require 'time'
159
+ require 'DealMakerAPI'
160
+ # setup authorization
161
+ DealMakerAPI.configure do |config|end
162
+
163
+ api_instance = DealMakerAPI::DealApi.new
164
+ id = 56 # Integer | The deal id.
165
+ investor_id = 56 # Integer | The investor id.
166
+
167
+ begin
168
+ # Get a deal investor by id
169
+ result = api_instance.get_investor(id, investor_id)
170
+ p result
171
+ rescue DealMakerAPI::ApiError => e
172
+ puts "Error when calling DealApi->get_investor: #{e}"
173
+ end
174
+ ```
175
+
176
+ #### Using the get_investor_with_http_info variant
177
+
178
+ This returns an Array which contains the response data, status code and headers.
179
+
180
+ > <Array(<V1EntitiesInvestor>, Integer, Hash)> get_investor_with_http_info(id, investor_id)
181
+
182
+ ```ruby
183
+ begin
184
+ # Get a deal investor by id
185
+ data, status_code, headers = api_instance.get_investor_with_http_info(id, investor_id)
186
+ p status_code # => 2xx
187
+ p headers # => { ... }
188
+ p data # => <V1EntitiesInvestor>
189
+ rescue DealMakerAPI::ApiError => e
190
+ puts "Error when calling DealApi->get_investor_with_http_info: #{e}"
191
+ end
192
+ ```
193
+
194
+ ### Parameters
195
+
196
+ | Name | Type | Description | Notes |
197
+ | ---- | ---- | ----------- | ----- |
198
+ | **id** | **Integer** | The deal id. | |
199
+ | **investor_id** | **Integer** | The investor id. | |
200
+
201
+ ### Return type
202
+
203
+ [**V1EntitiesInvestor**](V1EntitiesInvestor.md)
204
+
205
+ ### Authorization
206
+
207
+ No authorization required
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: Not defined
212
+ - **Accept**: application/json
213
+
214
+
215
+ ## list_investors
216
+
217
+ > <V1EntitiesInvestors> list_investors(id, opts)
218
+
219
+ List deal investors
220
+
221
+ List deal investors according to the specified search criteria.
222
+
223
+ ### Examples
224
+
225
+ ```ruby
226
+ require 'time'
227
+ require 'DealMakerAPI'
228
+ # setup authorization
229
+ DealMakerAPI.configure do |config|end
230
+
231
+ api_instance = DealMakerAPI::DealApi.new
232
+ id = 56 # Integer | The deal id.
233
+ opts = {
234
+ page: 56, # Integer | Page offset to fetch.
235
+ per_page: 56, # Integer | Number of results to return per page.
236
+ offset: 56, # Integer | Pad a number of results.
237
+ investor_ids: [37] # Array<Integer> | An array of investor ids.
238
+ }
239
+
240
+ begin
241
+ # List deal investors
242
+ result = api_instance.list_investors(id, opts)
243
+ p result
244
+ rescue DealMakerAPI::ApiError => e
245
+ puts "Error when calling DealApi->list_investors: #{e}"
246
+ end
247
+ ```
248
+
249
+ #### Using the list_investors_with_http_info variant
250
+
251
+ This returns an Array which contains the response data, status code and headers.
252
+
253
+ > <Array(<V1EntitiesInvestors>, Integer, Hash)> list_investors_with_http_info(id, opts)
254
+
255
+ ```ruby
256
+ begin
257
+ # List deal investors
258
+ data, status_code, headers = api_instance.list_investors_with_http_info(id, opts)
259
+ p status_code # => 2xx
260
+ p headers # => { ... }
261
+ p data # => <V1EntitiesInvestors>
262
+ rescue DealMakerAPI::ApiError => e
263
+ puts "Error when calling DealApi->list_investors_with_http_info: #{e}"
264
+ end
265
+ ```
266
+
267
+ ### Parameters
268
+
269
+ | Name | Type | Description | Notes |
270
+ | ---- | ---- | ----------- | ----- |
271
+ | **id** | **Integer** | The deal id. | |
272
+ | **page** | **Integer** | Page offset to fetch. | [optional][default to 1] |
273
+ | **per_page** | **Integer** | Number of results to return per page. | [optional][default to 25] |
274
+ | **offset** | **Integer** | Pad a number of results. | [optional][default to 0] |
275
+ | **investor_ids** | [**Array&lt;Integer&gt;**](Integer.md) | An array of investor ids. | [optional] |
276
+
277
+ ### Return type
278
+
279
+ [**V1EntitiesInvestors**](V1EntitiesInvestors.md)
280
+
281
+ ### Authorization
282
+
283
+ No authorization required
284
+
285
+ ### HTTP request headers
286
+
287
+ - **Content-Type**: Not defined
288
+ - **Accept**: application/json
289
+
@@ -0,0 +1,22 @@
1
+ # DealMakerAPI::V1EntitiesAttachment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The attachment id. | [optional] |
8
+ | **url** | **String** | The attachment url. | [optional] |
9
+ | **file_name** | **String** | The attachment filename. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'DealMakerAPI'
15
+
16
+ instance = DealMakerAPI::V1EntitiesAttachment.new(
17
+ id: null,
18
+ url: null,
19
+ file_name: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # DealMakerAPI::V1EntitiesBackgroundCheckSearch
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The background check search id. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'DealMakerAPI'
13
+
14
+ instance = DealMakerAPI::V1EntitiesBackgroundCheckSearch.new(
15
+ id: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # DealMakerAPI::V1EntitiesDeal
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | Deal id. | [optional] |
8
+ | **title** | **String** | Deal title. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'DealMakerAPI'
14
+
15
+ instance = DealMakerAPI::V1EntitiesDeal.new(
16
+ id: null,
17
+ title: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,58 @@
1
+ # DealMakerAPI::V1EntitiesInvestor
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | Investor id. | [optional] |
8
+ | **created_at** | **Time** | The creation time. | [optional] |
9
+ | **updated_at** | **Time** | The last update time. | [optional] |
10
+ | **name** | **String** | The full name of the investor. | [optional] |
11
+ | **allocation_unit** | **String** | The allocation unit. | [optional] |
12
+ | **state** | **String** | The state. | [optional] |
13
+ | **funds_state** | **String** | The funding state. | [optional] |
14
+ | **funds_pending** | **Boolean** | True if any funds are pending; false otherwise. | [optional] |
15
+ | **beneficial_address** | **String** | The address. | [optional] |
16
+ | **investor_currency** | **String** | The investor currency. | [optional] |
17
+ | **investment_value** | **Float** | The current investment value. | [optional] |
18
+ | **number_of_securities** | **Integer** | The number of securities. | [optional] |
19
+ | **allocated_amount** | **Float** | The amount allocated. | [optional] |
20
+ | **funds_value** | **Float** | The current amount that has been funded. | [optional] |
21
+ | **access_link** | **String** | The access link for the investor. | [optional] |
22
+ | **subscription_agreement** | [**V1EntitiesSubscriptionAgreement**](V1EntitiesSubscriptionAgreement.md) | | [optional] |
23
+ | **attachments** | [**V1EntitiesAttachment**](V1EntitiesAttachment.md) | | [optional] |
24
+ | **background_check_searches** | [**V1EntitiesBackgroundCheckSearch**](V1EntitiesBackgroundCheckSearch.md) | | [optional] |
25
+ | **verification_status** | **String** | The current 506c verification state. | [optional] |
26
+ | **warrant_expiry_date** | **Date** | The warrant expiry date. | [optional] |
27
+ | **warrant_certificate_number** | **Integer** | The warrant certificate number. | [optional] |
28
+
29
+ ## Example
30
+
31
+ ```ruby
32
+ require 'DealMakerAPI'
33
+
34
+ instance = DealMakerAPI::V1EntitiesInvestor.new(
35
+ id: null,
36
+ created_at: null,
37
+ updated_at: null,
38
+ name: null,
39
+ allocation_unit: null,
40
+ state: null,
41
+ funds_state: null,
42
+ funds_pending: null,
43
+ beneficial_address: null,
44
+ investor_currency: null,
45
+ investment_value: null,
46
+ number_of_securities: null,
47
+ allocated_amount: null,
48
+ funds_value: null,
49
+ access_link: null,
50
+ subscription_agreement: null,
51
+ attachments: null,
52
+ background_check_searches: null,
53
+ verification_status: null,
54
+ warrant_expiry_date: null,
55
+ warrant_certificate_number: null
56
+ )
57
+ ```
58
+
@@ -0,0 +1,18 @@
1
+ # DealMakerAPI::V1EntitiesInvestors
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | [**V1EntitiesInvestor**](V1EntitiesInvestor.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'DealMakerAPI'
13
+
14
+ instance = DealMakerAPI::V1EntitiesInvestors.new(
15
+ items: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # DealMakerAPI::V1EntitiesSubscriptionAgreement
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The subscription agreement id. | [optional] |
8
+ | **url** | **String** | The subscription agreement url. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'DealMakerAPI'
14
+
15
+ instance = DealMakerAPI::V1EntitiesSubscriptionAgreement.new(
16
+ id: null,
17
+ url: null
18
+ )
19
+ ```
20
+
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'