Skip to content

Commit

Permalink
Merge pull request #84 from square/release/17.2.0.20220216
Browse files Browse the repository at this point in the history
Generated PR for Release: 17.2.0.20220216
  • Loading branch information
Wolfgang Schuster authored Feb 15, 2022
2 parents 1f5f34b + 915db3a commit a04a48e
Show file tree
Hide file tree
Showing 43 changed files with 224 additions and 120 deletions.
4 changes: 2 additions & 2 deletions doc/api/inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ body['changes'][0]['physical_count']['catalog_object_type'] = 'catalog_object_ty
body['changes'][0]['physical_count']['state'] = 'IN_STOCK'
body['changes'][0]['physical_count']['location_id'] = 'C6W5YS5QM06F5'
body['changes'][0]['physical_count']['quantity'] = '53'
body['changes'][0]['physical_count']['employee_id'] = 'LRK57NSQ5X7PUD05'
body['changes'][0]['physical_count']['team_member_id'] = 'LRK57NSQ5X7PUD05'
body['changes'][0]['physical_count']['occurred_at'] = '2016-11-16T22:25:24.878Z'
body['changes'][0]['adjustment'] = {}
body['changes'][0]['adjustment']['id'] = 'id6'
Expand Down Expand Up @@ -293,7 +293,7 @@ body['changes'][0]['physical_count']['catalog_object_type'] = 'catalog_object_ty
body['changes'][0]['physical_count']['state'] = 'IN_STOCK'
body['changes'][0]['physical_count']['location_id'] = 'C6W5YS5QM06F5'
body['changes'][0]['physical_count']['quantity'] = '53'
body['changes'][0]['physical_count']['employee_id'] = 'LRK57NSQ5X7PUD05'
body['changes'][0]['physical_count']['team_member_id'] = 'LRK57NSQ5X7PUD05'
body['changes'][0]['physical_count']['occurred_at'] = '2016-11-16T22:25:24.878Z'
body['changes'][0]['adjustment'] = {}
body['changes'][0]['adjustment']['id'] = 'id6'
Expand Down
14 changes: 8 additions & 6 deletions doc/api/merchants.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ merchants_api = client.merchants

# List Merchants

Returns `Merchant` information for a given access token.
Provides details about the merchant associated with a given access token.

If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token.
You can specify your personal access token to get your own merchant information or specify an OAuth token
to get the information for the merchant that granted you access.
The access token used to connect your application to a Square seller is associated
with a single merchant. That means that `ListMerchants` returns a list
with a single `Merchant` object. You can specify your personal access token
to get your own merchant information or specify an OAuth token to get the
information for the merchant that granted your application access.

If you know the merchant ID, you can also use the [RetrieveMerchant](/doc/api/merchants.md#retrieve-merchant)
endpoint to get the merchant information.
endpoint to retrieve the merchant information.

```python
def list_merchants(self,
Expand Down Expand Up @@ -56,7 +58,7 @@ elif result.is_error():

# Retrieve Merchant

Retrieve a `Merchant` object for the given `merchant_id`.
Retrieves the `Merchant` object for the given `merchant_id`.

```python
def retrieve_merchant(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-01-20'` |
| `square_version` | `string` | Square Connect API versions<br>*Default*: `'2022-02-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 @@ -24,7 +24,7 @@ The API client can be initialized as follows:
from square.client import Client

client = Client(
square_version='2022-01-20',
square_version='2022-02-16',
environment='production',
custom_url = 'https://connect.squareup.com',)
```
Expand All @@ -48,7 +48,7 @@ API calls return an `ApiResponse` object that includes the following fields:
from square.client import Client

client = Client(
square_version='2022-01-20',)
square_version='2022-02-16',)

locations_api = client.locations
result = locations_api.list_locations()
Expand Down
23 changes: 23 additions & 0 deletions doc/models/afterpay-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# Afterpay Details

Additional details about Afterpay payments.

## Structure

`Afterpay Details`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `email_address` | `string` | Optional | Email address on the buyer's Afterpay account.<br>**Constraints**: *Maximum Length*: `255` |

## Example (as JSON)

```json
{
"email_address": "email_address2"
}
```

4 changes: 2 additions & 2 deletions doc/models/batch-change-inventory-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
{
"physical_count": {
"catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI",
"employee_id": "LRK57NSQ5X7PUD05",
"location_id": "C6W5YS5QM06F5",
"occurred_at": "2016-11-16T22:25:24.878Z",
"quantity": "53",
"reference_id": "1536bfbf-efed-48bf-b17d-a197141b2a92",
"state": "IN_STOCK"
"state": "IN_STOCK",
"team_member_id": "LRK57NSQ5X7PUD05"
},
"type": "PHYSICAL_COUNT"
}
Expand Down
4 changes: 2 additions & 2 deletions doc/models/batch-retrieve-inventory-changes-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI",
"catalog_object_type": "ITEM_VARIATION",
"created_at": "2016-11-16T22:25:24.878Z",
"employee_id": "LRK57NSQ5X7PUD05",
"id": "46YDTW253DWGGK9HMAE6XCAO",
"location_id": "C6W5YS5QM06F5",
"occurred_at": "2016-11-16T22:24:49.028Z",
Expand All @@ -34,7 +33,8 @@
"name": "Square Point of Sale 4.37",
"product": "SQUARE_POS"
},
"state": "IN_STOCK"
"state": "IN_STOCK",
"team_member_id": "LRK57NSQ5X7PUD05"
},
"type": "PHYSICAL_COUNT"
}
Expand Down
27 changes: 27 additions & 0 deletions doc/models/buy-now-pay-later-details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# Buy Now Pay Later Details

