Skip to content

Commit fedfea8

Browse files
authored
Merge pull request #121 from square/release/30.0.0.20230816
Generated PR for Release: 30.0.0.20230816
2 parents 06493b7 + 369994a commit fedfea8

File tree

90 files changed

+2263
-170
lines changed

Some content is hidden

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

90 files changed

+2263
-170
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ All environment variables:
8787

8888
### Orders
8989
* [Orders]
90+
* [Order Custom Attributes]
9091

9192
### Subscriptions
9293
* [Subscriptions]
@@ -113,10 +114,13 @@ All environment variables:
113114

114115
### Bookings
115116
* [Bookings]
117+
* [Booking Custom Attributes]
116118

117119
### Business
118120
* [Merchants]
121+
* [Merchant Custom Attributes]
119122
* [Locations]
123+
* [Location Custom Attributes]
120124
* [Devices]
121125
* [Cash Drawers]
122126
* [Vendors]
@@ -170,9 +174,13 @@ The following Square APIs are [deprecated](https://developer.squareup.com/docs/b
170174
[Labor]: doc/apis/labor.md
171175
[Loyalty]: doc/apis/loyalty.md
172176
[Bookings]: doc/apis/bookings.md
177+
[Booking Custom Attributes]: doc/api/booking-custom-attributes.md
173178
[Locations]: doc/apis/locations.md
179+
[Location Custom Attributes]: doc/api/location-custom-attributes.md
174180
[Merchants]: doc/apis/merchants.md
181+
[Merchant Custom Attributes]: doc/api/merchant-custom-attributes.md
175182
[Orders]: doc/apis/orders.md
183+
[Order Custom Attributes]: doc/api/order-custom-attributes.md
176184
[Invoices]: doc/apis/invoices.md
177185
[Apple Pay]: doc/apis/apple-pay.md
178186
[Refunds]: doc/apis/refunds.md

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": "29.1.0.20230720",
4+
"version": "30.0.0.20230816",
55
"type": "library",
66
"keywords": [
77
"Square",

doc/apis/bookings.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ $bookingsApi = $client->getBookingsApi();
1313
* [List Bookings](../../doc/apis/bookings.md#list-bookings)
1414
* [Create Booking](../../doc/apis/bookings.md#create-booking)
1515
* [Search Availability](../../doc/apis/bookings.md#search-availability)
16+
* [Bulk Retrieve Bookings](../../doc/apis/bookings.md#bulk-retrieve-bookings)
1617
* [Retrieve Business Booking Profile](../../doc/apis/bookings.md#retrieve-business-booking-profile)
1718
* [List Team Member Booking Profiles](../../doc/apis/bookings.md#list-team-member-booking-profiles)
1819
* [Retrieve Team Member Booking Profile](../../doc/apis/bookings.md#retrieve-team-member-booking-profile)
@@ -32,6 +33,7 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
3233
function listBookings(
3334
?int $limit = null,
3435
?string $cursor = null,
36+
?string $customerId = null,
3537
?string $teamMemberId = null,
3638
?string $locationId = null,
3739
?string $startAtMin = null,
@@ -45,6 +47,7 @@ function listBookings(
4547
| --- | --- | --- | --- |
4648
| `limit` | `?int` | Query, Optional | The maximum number of results per page to return in a paged response. |
4749
| `cursor` | `?string` | Query, Optional | The pagination cursor from the preceding response to return the next page of the results. Do not set this when retrieving the first page of the results. |
50+
| `customerId` | `?string` | Query, Optional | The [customer](entity:Customer) for whom to retrieve bookings. If this is not set, bookings for all customers are retrieved. |
4851
| `teamMemberId` | `?string` | Query, Optional | The team member for whom to retrieve bookings. If this is not set, bookings of all members are retrieved. |
4952
| `locationId` | `?string` | Query, Optional | The location for which to retrieve bookings. If this is not set, all locations' bookings are retrieved. |
5053
| `startAtMin` | `?string` | Query, Optional | The RFC 3339 timestamp specifying the earliest of the start time. If this is not set, the current time is used. |
@@ -170,6 +173,52 @@ var_dump($apiResponse->getHeaders());
170173
```
171174

172175

176+
# Bulk Retrieve Bookings
177+
178+
Bulk-Retrieves a list of bookings by booking IDs.
179+
180+
To call this endpoint with buyer-level permissions, set `APPOINTMENTS_READ` for the OAuth scope.
181+
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ` and `APPOINTMENTS_READ` for the OAuth scope.
182+
183+
```php
184+
function bulkRetrieveBookings(BulkRetrieveBookingsRequest $body): ApiResponse
185+
```
186+
187+
## Parameters
188+
189+
| Parameter | Type | Tags | Description |
190+
| --- | --- | --- | --- |
191+
| `body` | [`BulkRetrieveBookingsRequest`](../../doc/models/bulk-retrieve-bookings-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
192+
193+
## Response Type
194+
195+
This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`BulkRetrieveBookingsResponse`](../../doc/models/bulk-retrieve-bookings-response.md).
196+
197+
## Example Usage
198+
199+
```php
200+
$body = BulkRetrieveBookingsRequestBuilder::init(
201+
[
202+
'booking_ids8',
203+
'booking_ids9',
204+
'booking_ids0'
205+
]
206+
)->build();
207+
208+
$apiResponse = $bookingsApi->bulkRetrieveBookings($body);
209+
210+
if ($apiResponse->isSuccess()) {
211+
$bulkRetrieveBookingsResponse = $apiResponse->getResult();
212+
} else {
213+
$errors = $apiResponse->getErrors();
214+
}
215+
216+
// Getting more response information
217+
var_dump($apiResponse->getStatusCode());
218+
var_dump($apiResponse->getHeaders());
219+
```
220+
221+
173222
# Retrieve Business Booking Profile
174223

175224
Retrieves a seller's booking profile.

doc/apis/gift-cards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function listGiftCards(
4040
| --- | --- | --- | --- |
4141
| `type` | `?string` | Query, Optional | If a [type](entity:GiftCardType) is provided, the endpoint returns gift cards of the specified type.<br>Otherwise, the endpoint returns gift cards of all types. |
4242
| `state` | `?string` | Query, Optional | If a [state](entity:GiftCardStatus) is provided, the endpoint returns the gift cards in the specified state.<br>Otherwise, the endpoint returns the gift cards of all states. |
43-
| `limit` | `?int` | Query, Optional | If a limit is provided, the endpoint returns only the specified number of results per page.<br>The maximum value is 50. The default value is 30.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
43+
| `limit` | `?int` | Query, Optional | If a limit is provided, the endpoint returns only the specified number of results per page.<br>The maximum value is 200. The default value is 30.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
4444
| `cursor` | `?string` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this cursor to retrieve the next set of results for the original query.<br>If a cursor is not provided, the endpoint returns the first page of the results.<br>For more information, see [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination). |
4545
| `customerId` | `?string` | Query, Optional | If a customer ID is provided, the endpoint returns only the gift cards linked to the specified customer. |
4646

doc/apis/loyalty.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,11 @@ $body = CreateLoyaltyPromotionRequestBuilder::init(
557557
LoyaltyPromotionIncentiveType::POINTS_MULTIPLIER
558558
)
559559
->pointsMultiplierData(
560-
LoyaltyPromotionIncentivePointsMultiplierDataBuilder::init(
561-
3
562-
)->build()
563-
)->build(),
560+
LoyaltyPromotionIncentivePointsMultiplierDataBuilder::init()
561+
->multiplier('3.0')
562+
->build()
563+
)
564+
->build(),
564565
LoyaltyPromotionAvailableTimeDataBuilder::init(
565566
[
566567
'BEGIN:VEVENT

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*: `'2023-07-20'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-08-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` |
@@ -26,7 +26,7 @@ The API client can be initialized as follows:
2626
```php
2727
$client = SquareClientBuilder::init()
2828
->accessToken('AccessToken')
29-
->squareVersion('2023-07-20')
29+
->squareVersion('2023-08-16')
3030
->environment('production')
3131
->customUrl('https://connect.squareup.com')
3232
->build();
@@ -51,7 +51,7 @@ use Square\SquareClientBuilder;
5151

5252
$client = SquareClientBuilder::init()
5353
->accessToken('AccessToken')
54-
->squareVersion('2023-07-20')
54+
->squareVersion('2023-08-16')
5555
->build();
5656

5757
$apiResponse = $client->getLocationsApi()->listLocations();

doc/models/archived-state.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# Archived State
3+
4+
Defines the values for the `archived_state` query expression
5+
used in [SearchCatalogItems](../../doc/apis/catalog.md#search-catalog-items)
6+
to return the archived, not archived or either type of catalog items.
7+
8+
## Enumeration
9+
10+
`ArchivedState`
11+
12+
## Fields
13+
14+
| Name | Description |
15+
| --- | --- |
16+
| `ARCHIVED_STATE_NOT_ARCHIVED` | Requested items are not archived with the `is_archived` attribute set to `false`. |
17+
| `ARCHIVED_STATE_ARCHIVED` | Requested items are archived with the `is_archived` attribute set to `true`. |
18+
| `ARCHIVED_STATE_ALL` | Requested items can be archived or not archived. |
19+

doc/models/booking-custom-attribute-delete-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ request. An individual request contains a booking ID, the custom attribute to de
1212

1313
| Name | Type | Tags | Description | Getter | Setter |
1414
| --- | --- | --- | --- | --- | --- |
15-
| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1` | getBookingId(): string | setBookingId(string bookingId): void |
15+
| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | getBookingId(): string | setBookingId(string bookingId): void |
1616
| `key` | `string` | Required | The key of the custom attribute to delete. This key must match the `key` of a<br>custom attribute definition in the Square seller account. If the requesting application is not<br>the definition owner, you must use the qualified key.<br>**Constraints**: *Minimum Length*: `1` | getKey(): string | setKey(string key): void |
1717

1818
## Example (as JSON)

doc/models/booking-custom-attribute-upsert-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and an optional idempotency key.
1313

1414
| Name | Type | Tags | Description | Getter | Setter |
1515
| --- | --- | --- | --- | --- | --- |
16-
| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1` | getBookingId(): string | setBookingId(string bookingId): void |
16+
| `bookingId` | `string` | Required | The ID of the target [booking](entity:Booking).<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` | getBookingId(): string | setBookingId(string bookingId): void |
1717
| `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 |
1818
| `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 |
1919

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Bulk Retrieve Bookings Request
3+
4+
Request payload for bulk retrieval of bookings.
5+
6+
## Structure
7+
8+
`BulkRetrieveBookingsRequest`
9+
10+
## Fields
11+
12+
| Name | Type | Tags | Description | Getter | Setter |
13+
| --- | --- | --- | --- | --- | --- |
14+
| `bookingIds` | `string[]` | Required | A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve. | getBookingIds(): array | setBookingIds(array bookingIds): void |
15+
16+
## Example (as JSON)
17+
18+
```json
19+
{
20+
"booking_ids": [
21+
"booking_ids4"
22+
]
23+
}
24+
```
25+

0 commit comments

Comments
 (0)