From 925abe468cc7eb835a6fc665bfc16f8ddb91cb63 Mon Sep 17 00:00:00 2001 From: Shao-Fu Sung <20245766+shaofu88@users.noreply.github.com> Date: Wed, 10 Jul 2019 10:04:24 -0700 Subject: [PATCH] Release/2.20190710.0 (#100) * Release 2.20190710.0 --- CHANGES.md | 4 + README.md | 1 - docs/AggregationStrategy.md | 18 ---- docs/CatalogItem.md | 1 - docs/CatalogItemVariation.md | 1 - docs/CatalogObject.md | 3 + docs/CatalogPricingRule.md | 3 - docs/InventoryAdjustment.md | 2 +- docs/InventoryCount.md | 2 +- docs/InventoryPhysicalCount.md | 2 +- docs/InventoryTransfer.md | 2 +- docs/TransactionsApi.md | 4 +- setup.py | 2 +- squareconnect/__init__.py | 1 - squareconnect/api_client.py | 2 +- squareconnect/apis/transactions_api.py | 4 +- squareconnect/configuration.py | 2 +- squareconnect/models/__init__.py | 1 - squareconnect/models/aggregation_strategy.py | 95 ------------------- squareconnect/models/catalog_item.py | 28 +----- .../models/catalog_item_variation.py | 28 +----- squareconnect/models/catalog_object.py | 80 +++++++++++++++- squareconnect/models/catalog_pricing_rule.py | 80 +--------------- squareconnect/models/inventory_adjustment.py | 4 +- squareconnect/models/inventory_count.py | 4 +- .../models/inventory_physical_count.py | 4 +- squareconnect/models/inventory_transfer.py | 4 +- test/test_aggregation_strategy.py | 48 ---------- test/test_catalog_api.py | 1 - 29 files changed, 108 insertions(+), 323 deletions(-) delete mode 100644 docs/AggregationStrategy.md delete mode 100644 squareconnect/models/aggregation_strategy.py delete mode 100644 test/test_aggregation_strategy.py diff --git a/CHANGES.md b/CHANGES.md index 42622b6..0e08235 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Change Log +## Version 2.20190710.0 (2019-07-10) + +* **Retired functionality** — The `CatalogItem.image_url` field (deprecated under `Square-Version` YYYYMMDD) is retired and no longer included in Connect SDKs. + ## Version 2.20190612.1 (2019-06-26) * **Bug fix**: `Transaction.Charge` and `Customers.CreateCustomerCard` request objects — now include the `verification_token` required for [Strong Customer Authentication](https://developer.squareup.com/docs/sca-overview). diff --git a/README.md b/README.md index f9cf19b..ba356c0 100644 --- a/README.md +++ b/README.md @@ -587,7 +587,6 @@ Class | Method | HTTP request ## Documentation For Enums - - [AggregationStrategy](docs/AggregationStrategy.md) - [CardBrand](docs/CardBrand.md) - [CatalogDiscountType](docs/CatalogDiscountType.md) - [CatalogItemProductType](docs/CatalogItemProductType.md) diff --git a/docs/AggregationStrategy.md b/docs/AggregationStrategy.md deleted file mode 100644 index f77af9b..0000000 --- a/docs/AggregationStrategy.md +++ /dev/null @@ -1,18 +0,0 @@ -# AggregationStrategy - - -### Description - -Indicates how a [CatalogPricingRule](#type-catalogpricingrule) can be combined with other rules. - -## Properties -Name | Type ------------- | ------------- -**UNKNOWN** | string -**BASE** | string -**STACKABLE** | string -**EXCLUSIVE** | string - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index e19e8bf..10057d9 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -18,7 +18,6 @@ Name | Type | Description | Notes **category_id** | **str** | The ID of the item's category, if any. | [optional] **tax_ids** | **list[str]** | A set of IDs indicating the [CatalogTax](#type-catalogtax)es that are enabled for this item. When updating an item, any taxes listed here will be added to the item. [CatalogTax](#type-catalogtax)es may also be added to or deleted from an item using `UpdateItemTaxes`. | [optional] **modifier_list_info** | [**list[CatalogItemModifierListInfo]**](CatalogItemModifierListInfo.md) | A set of [CatalogItemModifierListInfo](#type-catalogitemmodifierlistinfo) objects representing the modifier lists that apply to this item, along with the overrides and min and max limits that are specific to this item. [CatalogModifierList](#type-catalogmodifierlist)s may also be added to or deleted from an item using `UpdateItemModifierLists`. | [optional] -**image_url** | **str** | __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). | [optional] **variations** | [**list[CatalogObject]**](CatalogObject.md) | A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations | [optional] **product_type** | **str** | The product type of the item. May not be changed once an item has been created. Only items of product type `REGULAR` may be created by this API; items with other product types are read-only. See [CatalogItemProductType](#type-catalogitemproducttype) for possible values | [optional] **skip_modifier_screen** | **bool** | If `false`, the Square Point of Sale app will present the [CatalogItem](#type-catalogitem)'s details screen immediately, allowing the merchant to choose [CatalogModifier](#type-catalogmodifier)s before adding the item to the cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by drilling down onto the item's details. Third-party clients are encouraged to implement similar behaviors. | [optional] diff --git a/docs/CatalogItemVariation.md b/docs/CatalogItemVariation.md index 688d558..a7ff1c2 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -21,7 +21,6 @@ Name | Type | Description | Notes **inventory_alert_threshold** | **int** | If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. | [optional] **user_data** | **str** | Arbitrary user metadata to associate with the item variation. Cannot exceed 255 characters. Searchable. | [optional] **service_duration** | **int** | If the [CatalogItem](#type-catalogitem) that owns this item variation is of type `APPOINTMENTS_SERVICE`, then this is the duration of the service in milliseconds. For example, a 30 minute appointment would have the value `1800000`, which is equal to 30 (minutes) * 60 (seconds per minute) * 1000 (milliseconds per second). | [optional] -**catalog_measurement_unit_id** | **str** | Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. | [optional] **measurement_unit_id** | **str** | ID of the ‘CatalogMeasurementUnit’ that is used to measure the quantity sold of this item variation. If left unset, the item will be sold in whole quantities. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CatalogObject.md b/docs/CatalogObject.md index 30c73aa..96a1347 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -25,6 +25,9 @@ Name | Type | Description | Notes **discount_data** | [**CatalogDiscount**](CatalogDiscount.md) | Structured data for a [CatalogDiscount](#type-catalogdiscount), set for CatalogObjects of type `DISCOUNT`. | [optional] **modifier_list_data** | [**CatalogModifierList**](CatalogModifierList.md) | Structured data for a [CatalogModifierList](#type-catalogmodifierlist), set for CatalogObjects of type `MODIFIER_LIST`. | [optional] **modifier_data** | [**CatalogModifier**](CatalogModifier.md) | Structured data for a [CatalogModifier](#type-catalogmodifier), set for CatalogObjects of type `MODIFIER`. | [optional] +**time_period_data** | [**CatalogTimePeriod**](CatalogTimePeriod.md) | Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`. | [optional] +**product_set_data** | [**CatalogProductSet**](CatalogProductSet.md) | Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`. | [optional] +**pricing_rule_data** | [**CatalogPricingRule**](CatalogPricingRule.md) | Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`. | [optional] **image_data** | [**CatalogImage**](CatalogImage.md) | Structured data for a [CatalogImage](#type-catalogimage), set for CatalogObjects of type `IMAGE`. | [optional] **measurement_unit_data** | [**CatalogMeasurementUnit**](CatalogMeasurementUnit.md) | Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. | [optional] diff --git a/docs/CatalogPricingRule.md b/docs/CatalogPricingRule.md index f5859ce..d582ef4 100644 --- a/docs/CatalogPricingRule.md +++ b/docs/CatalogPricingRule.md @@ -10,12 +10,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". | [optional] **time_period_ids** | **list[str]** | Unique ID for the [CatalogTimePeriod](#type-catalogtimeperiod)s when this pricing rule is in effect. If left unset, the pricing rule is always in effect. | [optional] -**total_price_money** | [**Money**](Money.md) | The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] -**item_price_money** | [**Money**](Money.md) | The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] **discount_id** | **str** | Unique ID for the [CatalogDiscount](#type-catalogdiscount) to take off the price of all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. | [optional] **match_products_id** | **str** | Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. | [optional] **apply_products_id** | **str** | The [CatalogProductSet](#type-catalogproductset) to apply the pricing rule to within the set of matched products specified by `match_products_id`. An apply rule can only match once within the set of matched products. If left unset, the pricing rule will be applied to all products within the set of matched products. | [optional] -**stackable** | **str** | Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values | [optional] **exclude_products_id** | **str** | Identifies the [CatalogProductSet](#type-catalogproductset) to exclude from this pricing rule. An exclude rule matches within the subset of the cart that fits the match rules (the match set). An exclude rule can only match once in the match set. If not supplied, the pricing will be applied to all products in the match set. Other products retain their base price, or a price generated by other rules. | [optional] **valid_from_date** | **str** | Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] **valid_from_local_time** | **str** | Represents the local time the pricing rule should be valid from. Time zone is determined by the device running the Point of Sale app. Represented in RFC3339 partial-time format (HH:MM:SS). Partial seconds will be truncated. | [optional] diff --git a/docs/InventoryAdjustment.md b/docs/InventoryAdjustment.md index 03cfde8..638ac5b 100644 --- a/docs/InventoryAdjustment.md +++ b/docs/InventoryAdjustment.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **location_id** | **str** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] **catalog_object_id** | **str** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional] **catalog_object_type** | **str** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **str** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] +**quantity** | **str** | The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional] **total_price_money** | [**Money**](Money.md) | The read-only total price paid for goods associated with the adjustment. Present if and only if `to_state` is `SOLD`. Always non-negative. | [optional] **occurred_at** | **str** | A client-generated timestamp in RFC 3339 format that indicates when the adjustment took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **str** | A read-only timestamp in RFC 3339 format that indicates when Square received the adjustment. | [optional] diff --git a/docs/InventoryCount.md b/docs/InventoryCount.md index e3c0153..6ac287c 100644 --- a/docs/InventoryCount.md +++ b/docs/InventoryCount.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **catalog_object_type** | **str** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **str** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **str** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] -**quantity** | **str** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] +**quantity** | **str** | The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional] **calculated_at** | **str** | A read-only timestamp in RFC 3339 format that indicates when Square received the most recent physical count or adjustment that had an affect on the estimated count. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InventoryPhysicalCount.md b/docs/InventoryPhysicalCount.md index 285bb7e..ed7c8d9 100644 --- a/docs/InventoryPhysicalCount.md +++ b/docs/InventoryPhysicalCount.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **catalog_object_type** | **str** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked. Tracking is only supported for the `ITEM_VARIATION` type. | [optional] **state** | **str** | The current [InventoryState](#type-inventorystate) for the related quantity of items. See [InventoryState](#type-inventorystate) for possible values | [optional] **location_id** | **str** | The Square ID of the [Location](#type-location) where the related quantity of items are being tracked. | [optional] -**quantity** | **str** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] +**quantity** | **str** | The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that submitted the physical count. | [optional] **employee_id** | **str** | The Square ID of the [Employee](#type-employee) responsible for the physical count. | [optional] **occurred_at** | **str** | A client-generated timestamp in RFC 3339 format that indicates when the physical count took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] diff --git a/docs/InventoryTransfer.md b/docs/InventoryTransfer.md index a1d5b5c..bbeab7d 100644 --- a/docs/InventoryTransfer.md +++ b/docs/InventoryTransfer.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **to_location_id** | **str** | The Square ID of the [Location](#type-location) where the related quantity of items were tracked after the transfer. | [optional] **catalog_object_id** | **str** | The Square generated ID of the [CatalogObject](#type-catalogobject) being tracked. | [optional] **catalog_object_type** | **str** | The [CatalogObjectType](#type-catalogobjecttype) of the [CatalogObject](#type-catalogobject) being tracked.Tracking is only supported for the `ITEM_VARIATION` type. | [optional] -**quantity** | **str** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. | [optional] +**quantity** | **str** | The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. | [optional] **occurred_at** | **str** | A client-generated timestamp in RFC 3339 format that indicates when the transfer took place. For write actions, the `occurred_at` timestamp cannot be older than 24 hours or in the future relative to the time of the request. | [optional] **created_at** | **str** | A read-only timestamp in RFC 3339 format that indicates when Square received the transfer request. | [optional] **source** | [**SourceApplication**](SourceApplication.md) | Read-only information about the application that initiated the inventory transfer. | [optional] diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 3769052..963c980 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -20,7 +20,7 @@ Method | HTTP request ### Description -Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. +Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information. ### Parameters @@ -171,7 +171,7 @@ Assign your **Access Token** from developer portal to the authorization paramete ### Description -Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. +Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information. ### Parameters diff --git a/setup.py b/setup.py index b454d80..f79ff36 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "squareconnect" -VERSION = "2.20190612.1" +VERSION = "2.20190710.0" diff --git a/squareconnect/__init__.py b/squareconnect/__init__.py index ffd6d27..5df44c7 100644 --- a/squareconnect/__init__.py +++ b/squareconnect/__init__.py @@ -4,7 +4,6 @@ from .models.additional_recipient_receivable import AdditionalRecipientReceivable from .models.additional_recipient_receivable_refund import AdditionalRecipientReceivableRefund from .models.address import Address -from .models.aggregation_strategy import AggregationStrategy from .models.batch_change_inventory_request import BatchChangeInventoryRequest from .models.batch_change_inventory_response import BatchChangeInventoryResponse from .models.batch_delete_catalog_objects_request import BatchDeleteCatalogObjectsRequest diff --git a/squareconnect/api_client.py b/squareconnect/api_client.py index 2248d56..cda124d 100644 --- a/squareconnect/api_client.py +++ b/squareconnect/api_client.py @@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Square-Connect-Python/2.20190612.1' + self.user_agent = 'Square-Connect-Python/2.20190710.0' @property def user_agent(self): diff --git a/squareconnect/apis/transactions_api.py b/squareconnect/apis/transactions_api.py index 13eb43e..0eb6ea5 100644 --- a/squareconnect/apis/transactions_api.py +++ b/squareconnect/apis/transactions_api.py @@ -44,7 +44,7 @@ def __init__(self, api_client=None): def capture_transaction(self, location_id, transaction_id, **kwargs): """ CaptureTransaction - Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. + Captures a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -566,7 +566,7 @@ def retrieve_transaction(self, location_id, transaction_id, **kwargs): def void_transaction(self, location_id, transaction_id, **kwargs): """ VoidTransaction - Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information. + Cancels a transaction that was created with the [Charge](#endpoint-transactions-charge) endpoint with a `delay_capture` value of `true`. See the [Delay Capture of Funds](/transactions-api/cookbook/delay-capture) recipe for more information. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function diff --git a/squareconnect/configuration.py b/squareconnect/configuration.py index cd9b786..e70aade 100644 --- a/squareconnect/configuration.py +++ b/squareconnect/configuration.py @@ -229,5 +229,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.0\n"\ - "SDK Package Version: 2.20190612.1".\ + "SDK Package Version: 2.20190710.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/squareconnect/models/__init__.py b/squareconnect/models/__init__.py index 01cc51e..7085a7c 100644 --- a/squareconnect/models/__init__.py +++ b/squareconnect/models/__init__.py @@ -4,7 +4,6 @@ from .additional_recipient_receivable import AdditionalRecipientReceivable from .additional_recipient_receivable_refund import AdditionalRecipientReceivableRefund from .address import Address -from .aggregation_strategy import AggregationStrategy from .batch_change_inventory_request import BatchChangeInventoryRequest from .batch_change_inventory_response import BatchChangeInventoryResponse from .batch_delete_catalog_objects_request import BatchDeleteCatalogObjectsRequest diff --git a/squareconnect/models/aggregation_strategy.py b/squareconnect/models/aggregation_strategy.py deleted file mode 100644 index 6f169a8..0000000 --- a/squareconnect/models/aggregation_strategy.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" -Copyright 2017 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 - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -""" - - -from pprint import pformat -from six import iteritems -import re - - -class AggregationStrategy(object): - """ - NOTE: This class is auto generated by the swagger code generator program. - Do not edit the class manually. - """ - def __init__(self): - """ - AggregationStrategy - a model defined in Swagger - - :param dict swaggerTypes: The key is attribute name - and the value is attribute type. - :param dict attributeMap: The key is attribute name - and the value is json key in definition. - """ - self.swagger_types = { - - } - - self.attribute_map = { - - } - - def to_dict(self): - """ - Returns the model properties as a dict - """ - result = {} - - for attr, _ in iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - - return result - - def to_str(self): - """ - Returns the string representation of the model - """ - return pformat(self.to_dict()) - - def __repr__(self): - """ - For `print` and `pprint` - """ - return self.to_str() - - def __eq__(self, other): - """ - Returns true if both objects are equal - """ - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """ - Returns true if both objects are not equal - """ - return not self == other diff --git a/squareconnect/models/catalog_item.py b/squareconnect/models/catalog_item.py index 766f5e4..5ba0417 100644 --- a/squareconnect/models/catalog_item.py +++ b/squareconnect/models/catalog_item.py @@ -27,7 +27,7 @@ class CatalogItem(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, name=None, description=None, abbreviation=None, label_color=None, available_online=None, available_for_pickup=None, available_electronically=None, category_id=None, tax_ids=None, modifier_list_info=None, image_url=None, variations=None, product_type=None, skip_modifier_screen=None): + def __init__(self, name=None, description=None, abbreviation=None, label_color=None, available_online=None, available_for_pickup=None, available_electronically=None, category_id=None, tax_ids=None, modifier_list_info=None, variations=None, product_type=None, skip_modifier_screen=None): """ CatalogItem - a model defined in Swagger @@ -47,7 +47,6 @@ def __init__(self, name=None, description=None, abbreviation=None, label_color=N 'category_id': 'str', 'tax_ids': 'list[str]', 'modifier_list_info': 'list[CatalogItemModifierListInfo]', - 'image_url': 'str', 'variations': 'list[CatalogObject]', 'product_type': 'str', 'skip_modifier_screen': 'bool' @@ -64,7 +63,6 @@ def __init__(self, name=None, description=None, abbreviation=None, label_color=N 'category_id': 'category_id', 'tax_ids': 'tax_ids', 'modifier_list_info': 'modifier_list_info', - 'image_url': 'image_url', 'variations': 'variations', 'product_type': 'product_type', 'skip_modifier_screen': 'skip_modifier_screen' @@ -80,7 +78,6 @@ def __init__(self, name=None, description=None, abbreviation=None, label_color=N self._category_id = category_id self._tax_ids = tax_ids self._modifier_list_info = modifier_list_info - self._image_url = image_url self._variations = variations self._product_type = product_type self._skip_modifier_screen = skip_modifier_screen @@ -315,29 +312,6 @@ def modifier_list_info(self, modifier_list_info): self._modifier_list_info = modifier_list_info - @property - def image_url(self): - """ - Gets the image_url of this CatalogItem. - __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). - - :return: The image_url of this CatalogItem. - :rtype: str - """ - return self._image_url - - @image_url.setter - def image_url(self, image_url): - """ - Sets the image_url of this CatalogItem. - __Deprecated__. The URL of an image representing this item. Deprecated in favor of `image_id` in [`CatalogObject`](#type-catalogobject). - - :param image_url: The image_url of this CatalogItem. - :type: str - """ - - self._image_url = image_url - @property def variations(self): """ diff --git a/squareconnect/models/catalog_item_variation.py b/squareconnect/models/catalog_item_variation.py index 4d01ea0..5136293 100644 --- a/squareconnect/models/catalog_item_variation.py +++ b/squareconnect/models/catalog_item_variation.py @@ -27,7 +27,7 @@ class CatalogItemVariation(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pricing_type=None, price_money=None, location_overrides=None, track_inventory=None, inventory_alert_type=None, inventory_alert_threshold=None, user_data=None, service_duration=None, catalog_measurement_unit_id=None, measurement_unit_id=None): + def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pricing_type=None, price_money=None, location_overrides=None, track_inventory=None, inventory_alert_type=None, inventory_alert_threshold=None, user_data=None, service_duration=None, measurement_unit_id=None): """ CatalogItemVariation - a model defined in Swagger @@ -50,7 +50,6 @@ def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pr 'inventory_alert_threshold': 'int', 'user_data': 'str', 'service_duration': 'int', - 'catalog_measurement_unit_id': 'str', 'measurement_unit_id': 'str' } @@ -68,7 +67,6 @@ def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pr 'inventory_alert_threshold': 'inventory_alert_threshold', 'user_data': 'user_data', 'service_duration': 'service_duration', - 'catalog_measurement_unit_id': 'catalog_measurement_unit_id', 'measurement_unit_id': 'measurement_unit_id' } @@ -85,7 +83,6 @@ def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pr self._inventory_alert_threshold = inventory_alert_threshold self._user_data = user_data self._service_duration = service_duration - self._catalog_measurement_unit_id = catalog_measurement_unit_id self._measurement_unit_id = measurement_unit_id @property @@ -387,29 +384,6 @@ def service_duration(self, service_duration): self._service_duration = service_duration - @property - def catalog_measurement_unit_id(self): - """ - Gets the catalog_measurement_unit_id of this CatalogItemVariation. - Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. - - :return: The catalog_measurement_unit_id of this CatalogItemVariation. - :rtype: str - """ - return self._catalog_measurement_unit_id - - @catalog_measurement_unit_id.setter - def catalog_measurement_unit_id(self, catalog_measurement_unit_id): - """ - Sets the catalog_measurement_unit_id of this CatalogItemVariation. - Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. - - :param catalog_measurement_unit_id: The catalog_measurement_unit_id of this CatalogItemVariation. - :type: str - """ - - self._catalog_measurement_unit_id = catalog_measurement_unit_id - @property def measurement_unit_id(self): """ diff --git a/squareconnect/models/catalog_object.py b/squareconnect/models/catalog_object.py index cd787b4..d703939 100644 --- a/squareconnect/models/catalog_object.py +++ b/squareconnect/models/catalog_object.py @@ -27,7 +27,7 @@ class CatalogObject(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted=None, catalog_v1_ids=None, present_at_all_locations=None, present_at_location_ids=None, absent_at_location_ids=None, image_id=None, item_data=None, category_data=None, item_variation_data=None, tax_data=None, discount_data=None, modifier_list_data=None, modifier_data=None, image_data=None, measurement_unit_data=None): + def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted=None, catalog_v1_ids=None, present_at_all_locations=None, present_at_location_ids=None, absent_at_location_ids=None, image_id=None, item_data=None, category_data=None, item_variation_data=None, tax_data=None, discount_data=None, modifier_list_data=None, modifier_data=None, time_period_data=None, product_set_data=None, pricing_rule_data=None, image_data=None, measurement_unit_data=None): """ CatalogObject - a model defined in Swagger @@ -54,6 +54,9 @@ def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted 'discount_data': 'CatalogDiscount', 'modifier_list_data': 'CatalogModifierList', 'modifier_data': 'CatalogModifier', + 'time_period_data': 'CatalogTimePeriod', + 'product_set_data': 'CatalogProductSet', + 'pricing_rule_data': 'CatalogPricingRule', 'image_data': 'CatalogImage', 'measurement_unit_data': 'CatalogMeasurementUnit' } @@ -76,6 +79,9 @@ def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted 'discount_data': 'discount_data', 'modifier_list_data': 'modifier_list_data', 'modifier_data': 'modifier_data', + 'time_period_data': 'time_period_data', + 'product_set_data': 'product_set_data', + 'pricing_rule_data': 'pricing_rule_data', 'image_data': 'image_data', 'measurement_unit_data': 'measurement_unit_data' } @@ -97,6 +103,9 @@ def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted self._discount_data = discount_data self._modifier_list_data = modifier_list_data self._modifier_data = modifier_data + self._time_period_data = time_period_data + self._product_set_data = product_set_data + self._pricing_rule_data = pricing_rule_data self._image_data = image_data self._measurement_unit_data = measurement_unit_data @@ -496,6 +505,75 @@ def modifier_data(self, modifier_data): self._modifier_data = modifier_data + @property + def time_period_data(self): + """ + Gets the time_period_data of this CatalogObject. + Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`. + + :return: The time_period_data of this CatalogObject. + :rtype: CatalogTimePeriod + """ + return self._time_period_data + + @time_period_data.setter + def time_period_data(self, time_period_data): + """ + Sets the time_period_data of this CatalogObject. + Structured data for a [CatalogTimePeriod](#type-catalogtimeperiod), set for CatalogObjects of type `TIME_PERIOD`. + + :param time_period_data: The time_period_data of this CatalogObject. + :type: CatalogTimePeriod + """ + + self._time_period_data = time_period_data + + @property + def product_set_data(self): + """ + Gets the product_set_data of this CatalogObject. + Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`. + + :return: The product_set_data of this CatalogObject. + :rtype: CatalogProductSet + """ + return self._product_set_data + + @product_set_data.setter + def product_set_data(self, product_set_data): + """ + Sets the product_set_data of this CatalogObject. + Structured data for a [CatalogProductSet](#type-catalogproductset), set for CatalogObjects of type `PRODUCT_SET`. + + :param product_set_data: The product_set_data of this CatalogObject. + :type: CatalogProductSet + """ + + self._product_set_data = product_set_data + + @property + def pricing_rule_data(self): + """ + Gets the pricing_rule_data of this CatalogObject. + Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`. + + :return: The pricing_rule_data of this CatalogObject. + :rtype: CatalogPricingRule + """ + return self._pricing_rule_data + + @pricing_rule_data.setter + def pricing_rule_data(self, pricing_rule_data): + """ + Sets the pricing_rule_data of this CatalogObject. + Structured data for a [CatalogPricingRule](#type-catalogpricingrule), set for CatalogObjects of type `PRICING_RULE`. + + :param pricing_rule_data: The pricing_rule_data of this CatalogObject. + :type: CatalogPricingRule + """ + + self._pricing_rule_data = pricing_rule_data + @property def image_data(self): """ diff --git a/squareconnect/models/catalog_pricing_rule.py b/squareconnect/models/catalog_pricing_rule.py index 33b69d4..8611cfe 100644 --- a/squareconnect/models/catalog_pricing_rule.py +++ b/squareconnect/models/catalog_pricing_rule.py @@ -27,7 +27,7 @@ class CatalogPricingRule(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, name=None, time_period_ids=None, total_price_money=None, item_price_money=None, discount_id=None, match_products_id=None, apply_products_id=None, stackable=None, exclude_products_id=None, valid_from_date=None, valid_from_local_time=None, valid_until_date=None, valid_until_local_time=None): + def __init__(self, name=None, time_period_ids=None, discount_id=None, match_products_id=None, apply_products_id=None, exclude_products_id=None, valid_from_date=None, valid_from_local_time=None, valid_until_date=None, valid_until_local_time=None): """ CatalogPricingRule - a model defined in Swagger @@ -39,12 +39,9 @@ def __init__(self, name=None, time_period_ids=None, total_price_money=None, item self.swagger_types = { 'name': 'str', 'time_period_ids': 'list[str]', - 'total_price_money': 'Money', - 'item_price_money': 'Money', 'discount_id': 'str', 'match_products_id': 'str', 'apply_products_id': 'str', - 'stackable': 'str', 'exclude_products_id': 'str', 'valid_from_date': 'str', 'valid_from_local_time': 'str', @@ -55,12 +52,9 @@ def __init__(self, name=None, time_period_ids=None, total_price_money=None, item self.attribute_map = { 'name': 'name', 'time_period_ids': 'time_period_ids', - 'total_price_money': 'total_price_money', - 'item_price_money': 'item_price_money', 'discount_id': 'discount_id', 'match_products_id': 'match_products_id', 'apply_products_id': 'apply_products_id', - 'stackable': 'stackable', 'exclude_products_id': 'exclude_products_id', 'valid_from_date': 'valid_from_date', 'valid_from_local_time': 'valid_from_local_time', @@ -70,12 +64,9 @@ def __init__(self, name=None, time_period_ids=None, total_price_money=None, item self._name = name self._time_period_ids = time_period_ids - self._total_price_money = total_price_money - self._item_price_money = item_price_money self._discount_id = discount_id self._match_products_id = match_products_id self._apply_products_id = apply_products_id - self._stackable = stackable self._exclude_products_id = exclude_products_id self._valid_from_date = valid_from_date self._valid_from_local_time = valid_from_local_time @@ -128,52 +119,6 @@ def time_period_ids(self, time_period_ids): self._time_period_ids = time_period_ids - @property - def total_price_money(self): - """ - Gets the total_price_money of this CatalogPricingRule. - The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. - - :return: The total_price_money of this CatalogPricingRule. - :rtype: Money - """ - return self._total_price_money - - @total_price_money.setter - def total_price_money(self, total_price_money): - """ - Sets the total_price_money of this CatalogPricingRule. - The total amount of money to charge for all matched items. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. - - :param total_price_money: The total_price_money of this CatalogPricingRule. - :type: Money - """ - - self._total_price_money = total_price_money - - @property - def item_price_money(self): - """ - Gets the item_price_money of this CatalogPricingRule. - The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. - - :return: The item_price_money of this CatalogPricingRule. - :rtype: Money - """ - return self._item_price_money - - @item_price_money.setter - def item_price_money(self, item_price_money): - """ - Sets the item_price_money of this CatalogPricingRule. - The amount of money to charge for each matched item. Only one of `total_price_money`, `item_price`, or `discount` can be supplied. - - :param item_price_money: The item_price_money of this CatalogPricingRule. - :type: Money - """ - - self._item_price_money = item_price_money - @property def discount_id(self): """ @@ -243,29 +188,6 @@ def apply_products_id(self, apply_products_id): self._apply_products_id = apply_products_id - @property - def stackable(self): - """ - Gets the stackable of this CatalogPricingRule. - Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values - - :return: The stackable of this CatalogPricingRule. - :rtype: str - """ - return self._stackable - - @stackable.setter - def stackable(self, stackable): - """ - Sets the stackable of this CatalogPricingRule. - Describes how the pricing rule can be combined with other pricing rules. See [Stackable](#type-stackable) for all possible values. See [AggregationStrategy](#type-aggregationstrategy) for possible values - - :param stackable: The stackable of this CatalogPricingRule. - :type: str - """ - - self._stackable = stackable - @property def exclude_products_id(self): """ diff --git a/squareconnect/models/inventory_adjustment.py b/squareconnect/models/inventory_adjustment.py index 866cc9f..6dc1a59 100644 --- a/squareconnect/models/inventory_adjustment.py +++ b/squareconnect/models/inventory_adjustment.py @@ -259,7 +259,7 @@ def catalog_object_type(self, catalog_object_type): def quantity(self): """ Gets the quantity of this InventoryAdjustment. - The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :return: The quantity of this InventoryAdjustment. :rtype: str @@ -270,7 +270,7 @@ def quantity(self): def quantity(self, quantity): """ Sets the quantity of this InventoryAdjustment. - The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the adjustment as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :param quantity: The quantity of this InventoryAdjustment. :type: str diff --git a/squareconnect/models/inventory_count.py b/squareconnect/models/inventory_count.py index 84a3a8b..a50d1bf 100644 --- a/squareconnect/models/inventory_count.py +++ b/squareconnect/models/inventory_count.py @@ -157,7 +157,7 @@ def location_id(self, location_id): def quantity(self): """ Gets the quantity of this InventoryCount. - The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :return: The quantity of this InventoryCount. :rtype: str @@ -168,7 +168,7 @@ def quantity(self): def quantity(self, quantity): """ Sets the quantity of this InventoryCount. - The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items in the count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :param quantity: The quantity of this InventoryCount. :type: str diff --git a/squareconnect/models/inventory_physical_count.py b/squareconnect/models/inventory_physical_count.py index 0446d0b..3a5e2fd 100644 --- a/squareconnect/models/inventory_physical_count.py +++ b/squareconnect/models/inventory_physical_count.py @@ -218,7 +218,7 @@ def location_id(self, location_id): def quantity(self): """ Gets the quantity of this InventoryPhysicalCount. - The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :return: The quantity of this InventoryPhysicalCount. :rtype: str @@ -229,7 +229,7 @@ def quantity(self): def quantity(self, quantity): """ Sets the quantity of this InventoryPhysicalCount. - The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the physical count as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :param quantity: The quantity of this InventoryPhysicalCount. :type: str diff --git a/squareconnect/models/inventory_transfer.py b/squareconnect/models/inventory_transfer.py index 8f43a7c..82cf1bf 100644 --- a/squareconnect/models/inventory_transfer.py +++ b/squareconnect/models/inventory_transfer.py @@ -244,7 +244,7 @@ def catalog_object_type(self, catalog_object_type): def quantity(self): """ Gets the quantity of this InventoryTransfer. - The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :return: The quantity of this InventoryTransfer. :rtype: str @@ -255,7 +255,7 @@ def quantity(self): def quantity(self, quantity): """ Sets the quantity of this InventoryTransfer. - The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/more-apis/inventory/overview#decimal-quantities-beta) for more information. + The number of items affected by the transfer as a decimal string. Can support up to 5 digits after the decimal point. _Important_: The Point of Sale app and Dashboard do not currently support decimal quantities. If a Point of Sale app or Dashboard attempts to read a decimal quantity on inventory counts or adjustments, the quantity will be rounded down to the nearest integer. For example, `2.5` will become `2`, and `-2.5` will become `-3`. Read [Decimal Quantities (BETA)](/orders-api/what-it-does#decimal-quantities) for more information. :param quantity: The quantity of this InventoryTransfer. :type: str diff --git a/test/test_aggregation_strategy.py b/test/test_aggregation_strategy.py deleted file mode 100644 index da880bd..0000000 --- a/test/test_aggregation_strategy.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" -Copyright 2017 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 - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -""" - - -from __future__ import absolute_import - -import os -import sys -import unittest - -import squareconnect -from squareconnect.rest import ApiException -from squareconnect.models.aggregation_strategy import AggregationStrategy - - -class TestAggregationStrategy(unittest.TestCase): - """ AggregationStrategy unit test stubs """ - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAggregationStrategy(self): - """ - Test AggregationStrategy - """ - model = squareconnect.models.aggregation_strategy.AggregationStrategy() - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_catalog_api.py b/test/test_catalog_api.py index b7d30b6..9aacc81 100644 --- a/test/test_catalog_api.py +++ b/test/test_catalog_api.py @@ -344,7 +344,6 @@ def test_batch_retrieve_catalog_objects(self): self.assertIsNone(mod_list_info.min_selected_modifiers) self.assertIsNone(mod_list_info.max_selected_modifiers) self.assertIsNone(mod_list_info.enabled) - self.assertIsNone(coffee.item_data.image_url) self.assertEqual(2, len(coffee.item_data.variations))