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

Commit 7f6ee39

Browse files
Release 2.24.0
1 parent 5cf9e58 commit 7f6ee39

9 files changed

+511
-13
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ Class | Method | HTTP request
430430
- [Model.ListEmployeesResponse](docs/ListEmployeesResponse.md)
431431
- [Model.ListLocationsRequest](docs/ListLocationsRequest.md)
432432
- [Model.ListLocationsResponse](docs/ListLocationsResponse.md)
433+
- [Model.ListMerchantsRequest](docs/ListMerchantsRequest.md)
434+
- [Model.ListMerchantsResponse](docs/ListMerchantsResponse.md)
433435
- [Model.ListPaymentRefundsRequest](docs/ListPaymentRefundsRequest.md)
434436
- [Model.ListPaymentRefundsResponse](docs/ListPaymentRefundsResponse.md)
435437
- [Model.ListPaymentsRequest](docs/ListPaymentsRequest.md)

docs/ListMerchantsRequest.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Square.Connect.Model.ListMerchantsRequest
2+
3+
### Description
4+
5+
Request object for the [ListMerchant](#endpoint-listmerchant) endpoint.
6+
7+
## Properties
8+
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**Cursor** | **int?** | The cursor generated by the previous response. | [optional]
12+
13+
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+

docs/ListMerchantsResponse.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Square.Connect.Model.ListMerchantsResponse
2+
3+
### Description
4+
5+
The response object returned by the [ListMerchant](#endpoint-listmerchant) endpoint.
6+
7+
## Properties
8+
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**Errors** | [**List<Error>**](Error.md) | Information on errors encountered during the request. | [optional]
12+
**Merchant** | [**List<Merchant>**](Merchant.md) | The requested `Merchant` entities. | [optional]
13+
**Cursor** | **int?** | If the response is truncated, the cursor to use in next request to fetch next set of objects. | [optional]
14+
15+
16+
17+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
18+

docs/MerchantsApi.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010

1111
<a name="listmerchants"></a>
1212
# **ListMerchants**
13-
> ListMerchantsResponse ListMerchants ()
13+
> ListMerchantsResponse ListMerchants (int? cursor = null)
1414
1515
ListMerchants
1616

@@ -35,11 +35,12 @@ namespace Example
3535
Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
3636

3737
var apiInstance = new MerchantsApi();
38+
var cursor = 56; // int? | The cursor generated by the previous response. (optional)
3839
3940
try
4041
{
4142
// ListMerchants
42-
ListMerchantsResponse result = apiInstance.ListMerchants();
43+
ListMerchantsResponse result = apiInstance.ListMerchants(cursor);
4344
Debug.WriteLine(result);
4445
}
4546
catch (Exception e)
@@ -52,7 +53,10 @@ namespace Example
5253
```
5354

5455
### Parameters
55-
This endpoint does not need any parameter.
56+
57+
Name | Type | Description | Notes
58+
------------- | ------------- | ------------- | -------------
59+
**cursor** | **int?**| The cursor generated by the previous response. | [optional]
5660

5761
### Return type
5862

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Square Connect API
3+
*
4+
* Client library for accessing the Square Connect APIs
5+
*
6+
* OpenAPI spec version: 2.0
7+
* Contact: [email protected]
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
12+
using NUnit.Framework;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using Square.Connect.Api;
19+
using Square.Connect.Model;
20+
using Square.Connect.Client;
21+
using System.Reflection;
22+
23+
namespace Square.Connect.Test
24+
{
25+
/// <summary>
26+
/// Class for testing ListMerchantsRequest
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by Swagger Codegen.
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
[TestFixture]
33+
public class ListMerchantsRequestTests
34+
{
35+
// TODO uncomment below to declare an instance variable for ListMerchantsRequest
36+
//private ListMerchantsRequest instance;
37+
38+
/// <summary>
39+
/// Setup before each test
40+
/// </summary>
41+
[SetUp]
42+
public void Init()
43+
{
44+
// TODO uncomment below to create an instance of ListMerchantsRequest
45+
//instance = new ListMerchantsRequest();
46+
}
47+
48+
/// <summary>
49+
/// Clean up after each test
50+
/// </summary>
51+
[TearDown]
52+
public void Cleanup()
53+
{
54+
55+
}
56+
57+
/// <summary>
58+
/// Test an instance of ListMerchantsRequest
59+
/// </summary>
60+
[Test]
61+
public void ListMerchantsRequestInstanceTest()
62+
{
63+
// TODO uncomment below to test "IsInstanceOfType" ListMerchantsRequest
64+
//Assert.IsInstanceOfType<ListMerchantsRequest> (instance, "variable 'instance' is a ListMerchantsRequest");
65+
}
66+
67+
/// <summary>
68+
/// Test the property 'Cursor'
69+
/// </summary>
70+
[Test]
71+
public void CursorTest()
72+
{
73+
// TODO unit test for the property 'Cursor'
74+
}
75+
76+
}
77+
78+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Square Connect API
3+
*
4+
* Client library for accessing the Square Connect APIs
5+
*
6+
* OpenAPI spec version: 2.0
7+
* Contact: [email protected]
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*/
10+
11+
12+
using NUnit.Framework;
13+
14+
using System;
15+
using System.Linq;
16+
using System.IO;
17+
using System.Collections.Generic;
18+
using Square.Connect.Api;
19+
using Square.Connect.Model;
20+
using Square.Connect.Client;
21+
using System.Reflection;
22+
23+
namespace Square.Connect.Test
24+
{
25+
/// <summary>
26+
/// Class for testing ListMerchantsResponse
27+
/// </summary>
28+
/// <remarks>
29+
/// This file is automatically generated by Swagger Codegen.
30+
/// Please update the test case below to test the model.
31+
/// </remarks>
32+
[TestFixture]
33+
public class ListMerchantsResponseTests
34+
{
35+
// TODO uncomment below to declare an instance variable for ListMerchantsResponse
36+
//private ListMerchantsResponse instance;
37+
38+
/// <summary>
39+
/// Setup before each test
40+
/// </summary>
41+
[SetUp]
42+
public void Init()
43+
{
44+
// TODO uncomment below to create an instance of ListMerchantsResponse
45+
//instance = new ListMerchantsResponse();
46+
}
47+
48+
/// <summary>
49+
/// Clean up after each test
50+
/// </summary>
51+
[TearDown]
52+
public void Cleanup()
53+
{
54+
55+
}
56+
57+
/// <summary>
58+
/// Test an instance of ListMerchantsResponse
59+
/// </summary>
60+
[Test]
61+
public void ListMerchantsResponseInstanceTest()
62+
{
63+
// TODO uncomment below to test "IsInstanceOfType" ListMerchantsResponse
64+
//Assert.IsInstanceOfType<ListMerchantsResponse> (instance, "variable 'instance' is a ListMerchantsResponse");
65+
}
66+
67+
/// <summary>
68+
/// Test the property 'Errors'
69+
/// </summary>
70+
[Test]
71+
public void ErrorsTest()
72+
{
73+
// TODO unit test for the property 'Errors'
74+
}
75+
/// <summary>
76+
/// Test the property 'Merchant'
77+
/// </summary>
78+
[Test]
79+
public void MerchantTest()
80+
{
81+
// TODO unit test for the property 'Merchant'
82+
}
83+
/// <summary>
84+
/// Test the property 'Cursor'
85+
/// </summary>
86+
[Test]
87+
public void CursorTest()
88+
{
89+
// TODO unit test for the property 'Cursor'
90+
}
91+
92+
}
93+
94+
}

src/Square.Connect/Api/MerchantsApi.cs

+20-10
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public interface IMerchantsApi : IApiAccessor
3131
/// Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
3232
/// </remarks>
3333
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
34-
/// <returns>ListMerchantsResponse</returns> ListMerchantsResponse ListMerchants ();
34+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
35+
/// <returns>ListMerchantsResponse</returns> ListMerchantsResponse ListMerchants (int? cursor = null);
3536

3637
/// <summary>
3738
/// ListMerchants
@@ -40,8 +41,9 @@ public interface IMerchantsApi : IApiAccessor
4041
/// Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
4142
/// </remarks>
4243
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
44+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
4345
/// <returns>ApiResponse of ListMerchantsResponse</returns>
44-
ApiResponse<ListMerchantsResponse> ListMerchantsWithHttpInfo ();
46+
ApiResponse<ListMerchantsResponse> ListMerchantsWithHttpInfo (int? cursor = null);
4547
/// <summary>
4648
/// RetrieveMerchant
4749
/// </summary>
@@ -71,8 +73,9 @@ public interface IMerchantsApi : IApiAccessor
7173
/// Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
7274
/// </remarks>
7375
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
76+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
7477
/// <returns>Task of ListMerchantsResponse</returns>
75-
System.Threading.Tasks.Task<ListMerchantsResponse> ListMerchantsAsync ();
78+
System.Threading.Tasks.Task<ListMerchantsResponse> ListMerchantsAsync (int? cursor = null);
7679

7780
/// <summary>
7881
/// ListMerchants
@@ -81,8 +84,9 @@ public interface IMerchantsApi : IApiAccessor
8184
/// Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
8285
/// </remarks>
8386
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
87+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
8488
/// <returns>Task of ApiResponse (ListMerchantsResponse)</returns>
85-
System.Threading.Tasks.Task<ApiResponse<ListMerchantsResponse>> ListMerchantsAsyncWithHttpInfo ();
89+
System.Threading.Tasks.Task<ApiResponse<ListMerchantsResponse>> ListMerchantsAsyncWithHttpInfo (int? cursor = null);
8690
/// <summary>
8791
/// RetrieveMerchant
8892
/// </summary>
@@ -220,19 +224,21 @@ public void AddDefaultHeader(string key, string value)
220224
/// ListMerchants Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
221225
/// </summary>
222226
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
227+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
223228
/// <returns>ListMerchantsResponse</returns>
224-
public ListMerchantsResponse ListMerchants ()
229+
public ListMerchantsResponse ListMerchants (int? cursor = null)
225230
{
226-
ApiResponse<ListMerchantsResponse> localVarResponse = ListMerchantsWithHttpInfo();
231+
ApiResponse<ListMerchantsResponse> localVarResponse = ListMerchantsWithHttpInfo(cursor);
227232
return localVarResponse.Data;
228233
}
229234

230235
/// <summary>
231236
/// ListMerchants Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
232237
/// </summary>
233238
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
239+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
234240
/// <returns>ApiResponse of ListMerchantsResponse</returns>
235-
public ApiResponse< ListMerchantsResponse > ListMerchantsWithHttpInfo ()
241+
public ApiResponse< ListMerchantsResponse > ListMerchantsWithHttpInfo (int? cursor = null)
236242
{
237243

238244
var localVarPath = "/v2/merchants";
@@ -257,6 +263,7 @@ public ApiResponse< ListMerchantsResponse > ListMerchantsWithHttpInfo ()
257263
if (localVarHttpHeaderAccept != null)
258264
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
259265
localVarHeaderParams.Add("Square-Version", "2019-10-23");
266+
if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter
260267

261268
// authentication (oauth2) required
262269
// oauth required
@@ -288,10 +295,11 @@ public ApiResponse< ListMerchantsResponse > ListMerchantsWithHttpInfo ()
288295
/// ListMerchants Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
289296
/// </summary>
290297
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
298+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
291299
/// <returns>Task of ListMerchantsResponse</returns>
292-
public async System.Threading.Tasks.Task<ListMerchantsResponse> ListMerchantsAsync ()
300+
public async System.Threading.Tasks.Task<ListMerchantsResponse> ListMerchantsAsync (int? cursor = null)
293301
{
294-
ApiResponse<ListMerchantsResponse> localVarResponse = await ListMerchantsAsyncWithHttpInfo();
302+
ApiResponse<ListMerchantsResponse> localVarResponse = await ListMerchantsAsyncWithHttpInfo(cursor);
295303
return localVarResponse.Data;
296304

297305
}
@@ -300,8 +308,9 @@ public async System.Threading.Tasks.Task<ListMerchantsResponse> ListMerchantsAsy
300308
/// ListMerchants Returns &#x60;Merchant&#x60; information for a given access token. If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access. If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
301309
/// </summary>
302310
/// <exception cref="Square.Connect.Client.ApiException">Thrown when fails to make API call</exception>
311+
/// <param name="cursor">The cursor generated by the previous response. (optional)</param>
303312
/// <returns>Task of ApiResponse (ListMerchantsResponse)</returns>
304-
public async System.Threading.Tasks.Task<ApiResponse<ListMerchantsResponse>> ListMerchantsAsyncWithHttpInfo ()
313+
public async System.Threading.Tasks.Task<ApiResponse<ListMerchantsResponse>> ListMerchantsAsyncWithHttpInfo (int? cursor = null)
305314
{
306315

307316
var localVarPath = "/v2/merchants";
@@ -326,6 +335,7 @@ public async System.Threading.Tasks.Task<ApiResponse<ListMerchantsResponse>> Lis
326335
if (localVarHttpHeaderAccept != null)
327336
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
328337
localVarHeaderParams.Add("Square-Version", "2019-10-23");
338+
if (cursor != null) localVarQueryParams.Add("cursor", Configuration.ApiClient.ParameterToString(cursor)); // query parameter
329339

330340
// authentication (oauth2) required
331341
// oauth required

0 commit comments

Comments
 (0)