Skip to content

Commit

Permalink
Merge pull request #104 from square/release/25.1.0.20230119
Browse files Browse the repository at this point in the history
Generated PR for Release: 25.1.0.20230119
  • Loading branch information
jessdelacruzsantos authored Jan 19, 2023
2 parents 01844ed + f8bb544 commit 6723288
Show file tree
Hide file tree
Showing 38 changed files with 2,003 additions and 12 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 Square, Inc.
Copyright 2023 Square, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
477 changes: 477 additions & 0 deletions doc/api/location-custom-attributes.md

Large diffs are not rendered by default.

7 changes: 4 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 |
| --- | --- | --- |
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2022-12-14'` |
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2023-01-19'` |
| `custom_url` | `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`** |
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
Expand All @@ -26,7 +26,7 @@ The API client can be initialized as follows:
from square.client import Client

client = Client(
square_version='2022-12-14',
square_version='2023-01-19',
access_token='AccessToken',
environment='production',
custom_url = 'https://connect.squareup.com',)
Expand All @@ -52,7 +52,7 @@ import jsonpickle
from square.client import Client

client = Client(
square_version='2022-12-14',
square_version='2023-01-19',
access_token='AccessToken',)

locations_api = client.locations
Expand Down Expand Up @@ -95,6 +95,7 @@ The gateway for the SDK. This class acts as a factory for the Apis and also hold
| invoices | Gets InvoicesApi |
| labor | Gets LaborApi |
| locations | Gets LocationsApi |
| location_custom_attributes | Gets LocationCustomAttributesApi |
| checkout | Gets CheckoutApi |
| transactions | Gets TransactionsApi |
| loyalty | Gets LoyaltyApi |
Expand Down
2 changes: 1 addition & 1 deletion doc/models/break-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ instances on a `Shift`.
| `id` | `string` | Optional | The UUID for this object.<br>**Constraints**: *Maximum Length*: `255` |
| `location_id` | `string` | Required | The ID of the business location this type of break applies to.<br>**Constraints**: *Minimum Length*: `1` |
| `break_name` | `string` | Required | A human-readable name for this type of break. The name is displayed to<br>employees in Square products.<br>**Constraints**: *Minimum Length*: `1` |
| `expected_duration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br>**Constraints**: *Minimum Length*: `1` |
| `expected_duration` | `string` | Required | Format: RFC-3339 P[n]Y[n]M[n]DT[n]H[n]M[n]S. The expected length of<br>this break. Precision less than minutes is truncated.<br><br>Example for break expected duration of 15 minutes: T15M<br>**Constraints**: *Minimum Length*: `1` |
| `is_paid` | `bool` | Required | Whether this break counts towards time worked for compensation<br>purposes. |
| `version` | `int` | Optional | Used for resolving concurrency issues. The request fails if the version<br>provided does not match the server version at the time of the request. If a value is not<br>provided, Square's servers execute a "blind" write; potentially<br>overwriting another writer's data. |
| `created_at` | `string` | Optional | A read-only timestamp in RFC 3339 format. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request

Represents an individual delete request in a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes)
request. An individual request contains an optional ID of the associated custom attribute definition
and optional key of the associated custom attribute definition.

## Structure

`Bulk Delete Location Custom Attributes Request Location Custom Attribute Delete Request`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `key` | `string` | Optional | The key of the associated custom attribute definition.<br>Represented as a qualified key if the requesting app is not the definition owner.<br>**Constraints**: *Pattern*: `^([a-zA-Z0-9_-]+:)?[a-zA-Z0-9_-]{1,60}$` |

## Example (as JSON)

```json
{}
```

36 changes: 36 additions & 0 deletions doc/models/bulk-delete-location-custom-attributes-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# Bulk Delete Location Custom Attributes Request

Represents a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes) request.

## Structure

`Bulk Delete Location Custom Attributes Request`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `values` | [`Dict`](../../doc/models/bulk-delete-location-custom-attributes-request-location-custom-attribute-delete-request.md) | Required | The data used to update the `CustomAttribute` objects.<br>The keys must be unique and are used to map to the corresponding response. |

## Example (as JSON)

```json
{
"values": {
"id1": {
"key": "bestseller",
"location_id": "L0TBCBTB7P8RQ"
},
"id2": {
"key": "bestseller",
"location_id": "L9XMD04V3STJX"
},
"id3": {
"key": "phone-number",
"location_id": "L0TBCBTB7P8RQ"
}
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response

Represents an individual delete response in a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes)
request.

## Structure

`Bulk Delete Location Custom Attributes Response Location Custom Attribute Delete Response`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | Optional | The ID of the location associated with the custom attribute. |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Errors that occurred while processing the individual LocationCustomAttributeDeleteRequest request |

## Example (as JSON)

```json
{
"errors": [],
"location_id": "L0TBCBTB7P8RQ"
}
```

38 changes: 38 additions & 0 deletions doc/models/bulk-delete-location-custom-attributes-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# Bulk Delete Location Custom Attributes Response

Represents a [BulkDeleteLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-delete-location-custom-attributes) response,
which contains a map of responses that each corresponds to an individual delete request.

## Structure

`Bulk Delete Location Custom Attributes Response`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `values` | [`Dict`](../../doc/models/bulk-delete-location-custom-attributes-response-location-custom-attribute-delete-response.md) | Required | A map of responses that correspond to individual delete requests. Each response has the<br>same key as the corresponding request. |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |

## Example (as JSON)

```json
{
"values": {
"id1": {
"errors": [],
"location_id": "L0TBCBTB7P8RQ"
},
"id2": {
"errors": [],
"location_id": "L9XMD04V3STJX"
},
"id3": {
"errors": [],
"location_id": "L0TBCBTB7P8RQ"
}
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request

Represents an individual upsert request in a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes)
request. An individual request contains a location ID, the custom attribute to create or update,
and an optional idempotency key.

## Structure

`Bulk Upsert Location Custom Attributes Request Location Custom Attribute Upsert Request`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | Required | The ID of the target [location](../../doc/models/location.md).<br>**Constraints**: *Minimum Length*: `1` |
| `custom_attribute` | [`Custom Attribute`](../../doc/models/custom-attribute.md) | Required | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. |
| `idempotency_key` | `string` | Optional | A unique identifier for this individual upsert request, used to ensure idempotency.<br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `45` |

## Example (as JSON)

```json
{
"location_id": "location_id4",
"custom_attribute": {
"key": null,
"value": null,
"version": null,
"visibility": null,
"definition": null
},
"idempotency_key": null
}
```

57 changes: 57 additions & 0 deletions doc/models/bulk-upsert-location-custom-attributes-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

# Bulk Upsert Location Custom Attributes Request

Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes) request.

## Structure

`Bulk Upsert Location Custom Attributes Request`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `values` | [`Dict`](../../doc/models/bulk-upsert-location-custom-attributes-request-location-custom-attribute-upsert-request.md) | Required | A map containing 1 to 25 individual upsert requests. For each request, provide an<br>arbitrary ID that is unique for this `BulkUpsertLocationCustomAttributes` request and the<br>information needed to create or update a custom attribute. |

## Example (as JSON)

```json
{
"values": {
"key0": {
"location_id": "location_id4",
"custom_attribute": {
"key": null,
"value": null,
"version": null,
"visibility": null,
"definition": null
},
"idempotency_key": null
},
"key1": {
"location_id": "location_id5",
"custom_attribute": {
"key": null,
"value": null,
"version": null,
"visibility": null,
"definition": null
},
"idempotency_key": null
},
"key2": {
"location_id": "location_id6",
"custom_attribute": {
"key": null,
"value": null,
"version": null,
"visibility": null,
"definition": null
},
"idempotency_key": null
}
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# Bulk Upsert Location Custom Attributes Response Location Custom Attribute Upsert Response

Represents a response for an individual upsert request in a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes) operation.

## Structure

`Bulk Upsert Location Custom Attributes Response Location Custom Attribute Upsert Response`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `location_id` | `string` | Optional | The ID of the location associated with the custom attribute. |
| `custom_attribute` | [`Custom Attribute`](../../doc/models/custom-attribute.md) | Optional | A custom attribute value. Each custom attribute value has a corresponding<br>`CustomAttributeDefinition` object. |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred while processing the individual request. |

## Example (as JSON)

```json
{
"location_id": null,
"custom_attribute": null,
"errors": null
}
```

26 changes: 26 additions & 0 deletions doc/models/bulk-upsert-location-custom-attributes-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Bulk Upsert Location Custom Attributes Response

Represents a [BulkUpsertLocationCustomAttributes](../../doc/api/location-custom-attributes.md#bulk-upsert-location-custom-attributes) response,
which contains a map of responses that each corresponds to an individual upsert request.

## Structure

`Bulk Upsert Location Custom Attributes Response`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `values` | [`Dict`](../../doc/models/bulk-upsert-location-custom-attributes-response-location-custom-attribute-upsert-response.md) | Optional | A map of responses that correspond to individual upsert requests. Each response has the<br>same ID as the corresponding request and contains either a `location_id` and `custom_attribute` or an `errors` field. |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |

## Example (as JSON)

```json
{
"values": null,
"errors": null
}
```

30 changes: 30 additions & 0 deletions doc/models/create-location-custom-attribute-definition-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# Create Location Custom Attribute Definition Request

Represents a [CreateLocationCustomAttributeDefinition](../../doc/api/location-custom-attributes.md#create-location-custom-attribute-definition) request.

## Structure

`Create Location Custom Attribute Definition Request`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `custom_attribute_definition` | [`Custom Attribute Definition`](../../doc/models/custom-attribute-definition.md) | Required | Represents a definition for custom attribute values. A custom attribute definition<br>specifies the key, visibility, schema, and other properties for a custom attribute. |
| `idempotency_key` | `string` | Optional | A unique identifier for this request, used to ensure idempotency. For more information,<br>see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `45` |

## Example (as JSON)

```json
{
"custom_attribute_definition": {
"description": "Bestselling item at location",
"key": "bestseller",
"name": "Bestseller",
"schema": null,
"visibility": "VISIBILITY_READ_WRITE_VALUES"
}
}
```

34 changes: 34 additions & 0 deletions doc/models/create-location-custom-attribute-definition-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# Create Location Custom Attribute Definition Response

Represents a [CreateLocationCustomAttributeDefinition](../../doc/api/location-custom-attributes.md#create-location-custom-attribute-definition) response.
Either `custom_attribute_definition` or `errors` is present in the response.

## Structure

`Create Location Custom Attribute Definition Response`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `custom_attribute_definition` | [`Custom Attribute Definition`](../../doc/models/custom-attribute-definition.md) | Optional | Represents a definition for custom attribute values. A custom attribute definition<br>specifies the key, visibility, schema, and other properties for a custom attribute. |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |

## Example (as JSON)

```json
{
"custom_attribute_definition": {
"created_at": "2022-12-02T19:06:36.559Z",
"description": "Bestselling item at location",
"key": "bestseller",
"name": "Bestseller",
"schema": null,
"updated_at": "2022-12-02T19:06:36.559Z",
"version": 1,
"visibility": "VISIBILITY_READ_WRITE_VALUES"
}
}
```

Loading

0 comments on commit 6723288

Please sign in to comment.