Skip to content

Commit d6f56ec

Browse files
authored
Merge pull request #100 from square/release/21.0.0
Generated PR for Release: 21.0.0
2 parents 6062d3a + 7f3a9df commit d6f56ec

File tree

287 files changed

+4022
-859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+4022
-859
lines changed

doc/api/checkout.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const checkoutApi = client.checkoutApi;
2020

2121
# Create Checkout
2222

23+
**This endpoint is deprecated.**
24+
2325
Links a `checkoutId` to a `checkout_page_url` that customers are
2426
directed to in order to provide their payment information using a
2527
payment processing workflow hosted on connect.squareup.com.
@@ -154,6 +156,8 @@ bodyPrePopulateShippingAddress.locality = 'San Francisco';
154156
bodyPrePopulateShippingAddress.administrativeDistrictLevel1 = 'CA';
155157
bodyPrePopulateShippingAddress.postalCode = '94103';
156158
bodyPrePopulateShippingAddress.country = 'US';
159+
bodyPrePopulateShippingAddress.firstName = 'Jane';
160+
bodyPrePopulateShippingAddress.lastName = 'Doe';
157161

158162
const bodyAdditionalRecipients: ChargeRequestAdditionalRecipient[] = [];
159163

doc/api/customer-custom-attributes.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ const customerCustomAttributesApi = client.customerCustomAttributesApi;
2424

2525
# List Customer Custom Attribute Definitions
2626

27-
Lists the customer-related custom attribute definitions that belong to a Square seller account.
27+
Lists the customer-related [custom attribute definitions](../../doc/models/custom-attribute-definition.md) that belong to a Square seller account.
2828

