Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
}
}
},
"originGitCommit": "074e2540401528521d322c512800c4ebd67cd153",
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
"sdkVersion": "46.1.0.20260819"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2340,6 +2340,14 @@ of `CategoryPathToRootNode` objects and specifies the path that starts with the
and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned
in the response payload.

</dd>
</dl>

<dl>
<dd>

**$includeOptions:** `?IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -2801,6 +2809,14 @@ is higher than the maximum limit of 1,000, it will be ignored.

**$includeCategoryPathToRoot:** `?bool` — Specifies whether or not to include the `path_to_root` list for each returned category instance. The `path_to_root` list consists of `CategoryPathToRootNode` objects and specifies the path that starts with the immediate parent category of the returned category and ends with its root category. If the returned category is a top-level category, the `path_to_root` list is empty and is not returned in the response payload. If `include_category_path_to_root` is `true`, then the `include_deleted_objects` request parameter must be `false`. Both properties cannot be `true` at the same time.

</dd>
</dl>

<dl>
<dd>

**$includeOptions:** `?IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -2989,6 +3005,14 @@ a single call to the [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItem

**$archivedState:** `?string` — The query filter to return not archived (`ARCHIVED_STATE_NOT_ARCHIVED`), archived (`ARCHIVED_STATE_ARCHIVED`), or either type (`ARCHIVED_STATE_ALL`) of items.

</dd>
</dl>

<dl>
<dd>

**$includeOptions:** `?IncludeOptions` — Options to include related resources in the response.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -10653,8 +10677,9 @@ how to sort or filter the results. Your `SearchOrdersQuery` can:

Note that details for orders processed with Square Point of Sale while in
offline mode might not be transmitted to Square for up to 72 hours. Offline
orders have a `created_at` value that reflects the time the order was created,
not the time it was subsequently transmitted to Square.
orders have a `created_at` value that reflects the time the order was
transmitted to Square and created server-side, not the time the order was
created on the Point of Sale device.
</dd>
</dl>
</dd>
Expand Down
27 changes: 27 additions & 0 deletions src/Catalog/Requests/BatchGetCatalogObjectsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Square\Core\Json\JsonSerializableType;
use Square\Core\Json\JsonProperty;
use Square\Core\Types\ArrayType;
use Square\Types\IncludeOptions;

class BatchGetCatalogObjectsRequest extends JsonSerializableType
{
Expand Down Expand Up @@ -63,13 +64,20 @@ class BatchGetCatalogObjectsRequest extends JsonSerializableType
#[JsonProperty('include_category_path_to_root')]
private ?bool $includeCategoryPathToRoot;

/**
* @var ?IncludeOptions $includeOptions Options to include related resources in the response.
*/
#[JsonProperty('include_options')]
private ?IncludeOptions $includeOptions;

/**
* @param array{
* objectIds: array<string>,
* includeRelatedObjects?: ?bool,
* catalogVersion?: ?int,
* includeDeletedObjects?: ?bool,
* includeCategoryPathToRoot?: ?bool,
* includeOptions?: ?IncludeOptions,
* } $values
*/
public function __construct(
Expand All @@ -80,6 +88,7 @@ public function __construct(
$this->catalogVersion = $values['catalogVersion'] ?? null;
$this->includeDeletedObjects = $values['includeDeletedObjects'] ?? null;
$this->includeCategoryPathToRoot = $values['includeCategoryPathToRoot'] ?? null;
$this->includeOptions = $values['includeOptions'] ?? null;
}

/**
Expand Down Expand Up @@ -171,4 +180,22 @@ public function setIncludeCategoryPathToRoot(?bool $value = null): self
$this->_setField('includeCategoryPathToRoot');
return $this;
}

/**
* @return ?IncludeOptions
*/
public function getIncludeOptions(): ?IncludeOptions
{
return $this->includeOptions;
}

/**
* @param ?IncludeOptions $value
*/
public function setIncludeOptions(?IncludeOptions $value = null): self
{
$this->includeOptions = $value;
$this->_setField('includeOptions');
return $this;
}
}
27 changes: 27 additions & 0 deletions src/Catalog/Requests/SearchCatalogItemsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Square\Types\CatalogItemProductType;
use Square\Types\CustomAttributeFilter;
use Square\Types\ArchivedState;
use Square\Types\IncludeOptions;

class SearchCatalogItemsRequest extends JsonSerializableType
{
Expand Down Expand Up @@ -87,6 +88,12 @@ class SearchCatalogItemsRequest extends JsonSerializableType
#[JsonProperty('archived_state')]
private ?string $archivedState;

/**
* @var ?IncludeOptions $includeOptions Options to include related resources in the response.
*/
#[JsonProperty('include_options')]
private ?IncludeOptions $includeOptions;

/**
* @param array{
* textFilter?: ?string,
Expand All @@ -99,6 +106,7 @@ class SearchCatalogItemsRequest extends JsonSerializableType
* productTypes?: ?array<value-of<CatalogItemProductType>>,
* customAttributeFilters?: ?array<CustomAttributeFilter>,
* archivedState?: ?value-of<ArchivedState>,
* includeOptions?: ?IncludeOptions,
* } $values
*/
public function __construct(
Expand All @@ -114,6 +122,7 @@ public function __construct(
$this->productTypes = $values['productTypes'] ?? null;
$this->customAttributeFilters = $values['customAttributeFilters'] ?? null;
$this->archivedState = $values['archivedState'] ?? null;
$this->includeOptions = $values['includeOptions'] ?? null;
}

/**
Expand Down Expand Up @@ -295,4 +304,22 @@ public function setArchivedState(?string $value = null): self
$this->_setField('archivedState');
return $this;
}

/**
* @return ?IncludeOptions
*/
public function getIncludeOptions(): ?IncludeOptions
{
return $this->includeOptions;
}

/**
* @param ?IncludeOptions $value
*/
public function setIncludeOptions(?IncludeOptions $value = null): self
{
$this->includeOptions = $value;
$this->_setField('includeOptions');
return $this;
}
}
27 changes: 27 additions & 0 deletions src/Catalog/Requests/SearchCatalogObjectsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Square\Types\CatalogObjectType;
use Square\Core\Types\ArrayType;
use Square\Types\CatalogQuery;
use Square\Types\IncludeOptions;

class SearchCatalogObjectsRequest extends JsonSerializableType
{
Expand Down Expand Up @@ -99,6 +100,12 @@ class SearchCatalogObjectsRequest extends JsonSerializableType
#[JsonProperty('include_category_path_to_root')]
private ?bool $includeCategoryPathToRoot;

/**
* @var ?IncludeOptions $includeOptions Options to include related resources in the response.
*/
#[JsonProperty('include_options')]
private ?IncludeOptions $includeOptions;

/**
* @param array{
* cursor?: ?string,
Expand All @@ -109,6 +116,7 @@ class SearchCatalogObjectsRequest extends JsonSerializableType
* query?: ?CatalogQuery,
* limit?: ?int,
* includeCategoryPathToRoot?: ?bool,
* includeOptions?: ?IncludeOptions,
* } $values
*/
public function __construct(
Expand All @@ -122,6 +130,7 @@ public function __construct(
$this->query = $values['query'] ?? null;
$this->limit = $values['limit'] ?? null;
$this->includeCategoryPathToRoot = $values['includeCategoryPathToRoot'] ?? null;
$this->includeOptions = $values['includeOptions'] ?? null;
}

/**
Expand Down Expand Up @@ -267,4 +276,22 @@ public function setIncludeCategoryPathToRoot(?bool $value = null): self
$this->_setField('includeCategoryPathToRoot');
return $this;
}

/**
* @return ?IncludeOptions
*/
public function getIncludeOptions(): ?IncludeOptions
{
return $this->includeOptions;
}

/**
* @param ?IncludeOptions $value
*/
public function setIncludeOptions(?IncludeOptions $value = null): self
{
$this->includeOptions = $value;
$this->_setField('includeOptions');
return $this;
}
}
5 changes: 3 additions & 2 deletions src/Orders/OrdersClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ public function clone(CloneOrderRequest $request, ?array $options = null): Clone
*
* Note that details for orders processed with Square Point of Sale while in
* offline mode might not be transmitted to Square for up to 72 hours. Offline
* orders have a `created_at` value that reflects the time the order was created,
* not the time it was subsequently transmitted to Square.
* orders have a `created_at` value that reflects the time the order was
* transmitted to Square and created server-side, not the time the order was
* created on the Point of Sale device.
*
* @param SearchOrdersRequest $request
* @param ?array{
Expand Down
2 changes: 1 addition & 1 deletion src/SquareClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function __construct(
$token ??= $this->getFromEnvOrThrow('SQUARE_TOKEN', 'Please pass in token or set the environment variable SQUARE_TOKEN.');
$defaultHeaders = [
'Authorization' => "Bearer $token",
'Square-Version' => '2026-07-15',
'Square-Version' => '2026-08-19',
'X-Fern-Language' => 'PHP',
'X-Fern-SDK-Name' => 'Square',
'X-Fern-SDK-Version' => '46.1.0.20260819',
Expand Down
26 changes: 26 additions & 0 deletions src/Types/BatchGetCatalogObjectsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,18 @@ class BatchGetCatalogObjectsResponse extends JsonSerializableType
#[JsonProperty('related_objects'), ArrayType([CatalogObject::class])]
private ?array $relatedObjects;

/**
* @var ?IncludedResources $includedResources A list of [CatalogObject](entity:CatalogObject)s referenced by the object in the `objects` field and specifically requested.
*/
#[JsonProperty('included_resources')]
private ?IncludedResources $includedResources;

/**
* @param array{
* errors?: ?array<Error>,
* objects?: ?array<CatalogObject>,
* relatedObjects?: ?array<CatalogObject>,
* includedResources?: ?IncludedResources,
* } $values
*/
public function __construct(
Expand All @@ -39,6 +46,7 @@ public function __construct(
$this->errors = $values['errors'] ?? null;
$this->objects = $values['objects'] ?? null;
$this->relatedObjects = $values['relatedObjects'] ?? null;
$this->includedResources = $values['includedResources'] ?? null;
}

/**
Expand Down Expand Up @@ -95,6 +103,24 @@ public function setRelatedObjects(?array $value = null): self
return $this;
}

/**
* @return ?IncludedResources
*/
public function getIncludedResources(): ?IncludedResources
{
return $this->includedResources;
}

/**
* @param ?IncludedResources $value
*/
public function setIncludedResources(?IncludedResources $value = null): self
{
$this->includedResources = $value;
$this->_setField('includedResources');
return $this;
}

/**
* @return string
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Types/CardBrand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ enum CardBrand: string
case Eftpos = "EFTPOS";
case Felica = "FELICA";
case Ebt = "EBT";
case Quicpay = "QUICPAY";
case Id = "ID";
case TransportationIc = "TRANSPORTATION_IC";
case Carnet = "CARNET";
}
Loading
Loading