Skip to content

Commit

Permalink
Merge pull request #94 from square/release/19.1.0.20220616
Browse files Browse the repository at this point in the history
Generated PR for Release: 19.1.0.20220616
  • Loading branch information
Wolfgang Schuster authored Jun 16, 2022
2 parents 3fd3534 + 42ad42e commit 716a57a
Show file tree
Hide file tree
Showing 64 changed files with 254 additions and 162 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ nosetests tests
[Cards]: doc/api/cards.md
[Payouts]: doc/api/payouts.md
[Gift Cards]: doc/api/gift-cards.md
[Gift Card Activities]: doc/api/gift-card-activities.md
[Gift Card Activities]: doc/api/gift-card-activities.md
2 changes: 1 addition & 1 deletion doc/api/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def list_catalog(self,
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string` | 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` | 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, DINING_OPTION, TAX_EXEMPTION,<br>SERVICE_CHARGE, PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
| `types` | `string` | 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. |
| `catalog_version` | `long\|int` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>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<br>be from the current version of the catalog. |

## Response Type
Expand Down
2 changes: 1 addition & 1 deletion doc/api/gift-cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gift_cards_api = client.gift_cards
# List Gift Cards

Lists all gift cards. You can specify optional filters to retrieve
a subset of the gift cards.
a subset of the gift cards. Results are sorted by `created_at` in ascending order.

```python
def list_gift_cards(self,
Expand Down
6 changes: 4 additions & 2 deletions doc/api/loyalty.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ elif result.is_error():

# Accumulate Loyalty Points

Adds points to a loyalty account.
Adds points earned from the base loyalty program to a loyalty account.

- If you are using the Orders API to manage orders, you only provide the `order_id`.
The endpoint reads the order to compute points to add to the buyer's account.
Expand All @@ -153,6 +153,8 @@ Adds points to a loyalty account.
[CalculateLoyaltyPoints](../../doc/api/loyalty.md#calculate-loyalty-points) to compute the points
that you provide to this endpoint.

This endpoint excludes additional points earned from loyalty promotions.

```python
def accumulate_loyalty_points(self,
account_id,
Expand Down Expand Up @@ -344,7 +346,7 @@ elif result.is_error():

# Calculate Loyalty Points

Calculates the points a purchase earns.
Calculates the points a purchase earns from the base loyalty program.

- If you are using the Orders API to manage orders, you provide the `order_id` in the request. The
endpoint calculates the points by reading the order.
Expand Down
3 changes: 1 addition & 2 deletions doc/api/terminal.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ terminal_api = client.terminal

# Create Terminal Action

Creates a Terminal action request and sends it to the specified device to take a payment
for the requested amount.
Creates a Terminal action request and sends it to the specified device.

```python
def create_terminal_action(self,
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 |
| --- | --- | --- |
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2022-05-12'` |
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2022-06-16'` |
| `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-05-12',
square_version='2022-06-16',
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-05-12',
square_version='2022-06-16',
access_token='AccessToken',)

locations_api = client.locations
Expand Down
8 changes: 4 additions & 4 deletions doc/models/appointment-segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Defines an appointment segment of a booking.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `duration_minutes` | `int` | Optional | The time span in minutes of an appointment segment.<br>**Constraints**: `<= 1500` |
| `service_variation_id` | `string` | Required | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
| `service_variation_id` | `string` | Optional | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Maximum Length*: `36` |
| `team_member_id` | `string` | Required | The ID of the [TeamMember](../../doc/models/team-member.md) object representing the team member booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32` |
| `service_variation_version` | `long\|int` | Required | The current version of the item variation representing the service booked in this segment. |
| `service_variation_version` | `long\|int` | Optional | The current version of the item variation representing the service booked in this segment. |
| `intermission_minutes` | `int` | Optional | Time between the end of this segment and the beginning of the subsequent segment. |
| `any_team_member` | `bool` | Optional | Whether the customer accepts any team member, instead of a specific one, to serve this segment. |
| `resource_ids` | `List of string` | Optional | The IDs of the seller-accessible resources used for this appointment segment. |
Expand All @@ -24,9 +24,9 @@ Defines an appointment segment of a booking.
```json
{
"duration_minutes": null,
"service_variation_id": "service_variation_id6",
"service_variation_id": null,
"team_member_id": "team_member_id0",
"service_variation_version": 56,
"service_variation_version": null,
"intermission_minutes": null,
"any_team_member": null,
"resource_ids": null
Expand Down
5 changes: 3 additions & 2 deletions doc/models/batch-retrieve-inventory-changes-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
| `location_ids` | `List of string` | Optional | The filter to return results by `Location` ID.<br>The filter is only applicable when set. The default value is null. |
| `types` | [`List of str (Inventory Change Type)`](../../doc/models/inventory-change-type.md) | Optional | The filter to return results by `InventoryChangeType` values other than `TRANSFER`.<br>The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. |
| `states` | [`List of str (Inventory State)`](../../doc/models/inventory-state.md) | Optional | The filter to return `ADJUSTMENT` query results by<br>`InventoryState`. This filter is only applied when set.<br>The default value is null. |
| `updated_after` | `string` | Optional | The filter to return results with their `calculated_at` value <br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
| `updated_before` | `string` | Optional | The filter to return results with their `created_at` or `calculated_at` value <br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
| `updated_after` | `string` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
| `updated_before` | `string` | Optional | The filter to return results with their `created_at` or `calculated_at` value<br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
| `cursor` | `string` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
| `limit` | `int` | Optional | **Constraints**: `>= 1`, `<= 1000` |

## Example (as JSON)

Expand Down
1 change: 1 addition & 0 deletions doc/models/batch-retrieve-inventory-counts-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| `updated_after` | `string` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
| `cursor` | `string` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
| `states` | [`List of str (Inventory State)`](../../doc/models/inventory-state.md) | Optional | The filter to return results by `InventoryState`. The filter is only applicable when set.<br>Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.<br>The default is null. |
| `limit` | `int` | Optional | **Constraints**: `>= 1`, `<= 1000` |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/calculate-loyalty-points-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ a specified purchase.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |
| `points` | `int` | Optional | The points that the buyer can earn from a specified purchase. |
| `points` | `int` | Optional | The points that the buyer can earn from a specified purchase.<br>This value does not include additional points earned from a loyalty promotion. |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/cancel-terminal-action-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Information on errors encountered during the request. |
| `action` | [`Terminal Action`](../../doc/models/terminal-action.md) | Optional | - |
| `action` | [`Terminal Action`](../../doc/models/terminal-action.md) | Optional | Represents an action processed by the Square Terminal. |

## Example (as JSON)

Expand Down
17 changes: 17 additions & 0 deletions doc/models/card-co-brand.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# Card Co Brand

Indicates the brand for a co-branded card.

## Enumeration

`Card Co Brand`

## Fields

| Name |
| --- |
| `UNKNOWN` |
| `AFTERPAY` |
| `CLEARPAY` |

4 changes: 3 additions & 1 deletion doc/models/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ details are determined by the payment token generated by Web Payments SDK.
| `prepaid_type` | [`str (Card Prepaid Type)`](../../doc/models/card-prepaid-type.md) | Optional | Indicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`. |
| `bin` | `string` | Optional | The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API<br>returns this field.<br>**Constraints**: *Maximum Length*: `6` |
| `version` | `long\|int` | Optional | Current version number of the card. Increments with each card update. Requests to update an<br>existing Card object will be rejected unless the version in the request matches the current<br>version for the Card. |
| `card_co_brand` | [`str (Card Co Brand)`](../../doc/models/card-co-brand.md) | Optional | Indicates the brand for a co-branded card. |

## Example (as JSON)

Expand All @@ -48,7 +49,8 @@ details are determined by the payment token generated by Web Payments SDK.
"card_type": null,
"prepaid_type": null,
"bin": null,
"version": null
"version": null,
"card_co_brand": null
}
```

4 changes: 2 additions & 2 deletions doc/models/catalog-item-variation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ decreases by 2, and the stockable count automatically decreases by 0.4 bottle ac
| `available_for_booking` | `bool` | Optional | If the `CatalogItem` that owns this item variation is of type<br>`APPOINTMENTS_SERVICE`, a bool representing whether this service is available for booking. |
| `item_option_values` | [`List of Catalog Item Option Value for Item Variation`](../../doc/models/catalog-item-option-value-for-item-variation.md) | Optional | List of item option values associated with this item variation. Listed<br>in the same order as the item options of the parent item. |
| `measurement_unit_id` | `string` | Optional | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity<br>sold of this item variation. If left unset, the item will be sold in<br>whole quantities. |
| `sellable` | `bool` | Optional | Whether this variation can be sold. The inventory count of a sellable variation indicates<br>the number of units available for sale. When a variation is both stockable and sellable,<br>its sellable inventory count can be smaller than or equal to its stocable count. |
| `stockable` | `bool` | Optional | Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).<br>The inventory count of a stockable variation keeps track of the number of units of this variation in stock<br>and is not an indicator of the number of units of the variation that can be sold. |
| `sellable` | `bool` | Optional | Whether this variation can be sold. The inventory count of a sellable variation indicates<br>the number of units available for sale. When a variation is both stockable and sellable,<br>its sellable inventory count can be smaller than or equal to its stockable count. |
| `stockable` | `bool` | Optional | Whether stock is counted directly on this variation (TRUE) or only on its components (FALSE).<br>When a variation is both stockable and sellable, the inventory count of a stockable variation keeps track of the number of units of this variation in stock<br>and is not an indicator of the number of units of the variation that can be sold. |
| `image_ids` | `List of string` | Optional | The IDs of images associated with this `CatalogItemVariation` instance.<br>These images will be shown to customers in Square Online Store. |
| `team_member_ids` | `List of string` | Optional | Tokens of employees that can perform the service represented by this variation. Only valid for<br>variations of type `APPOINTMENTS_SERVICE`. |
| `stockable_conversion` | [`Catalog Stock Conversion`](../../doc/models/catalog-stock-conversion.md) | Optional | Represents the rule of conversion between a stockable [CatalogItemVariation](../../doc/models/catalog-item-variation.md)<br>and a non-stockable sell-by or receive-by `CatalogItemVariation` that<br>share the same underlying stock. |
Expand Down
10 changes: 2 additions & 8 deletions doc/models/catalog-subscription-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@ Describes a subscription plan. For more information, see
"uid": null,
"cadence": "EVERY_FOUR_MONTHS",
"periods": null,
"recurring_price_money": {
"amount": null,
"currency": null
},
"recurring_price_money": null,
"ordinal": null
},
{
"uid": null,
"cadence": "QUARTERLY",
"periods": null,
"recurring_price_money": {
"amount": null,
"currency": null
},
"recurring_price_money": null,
"ordinal": null
}
]
Expand Down
2 changes: 1 addition & 1 deletion doc/models/create-gift-card-activity-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A request to create a gift card activity.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `idempotency_key` | `string` | Required | A unique string that identifies the `CreateGiftCardActivity` request.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` |
| `gift_card_activity` | [`Gift Card Activity`](../../doc/models/gift-card-activity.md) | Required | Represents an action performed on a gift card that affects its state or balance. |
| `gift_card_activity` | [`Gift Card Activity`](../../doc/models/gift-card-activity.md) | Required | Represents an action performed on a [gift card](../../doc/models/gift-card.md) that affects its state or balance.<br>A gift card activity contains information about a specific activity type. For example, a `REDEEM` activity<br>includes a `redeem_activity_details` field that contains information about the redemption. |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/create-gift-card-activity-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The response might contain a set of `Error` objects if the request resulted in e
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `errors` | [`List of Error`](../../doc/models/error.md) | Optional | Any errors that occurred during the request. |
| `gift_card_activity` | [`Gift Card Activity`](../../doc/models/gift-card-activity.md) | Optional | Represents an action performed on a gift card that affects its state or balance. |
| `gift_card_activity` | [`Gift Card Activity`](../../doc/models/gift-card-activity.md) | Optional | Represents an action performed on a [gift card](../../doc/models/gift-card.md) that affects its state or balance.<br>A gift card activity contains information about a specific activity type. For example, a `REDEEM` activity<br>includes a `redeem_activity_details` field that contains information about the redemption. |

## Example (as JSON)

Expand Down
Loading

0 comments on commit 716a57a

Please sign in to comment.