Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Commit a84bceb

Browse files
authored
Release 2.22.2 (#136)
1 parent 22e732b commit a84bceb

File tree

6 files changed

+59
-19
lines changed

6 files changed

+59
-19
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## Version 2.22.2 (2019-08-23)
4+
5+
* **Bug fix**: Fixed path parameters for `UpdateOrder`
6+
37
## Version 2.22.1 (2018-08-16)
48

59
* **Bug fix**: Removed a currently unsupported API object type

docs/OrdersApi.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Name | Type | Description | Notes
279279

280280
<a name="updateorder"></a>
281281
# **UpdateOrder**
282-
> UpdateOrderResponse UpdateOrder (UpdateOrderRequest body)
282+
> UpdateOrderResponse UpdateOrder (string locationId, string orderId, UpdateOrderRequest body)
283283
284284
UpdateOrder
285285

@@ -304,12 +304,14 @@ namespace Example
304304
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
305305

306306
var apiInstance = new OrdersApi();
307+
var locationId = locationId_example; // string | The ID of the order's associated location.
308+
var orderId = orderId_example; // string | The ID of the order to update.
307309
var body = new UpdateOrderRequest(); // UpdateOrderRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
308310
309311
try
310312
{
311313
// UpdateOrder
312-
UpdateOrderResponse result = apiInstance.UpdateOrder(body);
314+
UpdateOrderResponse result = apiInstance.UpdateOrder(locationId, orderId, body);
313315
Debug.WriteLine(result);
314316
}
315317
catch (Exception e)
@@ -325,6 +327,8 @@ namespace Example
325327

326328
Name | Type | Description | Notes
327329
------------- | ------------- | ------------- | -------------
330+
**locationId** | **string**| The ID of the order&#39;s associated location. |
331+
**orderId** | **string**| The ID of the order to update. |
328332
**body** | [**UpdateOrderRequest**](UpdateOrderRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
329333

330334
### Return type

src/Square.Connect/Api/OrdersApi.cs

+42-10
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ public interface IOrdersApi : IApiAccessor
117117
/// Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
118118
/// </remarks>
119119
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
120+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
121+
/// <param name="orderId">The ID of the order to update.</param>
120122
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
121-
/// <returns>UpdateOrderResponse</returns> UpdateOrderResponse UpdateOrder (UpdateOrderRequest body);
123+
/// <returns>UpdateOrderResponse</returns> UpdateOrderResponse UpdateOrder (string locationId, string orderId, UpdateOrderRequest body);
122124

123125
/// <summary>
124126
/// UpdateOrder
@@ -127,9 +129,11 @@ public interface IOrdersApi : IApiAccessor
127129
/// Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
128130
/// </remarks>
129131
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
132+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
133+
/// <param name="orderId">The ID of the order to update.</param>
130134
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
131135
/// <returns>ApiResponse of UpdateOrderResponse</returns>
132-
ApiResponse<UpdateOrderResponse> UpdateOrderWithHttpInfo (UpdateOrderRequest body);
136+
ApiResponse<UpdateOrderResponse> UpdateOrderWithHttpInfo (string locationId, string orderId, UpdateOrderRequest body);
133137
#endregion Synchronous Operations
134138
#region Asynchronous Operations
135139
/// <summary>
@@ -229,9 +233,11 @@ public interface IOrdersApi : IApiAccessor
229233
/// Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
230234
/// </remarks>
231235
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
236+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
237+
/// <param name="orderId">The ID of the order to update.</param>
232238
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
233239
/// <returns>Task of UpdateOrderResponse</returns>
234-
System.Threading.Tasks.Task<UpdateOrderResponse> UpdateOrderAsync (UpdateOrderRequest body);
240+
System.Threading.Tasks.Task<UpdateOrderResponse> UpdateOrderAsync (string locationId, string orderId, UpdateOrderRequest body);
235241

236242
/// <summary>
237243
/// UpdateOrder
@@ -240,9 +246,11 @@ public interface IOrdersApi : IApiAccessor
240246
/// Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
241247
/// </remarks>
242248
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
249+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
250+
/// <param name="orderId">The ID of the order to update.</param>
243251
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
244252
/// <returns>Task of ApiResponse (UpdateOrderResponse)</returns>
245-
System.Threading.Tasks.Task<ApiResponse<UpdateOrderResponse>> UpdateOrderAsyncWithHttpInfo (UpdateOrderRequest body);
253+
System.Threading.Tasks.Task<ApiResponse<UpdateOrderResponse>> UpdateOrderAsyncWithHttpInfo (string locationId, string orderId, UpdateOrderRequest body);
246254
#endregion Asynchronous Operations
247255
}
248256

@@ -1047,22 +1055,32 @@ public async System.Threading.Tasks.Task<ApiResponse<SearchOrdersResponse>> Sear
10471055
/// UpdateOrder Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
10481056
/// </summary>
10491057
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
1058+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
1059+
/// <param name="orderId">The ID of the order to update.</param>
10501060
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
10511061
/// <returns>UpdateOrderResponse</returns>
1052-
public UpdateOrderResponse UpdateOrder (UpdateOrderRequest body)
1062+
public UpdateOrderResponse UpdateOrder (string locationId, string orderId, UpdateOrderRequest body)
10531063
{
1054-
ApiResponse<UpdateOrderResponse> localVarResponse = UpdateOrderWithHttpInfo(body);
1064+
ApiResponse<UpdateOrderResponse> localVarResponse = UpdateOrderWithHttpInfo(locationId, orderId, body);
10551065
return localVarResponse.Data;
10561066
}
10571067

10581068
/// <summary>
10591069
/// UpdateOrder Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
10601070
/// </summary>
10611071
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
1072+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
1073+
/// <param name="orderId">The ID of the order to update.</param>
10621074
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
10631075
/// <returns>ApiResponse of UpdateOrderResponse</returns>
1064-
public ApiResponse< UpdateOrderResponse > UpdateOrderWithHttpInfo (UpdateOrderRequest body)
1076+
public ApiResponse< UpdateOrderResponse > UpdateOrderWithHttpInfo (string locationId, string orderId, UpdateOrderRequest body)
10651077
{
1078+
// verify the required parameter 'locationId' is set
1079+
if (locationId == null)
1080+
throw new ApiException(400, "Missing required parameter 'locationId' when calling OrdersApi->UpdateOrder");
1081+
// verify the required parameter 'orderId' is set
1082+
if (orderId == null)
1083+
throw new ApiException(400, "Missing required parameter 'orderId' when calling OrdersApi->UpdateOrder");
10661084
// verify the required parameter 'body' is set
10671085
if (body == null)
10681086
throw new ApiException(400, "Missing required parameter 'body' when calling OrdersApi->UpdateOrder");
@@ -1089,6 +1107,8 @@ public ApiResponse< UpdateOrderResponse > UpdateOrderWithHttpInfo (UpdateOrderRe
10891107
if (localVarHttpHeaderAccept != null)
10901108
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
10911109
localVarHeaderParams.Add("Square-Version", "2019-08-14");
1110+
if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter
1111+
if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
10921112
if (body != null && body.GetType() != typeof(byte[]))
10931113
{
10941114
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
@@ -1128,11 +1148,13 @@ public ApiResponse< UpdateOrderResponse > UpdateOrderWithHttpInfo (UpdateOrderRe
11281148
/// UpdateOrder Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
11291149
/// </summary>
11301150
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
1151+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
1152+
/// <param name="orderId">The ID of the order to update.</param>
11311153
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
11321154
/// <returns>Task of UpdateOrderResponse</returns>
1133-
public async System.Threading.Tasks.Task<UpdateOrderResponse> UpdateOrderAsync (UpdateOrderRequest body)
1155+
public async System.Threading.Tasks.Task<UpdateOrderResponse> UpdateOrderAsync (string locationId, string orderId, UpdateOrderRequest body)
11341156
{
1135-
ApiResponse<UpdateOrderResponse> localVarResponse = await UpdateOrderAsyncWithHttpInfo(body);
1157+
ApiResponse<UpdateOrderResponse> localVarResponse = await UpdateOrderAsyncWithHttpInfo(locationId, orderId, body);
11361158
return localVarResponse.Data;
11371159

11381160
}
@@ -1141,10 +1163,18 @@ public async System.Threading.Tasks.Task<UpdateOrderResponse> UpdateOrderAsync (
11411163
/// UpdateOrder Updates an open [Order](#type-order) by adding, replacing, or deleting fields. Orders with a &#x60;COMPLETED&#x60; or &#x60;CANCELED&#x60; state cannot be updated. An UpdateOrder request requires the following: - The &#x60;order_id&#x60; in the endpoint path, identifying the order to update. - The latest &#x60;version&#x60; of the order to update. - The [sparse order](/orders-api/manage-orders#sparse-order-objects) containing only the fields to update and the version the update is being applied to. - If deleting fields, the [dot notation paths](/orders-api/manage-orders#on-dot-notation) identifying fields to clear. To pay for an order, please refer to the [Pay for Orders](/orders-api/pay-for-orders) guide. To learn more about the Orders API, see the [Orders API Overview](/orders-api/what-it-does).
11421164
/// </summary>
11431165
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
1166+
/// <param name="locationId">The ID of the order&#39;s associated location.</param>
1167+
/// <param name="orderId">The ID of the order to update.</param>
11441168
/// <param name="body">An object containing the fields to POST for the request. See the corresponding object definition for field details.</param>
11451169
/// <returns>Task of ApiResponse (UpdateOrderResponse)</returns>
1146-
public async System.Threading.Tasks.Task<ApiResponse<UpdateOrderResponse>> UpdateOrderAsyncWithHttpInfo (UpdateOrderRequest body)
1170+
public async System.Threading.Tasks.Task<ApiResponse<UpdateOrderResponse>> UpdateOrderAsyncWithHttpInfo (string locationId, string orderId, UpdateOrderRequest body)
11471171
{
1172+
// verify the required parameter 'locationId' is set
1173+
if (locationId == null)
1174+
throw new ApiException(400, "Missing required parameter 'locationId' when calling OrdersApi->UpdateOrder");
1175+
// verify the required parameter 'orderId' is set
1176+
if (orderId == null)
1177+
throw new ApiException(400, "Missing required parameter 'orderId' when calling OrdersApi->UpdateOrder");
11481178
// verify the required parameter 'body' is set
11491179
if (body == null)
11501180
throw new ApiException(400, "Missing required parameter 'body' when calling OrdersApi->UpdateOrder");
@@ -1171,6 +1201,8 @@ public async System.Threading.Tasks.Task<ApiResponse<UpdateOrderResponse>> Updat
11711201
if (localVarHttpHeaderAccept != null)
11721202
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
11731203

1204+
if (locationId != null) localVarPathParams.Add("location_id", Configuration.ApiClient.ParameterToString(locationId)); // path parameter
1205+
if (orderId != null) localVarPathParams.Add("order_id", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
11741206
if (body != null && body.GetType() != typeof(byte[]))
11751207
{
11761208
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter

src/Square.Connect/Client/Configuration.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public Configuration(ApiClient apiClient = null,
4646
string tempFolderPath = null,
4747
string dateTimeFormat = null,
4848
int timeout = 100000,
49-
string userAgent = "Square-Connect-CSharp/2.20190814.1"
49+
string userAgent = "Square-Connect-CSharp/2.20190814.2"
5050
)
5151
{
5252
setApiClientUsingDefault(apiClient);
@@ -81,7 +81,7 @@ public Configuration(ApiClient apiClient)
8181
/// Version of the package.
8282
/// </summary>
8383
/// <value>Version of the package.</value>
84-
public const string Version = "2.22.1";
84+
public const string Version = "2.22.2";
8585

8686
/// <summary>
8787
/// Gets or sets the default Configuration.
@@ -318,7 +318,7 @@ public static String ToDebugReport()
318318
.GetReferencedAssemblies()
319319
.Where(x => x.Name == "System.Core").First().Version.ToString() + "\n";
320320
report += " Version of the API: 2.0\n";
321-
report += " SDK Package Version: 2.22.1\n";
321+
report += " SDK Package Version: 2.22.2\n";
322322

323323
return report;
324324
}

0 commit comments

Comments
 (0)