Skip to content

Commit b333c79

Browse files
Merge pull request #103 from square/release/25.1.0.20230119
Generated PR for Release: 25.1.0.20230119
2 parents 33e3740 + bee998d commit b333c79

File tree

65 files changed

+4726
-10
lines changed

Some content is hidden

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

65 files changed

+4726
-10
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2022 Square, Inc.
1+
Copyright 2023 Square, Inc.
22
Licensed under the Apache License, Version 2.0 (the "License");
33
you may not use this file except in compliance with the License.
44
You may obtain a copy of the License at

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "square/square",
33
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
4-
"version": "25.0.0.20221214",
4+
"version": "25.1.0.20230119",
55
"type": "library",
66
"keywords": [
77
"Square",

doc/apis/location-custom-attributes.md

Lines changed: 561 additions & 0 deletions
Large diffs are not rendered by default.

doc/client.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2022-12-14'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-01-19'` |
99
| `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `timeout` | `int` | Timeout for API calls in seconds.<br>*Default*: `60` |
@@ -26,7 +26,7 @@ The API client can be initialized as follows:
2626
```php
2727
$client = Square\SquareClientBuilder::init()
2828
->accessToken('AccessToken')
29-
->squareVersion('2022-12-14')
29+
->squareVersion('2023-01-19')
3030
->environment('production')
3131
->customUrl('https://connect.squareup.com')
3232
->build();
@@ -49,7 +49,7 @@ require_once "vendor/autoload.php";
4949

5050
$client = Square\SquareClientBuilder::init()
5151
->accessToken('AccessToken')
52-
->squareVersion('2022-12-14')
52+
->squareVersion('2023-01-19')
5353
->build();
5454

5555
$locationsApi = $client->getLocationsApi();
@@ -98,6 +98,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
9898
| getInvoicesApi() | Gets InvoicesApi |
9999
| getLaborApi() | Gets LaborApi |
100100
| getLocationsApi() | Gets LocationsApi |
101+
| getLocationCustomAttributesApi() | Gets LocationCustomAttributesApi |
101102
| getCheckoutApi() | Gets CheckoutApi |
102103
| getTransactionsApi() | Gets TransactionsApi |
103104
| getLoyaltyApi() | Gets LoyaltyApi |

doc/models/break-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ instances on a `Shift`.
1515
| `id` | `?string` | Optional | The UUID for this object.<br>**Constraints**: *Maximum Length*: `255` | getId(): ?string | setId(?string id): void |
1616
| `locationId` | `string` | Required | The ID of the business location this type of break applies to.<br>**Constraints**: *Minimum Length*: `1` | getLocationId(): string | setLocationId(string locationId): void |
1717
| `breakName` | `string` | Required | A human-readable name for this type of break. The name is displayed to<br>employees in Square products.<br>**Constraints**: *Minimum Length*: `1` | getBreakName(): string | setBreakName(string breakName): void |
18-
| `expectedDuration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br>**Constraints**: *Minimum Length*: `1` | getExpectedDuration(): string | setExpectedDuration(string expectedDuration): void |
18+
| `expectedDuration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br><br>Example for break expected duration of 15 minutes: T15M<br>**Constraints**: *Minimum Length*: `1` | getExpectedDuration(): string | setExpectedDuration(string expectedDuration): void |
1919
| `isPaid` | `bool` | Required | Whether this break counts towards time worked for compensation<br>purposes. | getIsPaid(): bool | setIsPaid(bool isPaid): void |
2020
| `version` | `?int` | Optional | Used for resolving concurrency issues. The request fails if the version<br>provided does not match the server version at the time of the request. If a value is not<br>provided, Square's servers execute a "blind" write; potentially<br>overwriting another writer's data. | getVersion(): ?int | setVersion(?int version): void |
2121
| `createdAt` | `?string` | Optional | A read-only timestamp in RFC 3339 format. | getCreatedAt(): ?string | setCreatedAt(?string createdAt): void |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request
3+
4+
Represents an individual delete request in a [BulkDeleteLocationCustomAttributes](../../doc/apis/location-custom-attributes.md#bulk-delete-location-custom-attributes)
5+
request. An individual request contains an optional ID of the associated custom attribute definition
6+
and optional key of the associated custom attribute definition.
7+
8+
## Structure
9+
10+
`BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description | Getter | Setter |
15+
| --- | --- | --- | --- | --- | --- |
16+
| `key` | `?string` | Optional | The key of the associated custom attribute definition.<br>Represented as a qualified key if the requesting app is not the definition owner.<br>**Constraints**: *Pattern*: `^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$` | getKey(): ?string | setKey(?string key): void |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{}
22+
```
23+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
# Bulk Delete Location Custom Attributes Request
3+
4+
Represents a [BulkDeleteLocationCustomAttributes](../../doc/apis/location-custom-attributes.md#bulk-delete-location-custom-attributes) request.
5+
6+
## Structure
7+
8+
`BulkDeleteLocationCustomAttributesRequest`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter | Setter |
13+
| --- | --- | --- | --- | --- | --- |
14+
| `values` | [`array<string,BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest>`](../../doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md) | Required | The data used to update the `CustomAttribute` objects.<br>The keys must be unique and are used to map to the corresponding response. | getValues(): array | setValues(array values): void |
15+
16+
## Example (as JSON)
17+
18+
```json
19+
{
20+
"values": {
21+
"id1": {
22+
"key": "bestseller",
23+
"location_id": "L0TBCBTB7P8RQ"
24+
},
25+
"id2": {
26+
"key": "bestseller",
27+
"location_id": "L9XMD04V3STJX"
28+
},
29+
"id3": {
30+
"key": "phone-number",
31+
"location_id": "L0TBCBTB7P8RQ"
32+
}
33+
}
34+
}
35+
```
36+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response
3+
4+
Represents an individual delete response in a [BulkDeleteLocationCustomAttributes](../../doc/apis/location-custom-attributes.md#bulk-delete-location-custom-attributes)
5+
request.
6+
7+
## Structure
8+
9+
`BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description | Getter | Setter |
14+
| --- | --- | --- | --- | --- | --- |
15+
| `locationId` | `?string` | Optional | The ID of the location associated with the custom attribute. | getLocationId(): ?string | setLocationId(?string locationId): void |
16+
| `errors` | [`?(Error[])`](../../doc/models/error.md) | Optional | Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request | getErrors(): ?array | setErrors(?array errors): void |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"errors": [],
23+
"location_id": "L0TBCBTB7P8RQ"
24+
}
25+
```
26+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# Bulk Delete Location Custom Attributes Response
3+
4+
Represents a [BulkDeleteLocationCustomAttributes](../../doc/apis/location-custom-attributes.md#bulk-delete-location-custom-attributes) response,
5+
which contains a map of responses that each corresponds to an individual delete request.
6+
7+
## Structure
8+
9+
`BulkDeleteLocationCustomAttributesResponse`
10+
11+
## Fields
12+
13+
| Name | Type | Tags | Description | Getter | Setter |
14+
| --- | --- | --- | --- | --- | --- |
15+
| `values` | [`array<string,BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse>`](../../doc/models/bulk-delete-location-custom-attributes-response-location-custom-attribute-delete-response.md) | Required | A map of responses that correspond to individual delete requests. Each response has the<br>same key as the corresponding request. | getValues(): array | setValues(array values): void |
16+
| `errors` | [`?(Error[])`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. | getErrors(): ?array | setErrors(?array errors): void |
17+
18+
## Example (as JSON)
19+
20+
```json
21+
{
22+
"values": {
23+
"id1": {
24+
"errors": [],
25+
"location_id": "L0TBCBTB7P8RQ"
26+
},
27+
"id2": {
28+
"errors": [],
29+
"location_id": "L9XMD04V3STJX"
30+
},
31+
"id3": {
32+
"errors": [],
33+
"location_id": "L0TBCBTB7P8RQ"
34+
}
35+
}
36+
}
37+
```
38+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request
3+
4+
Represents an individual upsert request in a [BulkUpsertLocationCustomAttributes](../../doc/apis/location-custom-attributes.md#bulk-upsert-location-custom-attributes)
5+
request. An individual request contains a location ID, the custom attribute to create or update,
6+
and an optional idempotency key.
7+
8+
## Structure
9+
10+
`BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest`
11+
12+
## Fields
13+
14+
| Name | Type | Tags | Description | Getter | Setter |
15+
| --- | --- | --- | --- | --- | --- |
16+
| `locationId` | `string` | Required | The ID of the target [location](../../doc/models/location.md).<br>**Constraints**: *Minimum Length*: `1` | getLocationId(): string | setLocationId(string locationId): void |
17+
| `customAttribute` | [`CustomAttribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. | getCustomAttribute(): CustomAttribute | setCustomAttribute(CustomAttribute customAttribute): void |
18+
| `idempotencyKey` | `?string` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.<br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `45` | getIdempotencyKey(): ?string | setIdempotencyKey(?string idempotencyKey): void |
19+
20+
## Example (as JSON)
21+
22+
```json
23+
{
24+
"location_id": "location_id4",
25+
"custom_attribute": {
26+
"key": null,
27+
"value": null,
28+
"version": null,
29+
"visibility": null,
30+
"definition": null
31+
},
32+
"idempotency_key": null
33+
}
34+
```
35+

0 commit comments

Comments
 (0)