square_connect 2.2.0.110 → 2.2.1.145
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/README.md +47 -2
- data/docs/SearchCatalogObjectsRequest.md +1 -1
- data/docs/V1EmployeesApi.md +7 -5
- data/docs/V1ItemsApi.md +9 -3
- data/docs/V1PaymentItemDetail.md +1 -1
- data/docs/V1Refund.md +5 -0
- data/docs/V1TransactionsApi.md +12 -4
- data/docs/V1Variation.md +1 -0
- data/lib/square_connect/api/v1_employees_api.rb +9 -6
- data/lib/square_connect/api/v1_items_api.rb +6 -0
- data/lib/square_connect/api/v1_transactions_api.rb +12 -0
- data/lib/square_connect/api_client.rb +17 -3
- data/lib/square_connect/models/search_catalog_objects_request.rb +1 -1
- data/lib/square_connect/models/v1_payment_item_detail.rb +1 -1
- data/lib/square_connect/models/v1_refund.rb +51 -1
- data/lib/square_connect/models/v1_variation.rb +11 -1
- data/lib/square_connect/version.rb +1 -1
- data/spec/api/catalog_api_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9038d98c2435e21087034dafbf4ca72823a5c0b2
|
4
|
+
data.tar.gz: dad26f39a28e8946f76a3bf668829dbf86cec1ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef90f1bdd16f4093358dbdb3feb3bad30fbecde9ce441443a93e09731954c23e1094917237bd05788ec5b7a202659fd49baa4ac305ac346d84212e61496ff43b
|
7
|
+
data.tar.gz: 26b270f7e070cc4596ad6bc027ac4567b14d3447655dbb00ef1c04622dddf5a1e0c9bb32f4e74f37be242839dd53a304ca7c3a799291089d61525956a357efc1
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
10
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
11
11
|
|
12
12
|
- API version: 2.0
|
13
|
-
- Package version: 2.2.
|
13
|
+
- Package version: 2.2.1
|
14
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
15
15
|
|
16
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
@@ -348,7 +348,7 @@ Class | Method | HTTP request | Description
|
|
348
348
|
|
349
349
|
- **Type**: OAuth
|
350
350
|
- **Flow**: accessCode
|
351
|
-
- **Authorization URL**: `https://connect.squareup.com/oauth2/authorize
|
351
|
+
- **Authorization URL**: `https://connect.squareup.com/oauth2/authorize`
|
352
352
|
- **Scopes**:
|
353
353
|
- MERCHANT_PROFILE_READ: GET endpoints related to a merchant's business and location entities. Almost all Connect API applications need this permission in order to obtain a merchant's location IDs
|
354
354
|
- PAYMENTS_READ: GET endpoints related to transactions and refunds
|
@@ -367,6 +367,51 @@ Class | Method | HTTP request | Description
|
|
367
367
|
- TIMECARDS_WRITE: POST, PUT, and DELETE endpoints related to employee timecards
|
368
368
|
|
369
369
|
|
370
|
+
## Pagination of V1 Endpoints
|
371
|
+
|
372
|
+
V1 Endpoints return pagination information via HTTP headers. In order to obtain
|
373
|
+
response headers and extract the `batch_token` parameter you will need to follow
|
374
|
+
the following steps:
|
375
|
+
|
376
|
+
1. Use the full information endpoint methods of each API to get the response HTTP
|
377
|
+
Headers. They are named as their simple counterpart with a `with_http_info` suffix.
|
378
|
+
Hence `listEmployeeRoles` would be called `list_employee_roles_with_http_info`. This
|
379
|
+
method returns an array with 3 parameters: `response`, `http_status`, and
|
380
|
+
`http_headers`.
|
381
|
+
2. Use `batch_token = api_client.get_v1_batch_token_from_headers(http_headers)`
|
382
|
+
to extract the token and proceed to get the following page if a token is present.
|
383
|
+
|
384
|
+
### Example
|
385
|
+
|
386
|
+
```ruby
|
387
|
+
# load the gem
|
388
|
+
require 'square_connect'
|
389
|
+
# setup authorization
|
390
|
+
SquareConnect.configure do |config|
|
391
|
+
# Configure OAuth2 access token for authorization: oauth2
|
392
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
393
|
+
end
|
394
|
+
|
395
|
+
api_instance = SquareConnect::V1EmployeesApi.new
|
396
|
+
api_client = api_instance.api_client
|
397
|
+
|
398
|
+
opts = {
|
399
|
+
order: "order_example", # String | The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
400
|
+
limit: 56 # Integer | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
401
|
+
}
|
402
|
+
|
403
|
+
roles = []
|
404
|
+
begin
|
405
|
+
result, status, headers = api_instance.list_employee_roles_with_http_info(opts)
|
406
|
+
roles = roles + result
|
407
|
+
opts[:batch_token] = api_client.get_v1_batch_token_from_headers(headers)
|
408
|
+
rescue SquareConnect::ApiError => e
|
409
|
+
puts "Exception when calling V1EmployeesApi#list_employee_roles_with_http_info: #{e}"
|
410
|
+
end while opts[:batch_token]
|
411
|
+
|
412
|
+
p roles
|
413
|
+
```
|
414
|
+
|
370
415
|
Contributing
|
371
416
|
------------
|
372
417
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**cursor** | **String** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Paginating results](#paginatingresults) for more information. | [optional]
|
11
|
-
**object_types** | **Array<String>** | The desired set of object types to
|
11
|
+
**object_types** | **Array<String>** | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. | [optional]
|
12
12
|
**include_deleted_objects** | **BOOLEAN** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional]
|
13
13
|
**include_related_objects** | **BOOLEAN** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional]
|
14
14
|
**begin_time** | **String** | Return only objects that have been modified after this [timestamp](#workingwithdates) (in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\"). The timestamp is exclusive - objects whose timestamp is equal to `begin_time` will not be included in the response. | [optional]
|
data/docs/V1EmployeesApi.md
CHANGED
@@ -312,7 +312,7 @@ api_instance = SquareConnect::V1EmployeesApi.new
|
|
312
312
|
opts = {
|
313
313
|
order: "order_example", # String | The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
314
314
|
limit: 56, # Integer | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
315
|
-
|
315
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
316
316
|
}
|
317
317
|
|
318
318
|
begin
|
@@ -330,7 +330,7 @@ Name | Type | Description | Notes
|
|
330
330
|
------------- | ------------- | ------------- | -------------
|
331
331
|
**order** | **String**| The order in which employees are listed in the response, based on their created_at field.Default value: ASC | [optional]
|
332
332
|
**limit** | **Integer**| The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. | [optional]
|
333
|
-
**
|
333
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
334
334
|
|
335
335
|
### Return type
|
336
336
|
|
@@ -374,7 +374,8 @@ opts = {
|
|
374
374
|
end_created_at: "end_created_at_example", # String | If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format.
|
375
375
|
status: "status_example", # String | If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE).
|
376
376
|
external_id: "external_id_example", # String | If provided, the endpoint returns only employee entities with the specified external_id.
|
377
|
-
limit: 56 # Integer | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
377
|
+
limit: 56, # Integer | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
378
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
378
379
|
}
|
379
380
|
|
380
381
|
begin
|
@@ -398,6 +399,7 @@ Name | Type | Description | Notes
|
|
398
399
|
**status** | **String**| If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE). | [optional]
|
399
400
|
**external_id** | **String**| If provided, the endpoint returns only employee entities with the specified external_id. | [optional]
|
400
401
|
**limit** | **Integer**| The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. | [optional]
|
402
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
401
403
|
|
402
404
|
### Return type
|
403
405
|
|
@@ -496,7 +498,7 @@ opts = {
|
|
496
498
|
end_updated_at: "end_updated_at_example", # String | If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
497
499
|
deleted: true, # BOOLEAN | If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned.
|
498
500
|
limit: 56, # Integer | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
499
|
-
|
501
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
500
502
|
}
|
501
503
|
|
502
504
|
begin
|
@@ -522,7 +524,7 @@ Name | Type | Description | Notes
|
|
522
524
|
**end_updated_at** | **String**| If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format. | [optional]
|
523
525
|
**deleted** | **BOOLEAN**| If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned. | [optional]
|
524
526
|
**limit** | **Integer**| The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. | [optional]
|
525
|
-
**
|
527
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
526
528
|
|
527
529
|
### Return type
|
528
530
|
|
data/docs/V1ItemsApi.md
CHANGED
@@ -1351,7 +1351,8 @@ api_instance = SquareConnect::V1ItemsApi.new
|
|
1351
1351
|
location_id = "location_id_example" # String | The ID of the item's associated location.
|
1352
1352
|
|
1353
1353
|
opts = {
|
1354
|
-
limit: 56 # Integer | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1354
|
+
limit: 56, # Integer | The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1355
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1355
1356
|
}
|
1356
1357
|
|
1357
1358
|
begin
|
@@ -1369,6 +1370,7 @@ Name | Type | Description | Notes
|
|
1369
1370
|
------------- | ------------- | ------------- | -------------
|
1370
1371
|
**location_id** | **String**| The ID of the item's associated location. |
|
1371
1372
|
**limit** | **Integer**| The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. | [optional]
|
1373
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
1372
1374
|
|
1373
1375
|
### Return type
|
1374
1376
|
|
@@ -1386,7 +1388,7 @@ Name | Type | Description | Notes
|
|
1386
1388
|
|
1387
1389
|
|
1388
1390
|
# **list_items**
|
1389
|
-
> Array<V1Item> list_items(location_id)
|
1391
|
+
> Array<V1Item> list_items(location_id, opts)
|
1390
1392
|
|
1391
1393
|
Provides summary information for all of a location's items.
|
1392
1394
|
|
@@ -1406,10 +1408,13 @@ api_instance = SquareConnect::V1ItemsApi.new
|
|
1406
1408
|
|
1407
1409
|
location_id = "location_id_example" # String | The ID of the location to list items for.
|
1408
1410
|
|
1411
|
+
opts = {
|
1412
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1413
|
+
}
|
1409
1414
|
|
1410
1415
|
begin
|
1411
1416
|
#Provides summary information for all of a location's items.
|
1412
|
-
result = api_instance.list_items(location_id)
|
1417
|
+
result = api_instance.list_items(location_id, opts)
|
1413
1418
|
p result
|
1414
1419
|
rescue SquareConnect::ApiError => e
|
1415
1420
|
puts "Exception when calling V1ItemsApi->list_items: #{e}"
|
@@ -1421,6 +1426,7 @@ end
|
|
1421
1426
|
Name | Type | Description | Notes
|
1422
1427
|
------------- | ------------- | ------------- | -------------
|
1423
1428
|
**location_id** | **String**| The ID of the location to list items for. |
|
1429
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
1424
1430
|
|
1425
1431
|
### Return type
|
1426
1432
|
|
data/docs/V1PaymentItemDetail.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
Name | Type | Description | Notes
|
7
7
|
------------ | ------------- | ------------- | -------------
|
8
8
|
**category_name** | **String** | The name of the item's merchant-defined category, if any. | [optional]
|
9
|
-
**sku** | **
|
9
|
+
**sku** | **String** | The item's merchant-defined SKU, if any. | [optional]
|
10
10
|
**item_id** | **String** | The unique ID of the item purchased, if any. | [optional]
|
11
11
|
**item_variation_id** | **String** | The unique ID of the item variation purchased, if any. | [optional]
|
12
12
|
|
data/docs/V1Refund.md
CHANGED
@@ -8,6 +8,11 @@ Name | Type | Description | Notes
|
|
8
8
|
**type** | **String** | The type of refund | [optional]
|
9
9
|
**reason** | **String** | The merchant-specified reason for the refund. | [optional]
|
10
10
|
**refunded_money** | [**V1Money**](V1Money.md) | The amount of money refunded. This amount is always negative. | [optional]
|
11
|
+
**refunded_processing_fee_money** | [**V1Money**](V1Money.md) | The amount of processing fee money refunded. | [optional]
|
12
|
+
**refunded_additive_tax_money** | [**V1Money**](V1Money.md) | The amount of additive tax money refunded. | [optional]
|
13
|
+
**refunded_inclusive_tax_money** | [**V1Money**](V1Money.md) | The amount of inclusive tax money refunded. | [optional]
|
14
|
+
**refunded_tip_money** | [**V1Money**](V1Money.md) | The amount of tip money refunded. | [optional]
|
15
|
+
**refunded_discount_money** | [**V1Money**](V1Money.md) | The amount of discount money refunded. | [optional]
|
11
16
|
**created_at** | **String** | The time when the merchant initiated the refund for Square to process, in ISO 8601 format.. | [optional]
|
12
17
|
**processed_at** | **String** | The time when Square processed the refund on behalf of the merchant, in ISO 8601 format. | [optional]
|
13
18
|
**payment_id** | **String** | The Square-issued ID of the payment the refund is applied to. | [optional]
|
data/docs/V1TransactionsApi.md
CHANGED
@@ -147,7 +147,8 @@ location_id = "location_id_example" # String | The ID of the location to list on
|
|
147
147
|
|
148
148
|
opts = {
|
149
149
|
order: "order_example", # String | TThe order in which payments are listed in the response.
|
150
|
-
limit: 56 # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
150
|
+
limit: 56, # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
151
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
151
152
|
}
|
152
153
|
|
153
154
|
begin
|
@@ -166,6 +167,7 @@ Name | Type | Description | Notes
|
|
166
167
|
**location_id** | **String**| The ID of the location to list online store orders for. |
|
167
168
|
**order** | **String**| TThe order in which payments are listed in the response. | [optional]
|
168
169
|
**limit** | **Integer**| The maximum number of payments to return in a single response. This value cannot exceed 200. | [optional]
|
170
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
169
171
|
|
170
172
|
### Return type
|
171
173
|
|
@@ -207,7 +209,8 @@ opts = {
|
|
207
209
|
order: "order_example", # String | The order in which payments are listed in the response.
|
208
210
|
begin_time: "begin_time_example", # String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
209
211
|
end_time: "end_time_example", # String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
210
|
-
limit: 56 # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
212
|
+
limit: 56, # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
213
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
211
214
|
}
|
212
215
|
|
213
216
|
begin
|
@@ -228,6 +231,7 @@ Name | Type | Description | Notes
|
|
228
231
|
**begin_time** | **String**| The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | [optional]
|
229
232
|
**end_time** | **String**| The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | [optional]
|
230
233
|
**limit** | **Integer**| The maximum number of payments to return in a single response. This value cannot exceed 200. | [optional]
|
234
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
231
235
|
|
232
236
|
### Return type
|
233
237
|
|
@@ -269,7 +273,8 @@ opts = {
|
|
269
273
|
order: "order_example", # String | TThe order in which payments are listed in the response.
|
270
274
|
begin_time: "begin_time_example", # String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
271
275
|
end_time: "end_time_example", # String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
272
|
-
limit: 56 # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
276
|
+
limit: 56, # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
277
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
273
278
|
}
|
274
279
|
|
275
280
|
begin
|
@@ -290,6 +295,7 @@ Name | Type | Description | Notes
|
|
290
295
|
**begin_time** | **String**| The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. | [optional]
|
291
296
|
**end_time** | **String**| The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | [optional]
|
292
297
|
**limit** | **Integer**| The maximum number of payments to return in a single response. This value cannot exceed 200. | [optional]
|
298
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
293
299
|
|
294
300
|
### Return type
|
295
301
|
|
@@ -332,7 +338,8 @@ opts = {
|
|
332
338
|
begin_time: "begin_time_example", # String | The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
333
339
|
end_time: "end_time_example", # String | The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
334
340
|
limit: 56, # Integer | The maximum number of payments to return in a single response. This value cannot exceed 200.
|
335
|
-
status: "status_example" # String | Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
|
341
|
+
status: "status_example", # String | Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
|
342
|
+
batch_token: "batch_token_example" # String | A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
336
343
|
}
|
337
344
|
|
338
345
|
begin
|
@@ -354,6 +361,7 @@ Name | Type | Description | Notes
|
|
354
361
|
**end_time** | **String**| The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. | [optional]
|
355
362
|
**limit** | **Integer**| The maximum number of payments to return in a single response. This value cannot exceed 200. | [optional]
|
356
363
|
**status** | **String**| Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED). | [optional]
|
364
|
+
**batch_token** | **String**| A pagination cursor to retrieve the next set of results for your original query to the endpoint. | [optional]
|
357
365
|
|
358
366
|
### Return type
|
359
367
|
|
data/docs/V1Variation.md
CHANGED
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**id** | **String** | The item variation's unique ID. | [optional]
|
9
9
|
**name** | **String** | The item variation's name. | [optional]
|
10
10
|
**item_id** | **String** | The ID of the variation's associated item. | [optional]
|
11
|
+
**ordinal** | **Integer** | Indicates the variation's list position when displayed in Square Register and the merchant dashboard. If more than one variation for the same item has the same ordinal value, those variations are displayed in alphabetical order | [optional]
|
11
12
|
**pricing_type** | **String** | Indicates whether the item variation's price is fixed or determined at the time of sale. | [optional]
|
12
13
|
**price_money** | [**V1Money**](V1Money.md) | The item variation's price, if any. | [optional]
|
13
14
|
**sku** | **String** | The item variation's SKU, if any. | [optional]
|
@@ -299,7 +299,7 @@ module SquareConnect
|
|
299
299
|
# @param [Hash] opts the optional parameters
|
300
300
|
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
301
301
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
302
|
-
# @option opts [String] :
|
302
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
303
303
|
# @return [Array<V1EmployeeRole>]
|
304
304
|
def list_employee_roles(opts = {})
|
305
305
|
data, _status_code, _headers = list_employee_roles_with_http_info(opts)
|
@@ -311,7 +311,7 @@ module SquareConnect
|
|
311
311
|
# @param [Hash] opts the optional parameters
|
312
312
|
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
313
313
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
314
|
-
# @option opts [String] :
|
314
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
315
315
|
# @return [Array<(Array<V1EmployeeRole>, Fixnum, Hash)>] Array<V1EmployeeRole> data, response status code and response headers
|
316
316
|
def list_employee_roles_with_http_info(opts = {})
|
317
317
|
if @api_client.config.debugging
|
@@ -331,7 +331,7 @@ module SquareConnect
|
|
331
331
|
query_params = {}
|
332
332
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
333
333
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
334
|
-
query_params[:'
|
334
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
335
335
|
|
336
336
|
# header parameters
|
337
337
|
header_params = {}
|
@@ -370,6 +370,7 @@ module SquareConnect
|
|
370
370
|
# @option opts [String] :status If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE).
|
371
371
|
# @option opts [String] :external_id If provided, the endpoint returns only employee entities with the specified external_id.
|
372
372
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
373
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
373
374
|
# @return [Array<V1Employee>]
|
374
375
|
def list_employees(opts = {})
|
375
376
|
data, _status_code, _headers = list_employees_with_http_info(opts)
|
@@ -387,6 +388,7 @@ module SquareConnect
|
|
387
388
|
# @option opts [String] :status If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE).
|
388
389
|
# @option opts [String] :external_id If provided, the endpoint returns only employee entities with the specified external_id.
|
389
390
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
391
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
390
392
|
# @return [Array<(Array<V1Employee>, Fixnum, Hash)>] Array<V1Employee> data, response status code and response headers
|
391
393
|
def list_employees_with_http_info(opts = {})
|
392
394
|
if @api_client.config.debugging
|
@@ -415,6 +417,7 @@ module SquareConnect
|
|
415
417
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
416
418
|
query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
417
419
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
420
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
418
421
|
|
419
422
|
# header parameters
|
420
423
|
header_params = {}
|
@@ -508,7 +511,7 @@ module SquareConnect
|
|
508
511
|
# @option opts [String] :end_updated_at If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
509
512
|
# @option opts [BOOLEAN] :deleted If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned.
|
510
513
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
511
|
-
# @option opts [String] :
|
514
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
512
515
|
# @return [Array<V1Timecard>]
|
513
516
|
def list_timecards(opts = {})
|
514
517
|
data, _status_code, _headers = list_timecards_with_http_info(opts)
|
@@ -528,7 +531,7 @@ module SquareConnect
|
|
528
531
|
# @option opts [String] :end_updated_at If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
529
532
|
# @option opts [BOOLEAN] :deleted If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned.
|
530
533
|
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
531
|
-
# @option opts [String] :
|
534
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
532
535
|
# @return [Array<(Array<V1Timecard>, Fixnum, Hash)>] Array<V1Timecard> data, response status code and response headers
|
533
536
|
def list_timecards_with_http_info(opts = {})
|
534
537
|
if @api_client.config.debugging
|
@@ -556,7 +559,7 @@ module SquareConnect
|
|
556
559
|
query_params[:'end_updated_at'] = opts[:'end_updated_at'] if !opts[:'end_updated_at'].nil?
|
557
560
|
query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil?
|
558
561
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
559
|
-
query_params[:'
|
562
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
560
563
|
|
561
564
|
# header parameters
|
562
565
|
header_params = {}
|
@@ -1355,6 +1355,7 @@ module SquareConnect
|
|
1355
1355
|
# @param location_id The ID of the item's associated location.
|
1356
1356
|
# @param [Hash] opts the optional parameters
|
1357
1357
|
# @option opts [Integer] :limit The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1358
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1358
1359
|
# @return [Array<V1InventoryEntry>]
|
1359
1360
|
def list_inventory(location_id, opts = {})
|
1360
1361
|
data, _status_code, _headers = list_inventory_with_http_info(location_id, opts)
|
@@ -1366,6 +1367,7 @@ module SquareConnect
|
|
1366
1367
|
# @param location_id The ID of the item's associated location.
|
1367
1368
|
# @param [Hash] opts the optional parameters
|
1368
1369
|
# @option opts [Integer] :limit The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
|
1370
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1369
1371
|
# @return [Array<(Array<V1InventoryEntry>, Fixnum, Hash)>] Array<V1InventoryEntry> data, response status code and response headers
|
1370
1372
|
def list_inventory_with_http_info(location_id, opts = {})
|
1371
1373
|
if @api_client.config.debugging
|
@@ -1383,6 +1385,7 @@ module SquareConnect
|
|
1383
1385
|
# query parameters
|
1384
1386
|
query_params = {}
|
1385
1387
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1388
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
1386
1389
|
|
1387
1390
|
# header parameters
|
1388
1391
|
header_params = {}
|
@@ -1414,6 +1417,7 @@ module SquareConnect
|
|
1414
1417
|
# Provides summary information for all of a location's items.
|
1415
1418
|
# @param location_id The ID of the location to list items for.
|
1416
1419
|
# @param [Hash] opts the optional parameters
|
1420
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1417
1421
|
# @return [Array<V1Item>]
|
1418
1422
|
def list_items(location_id, opts = {})
|
1419
1423
|
data, _status_code, _headers = list_items_with_http_info(location_id, opts)
|
@@ -1424,6 +1428,7 @@ module SquareConnect
|
|
1424
1428
|
# Provides summary information for all of a location's items.
|
1425
1429
|
# @param location_id The ID of the location to list items for.
|
1426
1430
|
# @param [Hash] opts the optional parameters
|
1431
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
1427
1432
|
# @return [Array<(Array<V1Item>, Fixnum, Hash)>] Array<V1Item> data, response status code and response headers
|
1428
1433
|
def list_items_with_http_info(location_id, opts = {})
|
1429
1434
|
if @api_client.config.debugging
|
@@ -1436,6 +1441,7 @@ module SquareConnect
|
|
1436
1441
|
|
1437
1442
|
# query parameters
|
1438
1443
|
query_params = {}
|
1444
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
1439
1445
|
|
1440
1446
|
# header parameters
|
1441
1447
|
header_params = {}
|
@@ -133,6 +133,7 @@ module SquareConnect
|
|
133
133
|
# @param [Hash] opts the optional parameters
|
134
134
|
# @option opts [String] :order TThe order in which payments are listed in the response.
|
135
135
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
136
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
136
137
|
# @return [Array<V1Order>]
|
137
138
|
def list_orders(location_id, opts = {})
|
138
139
|
data, _status_code, _headers = list_orders_with_http_info(location_id, opts)
|
@@ -145,6 +146,7 @@ module SquareConnect
|
|
145
146
|
# @param [Hash] opts the optional parameters
|
146
147
|
# @option opts [String] :order TThe order in which payments are listed in the response.
|
147
148
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
149
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
148
150
|
# @return [Array<(Array<V1Order>, Fixnum, Hash)>] Array<V1Order> data, response status code and response headers
|
149
151
|
def list_orders_with_http_info(location_id, opts = {})
|
150
152
|
if @api_client.config.debugging
|
@@ -166,6 +168,7 @@ module SquareConnect
|
|
166
168
|
query_params = {}
|
167
169
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
168
170
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
171
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
169
172
|
|
170
173
|
# header parameters
|
171
174
|
header_params = {}
|
@@ -201,6 +204,7 @@ module SquareConnect
|
|
201
204
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
202
205
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
203
206
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
207
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
204
208
|
# @return [Array<V1Payment>]
|
205
209
|
def list_payments(location_id, opts = {})
|
206
210
|
data, _status_code, _headers = list_payments_with_http_info(location_id, opts)
|
@@ -215,6 +219,7 @@ module SquareConnect
|
|
215
219
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
216
220
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
217
221
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
222
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
218
223
|
# @return [Array<(Array<V1Payment>, Fixnum, Hash)>] Array<V1Payment> data, response status code and response headers
|
219
224
|
def list_payments_with_http_info(location_id, opts = {})
|
220
225
|
if @api_client.config.debugging
|
@@ -238,6 +243,7 @@ module SquareConnect
|
|
238
243
|
query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
|
239
244
|
query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
|
240
245
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
246
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
241
247
|
|
242
248
|
# header parameters
|
243
249
|
header_params = {}
|
@@ -273,6 +279,7 @@ module SquareConnect
|
|
273
279
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
274
280
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
275
281
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
282
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
276
283
|
# @return [Array<V1Refund>]
|
277
284
|
def list_refunds(location_id, opts = {})
|
278
285
|
data, _status_code, _headers = list_refunds_with_http_info(location_id, opts)
|
@@ -287,6 +294,7 @@ module SquareConnect
|
|
287
294
|
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year.
|
288
295
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
289
296
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
297
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
290
298
|
# @return [Array<(Array<V1Refund>, Fixnum, Hash)>] Array<V1Refund> data, response status code and response headers
|
291
299
|
def list_refunds_with_http_info(location_id, opts = {})
|
292
300
|
if @api_client.config.debugging
|
@@ -310,6 +318,7 @@ module SquareConnect
|
|
310
318
|
query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
|
311
319
|
query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
|
312
320
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
321
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
313
322
|
|
314
323
|
# header parameters
|
315
324
|
header_params = {}
|
@@ -346,6 +355,7 @@ module SquareConnect
|
|
346
355
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
347
356
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
348
357
|
# @option opts [String] :status Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
|
358
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
349
359
|
# @return [Array<V1Settlement>]
|
350
360
|
def list_settlements(location_id, opts = {})
|
351
361
|
data, _status_code, _headers = list_settlements_with_http_info(location_id, opts)
|
@@ -361,6 +371,7 @@ module SquareConnect
|
|
361
371
|
# @option opts [String] :end_time The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time.
|
362
372
|
# @option opts [Integer] :limit The maximum number of payments to return in a single response. This value cannot exceed 200.
|
363
373
|
# @option opts [String] :status Provide this parameter to retrieve only settlements with a particular status (SENT or FAILED).
|
374
|
+
# @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
364
375
|
# @return [Array<(Array<V1Settlement>, Fixnum, Hash)>] Array<V1Settlement> data, response status code and response headers
|
365
376
|
def list_settlements_with_http_info(location_id, opts = {})
|
366
377
|
if @api_client.config.debugging
|
@@ -388,6 +399,7 @@ module SquareConnect
|
|
388
399
|
query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
|
389
400
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
390
401
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
402
|
+
query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?
|
391
403
|
|
392
404
|
# header parameters
|
393
405
|
header_params = {}
|
@@ -28,10 +28,10 @@ module SquareConnect
|
|
28
28
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
29
29
|
def initialize(config = Configuration.default)
|
30
30
|
@config = config
|
31
|
-
|
31
|
+
|
32
32
|
# Construct user agent string. Returns slightly different string for JRuby
|
33
|
-
@user_agent = "Square-Connect-Ruby/2.2.
|
34
|
-
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.2.1"
|
34
|
+
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
37
37
|
'User-Agent' => @user_agent,
|
@@ -381,5 +381,19 @@ module SquareConnect
|
|
381
381
|
fail "unknown collection format: #{collection_format.inspect}"
|
382
382
|
end
|
383
383
|
end
|
384
|
+
|
385
|
+
# Extract batch_token from Link header if present
|
386
|
+
# @param [Hash] headers hash with response headers
|
387
|
+
# @return [String] batch_token or nil if no token is present
|
388
|
+
def get_v1_batch_token_from_headers(headers)
|
389
|
+
if headers.is_a?(Hash) && headers.has_key?('Link')
|
390
|
+
match = /^<([^>]+)>;rel='next'$/.match(headers['Link'])
|
391
|
+
if match
|
392
|
+
uri = URI.parse(match[1])
|
393
|
+
params = CGI.parse(uri.query)
|
394
|
+
return params['batch_token'][0]
|
395
|
+
end
|
396
|
+
end
|
397
|
+
end
|
384
398
|
end
|
385
399
|
end
|
@@ -15,7 +15,7 @@ module SquareConnect
|
|
15
15
|
# The pagination cursor returned in the previous response. Leave unset for an initial request. See [Paginating results](#paginatingresults) for more information.
|
16
16
|
attr_accessor :cursor
|
17
17
|
|
18
|
-
# The desired set of object types to
|
18
|
+
# The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`.
|
19
19
|
attr_accessor :object_types
|
20
20
|
|
21
21
|
# If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`.
|
@@ -21,6 +21,21 @@ module SquareConnect
|
|
21
21
|
# The amount of money refunded. This amount is always negative.
|
22
22
|
attr_accessor :refunded_money
|
23
23
|
|
24
|
+
# The amount of processing fee money refunded.
|
25
|
+
attr_accessor :refunded_processing_fee_money
|
26
|
+
|
27
|
+
# The amount of additive tax money refunded.
|
28
|
+
attr_accessor :refunded_additive_tax_money
|
29
|
+
|
30
|
+
# The amount of inclusive tax money refunded.
|
31
|
+
attr_accessor :refunded_inclusive_tax_money
|
32
|
+
|
33
|
+
# The amount of tip money refunded.
|
34
|
+
attr_accessor :refunded_tip_money
|
35
|
+
|
36
|
+
# The amount of discount money refunded.
|
37
|
+
attr_accessor :refunded_discount_money
|
38
|
+
|
24
39
|
# The time when the merchant initiated the refund for Square to process, in ISO 8601 format..
|
25
40
|
attr_accessor :created_at
|
26
41
|
|
@@ -61,6 +76,11 @@ module SquareConnect
|
|
61
76
|
:'type' => :'type',
|
62
77
|
:'reason' => :'reason',
|
63
78
|
:'refunded_money' => :'refunded_money',
|
79
|
+
:'refunded_processing_fee_money' => :'refunded_processing_fee_money',
|
80
|
+
:'refunded_additive_tax_money' => :'refunded_additive_tax_money',
|
81
|
+
:'refunded_inclusive_tax_money' => :'refunded_inclusive_tax_money',
|
82
|
+
:'refunded_tip_money' => :'refunded_tip_money',
|
83
|
+
:'refunded_discount_money' => :'refunded_discount_money',
|
64
84
|
:'created_at' => :'created_at',
|
65
85
|
:'processed_at' => :'processed_at',
|
66
86
|
:'payment_id' => :'payment_id',
|
@@ -74,6 +94,11 @@ module SquareConnect
|
|
74
94
|
:'type' => :'String',
|
75
95
|
:'reason' => :'String',
|
76
96
|
:'refunded_money' => :'V1Money',
|
97
|
+
:'refunded_processing_fee_money' => :'V1Money',
|
98
|
+
:'refunded_additive_tax_money' => :'V1Money',
|
99
|
+
:'refunded_inclusive_tax_money' => :'V1Money',
|
100
|
+
:'refunded_tip_money' => :'V1Money',
|
101
|
+
:'refunded_discount_money' => :'V1Money',
|
77
102
|
:'created_at' => :'String',
|
78
103
|
:'processed_at' => :'String',
|
79
104
|
:'payment_id' => :'String',
|
@@ -101,6 +126,26 @@ module SquareConnect
|
|
101
126
|
self.refunded_money = attributes[:'refunded_money']
|
102
127
|
end
|
103
128
|
|
129
|
+
if attributes.has_key?(:'refunded_processing_fee_money')
|
130
|
+
self.refunded_processing_fee_money = attributes[:'refunded_processing_fee_money']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'refunded_additive_tax_money')
|
134
|
+
self.refunded_additive_tax_money = attributes[:'refunded_additive_tax_money']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'refunded_inclusive_tax_money')
|
138
|
+
self.refunded_inclusive_tax_money = attributes[:'refunded_inclusive_tax_money']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'refunded_tip_money')
|
142
|
+
self.refunded_tip_money = attributes[:'refunded_tip_money']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'refunded_discount_money')
|
146
|
+
self.refunded_discount_money = attributes[:'refunded_discount_money']
|
147
|
+
end
|
148
|
+
|
104
149
|
if attributes.has_key?(:'created_at')
|
105
150
|
self.created_at = attributes[:'created_at']
|
106
151
|
end
|
@@ -152,6 +197,11 @@ module SquareConnect
|
|
152
197
|
type == o.type &&
|
153
198
|
reason == o.reason &&
|
154
199
|
refunded_money == o.refunded_money &&
|
200
|
+
refunded_processing_fee_money == o.refunded_processing_fee_money &&
|
201
|
+
refunded_additive_tax_money == o.refunded_additive_tax_money &&
|
202
|
+
refunded_inclusive_tax_money == o.refunded_inclusive_tax_money &&
|
203
|
+
refunded_tip_money == o.refunded_tip_money &&
|
204
|
+
refunded_discount_money == o.refunded_discount_money &&
|
155
205
|
created_at == o.created_at &&
|
156
206
|
processed_at == o.processed_at &&
|
157
207
|
payment_id == o.payment_id &&
|
@@ -167,7 +217,7 @@ module SquareConnect
|
|
167
217
|
# Calculates hash code according to all attributes.
|
168
218
|
# @return [Fixnum] Hash code
|
169
219
|
def hash
|
170
|
-
[type, reason, refunded_money, created_at, processed_at, payment_id, merchant_id].hash
|
220
|
+
[type, reason, refunded_money, refunded_processing_fee_money, refunded_additive_tax_money, refunded_inclusive_tax_money, refunded_tip_money, refunded_discount_money, created_at, processed_at, payment_id, merchant_id].hash
|
171
221
|
end
|
172
222
|
|
173
223
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module SquareConnect
|
|
21
21
|
# The ID of the variation's associated item.
|
22
22
|
attr_accessor :item_id
|
23
23
|
|
24
|
+
# Indicates the variation's list position when displayed in Square Register and the merchant dashboard. If more than one variation for the same item has the same ordinal value, those variations are displayed in alphabetical order
|
25
|
+
attr_accessor :ordinal
|
26
|
+
|
24
27
|
# Indicates whether the item variation's price is fixed or determined at the time of sale.
|
25
28
|
attr_accessor :pricing_type
|
26
29
|
|
@@ -70,6 +73,7 @@ module SquareConnect
|
|
70
73
|
:'id' => :'id',
|
71
74
|
:'name' => :'name',
|
72
75
|
:'item_id' => :'item_id',
|
76
|
+
:'ordinal' => :'ordinal',
|
73
77
|
:'pricing_type' => :'pricing_type',
|
74
78
|
:'price_money' => :'price_money',
|
75
79
|
:'sku' => :'sku',
|
@@ -86,6 +90,7 @@ module SquareConnect
|
|
86
90
|
:'id' => :'String',
|
87
91
|
:'name' => :'String',
|
88
92
|
:'item_id' => :'String',
|
93
|
+
:'ordinal' => :'Integer',
|
89
94
|
:'pricing_type' => :'String',
|
90
95
|
:'price_money' => :'V1Money',
|
91
96
|
:'sku' => :'String',
|
@@ -116,6 +121,10 @@ module SquareConnect
|
|
116
121
|
self.item_id = attributes[:'item_id']
|
117
122
|
end
|
118
123
|
|
124
|
+
if attributes.has_key?(:'ordinal')
|
125
|
+
self.ordinal = attributes[:'ordinal']
|
126
|
+
end
|
127
|
+
|
119
128
|
if attributes.has_key?(:'pricing_type')
|
120
129
|
self.pricing_type = attributes[:'pricing_type']
|
121
130
|
end
|
@@ -191,6 +200,7 @@ module SquareConnect
|
|
191
200
|
id == o.id &&
|
192
201
|
name == o.name &&
|
193
202
|
item_id == o.item_id &&
|
203
|
+
ordinal == o.ordinal &&
|
194
204
|
pricing_type == o.pricing_type &&
|
195
205
|
price_money == o.price_money &&
|
196
206
|
sku == o.sku &&
|
@@ -209,7 +219,7 @@ module SquareConnect
|
|
209
219
|
# Calculates hash code according to all attributes.
|
210
220
|
# @return [Fixnum] Hash code
|
211
221
|
def hash
|
212
|
-
[id, name, item_id, pricing_type, price_money, sku, track_inventory, inventory_alert_type, inventory_alert_threshold, user_data].hash
|
222
|
+
[id, name, item_id, ordinal, pricing_type, price_money, sku, track_inventory, inventory_alert_type, inventory_alert_threshold, user_data].hash
|
213
223
|
end
|
214
224
|
|
215
225
|
# Builds the object from hash
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: square_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1.145
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|