Skip to content

Commit

Permalink
Merge pull request #122 from square/release/31.0.0.20230925
Browse files Browse the repository at this point in the history
Generated PR for Release: 31.0.0.20230925
  • Loading branch information
dotspencer authored Sep 26, 2023
2 parents fedfea8 + 0136be1 commit 1190673
Show file tree
Hide file tree
Showing 837 changed files with 10,962 additions and 8,143 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "square/square",
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
"version": "30.0.0.20230816",
"version": "31.0.0.20230925",
"type": "library",
"keywords": [
"Square",
Expand Down
14 changes: 8 additions & 6 deletions doc/apis/booking-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
$body = BulkDeleteBookingCustomAttributesRequestBuilder::init(
[
'key0' => BookingCustomAttributeDeleteRequestBuilder::init(
'booking_id8',
'key4'
'booking_id4',
'key0'
)->build(),
'key1' => BookingCustomAttributeDeleteRequestBuilder::init(
'booking_id9',
'key5'
'booking_id4',
'key0'
)->build()
]
)->build();
Expand Down Expand Up @@ -331,11 +331,11 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
$body = BulkUpsertBookingCustomAttributesRequestBuilder::init(
[
'key0' => BookingCustomAttributeUpsertRequestBuilder::init(
'booking_id8',
'booking_id4',
CustomAttributeBuilder::init()->build()
)->build(),
'key1' => BookingCustomAttributeUpsertRequestBuilder::init(
'booking_id9',
'booking_id4',
CustomAttributeBuilder::init()->build()
)->build()
]
Expand Down Expand Up @@ -393,6 +393,8 @@ $withDefinitions = false;

$apiResponse = $bookingCustomAttributesApi->listBookingCustomAttributes(
$bookingId,
null,
null,
$withDefinitions
);

Expand Down
44 changes: 44 additions & 0 deletions doc/apis/bookings.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ $bookingsApi = $client->getBookingsApi();
* [Bulk Retrieve Bookings](../../doc/apis/bookings.md#bulk-retrieve-bookings)
* [Retrieve Business Booking Profile](../../doc/apis/bookings.md#retrieve-business-booking-profile)
* [List Team Member Booking Profiles](../../doc/apis/bookings.md#list-team-member-booking-profiles)
* [Bulk Retrieve Team Member Booking Profiles](../../doc/apis/bookings.md#bulk-retrieve-team-member-booking-profiles)
* [Retrieve Team Member Booking Profile](../../doc/apis/bookings.md#retrieve-team-member-booking-profile)
* [Retrieve Booking](../../doc/apis/bookings.md#retrieve-booking)
* [Update Booking](../../doc/apis/bookings.md#update-booking)
Expand Down Expand Up @@ -293,6 +294,49 @@ var_dump($apiResponse->getHeaders());
```


# Bulk Retrieve Team Member Booking Profiles

Retrieves one or more team members' booking profiles.

```php
function bulkRetrieveTeamMemberBookingProfiles(BulkRetrieveTeamMemberBookingProfilesRequest $body): ApiResponse
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `body` | [`BulkRetrieveTeamMemberBookingProfilesRequest`](../../doc/models/bulk-retrieve-team-member-booking-profiles-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |

## Response Type

This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`BulkRetrieveTeamMemberBookingProfilesResponse`](../../doc/models/bulk-retrieve-team-member-booking-profiles-response.md).

## Example Usage

```php
$body = BulkRetrieveTeamMemberBookingProfilesRequestBuilder::init(
[
'team_member_ids3',
'team_member_ids4',
'team_member_ids5'
]
)->build();

$apiResponse = $bookingsApi->bulkRetrieveTeamMemberBookingProfiles($body);

if ($apiResponse->isSuccess()) {
$bulkRetrieveTeamMemberBookingProfilesResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}

// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
```


# Retrieve Team Member Booking Profile

Retrieves a team member's booking profile.
Expand Down
6 changes: 5 additions & 1 deletion doc/apis/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
```php
$includeDisabled = false;

$apiResponse = $cardsApi->listCards($includeDisabled);
$apiResponse = $cardsApi->listCards(
null,
null,
$includeDisabled
);

if ($apiResponse->isSuccess()) {
$listCardsResponse = $apiResponse->getResult();
Expand Down
2 changes: 0 additions & 2 deletions doc/apis/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ payment processing workflow hosted on connect.squareup.com.

NOTE: The Checkout API has been updated with new features.
For more information, see [Checkout API highlights](https://developer.squareup.com/docs/checkout-api#checkout-api-highlights).
We recommend that you use the new [CreatePaymentLink](api-endpoint:Checkout-CreatePaymentLink) 
endpoint in place of this previously released endpoint.

```php
function createCheckout(string $locationId, CreateCheckoutRequest $body): ApiResponse
Expand Down
6 changes: 4 additions & 2 deletions doc/apis/customer-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,11 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
$body = BulkUpsertCustomerCustomAttributesRequestBuilder::init(
[
'key0' => BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequestBuilder::init(
'customer_id2',
'customer_id8',
CustomAttributeBuilder::init()->build()
)->build(),
'key1' => BulkUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequestBuilder::init(
'customer_id3',
'customer_id8',
CustomAttributeBuilder::init()->build()
)->build()
]
Expand Down Expand Up @@ -363,6 +363,8 @@ $withDefinitions = false;

$apiResponse = $customerCustomAttributesApi->listCustomerCustomAttributes(
$customerId,
null,
null,
$withDefinitions
);

Expand Down
12 changes: 9 additions & 3 deletions doc/apis/customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
```php
$count = false;

$apiResponse = $customersApi->listCustomers($count);
$apiResponse = $customersApi->listCustomers(
null,
null,
null,
null,
$count
);

if ($apiResponse->isSuccess()) {
$listCustomersResponse = $apiResponse->getResult();
Expand Down Expand Up @@ -183,8 +189,8 @@ $body = SearchCustomersRequestBuilder::init()
)
->createdAt(
TimeRangeBuilder::init()
->startAt('2018-01-01T00:00:00+00:00')
->endAt('2018-02-01T00:00:00+00:00')
->startAt('2018-01-01T00:00:00-00:00')
->endAt('2018-02-01T00:00:00-00:00')
->build()
)
->emailAddress(
Expand Down
83 changes: 83 additions & 0 deletions doc/apis/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,55 @@ $devicesApi = $client->getDevicesApi();

## Methods

* [List Devices](../../doc/apis/devices.md#list-devices)
* [List Device Codes](../../doc/apis/devices.md#list-device-codes)
* [Create Device Code](../../doc/apis/devices.md#create-device-code)
* [Get Device Code](../../doc/apis/devices.md#get-device-code)
* [Get Device](../../doc/apis/devices.md#get-device)


# List Devices

List devices associated with the merchant. Currently, only Terminal API
devices are supported.

```php
function listDevices(
?string $cursor = null,
?string $sortOrder = null,
?int $limit = null,
?string $locationId = null
): ApiResponse
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `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>See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
| `sortOrder` | [`?string(SortOrder)`](../../doc/models/sort-order.md) | Query, Optional | The order in which results are listed.<br><br>- `ASC` - Oldest to newest.<br>- `DESC` - Newest to oldest (default). |
| `limit` | `?int` | Query, Optional | The number of results to return in a single page. |
| `locationId` | `?string` | Query, Optional | If present, only returns devices at the target location. |

## Response Type

This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`ListDevicesResponse`](../../doc/models/list-devices-response.md).

## Example Usage

```php
$apiResponse = $devicesApi->listDevices();

if ($apiResponse->isSuccess()) {
$listDevicesResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}

// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
```


# List Device Codes
Expand Down Expand Up @@ -138,3 +184,40 @@ var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
```


# Get Device

Retrieves Device with the associated `device_id`.

```php
function getDevice(string $deviceId): ApiResponse
```

## Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `deviceId` | `string` | Template, Required | The unique ID for the desired `Device`. |

## Response Type

This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`GetDeviceResponse`](../../doc/models/get-device-response.md).

## Example Usage

```php
$deviceId = 'device_id6';

$apiResponse = $devicesApi->getDevice($deviceId);

if ($apiResponse->isSuccess()) {
$getDeviceResponse = $apiResponse->getResult();
} else {
$errors = $apiResponse->getErrors();
}

// Getting more response information
var_dump($apiResponse->getStatusCode());
var_dump($apiResponse->getHeaders());
```

12 changes: 6 additions & 6 deletions doc/apis/inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ $body = BatchRetrieveInventoryChangesRequestBuilder::init()
InventoryState::IN_STOCK
]
)
->updatedAfter('2016-11-01T00:00:00Z')
->updatedBefore('2016-12-01T00:00:00Z')
->updatedAfter('2016-11-01T00:00:00.000Z')
->updatedBefore('2016-12-01T00:00:00.000Z')
->build();

$apiResponse = $inventoryApi->deprecatedBatchRetrieveInventoryChanges($body);
Expand Down Expand Up @@ -263,7 +263,7 @@ $body = BatchRetrieveInventoryCountsRequestBuilder::init()
'59TNP9SA8VGDA'
]
)
->updatedAfter('2016-11-16T00:00:00Z')
->updatedAfter('2016-11-16T00:00:00.000Z')
->build();

$apiResponse = $inventoryApi->deprecatedBatchRetrieveInventoryCounts($body);
Expand Down Expand Up @@ -392,8 +392,8 @@ $body = BatchRetrieveInventoryChangesRequestBuilder::init()
InventoryState::IN_STOCK
]
)
->updatedAfter('2016-11-01T00:00:00Z')
->updatedBefore('2016-12-01T00:00:00Z')
->updatedAfter('2016-11-01T00:00:00.000Z')
->updatedBefore('2016-12-01T00:00:00.000Z')
->build();

$apiResponse = $inventoryApi->batchRetrieveInventoryChanges($body);
Expand Down Expand Up @@ -452,7 +452,7 @@ $body = BatchRetrieveInventoryCountsRequestBuilder::init()
'59TNP9SA8VGDA'
]
)
->updatedAfter('2016-11-16T00:00:00Z')
->updatedAfter('2016-11-16T00:00:00.000Z')
->build();

$apiResponse = $inventoryApi->batchRetrieveInventoryCounts($body);
Expand Down
16 changes: 8 additions & 8 deletions doc/apis/labor.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ This method returns a `Square\Utils\ApiResponse` instance. The `getResult()` met
```php
$body = CreateShiftRequestBuilder::init(
ShiftBuilder::init(
'2019-01-25T08:11:00+00:00'
'2019-01-25T03:11:00-05:00'
)
->locationId('PAA1RJZZKXBFG')
->endAt('2019-01-25T18:11:00+00:00')
->endAt('2019-01-25T13:11:00-05:00')
->wage(
ShiftWageBuilder::init()
->title('Barista')
Expand All @@ -389,13 +389,13 @@ $body = CreateShiftRequestBuilder::init(
->breaks(
[
MBreakBuilder::init(
'2019-01-25T11:11:00+00:00',
'2019-01-25T06:11:00-05:00',
'REGS1EQR1TPZ5',
'Tea Break',
'PT5M',
true
)
->endAt('2019-01-25T11:16:00+00:00')
->endAt('2019-01-25T06:16:00-05:00')
->build()
]
)
Expand Down Expand Up @@ -599,10 +599,10 @@ $id = 'id0';

$body = UpdateShiftRequestBuilder::init(
ShiftBuilder::init(
'2019-01-25T08:11:00+00:00'
'2019-01-25T03:11:00-05:00'
)
->locationId('PAA1RJZZKXBFG')
->endAt('2019-01-25T18:11:00+00:00')
->endAt('2019-01-25T13:11:00-05:00')
->wage(
ShiftWageBuilder::init()
->title('Bartender')
Expand All @@ -617,14 +617,14 @@ $body = UpdateShiftRequestBuilder::init(
->breaks(
[
MBreakBuilder::init(
'2019-01-25T11:11:00+00:00',
'2019-01-25T06:11:00-05:00',
'REGS1EQR1TPZ5',
'Tea Break',
'PT5M',
true
)
->id('X7GAQYVVRRG6P')
->endAt('2019-01-25T11:16:00+00:00')
->endAt('2019-01-25T06:16:00-05:00')
->build()
]
)
Expand Down
Loading

0 comments on commit 1190673

Please sign in to comment.