2929
When all response pages are retrieved, the results include all custom attribute definitions
3030
that are visible to the requesting application, including those that are created by other
31-
applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
31+
applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that
32+
seller-defined custom attributes (also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
3233

3334
```ts
3435
async listCustomerCustomAttributeDefinitions(
@@ -68,8 +69,8 @@ try {
6869

6970
# Create Customer Custom Attribute Definition
7071

71-
Creates a customer-related custom attribute definition for a Square seller account. Use this
72-
endpoint to define a custom attribute that can be associated with customer profiles.
72+
Creates a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) for a Square seller account.
73+
Use this endpoint to define a custom attribute that can be associated with customer profiles.
7374

7475
A custom attribute definition specifies the `key`, `visibility`, `schema`, and other properties
7576
for a custom attribute. After the definition is created, you can call
@@ -127,7 +128,7 @@ try {
127128

128129
# Delete Customer Custom Attribute Definition
129130

130-
Deletes a customer-related custom attribute definition from a Square seller account.
131+
Deletes a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) from a Square seller account.
131132

132133
Deleting a custom attribute definition also deletes the corresponding custom attribute from
133134
all customer profiles in the seller's Customer Directory.
@@ -171,10 +172,11 @@ try {
171172

172173
# Retrieve Customer Custom Attribute Definition
173174

174-
Retrieves a customer-related custom attribute definition from a Square seller account.
175+
Retrieves a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) from a Square seller account.
175176

176177
To retrieve a custom attribute definition created by another application, the `visibility`
177-
setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
178+
setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes
179+
(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
178180

179181
```ts
180182
async retrieveCustomerCustomAttributeDefinition(
@@ -215,7 +217,7 @@ try {
215217

216218
# Update Customer Custom Attribute Definition
217219

218-
Updates a customer-related custom attribute definition for a Square seller account.
220+
Updates a customer-related [custom attribute definition](../../doc/models/custom-attribute-definition.md) for a Square seller account.
219221

220222
Use this endpoint to update the following fields: `name`, `description`, `visibility`, or the
221223
`schema` for a `Selection` data type.
@@ -271,7 +273,7 @@ try {
271273

272274
# Bulk Upsert Customer Custom Attributes
273275

274-
Creates or updates custom attributes for customer profiles as a bulk operation.
276+
Creates or updates [custom attributes](../../doc/models/custom-attribute.md) for customer profiles as a bulk operation.
275277

276278
Use this endpoint to set the value of one or more custom attributes for one or more customer profiles.
277279
A custom attribute is based on a custom attribute definition in a Square seller account, which is
@@ -283,7 +285,8 @@ and provides a customer ID and custom attribute. Each upsert response is returne
283285
of the corresponding request.
284286

285287
To create or update a custom attribute owned by another application, the `visibility` setting
286-
must be `VISIBILITY_READ_WRITE_VALUES`.
288+
must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes
289+
(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
287290

288291
```ts
289292
async bulkUpsertCustomerCustomAttributes(
@@ -327,7 +330,7 @@ try {
327330

328331
# List Customer Custom Attributes
329332

330-
Lists the custom attributes associated with a customer profile.
333+
Lists the [custom attributes](../../doc/models/custom-attribute.md) associated with a customer profile.
331334

332335
You can use the `with_definitions` query parameter to also retrieve custom attribute definitions
333336
in the same call.
@@ -380,10 +383,11 @@ try {
380383

381384
# Delete Customer Custom Attribute
382385

383-
Deletes a custom attribute associated with a customer profile.
386+
Deletes a [custom attribute](../../doc/models/custom-attribute.md) associated with a customer profile.
384387

385388
To delete a custom attribute owned by another application, the `visibility` setting must be
386-
`VISIBILITY_READ_WRITE_VALUES`.
389+
`VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes
390+
(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
387391

388392
```ts
389393
async deleteCustomerCustomAttribute(
@@ -425,13 +429,14 @@ try {
425429

426430
# Retrieve Customer Custom Attribute
427431

428-
Retrieves a custom attribute associated with a customer profile.
432+
Retrieves a [custom attribute](../../doc/models/custom-attribute.md) associated with a customer profile.
429433

430434
You can use the `with_definition` query parameter to also retrieve the custom attribute definition
431435
in the same call.
432436

433437
To retrieve a custom attribute owned by another application, the `visibility` setting must be
434-
`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
438+
`VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes
439+
(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
435440

436441
```ts
437442
async retrieveCustomerCustomAttribute(
@@ -478,14 +483,15 @@ try {
478483

479484
# Upsert Customer Custom Attribute
480485

481-
Creates or updates a custom attribute for a customer profile.
486+
Creates or updates a [custom attribute](../../doc/models/custom-attribute.md) for a customer profile.
482487

483488
Use this endpoint to set the value of a custom attribute for a specified customer profile.
484489
A custom attribute is based on a custom attribute definition in a Square seller account, which
485490
is created using the [CreateCustomerCustomAttributeDefinition](../../doc/api/customer-custom-attributes.md#create-customer-custom-attribute-definition) endpoint.
486491

487492
To create or update a custom attribute owned by another application, the `visibility` setting
488-
must be `VISIBILITY_READ_WRITE_VALUES`.
493+
must be `VISIBILITY_READ_WRITE_VALUES`. Note that seller-defined custom attributes
494+
(also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
489495

490496
```ts
491497
async upsertCustomerCustomAttribute(

doc/api/customers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ try {
137137

138138
# Search Customers
139139

140-
Searches the customer profiles associated with a Square account using a supported query filter.
140+
Searches the customer profiles associated with a Square account using one or more supported query filters.
141141

142142
Calling `SearchCustomers` without any explicit query filter returns all
143143
customer profiles ordered alphabetically based on `given_name` and

doc/api/disputes.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ async listDisputes(
3939
| Parameter | Type | Tags | Description |
4040
| --- | --- | --- | --- |
4141
| `cursor` | `string \| undefined` | 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>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). |
42-
| `states` | [`string \| undefined`](../../doc/models/dispute-state.md) | Query, Optional | The dispute states to filter the result.<br>If not specified, the endpoint returns all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`,<br>or `LOST`). |
43-
| `locationId` | `string \| undefined` | Query, Optional | The ID of the location for which to return a list of disputes. If not specified, the endpoint returns<br>all open disputes (the dispute status is not `INQUIRY_CLOSED`, `WON`, or `LOST`) associated with all locations. |
42+
| `states` | [`string \| undefined`](../../doc/models/dispute-state.md) | Query, Optional | The dispute states used to filter the result. If not specified, the endpoint returns all disputes. |
43+
| `locationId` | `string \| undefined` | Query, Optional | The ID of the location for which to return a list of disputes.<br>If not specified, the endpoint returns disputes associated with all locations. |
4444
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
4545

4646
## Response Type
@@ -162,7 +162,7 @@ async listDisputeEvidence(
162162
| Parameter | Type | Tags | Description |
163163
| --- | --- | --- | --- |
164164
| `disputeId` | `string` | Template, Required | The ID of the dispute. |
165-
| `cursor` | `string \| undefined` | 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>For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination). |
165+
| `cursor` | `string \| undefined` | 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>For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
166166
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
167167

168168
## Response Type
@@ -204,7 +204,7 @@ async createDisputeEvidenceFile(
204204

205205
| Parameter | Type | Tags | Description |
206206
| --- | --- | --- | --- |
207-
| `disputeId` | `string` | Template, Required | The ID of the dispute you want to upload evidence for. |
207+
| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to upload evidence. |
208208
| `request` | [`CreateDisputeEvidenceFileRequest \| undefined`](../../doc/models/create-dispute-evidence-file-request.md) | Form (JSON-Encoded), Optional | Defines the parameters for a `CreateDisputeEvidenceFile` request. |
209209
| `imageFile` | `FileWrapper \| undefined` | Form, Optional | - |
210210
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
@@ -246,7 +246,7 @@ async createDisputeEvidenceText(
246246

247247
| Parameter | Type | Tags | Description |
248248
| --- | --- | --- | --- |
249-
| `disputeId` | `string` | Template, Required | The ID of the dispute you want to upload evidence for. |
249+
| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to upload evidence. |
250250
| `body` | [`CreateDisputeEvidenceTextRequest`](../../doc/models/create-dispute-evidence-text-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
251251
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
252252

@@ -281,9 +281,7 @@ try {
281281
# Delete Dispute Evidence
282282

283283
Removes specified evidence from a dispute.
284-
285-
Square does not send the bank any evidence that is removed. Also, you cannot remove evidence after
286-
submitting it to the bank using [SubmitEvidence](../../doc/api/disputes.md#submit-evidence).
284+
Square does not send the bank any evidence that is removed.
287285

288286
```ts
289287
async deleteDisputeEvidence(
@@ -297,7 +295,7 @@ async deleteDisputeEvidence(
297295

298296
| Parameter | Type | Tags | Description |
299297
| --- | --- | --- | --- |
300-
| `disputeId` | `string` | Template, Required | The ID of the dispute you want to remove evidence from. |
298+
| `disputeId` | `string` | Template, Required | The ID of the dispute from which you want to remove evidence. |
301299
| `evidenceId` | `string` | Template, Required | The ID of the evidence you want to remove. |
302300
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
303301

@@ -325,10 +323,9 @@ try {
325323

326324
# Retrieve Dispute Evidence
327325

328-
Returns the evidence metadata specified by the evidence ID in the request URL path
326+
Returns the metadata for the evidence specified in the request URL path.
329327

330-
You must maintain a copy of the evidence you upload if you want to reference it later. You cannot
331-
download the evidence after you upload it.
328+
You must maintain a copy of any evidence uploaded if you want to reference it later. Evidence cannot be downloaded after you upload it.
332329

333330
```ts
334331
async retrieveDisputeEvidence(
@@ -342,7 +339,7 @@ async retrieveDisputeEvidence(
342339

343340
| Parameter | Type | Tags | Description |
344341
| --- | --- | --- | --- |
345-
| `disputeId` | `string` | Template, Required | The ID of the dispute that you want to retrieve evidence from. |
342+
| `disputeId` | `string` | Template, Required | The ID of the dispute from which you want to retrieve evidence metadata. |
346343
| `evidenceId` | `string` | Template, Required | The ID of the evidence to retrieve. |
347344
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
348345

@@ -372,10 +369,11 @@ try {
372369

373370
Submits evidence to the cardholder's bank.
374371

375-
Before submitting evidence, Square compiles all available evidence. This includes evidence uploaded
372+
The evidence submitted by this endpoint includes evidence uploaded
376373
using the [CreateDisputeEvidenceFile](../../doc/api/disputes.md#create-dispute-evidence-file) and
377374
[CreateDisputeEvidenceText](../../doc/api/disputes.md#create-dispute-evidence-text) endpoints and
378-
evidence automatically provided by Square, when available.
375+
evidence automatically provided by Square, when available. Evidence cannot be removed from
376+
a dispute after submission.
379377

380378
```ts
381379
async submitEvidence(
@@ -388,7 +386,7 @@ async submitEvidence(
388386

389387
| Parameter | Type | Tags | Description |
390388
| --- | --- | --- | --- |
391-
| `disputeId` | `string` | Template, Required | The ID of the dispute that you want to submit evidence for. |
389+
| `disputeId` | `string` | Template, Required | The ID of the dispute for which you want to submit evidence. |
392390
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
393391

394392
## Response Type

doc/api/invoices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ bodyInvoicepaymentRequests0.tippingEnabled = false;
359359
bodyInvoicePaymentRequests[0] = bodyInvoicepaymentRequests0;
360360

361361
const bodyInvoice: Invoice = {};
362+
bodyInvoice.version = 1;
362363
bodyInvoice.paymentRequests = bodyInvoicePaymentRequests;
363364

364365
const bodyFieldsToClear: string[] = ['payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders'];

0 commit comments

Comments
 (0)