Skip to content

Commit 361fcb7

Browse files
author
Connor O'Brien
committed
Buyer create with direction, removing last instance of StandardPriceSchedule
1 parent 89fa19e commit 361fcb7

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Class | Method | HTTP request | Description
214214
*OrderCloud.Orders* | [**AddPromotion**](docs/Orders.md#AddPromotion) | **POST** /orders/{direction}/{orderID}/promotions/{promoCode} |
215215
*OrderCloud.Orders* | [**Approve**](docs/Orders.md#Approve) | **POST** /orders/{direction}/{orderID}/approve |
216216
*OrderCloud.Orders* | [**Cancel**](docs/Orders.md#Cancel) | **POST** /orders/{direction}/{orderID}/cancel |
217-
*OrderCloud.Orders* | [**Create**](docs/Orders.md#Create) | **POST** /orders |
217+
*OrderCloud.Orders* | [**Create**](docs/Orders.md#Create) | **POST** /orders/{direction} |
218218
*OrderCloud.Orders* | [**Decline**](docs/Orders.md#Decline) | **POST** /orders/{direction}/{orderID}/decline |
219219
*OrderCloud.Orders* | [**Delete**](docs/Orders.md#Delete) | **DELETE** /orders/{direction}/{orderID} |
220220
*OrderCloud.Orders* | [**Get**](docs/Orders.md#Get) | **GET** /orders/{direction}/{orderID} |

dist/ordercloud-javascript-sdk.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10726,19 +10726,26 @@ exports.prototype.callAuth = function callApi(path, httpMethod, pathParams,
1072610726

1072710727

1072810728
/**
10729+
* @param {String} direction Direction of the order. Possible values: Incoming, Outgoing.
1072910730
* @param {module:model/Order} order
1073010731
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
1073110732
*/
10732-
this.Create = function(order) {
10733+
this.Create = function(direction, order) {
1073310734
var postBody = order;
1073410735

10736+
// verify the required parameter 'direction' is set
10737+
if (direction == undefined || direction == null) {
10738+
throw new Error("Missing the required parameter 'direction' when calling Create");
10739+
}
10740+
1073510741
// verify the required parameter 'order' is set
1073610742
if (order == undefined || order == null) {
1073710743
throw new Error("Missing the required parameter 'order' when calling Create");
1073810744
}
1073910745

1074010746

1074110747
var pathParams = {
10748+
'direction': direction
1074210749
};
1074310750
var queryParams = {
1074410751
};
@@ -10753,7 +10760,7 @@ exports.prototype.callAuth = function callApi(path, httpMethod, pathParams,
1075310760
var returnType = Order;
1075410761

1075510762
return this.apiClient.callApi(
10756-
'/orders', 'POST',
10763+
'/orders/{direction}', 'POST',
1075710764
pathParams, queryParams, headerParams, formParams, postBody,
1075810765
authNames, contentTypes, accepts, returnType
1075910766
);
@@ -27473,7 +27480,6 @@ exports.prototype.callAuth = function callApi(path, httpMethod, pathParams,
2747327480

2747427481

2747527482

27476-
2747727483
};
2747827484

2747927485
/**
@@ -27502,9 +27508,6 @@ exports.prototype.callAuth = function callApi(path, httpMethod, pathParams,
2750227508
if (data.hasOwnProperty('PriceScheduleID')) {
2750327509
obj['PriceScheduleID'] = ApiClient.convertToType(data['PriceScheduleID'], 'String');
2750427510
}
27505-
if (data.hasOwnProperty('StandardPriceScheduleID')) {
27506-
obj['StandardPriceScheduleID'] = ApiClient.convertToType(data['StandardPriceScheduleID'], 'String');
27507-
}
2750827511
}
2750927512
return obj;
2751027513
}
@@ -27529,10 +27532,6 @@ exports.prototype.callAuth = function callApi(path, httpMethod, pathParams,
2752927532
* @member {String} PriceScheduleID
2753027533
*/
2753127534
exports.prototype['PriceScheduleID'] = undefined;
27532-
/**
27533-
* @member {String} StandardPriceScheduleID
27534-
*/
27535-
exports.prototype['StandardPriceScheduleID'] = undefined;
2753627535

2753727536

2753827537

dist/ordercloud-javascript-sdk.min.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Orders.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Method | HTTP request | Description
77
[**AddPromotion**](Orders.md#AddPromotion) | **POST** /orders/{direction}/{orderID}/promotions/{promoCode} |
88
[**Approve**](Orders.md#Approve) | **POST** /orders/{direction}/{orderID}/approve |
99
[**Cancel**](Orders.md#Cancel) | **POST** /orders/{direction}/{orderID}/cancel |
10-
[**Create**](Orders.md#Create) | **POST** /orders |
10+
[**Create**](Orders.md#Create) | **POST** /orders/{direction} |
1111
[**Decline**](Orders.md#Decline) | **POST** /orders/{direction}/{orderID}/decline |
1212
[**Delete**](Orders.md#Delete) | **DELETE** /orders/{direction}/{orderID} |
1313
[**Get**](Orders.md#Get) | **GET** /orders/{direction}/{orderID} |
@@ -182,7 +182,7 @@ Name | Type | Description | Notes
182182

183183
<a name="Create"></a>
184184
# **Create**
185-
> Order Create(order)
185+
> Order Create(direction, order)
186186
187187

188188

@@ -197,9 +197,11 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN';
197197

198198
var apiInstance = new OrderCloud.Orders();
199199

200+
var direction = "direction_example"; // String | Direction of the order. Possible values: Incoming, Outgoing.
201+
200202
var order = new OrderCloud.Order(); // Order |
201203

202-
apiInstance.Create(order).then(function(data) {
204+
apiInstance.Create(direction, order).then(function(data) {
203205
console.log('API called successfully. Returned data: ' + data);
204206
}, function(error) {
205207
console.error(error);
@@ -211,6 +213,7 @@ apiInstance.Create(order).then(function(data) {
211213

212214
Name | Type | Description | Notes
213215
------------- | ------------- | ------------- | -------------
216+
**direction** | **String**| Direction of the order. Possible values: Incoming, Outgoing. |
214217
**order** | [**Order**](Order.md)| |
215218

216219
### Return type

docs/ProductAssignment.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ Name | Type | Description | Notes
88
**userID** | **String** | | [optional]
99
**userGroupID** | **String** | | [optional]
1010
**priceScheduleID** | **String** | | [optional]
11-
**standardPriceScheduleID** | **String** | | [optional]
1211

1312

src/api/Orders.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,26 @@
189189

190190

191191
/**
192+
* @param {String} direction Direction of the order. Possible values: Incoming, Outgoing.
192193
* @param {module:model/Order} order
193194
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
194195
*/
195-
this.Create = function(order) {
196+
this.Create = function(direction, order) {
196197
var postBody = order;
197198

199+
// verify the required parameter 'direction' is set
200+
if (direction == undefined || direction == null) {
201+
throw new Error("Missing the required parameter 'direction' when calling Create");
202+
}
203+
198204
// verify the required parameter 'order' is set
199205
if (order == undefined || order == null) {
200206
throw new Error("Missing the required parameter 'order' when calling Create");
201207
}
202208

203209

204210
var pathParams = {
211+
'direction': direction
205212
};
206213
var queryParams = {
207214
};
@@ -216,7 +223,7 @@
216223
var returnType = Order;
217224

218225
return this.apiClient.callApi(
219-
'/orders', 'POST',
226+
'/orders/{direction}', 'POST',
220227
pathParams, queryParams, headerParams, formParams, postBody,
221228
authNames, contentTypes, accepts, returnType
222229
);

src/model/ProductAssignment.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050

5151

5252

53-
5453
};
5554

5655
/**
@@ -79,9 +78,6 @@
7978
if (data.hasOwnProperty('PriceScheduleID')) {
8079
obj['PriceScheduleID'] = ApiClient.convertToType(data['PriceScheduleID'], 'String');
8180
}
82-
if (data.hasOwnProperty('StandardPriceScheduleID')) {
83-
obj['StandardPriceScheduleID'] = ApiClient.convertToType(data['StandardPriceScheduleID'], 'String');
84-
}
8581
}
8682
return obj;
8783
}
@@ -106,10 +102,6 @@
106102
* @member {String} PriceScheduleID
107103
*/
108104
exports.prototype['PriceScheduleID'] = undefined;
109-
/**
110-
* @member {String} StandardPriceScheduleID
111-
*/
112-
exports.prototype['StandardPriceScheduleID'] = undefined;
113105

114106

115107

0 commit comments

Comments
 (0)