Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
ssung88 committed Oct 23, 2019
1 parent af692b4 commit 00c4d09
Show file tree
Hide file tree
Showing 35 changed files with 384 additions and 73 deletions.
2 changes: 1 addition & 1 deletion doc/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Returns a list of [CatalogObject](#type-catalogobject)s that includes
all objects of a set of desired types (for example, all [CatalogItem](#type-catalogitem)
and [CatalogTax](#type-catalogtax) objects) in the catalog. The `types` parameter
is specified as a comma-separated list of valid [CatalogObject](#type-catalogobject) types:
`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`.
`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`.

__Important:__ ListCatalog does not return deleted catalog items. To retrieve
deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects`
Expand Down
44 changes: 43 additions & 1 deletion doc/merchants.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@ merchants_api = client.merchants

`MerchantsApi`

## Methods

* [List Merchants](/doc/merchants.md#list-merchants)
* [Retrieve Merchant](/doc/merchants.md#retrieve-merchant)

## List Merchants

Returns `Merchant` information for 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.

If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant)
endpoint to get the merchant information.

```python
def list_merchants(self,
cursor=None)
```

### Parameters

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `int` | Query, Optional | The cursor generated by the previous response. |

### Response Type

[`List Merchants Response`](/doc/models/list-merchants-response.md)

### Example Usage

```python
result = merchants_api.list_merchants()

if result.is_success():
print(result.body)
elif result.is_error():
print(result.errors)
```

## Retrieve Merchant

Retrieve a `Merchant` object for the given `merchant_id`.
Expand All @@ -21,7 +63,7 @@ def retrieve_merchant(self,

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `merchant_id` | `string` | Template, Required | The ID of the merchant to retrieve |
| `merchant_id` | `string` | Template, Required | The ID of the merchant to retrieve. |

### Response Type

Expand Down
2 changes: 1 addition & 1 deletion doc/models/catalog-item-option-value.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ its item option values.
| `item_option_id` | `string` | Optional | Unique ID of the associated item option. |
| `name` | `string` | Optional | Name of this item option value. Searchable. |
| `description` | `string` | Optional | The option value's human-readable description. |
| `color` | `string` | Optional | The HTML color for this value in the format #FFRRGGBB or #RRGGBB<br>(e.g., "#ff8d4e85"). Only displayed if parent Item Option's `show_colors`<br>flag is enabled.<br>value. |
| `color` | `string` | Optional | The HTML-supported hex color for the item option<br>(e.g., "#ff8d4e85"). Only displayed if `show_colors` is enabled on the<br>parent `ItemOption`. When left unset, `color` defaults to white ("#ffffff")<br>when `show_colors` is enabled on the parent `ItemOption`. |
| `ordinal` | `int` | Optional | Determines where this option value appears in a list of option values. |
| `item_variation_count` | `long|int` | Optional | The number of [CatalogItemVariation(#type-catalogitemvariation)s that<br>currently make use of this Item Option value. Present only if `retrieve_counts`<br>was specified on the request used to retrieve the parent Item Option of this<br>value.<br><br>Maximum: 100 counts. |

Expand Down
6 changes: 4 additions & 2 deletions doc/models/catalog-pricing-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ during the active time period.
| `time_period_ids` | `List of string` | Optional | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when<br>this pricing rule is in effect. If left unset, the pricing rule is always<br>in effect. |
| `discount_id` | `string` | Optional | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off<br>the price of all matched items. |
| `match_products_id` | `string` | Optional | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will<br>be matched by this rule. A match rule matches within the entire cart. |
| `apply_products_id` | `string` | Optional | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to<br>within the set of matched products specified by `match_products_id`.<br>An apply rule can only match once within the set of matched products.<br>If left unset, the pricing rule will be applied to all products within the<br>set of matched products. |
| `apply_products_id` | `string` | Optional | [CatalogProductSet](#type-catalogproductset) to apply the pricing to.<br>An apply rule matches within the subset of the cart that fits the match rules (the match set).<br>An apply rule can only match once in the match set.<br>If not supplied, the pricing will be applied to all products in the match set.<br>Other products retain their base price, or a price generated by other rules.<br>This field has been deprecated: new pricing rules should prefer the exclude_products_id<br>field. Exclude sets allow better control over quantity ranges and offer more flexibility<br>for which matched items receive a discount. |
| `exclude_products_id` | `string` | Optional | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude<br>from this pricing rule.<br>An exclude rule matches within the subset of the cart that fits the match rules (the match set).<br>An exclude rule can only match once in the match set.<br>If not supplied, the pricing will be applied to all products in the match set.<br>Other products retain their base price, or a price generated by other rules. |
| `valid_from_date` | `string` | Optional | Represents the date the Pricing Rule is valid from. Represented in<br>RFC3339 full-date format (YYYY-MM-DD). |
| `valid_from_local_time` | `string` | Optional | Represents the local time the pricing rule should be valid from. Time<br>zone is determined by the device running the Point of Sale app.<br><br>Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. |
| `valid_until_date` | `string` | Optional | Represents the date the pricing rule will become inactive.<br><br>Represented in RFC3339 full-date format (YYYY-MM-DD). |
| `valid_until_local_time` | `string` | Optional | Represents the local time at which the pricing rule will become inactive.<br>Time zone is determined by the device running the Point of Sale app.<br><br>Represented in RFC3339 partial-time format<br>(HH:MM:SS). Partial seconds will be truncated. |
| `exclude_strategy` | [`str (Exclude Strategy)`](/doc/models/exclude-strategy.md) | Optional | Indicates which products matched by a [CatalogPricingRule](#type-catalogpricingrule)<br>will be excluded if the pricing rule uses an exclude set. |

### Example (as JSON)

Expand All @@ -35,7 +36,8 @@ during the active time period.
"valid_from_date": null,
"valid_from_local_time": null,
"valid_until_date": null,
"valid_until_local_time": null
"valid_until_local_time": null,
"exclude_strategy": null
}
```

4 changes: 2 additions & 2 deletions doc/models/customer-filter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Customer Filter

Represents a set of [`CustomerQuery`](#type-customerquery) filters used
to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers).
Represents a set of `CustomerQuery` filters used
to limit the set of Customers returned by SearchCustomers.

### Structure

Expand Down
4 changes: 2 additions & 2 deletions doc/models/customer-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ for customer profiles.

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `filter` | [`Customer Filter`](/doc/models/customer-filter.md) | Optional | Represents a set of [`CustomerQuery`](#type-customerquery) filters used<br>to limit the set of Customers returned by [`SearchCustomers`](#endpoint-customers-seachcustomers). |
| `sort` | [`Customer Sort`](/doc/models/customer-sort.md) | Optional | Indicates the field to use for sorting customer profiles. For example,<br>by total money spent with the merchant or the date of their first purchase. |
| `filter` | [`Customer Filter`](/doc/models/customer-filter.md) | Optional | Represents a set of `CustomerQuery` filters used<br>to limit the set of Customers returned by SearchCustomers. |
| `sort` | [`Customer Sort`](/doc/models/customer-sort.md) | Optional | Indicates the field to use for sorting customer profiles. |

### Example (as JSON)

Expand Down
3 changes: 1 addition & 2 deletions doc/models/customer-sort.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## Customer Sort

Indicates the field to use for sorting customer profiles. For example,
by total money spent with the merchant or the date of their first purchase.
Indicates the field to use for sorting customer profiles.

### Structure

Expand Down
16 changes: 16 additions & 0 deletions doc/models/exclude-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Exclude Strategy

Indicates which products matched by a [CatalogPricingRule](#type-catalogpricingrule)
will be excluded if the pricing rule uses an exclude set.

### Enumeration

`ExcludeStrategy`

### Fields

| Name | Description |
| --- | --- |
| `LEAST_EXPENSIVE` | The least expensive matched products are excluded from the pricing. If<br>the pricing rule is set to exclude one product and multiple products in the<br>match set qualify as least expensive, then one will be excluded at random.<br><br>Excluding the least expensive product gives the best discount value to the buyer. |
| `MOST_EXPENSIVE` | The most expensive matched product is excluded from the pricing rule.<br>If multiple products have the same price and all qualify as least expensive,<br>one will be excluded at random.<br><br>This guarantees that the most expensive product is purchased at full price. |

22 changes: 22 additions & 0 deletions doc/models/list-merchants-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## List Merchants Request

Request object for the [ListMerchant](#endpoint-listmerchant) endpoint.

### Structure

`ListMerchantsRequest`

### Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `int` | Optional | The cursor generated by the previous response. |

### Example (as JSON)

```json
{
"cursor": null
}
```

33 changes: 33 additions & 0 deletions doc/models/list-merchants-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## List Merchants Response

The response object returned by the [ListMerchant](#endpoint-listmerchant) endpoint.

### Structure

`ListMerchantsResponse`

### Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `errors` | [`List of Error`](/doc/models/error.md) | Optional | Information on errors encountered during the request. |
| `merchant` | [`List of Merchant`](/doc/models/merchant.md) | Optional | The requested `Merchant` entities. |
| `cursor` | `int` | Optional | If the response is truncated, the cursor to use in next request to fetch next set of objects. |

### Example (as JSON)

```json
{
"merchants": [
{
"id": "DM7VKY8Q63GNP",
"business_name": "Apple A Day",
"country": "US",
"language_code": "en-US",
"currency": "USD",
"status": "ACTIVE"
}
]
}
```

6 changes: 3 additions & 3 deletions doc/models/location.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Represents one of a business's locations.

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `id` | `string` | Optional | The location's unique ID. |
| `id` | `string` | Optional | The Square-issued ID of the location. |
| `name` | `string` | Optional | The location's name. Location names are set by the account owner and displayed<br>in the dashboard as the location's nickname |
| `address` | [`Address`](/doc/models/address.md) | Optional | Represents a physical address. |
| `timezone` | `string` | Optional | The [IANA Timezone Database](https://www.iana.org/time-zones)<br>identifier for the location's timezone. |
| `capabilities` | [`List of str (Location Capability)`](/doc/models/location-capability.md) | Optional | Indicates which Square features are enabled for the location.<br>See [LocationCapability](#type-locationcapability) for possible values |
| `capabilities` | [`List of str (Location Capability)`](/doc/models/location-capability.md) | Optional | The Square features that are enabled for the location.<br>See [LocationCapability](#type-locationcapability) for possible values.<br>See [LocationCapability](#type-locationcapability) for possible values |
| `status` | [`str (Location Status)`](/doc/models/location-status.md) | Optional | Indicates the location's status. |
| `created_at` | `string` | Optional | The time when the location was created, in RFC 3339 format. |
| `merchant_id` | `string` | Optional | The identifier of the merchant that owns the location. |
| `merchant_id` | `string` | Optional | The ID of the merchant that owns the location. |
| `country` | [`str (Country)`](/doc/models/country.md) | Optional | Indicates the country associated with another entity, such as a business.<br>Values are in [ISO 3166-1-alpha-2 format](http://www.iso.org/iso/home/standards/country_codes.htm). |
| `language_code` | `string` | Optional | The language associated with the location in<br>[BCP 47 format](https://tools.ietf.org/html/bcp47#appendix-A). |
| `currency` | [`str (Currency)`](/doc/models/currency.md) | Optional | Indicates the associated currency for an amount of money. Values correspond<br>to [ISO 4217](https://wikipedia.org/wiki/ISO_4217). |
Expand Down
2 changes: 1 addition & 1 deletion doc/models/search-catalog-objects-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| `cursor` | `string` | Optional | The pagination cursor to be used in a subsequent request. If unset, this is the final response.<br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
| `objects` | [`List of Catalog Object`](/doc/models/catalog-object.md) | Optional | The [CatalogObject](#type-catalogobject)s returned. |
| `related_objects` | [`List of Catalog Object`](/doc/models/catalog-object.md) | Optional | A list of [CatalogObject](#type-catalogobject)s referenced by the objects in the `objects` field. |
| `latest_time` | `string` | Optional | When this merchant's catalog was last updated. Will match the value for `end_time` or `cursor` if<br>either field is included in the `SearchCatalog` request. |
| `latest_time` | `string` | Optional | When the associated product catalog was last updated. Will match the value for `end_time` or `cursor` if<br>either field is included in the `SearchCatalog` request. |

### Example (as JSON)

Expand Down
20 changes: 20 additions & 0 deletions doc/models/v1-item-color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## V1 Item Color

### Enumeration

`V1ItemColor`

### Fields

| Name | Description |
| --- | --- |
| `Enum_9da2a6` | - |
| `Enum_4ab200` | - |
| `Enum_0b8000` | - |
| `Enum_2952cc` | - |
| `a82ee5` | - |
| `e5457a` | - |
| `b21212` | - |
| `Enum_593c00` | - |
| `e5BF00` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ V1Item
| `name` | `string` | Optional | The item's name. |
| `description` | `string` | Optional | The item's description. |
| `type` | [`str (V1 Item Type)`](/doc/models/v1-item-type.md) | Optional | - |
| `color` | [`str (V1 Discount Color)`](/doc/models/v1-discount-color.md) | Optional | - |
| `color` | [`str (V1 Item Color)`](/doc/models/v1-item-color.md) | Optional | - |
| `abbreviation` | `string` | Optional | The text of the item's display label in Square Register. Only up to the first five characters of the string are used. |
| `visibility` | [`str (V1 Item Visibility)`](/doc/models/v1-item-visibility.md) | Optional | - |
| `available_online` | `bool` | Optional | If true, the item can be added to shipping orders from the merchant's online store. |
Expand Down
13 changes: 13 additions & 0 deletions doc/models/v1-list-employees-request-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## V1 List Employees Request Status

### Enumeration

`V1ListEmployeesRequestStatus`

### Fields

| Name | Description |
| --- | --- |
| `ACTIVE` | - |
| `INACTIVE` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-list-employees-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| `end_updated_at` | `string` | Optional | If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format. |
| `begin_created_at` | `string` | Optional | If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format. |
| `end_created_at` | `string` | Optional | If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format. |
| `status` | [`str (V1 Employee Status)`](/doc/models/v1-employee-status.md) | Optional | - |
| `status` | [`str (V1 List Employees Request Status)`](/doc/models/v1-list-employees-request-status.md) | Optional | - |
| `external_id` | `string` | Optional | If provided, the endpoint returns only employee entities with the specified external_id. |
| `limit` | `int` | Optional | The maximum integer number of employee entities to return in a single response. Default 100, maximum 200. |
| `batch_token` | `string` | Optional | A pagination cursor to retrieve the next set of results for your<br>original query to the endpoint. |
Expand Down
13 changes: 13 additions & 0 deletions doc/models/v1-payment-tax-inclusion-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## V1 Payment Tax Inclusion Type

### Enumeration

`V1PaymentTaxInclusionType`

### Fields

| Name | Description |
| --- | --- |
| `ADDITIVE` | - |
| `INCLUSIVE` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-payment-tax.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ V1PaymentTax
| `name` | `string` | Optional | The merchant-defined name of the tax. |
| `applied_money` | [`V1 Money`](/doc/models/v1-money.md) | Optional | - |
| `rate` | `string` | Optional | The rate of the tax, as a string representation of a decimal number. A value of 0.07 corresponds to a rate of 7%. |
| `inclusion_type` | [`str (V1 Fee Inclusion Type)`](/doc/models/v1-fee-inclusion-type.md) | Optional | - |
| `inclusion_type` | [`str (V1 Payment Tax Inclusion Type)`](/doc/models/v1-payment-tax-inclusion-type.md) | Optional | - |
| `fee_id` | `string` | Optional | The ID of the tax, if available. Taxes applied in older versions of Square Register might not have an ID. |

### Example (as JSON)
Expand Down
13 changes: 13 additions & 0 deletions doc/models/v1-refund-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## V1 Refund Type

### Enumeration

`V1RefundType`

### Fields

| Name | Description |
| --- | --- |
| `FULL` | - |
| `PARTIAL` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-refund.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ V1Refund

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `type` | [`str (V1 Create Refund Request Type)`](/doc/models/v1-create-refund-request-type.md) | Optional | - |
| `type` | [`str (V1 Refund Type)`](/doc/models/v1-refund-type.md) | Optional | - |
| `reason` | `string` | Optional | The merchant-specified reason for the refund. |
| `refunded_money` | [`V1 Money`](/doc/models/v1-money.md) | Optional | - |
| `refunded_processing_fee_money` | [`V1 Money`](/doc/models/v1-money.md) | Optional | - |
Expand Down
13 changes: 13 additions & 0 deletions doc/models/v1-settlement-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## V1 Settlement Status

### Enumeration

`V1SettlementStatus`

### Fields

| Name | Description |
| --- | --- |
| `FAILED` | - |
| `SENT` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-settlement.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ V1Settlement
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `id` | `string` | Optional | The settlement's unique identifier. |
| `status` | [`str (V1 List Settlements Request Status)`](/doc/models/v1-list-settlements-request-status.md) | Optional | - |
| `status` | [`str (V1 Settlement Status)`](/doc/models/v1-settlement-status.md) | Optional | - |
| `total_money` | [`V1 Money`](/doc/models/v1-money.md) | Optional | - |
| `initiated_at` | `string` | Optional | The time when the settlement was submitted for deposit or withdrawal, in ISO 8601 format. |
| `bank_account_id` | `string` | Optional | The Square-issued unique identifier for the bank account associated with the settlement. |
Expand Down
13 changes: 13 additions & 0 deletions doc/models/v1-update-modifier-list-request-selection-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## V1 Update Modifier List Request Selection Type

### Enumeration

`V1UpdateModifierListRequestSelectionType`

### Fields

| Name | Description |
| --- | --- |
| `SINGLE` | - |
| `MULTIPLE` | - |

2 changes: 1 addition & 1 deletion doc/models/v1-update-modifier-list-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ V1UpdateModifierListRequest
| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `name` | `string` | Optional | The modifier list's name. |
| `selection_type` | [`str (V1 Modifier List Selection Type)`](/doc/models/v1-modifier-list-selection-type.md) | Optional | - |
| `selection_type` | [`str (V1 Update Modifier List Request Selection Type)`](/doc/models/v1-update-modifier-list-request-selection-type.md) | Optional | - |

### Example (as JSON)

Expand Down
1 change: 1 addition & 0 deletions doc/models/webhook-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ The type of an event that triggers a webhook notification to an application.
| Name | Description |
| --- | --- |
| `Enum_inventorycountupdated` | The quantity was updated for a catalog item variation.<br>Webhook notification data is packaged as: [`InventoryCount[]`](#type-inventorychange). |
| `Enum_catalogversionupdated` | The catalog was updated.<br>Webhook notification data is packaged as:<br>"catalog_version": { "updated_at": "2019-05-14T17:51:27Z"}. |

Loading

0 comments on commit 00c4d09

Please sign in to comment.