Skip to content

Commit

Permalink
Merge pull request #127 from square/release/26.0.0
Browse files Browse the repository at this point in the history
Generated PR for Release: 26.0.0
  • Loading branch information
daphnechiu committed Apr 18, 2023
2 parents 2ed6eb7 + 7d5c067 commit 37781b6
Show file tree
Hide file tree
Showing 748 changed files with 33,410 additions and 4,102 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ npm test
* [Mobile Authorization]
* [OAuth]

### Webhook Subscriptions
* [Webhook Subscriptions]
## Deprecated APIs

The following Square APIs are [deprecated](https://developer.squareup.com/docs/build-basics/api-lifecycle):
Expand Down Expand Up @@ -176,3 +178,4 @@ The following Square APIs are [deprecated](https://developer.squareup.com/docs/b
[Gift Card Activities]: doc/api/gift-card-activities.md
[Employees]: doc/api/employees.md
[Transactions]: doc/api/transactions.md
[Webhook Subscriptions]: doc/api/webhook-subscriptions.md
12 changes: 6 additions & 6 deletions doc/api/booking-custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ async listBookingCustomAttributes(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
| `limit` | `number \| undefined` | Query, Optional | The maximum number of results to return in a single paged response. This limit is advisory.<br>The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100.<br>The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
| `cursor` | `string \| undefined` | Query, Optional | The cursor returned in the paged response from the previous call to this endpoint.<br>Provide this cursor to retrieve the next page of results for your original request. For more<br>information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
| `withDefinitions` | `boolean \| undefined` | Query, Optional | Indicates whether to return the [custom attribute definition](../../doc/models/custom-attribute-definition.md) in the `definition` field of each<br>custom attribute. Set this parameter to `true` to get the name and description of each custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
| `withDefinitions` | `boolean \| undefined` | Query, Optional | Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of each<br>custom attribute. Set this parameter to `true` to get the name and description of each custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type
Expand Down Expand Up @@ -431,7 +431,7 @@ async deleteBookingCustomAttribute(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
| `key` | `string` | Template, Required | The key of the custom attribute to delete. This key must match the `key` of a custom<br>attribute definition in the Square seller account. If the requesting application is not the<br>definition owner, you must use the qualified key. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

Expand Down Expand Up @@ -478,9 +478,9 @@ async retrieveBookingCustomAttribute(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
| `key` | `string` | Template, Required | The key of the custom attribute to retrieve. This key must match the `key` of a custom<br>attribute definition in the Square seller account. If the requesting application is not the<br>definition owner, you must use the qualified key. |
| `withDefinition` | `boolean \| undefined` | Query, Optional | Indicates whether to return the [custom attribute definition](../../doc/models/custom-attribute-definition.md) in the `definition` field of<br>the custom attribute. Set this parameter to `true` to get the name and description of the custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
| `withDefinition` | `boolean \| undefined` | Query, Optional | Indicates whether to return the [custom attribute definition](entity:CustomAttributeDefinition) in the `definition` field of<br>the custom attribute. Set this parameter to `true` to get the name and description of the custom<br>attribute, information about the data type, or other definition details. The default value is `false`.<br>**Default**: `false` |
| `version` | `number \| undefined` | Query, Optional | The current version of the custom attribute, which is used for strongly consistent reads to<br>guarantee that you receive the most up-to-date data. When included in the request, Square<br>returns the specified version or a higher version if one exists. If the specified version is<br>higher than the current version, Square returns a `BAD_REQUEST` error. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

Expand Down Expand Up @@ -530,7 +530,7 @@ async upsertBookingCustomAttribute(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](../../doc/models/booking.md). |
| `bookingId` | `string` | Template, Required | The ID of the target [booking](entity:Booking). |
| `key` | `string` | Template, Required | The key of the custom attribute to create or update. 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. |
| `body` | [`UpsertBookingCustomAttributeRequest`](../../doc/models/upsert-booking-custom-attribute-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
Expand Down
10 changes: 5 additions & 5 deletions doc/api/bookings.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Creates a booking.

The required input must include the following:

- `Booking.location_id`,
- `Booking.start_at`,
- `Booking.location_id`
- `Booking.start_at`
- `Booking.team_member_id`
- `Booking.AppointmentSegment.service_variation_id`
- `Booking.AppointmentSegment.service_variation_version`
Expand Down Expand Up @@ -325,7 +325,7 @@ async retrieveBooking(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](../../doc/models/booking.md) object representing the to-be-retrieved booking. |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-retrieved booking. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type
Expand Down Expand Up @@ -371,7 +371,7 @@ async updateBooking(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](../../doc/models/booking.md) object representing the to-be-updated booking. |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-updated booking. |
| `body` | [`UpdateBookingRequest`](../../doc/models/update-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

Expand Down Expand Up @@ -425,7 +425,7 @@ async cancelBooking(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](../../doc/models/booking.md) object representing the to-be-cancelled booking. |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](entity:Booking) object representing the to-be-cancelled booking. |
| `body` | [`CancelBookingRequest`](../../doc/models/cancel-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

Expand Down
2 changes: 1 addition & 1 deletion doc/api/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async listCards(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string \| undefined` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for your original query.<br><br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
| `cursor` | `string \| undefined` | Query, Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for your original query.<br><br>See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
| `customerId` | `string \| undefined` | Query, Optional | Limit results to cards associated with the customer supplied.<br>By default, all cards owned by the merchant are returned. |
| `includeDisabled` | `boolean \| undefined` | Query, Optional | Includes disabled cards.<br>By default, all enabled cards owned by the merchant are returned.<br>**Default**: `false` |
| `referenceId` | `string \| undefined` | Query, Optional | Limit results to cards associated with the reference_id supplied. |
Expand Down
9 changes: 7 additions & 2 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ async listCatalog(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string \| undefined` | 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. |
| `types` | `string \| undefined` | 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. |
| `cursor` | `string \| undefined` | 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/build-basics/common-api-patterns/pagination) for more information. |
| `types` | `string \| undefined` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](entity:CatalogObjectType) 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. |
| `catalogVersion` | `bigint \| undefined` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical 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 be from the<br>current version of the catalog. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

Expand Down Expand Up @@ -548,10 +548,15 @@ bodyObjectItemDatavariations0.itemVariationData = bodyObjectItemDatavariations0I

bodyObjectItemDataVariations[0] = bodyObjectItemDatavariations0;

const bodyObjectItemDatavariations1ItemVariationDataPriceMoney: Money = {};
bodyObjectItemDatavariations1ItemVariationDataPriceMoney.amount = BigInt(400);
bodyObjectItemDatavariations1ItemVariationDataPriceMoney.currency = 'USD';

const bodyObjectItemDatavariations1ItemVariationData: CatalogItemVariation = {};
bodyObjectItemDatavariations1ItemVariationData.itemId = '#Cocoa';
bodyObjectItemDatavariations1ItemVariationData.name = 'Large';
bodyObjectItemDatavariations1ItemVariationData.pricingType = 'FIXED_PRICING';
bodyObjectItemDatavariations1ItemVariationData.priceMoney = bodyObjectItemDatavariations1ItemVariationDataPriceMoney;

const bodyObjectItemDatavariations1: CatalogObject = {
type: 'ITEM_VARIATION',
Expand Down
14 changes: 13 additions & 1 deletion doc/api/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ 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](../../doc/api/checkout.md#create-payment-link) 
We recommend that you use the new [CreatePaymentLink](api-endpoint:Checkout-CreatePaymentLink) 
endpoint in place of this previously released endpoint.

```ts
Expand Down Expand Up @@ -74,26 +74,35 @@ const bodyOrderOrderlineItems0appliedDiscounts0: OrderLineItemAppliedDiscount =

bodyOrderOrderlineItems0AppliedDiscounts[0] = bodyOrderOrderlineItems0appliedDiscounts0;

const bodyOrderOrderlineItems0BasePriceMoney: Money = {};

const bodyOrderOrderlineItems0: OrderLineItem = {
quantity: '2',
};
bodyOrderOrderlineItems0.name = 'Printed T Shirt';
bodyOrderOrderlineItems0.appliedTaxes = bodyOrderOrderlineItems0AppliedTaxes;
bodyOrderOrderlineItems0.appliedDiscounts = bodyOrderOrderlineItems0AppliedDiscounts;
bodyOrderOrderlineItems0.basePriceMoney = bodyOrderOrderlineItems0BasePriceMoney;

bodyOrderOrderLineItems[0] = bodyOrderOrderlineItems0;

const bodyOrderOrderlineItems1BasePriceMoney: Money = {};

const bodyOrderOrderlineItems1: OrderLineItem = {
quantity: '1',
};
bodyOrderOrderlineItems1.name = 'Slim Jeans';
bodyOrderOrderlineItems1.basePriceMoney = bodyOrderOrderlineItems1BasePriceMoney;

bodyOrderOrderLineItems[1] = bodyOrderOrderlineItems1;

const bodyOrderOrderlineItems2BasePriceMoney: Money = {};

const bodyOrderOrderlineItems2: OrderLineItem = {
quantity: '3',
};
bodyOrderOrderlineItems2.name = 'Woven Sweater';
bodyOrderOrderlineItems2.basePriceMoney = bodyOrderOrderlineItems2BasePriceMoney;

bodyOrderOrderLineItems[2] = bodyOrderOrderlineItems2;

Expand All @@ -109,9 +118,12 @@ bodyOrderOrderTaxes[0] = bodyOrderOrdertaxes0;

const bodyOrderOrderDiscounts: OrderLineItemDiscount[] = [];

const bodyOrderOrderdiscounts0AmountMoney: Money = {};

const bodyOrderOrderdiscounts0: OrderLineItemDiscount = {};
bodyOrderOrderdiscounts0.uid = '56ae1696-z1e3-9328-af6d-f1e04d947gd4';
bodyOrderOrderdiscounts0.type = 'FIXED_AMOUNT';
bodyOrderOrderdiscounts0.amountMoney = bodyOrderOrderdiscounts0AmountMoney;
bodyOrderOrderdiscounts0.scope = 'LINE_ITEM';

bodyOrderOrderDiscounts[0] = bodyOrderOrderdiscounts0;
Expand Down
Loading

0 comments on commit 37781b6

Please sign in to comment.