square_connect 2.20190410.0.296 → 2.20190410.1.300
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +9 -0
- data/README.md +2 -1
- data/docs/CatalogApi.md +2 -2
- data/docs/CatalogItem.md +1 -1
- data/docs/CatalogObject.md +2 -2
- data/docs/CatalogQuery.md +1 -1
- data/docs/ChargeRequest.md +1 -1
- data/docs/Employee.md +2 -0
- data/docs/ListCatalogRequest.md +1 -1
- data/docs/ObtainTokenResponse.md +1 -1
- data/docs/UpsertCatalogObjectRequest.md +1 -1
- data/docs/V1Tender.md +1 -1
- data/docs/V1TenderCardBrand.md +20 -0
- data/lib/square_connect.rb +1 -0
- data/lib/square_connect/api/catalog_api.rb +2 -2
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/catalog_item.rb +1 -1
- data/lib/square_connect/models/catalog_object.rb +2 -2
- data/lib/square_connect/models/catalog_query.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +1 -1
- data/lib/square_connect/models/employee.rb +21 -1
- data/lib/square_connect/models/list_catalog_request.rb +1 -1
- data/lib/square_connect/models/obtain_token_response.rb +1 -1
- data/lib/square_connect/models/upsert_catalog_object_request.rb +1 -1
- data/lib/square_connect/models/v1_tender.rb +3 -3
- data/lib/square_connect/models/v1_tender_card_brand.rb +26 -0
- data/lib/square_connect/version.rb +1 -1
- data/spec/models/v1_tender_card_brand_spec.rb +33 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bcb02119064a21528d200b6be9b14baa14513f8b48bf1e377c841a061771e1e
|
4
|
+
data.tar.gz: a8ad568add73fa4a36f81359f91a9fea03b14ecdb74eb04aa8428d8d0f9bc52f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34bd37cdd6649497ad7d9cd87f61231883f6f90685075b1116dd256fae435e52925df91328c38244984a9d9dcfa5ee7fb1e96b9d72645d9a4b7af3504edee12
|
7
|
+
data.tar.gz: b6520b8a148d712be502083ca28c8b6ee4f9b04e002c8b4b172819024d1440afe36892fddcc4f7140ef7649854f3928aa0d28483ec46dd228a3d0ec37c18b8af
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## Version 2.20190410.1 (2019-04-24)
|
4
|
+
|
5
|
+
## Details
|
6
|
+
|
7
|
+
* **New functionality**: Employees API (Connect v2) — New fields to
|
8
|
+
capture contact information for employee profiles.
|
9
|
+
* **New functionality**: `V1Tender.CardBrand` — New V1 enum to represent
|
10
|
+
brand information for credit cars.
|
11
|
+
|
3
12
|
## Version 2.20190410.0 (2019-04-10)
|
4
13
|
|
5
14
|
## New features: Orders API beta
|
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.20190410.
|
13
|
+
- Package version: 2.20190410.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)
|
@@ -579,6 +579,7 @@ Class | Method | HTTP request | Description
|
|
579
579
|
- [SquareConnect::V1SettlementEntryType](docs/V1SettlementEntryType.md)
|
580
580
|
- [SquareConnect::V1SettlementStatus](docs/V1SettlementStatus.md)
|
581
581
|
- [SquareConnect::V1Tender](docs/V1Tender.md)
|
582
|
+
- [SquareConnect::V1TenderCardBrand](docs/V1TenderCardBrand.md)
|
582
583
|
- [SquareConnect::V1TenderEntryMethod](docs/V1TenderEntryMethod.md)
|
583
584
|
- [SquareConnect::V1TenderType](docs/V1TenderType.md)
|
584
585
|
- [SquareConnect::V1Timecard](docs/V1Timecard.md)
|
data/docs/CatalogApi.md
CHANGED
@@ -292,7 +292,7 @@ api_instance = SquareConnect::CatalogApi.new
|
|
292
292
|
|
293
293
|
opts = {
|
294
294
|
cursor: "cursor_example", # String | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
295
|
-
types: "types_example" # String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely
|
295
|
+
types: "types_example" # String | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
296
296
|
}
|
297
297
|
|
298
298
|
begin
|
@@ -309,7 +309,7 @@ end
|
|
309
309
|
Name | Type | Description | Notes
|
310
310
|
------------- | ------------- | ------------- | -------------
|
311
311
|
**cursor** | **String**| The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional]
|
312
|
-
**types** | **String**| An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `
|
312
|
+
**types** | **String**| An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. | [optional]
|
313
313
|
|
314
314
|
### Return type
|
315
315
|
|
data/docs/CatalogItem.md
CHANGED
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**name** | **String** | The item's name. Searchable. This field must not be empty. This field has max length of 512 Unicode code points. | [optional]
|
11
11
|
**description** | **String** | The item's description. Searchable. This field has max length of 4096 Unicode code points. | [optional]
|
12
|
-
**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
|
12
|
+
**abbreviation** | **String** | The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points. | [optional]
|
13
13
|
**label_color** | **String** | The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code. | [optional]
|
14
14
|
**available_online** | **BOOLEAN** | If `true`, the item can be added to shipping orders from the merchant's online store. | [optional]
|
15
15
|
**available_for_pickup** | **BOOLEAN** | If `true`, the item can be added to pickup orders from the merchant's online store. | [optional]
|
data/docs/CatalogObject.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
|
5
|
+
The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
|
|
10
10
|
**type** | **String** | The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values |
|
11
11
|
**id** | **String** | An identifier to reference this object in the catalog. When a new CatalogObject is inserted, the client should set the id to a temporary identifier starting with a `'#'` character. Other objects being inserted or updated within the same request may use this identifier to refer to the new object. When the server receives the new object, it will supply a unique identifier that replaces the temporary identifier for all future references. |
|
12
12
|
**updated_at** | **String** | Last modification [timestamp](#workingwithdates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds. | [optional]
|
13
|
-
**version** | **Integer** | The version of the object. When updating an object, the version supplied
|
13
|
+
**version** | **Integer** | The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting. | [optional]
|
14
14
|
**is_deleted** | **BOOLEAN** | If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time. | [optional]
|
15
15
|
**catalog_v1_ids** | [**Array<CatalogV1Id>**](CatalogV1Id.md) | The Connect V1 IDs for this object at each [location](#type-location) where it is present, where they differ from the object's Connect V2 ID. The field will only be present for objects that have been created or modified by legacy APIs. | [optional]
|
16
16
|
**present_at_all_locations** | **BOOLEAN** | If `true`, this object is present at all locations (including future locations), except where specified in the `absent_at_location_ids` field. If `false`, this object is not present at any locations (including future locations), except where specified in the `present_at_location_ids` field. If not specified, defaults to `true`. | [optional]
|
data/docs/CatalogQuery.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
### Description
|
4
4
|
|
5
|
-
A query to be applied to a
|
5
|
+
A query to be applied to a [SearchCatalogObjectsRequest](#type-searchcatalogobjectsrequest). Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
|
6
6
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
data/docs/ChargeRequest.md
CHANGED
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**customer_card_id** | **String** | The ID of the customer card on file to charge. Do not provide a value for this field if you provide a value for `card_nonce`. If you provide this value, you _must_ also provide a value for `customer_id`. | [optional]
|
14
14
|
**delay_capture** | **BOOLEAN** | If `true`, the request will only perform an Auth on the provided card. You can then later perform either a Capture (with the [CaptureTransaction](#endpoint-capturetransaction) endpoint) or a Void (with the [VoidTransaction](#endpoint-voidtransaction) endpoint). Default value: `false` | [optional]
|
15
15
|
**reference_id** | **String** | An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters. | [optional]
|
16
|
-
**note** | **String** | | [optional]
|
16
|
+
**note** | **String** | An optional note to associate with the transaction. This value cannot exceed 60 characters. | [optional]
|
17
17
|
**customer_id** | **String** | The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise. | [optional]
|
18
18
|
**billing_address** | [**Address**](Address.md) | The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided. | [optional]
|
19
19
|
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional]
|
data/docs/Employee.md
CHANGED
@@ -10,6 +10,8 @@ Name | Type | Description | Notes
|
|
10
10
|
**id** | **String** | UUID for this `Employee`. | [optional]
|
11
11
|
**first_name** | **String** | Given (first) name of the employee. | [optional]
|
12
12
|
**last_name** | **String** | Family (last) name of the employee | [optional]
|
13
|
+
**email** | **String** | Email of the employee | [optional]
|
14
|
+
**phone_number** | **String** | Phone number of the employee in E.164 format, i.e. \"+12125554250\" | [optional]
|
13
15
|
**location_ids** | **Array<String>** | A list of location IDs where this employee has access. | [optional]
|
14
16
|
**status** | **String** | Specifies the status of the employee being fetched. See [EmployeeStatus](#type-employeestatus) for possible values | [optional]
|
15
17
|
**created_at** | **String** | A read-only timestamp in RFC 3339 format. | [optional]
|
data/docs/ListCatalogRequest.md
CHANGED
@@ -8,6 +8,6 @@
|
|
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 [Pagination](/basics/api101/pagination) for more information. | [optional]
|
11
|
-
**types** | **String** | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `
|
11
|
+
**types** | **String** | An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`. | [optional]
|
12
12
|
|
13
13
|
|
data/docs/ObtainTokenResponse.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
## Properties
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
|
-
**access_token** | **String** | A valid OAuth access token. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information. | [optional]
|
10
|
+
**access_token** | **String** | A valid OAuth access token. OAuth access tokens are 64 bytes long. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information. | [optional]
|
11
11
|
**token_type** | **String** | This value is always _bearer_. | [optional]
|
12
12
|
**expires_at** | **String** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional]
|
13
13
|
**merchant_id** | **String** | The ID of the authorizing merchant's business. | [optional]
|
@@ -8,6 +8,6 @@
|
|
8
8
|
Name | Type | Description | Notes
|
9
9
|
------------ | ------------- | ------------- | -------------
|
10
10
|
**idempotency_key** | **String** | A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency](/basics/api101/idempotency) for more information. |
|
11
|
-
**object** | [**CatalogObject**](CatalogObject.md) | A [CatalogObject](#type-catalogobject) to be created or updated.
|
11
|
+
**object** | [**CatalogObject**](CatalogObject.md) | A [CatalogObject](#type-catalogobject) to be created or updated. - For updates, the object must be active (the `is_deleted` field is not `true`). - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID. |
|
12
12
|
|
13
13
|
|
data/docs/V1Tender.md
CHANGED
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
|
12
12
|
**name** | **String** | A human-readable description of the tender. | [optional]
|
13
13
|
**employee_id** | **String** | The ID of the employee that processed the tender. | [optional]
|
14
14
|
**receipt_url** | **String** | The URL of the receipt for the tender. | [optional]
|
15
|
-
**card_brand** | **String** | The brand of credit card provided. See [
|
15
|
+
**card_brand** | **String** | The brand of credit card provided. See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values | [optional]
|
16
16
|
**pan_suffix** | **String** | The last four digits of the provided credit card's account number. | [optional]
|
17
17
|
**entry_method** | **String** | The tender's unique ID. See [V1TenderEntryMethod](#type-v1tenderentrymethod) for possible values | [optional]
|
18
18
|
**payment_note** | **String** | Notes entered by the merchant about the tender at the time of payment, if any. Typically only present for tender with the type: OTHER. | [optional]
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# SquareConnect::V1TenderCardBrand
|
2
|
+
|
3
|
+
### Description
|
4
|
+
|
5
|
+
The brand of a credit card.
|
6
|
+
|
7
|
+
## Properties
|
8
|
+
Name | Type
|
9
|
+
------------ | -------------
|
10
|
+
**OTHER_BRAND** | string
|
11
|
+
**VISA** | string
|
12
|
+
**MASTER_CARD** | string
|
13
|
+
**AMERICAN_EXPRESS** | string
|
14
|
+
**DISCOVER** | string
|
15
|
+
**DISCOVER_DINERS** | string
|
16
|
+
**JCB** | string
|
17
|
+
**CHINA_UNIONPAY** | string
|
18
|
+
**SQUARE_GIFT_CARD** | string
|
19
|
+
|
20
|
+
|
data/lib/square_connect.rb
CHANGED
@@ -387,6 +387,7 @@ require 'square_connect/models/v1_settlement_entry'
|
|
387
387
|
require 'square_connect/models/v1_settlement_entry_type'
|
388
388
|
require 'square_connect/models/v1_settlement_status'
|
389
389
|
require 'square_connect/models/v1_tender'
|
390
|
+
require 'square_connect/models/v1_tender_card_brand'
|
390
391
|
require 'square_connect/models/v1_tender_entry_method'
|
391
392
|
require 'square_connect/models/v1_tender_type'
|
392
393
|
require 'square_connect/models/v1_timecard'
|
@@ -292,7 +292,7 @@ module SquareConnect
|
|
292
292
|
# Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
|
293
293
|
# @param [Hash] opts the optional parameters
|
294
294
|
# @option opts [String] :cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
295
|
-
# @option opts [String] :types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `
|
295
|
+
# @option opts [String] :types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
296
296
|
# @return [ListCatalogResponse]
|
297
297
|
def list_catalog(opts = {})
|
298
298
|
data, _status_code, _headers = list_catalog_with_http_info(opts)
|
@@ -303,7 +303,7 @@ module SquareConnect
|
|
303
303
|
# Returns a list of [CatalogObject](#type-catalogobject)s that includes all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem) and [CatalogTax](#type-catalogtax) objects) in the catalog. The types parameter is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types: `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
|
304
304
|
# @param [Hash] opts the optional parameters
|
305
305
|
# @option opts [String] :cursor The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
306
|
-
# @option opts [String] :types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `
|
306
|
+
# @option opts [String] :types An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
307
307
|
# @return [Array<(ListCatalogResponse, Fixnum, Hash)>] ListCatalogResponse data, response status code and response headers
|
308
308
|
def list_catalog_with_http_info(opts = {})
|
309
309
|
if @api_client.config.debugging
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
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.20190410.
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.20190410.1"
|
34
34
|
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
@@ -18,7 +18,7 @@ module SquareConnect
|
|
18
18
|
# The item's description. Searchable. This field has max length of 4096 Unicode code points.
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
-
# The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used.
|
21
|
+
# The text of the item's display label in the Square Point of Sale app. Only up to the first five characters of the string are used. Searchable. This field has max length of 24 Unicode code points.
|
22
22
|
attr_accessor :abbreviation
|
23
23
|
|
24
24
|
# The color of the item's display label in the Square Point of Sale app. This must be a valid hex color code.
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
|
13
|
+
# The wrapper object for object types in the Catalog data model. The type of a particular `CatalogObject` is determined by the value of `type` and only the corresponding data field may be set. - if type = `ITEM`, only `item_data` will be populated and it will contain a valid [CatalogItem](#type-catalogitem) object. - if type = `ITEM_VARIATION`, only `item_variation_data` will be populated and it will contain a valid [CatalogItemVariation](#type-catalogitemvariation) object. - if type = `MODIFIER`, only `modifier_data` will be populated and it will contain a valid [CatalogModifier](#type-catalogmodifier) object. - if type = `MODIFIER_LIST`, only `modifier_list_data` will be populated and it will contain a valid [CatalogModifierList](#type-catalogmodifierlist) object. - if type = `CATEGORY`, only `category_data` will be populated and it will contain a valid [CatalogCategory](#type-catalogcategory) object. - if type = `DISCOUNT`, only `discount_data` will be populated and it will contain a valid [CatalogDiscount](#type-catalogdiscount) object. - if type = `TAX`, only `tax_data` will be populated and it will contain a valid [CatalogTax](#type-catalogtax) object. - if type = `IMAGE`, only `image_data` will be populated and it will contain a valid [CatalogImage](#type-catalogimage) object. For a more detailed discussion of the Catalog data model, please see the [Catalog Overview](/products/catalog/overview).
|
14
14
|
class CatalogObject
|
15
15
|
# The type of this object. Each object type has expected properties expressed in a structured format within its corresponding `*_data` field below. See [CatalogObjectType](#type-catalogobjecttype) for possible values
|
16
16
|
attr_accessor :type
|
@@ -21,7 +21,7 @@ module SquareConnect
|
|
21
21
|
# Last modification [timestamp](#workingwithdates) in RFC 3339 format, e.g., `\"2016-08-15T23:59:33.123Z\"` would indicate the UTC time (denoted by `Z`) of August 15, 2016 at 23:59:33 and 123 milliseconds.
|
22
22
|
attr_accessor :updated_at
|
23
23
|
|
24
|
-
# The version of the object. When updating an object, the version supplied
|
24
|
+
# The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.
|
25
25
|
attr_accessor :version
|
26
26
|
|
27
27
|
# If `true`, the object has been deleted from the database. Must be `false` for new objects being inserted. When deleted, the `updated_at` field will equal the deletion time.
|
@@ -10,7 +10,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
10
10
|
require 'date'
|
11
11
|
|
12
12
|
module SquareConnect
|
13
|
-
# A query to be applied to a
|
13
|
+
# A query to be applied to a [SearchCatalogObjectsRequest](#type-searchcatalogobjectsrequest). Only one query field may be present. Where an attribute name is required, it should be specified as the name of any field marked \"searchable\" from the structured data types for the desired result object type(s) ([CatalogItem](#type-catalogitem), [CatalogItemVariation](#type-catalogitemvariation), [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax), [CatalogDiscount](#type-catalogdiscount), [CatalogModifierList](#type-catalogmodifierlist), [CatalogModifier](#type-catalogmodifier)). For example, a query that should return Items may specify attribute names from any of the searchable fields of the [CatalogItem](#type-catalogitem) data type, namely `\"name\"`, `\"description\"`, and `\"abbreviation\"`.
|
14
14
|
class CatalogQuery
|
15
15
|
# A query that returns all objects, sorted by the given attribute.
|
16
16
|
attr_accessor :sorted_attribute_query
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
30
30
|
# An optional ID you can associate with the transaction for your own purposes (such as to associate the transaction with an entity ID in your own database). This value cannot exceed 40 characters.
|
31
31
|
attr_accessor :reference_id
|
32
32
|
|
33
|
-
#
|
33
|
+
# An optional note to associate with the transaction. This value cannot exceed 60 characters.
|
34
34
|
attr_accessor :note
|
35
35
|
|
36
36
|
# The ID of the customer to associate this transaction with. This field is required if you provide a value for `customer_card_id`, and optional otherwise.
|
@@ -21,6 +21,12 @@ module SquareConnect
|
|
21
21
|
# Family (last) name of the employee
|
22
22
|
attr_accessor :last_name
|
23
23
|
|
24
|
+
# Email of the employee
|
25
|
+
attr_accessor :email
|
26
|
+
|
27
|
+
# Phone number of the employee in E.164 format, i.e. \"+12125554250\"
|
28
|
+
attr_accessor :phone_number
|
29
|
+
|
24
30
|
# A list of location IDs where this employee has access.
|
25
31
|
attr_accessor :location_ids
|
26
32
|
|
@@ -61,6 +67,8 @@ module SquareConnect
|
|
61
67
|
:'id' => :'id',
|
62
68
|
:'first_name' => :'first_name',
|
63
69
|
:'last_name' => :'last_name',
|
70
|
+
:'email' => :'email',
|
71
|
+
:'phone_number' => :'phone_number',
|
64
72
|
:'location_ids' => :'location_ids',
|
65
73
|
:'status' => :'status',
|
66
74
|
:'created_at' => :'created_at',
|
@@ -74,6 +82,8 @@ module SquareConnect
|
|
74
82
|
:'id' => :'String',
|
75
83
|
:'first_name' => :'String',
|
76
84
|
:'last_name' => :'String',
|
85
|
+
:'email' => :'String',
|
86
|
+
:'phone_number' => :'String',
|
77
87
|
:'location_ids' => :'Array<String>',
|
78
88
|
:'status' => :'String',
|
79
89
|
:'created_at' => :'String',
|
@@ -101,6 +111,14 @@ module SquareConnect
|
|
101
111
|
self.last_name = attributes[:'last_name']
|
102
112
|
end
|
103
113
|
|
114
|
+
if attributes.has_key?(:'email')
|
115
|
+
self.email = attributes[:'email']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'phone_number')
|
119
|
+
self.phone_number = attributes[:'phone_number']
|
120
|
+
end
|
121
|
+
|
104
122
|
if attributes.has_key?(:'location_ids')
|
105
123
|
if (value = attributes[:'location_ids']).is_a?(Array)
|
106
124
|
self.location_ids = value
|
@@ -154,6 +172,8 @@ module SquareConnect
|
|
154
172
|
id == o.id &&
|
155
173
|
first_name == o.first_name &&
|
156
174
|
last_name == o.last_name &&
|
175
|
+
email == o.email &&
|
176
|
+
phone_number == o.phone_number &&
|
157
177
|
location_ids == o.location_ids &&
|
158
178
|
status == o.status &&
|
159
179
|
created_at == o.created_at &&
|
@@ -169,7 +189,7 @@ module SquareConnect
|
|
169
189
|
# Calculates hash code according to all attributes.
|
170
190
|
# @return [Fixnum] Hash code
|
171
191
|
def hash
|
172
|
-
[id, first_name, last_name, location_ids, status, created_at, updated_at].hash
|
192
|
+
[id, first_name, last_name, email, phone_number, location_ids, status, created_at, updated_at].hash
|
173
193
|
end
|
174
194
|
|
175
195
|
# Builds the object from hash
|
@@ -15,7 +15,7 @@ module SquareConnect
|
|
15
15
|
# The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information.
|
16
16
|
attr_accessor :cursor
|
17
17
|
|
18
|
-
# An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely
|
18
|
+
# An optional case-insensitive, comma-separated list of object types to retrieve, for example `ITEM,ITEM_VARIATION,CATEGORY,IMAGE`. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`, `MODIFIER`, `MODIFIER_LIST`, or `IMAGE`.
|
19
19
|
attr_accessor :types
|
20
20
|
|
21
21
|
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
module SquareConnect
|
13
13
|
#
|
14
14
|
class ObtainTokenResponse
|
15
|
-
# A valid OAuth access token. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information.
|
15
|
+
# A valid OAuth access token. OAuth access tokens are 64 bytes long. Provide the access token in a header with every request to Connect API endpoints. See the [Build with OAuth](/authz/oauth/build-with-the-api) guide for more information.
|
16
16
|
attr_accessor :access_token
|
17
17
|
|
18
18
|
# This value is always _bearer_.
|
@@ -15,7 +15,7 @@ module SquareConnect
|
|
15
15
|
# A value you specify that uniquely identifies this request among all your requests. A common way to create a valid idempotency key is to use a Universally unique identifier (UUID). If you're unsure whether a particular request was successful, you can reattempt it with the same idempotency key without worrying about creating duplicate objects. See [Idempotency](/basics/api101/idempotency) for more information.
|
16
16
|
attr_accessor :idempotency_key
|
17
17
|
|
18
|
-
# A [CatalogObject](#type-catalogobject) to be created or updated.
|
18
|
+
# A [CatalogObject](#type-catalogobject) to be created or updated. - For updates, the object must be active (the `is_deleted` field is not `true`). - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID.
|
19
19
|
attr_accessor :object
|
20
20
|
|
21
21
|
|
@@ -27,7 +27,7 @@ module SquareConnect
|
|
27
27
|
# The URL of the receipt for the tender.
|
28
28
|
attr_accessor :receipt_url
|
29
29
|
|
30
|
-
# The brand of credit card provided. See [
|
30
|
+
# The brand of credit card provided. See [V1TenderCardBrand](#type-v1tendercardbrand) for possible values
|
31
31
|
attr_accessor :card_brand
|
32
32
|
|
33
33
|
# The last four digits of the provided credit card's account number.
|
@@ -212,7 +212,7 @@ module SquareConnect
|
|
212
212
|
def valid?
|
213
213
|
type_validator = EnumAttributeValidator.new('String', ["CREDIT_CARD", "CASH", "THIRD_PARTY_CARD", "NO_SALE", "SQUARE_WALLET", "SQUARE_GIFT_CARD", "UNKNOWN", "OTHER"])
|
214
214
|
return false unless type_validator.valid?(@type)
|
215
|
-
card_brand_validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "
|
215
|
+
card_brand_validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "MASTER_CARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD"])
|
216
216
|
return false unless card_brand_validator.valid?(@card_brand)
|
217
217
|
entry_method_validator = EnumAttributeValidator.new('String', ["MANUAL", "SCANNED", "SQUARE_CASH", "SQUARE_WALLET", "SWIPED", "WEB_FORM", "OTHER"])
|
218
218
|
return false unless entry_method_validator.valid?(@entry_method)
|
@@ -232,7 +232,7 @@ module SquareConnect
|
|
232
232
|
# Custom attribute writer method checking allowed values (enum).
|
233
233
|
# @param [Object] card_brand Object to be assigned
|
234
234
|
def card_brand=(card_brand)
|
235
|
-
validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "
|
235
|
+
validator = EnumAttributeValidator.new('String', ["OTHER_BRAND", "VISA", "MASTER_CARD", "AMERICAN_EXPRESS", "DISCOVER", "DISCOVER_DINERS", "JCB", "CHINA_UNIONPAY", "SQUARE_GIFT_CARD"])
|
236
236
|
unless validator.valid?(card_brand)
|
237
237
|
fail ArgumentError, "invalid value for 'card_brand', must be one of #{validator.allowable_values}."
|
238
238
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
=begin
|
2
|
+
#Square Connect API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0
|
5
|
+
Contact: developers@squareup.com
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
|
12
|
+
module SquareConnect
|
13
|
+
class V1TenderCardBrand
|
14
|
+
|
15
|
+
OTHER_BRAND = "OTHER_BRAND".freeze
|
16
|
+
VISA = "VISA".freeze
|
17
|
+
MASTER_CARD = "MASTER_CARD".freeze
|
18
|
+
AMERICAN_EXPRESS = "AMERICAN_EXPRESS".freeze
|
19
|
+
DISCOVER = "DISCOVER".freeze
|
20
|
+
DISCOVER_DINERS = "DISCOVER_DINERS".freeze
|
21
|
+
JCB = "JCB".freeze
|
22
|
+
CHINA_UNIONPAY = "CHINA_UNIONPAY".freeze
|
23
|
+
SQUARE_GIFT_CARD = "SQUARE_GIFT_CARD".freeze
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
=begin
|
2
|
+
#Square Connect API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0
|
5
|
+
Contact: developers@squareup.com
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'spec_helper'
|
11
|
+
require 'json'
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
# Unit tests for SquareConnect::V1TenderCardBrand
|
15
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
16
|
+
# Please update as you see appropriate
|
17
|
+
describe 'V1TenderCardBrand' do
|
18
|
+
before do
|
19
|
+
# run before each test
|
20
|
+
@instance = SquareConnect::V1TenderCardBrand.new
|
21
|
+
end
|
22
|
+
|
23
|
+
after do
|
24
|
+
# run after each test
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'test an instance of V1TenderCardBrand' do
|
28
|
+
it 'should create an instact of V1TenderCardBrand' do
|
29
|
+
expect(@instance).to be_instance_of(SquareConnect::V1TenderCardBrand)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
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.20190410.
|
4
|
+
version: 2.20190410.1.300
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -592,6 +592,7 @@ files:
|
|
592
592
|
- docs/V1SettlementEntryType.md
|
593
593
|
- docs/V1SettlementStatus.md
|
594
594
|
- docs/V1Tender.md
|
595
|
+
- docs/V1TenderCardBrand.md
|
595
596
|
- docs/V1TenderEntryMethod.md
|
596
597
|
- docs/V1TenderType.md
|
597
598
|
- docs/V1Timecard.md
|
@@ -1014,6 +1015,7 @@ files:
|
|
1014
1015
|
- lib/square_connect/models/v1_settlement_entry_type.rb
|
1015
1016
|
- lib/square_connect/models/v1_settlement_status.rb
|
1016
1017
|
- lib/square_connect/models/v1_tender.rb
|
1018
|
+
- lib/square_connect/models/v1_tender_card_brand.rb
|
1017
1019
|
- lib/square_connect/models/v1_tender_entry_method.rb
|
1018
1020
|
- lib/square_connect/models/v1_tender_type.rb
|
1019
1021
|
- lib/square_connect/models/v1_timecard.rb
|
@@ -1433,6 +1435,7 @@ files:
|
|
1433
1435
|
- spec/models/v1_settlement_entry_type_spec.rb
|
1434
1436
|
- spec/models/v1_settlement_spec.rb
|
1435
1437
|
- spec/models/v1_settlement_status_spec.rb
|
1438
|
+
- spec/models/v1_tender_card_brand_spec.rb
|
1436
1439
|
- spec/models/v1_tender_entry_method_spec.rb
|
1437
1440
|
- spec/models/v1_tender_spec.rb
|
1438
1441
|
- spec/models/v1_tender_type_spec.rb
|
@@ -1575,6 +1578,7 @@ test_files:
|
|
1575
1578
|
- spec/models/create_customer_request_spec.rb
|
1576
1579
|
- spec/models/void_transaction_request_spec.rb
|
1577
1580
|
- spec/models/v1_variation_pricing_type_spec.rb
|
1581
|
+
- spec/models/v1_tender_card_brand_spec.rb
|
1578
1582
|
- spec/models/create_refund_request_spec.rb
|
1579
1583
|
- spec/models/date_range_spec.rb
|
1580
1584
|
- spec/models/retrieve_transaction_response_spec.rb
|