DealMakerAPI 0.93.2 → 0.93.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/IncentivePlanApi.md +142 -0
- data/docs/PatchDealIncentivePlanRequest.md +28 -0
- data/docs/PostDealIncentivePlanRequest.md +24 -0
- data/lib/DealMakerAPI/api/incentive_plan_api.rb +150 -0
- data/lib/DealMakerAPI/models/patch_deal_incentive_plan_request.rb +273 -0
- data/{spec/api_client_spec.rb → lib/DealMakerAPI/models/post_deal_incentive_plan_request.rb} +219 -175
- data/lib/DealMakerAPI/version.rb +1 -1
- data/lib/DealMakerAPI.rb +2 -0
- data/spec/api/incentive_plan_api_spec.rb +27 -0
- data/spec/models/patch_deal_incentive_plan_request_spec.rb +66 -0
- data/spec/{configuration_spec.rb → models/post_deal_incentive_plan_request_spec.rb} +33 -21
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3102bc8d161a1ffd6af4e4306711cdb3139a25edef2059e6a2ca736ce57ddcc3
|
4
|
+
data.tar.gz: c7df9d8579434c004ca34b791b49b3d2730554544ba093a148f1fb495f3767b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfb66cccd3b99792b1a0120977fd78158623208b532c23ab7ea890d4720c62adb20af7fb07c548b66d6121fe3eb9661682fe5b1984f8766cf8eae3693d79772f
|
7
|
+
data.tar.gz: 2708eecb6c2bd0cc59e794d8903969de7af77b827a08ae2d5df46256437cbdba5dc0faca0ba242f68ac7134a05f832e5de8e7e461fef4c677e300460bd689a85
|
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.93.
|
341
|
+
- Package version: 0.93.3
|
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.93.
|
357
|
+
gem install ./DealMakerAPI-0.93.3.gem
|
358
358
|
```
|
359
359
|
|
360
|
-
(for development, run `gem install --dev ./DealMakerAPI-0.93.
|
360
|
+
(for development, run `gem install --dev ./DealMakerAPI-0.93.3.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.93.
|
366
|
+
gem 'DealMakerAPI', '~> 0.93.3'
|
367
367
|
|
368
368
|
### Install from Git
|
369
369
|
|
@@ -443,6 +443,8 @@ Class | Method | HTTP request | Description
|
|
443
443
|
*DealMakerAPI::DefaultApi* | [**post_webhooks**](docs/DefaultApi.md#post_webhooks) | **POST** /webhooks | Creates a webhook subscription which is associated to the user
|
444
444
|
*DealMakerAPI::DefaultApi* | [**put_webhooks_id**](docs/DefaultApi.md#put_webhooks_id) | **PUT** /webhooks/{id} | Updates webhook subscription and webhooks subcription deals
|
445
445
|
*DealMakerAPI::IncentivePlanApi* | [**get_deal_incentive_plans_time**](docs/IncentivePlanApi.md#get_deal_incentive_plans_time) | **GET** /deals/{id}/incentive_plans/time | Get incentive plans by deal id
|
446
|
+
*DealMakerAPI::IncentivePlanApi* | [**patch_deal_incentive_plan**](docs/IncentivePlanApi.md#patch_deal_incentive_plan) | **PATCH** /deals/{id}/incentive_plans/{incentive_plan_id} | Updates incentive plan by deal id
|
447
|
+
*DealMakerAPI::IncentivePlanApi* | [**post_deal_incentive_plan**](docs/IncentivePlanApi.md#post_deal_incentive_plan) | **POST** /deals/{id}/incentive_plans | Creates incentive plan by deal id
|
446
448
|
*DealMakerAPI::InvestorApi* | [**add506c_document**](docs/InvestorApi.md#add506c_document) | **POST** /deals/{id}/investors/{investor_id}/add_506c_document | Add 506c document for deal investor
|
447
449
|
*DealMakerAPI::InvestorApi* | [**add_document**](docs/InvestorApi.md#add_document) | **POST** /deals/{id}/investors/{investor_id}/add_document | Add document for deal investor
|
448
450
|
*DealMakerAPI::InvestorApi* | [**bulk_upload_investors**](docs/InvestorApi.md#bulk_upload_investors) | **POST** /deals/{id}/investors/bulk_upload | Bulk upload investors for deal investor
|
@@ -490,6 +492,7 @@ Class | Method | HTTP request | Description
|
|
490
492
|
- [DealMakerAPI::CreateShareholderActionRequest](docs/CreateShareholderActionRequest.md)
|
491
493
|
- [DealMakerAPI::EditInvestorTagsRequest](docs/EditInvestorTagsRequest.md)
|
492
494
|
- [DealMakerAPI::GenerateUrlRequest](docs/GenerateUrlRequest.md)
|
495
|
+
- [DealMakerAPI::PatchDealIncentivePlanRequest](docs/PatchDealIncentivePlanRequest.md)
|
493
496
|
- [DealMakerAPI::PatchInvestorProfilesCorporations](docs/PatchInvestorProfilesCorporations.md)
|
494
497
|
- [DealMakerAPI::PatchInvestorProfilesCorporationsBeneficialOwnersInner](docs/PatchInvestorProfilesCorporationsBeneficialOwnersInner.md)
|
495
498
|
- [DealMakerAPI::PatchInvestorProfilesIndividuals](docs/PatchInvestorProfilesIndividuals.md)
|
@@ -497,6 +500,7 @@ Class | Method | HTTP request | Description
|
|
497
500
|
- [DealMakerAPI::PatchInvestorProfilesTrusts](docs/PatchInvestorProfilesTrusts.md)
|
498
501
|
- [DealMakerAPI::PatchInvestorProfilesTrustsTrusteesInner](docs/PatchInvestorProfilesTrustsTrusteesInner.md)
|
499
502
|
- [DealMakerAPI::PatchInvestorRequest](docs/PatchInvestorRequest.md)
|
503
|
+
- [DealMakerAPI::PostDealIncentivePlanRequest](docs/PostDealIncentivePlanRequest.md)
|
500
504
|
- [DealMakerAPI::PostDealsIdInvestors](docs/PostDealsIdInvestors.md)
|
501
505
|
- [DealMakerAPI::PostInvestorProfilesCorporations](docs/PostInvestorProfilesCorporations.md)
|
502
506
|
- [DealMakerAPI::PostInvestorProfilesCorporationsBeneficialOwnersInner](docs/PostInvestorProfilesCorporationsBeneficialOwnersInner.md)
|
data/docs/IncentivePlanApi.md
CHANGED
@@ -5,6 +5,8 @@ All URIs are relative to *http://api.dealmaker.tech*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**get_deal_incentive_plans_time**](IncentivePlanApi.md#get_deal_incentive_plans_time) | **GET** /deals/{id}/incentive_plans/time | Get incentive plans by deal id |
|
8
|
+
| [**patch_deal_incentive_plan**](IncentivePlanApi.md#patch_deal_incentive_plan) | **PATCH** /deals/{id}/incentive_plans/{incentive_plan_id} | Updates incentive plan by deal id |
|
9
|
+
| [**post_deal_incentive_plan**](IncentivePlanApi.md#post_deal_incentive_plan) | **POST** /deals/{id}/incentive_plans | Creates incentive plan by deal id |
|
8
10
|
|
9
11
|
|
10
12
|
## get_deal_incentive_plans_time
|
@@ -80,3 +82,143 @@ No authorization required
|
|
80
82
|
- **Content-Type**: Not defined
|
81
83
|
- **Accept**: application/json
|
82
84
|
|
85
|
+
|
86
|
+
## patch_deal_incentive_plan
|
87
|
+
|
88
|
+
> <V1EntitiesDealsPriceDetails> patch_deal_incentive_plan(id, incentive_plan_id, opts)
|
89
|
+
|
90
|
+
Updates incentive plan by deal id
|
91
|
+
|
92
|
+
Updates an incentive plan for the given deal id with respectve tiers.
|
93
|
+
|
94
|
+
### Examples
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
require 'time'
|
98
|
+
require 'DealMakerAPI'
|
99
|
+
# setup authorization
|
100
|
+
DealMakerAPI.configure do |config|end
|
101
|
+
|
102
|
+
api_instance = DealMakerAPI::IncentivePlanApi.new
|
103
|
+
id = 56 # Integer | The deal id.
|
104
|
+
incentive_plan_id = 56 # Integer | The deal id.
|
105
|
+
opts = {
|
106
|
+
patch_deal_incentive_plan_request: DealMakerAPI::PatchDealIncentivePlanRequest.new # PatchDealIncentivePlanRequest |
|
107
|
+
}
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Updates incentive plan by deal id
|
111
|
+
result = api_instance.patch_deal_incentive_plan(id, incentive_plan_id, opts)
|
112
|
+
p result
|
113
|
+
rescue DealMakerAPI::ApiError => e
|
114
|
+
puts "Error when calling IncentivePlanApi->patch_deal_incentive_plan: #{e}"
|
115
|
+
end
|
116
|
+
```
|
117
|
+
|
118
|
+
#### Using the patch_deal_incentive_plan_with_http_info variant
|
119
|
+
|
120
|
+
This returns an Array which contains the response data, status code and headers.
|
121
|
+
|
122
|
+
> <Array(<V1EntitiesDealsPriceDetails>, Integer, Hash)> patch_deal_incentive_plan_with_http_info(id, incentive_plan_id, opts)
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
begin
|
126
|
+
# Updates incentive plan by deal id
|
127
|
+
data, status_code, headers = api_instance.patch_deal_incentive_plan_with_http_info(id, incentive_plan_id, opts)
|
128
|
+
p status_code # => 2xx
|
129
|
+
p headers # => { ... }
|
130
|
+
p data # => <V1EntitiesDealsPriceDetails>
|
131
|
+
rescue DealMakerAPI::ApiError => e
|
132
|
+
puts "Error when calling IncentivePlanApi->patch_deal_incentive_plan_with_http_info: #{e}"
|
133
|
+
end
|
134
|
+
```
|
135
|
+
|
136
|
+
### Parameters
|
137
|
+
|
138
|
+
| Name | Type | Description | Notes |
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
140
|
+
| **id** | **Integer** | The deal id. | |
|
141
|
+
| **incentive_plan_id** | **Integer** | The deal id. | |
|
142
|
+
| **patch_deal_incentive_plan_request** | [**PatchDealIncentivePlanRequest**](PatchDealIncentivePlanRequest.md) | | [optional] |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
[**V1EntitiesDealsPriceDetails**](V1EntitiesDealsPriceDetails.md)
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
No authorization required
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: application/json
|
155
|
+
- **Accept**: application/json
|
156
|
+
|
157
|
+
|
158
|
+
## post_deal_incentive_plan
|
159
|
+
|
160
|
+
> <V1EntitiesDealsPriceDetails> post_deal_incentive_plan(id, post_deal_incentive_plan_request)
|
161
|
+
|
162
|
+
Creates incentive plan by deal id
|
163
|
+
|
164
|
+
Creates an incentive plan for the given deal id with respectve tiers.
|
165
|
+
|
166
|
+
### Examples
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
require 'time'
|
170
|
+
require 'DealMakerAPI'
|
171
|
+
# setup authorization
|
172
|
+
DealMakerAPI.configure do |config|end
|
173
|
+
|
174
|
+
api_instance = DealMakerAPI::IncentivePlanApi.new
|
175
|
+
id = 56 # Integer | The deal id.
|
176
|
+
post_deal_incentive_plan_request = DealMakerAPI::PostDealIncentivePlanRequest.new({active_at: Time.now, tiers_incentive_percentage: [3.56], tiers_end_at: [Time.now]}) # PostDealIncentivePlanRequest |
|
177
|
+
|
178
|
+
begin
|
179
|
+
# Creates incentive plan by deal id
|
180
|
+
result = api_instance.post_deal_incentive_plan(id, post_deal_incentive_plan_request)
|
181
|
+
p result
|
182
|
+
rescue DealMakerAPI::ApiError => e
|
183
|
+
puts "Error when calling IncentivePlanApi->post_deal_incentive_plan: #{e}"
|
184
|
+
end
|
185
|
+
```
|
186
|
+
|
187
|
+
#### Using the post_deal_incentive_plan_with_http_info variant
|
188
|
+
|
189
|
+
This returns an Array which contains the response data, status code and headers.
|
190
|
+
|
191
|
+
> <Array(<V1EntitiesDealsPriceDetails>, Integer, Hash)> post_deal_incentive_plan_with_http_info(id, post_deal_incentive_plan_request)
|
192
|
+
|
193
|
+
```ruby
|
194
|
+
begin
|
195
|
+
# Creates incentive plan by deal id
|
196
|
+
data, status_code, headers = api_instance.post_deal_incentive_plan_with_http_info(id, post_deal_incentive_plan_request)
|
197
|
+
p status_code # => 2xx
|
198
|
+
p headers # => { ... }
|
199
|
+
p data # => <V1EntitiesDealsPriceDetails>
|
200
|
+
rescue DealMakerAPI::ApiError => e
|
201
|
+
puts "Error when calling IncentivePlanApi->post_deal_incentive_plan_with_http_info: #{e}"
|
202
|
+
end
|
203
|
+
```
|
204
|
+
|
205
|
+
### Parameters
|
206
|
+
|
207
|
+
| Name | Type | Description | Notes |
|
208
|
+
| ---- | ---- | ----------- | ----- |
|
209
|
+
| **id** | **Integer** | The deal id. | |
|
210
|
+
| **post_deal_incentive_plan_request** | [**PostDealIncentivePlanRequest**](PostDealIncentivePlanRequest.md) | | |
|
211
|
+
|
212
|
+
### Return type
|
213
|
+
|
214
|
+
[**V1EntitiesDealsPriceDetails**](V1EntitiesDealsPriceDetails.md)
|
215
|
+
|
216
|
+
### Authorization
|
217
|
+
|
218
|
+
No authorization required
|
219
|
+
|
220
|
+
### HTTP request headers
|
221
|
+
|
222
|
+
- **Content-Type**: application/json
|
223
|
+
- **Accept**: application/json
|
224
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# DealMakerAPI::PatchDealIncentivePlanRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **active_at** | **Time** | The incentive plan active date. | [optional] |
|
8
|
+
| **funded_by_offset** | **Integer** | The incentive plan funded by offset in days. | [optional] |
|
9
|
+
| **tiers_id** | **Array<Integer>** | The incentive plan tier id. If none it will be created | [optional] |
|
10
|
+
| **tiers__delete** | **Array<Boolean>** | If true, this entry will be cleared. | [optional] |
|
11
|
+
| **tiers_incentive_percentage** | **Array<Float>** | The incentive plan tier percentage. | [optional] |
|
12
|
+
| **tiers_end_at** | **Array<Time>** | The incentive plan tier end date. | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'DealMakerAPI'
|
18
|
+
|
19
|
+
instance = DealMakerAPI::PatchDealIncentivePlanRequest.new(
|
20
|
+
active_at: null,
|
21
|
+
funded_by_offset: null,
|
22
|
+
tiers_id: null,
|
23
|
+
tiers__delete: null,
|
24
|
+
tiers_incentive_percentage: null,
|
25
|
+
tiers_end_at: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# DealMakerAPI::PostDealIncentivePlanRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **active_at** | **Time** | The incentive plan active date. | |
|
8
|
+
| **funded_by_offset** | **Integer** | The incentive plan funded by offset in days. | [optional][default to 0] |
|
9
|
+
| **tiers_incentive_percentage** | **Array<Float>** | The incentive plan tier percentage. | |
|
10
|
+
| **tiers_end_at** | **Array<Time>** | The incentive plan tier end date. | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'DealMakerAPI'
|
16
|
+
|
17
|
+
instance = DealMakerAPI::PostDealIncentivePlanRequest.new(
|
18
|
+
active_at: null,
|
19
|
+
funded_by_offset: null,
|
20
|
+
tiers_incentive_percentage: null,
|
21
|
+
tiers_end_at: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -90,5 +90,155 @@ module DealMakerAPI
|
|
90
90
|
end
|
91
91
|
return data, status_code, headers
|
92
92
|
end
|
93
|
+
|
94
|
+
# Updates incentive plan by deal id
|
95
|
+
# Updates an incentive plan for the given deal id with respectve tiers.
|
96
|
+
# @param id [Integer] The deal id.
|
97
|
+
# @param incentive_plan_id [Integer] The deal id.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [PatchDealIncentivePlanRequest] :patch_deal_incentive_plan_request
|
100
|
+
# @return [V1EntitiesDealsPriceDetails]
|
101
|
+
def patch_deal_incentive_plan(id, incentive_plan_id, opts = {})
|
102
|
+
data, _status_code, _headers = patch_deal_incentive_plan_with_http_info(id, incentive_plan_id, opts)
|
103
|
+
data
|
104
|
+
end
|
105
|
+
|
106
|
+
# Updates incentive plan by deal id
|
107
|
+
# Updates an incentive plan for the given deal id with respectve tiers.
|
108
|
+
# @param id [Integer] The deal id.
|
109
|
+
# @param incentive_plan_id [Integer] The deal id.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [PatchDealIncentivePlanRequest] :patch_deal_incentive_plan_request
|
112
|
+
# @return [Array<(V1EntitiesDealsPriceDetails, Integer, Hash)>] V1EntitiesDealsPriceDetails data, response status code and response headers
|
113
|
+
def patch_deal_incentive_plan_with_http_info(id, incentive_plan_id, opts = {})
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug 'Calling API: IncentivePlanApi.patch_deal_incentive_plan ...'
|
116
|
+
end
|
117
|
+
# verify the required parameter 'id' is set
|
118
|
+
if @api_client.config.client_side_validation && id.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IncentivePlanApi.patch_deal_incentive_plan"
|
120
|
+
end
|
121
|
+
# verify the required parameter 'incentive_plan_id' is set
|
122
|
+
if @api_client.config.client_side_validation && incentive_plan_id.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'incentive_plan_id' when calling IncentivePlanApi.patch_deal_incentive_plan"
|
124
|
+
end
|
125
|
+
# resource path
|
126
|
+
local_var_path = '/deals/{id}/incentive_plans/{incentive_plan_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'incentive_plan_id' + '}', CGI.escape(incentive_plan_id.to_s))
|
127
|
+
|
128
|
+
# query parameters
|
129
|
+
query_params = opts[:query_params] || {}
|
130
|
+
|
131
|
+
# header parameters
|
132
|
+
header_params = opts[:header_params] || {}
|
133
|
+
# HTTP header 'Accept' (if needed)
|
134
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
135
|
+
# HTTP header 'Content-Type'
|
136
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
137
|
+
if !content_type.nil?
|
138
|
+
header_params['Content-Type'] = content_type
|
139
|
+
end
|
140
|
+
|
141
|
+
# form parameters
|
142
|
+
form_params = opts[:form_params] || {}
|
143
|
+
|
144
|
+
# http body (model)
|
145
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'patch_deal_incentive_plan_request'])
|
146
|
+
|
147
|
+
# return_type
|
148
|
+
return_type = opts[:debug_return_type] || 'V1EntitiesDealsPriceDetails'
|
149
|
+
|
150
|
+
# auth_names
|
151
|
+
auth_names = opts[:debug_auth_names] || []
|
152
|
+
|
153
|
+
new_options = opts.merge(
|
154
|
+
:operation => :"IncentivePlanApi.patch_deal_incentive_plan",
|
155
|
+
:header_params => header_params,
|
156
|
+
:query_params => query_params,
|
157
|
+
:form_params => form_params,
|
158
|
+
:body => post_body,
|
159
|
+
:auth_names => auth_names,
|
160
|
+
:return_type => return_type
|
161
|
+
)
|
162
|
+
|
163
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: IncentivePlanApi#patch_deal_incentive_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
|
170
|
+
# Creates incentive plan by deal id
|
171
|
+
# Creates an incentive plan for the given deal id with respectve tiers.
|
172
|
+
# @param id [Integer] The deal id.
|
173
|
+
# @param post_deal_incentive_plan_request [PostDealIncentivePlanRequest]
|
174
|
+
# @param [Hash] opts the optional parameters
|
175
|
+
# @return [V1EntitiesDealsPriceDetails]
|
176
|
+
def post_deal_incentive_plan(id, post_deal_incentive_plan_request, opts = {})
|
177
|
+
data, _status_code, _headers = post_deal_incentive_plan_with_http_info(id, post_deal_incentive_plan_request, opts)
|
178
|
+
data
|
179
|
+
end
|
180
|
+
|
181
|
+
# Creates incentive plan by deal id
|
182
|
+
# Creates an incentive plan for the given deal id with respectve tiers.
|
183
|
+
# @param id [Integer] The deal id.
|
184
|
+
# @param post_deal_incentive_plan_request [PostDealIncentivePlanRequest]
|
185
|
+
# @param [Hash] opts the optional parameters
|
186
|
+
# @return [Array<(V1EntitiesDealsPriceDetails, Integer, Hash)>] V1EntitiesDealsPriceDetails data, response status code and response headers
|
187
|
+
def post_deal_incentive_plan_with_http_info(id, post_deal_incentive_plan_request, opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: IncentivePlanApi.post_deal_incentive_plan ...'
|
190
|
+
end
|
191
|
+
# verify the required parameter 'id' is set
|
192
|
+
if @api_client.config.client_side_validation && id.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IncentivePlanApi.post_deal_incentive_plan"
|
194
|
+
end
|
195
|
+
# verify the required parameter 'post_deal_incentive_plan_request' is set
|
196
|
+
if @api_client.config.client_side_validation && post_deal_incentive_plan_request.nil?
|
197
|
+
fail ArgumentError, "Missing the required parameter 'post_deal_incentive_plan_request' when calling IncentivePlanApi.post_deal_incentive_plan"
|
198
|
+
end
|
199
|
+
# resource path
|
200
|
+
local_var_path = '/deals/{id}/incentive_plans'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = opts[:query_params] || {}
|
204
|
+
|
205
|
+
# header parameters
|
206
|
+
header_params = opts[:header_params] || {}
|
207
|
+
# HTTP header 'Accept' (if needed)
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
209
|
+
# HTTP header 'Content-Type'
|
210
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
211
|
+
if !content_type.nil?
|
212
|
+
header_params['Content-Type'] = content_type
|
213
|
+
end
|
214
|
+
|
215
|
+
# form parameters
|
216
|
+
form_params = opts[:form_params] || {}
|
217
|
+
|
218
|
+
# http body (model)
|
219
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_deal_incentive_plan_request)
|
220
|
+
|
221
|
+
# return_type
|
222
|
+
return_type = opts[:debug_return_type] || 'V1EntitiesDealsPriceDetails'
|
223
|
+
|
224
|
+
# auth_names
|
225
|
+
auth_names = opts[:debug_auth_names] || []
|
226
|
+
|
227
|
+
new_options = opts.merge(
|
228
|
+
:operation => :"IncentivePlanApi.post_deal_incentive_plan",
|
229
|
+
:header_params => header_params,
|
230
|
+
:query_params => query_params,
|
231
|
+
:form_params => form_params,
|
232
|
+
:body => post_body,
|
233
|
+
:auth_names => auth_names,
|
234
|
+
:return_type => return_type
|
235
|
+
)
|
236
|
+
|
237
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug "API called: IncentivePlanApi#post_deal_incentive_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
240
|
+
end
|
241
|
+
return data, status_code, headers
|
242
|
+
end
|
93
243
|
end
|
94
244
|
end
|