Skip to content

Commit 4996849

Browse files
author
Wolfgang Schuster
authored
Merge pull request #85 from square/release/19.1.0.20220616
Generated PR for Release: 19.1.0.20220616
2 parents 7852d8a + ecf3cc7 commit 4996849

File tree

105 files changed

+1257
-368
lines changed

Some content is hidden

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

105 files changed

+1257
-368
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
For general API and SDK changelogs, see [Square APIs and SDKs Release Notes](https://developer.squareup.com/docs/changelog/connect).
44

5+
## Version 19.0.1.20220512 (2022-05-12)
6+
- Fixed [Op Cache can break response types](https://github.com/square/square-php-sdk/issues/80)
7+
58
## Version 17.3.0.20220316 (2022-03-16)
69
### Added
710

composer.json

Lines changed: 2 additions & 2 deletions
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": "19.0.1.20220512",
4+
"version": "19.1.0.20220616",
55
"type": "library",
66
"keywords": [
77
"Square",
@@ -23,7 +23,7 @@
2323
"ext-json": "*",
2424
"ext-mbstring": "*",
2525
"apimatic/unirest-php": "^2.2.2",
26-
"apimatic/jsonmapper": "^3.0.1"
26+
"apimatic/jsonmapper": "^3.0.3"
2727
},
2828
"require-dev": {
2929
"squizlabs/php_codesniffer": "^3.5",

doc/apis/catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ function listCatalog(?string $cursor = null, ?string $types = null, ?int $catalo
405405
| Parameter | Type | Tags | Description |
406406
| --- | --- | --- | --- |
407407
| `cursor` | `?string` | Query, Optional | The pagination cursor returned in the previous response. Leave unset for an initial request.<br>The page size is currently set to be 100.<br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
408-
| `types` | `?string` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](../../doc/models/catalog-object-type.md) enum, for example,<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.<br><br>If this is unspecified, the operation returns objects of all the top level types at the version<br>of the Square API used to make the request. Object types that are nested onto other object types<br>are not included in the defaults.<br><br>At the current API version the default object types are:<br>ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, DINING_OPTION, TAX_EXEMPTION,<br>SERVICE_CHARGE, PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
408+
| `types` | `?string` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](../../doc/models/catalog-object-type.md) enum, for example,<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.<br><br>If this is unspecified, the operation returns objects of all the top level types at the version<br>of the Square API used to make the request. Object types that are nested onto other object types<br>are not included in the defaults.<br><br>At the current API version the default object types are:<br>ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,<br>PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
409409
| `catalogVersion` | `?int` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>versions of objects. The specified version value is matched against<br>the [CatalogObject](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will<br>be from the current version of the catalog. |
410410

411411
## Response Type

doc/apis/gift-cards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $giftCardsApi = $client->getGiftCardsApi();
2222
# List Gift Cards
2323

2424
Lists all gift cards. You can specify optional filters to retrieve
25-
a subset of the gift cards.
25+
a subset of the gift cards. Results are sorted by `created_at` in ascending order.
2626

2727
```php
2828
function listGiftCards(

doc/apis/loyalty.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if ($apiResponse->isSuccess()) {
161161

162162
# Accumulate Loyalty Points
163163

164-
Adds points to a loyalty account.
164+
Adds points earned from the base loyalty program to a loyalty account.
165165

166166
- If you are using the Orders API to manage orders, you only provide the `order_id`.
167167
The endpoint reads the order to compute points to add to the buyer's account.
@@ -171,6 +171,8 @@ Adds points to a loyalty account.
171171
[CalculateLoyaltyPoints](../../doc/apis/loyalty.md#calculate-loyalty-points) to compute the points
172172
that you provide to this endpoint.
173173

174+
This endpoint excludes additional points earned from loyalty promotions.
175+
174176
```php
175177
function accumulateLoyaltyPoints(string $accountId, AccumulateLoyaltyPointsRequest $body): ApiResponse
176178
```
@@ -392,7 +394,7 @@ if ($apiResponse->isSuccess()) {
392394

393395
# Calculate Loyalty Points
394396

395-
Calculates the points a purchase earns.
397+
Calculates the points a purchase earns from the base loyalty program.
396398

397399
- If you are using the Orders API to manage orders, you provide the `order_id` in the request. The
398400
endpoint calculates the points by reading the order.

doc/apis/terminal.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ $terminalApi = $client->getTerminalApi();
2626

2727
# Create Terminal Action
2828

29-
Creates a Terminal action request and sends it to the specified device to take a payment
30-
for the requested amount.
29+
Creates a Terminal action request and sends it to the specified device.
3130

3231
```php
3332
function createTerminalAction(CreateTerminalActionRequest $body): ApiResponse

doc/client.md

Lines changed: 3 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-05-12'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2022-06-16'` |
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` |
@@ -27,7 +27,7 @@ The API client can be initialized as follows:
2727
$client = new Square\SquareClient([
2828
// Set authentication parameters
2929
'accessToken' => 'AccessToken',
30-
'squareVersion' => '2022-05-12',
30+
'squareVersion' => '2022-06-16',
3131

3232
// Set the environment
3333
'environment' => 'production',
@@ -54,7 +54,7 @@ require_once "vendor/autoload.php";
5454

5555
$client = new Square\SquareClient([
5656
'accessToken' => 'AccessToken',
57-
'squareVersion' => '2022-05-12',
57+
'squareVersion' => '2022-06-16',
5858
]);
5959

6060
$locationsApi = $client->getLocationsApi();

doc/models/appointment-segment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Defines an appointment segment of a booking.
1212
| Name | Type | Tags | Description | Getter | Setter |
1313
| --- | --- | --- | --- | --- | --- |
1414
| `durationMinutes` | `?int` | Optional | The time span in minutes of an appointment segment.<br>**Constraints**: `<= 1500` | getDurationMinutes(): ?int | setDurationMinutes(?int durationMinutes): void |
15-
| `serviceVariationId` | `string` | Required | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | getServiceVariationId(): string | setServiceVariationId(string serviceVariationId): void |
15+
| `serviceVariationId` | `?string` | Optional | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Maximum Length*: `36` | getServiceVariationId(): ?string | setServiceVariationId(?string serviceVariationId): void |
1616
| `teamMemberId` | `string` | Required | The ID of the [TeamMember](../../doc/models/team-member.md) object representing the team member booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32` | getTeamMemberId(): string | setTeamMemberId(string teamMemberId): void |
17-
| `serviceVariationVersion` | `int` | Required | The current version of the item variation representing the service booked in this segment. | getServiceVariationVersion(): int | setServiceVariationVersion(int serviceVariationVersion): void |
17+
| `serviceVariationVersion` | `?int` | Optional | The current version of the item variation representing the service booked in this segment. | getServiceVariationVersion(): ?int | setServiceVariationVersion(?int serviceVariationVersion): void |
1818
| `intermissionMinutes` | `?int` | Optional | Time between the end of this segment and the beginning of the subsequent segment. | getIntermissionMinutes(): ?int | setIntermissionMinutes(?int intermissionMinutes): void |
1919
| `anyTeamMember` | `?bool` | Optional | Whether the customer accepts any team member, instead of a specific one, to serve this segment. | getAnyTeamMember(): ?bool | setAnyTeamMember(?bool anyTeamMember): void |
2020
| `resourceIds` | `?(string[])` | Optional | The IDs of the seller-accessible resources used for this appointment segment. | getResourceIds(): ?array | setResourceIds(?array resourceIds): void |
@@ -24,9 +24,9 @@ Defines an appointment segment of a booking.
2424
```json
2525
{
2626
"duration_minutes": null,
27-
"service_variation_id": "service_variation_id6",
27+
"service_variation_id": null,
2828
"team_member_id": "team_member_id0",
29-
"service_variation_version": 56,
29+
"service_variation_version": null,
3030
"intermission_minutes": null,
3131
"any_team_member": null,
3232
"resource_ids": null

doc/models/batch-retrieve-inventory-changes-request.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
| `locationIds` | `?(string[])` | Optional | The filter to return results by `Location` ID.<br>The filter is only applicable when set. The default value is null. | getLocationIds(): ?array | setLocationIds(?array locationIds): void |
1414
| `types` | [`?(string[]) (InventoryChangeType)`](../../doc/models/inventory-change-type.md) | Optional | The filter to return results by `InventoryChangeType` values other than `TRANSFER`.<br>The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. | getTypes(): ?array | setTypes(?array types): void |
1515
| `states` | [`?(string[]) (InventoryState)`](../../doc/models/inventory-state.md) | Optional | The filter to return `ADJUSTMENT` query results by<br>`InventoryState`. This filter is only applied when set.<br>The default value is null. | getStates(): ?array | setStates(?array states): void |
16-
| `updatedAfter` | `?string` | Optional | The filter to return results with their `calculated_at` value <br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | getUpdatedAfter(): ?string | setUpdatedAfter(?string updatedAfter): void |
17-
| `updatedBefore` | `?string` | Optional | The filter to return results with their `created_at` or `calculated_at` value <br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | getUpdatedBefore(): ?string | setUpdatedBefore(?string updatedBefore): void |
16+
| `updatedAfter` | `?string` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | getUpdatedAfter(): ?string | setUpdatedAfter(?string updatedAfter): void |
17+
| `updatedBefore` | `?string` | Optional | The filter to return results with their `created_at` or `calculated_at` value<br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | getUpdatedBefore(): ?string | setUpdatedBefore(?string updatedBefore): void |
1818
| `cursor` | `?string` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | getCursor(): ?string | setCursor(?string cursor): void |
19+
| `limit` | `?int` | Optional | **Constraints**: `>= 1`, `<= 1000` | getLimit(): ?int | setLimit(?int limit): void |
1920

2021
## Example (as JSON)
2122

doc/models/batch-retrieve-inventory-counts-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
| `updatedAfter` | `?string` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). | getUpdatedAfter(): ?string | setUpdatedAfter(?string updatedAfter): void |
1515
| `cursor` | `?string` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. | getCursor(): ?string | setCursor(?string cursor): void |
1616
| `states` | [`?(string[]) (InventoryState)`](../../doc/models/inventory-state.md) | Optional | The filter to return results by `InventoryState`. The filter is only applicable when set.<br>Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.<br>The default is null. | getStates(): ?array | setStates(?array states): void |
17+
| `limit` | `?int` | Optional | **Constraints**: `>= 1`, `<= 1000` | getLimit(): ?int | setLimit(?int limit): void |
1718

1819
## Example (as JSON)
1920

0 commit comments

Comments
 (0)