Additional details about a Buy Now Pay Later payment type.

## Structure

`Buy Now Pay Later Details`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `brand` | `string` | Optional | The brand used for the Buy Now Pay Later payment.<br>The brand can be `AFTERPAY` or `UNKNOWN`.<br>**Constraints**: *Maximum Length*: `50` |
| `afterpay_details` | [`Afterpay Details`](/doc/models/afterpay-details.md) | Optional | Additional details about Afterpay payments. |

## Example (as JSON)

```json
{
"brand": "brand4",
"afterpay_details": {
"email_address": "email_address4"
}
}
```

2 changes: 1 addition & 1 deletion doc/models/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ details are determined by the payment token generated by Web Payments SDK.
| `cardholder_name` | `string` | Optional | The name of the cardholder.<br>**Constraints**: *Maximum Length*: `96` |
| `billing_address` | [`Address`](/doc/models/address.md) | Optional | Represents a postal address in a country.<br>For more information, see [Working with Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses). |
| `fingerprint` | `string` | Optional | Intended as a Square-assigned identifier, based<br>on the card number, to identify the card across multiple locations within a<br>single application.<br>**Constraints**: *Maximum Length*: `255` |
| `customer_id` | `string` | Optional | The ID of a customer created using the Customers API to be associated with the card. |
| `customer_id` | `string` | Optional | **Required** The ID of a customer created using the Customers API to be associated with the card. |
| `merchant_id` | `string` | Optional | The ID of the merchant associated with the card. |
| `reference_id` | `string` | Optional | An optional user-defined reference ID that associates this card with<br>another entity in an external system. For example, a customer ID from an<br>external customer management system.<br>**Constraints**: *Maximum Length*: `128` |
| `enabled` | `bool` | Optional | Indicates whether or not a card can be used for payments. |
Expand Down
2 changes: 1 addition & 1 deletion doc/models/create-customer-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Defines the body parameters that can be included in a request to the
| `reference_id` | `string` | Optional | An optional second ID used to associate the customer profile with an<br>entity in another system. |
| `note` | `string` | Optional | A custom note associated with the customer profile. |
| `birthday` | `string` | Optional | The birthday associated with the customer profile, in RFC 3339 format. The year is optional. The timezone and time are not allowed.<br>For example, `0000-09-21T00:00:00-00:00` represents a birthday on September 21 and `1998-09-21T00:00:00-00:00` represents a birthday on September 21, 1998.<br>You can also specify this value in `YYYY-MM-DD` format. |
| `tax_ids` | [`Customer Tax Ids`](/doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a customer profile. The corresponding `tax_ids` field is available only for customers of sellers in France, Ireland, or the United Kingdom.<br>For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). |
| `tax_ids` | [`Customer Tax Ids`](/doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a [customer profile](/doc/models/customer.md). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.<br>For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/create-loyalty-account-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A request to create a new loyalty account.

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `loyalty_account` | [`Loyalty Account`](/doc/models/loyalty-account.md) | Required | Describes a loyalty account. For more information, see<br>[Manage Loyalty Accounts Using the Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview). |
| `loyalty_account` | [`Loyalty Account`](/doc/models/loyalty-account.md) | Required | Describes a loyalty account in a [loyalty program](/doc/models/loyalty-program.md). For more information, see<br>[Manage Loyalty Accounts Using the Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview). |
| `idempotency_key` | `string` | Required | A unique string that identifies this `CreateLoyaltyAccount` request.<br>Keys can be any valid string, but must be unique for every request.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `128` |

## Example (as JSON)
Expand Down
3 changes: 2 additions & 1 deletion doc/models/create-loyalty-account-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A response that includes loyalty account created.
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `errors` | [`List of Error`](/doc/models/error.md) | Optional | Any errors that occurred during the request. |
| `loyalty_account` | [`Loyalty Account`](/doc/models/loyalty-account.md) | Optional | Describes a loyalty account. For more information, see<br>[Manage Loyalty Accounts Using the Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview). |
| `loyalty_account` | [`Loyalty Account`](/doc/models/loyalty-account.md) | Optional | Describes a loyalty account in a [loyalty program](/doc/models/loyalty-program.md). For more information, see<br>[Manage Loyalty Accounts Using the Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview). |

## Example (as JSON)

Expand All @@ -21,6 +21,7 @@ A response that includes loyalty account created.
"loyalty_account": {
"balance": 0,
"created_at": "2020-05-08T21:44:32Z",
"customer_id": "QPTXM8PQNX3Q726ZYHPMNP46XC",
"id": "79b807d2-d786-46a9-933b-918028d7a8c5",
"lifetime_points": 0,
"mapping": {
Expand Down
2 changes: 1 addition & 1 deletion doc/models/customer-tax-ids.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Customer Tax Ids

Represents the tax ID associated with a customer profile. The corresponding `tax_ids` field is available only for customers of sellers in France, Ireland, or the United Kingdom.
Represents the tax ID associated with a [customer profile](/doc/models/customer.md). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.
For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).

## Structure
Expand Down
4 changes: 2 additions & 2 deletions doc/models/customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Represents a Square customer profile in the Customer Directory of a Square selle

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `id` | `string` | Optional | A unique Square-assigned ID for the customer profile. |
| `id` | `string` | Optional | A unique Square-assigned ID for the customer profile.<br><br>If you need this ID for an API request, use the ID returned when you created the customer profile or call the [SearchCustomers](/doc/api/customers.md#search-customers)<br>or [ListCustomers](/doc/api/customers.md#list-customers) endpoint. |
| `created_at` | `string` | Optional | The timestamp when the customer profile was created, in RFC 3339 format. |
| `updated_at` | `string` | Optional | The timestamp when the customer profile was last updated, in RFC 3339 format. |
| `cards` | [`List of Card`](/doc/models/card.md) | Optional | Payment details of the credit, debit, and gift cards stored on file for the customer profile.<br><br>DEPRECATED at version 2021-06-16. Replaced by calling [ListCards](/doc/api/cards.md#list-cards) (for credit and debit cards on file)<br>or [ListGiftCards](/doc/api/gift-cards.md#list-gift-cards) (for gift cards on file) and including the `customer_id` query parameter.<br>For more information, see [Migrate to the Cards API and Gift Cards API](https://developer.squareup.com/docs/customers-api/use-the-api/integrate-with-other-services#migrate-customer-cards). |
Expand All @@ -30,7 +30,7 @@ Represents a Square customer profile in the Customer Directory of a Square selle
| `group_ids` | `List of string` | Optional | The IDs of customer groups the customer belongs to. |
| `segment_ids` | `List of string` | Optional | The IDs of segments the customer belongs to. |
| `version` | `long\|int` | Optional | The Square-assigned version number of the customer profile. The version number is incremented each time an update is committed to the customer profile, except for changes to customer segment membership and cards on file. |
| `tax_ids` | [`Customer Tax Ids`](/doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a customer profile. The corresponding `tax_ids` field is available only for customers of sellers in France, Ireland, or the United Kingdom.<br>For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). |
| `tax_ids` | [`Customer Tax Ids`](/doc/models/customer-tax-ids.md) | Optional | Represents the tax ID associated with a [customer profile](/doc/models/customer.md). The corresponding `tax_ids` field is available only for customers of sellers in EU countries or the United Kingdom.<br>For more information, see [Customer tax IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids). |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion doc/models/error-category.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ request to the Connect API.
| `API_ERROR` | An error occurred with the Connect API itself. |
| `AUTHENTICATION_ERROR` | An authentication error occurred. Most commonly, the request had<br>a missing, malformed, or otherwise invalid `Authorization` header. |
| `INVALID_REQUEST_ERROR` | The request was invalid. Most commonly, a required parameter was<br>missing, or a provided parameter had an invalid value. |
| `RATE_LIMIT_ERROR` | Your application reached the Connect API rate limit. Retry your<br>request after a while. |
| `RATE_LIMIT_ERROR` | Your application reached the Square API rate limit. You might receive this error if your application sends a high number of requests<br>to Square APIs in a short period of time.<br><br>Your application should monitor responses for `429 RATE_LIMITED` errors and use a retry mechanism with an [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff)<br>schedule to resend the requests at an increasingly slower rate. It is also a good practice to use a randomized delay (jitter) in your retry schedule. |
| `PAYMENT_METHOD_ERROR` | An error occurred while processing a payment method. Most commonly,<br>the details of the payment method were invalid (such as a card's CVV<br>or expiration date). |
| `REFUND_ERROR` | An error occurred while attempting to process a refund. |
| `MERCHANT_SUBSCRIPTION_ERROR` | An error occurred when checking a merchant subscription status |
Expand Down
1 change: 1 addition & 0 deletions doc/models/inventory-adjustment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ particular time and location.
| `created_at` | `string` | Optional | An RFC 3339-formatted timestamp that indicates when the inventory adjustment is received.<br>**Constraints**: *Maximum Length*: `34` |
| `source` | [`Source Application`](/doc/models/source-application.md) | Optional | Provides information about the application used to generate a change. |
| `employee_id` | `string` | Optional | The Square-generated ID of the [Employee](/doc/models/employee.md) responsible for the<br>inventory adjustment.<br>**Constraints**: *Maximum Length*: `100` |
| `team_member_id` | `string` | Optional | The Square-generated ID of the [Team Member](/doc/models/team-member.md) responsible for the<br>inventory adjustment.<br>**Constraints**: *Maximum Length*: `100` |
| `transaction_id` | `string` | Optional | The Square-generated ID of the [Transaction][#type-transaction] that<br>caused the adjustment. Only relevant for payment-related state<br>transitions.<br>**Constraints**: *Maximum Length*: `255` |
| `refund_id` | `string` | Optional | The Square-generated ID of the [Refund][#type-refund] that<br>caused the adjustment. Only relevant for refund-related state<br>transitions.<br>**Constraints**: *Maximum Length*: `255` |
| `purchase_order_id` | `string` | Optional | The Square-generated ID of the purchase order that caused the<br>adjustment. Only relevant for state transitions from the Square for Retail<br>app.<br>**Constraints**: *Maximum Length*: `100` |
Expand Down
1 change: 1 addition & 0 deletions doc/models/inventory-physical-count.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ hand or from syncing with an external system.
| `quantity` | `string` | Optional | The number of items affected by the physical count as a decimal string.<br>The number can support up to 5 digits after the decimal point.<br>**Constraints**: *Maximum Length*: `26` |
| `source` | [`Source Application`](/doc/models/source-application.md) | Optional | Provides information about the application used to generate a change. |
| `employee_id` | `string` | Optional | The Square-generated ID of the [Employee](/doc/models/employee.md) responsible for the<br>physical count.<br>**Constraints**: *Maximum Length*: `100` |
| `team_member_id` | `string` | Optional | The Square-generated ID of the [Team Member](/doc/models/team-member.md) responsible for the<br>physical count.<br>**Constraints**: *Maximum Length*: `100` |
| `occurred_at` | `string` | Optional | A client-generated RFC 3339-formatted timestamp that indicates when<br>the physical count was examined. For physical count updates, the `occurred_at`<br>timestamp cannot be older than 24 hours or in the future relative to the<br>time of the request.<br>**Constraints**: *Maximum Length*: `34` |
| `created_at` | `string` | Optional | An RFC 3339-formatted timestamp that indicates when the physical count is received.<br>**Constraints**: *Maximum Length*: `34` |

Expand Down
1 change: 1 addition & 0 deletions doc/models/inventory-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ particular time from one location to another.
| `created_at` | `string` | Optional | An RFC 3339-formatted timestamp that indicates when Square<br>received the transfer request.<br>**Constraints**: *Maximum Length*: `34` |
| `source` | [`Source Application`](/doc/models/source-application.md) | Optional | Provides information about the application used to generate a change. |
| `employee_id` | `string` | Optional | The Square-generated ID of the [Employee](/doc/models/employee.md) responsible for the<br>inventory transfer.<br>**Constraints**: *Maximum Length*: `100` |
| `team_member_id` | `string` | Optional | The Square-generated ID of the [Team Member](/doc/models/team-member.md) responsible for the<br>inventory transfer.<br>**Constraints**: *Maximum Length*: `100` |

## Example (as JSON)

Expand Down
Loading

0 comments on commit a04a48e

Please sign in to comment.