Skip to content

Commit

Permalink
Merge pull request #125 from square/release/25.2.0
Browse files Browse the repository at this point in the history
Generated PR for Release: 25.2.0
  • Loading branch information
jguze authored Mar 14, 2023
2 parents 69d9191 + a1ee616 commit 2ed6eb7
Show file tree
Hide file tree
Showing 158 changed files with 665 additions and 217 deletions.
8 changes: 8 additions & 0 deletions doc/api/bookings.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ try {

Creates a booking.

The required input must include the following:

- `Booking.location_id`,
- `Booking.start_at`,
- `Booking.team_member_id`
- `Booking.AppointmentSegment.service_variation_id`
- `Booking.AppointmentSegment.service_variation_version`

To call this endpoint with buyer-level permissions, set `APPOINTMENTS_WRITE` for the OAuth scope.
To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_WRITE` and `APPOINTMENTS_WRITE` for the OAuth scope.

Expand Down
5 changes: 0 additions & 5 deletions doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,15 +548,10 @@ 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
20 changes: 0 additions & 20 deletions doc/api/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,41 +74,26 @@ const bodyOrderOrderlineItems0appliedDiscounts0: OrderLineItemAppliedDiscount =

bodyOrderOrderlineItems0AppliedDiscounts[0] = bodyOrderOrderlineItems0appliedDiscounts0;

const bodyOrderOrderlineItems0BasePriceMoney: Money = {};
bodyOrderOrderlineItems0BasePriceMoney.amount = BigInt(1500);
bodyOrderOrderlineItems0BasePriceMoney.currency = 'USD';

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 = {};
bodyOrderOrderlineItems1BasePriceMoney.amount = BigInt(2500);
bodyOrderOrderlineItems1BasePriceMoney.currency = 'USD';

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

bodyOrderOrderLineItems[1] = bodyOrderOrderlineItems1;

const bodyOrderOrderlineItems2BasePriceMoney: Money = {};
bodyOrderOrderlineItems2BasePriceMoney.amount = BigInt(3500);
bodyOrderOrderlineItems2BasePriceMoney.currency = 'USD';

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

bodyOrderOrderLineItems[2] = bodyOrderOrderlineItems2;

Expand All @@ -124,14 +109,9 @@ bodyOrderOrderTaxes[0] = bodyOrderOrdertaxes0;

const bodyOrderOrderDiscounts: OrderLineItemDiscount[] = [];

const bodyOrderOrderdiscounts0AmountMoney: Money = {};
bodyOrderOrderdiscounts0AmountMoney.amount = BigInt(100);
bodyOrderOrderdiscounts0AmountMoney.currency = 'USD';

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
2 changes: 1 addition & 1 deletion doc/api/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async createDeviceCode(
```ts
const contentType = null;
const bodyDeviceCode: DeviceCode = {
productType: null,
productType: 'TERMINAL_API',
};
bodyDeviceCode.name = 'Counter 1';
bodyDeviceCode.locationId = 'B5E4484SHHNYH';
Expand Down
2 changes: 1 addition & 1 deletion doc/api/invoices.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ const bodyQueryFilter: InvoiceFilter = {
bodyQueryFilter.customerIds = bodyQueryFilterCustomerIds;

const bodyQuerySort: InvoiceSort = {
field: null,
field: 'INVOICE_SORT_DATE',
};
bodyQuerySort.order = 'DESC';

Expand Down
20 changes: 0 additions & 20 deletions doc/api/orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,10 @@ async createOrder(
const contentType = null;
const bodyOrderLineItems: OrderLineItem[] = [];

const bodyOrderlineItems0BasePriceMoney: Money = {};
bodyOrderlineItems0BasePriceMoney.amount = BigInt(1599);
bodyOrderlineItems0BasePriceMoney.currency = 'USD';

const bodyOrderlineItems0: OrderLineItem = {
quantity: '1',
};
bodyOrderlineItems0.name = 'New York Strip Steak';
bodyOrderlineItems0.basePriceMoney = bodyOrderlineItems0BasePriceMoney;

bodyOrderLineItems[0] = bodyOrderlineItems0;

Expand Down Expand Up @@ -117,14 +112,9 @@ bodyOrderdiscounts1.scope = 'ORDER';

bodyOrderDiscounts[1] = bodyOrderdiscounts1;

const bodyOrderdiscounts2AmountMoney: Money = {};
bodyOrderdiscounts2AmountMoney.amount = BigInt(100);
bodyOrderdiscounts2AmountMoney.currency = 'USD';

const bodyOrderdiscounts2: OrderLineItemDiscount = {};
bodyOrderdiscounts2.uid = 'one-dollar-off';
bodyOrderdiscounts2.name = 'Sale - $1.00 off';
bodyOrderdiscounts2.amountMoney = bodyOrderdiscounts2AmountMoney;
bodyOrderdiscounts2.scope = 'LINE_ITEM';

bodyOrderDiscounts[2] = bodyOrderdiscounts2;
Expand Down Expand Up @@ -229,27 +219,17 @@ async calculateOrder(
const contentType = null;
const bodyOrderLineItems: OrderLineItem[] = [];

const bodyOrderlineItems0BasePriceMoney: Money = {};
bodyOrderlineItems0BasePriceMoney.amount = BigInt(500);
bodyOrderlineItems0BasePriceMoney.currency = 'USD';

const bodyOrderlineItems0: OrderLineItem = {
quantity: '1',
};
bodyOrderlineItems0.name = 'Item 1';
bodyOrderlineItems0.basePriceMoney = bodyOrderlineItems0BasePriceMoney;

bodyOrderLineItems[0] = bodyOrderlineItems0;

const bodyOrderlineItems1BasePriceMoney: Money = {};
bodyOrderlineItems1BasePriceMoney.amount = BigInt(300);
bodyOrderlineItems1BasePriceMoney.currency = 'USD';

const bodyOrderlineItems1: OrderLineItem = {
quantity: '2',
};
bodyOrderlineItems1.name = 'Item 2';
bodyOrderlineItems1.basePriceMoney = bodyOrderlineItems1BasePriceMoney;

bodyOrderLineItems[1] = bodyOrderlineItems1;

Expand Down
3 changes: 0 additions & 3 deletions doc/api/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ const bodyPriceOverrideMoney: Money = {};
bodyPriceOverrideMoney.amount = BigInt(100);
bodyPriceOverrideMoney.currency = 'USD';

const bodySource: SubscriptionSource = {};

const body: CreateSubscriptionRequest = {
locationId: 'S8GWD5R9QB376',
planId: '6JHXF3B2CW3YKHDV4XEM674H',
Expand All @@ -70,7 +68,6 @@ body.taxPercentage = '5';
body.priceOverrideMoney = bodyPriceOverrideMoney;
body.cardId = 'ccof:qy5x8hHGYsgLrp4Q4GB';
body.timezone = 'America/Los_Angeles';
body.source = bodySource;

try {
const { result, ...httpResponse } = await subscriptionsApi.createSubscription(body);
Expand Down
6 changes: 3 additions & 3 deletions doc/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-01-19'` |
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2023-03-15'` |
| `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
| `environment` | `string` | The API environment. <br> **Default: `production`** |
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
Expand Down Expand Up @@ -40,7 +40,7 @@ The API client can be initialized as follows:

```ts
const client = new Client({
squareVersion: '2023-01-19',
squareVersion: '2023-03-15',
timeout: 60000,
additionalHeaders: {},
userAgentDetail: '',
Expand All @@ -55,7 +55,7 @@ const client = new Client({
import { ApiError, Client } from 'square';

const client = new Client({
squareVersion: '2023-01-19',
squareVersion: '2023-03-15',
timeout: 60000,
additionalHeaders: {},
userAgentDetail: '',
Expand Down
5 changes: 4 additions & 1 deletion doc/models/appointment-segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ Defines an appointment segment of a booking.
"duration_minutes": null,
"service_variation_id": null,
"team_member_id": "team_member_id0",
"service_variation_version": null
"service_variation_version": null,
"intermission_minutes": null,
"any_team_member": null,
"resource_ids": null
}
```

1 change: 1 addition & 0 deletions doc/models/availability.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Defines an appointment slot that encapsulates the appointment segments, location
```json
{
"start_at": null,
"location_id": null,
"appointment_segments": null
}
```
Expand Down
2 changes: 1 addition & 1 deletion doc/models/bank-account-payment-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Additional details about BANK_ACCOUNT type payments.
| --- | --- | --- | --- |
| `bankName` | `string \| undefined` | Optional | The name of the bank associated with the bank account.<br>**Constraints**: *Maximum Length*: `100` |
| `transferType` | `string \| undefined` | Optional | The type of the bank transfer. The type can be `ACH` or `UNKNOWN`.<br>**Constraints**: *Maximum Length*: `50` |
| `accountOwnershipType` | `string \| undefined` | Optional | The ownership type of the bank account performing the transfer.<br>The type can be `INDIVIDUAL`, `COMPANY`, or `UNKNOWN`.<br>**Constraints**: *Maximum Length*: `50` |
| `accountOwnershipType` | `string \| undefined` | Optional | The ownership type of the bank account performing the transfer.<br>The type can be `INDIVIDUAL`, `COMPANY`, or `ACCOUNT_TYPE_UNKNOWN`.<br>**Constraints**: *Maximum Length*: `50` |
| `fingerprint` | `string \| undefined` | Optional | Uniquely identifies the bank account for this seller and can be used<br>to determine if payments are from the same bank account.<br>**Constraints**: *Maximum Length*: `255` |
| `country` | `string \| undefined` | Optional | The two-letter ISO code representing the country the bank account is located in.<br>**Constraints**: *Minimum Length*: `2`, *Maximum Length*: `2` |
| `statementDescription` | `string \| undefined` | Optional | The statement description as sent to the bank.<br>**Constraints**: *Maximum Length*: `1000` |
Expand Down
4 changes: 3 additions & 1 deletion doc/models/booking-creator-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Information about a booking creator.

```json
{
"creator_type": null
"creator_type": null,
"team_member_id": null,
"customer_id": null
}
```

4 changes: 3 additions & 1 deletion doc/models/booking-custom-attribute-upsert-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ and an optional idempotency key.
"value": null,
"version": null,
"visibility": null,
"definition": null
"definition": null,
"updated_at": null,
"created_at": null
},
"idempotency_key": null
}
Expand Down
5 changes: 5 additions & 0 deletions doc/models/booking.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@ at a given location to a requesting customer in one or more appointment segments

```json
{
"id": null,
"version": null,
"status": null,
"created_at": null,
"updated_at": null,
"start_at": null,
"location_id": null,
"customer_id": null,
"customer_note": null,
"seller_note": null,
"appointment_segments": null,
"transition_time_minutes": null,
"all_day": null,
"location_type": null,
"creator_details": null,
"source": null
Expand Down
4 changes: 3 additions & 1 deletion doc/models/break-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ instances on a `Shift`.
"break_name": "break_name8",
"expected_duration": "expected_duration4",
"is_paid": false,
"version": null
"version": null,
"created_at": null,
"updated_at": null
}
```

6 changes: 6 additions & 0 deletions doc/models/bulk-create-vendors-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu
"vendors": {
"key0": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand All @@ -30,6 +32,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu
},
"key1": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand All @@ -40,6 +44,8 @@ Represents an input to a call to [BulkCreateVendors](../../doc/api/vendors.md#bu
},
"key2": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and optional key of the associated custom attribute definition.
## Example (as JSON)

```json
{}
{
"key": null
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Represents one delete within the bulk operation.

```json
{
"key": null,
"order_id": "order_id6"
}
```
Expand Down
6 changes: 6 additions & 0 deletions doc/models/bulk-update-vendors-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu
"idempotency_key": null,
"vendor": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand All @@ -35,6 +37,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu
"idempotency_key": null,
"vendor": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand All @@ -48,6 +52,8 @@ Represents an input to a call to [BulkUpdateVendors](../../doc/api/vendors.md#bu
"idempotency_key": null,
"vendor": {
"id": null,
"created_at": null,
"updated_at": null,
"name": null,
"address": null,
"contacts": null,
Expand Down
12 changes: 9 additions & 3 deletions doc/models/bulk-upsert-booking-custom-attributes-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at
"value": null,
"version": null,
"visibility": null,
"definition": null
"definition": null,
"updated_at": null,
"created_at": null
},
"idempotency_key": null
},
Expand All @@ -36,7 +38,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at
"value": null,
"version": null,
"visibility": null,
"definition": null
"definition": null,
"updated_at": null,
"created_at": null
},
"idempotency_key": null
},
Expand All @@ -47,7 +51,9 @@ Represents a [BulkUpsertBookingCustomAttributes](../../doc/api/booking-custom-at
"value": null,
"version": null,
"visibility": null,
"definition": null
"definition": null,
"updated_at": null,
"created_at": null
},
"idempotency_key": null
}
Expand Down
Loading

0 comments on commit 2ed6eb7

Please sign in to comment.