Skip to content

Commit 1a43b33

Browse files
Merge pull request #9 from square/release/5.1.0.20200325
release
2 parents 7fa01b0 + 4cd79ba commit 1a43b33

File tree

72 files changed

+1738
-659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1738
-659
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## Version 5.1.0.20200325 (2020-03-25)
4+
## Existing API updates
5+
* **[Payments API](${SQUARE_TECH_REF}/payments-api).** In support of the existing [Delayed capture](payments-api/take-payments) for payments, the following fields are added to the [Payment](${SQUARE_TECH_REF}/objects/Payment) type:
6+
* `delay_duration`. In a [CreatePayment](${SQUARE_TECH_REF}/payments-api/create-payment) request, you can set `autocomplete` to false to get payment approval but not charge the payment source. You can now add this field to specify a time period to complete (or cancel) the payment. For more information, see [Delay capture](payments-api/take-payments).
7+
* `delay_action`. Defines the action that Square takes on the payment when the `delay_duration` elapses. In this release, the API supports only the cancel payment action.
8+
* `delayed_until`. Provides the date and time on Square servers when Square applies `delay_action` on the payment.
9+
310
## Version 5.0.0.20200226 (2020-02-26)
411
## API releases
512
* **GA release**: All SDKs have been updated to support the new Bank Accounts and CashDrawerShifts APIs.

doc/models/cancel-payment-response.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint
1818
```json
1919
{
2020
"payment": {
21-
"id": "YNR82sYrdgYlEEvJHnkJ7jrRuaB",
21+
"id": "GQTFp1ZlXdpoW4o6eGiZhbjosiDFf",
2222
"created_at": "2018-10-17T20:38:46.743Z",
2323
"updated_at": "2018-10-17T20:38:57.693Z",
2424
"amount_money": {
@@ -42,14 +42,22 @@ Return value from the [CancelPayment](#endpoint-payments-cancelpayment) endpoint
4242
"last_4": "1234",
4343
"exp_month": 2,
4444
"exp_year": 2024,
45-
"fingerprint": "sq-1-9PP0tWfcM6vIsYmfsesdjfhduHSDFNdJFNDfDNFjdfjpseirDErsaP"
45+
"fingerprint": "sq-1-9PP0tWfcM6vIsYmfsesdjfhduHSDFNdJFNDfDNFjdfjpseirDErsaP",
46+
"card_type": "DEBIT",
47+
"prepaid_type": "PREPAID",
48+
"bin": "411111"
4649
},
4750
"entry_method": "KEYED",
4851
"cvv_status": "CVV_ACCEPTED",
4952
"avs_status": "AVS_ACCEPTED",
50-
"auth_result_code": "eWZBDh"
53+
"auth_result_code": "eWZBDh",
54+
"statement_description": "SQ *MY MERCHANT"
5155
},
52-
"reference_id": "12323232323"
56+
"location_id": "XTI0H92143A39",
57+
"order_id": "m2Hr8Hk8A3CTyQQ1k4ynExg92tO3",
58+
"reference_id": "123456",
59+
"note": "Brief description",
60+
"customer_id": "RDX9Z4XTIZR7MRZJUXNY9HUK6I"
5361
}
5462
}
5563
```

