Skip to content

Commit 2267813

Browse files
committed
SDK regeneration
1 parent 99193d6 commit 2267813

9 files changed

+639
-4
lines changed

.mock/definition/__package__.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,6 +3378,38 @@ types:
33783378
from the `amount_money` and `buyer_supplied_money` fields.
33793379
source:
33803380
openapi: openapi/openapi.json
3381+
CatalogAvailabilityPeriod:
3382+
docs: Represents a time period of availability.
3383+
properties:
3384+
start_local_time:
3385+
type: optional<nullable<string>>
3386+
docs: >-
3387+
The start time of an availability period, specified in local time
3388+
using partial-time
3389+
3390+
RFC 3339 format. For example, `8:30:00` for a period starting at 8:30
3391+
in the morning.
3392+
3393+
Note that the seconds value is always :00, but it is appended for
3394+
conformance to the RFC.
3395+
end_local_time:
3396+
type: optional<nullable<string>>
3397+
docs: >-
3398+
The end time of an availability period, specified in local time using
3399+
partial-time
3400+
3401+
RFC 3339 format. For example, `21:00:00` for a period ending at 9:00
3402+
in the evening.
3403+
3404+
Note that the seconds value is always :00, but it is appended for
3405+
conformance to the RFC.
3406+
day_of_week:
3407+
type: optional<DayOfWeek>
3408+
docs: |-
3409+
The day of the week for this availability period.
3410+
See [DayOfWeek](#type-dayofweek) for possible values
3411+
source:
3412+
openapi: openapi/openapi.json
33813413
CatalogCategory:
33823414
docs: A category to which a `CatalogItem` instance belongs.
33833415
properties:
@@ -5129,6 +5161,8 @@ types:
51295161
CHECKOUT_LINK: CatalogObjectCheckoutLink
51305162
ADDRESS: CatalogObjectAddress
51315163
SUBSCRIPTION_PRODUCT: CatalogObjectSubscriptionProduct
5164+
SUBSCRIPTION_PLAN_VARIATION: CatalogObjectSubscriptionPlanVariation
5165+
AVAILABILITY_PERIOD: CatalogObjectAvailabilityPeriod
51325166
source:
51335167
openapi: openapi/openapi.json
51345168
CatalogObjectBatch:
@@ -6156,6 +6190,43 @@ types:
61566190
SubscriptionPlan.
61576191
source:
61586192
openapi: openapi/openapi.json
6193+
CatalogSubscriptionPlanVariation:
6194+
docs: >-
6195+
Describes a subscription plan variation. A subscription plan variation
6196+
represents how the subscription for a product or service is sold.
6197+
6198+
For more information, see [Subscription Plans and
6199+
Variations](https://developer.squareup.com/docs/subscriptions-api/plans-and-variations).
6200+
properties:
6201+
name:
6202+
type: string
6203+
docs: The name of the plan variation.
6204+
phases:
6205+
docs: >-
6206+
A list containing each [SubscriptionPhase](entity:SubscriptionPhase)
6207+
for this plan variation.
6208+
type: list<SubscriptionPhase>
6209+
subscription_plan_id:
6210+
type: optional<nullable<string>>
6211+
docs: The id of the subscription plan, if there is one.
6212+
monthly_billing_anchor_date:
6213+
type: optional<nullable<long>>
6214+
docs: The day of the month the billing period starts.
6215+
can_prorate:
6216+
type: optional<nullable<boolean>>
6217+
docs: Whether bills for this plan variation can be split for proration.
6218+
successor_plan_variation_id:
6219+
type: optional<nullable<string>>
6220+
docs: >-
6221+
The ID of a "successor" plan variation to this one. If the field is
6222+
set, and this object is disabled at all
6223+
6224+
locations, it indicates that this variation is deprecated and the
6225+
object identified by the successor ID be used in
6226+
6227+
its stead.
6228+
source:
6229+
openapi: openapi/openapi.json
61596230
CatalogTax:
61606231
docs: A tax applicable to an item.
61616232
properties:
@@ -26939,6 +27010,28 @@ types:
2693927010
- CatalogObjectBase
2694027011
source:
2694127012
openapi: openapi/openapi.json
27013+
CatalogObjectSubscriptionPlanVariation:
27014+
properties:
27015+
subscription_plan_variation_data:
27016+
type: optional<CatalogSubscriptionPlanVariation>
27017+
docs: >-
27018+
Structured data for a `CatalogSubscriptionPlanVariation`, set for
27019+
CatalogObjects of type `SUBSCRIPTION_PLAN_VARIATION`.
27020+
extends:
27021+
- CatalogObjectBase
27022+
source:
27023+
openapi: openapi/openapi.json
27024+
CatalogObjectAvailabilityPeriod:
27025+
properties:
27026+
availability_period_data:
27027+
type: optional<CatalogAvailabilityPeriod>
27028+
docs: >-
27029+
Structured data for a `CatalogAvailabilityPeriod`, set for
27030+
CatalogObjects of type `AVAILABILITY_PERIOD`.
27031+
extends:
27032+
- CatalogObjectBase
27033+
source:
27034+
openapi: openapi/openapi.json
2694227035
CatalogObjectComponent:
2694327036
properties: {}
2694427037
extends:

.mock/fern.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization" : "square",
3-
"version" : "0.56.24"
3+
"version" : "0.57.11"
44
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "square/square",
3-
"version": "42.0.0.20250319",
3+
"version": "42.0.1.20250319",
44
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
55
"keywords": [
66
"square",

src/SquareClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ public function __construct(
250250
'Square-Version' => '2025-03-19',
251251
'X-Fern-Language' => 'PHP',
252252
'X-Fern-SDK-Name' => 'Square',
253-
'X-Fern-SDK-Version' => '42.0.0.20250319',
254-
'User-Agent' => 'square/square/42.0.0.20250319',
253+
'X-Fern-SDK-Version' => '42.0.1.20250319',
254+
'User-Agent' => 'square/square/42.0.1.20250319',
255255
];
256256
if ($version != null) {
257257
$defaultHeaders['Square-Version'] = $version;
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?php
2+
3+
namespace Square\Types;
4+
5+
use Square\Core\Json\JsonSerializableType;
6+
use Square\Core\Json\JsonProperty;
7+
8+
/**
9+
* Represents a time period of availability.
10+
*/
11+
class CatalogAvailabilityPeriod extends JsonSerializableType
12+
{
13+
/**
14+
* The start time of an availability period, specified in local time using partial-time
15+
* RFC 3339 format. For example, `8:30:00` for a period starting at 8:30 in the morning.
16+
* Note that the seconds value is always :00, but it is appended for conformance to the RFC.
17+
*
18+
* @var ?string $startLocalTime
19+
*/
20+
#[JsonProperty('start_local_time')]
21+
private ?string $startLocalTime;
22+
23+
/**
24+
* The end time of an availability period, specified in local time using partial-time
25+
* RFC 3339 format. For example, `21:00:00` for a period ending at 9:00 in the evening.
26+
* Note that the seconds value is always :00, but it is appended for conformance to the RFC.
27+
*
28+
* @var ?string $endLocalTime
29+
*/
30+
#[JsonProperty('end_local_time')]
31+
private ?string $endLocalTime;
32+
33+
/**
34+
* The day of the week for this availability period.
35+
* See [DayOfWeek](#type-dayofweek) for possible values
36+
*
37+
* @var ?value-of<DayOfWeek> $dayOfWeek
38+
*/
39+
#[JsonProperty('day_of_week')]
40+
private ?string $dayOfWeek;
41+
42+
/**
43+
* @param array{
44+
* startLocalTime?: ?string,
45+
* endLocalTime?: ?string,
46+
* dayOfWeek?: ?value-of<DayOfWeek>,
47+
* } $values
48+
*/
49+
public function __construct(
50+
array $values = [],
51+
) {
52+
$this->startLocalTime = $values['startLocalTime'] ?? null;
53+
$this->endLocalTime = $values['endLocalTime'] ?? null;
54+
$this->dayOfWeek = $values['dayOfWeek'] ?? null;
55+
}
56+
57+
/**
58+
* @return ?string
59+
*/
60+
public function getStartLocalTime(): ?string
61+
{
62+
return $this->startLocalTime;
63+
}
64+
65+
/**
66+
* @param ?string $value
67+
*/
68+
public function setStartLocalTime(?string $value = null): self
69+
{
70+
$this->startLocalTime = $value;
71+
return $this;
72+
}
73+
74+
/**
75+
* @return ?string
76+
*/
77+
public function getEndLocalTime(): ?string
78+
{
79+
return $this->endLocalTime;
80+
}
81+
82+
/**
83+
* @param ?string $value
84+
*/
85+
public function setEndLocalTime(?string $value = null): self
86+
{
87+
$this->endLocalTime = $value;
88+
return $this;
89+
}
90+
91+
/**
92+
* @return ?value-of<DayOfWeek>
93+
*/
94+
public function getDayOfWeek(): ?string
95+
{
96+
return $this->dayOfWeek;
97+
}
98+
99+
/**
100+
* @param ?value-of<DayOfWeek> $value
101+
*/
102+
public function setDayOfWeek(?string $value = null): self
103+
{
104+
$this->dayOfWeek = $value;
105+
return $this;
106+
}
107+
108+
/**
109+
* @return string
110+
*/
111+
public function __toString(): string
112+
{
113+
return $this->toJson();
114+
}
115+
}

0 commit comments

Comments
 (0)