doc/models/cash-payment-details.md

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Catalog Custom Attribute Definition App Visibility
2+
3+
Defines the visibility of a custom attribute to applications other than their
4+
creating application.
5+
6+
### Enumeration
7+
8+
`CatalogCustomAttributeDefinitionAppVisibility`
9+
10+
### Fields
11+
12+
| Name | Description |
13+
| --- | --- |
14+
| `APPVISIBILITYHIDDEN` | Other applications cannot read this custom attribute. |
15+
| `APPVISIBILITYREADONLY` | Other applications can read this custom attribute definition and<br>values. |
16+
| `APPVISIBILITYREADWRITEVALUES` | Other applications can read and write custom attribute values on objects.<br>They can read but cannot edit the custom attribute definition. |
17+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Catalog Custom Attribute Definition Selection Config Custom Attribute Selection
2+
3+
A named selection for this `SELECTION`-type custom attribute definition.
4+
5+
### Structure
6+
7+
`CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection`
8+
9+
### Fields
10+
11+
| Name | Type | Tags | Description |
12+
| --- | --- | --- | --- |
13+
| `Uid` | `String` | Optional | Unique ID set by Square. |
14+
| `Name` | `String` | | Selection name, unique within `allowed_selections`.<br>Required. Min length of 1, max length of 255. |
15+
16+
### Example (as JSON)
17+
18+
```json
19+
{
20+
"uid": null,
21+
"name": "name0"
22+
}
23+
```
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Catalog Custom Attribute Definition Selection Config
2+
3+
Configuration associated with `SELECTION`-type custom attribute definitions.
4+
5+
### Structure
6+
7+
`CatalogCustomAttributeDefinitionSelectionConfig`
8+
9+
### Fields
10+
11+
| Name | Type | Tags | Description |
12+
| --- | --- | --- | --- |
13+
| `MaxAllowedSelections` | `Integer` | Optional | The maximum number of selections that can be set. The maximum value for this<br>attribute is 100. May be modified, but changing the value will not<br>affect existing custom attribute values on objects. Clients need to<br>handle Custom Attributes with more selected values than allowed by this limit. |
14+
| `AllowedSelections` | [`List<CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection>`](/doc/models/catalog-custom-attribute-definition-selection-config-custom-attribute-selection.md) | Optional | The set of valid `CatalogCustomAttributeSelections`. Up to a maximum of 100<br>selections can be defined. Can be modified. |
15+
16+
### Example (as JSON)
17+
18+
```json
19+
{
20+
"max_allowed_selections": null,
21+
"allowed_selections": null
22+
}
23+
```
24+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Catalog Custom Attribute Definition Seller Visibility
2+
3+
Defines the visibility of a custom attribute to sellers in Square
4+
client applications, Square APIs or in Square UIs (including Square Point
5+
of Sale applications and Square Dashboard).
6+
7+
### Enumeration
8+
9+
`CatalogCustomAttributeDefinitionSellerVisibility`
10+
11+
### Fields
12+
13+
| Name | Description |
14+
| --- | --- |
15+
| `SELLERVISIBILITYHIDDEN` | Sellers cannot read this custom attribute in Square client<br>applications or Square APIs. |
16+
| `SELLERVISIBILITYREADWRITEVALUES` | Sellers can read and write this custom attribute value in catalog objects,<br>but cannot edit the custom attribute definition. |
17+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Catalog Custom Attribute Definition String Config
2+
3+
Configuration associated with Custom Attribute Definitions of type `STRING`.
4+
5+
### Structure
6+
7+
`CatalogCustomAttributeDefinitionStringConfig`
8+
9+
### Fields
10+
11+
| Name | Type | Tags | Description |
12+
| --- | --- | --- | --- |
13+
| `EnforceUniqueness` | `Boolean` | Optional | If true, each Custom Attribute instance associated with this Custom Attribute<br>Definition must have a unique value within the seller's catalog. For<br>example, this may be used for a value like a SKU that should not be<br>duplicated within a seller's catalog. May not be modified after the<br>definition has been created. |
14+
15+
### Example (as JSON)
16+
17+
```json
18+
{
19+
"enforce_uniqueness": null
20+
}
21+
```
22+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Catalog Custom Attribute Definition Type
2+
3+
Defines the possible types for a custom attribute.
4+
5+
### Enumeration
6+
7+
`CatalogCustomAttributeDefinitionType`
8+
9+
### Fields
10+
11+
| Name | Description |
12+
| --- | --- |
13+
| `STRING` | A free-form string containing up to 255 characters. |
14+
| `BOOLEAN` | A `true` or `false` value. |
15+
| `NUMBER` | Integer divided by 100,000. |
16+
| `SELECTION` | One or more choices from `allowed_selections`. |
17+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Catalog Custom Attribute Definition
2+
3+
Contains information defining a custom attribute. Custom attributes are
4+
intended to store additional information about a catalog object or to associate a
5+
catalog object with an entity in another system. Do not use custom attributes
6+
to store any sensitive information (personally identifiable information, card details, etc.).
7+
[Read more about custom attributes](https://developer.squareup.com/docs/catalog-api/add-custom-attributes)
8+
9+
### Structure
10+
11+
`CatalogCustomAttributeDefinition`
12+
13+
### Fields
14+
15+
| Name | Type | Tags | Description |
16+
| --- | --- | --- | --- |
17+
| `Type` | [`String`](/doc/models/catalog-custom-attribute-definition-type.md) | | Defines the possible types for a custom attribute. |
18+
| `Name` | `String` | | The name of this definition for API and seller-facing UI purposes.<br>The name must be unique within the (merchant, application_id) pair. Required.<br>May not be empty and may not exceed 255 characters. Can be modified after creation. |
19+
| `Description` | `String` | Optional | Seller-oriented description of the meaning of this Custom Attribute,<br>any constraints that the seller should observe, etc. May be displayed as a tooltip in Square UIs. |
20+
| `SourceApplication` | [`SourceApplication`](/doc/models/source-application.md) | Optional | Provides information about the application used to generate an inventory<br>change. |
21+
| `AllowedObjectTypes` | [`List<String>`](/doc/models/catalog-object-type.md) | Optional | The set of Catalog Object Types that this Custom Attribute may be applied to.<br>Currently, only `ITEM` and `ITEM_VARIATION` are allowed.<br>See [CatalogObjectType](#type-catalogobjecttype) for possible values |
22+
| `SellerVisibility` | [`String`](/doc/models/catalog-custom-attribute-definition-seller-visibility.md) | Optional | Defines the visibility of a custom attribute to sellers in Square<br>client applications, Square APIs or in Square UIs (including Square Point<br>of Sale applications and Square Dashboard). |
23+
| `AppVisibility` | [`String`](/doc/models/catalog-custom-attribute-definition-app-visibility.md) | Optional | Defines the visibility of a custom attribute to applications other than their<br>creating application. |
24+
| `StringConfig` | [`CatalogCustomAttributeDefinitionStringConfig`](/doc/models/catalog-custom-attribute-definition-string-config.md) | Optional | Configuration associated with Custom Attribute Definitions of type `STRING`. |
25+
| `SelectionConfig` | [`CatalogCustomAttributeDefinitionSelectionConfig`](/doc/models/catalog-custom-attribute-definition-selection-config.md) | Optional | Configuration associated with `SELECTION`-type custom attribute definitions. |
26+
| `CustomAttributeUsageCount` | `Integer` | Optional | __Read-only.__ The number of custom attributes that reference this<br>custom attribute definition. Set by the server in response to a ListCatalog<br>request with `include_counts` set to `true`. If the actual count is greater<br>than 100, `custom_attribute_usage_count` will be set to `100`. |
27+
| `Key` | `String` | Optional | The name of the desired custom attribute key that can be used to access<br>the custom attribute value on catalog objects. Cannot be modified after the<br>custom attribute definition has been created. |
28+
29+
### Example (as JSON)
30+
31+
```json
32+
{
33+
"type": "NUMBER",
34+
"name": "name0",
35+
"description": null,
36+
"source_application": null,
37+
"allowed_object_types": null,
38+
"seller_visibility": null,
39+
"app_visibility": null,
40+
"string_config": null,
41+
"selection_config": null,
42+
"custom_attribute_usage_count": null,
43+
"key": null
44+
}
45+
```
46+

0 commit comments

Comments
 (0)