From e9cf1c838addde0695383bdc72c268f72dcdc49e Mon Sep 17 00:00:00 2001 From: Connect API Specification Generator Date: Wed, 12 Jun 2019 18:25:35 +0000 Subject: [PATCH] Release 2.20190612.0 --- CHANGES.md | 14 +- README.md | 12 + docs/AggregationStrategy.md | 18 + docs/ApplePayApi.md | 2 +- docs/BatchRetrieveCatalogObjectsRequest.md | 2 +- docs/Card.md | 2 +- docs/CatalogApi.md | 2 +- docs/CatalogInfoResponse.md | 1 + docs/CatalogItem.md | 2 +- docs/CatalogItemVariation.md | 4 +- docs/CatalogMeasurementUnit.md | 16 + docs/CatalogObject.md | 1 + docs/CatalogObjectType.md | 3 + docs/CatalogPricingRule.md | 27 ++ docs/CatalogProductSet.md | 21 + docs/CatalogTimePeriod.md | 15 + docs/Coordinates.md | 16 + docs/CreateOrderRequest.md | 2 +- docs/DayOfWeek.md | 2 +- docs/ErrorCode.md | 1 + docs/Location.md | 6 + docs/MeasurementUnit.md | 1 + docs/MeasurementUnitGeneric.md | 16 + docs/OAuthApi.md | 2 +- docs/ObtainTokenResponse.md | 4 +- docs/Order.md | 24 +- docs/OrderLineItem.md | 10 +- docs/OrderLineItemDiscount.md | 2 +- docs/OrderLineItemModifier.md | 2 +- docs/OrderLineItemTax.md | 2 +- docs/OrderReturn.md | 3 +- docs/OrderReturnDiscount.md | 2 +- docs/OrderReturnLineItem.md | 8 +- docs/OrderReturnLineItemModifier.md | 2 +- docs/OrderReturnServiceCharge.md | 26 ++ docs/OrderReturnTax.md | 2 +- docs/OrderRoundingAdjustment.md | 2 +- docs/OrderServiceCharge.md | 25 + docs/OrderServiceChargeCalculationPhase.md | 16 + docs/OrdersApi.md | 2 +- docs/RenewTokenResponse.md | 4 +- docs/RetrieveCatalogObjectRequest.md | 2 +- docs/SearchCatalogObjectsRequest.md | 2 +- docs/StandardUnitDescription.md | 17 + docs/StandardUnitDescriptionGroup.md | 16 + setup.py | 2 +- squareconnect/__init__.py | 12 + squareconnect/api_client.py | 2 +- squareconnect/apis/apple_pay_api.py | 4 +- squareconnect/apis/catalog_api.py | 26 +- squareconnect/apis/checkout_api.py | 2 +- squareconnect/apis/customers_api.py | 16 +- squareconnect/apis/employees_api.py | 4 +- squareconnect/apis/inventory_api.py | 14 +- squareconnect/apis/labor_api.py | 28 +- squareconnect/apis/locations_api.py | 2 +- .../apis/mobile_authorization_api.py | 2 +- squareconnect/apis/o_auth_api.py | 8 +- squareconnect/apis/orders_api.py | 8 +- squareconnect/apis/reporting_api.py | 4 +- squareconnect/apis/transactions_api.py | 14 +- squareconnect/apis/v1_employees_api.py | 32 +- squareconnect/apis/v1_items_api.py | 80 ++-- squareconnect/apis/v1_locations_api.py | 4 +- squareconnect/apis/v1_transactions_api.py | 22 +- squareconnect/configuration.py | 2 +- squareconnect/models/__init__.py | 12 + squareconnect/models/aggregation_strategy.py | 95 ++++ .../batch_retrieve_catalog_objects_request.py | 4 +- squareconnect/models/card.py | 4 +- squareconnect/models/catalog_info_response.py | 32 +- squareconnect/models/catalog_item.py | 4 +- .../models/catalog_item_variation.py | 58 ++- .../models/catalog_measurement_unit.py | 146 ++++++ squareconnect/models/catalog_object.py | 32 +- squareconnect/models/catalog_pricing_rule.py | 432 ++++++++++++++++++ squareconnect/models/catalog_product_set.py | 276 +++++++++++ squareconnect/models/catalog_time_period.py | 120 +++++ squareconnect/models/coordinates.py | 146 ++++++ squareconnect/models/create_order_request.py | 4 +- squareconnect/models/location.py | 162 ++++++- squareconnect/models/measurement_unit.py | 32 +- .../models/measurement_unit_generic.py | 95 ++++ squareconnect/models/money.py | 5 - squareconnect/models/obtain_token_response.py | 8 +- squareconnect/models/order.py | 102 ++++- squareconnect/models/order_line_item.py | 20 +- .../models/order_line_item_discount.py | 4 +- .../models/order_line_item_modifier.py | 4 +- squareconnect/models/order_line_item_tax.py | 4 +- squareconnect/models/order_return.py | 32 +- squareconnect/models/order_return_discount.py | 4 +- .../models/order_return_line_item.py | 16 +- .../models/order_return_line_item_modifier.py | 4 +- .../models/order_return_service_charge.py | 431 +++++++++++++++++ squareconnect/models/order_return_tax.py | 4 +- .../models/order_rounding_adjustment.py | 4 +- squareconnect/models/order_service_charge.py | 400 ++++++++++++++++ .../order_service_charge_calculation_phase.py | 95 ++++ squareconnect/models/renew_token_response.py | 8 +- .../models/retrieve_catalog_object_request.py | 4 +- .../models/search_catalog_objects_request.py | 4 +- .../models/standard_unit_description.py | 172 +++++++ .../models/standard_unit_description_group.py | 146 ++++++ test/test_aggregation_strategy.py | 48 ++ test/test_catalog_measurement_unit.py | 48 ++ test/test_catalog_pricing_rule.py | 48 ++ test/test_catalog_product_set.py | 48 ++ test/test_catalog_time_period.py | 48 ++ test/test_coordinates.py | 48 ++ test/test_measurement_unit_generic.py | 48 ++ test/test_order_return_service_charge.py | 48 ++ test/test_order_service_charge.py | 48 ++ ..._order_service_charge_calculation_phase.py | 48 ++ test/test_standard_unit_description.py | 48 ++ test/test_standard_unit_description_group.py | 48 ++ 116 files changed, 4065 insertions(+), 285 deletions(-) create mode 100644 docs/AggregationStrategy.md create mode 100644 docs/CatalogMeasurementUnit.md create mode 100644 docs/CatalogPricingRule.md create mode 100644 docs/CatalogProductSet.md create mode 100644 docs/CatalogTimePeriod.md create mode 100644 docs/Coordinates.md create mode 100644 docs/MeasurementUnitGeneric.md create mode 100644 docs/OrderReturnServiceCharge.md create mode 100644 docs/OrderServiceCharge.md create mode 100644 docs/OrderServiceChargeCalculationPhase.md create mode 100644 docs/StandardUnitDescription.md create mode 100644 docs/StandardUnitDescriptionGroup.md create mode 100644 squareconnect/models/aggregation_strategy.py create mode 100644 squareconnect/models/catalog_measurement_unit.py create mode 100644 squareconnect/models/catalog_pricing_rule.py create mode 100644 squareconnect/models/catalog_product_set.py create mode 100644 squareconnect/models/catalog_time_period.py create mode 100644 squareconnect/models/coordinates.py create mode 100644 squareconnect/models/measurement_unit_generic.py create mode 100644 squareconnect/models/order_return_service_charge.py create mode 100644 squareconnect/models/order_service_charge.py create mode 100644 squareconnect/models/order_service_charge_calculation_phase.py create mode 100644 squareconnect/models/standard_unit_description.py create mode 100644 squareconnect/models/standard_unit_description_group.py create mode 100644 test/test_aggregation_strategy.py create mode 100644 test/test_catalog_measurement_unit.py create mode 100644 test/test_catalog_pricing_rule.py create mode 100644 test/test_catalog_product_set.py create mode 100644 test/test_catalog_time_period.py create mode 100644 test/test_coordinates.py create mode 100644 test/test_measurement_unit_generic.py create mode 100644 test/test_order_return_service_charge.py create mode 100644 test/test_order_service_charge.py create mode 100644 test/test_order_service_charge_calculation_phase.py create mode 100644 test/test_standard_unit_description.py create mode 100644 test/test_standard_unit_description_group.py diff --git a/CHANGES.md b/CHANGES.md index 3b6f749..2be1772 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,13 @@ # Change Log +## Version 2.20190612.0 (2019-06-12) + +* **BETA releases**: + * Orders API: supports service charges with a new field and datatype. + * Catalog API: supports measurement unites for item variation quantities with a new field and datatype. +* **New functionality**: `Order` entities — now include a `source` field that contains details on where the order originated. +* **Improved functionality**: ListLocations — Expanded business information available through the Locations API, including business hours, contact email, social media handles, and longitude/latitude for physical locations. + ## Version 2.20190508.0 (2019-05-08) ## Details @@ -62,15 +70,15 @@ ## New API: Labor API The Labor API now includes functionality -that gives a Square account the ability to track and retrieve employee labor hours -including multiple hourly wage rates per employee, work shift break tracking, and +that gives a Square account the ability to track and retrieve employee labor hours +including multiple hourly wage rates per employee, work shift break tracking, and standardized break templates. See the Connect v2 Technical Reference. ## New API: Employees API -The Employees API includes the ability to list employees for a Square +The Employees API includes the ability to list employees for a Square account and retrieve a single employee by ID. See the Connect v2 Technical Reference. diff --git a/README.md b/README.md index dfc49ae..f3a53de 100644 --- a/README.md +++ b/README.md @@ -265,11 +265,14 @@ Class | Method | HTTP request - [CatalogItem](docs/CatalogItem.md) - [CatalogItemModifierListInfo](docs/CatalogItemModifierListInfo.md) - [CatalogItemVariation](docs/CatalogItemVariation.md) + - [CatalogMeasurementUnit](docs/CatalogMeasurementUnit.md) - [CatalogModifier](docs/CatalogModifier.md) - [CatalogModifierList](docs/CatalogModifierList.md) - [CatalogModifierOverride](docs/CatalogModifierOverride.md) - [CatalogObject](docs/CatalogObject.md) - [CatalogObjectBatch](docs/CatalogObjectBatch.md) + - [CatalogPricingRule](docs/CatalogPricingRule.md) + - [CatalogProductSet](docs/CatalogProductSet.md) - [CatalogQuery](docs/CatalogQuery.md) - [CatalogQueryExact](docs/CatalogQueryExact.md) - [CatalogQueryItemsForModifierList](docs/CatalogQueryItemsForModifierList.md) @@ -279,11 +282,13 @@ Class | Method | HTTP request - [CatalogQuerySortedAttribute](docs/CatalogQuerySortedAttribute.md) - [CatalogQueryText](docs/CatalogQueryText.md) - [CatalogTax](docs/CatalogTax.md) + - [CatalogTimePeriod](docs/CatalogTimePeriod.md) - [CatalogV1Id](docs/CatalogV1Id.md) - [ChargeRequest](docs/ChargeRequest.md) - [ChargeRequestAdditionalRecipient](docs/ChargeRequestAdditionalRecipient.md) - [ChargeResponse](docs/ChargeResponse.md) - [Checkout](docs/Checkout.md) + - [Coordinates](docs/Coordinates.md) - [CreateBreakTypeRequest](docs/CreateBreakTypeRequest.md) - [CreateBreakTypeResponse](docs/CreateBreakTypeResponse.md) - [CreateCheckoutRequest](docs/CreateCheckoutRequest.md) @@ -382,8 +387,10 @@ Class | Method | HTTP request - [OrderReturnDiscount](docs/OrderReturnDiscount.md) - [OrderReturnLineItem](docs/OrderReturnLineItem.md) - [OrderReturnLineItemModifier](docs/OrderReturnLineItemModifier.md) + - [OrderReturnServiceCharge](docs/OrderReturnServiceCharge.md) - [OrderReturnTax](docs/OrderReturnTax.md) - [OrderRoundingAdjustment](docs/OrderRoundingAdjustment.md) + - [OrderServiceCharge](docs/OrderServiceCharge.md) - [OrderSource](docs/OrderSource.md) - [Refund](docs/Refund.md) - [RegisterDomainRequest](docs/RegisterDomainRequest.md) @@ -431,6 +438,8 @@ Class | Method | HTTP request - [ShiftWage](docs/ShiftWage.md) - [ShiftWorkday](docs/ShiftWorkday.md) - [SourceApplication](docs/SourceApplication.md) + - [StandardUnitDescription](docs/StandardUnitDescription.md) + - [StandardUnitDescriptionGroup](docs/StandardUnitDescriptionGroup.md) - [Tender](docs/Tender.md) - [TenderCardDetails](docs/TenderCardDetails.md) - [TenderCashDetails](docs/TenderCashDetails.md) @@ -578,6 +587,7 @@ Class | Method | HTTP request ## Documentation For Enums + - [AggregationStrategy](docs/AggregationStrategy.md) - [CardBrand](docs/CardBrand.md) - [CatalogDiscountType](docs/CatalogDiscountType.md) - [CatalogItemProductType](docs/CatalogItemProductType.md) @@ -600,6 +610,7 @@ Class | Method | HTTP request - [LocationStatus](docs/LocationStatus.md) - [LocationType](docs/LocationType.md) - [MeasurementUnitArea](docs/MeasurementUnitArea.md) + - [MeasurementUnitGeneric](docs/MeasurementUnitGeneric.md) - [MeasurementUnitLength](docs/MeasurementUnitLength.md) - [MeasurementUnitVolume](docs/MeasurementUnitVolume.md) - [MeasurementUnitWeight](docs/MeasurementUnitWeight.md) @@ -610,6 +621,7 @@ Class | Method | HTTP request - [OrderLineItemDiscountType](docs/OrderLineItemDiscountType.md) - [OrderLineItemTaxScope](docs/OrderLineItemTaxScope.md) - [OrderLineItemTaxType](docs/OrderLineItemTaxType.md) + - [OrderServiceChargeCalculationPhase](docs/OrderServiceChargeCalculationPhase.md) - [OrderState](docs/OrderState.md) - [Product](docs/Product.md) - [RefundStatus](docs/RefundStatus.md) diff --git a/docs/AggregationStrategy.md b/docs/AggregationStrategy.md new file mode 100644 index 0000000..f77af9b --- /dev/null +++ b/docs/AggregationStrategy.md @@ -0,0 +1,18 @@ +# 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/ApplePayApi.md b/docs/ApplePayApi.md index e165df4..b413710 100644 --- a/docs/ApplePayApi.md +++ b/docs/ApplePayApi.md @@ -14,7 +14,7 @@ Method | HTTP request ### Description -Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payments/sqpaymentform/overview) guide. +Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide. ### Parameters diff --git a/docs/BatchRetrieveCatalogObjectsRequest.md b/docs/BatchRetrieveCatalogObjectsRequest.md index 83096dc..cdeaad5 100644 --- a/docs/BatchRetrieveCatalogObjectsRequest.md +++ b/docs/BatchRetrieveCatalogObjectsRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object_ids** | **list[str]** | The IDs of the [CatalogObject](#type-catalogobject)s to be retrieved. | -**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [optional] +**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. | [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/Card.md b/docs/Card.md index 19d593a..12620c9 100644 --- a/docs/Card.md +++ b/docs/Card.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **exp_year** | **int** | The four-digit year of the card's expiration date. | [optional] **cardholder_name** | **str** | The name of the cardholder. | [optional] **billing_address** | [**Address**](Address.md) | The billing address for this card. | [optional] -**fingerprint** | **str** | __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. | [optional] +**fingerprint** | **str** | A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. | [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/CatalogApi.md b/docs/CatalogApi.md index 2b1e6fe..aa13317 100644 --- a/docs/CatalogApi.md +++ b/docs/CatalogApi.md @@ -136,7 +136,7 @@ Assign your **Access Token** from developer portal to the authorization paramete ### Description -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`. +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`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. ### Parameters diff --git a/docs/CatalogInfoResponse.md b/docs/CatalogInfoResponse.md index 3f343f8..467bd10 100644 --- a/docs/CatalogInfoResponse.md +++ b/docs/CatalogInfoResponse.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **errors** | [**list[Error]**](Error.md) | The set of [Error](#type-error)s encountered. | [optional] **limits** | [**CatalogInfoResponseLimits**](CatalogInfoResponseLimits.md) | | [optional] +**standard_unit_description_group** | [**StandardUnitDescriptionGroup**](StandardUnitDescriptionGroup.md) | Names and abbreviations for standard units. | [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/CatalogItem.md b/docs/CatalogItem.md index 13b8e7c..e19e8bf 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **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. | [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 167291c..688d558 100644 --- a/docs/CatalogItemVariation.md +++ b/docs/CatalogItemVariation.md @@ -3,7 +3,7 @@ ### Description -An item variation (i.e., product) in the Catalog object model. +An item variation (i.e., product) in the Catalog object model. Each item may have a maximum of 250 item variations. ## Properties Name | Type | Description | Notes @@ -21,6 +21,8 @@ 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/CatalogMeasurementUnit.md b/docs/CatalogMeasurementUnit.md new file mode 100644 index 0000000..3cb8f2a --- /dev/null +++ b/docs/CatalogMeasurementUnit.md @@ -0,0 +1,16 @@ +# CatalogMeasurementUnit +> squareconnect.models.catalog_measurement_unit + +### Description + +Represents the unit used to measure a [CatalogItemVariation](#type-catalogitemvariation) and specifies the precision for decimal quantities. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**measurement_unit** | [**MeasurementUnit**](MeasurementUnit.md) | Indicates the unit used to measure the quantity of a catalog item variation. | [optional] +**precision** | **int** | Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 | [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 361c007..30d226e 100644 --- a/docs/CatalogObject.md +++ b/docs/CatalogObject.md @@ -26,6 +26,7 @@ Name | Type | Description | Notes **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] **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] [[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/CatalogObjectType.md b/docs/CatalogObjectType.md index e16b694..d96bdb7 100644 --- a/docs/CatalogObjectType.md +++ b/docs/CatalogObjectType.md @@ -16,6 +16,9 @@ Name | Type **DISCOUNT** | string **MODIFIER_LIST** | string **MODIFIER** | string +**PRICING_RULE** | string +**PRODUCT_SET** | string +**TIME_PERIOD** | 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/CatalogPricingRule.md b/docs/CatalogPricingRule.md new file mode 100644 index 0000000..f5859ce --- /dev/null +++ b/docs/CatalogPricingRule.md @@ -0,0 +1,27 @@ +# CatalogPricingRule +> squareconnect.models.catalog_pricing_rule + +### Description + +Defines how prices are modified or set for items that match the pricing rule during the active time period. + +## Properties +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] +**valid_until_date** | **str** | Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). | [optional] +**valid_until_local_time** | **str** | Represents the local time at which the pricing rule will become inactive. 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] + +[[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/CatalogProductSet.md b/docs/CatalogProductSet.md new file mode 100644 index 0000000..b15f173 --- /dev/null +++ b/docs/CatalogProductSet.md @@ -0,0 +1,21 @@ +# CatalogProductSet +> squareconnect.models.catalog_product_set + +### Description + +Represents a collection of catalog objects for the purpose of applying a [PricingRule](#type-pricingrule). Including a catalog object will include all of its subtypes. For example, including a category in a product set will include all of its items and associated item variations in the product set. Including an item in a product set will also include its item variations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". | [optional] +**product_ids_any** | **list[str]** | Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional] +**product_ids_all** | **list[str]** | Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. | [optional] +**quantity_exact** | **int** | If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. | [optional] +**quantity_min** | **int** | If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. | [optional] +**quantity_max** | **int** | If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. | [optional] +**all_products** | **bool** | If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. | [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/CatalogTimePeriod.md b/docs/CatalogTimePeriod.md new file mode 100644 index 0000000..70f374a --- /dev/null +++ b/docs/CatalogTimePeriod.md @@ -0,0 +1,15 @@ +# CatalogTimePeriod +> squareconnect.models.catalog_time_period + +### Description + +Represents a time period - either a single period or a repeating period. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event** | **str** | An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. | [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/Coordinates.md b/docs/Coordinates.md new file mode 100644 index 0000000..1903c46 --- /dev/null +++ b/docs/Coordinates.md @@ -0,0 +1,16 @@ +# Coordinates +> squareconnect.models.coordinates + +### Description + +Latitude and longitude coordinates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latitude** | **float** | The coordinate's latitude expressed in degrees. | [optional] +**longitude** | **float** | The coordinate's longitude expressed in degrees. | [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/CreateOrderRequest.md b/docs/CreateOrderRequest.md index 7e69aed..f5f283e 100644 --- a/docs/CreateOrderRequest.md +++ b/docs/CreateOrderRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **order** | [**Order**](Order.md) | The order to create. If this field is set, then the only other top-level field that can be set is the idempotency_key. | [optional] **idempotency_key** | **str** | A value you specify that uniquely identifies this order among orders you've created. If you're unsure whether a particular order was created successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate orders. See [Idempotency](/basics/api101/idempotency) for more information. | [optional] -**reference_id** | **str** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape. | [optional] +**reference_id** | **str** | __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. | [optional] **line_items** | [**list[CreateOrderRequestLineItem]**](CreateOrderRequestLineItem.md) | __Deprecated__: Please set the line_items on the nested [order](#type-order) field instead. The line items to associate with this order. Each line item represents a different product to include in a purchase. | [optional] **taxes** | [**list[CreateOrderRequestTax]**](CreateOrderRequestTax.md) | __Deprecated__: Please set the taxes on the nested [order](#type-order) field instead. The taxes to include on the order. | [optional] **discounts** | [**list[CreateOrderRequestDiscount]**](CreateOrderRequestDiscount.md) | __Deprecated__: Please set the discounts on the nested [order](#type-order) field instead. The discounts to include on the order. | [optional] diff --git a/docs/DayOfWeek.md b/docs/DayOfWeek.md index d273afb..2f4c07e 100644 --- a/docs/DayOfWeek.md +++ b/docs/DayOfWeek.md @@ -3,7 +3,7 @@ ### Description - Indicates the specific day of the week. +Indicates the specific day of the week. ## Properties Name | Type diff --git a/docs/ErrorCode.md b/docs/ErrorCode.md index e91dc56..68baed9 100644 --- a/docs/ErrorCode.md +++ b/docs/ErrorCode.md @@ -53,6 +53,7 @@ Name | Type **ONE_INSTRUMENT_EXPECTED** | string **NO_FIELDS_SET** | string **DEPRECATED_FIELD_SET** | string +**RETIRED_FIELD_SET** | string **CARD_EXPIRED** | string **INVALID_EXPIRATION** | string **INVALID_EXPIRATION_YEAR** | string diff --git a/docs/Location.md b/docs/Location.md index ea41cc4..9909a4f 100644 --- a/docs/Location.md +++ b/docs/Location.md @@ -24,6 +24,12 @@ Name | Type | Description | Notes **type** | **str** | The location's type, as set by the account owner in the Square dashboard. Typically used to indicate whether or not the location object represents a physical space like a building or mall space. See [LocationType](#type-locationtype) for possible values | [optional] **website_url** | **str** | The location's website, as set by the account owner in the Square dashboard. Default: none; only exists if explicitly set. | [optional] **business_hours** | [**BusinessHours**](BusinessHours.md) | The hours of operation for a business location. Default: none; only exists if explicitly set. | [optional] +**business_email** | **str** | The email of the location. | [optional] +**description** | **str** | The business description of the location. | [optional] +**twitter_username** | **str** | The Twitter username of the location without the ' | [optional] +**instagram_username** | **str** | The Instagram username of the location without the ' | [optional] +**facebook_url** | **str** | The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. | [optional] +**coordinates** | [**Coordinates**](Coordinates.md) | The physical coordinates (latitude and longitude) of the location. | [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/MeasurementUnit.md b/docs/MeasurementUnit.md index 0f97023..40a48ac 100644 --- a/docs/MeasurementUnit.md +++ b/docs/MeasurementUnit.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **length_unit** | **str** | Represents a standard length unit. See [MeasurementUnitLength](#type-measurementunitlength) for possible values | [optional] **volume_unit** | **str** | Represents a standard volume unit. See [MeasurementUnitVolume](#type-measurementunitvolume) for possible values | [optional] **weight_unit** | **str** | Represents a standard unit of weight or mass. See [MeasurementUnitWeight](#type-measurementunitweight) for possible values | [optional] +**generic_unit** | **str** | Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values | [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/MeasurementUnitGeneric.md b/docs/MeasurementUnitGeneric.md new file mode 100644 index 0000000..139c2ab --- /dev/null +++ b/docs/MeasurementUnitGeneric.md @@ -0,0 +1,16 @@ +# MeasurementUnitGeneric + + +### Description + +A custom unit of measurement defined by the user. + +## Properties +Name | Type +------------ | ------------- +**INVALID_GENERIC_UNIT** | string +**UNIT** | 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/OAuthApi.md b/docs/OAuthApi.md index 41dfcca..62ff9d5 100644 --- a/docs/OAuthApi.md +++ b/docs/OAuthApi.md @@ -16,7 +16,7 @@ Method | HTTP request ### Description -Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. +Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. ### Parameters diff --git a/docs/ObtainTokenResponse.md b/docs/ObtainTokenResponse.md index 8dcb79f..5663292 100644 --- a/docs/ObtainTokenResponse.md +++ b/docs/ObtainTokenResponse.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **token_type** | **str** | This value is always _bearer_. | [optional] **expires_at** | **str** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional] **merchant_id** | **str** | The ID of the authorizing merchant's business. | [optional] -**subscription_id** | **str** | __Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] -**plan_id** | **str** | The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**subscription_id** | **str** | __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**plan_id** | **str** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] **id_token** | **str** | Then OpenID token belonging to this this person. Only present if the OPENID scope is included in the authorize request. | [optional] **refresh_token** | **str** | A refresh token. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). | [optional] diff --git a/docs/Order.md b/docs/Order.md index ebaf553..3e7ed51 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -8,7 +8,7 @@ Contains all information related to a single order to process with Square, inclu ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint. | [optional] +**id** | **str** | The order's unique ID. This field is read-only. | [optional] **location_id** | **str** | The ID of the merchant location this order is associated with. | **reference_id** | **str** | A client specified identifier to associate an entity in another system with this order. | [optional] **source** | [**OrderSource**](OrderSource.md) | The origination details of the order. | [optional] @@ -16,20 +16,22 @@ Name | Type | Description | Notes **line_items** | [**list[OrderLineItem]**](OrderLineItem.md) | The line items included in the order. | [optional] **taxes** | [**list[OrderLineItemTax]**](OrderLineItemTax.md) | A list of taxes applied to this order. On read or retrieve, this list includes both order-level and item-level taxes. When creating an Order, set your order-level taxes in this list. | [optional] **discounts** | [**list[OrderLineItemDiscount]**](OrderLineItemDiscount.md) | A list of discounts applied to this order. On read or retrieve, this list includes both order-level and item-level discounts. When creating an Order, set your order-level discounts in this list. | [optional] +**service_charges** | [**list[OrderServiceCharge]**](OrderServiceCharge.md) | A list of service charges applied to the order. | [optional] **fulfillments** | [**list[OrderFulfillment]**](OrderFulfillment.md) | Details on order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API may contain multiple fulfillments. | [optional] -**returns** | [**list[OrderReturn]**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. | [optional] -**return_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. | [optional] -**net_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). | [optional] -**rounding_adjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional] +**returns** | [**list[OrderReturn]**](OrderReturn.md) | Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only. | [optional] +**return_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Rollup of returned money amounts. This field is read-only. | [optional] +**net_amounts** | [**OrderMoneyAmounts**](OrderMoneyAmounts.md) | Net money amounts (sale money - return money). This field is read-only. | [optional] +**rounding_adjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only. | [optional] **tenders** | [**list[Tender]**](Tender.md) | The Tenders which were used to pay for the Order. This field is read-only. | [optional] **refunds** | [**list[Refund]**](Refund.md) | The Refunds that are part of this Order. This field is read-only. | [optional] -**created_at** | **str** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] -**updated_at** | **str** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] -**closed_at** | **str** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". | [optional] +**created_at** | **str** | Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] +**updated_at** | **str** | Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] +**closed_at** | **str** | Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. | [optional] **state** | **str** | The current state of the order. `OPEN`,`COMPLETED`,`CANCELED` See [OrderState](#type-orderstate) for possible values | [optional] -**total_money** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional] -**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the order. | [optional] -**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the order. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to collect for the order. This field is read-only. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the order. This field is read-only. | [optional] +**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the order. This field is read-only. | [optional] +**total_service_charge_money** | [**Money**](Money.md) | The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only. | [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/OrderLineItem.md b/docs/OrderLineItem.md index 55d72e5..5a81ce4 100644 --- a/docs/OrderLineItem.md +++ b/docs/OrderLineItem.md @@ -8,7 +8,7 @@ Represents a line item in an order. Each line item describes a different product ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The line item's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the line item only within this order. This field is read-only. | [optional] **name** | **str** | The name of the line item. | [optional] **quantity** | **str** | The quantity purchased, formatted as a decimal number. For example: `\"3\"`. Line items with a `quantity_unit` can have non-integer quantities. For example: `\"1.70000\"`. Orders Hub and older versions of Connect do not support non-integer quantities. See [Decimal quantities with Orders hub and older versions of Connect](/more-apis/orders/overview#decimal-quantities). | **quantity_unit** | [**OrderQuantityUnit**](OrderQuantityUnit.md) | The unit and precision that this line item's quantity is measured in. | [optional] @@ -20,10 +20,10 @@ Name | Type | Description | Notes **discounts** | [**list[OrderLineItemDiscount]**](OrderLineItemDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any order-level discounts apportioned to this item. When creating an Order, set your item-level discounts in this list. | [optional] **base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] **variation_total_price_money** | [**Money**](Money.md) | The total price of all item variations sold in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional] -**gross_sales_money** | [**Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. | [optional] -**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. | [optional] -**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. | [optional] -**total_money** | [**Money**](Money.md) | The total amount of money to collect for this line item. | [optional] +**gross_sales_money** | [**Money**](Money.md) | The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to collect for the line item. This field is read-only. | [optional] +**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to collect for the line item. This field is read-only. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to collect for this line item. This field is read-only. | [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/OrderLineItemDiscount.md b/docs/OrderLineItemDiscount.md index bf1de71..7a5b8ec 100644 --- a/docs/OrderLineItemDiscount.md +++ b/docs/OrderLineItemDiscount.md @@ -8,7 +8,7 @@ Represents a discount that applies to one or more line items in an order. Fixed ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The discount's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the discount only within this order. This field is read-only. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] **name** | **str** | The discount's name. | [optional] **type** | **str** | The type of the discount. If it is created by API, it would be either `FIXED_PERCENTAGE` or `FIXED_AMOUNT`. VARIABLE_* is not supported in API because the order is created at the time of sale and either percentage or amount has to be specified. See [OrderLineItemDiscountType](#type-orderlineitemdiscounttype) for possible values | [optional] diff --git a/docs/OrderLineItemModifier.md b/docs/OrderLineItemModifier.md index 49735e8..fd7fd2f 100644 --- a/docs/OrderLineItemModifier.md +++ b/docs/OrderLineItemModifier.md @@ -8,7 +8,7 @@ A [CatalogModifier](#type-catalogmodifier). ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The modifier's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the modifier only within this order. This field is read-only. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] **name** | **str** | The name of the item modifier. | [optional] **base_price_money** | [**Money**](Money.md) | The base price for the modifier. `base_price_money` is required for ad hoc modifiers. If both `catalog_object_id` and `base_price_money` are set, `base_price_money` will override the predefined [CatalogModifier](#type-catalogmodifier) price. | [optional] diff --git a/docs/OrderLineItemTax.md b/docs/OrderLineItemTax.md index 7a61e4f..77a847e 100644 --- a/docs/OrderLineItemTax.md +++ b/docs/OrderLineItemTax.md @@ -8,7 +8,7 @@ Represents a tax that applies to one or more line items in an order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The tax's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the tax only within this order. This field is read-only. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] **name** | **str** | The tax's name. | [optional] **type** | **str** | Indicates the calculation method used to apply the tax. See [OrderLineItemTaxType](#type-orderlineitemtaxtype) for possible values | [optional] diff --git a/docs/OrderReturn.md b/docs/OrderReturn.md index 614da05..4eb8392 100644 --- a/docs/OrderReturn.md +++ b/docs/OrderReturn.md @@ -8,9 +8,10 @@ The set of line items, service charges, taxes, discounts, tips, etc. being retur ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The return's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the return only within this order. This field is read-only. | [optional] **source_order_id** | **str** | Order which contains the original sale of these returned line items. This will be unset for unlinked returns. | [optional] **return_line_items** | [**list[OrderReturnLineItem]**](OrderReturnLineItem.md) | Collection of line items which are being returned. | [optional] +**return_service_charges** | [**list[OrderReturnServiceCharge]**](OrderReturnServiceCharge.md) | Collection of service charges which are being returned. This field is read-only. | [optional] **return_taxes** | [**list[OrderReturnTax]**](OrderReturnTax.md) | Collection of taxes which are being returned. | [optional] **return_discounts** | [**list[OrderReturnDiscount]**](OrderReturnDiscount.md) | Collection of discounts which are being returned. | [optional] **rounding_adjustment** | [**OrderRoundingAdjustment**](OrderRoundingAdjustment.md) | A positive or negative rounding adjustment to the total value being returned. Commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. | [optional] diff --git a/docs/OrderReturnDiscount.md b/docs/OrderReturnDiscount.md index 0eab0df..fbfe1a5 100644 --- a/docs/OrderReturnDiscount.md +++ b/docs/OrderReturnDiscount.md @@ -8,7 +8,7 @@ The line item discount being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The return discount's Unique identifier, unique only within this order. | [optional] +**uid** | **str** | Unique ID that identifies the return discount only within this order. This field is read-only. | [optional] **source_discount_uid** | **str** | `uid` of the Discount from the Order which contains the original application of this discount. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogDiscount](#type-catalogdiscount). | [optional] **name** | **str** | The discount's name. | [optional] diff --git a/docs/OrderReturnLineItem.md b/docs/OrderReturnLineItem.md index 9898a4b..347da39 100644 --- a/docs/OrderReturnLineItem.md +++ b/docs/OrderReturnLineItem.md @@ -21,10 +21,10 @@ Name | Type | Description | Notes **return_discounts** | [**list[OrderReturnDiscount]**](OrderReturnDiscount.md) | A list of discounts applied to this line item. On read or retrieve, this list includes both item-level discounts and any return-level discounts apportioned to this item. | [optional] **base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item. | [optional] **variation_total_price_money** | [**Money**](Money.md) | The total price of all item variations returned in this line item. Calculated as `base_price_money` multiplied by `quantity`. Does not include modifiers. | [optional] -**gross_return_money** | [**Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. | [optional] -**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to return for the line item. | [optional] -**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to return for the line item. | [optional] -**total_money** | [**Money**](Money.md) | The total amount of money to return for this line item. | [optional] +**gross_return_money** | [**Money**](Money.md) | The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total tax amount of money to return for the line item. This field is read-only. | [optional] +**total_discount_money** | [**Money**](Money.md) | The total discount amount of money to return for the line item. This field is read-only. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to return for this line item. This field is read-only. | [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/OrderReturnLineItemModifier.md b/docs/OrderReturnLineItemModifier.md index d2c29df..ead776b 100644 --- a/docs/OrderReturnLineItemModifier.md +++ b/docs/OrderReturnLineItemModifier.md @@ -8,7 +8,7 @@ A line item modifier being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The return modifier's Unique identifier, unique only within this order | [optional] +**uid** | **str** | Unique ID that identifies the return modifier only within this order. This field is read-only. | [optional] **source_modifier_uid** | **str** | `uid` of the Modifier from the LineItem from the Order which contains the original sale of this line item modifier. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogModifier](#type-catalogmodifier). | [optional] **name** | **str** | The name of the item modifier. | [optional] diff --git a/docs/OrderReturnServiceCharge.md b/docs/OrderReturnServiceCharge.md new file mode 100644 index 0000000..0f430a6 --- /dev/null +++ b/docs/OrderReturnServiceCharge.md @@ -0,0 +1,26 @@ +# OrderReturnServiceCharge +> squareconnect.models.order_return_service_charge + +### Description + +The service charge applied to the original order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | Unique ID that identifies the return service charge only within this order. This field is read-only. | [optional] +**source_service_charge_uid** | **str** | `uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns. | [optional] +**name** | **str** | The name of the service charge. | [optional] +**catalog_object_id** | **str** | The ID referencing the service charge [CatalogObject](#type-catalogobject) | [optional] +**percentage** | **str** | The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set. | [optional] +**amount_money** | [**Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set. | [optional] +**applied_money** | [**Money**](Money.md) | The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. This field is read-only. | [optional] +**calculation_phase** | **str** | The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] +**taxable** | **bool** | Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] +**return_taxes** | [**list[OrderReturnTax]**](OrderReturnTax.md) | The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable. | [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/OrderReturnTax.md b/docs/OrderReturnTax.md index 055d28e..859faff 100644 --- a/docs/OrderReturnTax.md +++ b/docs/OrderReturnTax.md @@ -8,7 +8,7 @@ The line item tax being returned. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The return tax's Unique identifier, unique only within this order. | [optional] +**uid** | **str** | Unique ID that identifies the return tax only within this order. This field is read-only. | [optional] **source_tax_uid** | **str** | `uid` of the Tax from the Order which contains the original charge of this tax. | [optional] **catalog_object_id** | **str** | The catalog object id referencing [CatalogTax](#type-catalogtax). | [optional] **name** | **str** | The tax's name. | [optional] diff --git a/docs/OrderRoundingAdjustment.md b/docs/OrderRoundingAdjustment.md index 2b40eb4..31e1c53 100644 --- a/docs/OrderRoundingAdjustment.md +++ b/docs/OrderRoundingAdjustment.md @@ -8,7 +8,7 @@ A rounding adjustment of the money being returned. Commonly used to apply Cash R ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**uid** | **str** | The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. | [optional] +**uid** | **str** | Unique ID that identifies the rounding adjustment only within this order. This field is read-only. | [optional] **name** | **str** | The name of the rounding adjustment from the original sale Order. | [optional] **amount_money** | [**Money**](Money.md) | Actual rounding adjustment amount. | [optional] diff --git a/docs/OrderServiceCharge.md b/docs/OrderServiceCharge.md new file mode 100644 index 0000000..1ae7dd5 --- /dev/null +++ b/docs/OrderServiceCharge.md @@ -0,0 +1,25 @@ +# OrderServiceCharge +> squareconnect.models.order_service_charge + +### Description + +Represents a service charge applied to an order. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | Unique ID that identifies the service charge only within this order. This field is read-only. | [optional] +**name** | **str** | The name of the service charge. | [optional] +**catalog_object_id** | **str** | The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). | [optional] +**percentage** | **str** | The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set. | [optional] +**amount_money** | [**Money**](Money.md) | The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. | [optional] +**applied_money** | [**Money**](Money.md) | The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. | [optional] +**total_money** | [**Money**](Money.md) | The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. | [optional] +**total_tax_money** | [**Money**](Money.md) | The total amount of tax money to collect for the service charge. This field is read-only. | [optional] +**calculation_phase** | **str** | The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values | [optional] +**taxable** | **bool** | Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. | [optional] +**taxes** | [**list[OrderLineItemTax]**](OrderLineItemTax.md) | Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. | [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/OrderServiceChargeCalculationPhase.md b/docs/OrderServiceChargeCalculationPhase.md new file mode 100644 index 0000000..8597c51 --- /dev/null +++ b/docs/OrderServiceChargeCalculationPhase.md @@ -0,0 +1,16 @@ +# OrderServiceChargeCalculationPhase + + +### Description + +Represents a phase in the process of calculating order totals. Service charges will be applied after the phase indicated. [Read more about how order totals are calculated.](/orders-api/how-it-works#how-totals-are-calculated) + +## Properties +Name | Type +------------ | ------------- +**SUBTOTAL_PHASE** | string +**TOTAL_PHASE** | 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/OrdersApi.md b/docs/OrdersApi.md index 5708a17..af2b7e6 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -64,7 +64,7 @@ Assign your **Access Token** from developer portal to the authorization paramete ### Description -Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. By default, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. +Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. ### Parameters diff --git a/docs/RenewTokenResponse.md b/docs/RenewTokenResponse.md index ec12d11..ea573d6 100644 --- a/docs/RenewTokenResponse.md +++ b/docs/RenewTokenResponse.md @@ -12,8 +12,8 @@ Name | Type | Description | Notes **token_type** | **str** | This value is always _bearer_. | [optional] **expires_at** | **str** | The date when access_token expires, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | [optional] **merchant_id** | **str** | The ID of the authorizing merchant's business. | [optional] -**subscription_id** | **str** | The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization. | [optional] -**plan_id** | **str** | The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [optional] +**subscription_id** | **str** | __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. | [optional] +**plan_id** | **str** | __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. | [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/RetrieveCatalogObjectRequest.md b/docs/RetrieveCatalogObjectRequest.md index bcc9b68..434e2f0 100644 --- a/docs/RetrieveCatalogObjectRequest.md +++ b/docs/RetrieveCatalogObjectRequest.md @@ -8,7 +8,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [optional] +**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` | [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/SearchCatalogObjectsRequest.md b/docs/SearchCatalogObjectsRequest.md index 9a9a1bd..699d778 100644 --- a/docs/SearchCatalogObjectsRequest.md +++ b/docs/SearchCatalogObjectsRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **cursor** | **str** | The pagination cursor returned in the previous response. Leave unset for an initial request. See [Pagination](/basics/api101/pagination) for more information. | [optional] **object_types** | **list[str]** | The desired set of object types to appear in the search results. The legal values are taken from the [CatalogObjectType](#type-catalogobjecttype) enumeration, namely `\"ITEM\"`, `\"ITEM_VARIATION\"`, `\"CATEGORY\"`, `\"DISCOUNT\"`, `\"TAX\"`, `\"MODIFIER\"`, or `\"MODIFIER_LIST\"`. See [CatalogObjectType](#type-catalogobjecttype) for possible values | [optional] **include_deleted_objects** | **bool** | If `true`, deleted objects will be included in the results. Deleted objects will have their `is_deleted` field set to `true`. | [optional] -**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional] +**include_related_objects** | **bool** | If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. | [optional] **begin_time** | **str** | Return objects modified after this [timestamp](#workingwithdates), in RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". The timestamp is exclusive - objects with a timestamp equal to `begin_time` will not be included in the response. | [optional] **query** | [**CatalogQuery**](CatalogQuery.md) | A query to be used to filter or sort the results. If no query is specified, the entire catalog will be returned. | [optional] **limit** | **int** | A limit on the number of results to be returned in a single page. The limit is advisory - the implementation may return more or fewer results. If the supplied limit is negative, zero, or is higher than the maximum limit of 1,000, it will be ignored. | [optional] diff --git a/docs/StandardUnitDescription.md b/docs/StandardUnitDescription.md new file mode 100644 index 0000000..7d76025 --- /dev/null +++ b/docs/StandardUnitDescription.md @@ -0,0 +1,17 @@ +# StandardUnitDescription +> squareconnect.models.standard_unit_description + +### Description + +Contains the name and abbreviation for standard measurement unit. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | [**MeasurementUnit**](MeasurementUnit.md) | Identifies the measurement unit being described. | [optional] +**name** | **str** | Display name of the measurement unit. For example, 'Pound'. | [optional] +**abbreviation** | **str** | Abbreviation for the measurement unit. For example, 'lb'. | [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/StandardUnitDescriptionGroup.md b/docs/StandardUnitDescriptionGroup.md new file mode 100644 index 0000000..ddbeaa8 --- /dev/null +++ b/docs/StandardUnitDescriptionGroup.md @@ -0,0 +1,16 @@ +# StandardUnitDescriptionGroup +> squareconnect.models.standard_unit_description_group + +### Description + +Group of standard measurement units. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**standard_unit_descriptions** | [**list[StandardUnitDescription]**](StandardUnitDescription.md) | List of measurement units in this description group. | [optional] +**language_code** | **str** | IETF language tag. | [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/setup.py b/setup.py index 7cc9252..741bcb7 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages NAME = "squareconnect" -VERSION = "2.20190508.0" +VERSION = "2.20190612.0" diff --git a/squareconnect/__init__.py b/squareconnect/__init__.py index 5129b3c..11e89af 100644 --- a/squareconnect/__init__.py +++ b/squareconnect/__init__.py @@ -4,6 +4,7 @@ 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 @@ -37,6 +38,7 @@ from .models.catalog_item_modifier_list_info import CatalogItemModifierListInfo from .models.catalog_item_product_type import CatalogItemProductType from .models.catalog_item_variation import CatalogItemVariation +from .models.catalog_measurement_unit import CatalogMeasurementUnit from .models.catalog_modifier import CatalogModifier from .models.catalog_modifier_list import CatalogModifierList from .models.catalog_modifier_list_selection_type import CatalogModifierListSelectionType @@ -44,7 +46,9 @@ from .models.catalog_object import CatalogObject from .models.catalog_object_batch import CatalogObjectBatch from .models.catalog_object_type import CatalogObjectType +from .models.catalog_pricing_rule import CatalogPricingRule from .models.catalog_pricing_type import CatalogPricingType +from .models.catalog_product_set import CatalogProductSet from .models.catalog_query import CatalogQuery from .models.catalog_query_exact import CatalogQueryExact from .models.catalog_query_items_for_modifier_list import CatalogQueryItemsForModifierList @@ -54,11 +58,13 @@ from .models.catalog_query_sorted_attribute import CatalogQuerySortedAttribute from .models.catalog_query_text import CatalogQueryText from .models.catalog_tax import CatalogTax +from .models.catalog_time_period import CatalogTimePeriod from .models.catalog_v1_id import CatalogV1Id from .models.charge_request import ChargeRequest from .models.charge_request_additional_recipient import ChargeRequestAdditionalRecipient from .models.charge_response import ChargeResponse from .models.checkout import Checkout +from .models.coordinates import Coordinates from .models.country import Country from .models.create_break_type_request import CreateBreakTypeRequest from .models.create_break_type_response import CreateBreakTypeResponse @@ -154,6 +160,7 @@ from .models.measurement_unit import MeasurementUnit from .models.measurement_unit_area import MeasurementUnitArea from .models.measurement_unit_custom import MeasurementUnitCustom +from .models.measurement_unit_generic import MeasurementUnitGeneric from .models.measurement_unit_length import MeasurementUnitLength from .models.measurement_unit_volume import MeasurementUnitVolume from .models.measurement_unit_weight import MeasurementUnitWeight @@ -183,8 +190,11 @@ from .models.order_return_discount import OrderReturnDiscount from .models.order_return_line_item import OrderReturnLineItem from .models.order_return_line_item_modifier import OrderReturnLineItemModifier +from .models.order_return_service_charge import OrderReturnServiceCharge from .models.order_return_tax import OrderReturnTax from .models.order_rounding_adjustment import OrderRoundingAdjustment +from .models.order_service_charge import OrderServiceCharge +from .models.order_service_charge_calculation_phase import OrderServiceChargeCalculationPhase from .models.order_source import OrderSource from .models.order_state import OrderState from .models.product import Product @@ -242,6 +252,8 @@ from .models.shift_workday_matcher import ShiftWorkdayMatcher from .models.sort_order import SortOrder from .models.source_application import SourceApplication +from .models.standard_unit_description import StandardUnitDescription +from .models.standard_unit_description_group import StandardUnitDescriptionGroup from .models.tax_calculation_phase import TaxCalculationPhase from .models.tax_inclusion_type import TaxInclusionType from .models.tender import Tender diff --git a/squareconnect/api_client.py b/squareconnect/api_client.py index c458fea..f7a3f1f 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.20190508.0' + self.user_agent = 'Square-Connect-Python/2.20190612.0' @property def user_agent(self): diff --git a/squareconnect/apis/apple_pay_api.py b/squareconnect/apis/apple_pay_api.py index a9e2807..00aa858 100644 --- a/squareconnect/apis/apple_pay_api.py +++ b/squareconnect/apis/apple_pay_api.py @@ -44,7 +44,7 @@ def __init__(self, api_client=None): def register_domain(self, body, **kwargs): """ RegisterDomain - Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payments/sqpaymentform/overview) guide. + Activates a domain for use with Web Apple Pay and Square. A validation will be performed on this domain by Apple to ensure is it properly set up as an Apple Pay enabled domain. This endpoint provides an easy way for platform developers to bulk activate Web Apple Pay with Square for merchants using their platform. To learn more about Apple Pay on Web see the Apple Pay section in the [Embedding the Square Payment Form](/payment-form/add-digital-wallets/apple-pay) guide. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -86,7 +86,7 @@ def register_domain(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/catalog_api.py b/squareconnect/apis/catalog_api.py index 88cc295..b3b5a27 100644 --- a/squareconnect/apis/catalog_api.py +++ b/squareconnect/apis/catalog_api.py @@ -86,7 +86,7 @@ def batch_delete_catalog_objects(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -164,7 +164,7 @@ def batch_retrieve_catalog_objects(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -242,7 +242,7 @@ def batch_upsert_catalog_objects(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -316,7 +316,7 @@ def catalog_info(self, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -394,7 +394,7 @@ def delete_catalog_object(self, object_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -428,7 +428,7 @@ def delete_catalog_object(self, object_id, **kwargs): def list_catalog(self, **kwargs): """ ListCatalog - 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`. + 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`. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use SearchCatalogObjects and set `include_deleted_objects` to `true`. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -472,7 +472,7 @@ def list_catalog(self, **kwargs): query_params['types'] = params['types'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -519,7 +519,7 @@ def retrieve_catalog_object(self, object_id, **kwargs): :param callback function: The callback function for asynchronous request. (optional) :param str object_id: The object ID of any type of [CatalogObject](#type-catalogobject)s to be retrieved. (required) - :param bool include_related_objects: If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` + :param bool include_related_objects: If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` :return: RetrieveCatalogObjectResponse If the method is called asynchronously, returns the request thread. @@ -553,7 +553,7 @@ def retrieve_catalog_object(self, object_id, **kwargs): query_params['include_related_objects'] = params['include_related_objects'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -629,7 +629,7 @@ def search_catalog_objects(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -707,7 +707,7 @@ def update_item_modifier_lists(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -785,7 +785,7 @@ def update_item_taxes(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -863,7 +863,7 @@ def upsert_catalog_object(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/checkout_api.py b/squareconnect/apis/checkout_api.py index 9762322..67fde1f 100644 --- a/squareconnect/apis/checkout_api.py +++ b/squareconnect/apis/checkout_api.py @@ -92,7 +92,7 @@ def create_checkout(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/customers_api.py b/squareconnect/apis/customers_api.py index 341064a..b67fd42 100644 --- a/squareconnect/apis/customers_api.py +++ b/squareconnect/apis/customers_api.py @@ -86,7 +86,7 @@ def create_customer(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -170,7 +170,7 @@ def create_customer_card(self, customer_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -250,7 +250,7 @@ def delete_customer(self, customer_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -334,7 +334,7 @@ def delete_customer_card(self, customer_id, card_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -415,7 +415,7 @@ def list_customers(self, **kwargs): query_params['sort_order'] = params['sort_order'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -493,7 +493,7 @@ def retrieve_customer(self, customer_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -569,7 +569,7 @@ def search_customers(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -653,7 +653,7 @@ def update_customer(self, customer_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/employees_api.py b/squareconnect/apis/employees_api.py index 55a28d4..457398d 100644 --- a/squareconnect/apis/employees_api.py +++ b/squareconnect/apis/employees_api.py @@ -94,7 +94,7 @@ def list_employees(self, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -172,7 +172,7 @@ def retrieve_employee(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/inventory_api.py b/squareconnect/apis/inventory_api.py index fa5b93b..1d5fbc4 100644 --- a/squareconnect/apis/inventory_api.py +++ b/squareconnect/apis/inventory_api.py @@ -86,7 +86,7 @@ def batch_change_inventory(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -164,7 +164,7 @@ def batch_retrieve_inventory_changes(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -242,7 +242,7 @@ def batch_retrieve_inventory_counts(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -322,7 +322,7 @@ def retrieve_inventory_adjustment(self, adjustment_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -406,7 +406,7 @@ def retrieve_inventory_changes(self, catalog_object_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -490,7 +490,7 @@ def retrieve_inventory_count(self, catalog_object_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -568,7 +568,7 @@ def retrieve_inventory_physical_count(self, physical_count_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/labor_api.py b/squareconnect/apis/labor_api.py index 22e89b8..61c6f36 100644 --- a/squareconnect/apis/labor_api.py +++ b/squareconnect/apis/labor_api.py @@ -86,7 +86,7 @@ def create_break_type(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -164,7 +164,7 @@ def create_shift(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -244,7 +244,7 @@ def delete_break_type(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -322,7 +322,7 @@ def delete_shift(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -400,7 +400,7 @@ def get_break_type(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -478,7 +478,7 @@ def get_employee_wage(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -556,7 +556,7 @@ def get_shift(self, id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -637,7 +637,7 @@ def list_break_types(self, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -718,7 +718,7 @@ def list_employee_wages(self, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -796,7 +796,7 @@ def list_workweek_configs(self, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -872,7 +872,7 @@ def search_shifts(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -956,7 +956,7 @@ def update_break_type(self, id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1040,7 +1040,7 @@ def update_shift(self, id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1124,7 +1124,7 @@ def update_workweek_config(self, id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/locations_api.py b/squareconnect/apis/locations_api.py index b101f90..f288a06 100644 --- a/squareconnect/apis/locations_api.py +++ b/squareconnect/apis/locations_api.py @@ -82,7 +82,7 @@ def list_locations(self, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/mobile_authorization_api.py b/squareconnect/apis/mobile_authorization_api.py index 94d2a43..44e17ee 100644 --- a/squareconnect/apis/mobile_authorization_api.py +++ b/squareconnect/apis/mobile_authorization_api.py @@ -86,7 +86,7 @@ def create_mobile_authorization_code(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/o_auth_api.py b/squareconnect/apis/o_auth_api.py index 37bc45e..ade73b9 100644 --- a/squareconnect/apis/o_auth_api.py +++ b/squareconnect/apis/o_auth_api.py @@ -44,7 +44,7 @@ def __init__(self, api_client=None): def obtain_token(self, body, **kwargs): """ ObtainToken - Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. By default, the OAuth API lets up to 500 Square accounts authorize your application. Please [contact support](https://squareup.com/help/us/en/contact?prefill=developer_api) if you are developing an application for a larger audience. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. + Returns an OAuth access token. The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the `grant_type` parameter in the request and also provide relevant information. For more information, see [OAuth access token management](/authz/oauth/how-it-works#oauth-access-token-management). __Note:__ Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response. __OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens__. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -86,7 +86,7 @@ def obtain_token(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -170,7 +170,7 @@ def renew_token(self, client_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -248,7 +248,7 @@ def revoke_token(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/orders_api.py b/squareconnect/apis/orders_api.py index ccf6692..adaa4a5 100644 --- a/squareconnect/apis/orders_api.py +++ b/squareconnect/apis/orders_api.py @@ -92,7 +92,7 @@ def batch_retrieve_orders(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -176,7 +176,7 @@ def create_order(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -212,7 +212,7 @@ def create_order(self, location_id, body, **kwargs): def search_orders(self, body, **kwargs): """ SearchOrders - Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. By default, SearchOrders will return all results for all of the merchant’s locations. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. + Search all Orders for a merchant and return either [Orders](#type-order) or [OrderEntries](#type-orderentry). Note that details for orders processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline orders have a `created_at` value that reflects the time the order was originally processed, not the time it was subsequently transmitted to Square. Consequently, the SearchOrder endpoint might list an offline Order chronologically between online Orders that were seen in a previous request. When fetching additional pages using a `cursor`, the `query` must be equal to the `query` used to fetch the first page of results. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function @@ -254,7 +254,7 @@ def search_orders(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/reporting_api.py b/squareconnect/apis/reporting_api.py index 93a00ff..333dffc 100644 --- a/squareconnect/apis/reporting_api.py +++ b/squareconnect/apis/reporting_api.py @@ -100,7 +100,7 @@ def list_additional_recipient_receivable_refunds(self, location_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -190,7 +190,7 @@ def list_additional_recipient_receivables(self, location_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/transactions_api.py b/squareconnect/apis/transactions_api.py index 8cd5a21..13eb43e 100644 --- a/squareconnect/apis/transactions_api.py +++ b/squareconnect/apis/transactions_api.py @@ -94,7 +94,7 @@ def capture_transaction(self, location_id, transaction_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -176,7 +176,7 @@ def charge(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -266,7 +266,7 @@ def create_refund(self, location_id, transaction_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -358,7 +358,7 @@ def list_refunds(self, location_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -448,7 +448,7 @@ def list_transactions(self, location_id, **kwargs): query_params['cursor'] = params['cursor'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -532,7 +532,7 @@ def retrieve_transaction(self, location_id, transaction_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -616,7 +616,7 @@ def void_transaction(self, location_id, transaction_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/v1_employees_api.py b/squareconnect/apis/v1_employees_api.py index 318ca3a..60ce158 100644 --- a/squareconnect/apis/v1_employees_api.py +++ b/squareconnect/apis/v1_employees_api.py @@ -86,7 +86,7 @@ def create_employee(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -164,7 +164,7 @@ def create_employee_role(self, employee_role, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -242,7 +242,7 @@ def create_timecard(self, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -322,7 +322,7 @@ def delete_timecard(self, timecard_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -409,7 +409,7 @@ def list_cash_drawer_shifts(self, location_id, **kwargs): query_params['end_time'] = params['end_time'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -490,7 +490,7 @@ def list_employee_roles(self, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -589,7 +589,7 @@ def list_employees(self, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -667,7 +667,7 @@ def list_timecard_events(self, timecard_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -772,7 +772,7 @@ def list_timecards(self, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -856,7 +856,7 @@ def retrieve_cash_drawer_shift(self, location_id, shift_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -934,7 +934,7 @@ def retrieve_employee(self, employee_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1012,7 +1012,7 @@ def retrieve_employee_role(self, role_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1090,7 +1090,7 @@ def retrieve_timecard(self, timecard_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1172,7 +1172,7 @@ def update_employee(self, employee_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1256,7 +1256,7 @@ def update_employee_role(self, role_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1340,7 +1340,7 @@ def update_timecard(self, timecard_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/v1_items_api.py b/squareconnect/apis/v1_items_api.py index ce4c634..9835c9f 100644 --- a/squareconnect/apis/v1_items_api.py +++ b/squareconnect/apis/v1_items_api.py @@ -98,7 +98,7 @@ def adjust_inventory(self, location_id, variation_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -190,7 +190,7 @@ def apply_fee(self, location_id, item_id, fee_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -280,7 +280,7 @@ def apply_modifier_list(self, location_id, modifier_list_id, item_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -362,7 +362,7 @@ def create_category(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -446,7 +446,7 @@ def create_discount(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -530,7 +530,7 @@ def create_fee(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -614,7 +614,7 @@ def create_item(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -698,7 +698,7 @@ def create_modifier_list(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -788,7 +788,7 @@ def create_modifier_option(self, location_id, modifier_list_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -872,7 +872,7 @@ def create_page(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -962,7 +962,7 @@ def create_variation(self, location_id, item_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1048,7 +1048,7 @@ def delete_category(self, location_id, category_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1132,7 +1132,7 @@ def delete_discount(self, location_id, discount_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1216,7 +1216,7 @@ def delete_fee(self, location_id, fee_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1300,7 +1300,7 @@ def delete_item(self, location_id, item_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1384,7 +1384,7 @@ def delete_modifier_list(self, location_id, modifier_list_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1474,7 +1474,7 @@ def delete_modifier_option(self, location_id, modifier_list_id, modifier_option_ query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1558,7 +1558,7 @@ def delete_page(self, location_id, page_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1648,7 +1648,7 @@ def delete_page_cell(self, location_id, page_id, **kwargs): query_params['column'] = params['column'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1738,7 +1738,7 @@ def delete_variation(self, location_id, item_id, variation_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1816,7 +1816,7 @@ def list_categories(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1894,7 +1894,7 @@ def list_discounts(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -1972,7 +1972,7 @@ def list_fees(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2056,7 +2056,7 @@ def list_inventory(self, location_id, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2137,7 +2137,7 @@ def list_items(self, location_id, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2215,7 +2215,7 @@ def list_modifier_lists(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2293,7 +2293,7 @@ def list_pages(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2383,7 +2383,7 @@ def remove_fee(self, location_id, item_id, fee_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2473,7 +2473,7 @@ def remove_modifier_list(self, location_id, modifier_list_id, item_id, **kwargs) query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2557,7 +2557,7 @@ def retrieve_item(self, location_id, item_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2641,7 +2641,7 @@ def retrieve_modifier_list(self, location_id, modifier_list_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2729,7 +2729,7 @@ def update_category(self, location_id, category_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2819,7 +2819,7 @@ def update_discount(self, location_id, discount_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2909,7 +2909,7 @@ def update_fee(self, location_id, fee_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -2999,7 +2999,7 @@ def update_item(self, location_id, item_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -3089,7 +3089,7 @@ def update_modifier_list(self, location_id, modifier_list_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -3185,7 +3185,7 @@ def update_modifier_option(self, location_id, modifier_list_id, modifier_option_ query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -3275,7 +3275,7 @@ def update_page(self, location_id, page_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -3365,7 +3365,7 @@ def update_page_cell(self, location_id, page_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -3461,7 +3461,7 @@ def update_variation(self, location_id, item_id, variation_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/v1_locations_api.py b/squareconnect/apis/v1_locations_api.py index 3bedc46..34ef860 100644 --- a/squareconnect/apis/v1_locations_api.py +++ b/squareconnect/apis/v1_locations_api.py @@ -82,7 +82,7 @@ def list_locations(self, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -154,7 +154,7 @@ def retrieve_business(self, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/apis/v1_transactions_api.py b/squareconnect/apis/v1_transactions_api.py index 61cc8b4..b4e0c3d 100644 --- a/squareconnect/apis/v1_transactions_api.py +++ b/squareconnect/apis/v1_transactions_api.py @@ -92,7 +92,7 @@ def create_refund(self, location_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -172,7 +172,7 @@ def list_bank_accounts(self, location_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -259,7 +259,7 @@ def list_orders(self, location_id, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -355,7 +355,7 @@ def list_payments(self, location_id, **kwargs): query_params['include_partial'] = params['include_partial'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -448,7 +448,7 @@ def list_refunds(self, location_id, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -544,7 +544,7 @@ def list_settlements(self, location_id, **kwargs): query_params['batch_token'] = params['batch_token'] header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -628,7 +628,7 @@ def retrieve_bank_account(self, location_id, bank_account_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -712,7 +712,7 @@ def retrieve_order(self, location_id, order_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -796,7 +796,7 @@ def retrieve_payment(self, location_id, payment_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -880,7 +880,7 @@ def retrieve_settlement(self, location_id, settlement_id, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} @@ -968,7 +968,7 @@ def update_order(self, location_id, order_id, body, **kwargs): query_params = {} header_params = {} - header_params['Square-Version'] = "2019-05-08" + header_params['Square-Version'] = "2019-06-12" form_params = [] local_var_files = {} diff --git a/squareconnect/configuration.py b/squareconnect/configuration.py index 597c148..a6fcf8e 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.20190508.0".\ + "SDK Package Version: 2.20190612.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/squareconnect/models/__init__.py b/squareconnect/models/__init__.py index 3f8f276..cc6e65c 100644 --- a/squareconnect/models/__init__.py +++ b/squareconnect/models/__init__.py @@ -4,6 +4,7 @@ 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 @@ -37,6 +38,7 @@ from .catalog_item_modifier_list_info import CatalogItemModifierListInfo from .catalog_item_product_type import CatalogItemProductType from .catalog_item_variation import CatalogItemVariation +from .catalog_measurement_unit import CatalogMeasurementUnit from .catalog_modifier import CatalogModifier from .catalog_modifier_list import CatalogModifierList from .catalog_modifier_list_selection_type import CatalogModifierListSelectionType @@ -44,7 +46,9 @@ from .catalog_object import CatalogObject from .catalog_object_batch import CatalogObjectBatch from .catalog_object_type import CatalogObjectType +from .catalog_pricing_rule import CatalogPricingRule from .catalog_pricing_type import CatalogPricingType +from .catalog_product_set import CatalogProductSet from .catalog_query import CatalogQuery from .catalog_query_exact import CatalogQueryExact from .catalog_query_items_for_modifier_list import CatalogQueryItemsForModifierList @@ -54,11 +58,13 @@ from .catalog_query_sorted_attribute import CatalogQuerySortedAttribute from .catalog_query_text import CatalogQueryText from .catalog_tax import CatalogTax +from .catalog_time_period import CatalogTimePeriod from .catalog_v1_id import CatalogV1Id from .charge_request import ChargeRequest from .charge_request_additional_recipient import ChargeRequestAdditionalRecipient from .charge_response import ChargeResponse from .checkout import Checkout +from .coordinates import Coordinates from .country import Country from .create_break_type_request import CreateBreakTypeRequest from .create_break_type_response import CreateBreakTypeResponse @@ -154,6 +160,7 @@ from .measurement_unit import MeasurementUnit from .measurement_unit_area import MeasurementUnitArea from .measurement_unit_custom import MeasurementUnitCustom +from .measurement_unit_generic import MeasurementUnitGeneric from .measurement_unit_length import MeasurementUnitLength from .measurement_unit_volume import MeasurementUnitVolume from .measurement_unit_weight import MeasurementUnitWeight @@ -183,8 +190,11 @@ from .order_return_discount import OrderReturnDiscount from .order_return_line_item import OrderReturnLineItem from .order_return_line_item_modifier import OrderReturnLineItemModifier +from .order_return_service_charge import OrderReturnServiceCharge from .order_return_tax import OrderReturnTax from .order_rounding_adjustment import OrderRoundingAdjustment +from .order_service_charge import OrderServiceCharge +from .order_service_charge_calculation_phase import OrderServiceChargeCalculationPhase from .order_source import OrderSource from .order_state import OrderState from .product import Product @@ -242,6 +252,8 @@ from .shift_workday_matcher import ShiftWorkdayMatcher from .sort_order import SortOrder from .source_application import SourceApplication +from .standard_unit_description import StandardUnitDescription +from .standard_unit_description_group import StandardUnitDescriptionGroup from .tax_calculation_phase import TaxCalculationPhase from .tax_inclusion_type import TaxInclusionType from .tender import Tender diff --git a/squareconnect/models/aggregation_strategy.py b/squareconnect/models/aggregation_strategy.py new file mode 100644 index 0000000..6f169a8 --- /dev/null +++ b/squareconnect/models/aggregation_strategy.py @@ -0,0 +1,95 @@ +# 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/batch_retrieve_catalog_objects_request.py b/squareconnect/models/batch_retrieve_catalog_objects_request.py index 611363b..1e2e6d2 100644 --- a/squareconnect/models/batch_retrieve_catalog_objects_request.py +++ b/squareconnect/models/batch_retrieve_catalog_objects_request.py @@ -76,7 +76,7 @@ def object_ids(self, object_ids): def include_related_objects(self): """ Gets the include_related_objects of this BatchRetrieveCatalogObjectsRequest. - If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. + If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. :return: The include_related_objects of this BatchRetrieveCatalogObjectsRequest. :rtype: bool @@ -87,7 +87,7 @@ def include_related_objects(self): def include_related_objects(self, include_related_objects): """ Sets the include_related_objects of this BatchRetrieveCatalogObjectsRequest. - If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. + If `true`, the response will include additional objects that are related to the requested objects, as follows: If the `objects` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `objects` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. :param include_related_objects: The include_related_objects of this BatchRetrieveCatalogObjectsRequest. :type: bool diff --git a/squareconnect/models/card.py b/squareconnect/models/card.py index 5cb288d..1953428 100644 --- a/squareconnect/models/card.py +++ b/squareconnect/models/card.py @@ -232,7 +232,7 @@ def billing_address(self, billing_address): def fingerprint(self): """ Gets the fingerprint of this Card. - __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. + A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. :return: The fingerprint of this Card. :rtype: str @@ -243,7 +243,7 @@ def fingerprint(self): def fingerprint(self, fingerprint): """ Sets the fingerprint of this Card. - __Not currently set.__ Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application. + A unique, Square-assigned ID that identifies the card across multiple locations and applications for a single Square account. :param fingerprint: The fingerprint of this Card. :type: str diff --git a/squareconnect/models/catalog_info_response.py b/squareconnect/models/catalog_info_response.py index 9754df1..96caa05 100644 --- a/squareconnect/models/catalog_info_response.py +++ b/squareconnect/models/catalog_info_response.py @@ -27,7 +27,7 @@ class CatalogInfoResponse(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, errors=None, limits=None): + def __init__(self, errors=None, limits=None, standard_unit_description_group=None): """ CatalogInfoResponse - a model defined in Swagger @@ -38,16 +38,19 @@ def __init__(self, errors=None, limits=None): """ self.swagger_types = { 'errors': 'list[Error]', - 'limits': 'CatalogInfoResponseLimits' + 'limits': 'CatalogInfoResponseLimits', + 'standard_unit_description_group': 'StandardUnitDescriptionGroup' } self.attribute_map = { 'errors': 'errors', - 'limits': 'limits' + 'limits': 'limits', + 'standard_unit_description_group': 'standard_unit_description_group' } self._errors = errors self._limits = limits + self._standard_unit_description_group = standard_unit_description_group @property def errors(self): @@ -95,6 +98,29 @@ def limits(self, limits): self._limits = limits + @property + def standard_unit_description_group(self): + """ + Gets the standard_unit_description_group of this CatalogInfoResponse. + Names and abbreviations for standard units. + + :return: The standard_unit_description_group of this CatalogInfoResponse. + :rtype: StandardUnitDescriptionGroup + """ + return self._standard_unit_description_group + + @standard_unit_description_group.setter + def standard_unit_description_group(self, standard_unit_description_group): + """ + Sets the standard_unit_description_group of this CatalogInfoResponse. + Names and abbreviations for standard units. + + :param standard_unit_description_group: The standard_unit_description_group of this CatalogInfoResponse. + :type: StandardUnitDescriptionGroup + """ + + self._standard_unit_description_group = standard_unit_description_group + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/catalog_item.py b/squareconnect/models/catalog_item.py index d92d162..766f5e4 100644 --- a/squareconnect/models/catalog_item.py +++ b/squareconnect/models/catalog_item.py @@ -342,7 +342,7 @@ def image_url(self, image_url): def variations(self): """ Gets the variations of this CatalogItem. - A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. + A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations :return: The variations of this CatalogItem. :rtype: list[CatalogObject] @@ -353,7 +353,7 @@ def variations(self): def variations(self, variations): """ Sets the variations of this CatalogItem. - A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. + A list of [CatalogObject](#type-catalogobject)s containing the [CatalogItemVariation](#type-catalogitemvariation)s for this item. Maximum: 250 item variations :param variations: The variations of this CatalogItem. :type: list[CatalogObject] diff --git a/squareconnect/models/catalog_item_variation.py b/squareconnect/models/catalog_item_variation.py index 96ebcd6..4d01ea0 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): + 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): """ CatalogItemVariation - a model defined in Swagger @@ -49,7 +49,9 @@ def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pr 'inventory_alert_type': 'str', 'inventory_alert_threshold': 'int', 'user_data': 'str', - 'service_duration': 'int' + 'service_duration': 'int', + 'catalog_measurement_unit_id': 'str', + 'measurement_unit_id': 'str' } self.attribute_map = { @@ -65,7 +67,9 @@ def __init__(self, item_id=None, name=None, sku=None, upc=None, ordinal=None, pr 'inventory_alert_type': 'inventory_alert_type', 'inventory_alert_threshold': 'inventory_alert_threshold', 'user_data': 'user_data', - 'service_duration': 'service_duration' + 'service_duration': 'service_duration', + 'catalog_measurement_unit_id': 'catalog_measurement_unit_id', + 'measurement_unit_id': 'measurement_unit_id' } self._item_id = item_id @@ -81,6 +85,8 @@ 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 def item_id(self): @@ -381,6 +387,52 @@ 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): + """ + Gets the measurement_unit_id of this CatalogItemVariation. + 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. + + :return: The measurement_unit_id of this CatalogItemVariation. + :rtype: str + """ + return self._measurement_unit_id + + @measurement_unit_id.setter + def measurement_unit_id(self, measurement_unit_id): + """ + Sets the measurement_unit_id of this CatalogItemVariation. + 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. + + :param measurement_unit_id: The measurement_unit_id of this CatalogItemVariation. + :type: str + """ + + self._measurement_unit_id = measurement_unit_id + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/catalog_measurement_unit.py b/squareconnect/models/catalog_measurement_unit.py new file mode 100644 index 0000000..05d0713 --- /dev/null +++ b/squareconnect/models/catalog_measurement_unit.py @@ -0,0 +1,146 @@ +# 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 CatalogMeasurementUnit(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, measurement_unit=None, precision=None): + """ + CatalogMeasurementUnit - 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 = { + 'measurement_unit': 'MeasurementUnit', + 'precision': 'int' + } + + self.attribute_map = { + 'measurement_unit': 'measurement_unit', + 'precision': 'precision' + } + + self._measurement_unit = measurement_unit + self._precision = precision + + @property + def measurement_unit(self): + """ + Gets the measurement_unit of this CatalogMeasurementUnit. + Indicates the unit used to measure the quantity of a catalog item variation. + + :return: The measurement_unit of this CatalogMeasurementUnit. + :rtype: MeasurementUnit + """ + return self._measurement_unit + + @measurement_unit.setter + def measurement_unit(self, measurement_unit): + """ + Sets the measurement_unit of this CatalogMeasurementUnit. + Indicates the unit used to measure the quantity of a catalog item variation. + + :param measurement_unit: The measurement_unit of this CatalogMeasurementUnit. + :type: MeasurementUnit + """ + + self._measurement_unit = measurement_unit + + @property + def precision(self): + """ + Gets the precision of this CatalogMeasurementUnit. + Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 + + :return: The precision of this CatalogMeasurementUnit. + :rtype: int + """ + return self._precision + + @precision.setter + def precision(self, precision): + """ + Sets the precision of this CatalogMeasurementUnit. + Represents the maximum number of positions allowed after the decimal in quantities measured with this unit. For example, if the precision is 2, then an itemization’s quantity can be 0.01, 0.12, etc. Min: 0 Max: 5 Default: 3 + + :param precision: The precision of this CatalogMeasurementUnit. + :type: int + """ + + self._precision = precision + + 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_object.py b/squareconnect/models/catalog_object.py index 2c95e02..cd787b4 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): + 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): """ CatalogObject - a model defined in Swagger @@ -54,7 +54,8 @@ def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted 'discount_data': 'CatalogDiscount', 'modifier_list_data': 'CatalogModifierList', 'modifier_data': 'CatalogModifier', - 'image_data': 'CatalogImage' + 'image_data': 'CatalogImage', + 'measurement_unit_data': 'CatalogMeasurementUnit' } self.attribute_map = { @@ -75,7 +76,8 @@ 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', - 'image_data': 'image_data' + 'image_data': 'image_data', + 'measurement_unit_data': 'measurement_unit_data' } self._type = type @@ -96,6 +98,7 @@ def __init__(self, type=None, id=None, updated_at=None, version=None, is_deleted self._modifier_list_data = modifier_list_data self._modifier_data = modifier_data self._image_data = image_data + self._measurement_unit_data = measurement_unit_data @property def type(self): @@ -516,6 +519,29 @@ def image_data(self, image_data): self._image_data = image_data + @property + def measurement_unit_data(self): + """ + Gets the measurement_unit_data of this CatalogObject. + Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. + + :return: The measurement_unit_data of this CatalogObject. + :rtype: CatalogMeasurementUnit + """ + return self._measurement_unit_data + + @measurement_unit_data.setter + def measurement_unit_data(self, measurement_unit_data): + """ + Sets the measurement_unit_data of this CatalogObject. + Structured data for a [CatalogMeasurementUnit](#type-catalogmeasurementunit), set for CatalogObjects of type `MEASUREMENT_UNIT`. + + :param measurement_unit_data: The measurement_unit_data of this CatalogObject. + :type: CatalogMeasurementUnit + """ + + self._measurement_unit_data = measurement_unit_data + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/catalog_pricing_rule.py b/squareconnect/models/catalog_pricing_rule.py new file mode 100644 index 0000000..33b69d4 --- /dev/null +++ b/squareconnect/models/catalog_pricing_rule.py @@ -0,0 +1,432 @@ +# 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 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): + """ + CatalogPricingRule - 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 = { + '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', + 'valid_until_date': 'str', + 'valid_until_local_time': 'str' + } + + 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', + 'valid_until_date': 'valid_until_date', + 'valid_until_local_time': 'valid_until_local_time' + } + + 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 + self._valid_until_date = valid_until_date + self._valid_until_local_time = valid_until_local_time + + @property + def name(self): + """ + Gets the name of this CatalogPricingRule. + User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". + + :return: The name of this CatalogPricingRule. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CatalogPricingRule. + User-defined name for the pricing rule. For example, \"Buy one get one free\" or \"10% off\". + + :param name: The name of this CatalogPricingRule. + :type: str + """ + + self._name = name + + @property + def time_period_ids(self): + """ + Gets the time_period_ids of this CatalogPricingRule. + 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. + + :return: The time_period_ids of this CatalogPricingRule. + :rtype: list[str] + """ + return self._time_period_ids + + @time_period_ids.setter + def time_period_ids(self, time_period_ids): + """ + Sets the time_period_ids of this CatalogPricingRule. + 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. + + :param time_period_ids: The time_period_ids of this CatalogPricingRule. + :type: list[str] + """ + + 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): + """ + Gets the discount_id of this CatalogPricingRule. + 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. + + :return: The discount_id of this CatalogPricingRule. + :rtype: str + """ + return self._discount_id + + @discount_id.setter + def discount_id(self, discount_id): + """ + Sets the discount_id of this CatalogPricingRule. + 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. + + :param discount_id: The discount_id of this CatalogPricingRule. + :type: str + """ + + self._discount_id = discount_id + + @property + def match_products_id(self): + """ + Gets the match_products_id of this CatalogPricingRule. + Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. + + :return: The match_products_id of this CatalogPricingRule. + :rtype: str + """ + return self._match_products_id + + @match_products_id.setter + def match_products_id(self, match_products_id): + """ + Sets the match_products_id of this CatalogPricingRule. + Unique ID for the [CatalogProductSet](#type-catalogproductset) that will be matched by this rule. A match rule matches within the entire cart. + + :param match_products_id: The match_products_id of this CatalogPricingRule. + :type: str + """ + + self._match_products_id = match_products_id + + @property + def apply_products_id(self): + """ + Gets the apply_products_id of this CatalogPricingRule. + 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. + + :return: The apply_products_id of this CatalogPricingRule. + :rtype: str + """ + return self._apply_products_id + + @apply_products_id.setter + def apply_products_id(self, apply_products_id): + """ + Sets the apply_products_id of this CatalogPricingRule. + 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. + + :param apply_products_id: The apply_products_id of this CatalogPricingRule. + :type: str + """ + + 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): + """ + Gets the exclude_products_id of this CatalogPricingRule. + 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. + + :return: The exclude_products_id of this CatalogPricingRule. + :rtype: str + """ + return self._exclude_products_id + + @exclude_products_id.setter + def exclude_products_id(self, exclude_products_id): + """ + Sets the exclude_products_id of this CatalogPricingRule. + 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. + + :param exclude_products_id: The exclude_products_id of this CatalogPricingRule. + :type: str + """ + + self._exclude_products_id = exclude_products_id + + @property + def valid_from_date(self): + """ + Gets the valid_from_date of this CatalogPricingRule. + Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). + + :return: The valid_from_date of this CatalogPricingRule. + :rtype: str + """ + return self._valid_from_date + + @valid_from_date.setter + def valid_from_date(self, valid_from_date): + """ + Sets the valid_from_date of this CatalogPricingRule. + Represents the date the Pricing Rule is valid from. Represented in RFC3339 full-date format (YYYY-MM-DD). + + :param valid_from_date: The valid_from_date of this CatalogPricingRule. + :type: str + """ + + self._valid_from_date = valid_from_date + + @property + def valid_from_local_time(self): + """ + Gets the valid_from_local_time of this CatalogPricingRule. + 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. + + :return: The valid_from_local_time of this CatalogPricingRule. + :rtype: str + """ + return self._valid_from_local_time + + @valid_from_local_time.setter + def valid_from_local_time(self, valid_from_local_time): + """ + Sets the valid_from_local_time of this CatalogPricingRule. + 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. + + :param valid_from_local_time: The valid_from_local_time of this CatalogPricingRule. + :type: str + """ + + self._valid_from_local_time = valid_from_local_time + + @property + def valid_until_date(self): + """ + Gets the valid_until_date of this CatalogPricingRule. + Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). + + :return: The valid_until_date of this CatalogPricingRule. + :rtype: str + """ + return self._valid_until_date + + @valid_until_date.setter + def valid_until_date(self, valid_until_date): + """ + Sets the valid_until_date of this CatalogPricingRule. + Represents the date the pricing rule will become inactive. Represented in RFC3339 full-date format (YYYY-MM-DD). + + :param valid_until_date: The valid_until_date of this CatalogPricingRule. + :type: str + """ + + self._valid_until_date = valid_until_date + + @property + def valid_until_local_time(self): + """ + Gets the valid_until_local_time of this CatalogPricingRule. + Represents the local time at which the pricing rule will become inactive. 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. + + :return: The valid_until_local_time of this CatalogPricingRule. + :rtype: str + """ + return self._valid_until_local_time + + @valid_until_local_time.setter + def valid_until_local_time(self, valid_until_local_time): + """ + Sets the valid_until_local_time of this CatalogPricingRule. + Represents the local time at which the pricing rule will become inactive. 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. + + :param valid_until_local_time: The valid_until_local_time of this CatalogPricingRule. + :type: str + """ + + self._valid_until_local_time = valid_until_local_time + + 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_product_set.py b/squareconnect/models/catalog_product_set.py new file mode 100644 index 0000000..6dc42d0 --- /dev/null +++ b/squareconnect/models/catalog_product_set.py @@ -0,0 +1,276 @@ +# 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 CatalogProductSet(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, name=None, product_ids_any=None, product_ids_all=None, quantity_exact=None, quantity_min=None, quantity_max=None, all_products=None): + """ + CatalogProductSet - 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 = { + 'name': 'str', + 'product_ids_any': 'list[str]', + 'product_ids_all': 'list[str]', + 'quantity_exact': 'int', + 'quantity_min': 'int', + 'quantity_max': 'int', + 'all_products': 'bool' + } + + self.attribute_map = { + 'name': 'name', + 'product_ids_any': 'product_ids_any', + 'product_ids_all': 'product_ids_all', + 'quantity_exact': 'quantity_exact', + 'quantity_min': 'quantity_min', + 'quantity_max': 'quantity_max', + 'all_products': 'all_products' + } + + self._name = name + self._product_ids_any = product_ids_any + self._product_ids_all = product_ids_all + self._quantity_exact = quantity_exact + self._quantity_min = quantity_min + self._quantity_max = quantity_max + self._all_products = all_products + + @property + def name(self): + """ + Gets the name of this CatalogProductSet. + User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". + + :return: The name of this CatalogProductSet. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CatalogProductSet. + User-defined name for the product set. For example, \"Clearance Items\" or \"Winter Sale Items\". + + :param name: The name of this CatalogProductSet. + :type: str + """ + + self._name = name + + @property + def product_ids_any(self): + """ + Gets the product_ids_any of this CatalogProductSet. + Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + + :return: The product_ids_any of this CatalogProductSet. + :rtype: list[str] + """ + return self._product_ids_any + + @product_ids_any.setter + def product_ids_any(self, product_ids_any): + """ + Sets the product_ids_any of this CatalogProductSet. + Unique IDs for any [CatalogObjects](#type-catalogobject)s to include in this product set. Any number of these catalog objects can be in an order for a pricing rule to apply. This can be used with `product_ids_all` in a parent [CatalogProductSet](#type-catalogproductset) to match groups of products for a bulk discount, such as a discount for an entree and side combo. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + + :param product_ids_any: The product_ids_any of this CatalogProductSet. + :type: list[str] + """ + + self._product_ids_any = product_ids_any + + @property + def product_ids_all(self): + """ + Gets the product_ids_all of this CatalogProductSet. + Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + + :return: The product_ids_all of this CatalogProductSet. + :rtype: list[str] + """ + return self._product_ids_all + + @product_ids_all.setter + def product_ids_all(self, product_ids_all): + """ + Sets the product_ids_all of this CatalogProductSet. + Unique IDs for [CatalogObjects](#type-catalogobject) to include in this product set. All objects in this set must be included in an order for a pricing rule to apply. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. Max: 500 catalog object IDs. + + :param product_ids_all: The product_ids_all of this CatalogProductSet. + :type: list[str] + """ + + self._product_ids_all = product_ids_all + + @property + def quantity_exact(self): + """ + Gets the quantity_exact of this CatalogProductSet. + If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. + + :return: The quantity_exact of this CatalogProductSet. + :rtype: int + """ + return self._quantity_exact + + @quantity_exact.setter + def quantity_exact(self, quantity_exact): + """ + Sets the quantity_exact of this CatalogProductSet. + If set, there must be exactly this many items from `products_any` or `products_all` in the cart for the discount to apply. Cannot be combined with either `quantity_min` or `quantity_max`. + + :param quantity_exact: The quantity_exact of this CatalogProductSet. + :type: int + """ + + self._quantity_exact = quantity_exact + + @property + def quantity_min(self): + """ + Gets the quantity_min of this CatalogProductSet. + If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. + + :return: The quantity_min of this CatalogProductSet. + :rtype: int + """ + return self._quantity_min + + @quantity_min.setter + def quantity_min(self, quantity_min): + """ + Sets the quantity_min of this CatalogProductSet. + If set, there must be at least this many items from `products_any` or `products_all` in a cart for the discount to apply. See `quantity_exact`. Defaults to 0 if `quantity_exact`, `quantity_min` and `quantity_max` are all unspecified. + + :param quantity_min: The quantity_min of this CatalogProductSet. + :type: int + """ + + self._quantity_min = quantity_min + + @property + def quantity_max(self): + """ + Gets the quantity_max of this CatalogProductSet. + If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. + + :return: The quantity_max of this CatalogProductSet. + :rtype: int + """ + return self._quantity_max + + @quantity_max.setter + def quantity_max(self, quantity_max): + """ + Sets the quantity_max of this CatalogProductSet. + If set, the pricing rule will apply to a maximum of this many items from `products_any` or `products_all`. + + :param quantity_max: The quantity_max of this CatalogProductSet. + :type: int + """ + + self._quantity_max = quantity_max + + @property + def all_products(self): + """ + Gets the all_products of this CatalogProductSet. + If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. + + :return: The all_products of this CatalogProductSet. + :rtype: bool + """ + return self._all_products + + @all_products.setter + def all_products(self, all_products): + """ + Sets the all_products of this CatalogProductSet. + If set to `true`, the product set will include every item in the catalog. Only one of `product_ids_all`, `product_ids_any`, or `all_products` can be set. + + :param all_products: The all_products of this CatalogProductSet. + :type: bool + """ + + self._all_products = all_products + + 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_time_period.py b/squareconnect/models/catalog_time_period.py new file mode 100644 index 0000000..a5e8049 --- /dev/null +++ b/squareconnect/models/catalog_time_period.py @@ -0,0 +1,120 @@ +# 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 CatalogTimePeriod(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, event=None): + """ + CatalogTimePeriod - 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 = { + 'event': 'str' + } + + self.attribute_map = { + 'event': 'event' + } + + self._event = event + + @property + def event(self): + """ + Gets the event of this CatalogTimePeriod. + An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. + + :return: The event of this CatalogTimePeriod. + :rtype: str + """ + return self._event + + @event.setter + def event(self, event): + """ + Sets the event of this CatalogTimePeriod. + An iCalendar (RFC5545) [event](https://tools.ietf.org/html/rfc5545#section-3.6.1), which specifies the name, timing, duration and recurrence of this time period. Example: ``` DTSTART:20190707T180000 DURATION:P2H RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR ``` Only `SUMMARY`, `DTSTART`, `DURATION` and `RRULE` fields are supported. `DTSTART` must be in local (unzoned) time format. Note that while `BEGIN:VEVENT` and `END:VEVENT` is not required in the request. The response will always include them. + + :param event: The event of this CatalogTimePeriod. + :type: str + """ + + self._event = event + + 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/coordinates.py b/squareconnect/models/coordinates.py new file mode 100644 index 0000000..649481f --- /dev/null +++ b/squareconnect/models/coordinates.py @@ -0,0 +1,146 @@ +# 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 Coordinates(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, latitude=None, longitude=None): + """ + Coordinates - 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 = { + 'latitude': 'float', + 'longitude': 'float' + } + + self.attribute_map = { + 'latitude': 'latitude', + 'longitude': 'longitude' + } + + self._latitude = latitude + self._longitude = longitude + + @property + def latitude(self): + """ + Gets the latitude of this Coordinates. + The coordinate's latitude expressed in degrees. + + :return: The latitude of this Coordinates. + :rtype: float + """ + return self._latitude + + @latitude.setter + def latitude(self, latitude): + """ + Sets the latitude of this Coordinates. + The coordinate's latitude expressed in degrees. + + :param latitude: The latitude of this Coordinates. + :type: float + """ + + self._latitude = latitude + + @property + def longitude(self): + """ + Gets the longitude of this Coordinates. + The coordinate's longitude expressed in degrees. + + :return: The longitude of this Coordinates. + :rtype: float + """ + return self._longitude + + @longitude.setter + def longitude(self, longitude): + """ + Sets the longitude of this Coordinates. + The coordinate's longitude expressed in degrees. + + :param longitude: The longitude of this Coordinates. + :type: float + """ + + self._longitude = longitude + + 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/create_order_request.py b/squareconnect/models/create_order_request.py index 1b162a1..f6b6ca9 100644 --- a/squareconnect/models/create_order_request.py +++ b/squareconnect/models/create_order_request.py @@ -116,7 +116,7 @@ def idempotency_key(self, idempotency_key): def reference_id(self): """ Gets the reference_id of this CreateOrderRequest. - __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape. + __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. :return: The reference_id of this CreateOrderRequest. :rtype: str @@ -127,7 +127,7 @@ def reference_id(self): def reference_id(self, reference_id): """ Sets the reference_id of this CreateOrderRequest. - __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. -- Top-level fields necessary to support the connect v2 CreateOrderRequest shape. + __Deprecated__: Please set the reference_id on the nested [order](#type-order) field instead. An optional ID you can associate with the order for your own purposes (such as to associate the order with an entity ID in your own database). This value cannot exceed 40 characters. :param reference_id: The reference_id of this CreateOrderRequest. :type: str diff --git a/squareconnect/models/location.py b/squareconnect/models/location.py index 08c4e93..b7ade5d 100644 --- a/squareconnect/models/location.py +++ b/squareconnect/models/location.py @@ -27,7 +27,7 @@ class Location(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, id=None, name=None, address=None, timezone=None, capabilities=None, status=None, created_at=None, merchant_id=None, country=None, language_code=None, currency=None, phone_number=None, business_name=None, type=None, website_url=None, business_hours=None): + def __init__(self, id=None, name=None, address=None, timezone=None, capabilities=None, status=None, created_at=None, merchant_id=None, country=None, language_code=None, currency=None, phone_number=None, business_name=None, type=None, website_url=None, business_hours=None, business_email=None, description=None, twitter_username=None, instagram_username=None, facebook_url=None, coordinates=None): """ Location - a model defined in Swagger @@ -52,7 +52,13 @@ def __init__(self, id=None, name=None, address=None, timezone=None, capabilities 'business_name': 'str', 'type': 'str', 'website_url': 'str', - 'business_hours': 'BusinessHours' + 'business_hours': 'BusinessHours', + 'business_email': 'str', + 'description': 'str', + 'twitter_username': 'str', + 'instagram_username': 'str', + 'facebook_url': 'str', + 'coordinates': 'Coordinates' } self.attribute_map = { @@ -71,7 +77,13 @@ def __init__(self, id=None, name=None, address=None, timezone=None, capabilities 'business_name': 'business_name', 'type': 'type', 'website_url': 'website_url', - 'business_hours': 'business_hours' + 'business_hours': 'business_hours', + 'business_email': 'business_email', + 'description': 'description', + 'twitter_username': 'twitter_username', + 'instagram_username': 'instagram_username', + 'facebook_url': 'facebook_url', + 'coordinates': 'coordinates' } self._id = id @@ -90,6 +102,12 @@ def __init__(self, id=None, name=None, address=None, timezone=None, capabilities self._type = type self._website_url = website_url self._business_hours = business_hours + self._business_email = business_email + self._description = description + self._twitter_username = twitter_username + self._instagram_username = instagram_username + self._facebook_url = facebook_url + self._coordinates = coordinates @property def id(self): @@ -459,6 +477,144 @@ def business_hours(self, business_hours): self._business_hours = business_hours + @property + def business_email(self): + """ + Gets the business_email of this Location. + The email of the location. + + :return: The business_email of this Location. + :rtype: str + """ + return self._business_email + + @business_email.setter + def business_email(self, business_email): + """ + Sets the business_email of this Location. + The email of the location. + + :param business_email: The business_email of this Location. + :type: str + """ + + self._business_email = business_email + + @property + def description(self): + """ + Gets the description of this Location. + The business description of the location. + + :return: The description of this Location. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Location. + The business description of the location. + + :param description: The description of this Location. + :type: str + """ + + self._description = description + + @property + def twitter_username(self): + """ + Gets the twitter_username of this Location. + The Twitter username of the location without the ' + + :return: The twitter_username of this Location. + :rtype: str + """ + return self._twitter_username + + @twitter_username.setter + def twitter_username(self, twitter_username): + """ + Sets the twitter_username of this Location. + The Twitter username of the location without the ' + + :param twitter_username: The twitter_username of this Location. + :type: str + """ + + self._twitter_username = twitter_username + + @property + def instagram_username(self): + """ + Gets the instagram_username of this Location. + The Instagram username of the location without the ' + + :return: The instagram_username of this Location. + :rtype: str + """ + return self._instagram_username + + @instagram_username.setter + def instagram_username(self, instagram_username): + """ + Sets the instagram_username of this Location. + The Instagram username of the location without the ' + + :param instagram_username: The instagram_username of this Location. + :type: str + """ + + self._instagram_username = instagram_username + + @property + def facebook_url(self): + """ + Gets the facebook_url of this Location. + The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. + + :return: The facebook_url of this Location. + :rtype: str + """ + return self._facebook_url + + @facebook_url.setter + def facebook_url(self, facebook_url): + """ + Sets the facebook_url of this Location. + The Facebook profile URL of the location. The URL should begin with 'facebook.com/'. + + :param facebook_url: The facebook_url of this Location. + :type: str + """ + + self._facebook_url = facebook_url + + @property + def coordinates(self): + """ + Gets the coordinates of this Location. + The physical coordinates (latitude and longitude) of the location. + + :return: The coordinates of this Location. + :rtype: Coordinates + """ + return self._coordinates + + @coordinates.setter + def coordinates(self, coordinates): + """ + Sets the coordinates of this Location. + The physical coordinates (latitude and longitude) of the location. + + :param coordinates: The coordinates of this Location. + :type: Coordinates + """ + + self._coordinates = coordinates + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/measurement_unit.py b/squareconnect/models/measurement_unit.py index 5ae5aaf..0025c10 100644 --- a/squareconnect/models/measurement_unit.py +++ b/squareconnect/models/measurement_unit.py @@ -27,7 +27,7 @@ class MeasurementUnit(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, custom_unit=None, area_unit=None, length_unit=None, volume_unit=None, weight_unit=None): + def __init__(self, custom_unit=None, area_unit=None, length_unit=None, volume_unit=None, weight_unit=None, generic_unit=None): """ MeasurementUnit - a model defined in Swagger @@ -41,7 +41,8 @@ def __init__(self, custom_unit=None, area_unit=None, length_unit=None, volume_un 'area_unit': 'str', 'length_unit': 'str', 'volume_unit': 'str', - 'weight_unit': 'str' + 'weight_unit': 'str', + 'generic_unit': 'str' } self.attribute_map = { @@ -49,7 +50,8 @@ def __init__(self, custom_unit=None, area_unit=None, length_unit=None, volume_un 'area_unit': 'area_unit', 'length_unit': 'length_unit', 'volume_unit': 'volume_unit', - 'weight_unit': 'weight_unit' + 'weight_unit': 'weight_unit', + 'generic_unit': 'generic_unit' } self._custom_unit = custom_unit @@ -57,6 +59,7 @@ def __init__(self, custom_unit=None, area_unit=None, length_unit=None, volume_un self._length_unit = length_unit self._volume_unit = volume_unit self._weight_unit = weight_unit + self._generic_unit = generic_unit @property def custom_unit(self): @@ -173,6 +176,29 @@ def weight_unit(self, weight_unit): self._weight_unit = weight_unit + @property + def generic_unit(self): + """ + Gets the generic_unit of this MeasurementUnit. + Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values + + :return: The generic_unit of this MeasurementUnit. + :rtype: str + """ + return self._generic_unit + + @generic_unit.setter + def generic_unit(self, generic_unit): + """ + Sets the generic_unit of this MeasurementUnit. + Reserved for API integrations that lack the ability to specify a real measurement unit See [MeasurementUnitGeneric](#type-measurementunitgeneric) for possible values + + :param generic_unit: The generic_unit of this MeasurementUnit. + :type: str + """ + + self._generic_unit = generic_unit + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/measurement_unit_generic.py b/squareconnect/models/measurement_unit_generic.py new file mode 100644 index 0000000..a984420 --- /dev/null +++ b/squareconnect/models/measurement_unit_generic.py @@ -0,0 +1,95 @@ +# 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 MeasurementUnitGeneric(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + MeasurementUnitGeneric - 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/money.py b/squareconnect/models/money.py index 34408ee..989eeac 100644 --- a/squareconnect/models/money.py +++ b/squareconnect/models/money.py @@ -70,11 +70,6 @@ def amount(self, amount): :type: int """ - if amount is None: - raise ValueError("Invalid value for `amount`, must not be `None`") - if amount < 0: - raise ValueError("Invalid value for `amount`, must be a value greater than or equal to `0`") - self._amount = amount @property diff --git a/squareconnect/models/obtain_token_response.py b/squareconnect/models/obtain_token_response.py index a3d6ae3..1a2d46a 100644 --- a/squareconnect/models/obtain_token_response.py +++ b/squareconnect/models/obtain_token_response.py @@ -163,7 +163,7 @@ def merchant_id(self, merchant_id): def subscription_id(self): """ Gets the subscription_id of this ObtainTokenResponse. - __Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :return: The subscription_id of this ObtainTokenResponse. :rtype: str @@ -174,7 +174,7 @@ def subscription_id(self): def subscription_id(self, subscription_id): """ Sets the subscription_id of this ObtainTokenResponse. - __Legacy field__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of a subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :param subscription_id: The subscription_id of this ObtainTokenResponse. :type: str @@ -186,7 +186,7 @@ def subscription_id(self, subscription_id): def plan_id(self): """ Gets the plan_id of this ObtainTokenResponse. - The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :return: The plan_id of this ObtainTokenResponse. :rtype: str @@ -197,7 +197,7 @@ def plan_id(self): def plan_id(self, plan_id): """ Sets the plan_id of this ObtainTokenResponse. - The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :param plan_id: The plan_id of this ObtainTokenResponse. :type: str diff --git a/squareconnect/models/order.py b/squareconnect/models/order.py index 47d5c91..78e6b89 100644 --- a/squareconnect/models/order.py +++ b/squareconnect/models/order.py @@ -27,7 +27,7 @@ class Order(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, id=None, location_id=None, reference_id=None, source=None, customer_id=None, line_items=None, taxes=None, discounts=None, fulfillments=None, returns=None, return_amounts=None, net_amounts=None, rounding_adjustment=None, tenders=None, refunds=None, created_at=None, updated_at=None, closed_at=None, state=None, total_money=None, total_tax_money=None, total_discount_money=None): + def __init__(self, id=None, location_id=None, reference_id=None, source=None, customer_id=None, line_items=None, taxes=None, discounts=None, service_charges=None, fulfillments=None, returns=None, return_amounts=None, net_amounts=None, rounding_adjustment=None, tenders=None, refunds=None, created_at=None, updated_at=None, closed_at=None, state=None, total_money=None, total_tax_money=None, total_discount_money=None, total_service_charge_money=None): """ Order - a model defined in Swagger @@ -45,6 +45,7 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu 'line_items': 'list[OrderLineItem]', 'taxes': 'list[OrderLineItemTax]', 'discounts': 'list[OrderLineItemDiscount]', + 'service_charges': 'list[OrderServiceCharge]', 'fulfillments': 'list[OrderFulfillment]', 'returns': 'list[OrderReturn]', 'return_amounts': 'OrderMoneyAmounts', @@ -58,7 +59,8 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu 'state': 'str', 'total_money': 'Money', 'total_tax_money': 'Money', - 'total_discount_money': 'Money' + 'total_discount_money': 'Money', + 'total_service_charge_money': 'Money' } self.attribute_map = { @@ -70,6 +72,7 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu 'line_items': 'line_items', 'taxes': 'taxes', 'discounts': 'discounts', + 'service_charges': 'service_charges', 'fulfillments': 'fulfillments', 'returns': 'returns', 'return_amounts': 'return_amounts', @@ -83,7 +86,8 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu 'state': 'state', 'total_money': 'total_money', 'total_tax_money': 'total_tax_money', - 'total_discount_money': 'total_discount_money' + 'total_discount_money': 'total_discount_money', + 'total_service_charge_money': 'total_service_charge_money' } self._id = id @@ -94,6 +98,7 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu self._line_items = line_items self._taxes = taxes self._discounts = discounts + self._service_charges = service_charges self._fulfillments = fulfillments self._returns = returns self._return_amounts = return_amounts @@ -108,12 +113,13 @@ def __init__(self, id=None, location_id=None, reference_id=None, source=None, cu self._total_money = total_money self._total_tax_money = total_tax_money self._total_discount_money = total_discount_money + self._total_service_charge_money = total_service_charge_money @property def id(self): """ Gets the id of this Order. - The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint. + The order's unique ID. This field is read-only. :return: The id of this Order. :rtype: str @@ -124,7 +130,7 @@ def id(self): def id(self, id): """ Sets the id of this Order. - The order's unique ID. This value is only present for Order objects created by the Orders API through the [CreateOrder](#endpoint-orders-createorder) endpoint. + The order's unique ID. This field is read-only. :param id: The id of this Order. :type: str @@ -303,6 +309,29 @@ def discounts(self, discounts): self._discounts = discounts + @property + def service_charges(self): + """ + Gets the service_charges of this Order. + A list of service charges applied to the order. + + :return: The service_charges of this Order. + :rtype: list[OrderServiceCharge] + """ + return self._service_charges + + @service_charges.setter + def service_charges(self, service_charges): + """ + Sets the service_charges of this Order. + A list of service charges applied to the order. + + :param service_charges: The service_charges of this Order. + :type: list[OrderServiceCharge] + """ + + self._service_charges = service_charges + @property def fulfillments(self): """ @@ -330,7 +359,7 @@ def fulfillments(self, fulfillments): def returns(self): """ Gets the returns of this Order. - Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. + Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only. :return: The returns of this Order. :rtype: list[OrderReturn] @@ -341,7 +370,7 @@ def returns(self): def returns(self, returns): """ Sets the returns of this Order. - Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. + Collection of items from sale Orders being returned in this one. Normally part of an Itemized Return or Exchange. There will be exactly one `Return` object per sale Order being referenced. This field is read-only. :param returns: The returns of this Order. :type: list[OrderReturn] @@ -353,7 +382,7 @@ def returns(self, returns): def return_amounts(self): """ Gets the return_amounts of this Order. - Rollup of returned money amounts. + Rollup of returned money amounts. This field is read-only. :return: The return_amounts of this Order. :rtype: OrderMoneyAmounts @@ -364,7 +393,7 @@ def return_amounts(self): def return_amounts(self, return_amounts): """ Sets the return_amounts of this Order. - Rollup of returned money amounts. + Rollup of returned money amounts. This field is read-only. :param return_amounts: The return_amounts of this Order. :type: OrderMoneyAmounts @@ -376,7 +405,7 @@ def return_amounts(self, return_amounts): def net_amounts(self): """ Gets the net_amounts of this Order. - Net money amounts (sale money - return money). + Net money amounts (sale money - return money). This field is read-only. :return: The net_amounts of this Order. :rtype: OrderMoneyAmounts @@ -387,7 +416,7 @@ def net_amounts(self): def net_amounts(self, net_amounts): """ Sets the net_amounts of this Order. - Net money amounts (sale money - return money). + Net money amounts (sale money - return money). This field is read-only. :param net_amounts: The net_amounts of this Order. :type: OrderMoneyAmounts @@ -399,7 +428,7 @@ def net_amounts(self, net_amounts): def rounding_adjustment(self): """ Gets the rounding_adjustment of this Order. - A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. + A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only. :return: The rounding_adjustment of this Order. :rtype: OrderRoundingAdjustment @@ -410,7 +439,7 @@ def rounding_adjustment(self): def rounding_adjustment(self, rounding_adjustment): """ Sets the rounding_adjustment of this Order. - A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. + A positive or negative rounding adjustment to the total of the order, commonly used to apply Cash Rounding when the minimum unit of account is smaller than the lowest physical denomination of currency. This field is read-only. :param rounding_adjustment: The rounding_adjustment of this Order. :type: OrderRoundingAdjustment @@ -468,7 +497,7 @@ def refunds(self, refunds): def created_at(self): """ Gets the created_at of this Order. - Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :return: The created_at of this Order. :rtype: str @@ -479,7 +508,7 @@ def created_at(self): def created_at(self, created_at): """ Sets the created_at of this Order. - Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was created. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :param created_at: The created_at of this Order. :type: str @@ -491,7 +520,7 @@ def created_at(self, created_at): def updated_at(self): """ Gets the updated_at of this Order. - Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :return: The updated_at of this Order. :rtype: str @@ -502,7 +531,7 @@ def updated_at(self): def updated_at(self, updated_at): """ Sets the updated_at of this Order. - Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was last updated. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :param updated_at: The updated_at of this Order. :type: str @@ -514,7 +543,7 @@ def updated_at(self, updated_at): def closed_at(self): """ Gets the closed_at of this Order. - Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :return: The closed_at of this Order. :rtype: str @@ -525,7 +554,7 @@ def closed_at(self): def closed_at(self, closed_at): """ Sets the closed_at of this Order. - Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". + Timestamp for when the order was closed. In RFC 3339 format, e.g., \"2016-09-04T23:59:33.123Z\". This field is read-only. :param closed_at: The closed_at of this Order. :type: str @@ -560,7 +589,7 @@ def state(self, state): def total_money(self): """ Gets the total_money of this Order. - The total amount of money to collect for the order. + The total amount of money to collect for the order. This field is read-only. :return: The total_money of this Order. :rtype: Money @@ -571,7 +600,7 @@ def total_money(self): def total_money(self, total_money): """ Sets the total_money of this Order. - The total amount of money to collect for the order. + The total amount of money to collect for the order. This field is read-only. :param total_money: The total_money of this Order. :type: Money @@ -583,7 +612,7 @@ def total_money(self, total_money): def total_tax_money(self): """ Gets the total_tax_money of this Order. - The total tax amount of money to collect for the order. + The total tax amount of money to collect for the order. This field is read-only. :return: The total_tax_money of this Order. :rtype: Money @@ -594,7 +623,7 @@ def total_tax_money(self): def total_tax_money(self, total_tax_money): """ Sets the total_tax_money of this Order. - The total tax amount of money to collect for the order. + The total tax amount of money to collect for the order. This field is read-only. :param total_tax_money: The total_tax_money of this Order. :type: Money @@ -606,7 +635,7 @@ def total_tax_money(self, total_tax_money): def total_discount_money(self): """ Gets the total_discount_money of this Order. - The total discount amount of money to collect for the order. + The total discount amount of money to collect for the order. This field is read-only. :return: The total_discount_money of this Order. :rtype: Money @@ -617,7 +646,7 @@ def total_discount_money(self): def total_discount_money(self, total_discount_money): """ Sets the total_discount_money of this Order. - The total discount amount of money to collect for the order. + The total discount amount of money to collect for the order. This field is read-only. :param total_discount_money: The total_discount_money of this Order. :type: Money @@ -625,6 +654,29 @@ def total_discount_money(self, total_discount_money): self._total_discount_money = total_discount_money + @property + def total_service_charge_money(self): + """ + Gets the total_service_charge_money of this Order. + The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only. + + :return: The total_service_charge_money of this Order. + :rtype: Money + """ + return self._total_service_charge_money + + @total_service_charge_money.setter + def total_service_charge_money(self, total_service_charge_money): + """ + Sets the total_service_charge_money of this Order. + The total amount of money collected in service charges for the order. Note: `total_service_charge_money` is the sum of `applied_money` fields for each individual service charge. Therefore, `total_service_charge_money` will only include inclusive tax amounts, not additive tax amounts. This field is read-only. + + :param total_service_charge_money: The total_service_charge_money of this Order. + :type: Money + """ + + self._total_service_charge_money = total_service_charge_money + def to_dict(self): """ Returns the model properties as a dict diff --git a/squareconnect/models/order_line_item.py b/squareconnect/models/order_line_item.py index 9f733cb..eca07fa 100644 --- a/squareconnect/models/order_line_item.py +++ b/squareconnect/models/order_line_item.py @@ -95,7 +95,7 @@ def __init__(self, uid=None, name=None, quantity=None, quantity_unit=None, note= def uid(self): """ Gets the uid of this OrderLineItem. - The line item's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the line item only within this order. This field is read-only. :return: The uid of this OrderLineItem. :rtype: str @@ -106,7 +106,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderLineItem. - The line item's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the line item only within this order. This field is read-only. :param uid: The uid of this OrderLineItem. :type: str @@ -403,7 +403,7 @@ def variation_total_price_money(self, variation_total_price_money): def gross_sales_money(self): """ Gets the gross_sales_money of this OrderLineItem. - The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. + The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only. :return: The gross_sales_money of this OrderLineItem. :rtype: Money @@ -414,7 +414,7 @@ def gross_sales_money(self): def gross_sales_money(self, gross_sales_money): """ Sets the gross_sales_money of this OrderLineItem. - The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. + The amount of money made in gross sales for this line item. Calculated as the sum of the variation's total price and each modifier's total price. This field is read-only. :param gross_sales_money: The gross_sales_money of this OrderLineItem. :type: Money @@ -426,7 +426,7 @@ def gross_sales_money(self, gross_sales_money): def total_tax_money(self): """ Gets the total_tax_money of this OrderLineItem. - The total tax amount of money to collect for the line item. + The total tax amount of money to collect for the line item. This field is read-only. :return: The total_tax_money of this OrderLineItem. :rtype: Money @@ -437,7 +437,7 @@ def total_tax_money(self): def total_tax_money(self, total_tax_money): """ Sets the total_tax_money of this OrderLineItem. - The total tax amount of money to collect for the line item. + The total tax amount of money to collect for the line item. This field is read-only. :param total_tax_money: The total_tax_money of this OrderLineItem. :type: Money @@ -449,7 +449,7 @@ def total_tax_money(self, total_tax_money): def total_discount_money(self): """ Gets the total_discount_money of this OrderLineItem. - The total discount amount of money to collect for the line item. + The total discount amount of money to collect for the line item. This field is read-only. :return: The total_discount_money of this OrderLineItem. :rtype: Money @@ -460,7 +460,7 @@ def total_discount_money(self): def total_discount_money(self, total_discount_money): """ Sets the total_discount_money of this OrderLineItem. - The total discount amount of money to collect for the line item. + The total discount amount of money to collect for the line item. This field is read-only. :param total_discount_money: The total_discount_money of this OrderLineItem. :type: Money @@ -472,7 +472,7 @@ def total_discount_money(self, total_discount_money): def total_money(self): """ Gets the total_money of this OrderLineItem. - The total amount of money to collect for this line item. + The total amount of money to collect for this line item. This field is read-only. :return: The total_money of this OrderLineItem. :rtype: Money @@ -483,7 +483,7 @@ def total_money(self): def total_money(self, total_money): """ Sets the total_money of this OrderLineItem. - The total amount of money to collect for this line item. + The total amount of money to collect for this line item. This field is read-only. :param total_money: The total_money of this OrderLineItem. :type: Money diff --git a/squareconnect/models/order_line_item_discount.py b/squareconnect/models/order_line_item_discount.py index df52f09..0287ea5 100644 --- a/squareconnect/models/order_line_item_discount.py +++ b/squareconnect/models/order_line_item_discount.py @@ -71,7 +71,7 @@ def __init__(self, uid=None, catalog_object_id=None, name=None, type=None, perce def uid(self): """ Gets the uid of this OrderLineItemDiscount. - The discount's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the discount only within this order. This field is read-only. :return: The uid of this OrderLineItemDiscount. :rtype: str @@ -82,7 +82,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderLineItemDiscount. - The discount's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the discount only within this order. This field is read-only. :param uid: The uid of this OrderLineItemDiscount. :type: str diff --git a/squareconnect/models/order_line_item_modifier.py b/squareconnect/models/order_line_item_modifier.py index c0d572f..0adab35 100644 --- a/squareconnect/models/order_line_item_modifier.py +++ b/squareconnect/models/order_line_item_modifier.py @@ -62,7 +62,7 @@ def __init__(self, uid=None, catalog_object_id=None, name=None, base_price_money def uid(self): """ Gets the uid of this OrderLineItemModifier. - The modifier's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the modifier only within this order. This field is read-only. :return: The uid of this OrderLineItemModifier. :rtype: str @@ -73,7 +73,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderLineItemModifier. - The modifier's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the modifier only within this order. This field is read-only. :param uid: The uid of this OrderLineItemModifier. :type: str diff --git a/squareconnect/models/order_line_item_tax.py b/squareconnect/models/order_line_item_tax.py index 2fc16ab..5de34b4 100644 --- a/squareconnect/models/order_line_item_tax.py +++ b/squareconnect/models/order_line_item_tax.py @@ -68,7 +68,7 @@ def __init__(self, uid=None, catalog_object_id=None, name=None, type=None, perce def uid(self): """ Gets the uid of this OrderLineItemTax. - The tax's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the tax only within this order. This field is read-only. :return: The uid of this OrderLineItemTax. :rtype: str @@ -79,7 +79,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderLineItemTax. - The tax's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the tax only within this order. This field is read-only. :param uid: The uid of this OrderLineItemTax. :type: str diff --git a/squareconnect/models/order_return.py b/squareconnect/models/order_return.py index 648185f..c51b99b 100644 --- a/squareconnect/models/order_return.py +++ b/squareconnect/models/order_return.py @@ -27,7 +27,7 @@ class OrderReturn(object): NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, uid=None, source_order_id=None, return_line_items=None, return_taxes=None, return_discounts=None, rounding_adjustment=None, return_amounts=None): + def __init__(self, uid=None, source_order_id=None, return_line_items=None, return_service_charges=None, return_taxes=None, return_discounts=None, rounding_adjustment=None, return_amounts=None): """ OrderReturn - a model defined in Swagger @@ -40,6 +40,7 @@ def __init__(self, uid=None, source_order_id=None, return_line_items=None, retur 'uid': 'str', 'source_order_id': 'str', 'return_line_items': 'list[OrderReturnLineItem]', + 'return_service_charges': 'list[OrderReturnServiceCharge]', 'return_taxes': 'list[OrderReturnTax]', 'return_discounts': 'list[OrderReturnDiscount]', 'rounding_adjustment': 'OrderRoundingAdjustment', @@ -50,6 +51,7 @@ def __init__(self, uid=None, source_order_id=None, return_line_items=None, retur 'uid': 'uid', 'source_order_id': 'source_order_id', 'return_line_items': 'return_line_items', + 'return_service_charges': 'return_service_charges', 'return_taxes': 'return_taxes', 'return_discounts': 'return_discounts', 'rounding_adjustment': 'rounding_adjustment', @@ -59,6 +61,7 @@ def __init__(self, uid=None, source_order_id=None, return_line_items=None, retur self._uid = uid self._source_order_id = source_order_id self._return_line_items = return_line_items + self._return_service_charges = return_service_charges self._return_taxes = return_taxes self._return_discounts = return_discounts self._rounding_adjustment = rounding_adjustment @@ -68,7 +71,7 @@ def __init__(self, uid=None, source_order_id=None, return_line_items=None, retur def uid(self): """ Gets the uid of this OrderReturn. - The return's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the return only within this order. This field is read-only. :return: The uid of this OrderReturn. :rtype: str @@ -79,7 +82,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderReturn. - The return's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the return only within this order. This field is read-only. :param uid: The uid of this OrderReturn. :type: str @@ -138,6 +141,29 @@ def return_line_items(self, return_line_items): self._return_line_items = return_line_items + @property + def return_service_charges(self): + """ + Gets the return_service_charges of this OrderReturn. + Collection of service charges which are being returned. This field is read-only. + + :return: The return_service_charges of this OrderReturn. + :rtype: list[OrderReturnServiceCharge] + """ + return self._return_service_charges + + @return_service_charges.setter + def return_service_charges(self, return_service_charges): + """ + Sets the return_service_charges of this OrderReturn. + Collection of service charges which are being returned. This field is read-only. + + :param return_service_charges: The return_service_charges of this OrderReturn. + :type: list[OrderReturnServiceCharge] + """ + + self._return_service_charges = return_service_charges + @property def return_taxes(self): """ diff --git a/squareconnect/models/order_return_discount.py b/squareconnect/models/order_return_discount.py index d0329d6..d038d79 100644 --- a/squareconnect/models/order_return_discount.py +++ b/squareconnect/models/order_return_discount.py @@ -74,7 +74,7 @@ def __init__(self, uid=None, source_discount_uid=None, catalog_object_id=None, n def uid(self): """ Gets the uid of this OrderReturnDiscount. - The return discount's Unique identifier, unique only within this order. + Unique ID that identifies the return discount only within this order. This field is read-only. :return: The uid of this OrderReturnDiscount. :rtype: str @@ -85,7 +85,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderReturnDiscount. - The return discount's Unique identifier, unique only within this order. + Unique ID that identifies the return discount only within this order. This field is read-only. :param uid: The uid of this OrderReturnDiscount. :type: str diff --git a/squareconnect/models/order_return_line_item.py b/squareconnect/models/order_return_line_item.py index 07aaa79..ce32f1e 100644 --- a/squareconnect/models/order_return_line_item.py +++ b/squareconnect/models/order_return_line_item.py @@ -434,7 +434,7 @@ def variation_total_price_money(self, variation_total_price_money): def gross_return_money(self): """ Gets the gross_return_money of this OrderReturnLineItem. - The gross return amount of money calculated as (item base price + modifiers price) * quantity. + The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only. :return: The gross_return_money of this OrderReturnLineItem. :rtype: Money @@ -445,7 +445,7 @@ def gross_return_money(self): def gross_return_money(self, gross_return_money): """ Sets the gross_return_money of this OrderReturnLineItem. - The gross return amount of money calculated as (item base price + modifiers price) * quantity. + The gross return amount of money calculated as (item base price + modifiers price) * quantity. This field is read-only. :param gross_return_money: The gross_return_money of this OrderReturnLineItem. :type: Money @@ -457,7 +457,7 @@ def gross_return_money(self, gross_return_money): def total_tax_money(self): """ Gets the total_tax_money of this OrderReturnLineItem. - The total tax amount of money to return for the line item. + The total tax amount of money to return for the line item. This field is read-only. :return: The total_tax_money of this OrderReturnLineItem. :rtype: Money @@ -468,7 +468,7 @@ def total_tax_money(self): def total_tax_money(self, total_tax_money): """ Sets the total_tax_money of this OrderReturnLineItem. - The total tax amount of money to return for the line item. + The total tax amount of money to return for the line item. This field is read-only. :param total_tax_money: The total_tax_money of this OrderReturnLineItem. :type: Money @@ -480,7 +480,7 @@ def total_tax_money(self, total_tax_money): def total_discount_money(self): """ Gets the total_discount_money of this OrderReturnLineItem. - The total discount amount of money to return for the line item. + The total discount amount of money to return for the line item. This field is read-only. :return: The total_discount_money of this OrderReturnLineItem. :rtype: Money @@ -491,7 +491,7 @@ def total_discount_money(self): def total_discount_money(self, total_discount_money): """ Sets the total_discount_money of this OrderReturnLineItem. - The total discount amount of money to return for the line item. + The total discount amount of money to return for the line item. This field is read-only. :param total_discount_money: The total_discount_money of this OrderReturnLineItem. :type: Money @@ -503,7 +503,7 @@ def total_discount_money(self, total_discount_money): def total_money(self): """ Gets the total_money of this OrderReturnLineItem. - The total amount of money to return for this line item. + The total amount of money to return for this line item. This field is read-only. :return: The total_money of this OrderReturnLineItem. :rtype: Money @@ -514,7 +514,7 @@ def total_money(self): def total_money(self, total_money): """ Sets the total_money of this OrderReturnLineItem. - The total amount of money to return for this line item. + The total amount of money to return for this line item. This field is read-only. :param total_money: The total_money of this OrderReturnLineItem. :type: Money diff --git a/squareconnect/models/order_return_line_item_modifier.py b/squareconnect/models/order_return_line_item_modifier.py index 44ce8b5..de8098a 100644 --- a/squareconnect/models/order_return_line_item_modifier.py +++ b/squareconnect/models/order_return_line_item_modifier.py @@ -65,7 +65,7 @@ def __init__(self, uid=None, source_modifier_uid=None, catalog_object_id=None, n def uid(self): """ Gets the uid of this OrderReturnLineItemModifier. - The return modifier's Unique identifier, unique only within this order + Unique ID that identifies the return modifier only within this order. This field is read-only. :return: The uid of this OrderReturnLineItemModifier. :rtype: str @@ -76,7 +76,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderReturnLineItemModifier. - The return modifier's Unique identifier, unique only within this order + Unique ID that identifies the return modifier only within this order. This field is read-only. :param uid: The uid of this OrderReturnLineItemModifier. :type: str diff --git a/squareconnect/models/order_return_service_charge.py b/squareconnect/models/order_return_service_charge.py new file mode 100644 index 0000000..c2d1c37 --- /dev/null +++ b/squareconnect/models/order_return_service_charge.py @@ -0,0 +1,431 @@ +# 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 OrderReturnServiceCharge(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, uid=None, source_service_charge_uid=None, name=None, catalog_object_id=None, percentage=None, amount_money=None, applied_money=None, total_money=None, total_tax_money=None, calculation_phase=None, taxable=None, return_taxes=None): + """ + OrderReturnServiceCharge - 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 = { + 'uid': 'str', + 'source_service_charge_uid': 'str', + 'name': 'str', + 'catalog_object_id': 'str', + 'percentage': 'str', + 'amount_money': 'Money', + 'applied_money': 'Money', + 'total_money': 'Money', + 'total_tax_money': 'Money', + 'calculation_phase': 'str', + 'taxable': 'bool', + 'return_taxes': 'list[OrderReturnTax]' + } + + self.attribute_map = { + 'uid': 'uid', + 'source_service_charge_uid': 'source_service_charge_uid', + 'name': 'name', + 'catalog_object_id': 'catalog_object_id', + 'percentage': 'percentage', + 'amount_money': 'amount_money', + 'applied_money': 'applied_money', + 'total_money': 'total_money', + 'total_tax_money': 'total_tax_money', + 'calculation_phase': 'calculation_phase', + 'taxable': 'taxable', + 'return_taxes': 'return_taxes' + } + + self._uid = uid + self._source_service_charge_uid = source_service_charge_uid + self._name = name + self._catalog_object_id = catalog_object_id + self._percentage = percentage + self._amount_money = amount_money + self._applied_money = applied_money + self._total_money = total_money + self._total_tax_money = total_tax_money + self._calculation_phase = calculation_phase + self._taxable = taxable + self._return_taxes = return_taxes + + @property + def uid(self): + """ + Gets the uid of this OrderReturnServiceCharge. + Unique ID that identifies the return service charge only within this order. This field is read-only. + + :return: The uid of this OrderReturnServiceCharge. + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """ + Sets the uid of this OrderReturnServiceCharge. + Unique ID that identifies the return service charge only within this order. This field is read-only. + + :param uid: The uid of this OrderReturnServiceCharge. + :type: str + """ + + if uid is None: + raise ValueError("Invalid value for `uid`, must not be `None`") + if len(uid) > 60: + raise ValueError("Invalid value for `uid`, length must be less than `60`") + + self._uid = uid + + @property + def source_service_charge_uid(self): + """ + Gets the source_service_charge_uid of this OrderReturnServiceCharge. + `uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns. + + :return: The source_service_charge_uid of this OrderReturnServiceCharge. + :rtype: str + """ + return self._source_service_charge_uid + + @source_service_charge_uid.setter + def source_service_charge_uid(self, source_service_charge_uid): + """ + Sets the source_service_charge_uid of this OrderReturnServiceCharge. + `uid` of the Service Charge from the Order which contains the original charge of this service charge, null for unlinked returns. + + :param source_service_charge_uid: The source_service_charge_uid of this OrderReturnServiceCharge. + :type: str + """ + + if source_service_charge_uid is None: + raise ValueError("Invalid value for `source_service_charge_uid`, must not be `None`") + if len(source_service_charge_uid) > 60: + raise ValueError("Invalid value for `source_service_charge_uid`, length must be less than `60`") + + self._source_service_charge_uid = source_service_charge_uid + + @property + def name(self): + """ + Gets the name of this OrderReturnServiceCharge. + The name of the service charge. + + :return: The name of this OrderReturnServiceCharge. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OrderReturnServiceCharge. + The name of the service charge. + + :param name: The name of this OrderReturnServiceCharge. + :type: str + """ + + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") + if len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than `255`") + + self._name = name + + @property + def catalog_object_id(self): + """ + Gets the catalog_object_id of this OrderReturnServiceCharge. + The ID referencing the service charge [CatalogObject](#type-catalogobject) + + :return: The catalog_object_id of this OrderReturnServiceCharge. + :rtype: str + """ + return self._catalog_object_id + + @catalog_object_id.setter + def catalog_object_id(self, catalog_object_id): + """ + Sets the catalog_object_id of this OrderReturnServiceCharge. + The ID referencing the service charge [CatalogObject](#type-catalogobject) + + :param catalog_object_id: The catalog_object_id of this OrderReturnServiceCharge. + :type: str + """ + + if catalog_object_id is None: + raise ValueError("Invalid value for `catalog_object_id`, must not be `None`") + if len(catalog_object_id) > 192: + raise ValueError("Invalid value for `catalog_object_id`, length must be less than `192`") + + self._catalog_object_id = catalog_object_id + + @property + def percentage(self): + """ + Gets the percentage of this OrderReturnServiceCharge. + The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set. + + :return: The percentage of this OrderReturnServiceCharge. + :rtype: str + """ + return self._percentage + + @percentage.setter + def percentage(self, percentage): + """ + Sets the percentage of this OrderReturnServiceCharge. + The percentage of the service charge, as a string representation of a decimal number. A value of `7.25` corresponds to a percentage of 7.25%. Exactly one of percentage or amount_money should be set. + + :param percentage: The percentage of this OrderReturnServiceCharge. + :type: str + """ + + if percentage is None: + raise ValueError("Invalid value for `percentage`, must not be `None`") + if len(percentage) > 10: + raise ValueError("Invalid value for `percentage`, length must be less than `10`") + + self._percentage = percentage + + @property + def amount_money(self): + """ + Gets the amount_money of this OrderReturnServiceCharge. + The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set. + + :return: The amount_money of this OrderReturnServiceCharge. + :rtype: Money + """ + return self._amount_money + + @amount_money.setter + def amount_money(self, amount_money): + """ + Sets the amount_money of this OrderReturnServiceCharge. + The amount of a non-percentage based service charge. Exactly one of percentage or amount_money should be set. + + :param amount_money: The amount_money of this OrderReturnServiceCharge. + :type: Money + """ + + self._amount_money = amount_money + + @property + def applied_money(self): + """ + Gets the applied_money of this OrderReturnServiceCharge. + The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + + :return: The applied_money of this OrderReturnServiceCharge. + :rtype: Money + """ + return self._applied_money + + @applied_money.setter + def applied_money(self, applied_money): + """ + Sets the applied_money of this OrderReturnServiceCharge. + The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + + :param applied_money: The applied_money of this OrderReturnServiceCharge. + :type: Money + """ + + self._applied_money = applied_money + + @property + def total_money(self): + """ + Gets the total_money of this OrderReturnServiceCharge. + The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + + :return: The total_money of this OrderReturnServiceCharge. + :rtype: Money + """ + return self._total_money + + @total_money.setter + def total_money(self, total_money): + """ + Sets the total_money of this OrderReturnServiceCharge. + The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + + :param total_money: The total_money of this OrderReturnServiceCharge. + :type: Money + """ + + self._total_money = total_money + + @property + def total_tax_money(self): + """ + Gets the total_tax_money of this OrderReturnServiceCharge. + The total amount of tax money to collect for the service charge. This field is read-only. + + :return: The total_tax_money of this OrderReturnServiceCharge. + :rtype: Money + """ + return self._total_tax_money + + @total_tax_money.setter + def total_tax_money(self, total_tax_money): + """ + Sets the total_tax_money of this OrderReturnServiceCharge. + The total amount of tax money to collect for the service charge. This field is read-only. + + :param total_tax_money: The total_tax_money of this OrderReturnServiceCharge. + :type: Money + """ + + self._total_tax_money = total_tax_money + + @property + def calculation_phase(self): + """ + Gets the calculation_phase of this OrderReturnServiceCharge. + The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + + :return: The calculation_phase of this OrderReturnServiceCharge. + :rtype: str + """ + return self._calculation_phase + + @calculation_phase.setter + def calculation_phase(self, calculation_phase): + """ + Sets the calculation_phase of this OrderReturnServiceCharge. + The calculation phase after which to apply the service charge. This field is read-only. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + + :param calculation_phase: The calculation_phase of this OrderReturnServiceCharge. + :type: str + """ + + self._calculation_phase = calculation_phase + + @property + def taxable(self): + """ + Gets the taxable of this OrderReturnServiceCharge. + Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + + :return: The taxable of this OrderReturnServiceCharge. + :rtype: bool + """ + return self._taxable + + @taxable.setter + def taxable(self, taxable): + """ + Sets the taxable of this OrderReturnServiceCharge. + Indicates whether the surcharge can be taxed. Service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + + :param taxable: The taxable of this OrderReturnServiceCharge. + :type: bool + """ + + self._taxable = taxable + + @property + def return_taxes(self): + """ + Gets the return_taxes of this OrderReturnServiceCharge. + The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable. + + :return: The return_taxes of this OrderReturnServiceCharge. + :rtype: list[OrderReturnTax] + """ + return self._return_taxes + + @return_taxes.setter + def return_taxes(self, return_taxes): + """ + Sets the return_taxes of this OrderReturnServiceCharge. + The taxes which apply to the service charge. Return-level taxes apply by default to service charge calculated in the `SUBTOTAL_PHASE` if the service charge is marked as taxable. + + :param return_taxes: The return_taxes of this OrderReturnServiceCharge. + :type: list[OrderReturnTax] + """ + + self._return_taxes = return_taxes + + 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/order_return_tax.py b/squareconnect/models/order_return_tax.py index 1cf3076..4afb7ec 100644 --- a/squareconnect/models/order_return_tax.py +++ b/squareconnect/models/order_return_tax.py @@ -71,7 +71,7 @@ def __init__(self, uid=None, source_tax_uid=None, catalog_object_id=None, name=N def uid(self): """ Gets the uid of this OrderReturnTax. - The return tax's Unique identifier, unique only within this order. + Unique ID that identifies the return tax only within this order. This field is read-only. :return: The uid of this OrderReturnTax. :rtype: str @@ -82,7 +82,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderReturnTax. - The return tax's Unique identifier, unique only within this order. + Unique ID that identifies the return tax only within this order. This field is read-only. :param uid: The uid of this OrderReturnTax. :type: str diff --git a/squareconnect/models/order_rounding_adjustment.py b/squareconnect/models/order_rounding_adjustment.py index 6020ffc..2f204b3 100644 --- a/squareconnect/models/order_rounding_adjustment.py +++ b/squareconnect/models/order_rounding_adjustment.py @@ -56,7 +56,7 @@ def __init__(self, uid=None, name=None, amount_money=None): def uid(self): """ Gets the uid of this OrderRoundingAdjustment. - The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the rounding adjustment only within this order. This field is read-only. :return: The uid of this OrderRoundingAdjustment. :rtype: str @@ -67,7 +67,7 @@ def uid(self): def uid(self, uid): """ Sets the uid of this OrderRoundingAdjustment. - The rounding adjustment's Unique identifier, unique only within this order. This field is read-only. + Unique ID that identifies the rounding adjustment only within this order. This field is read-only. :param uid: The uid of this OrderRoundingAdjustment. :type: str diff --git a/squareconnect/models/order_service_charge.py b/squareconnect/models/order_service_charge.py new file mode 100644 index 0000000..27c7b4e --- /dev/null +++ b/squareconnect/models/order_service_charge.py @@ -0,0 +1,400 @@ +# 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 OrderServiceCharge(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, uid=None, name=None, catalog_object_id=None, percentage=None, amount_money=None, applied_money=None, total_money=None, total_tax_money=None, calculation_phase=None, taxable=None, taxes=None): + """ + OrderServiceCharge - 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 = { + 'uid': 'str', + 'name': 'str', + 'catalog_object_id': 'str', + 'percentage': 'str', + 'amount_money': 'Money', + 'applied_money': 'Money', + 'total_money': 'Money', + 'total_tax_money': 'Money', + 'calculation_phase': 'str', + 'taxable': 'bool', + 'taxes': 'list[OrderLineItemTax]' + } + + self.attribute_map = { + 'uid': 'uid', + 'name': 'name', + 'catalog_object_id': 'catalog_object_id', + 'percentage': 'percentage', + 'amount_money': 'amount_money', + 'applied_money': 'applied_money', + 'total_money': 'total_money', + 'total_tax_money': 'total_tax_money', + 'calculation_phase': 'calculation_phase', + 'taxable': 'taxable', + 'taxes': 'taxes' + } + + self._uid = uid + self._name = name + self._catalog_object_id = catalog_object_id + self._percentage = percentage + self._amount_money = amount_money + self._applied_money = applied_money + self._total_money = total_money + self._total_tax_money = total_tax_money + self._calculation_phase = calculation_phase + self._taxable = taxable + self._taxes = taxes + + @property + def uid(self): + """ + Gets the uid of this OrderServiceCharge. + Unique ID that identifies the service charge only within this order. This field is read-only. + + :return: The uid of this OrderServiceCharge. + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """ + Sets the uid of this OrderServiceCharge. + Unique ID that identifies the service charge only within this order. This field is read-only. + + :param uid: The uid of this OrderServiceCharge. + :type: str + """ + + if uid is None: + raise ValueError("Invalid value for `uid`, must not be `None`") + if len(uid) > 60: + raise ValueError("Invalid value for `uid`, length must be less than `60`") + + self._uid = uid + + @property + def name(self): + """ + Gets the name of this OrderServiceCharge. + The name of the service charge. + + :return: The name of this OrderServiceCharge. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OrderServiceCharge. + The name of the service charge. + + :param name: The name of this OrderServiceCharge. + :type: str + """ + + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") + if len(name) > 255: + raise ValueError("Invalid value for `name`, length must be less than `255`") + + self._name = name + + @property + def catalog_object_id(self): + """ + Gets the catalog_object_id of this OrderServiceCharge. + The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). + + :return: The catalog_object_id of this OrderServiceCharge. + :rtype: str + """ + return self._catalog_object_id + + @catalog_object_id.setter + def catalog_object_id(self, catalog_object_id): + """ + Sets the catalog_object_id of this OrderServiceCharge. + The catalog object ID referencing the service charge [CatalogObject](#type-catalogobject). + + :param catalog_object_id: The catalog_object_id of this OrderServiceCharge. + :type: str + """ + + if catalog_object_id is None: + raise ValueError("Invalid value for `catalog_object_id`, must not be `None`") + if len(catalog_object_id) > 192: + raise ValueError("Invalid value for `catalog_object_id`, length must be less than `192`") + + self._catalog_object_id = catalog_object_id + + @property + def percentage(self): + """ + Gets the percentage of this OrderServiceCharge. + The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set. + + :return: The percentage of this OrderServiceCharge. + :rtype: str + """ + return self._percentage + + @percentage.setter + def percentage(self, percentage): + """ + Sets the percentage of this OrderServiceCharge. + The service charge percentage, as a string representation of a decimal number. For example, `7.25` indicates 7.25% Exactly one of `percentage` or `amount_money` should be set. + + :param percentage: The percentage of this OrderServiceCharge. + :type: str + """ + + if percentage is None: + raise ValueError("Invalid value for `percentage`, must not be `None`") + if len(percentage) > 10: + raise ValueError("Invalid value for `percentage`, length must be less than `10`") + + self._percentage = percentage + + @property + def amount_money(self): + """ + Gets the amount_money of this OrderServiceCharge. + The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. + + :return: The amount_money of this OrderServiceCharge. + :rtype: Money + """ + return self._amount_money + + @amount_money.setter + def amount_money(self, amount_money): + """ + Sets the amount_money of this OrderServiceCharge. + The amount of a non-percentage based service charge. Exactly one of `percentage` or `amount_money` should be set. + + :param amount_money: The amount_money of this OrderServiceCharge. + :type: Money + """ + + self._amount_money = amount_money + + @property + def applied_money(self): + """ + Gets the applied_money of this OrderServiceCharge. + The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + + :return: The applied_money of this OrderServiceCharge. + :rtype: Money + """ + return self._applied_money + + @applied_money.setter + def applied_money(self, applied_money): + """ + Sets the applied_money of this OrderServiceCharge. + The amount of money applied to the order by the service charge, as calculated by the server. For fixed-amount service charges, `applied_money` is equal to `amount_money`. For percentage-based service charges, `applied_money` is the money calculated using the percentage. The `applied_money` field will include any inclusive tax amounts as well. This field is read-only. + + :param applied_money: The applied_money of this OrderServiceCharge. + :type: Money + """ + + self._applied_money = applied_money + + @property + def total_money(self): + """ + Gets the total_money of this OrderServiceCharge. + The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + + :return: The total_money of this OrderServiceCharge. + :rtype: Money + """ + return self._total_money + + @total_money.setter + def total_money(self, total_money): + """ + Sets the total_money of this OrderServiceCharge. + The total amount of money to collect for the service charge. Note that `total_money` does not equal `applied_money` plus `total_tax_money` if an inclusive tax is applied to the service charge since the inclusive tax amount will be included in both `applied_money` and `total_tax_money`. This field is read-only. + + :param total_money: The total_money of this OrderServiceCharge. + :type: Money + """ + + self._total_money = total_money + + @property + def total_tax_money(self): + """ + Gets the total_tax_money of this OrderServiceCharge. + The total amount of tax money to collect for the service charge. This field is read-only. + + :return: The total_tax_money of this OrderServiceCharge. + :rtype: Money + """ + return self._total_tax_money + + @total_tax_money.setter + def total_tax_money(self, total_tax_money): + """ + Sets the total_tax_money of this OrderServiceCharge. + The total amount of tax money to collect for the service charge. This field is read-only. + + :param total_tax_money: The total_tax_money of this OrderServiceCharge. + :type: Money + """ + + self._total_tax_money = total_tax_money + + @property + def calculation_phase(self): + """ + Gets the calculation_phase of this OrderServiceCharge. + The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + + :return: The calculation_phase of this OrderServiceCharge. + :rtype: str + """ + return self._calculation_phase + + @calculation_phase.setter + def calculation_phase(self, calculation_phase): + """ + Sets the calculation_phase of this OrderServiceCharge. + The calculation phase at which to apply the service charge. See [OrderServiceChargeCalculationPhase](#type-orderservicechargecalculationphase) for possible values + + :param calculation_phase: The calculation_phase of this OrderServiceCharge. + :type: str + """ + + self._calculation_phase = calculation_phase + + @property + def taxable(self): + """ + Gets the taxable of this OrderServiceCharge. + Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + + :return: The taxable of this OrderServiceCharge. + :rtype: bool + """ + return self._taxable + + @taxable.setter + def taxable(self, taxable): + """ + Sets the taxable of this OrderServiceCharge. + Indicates whether the service charge can be taxed. If set to `true`, any order-level taxes will automatically apply to this service charge. Note that service charges calculated in the `TOTAL_PHASE` cannot be marked as taxable. + + :param taxable: The taxable of this OrderServiceCharge. + :type: bool + """ + + self._taxable = taxable + + @property + def taxes(self): + """ + Gets the taxes of this OrderServiceCharge. + Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. + + :return: The taxes of this OrderServiceCharge. + :rtype: list[OrderLineItemTax] + """ + return self._taxes + + @taxes.setter + def taxes(self, taxes): + """ + Sets the taxes of this OrderServiceCharge. + Taxes applied to the service charge. By default, order-level taxes apply to service charges calculated in the `SUBTOTAL_PHASE` if `taxable` is set to `true`. + + :param taxes: The taxes of this OrderServiceCharge. + :type: list[OrderLineItemTax] + """ + + self._taxes = taxes + + 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/order_service_charge_calculation_phase.py b/squareconnect/models/order_service_charge_calculation_phase.py new file mode 100644 index 0000000..fcfed9d --- /dev/null +++ b/squareconnect/models/order_service_charge_calculation_phase.py @@ -0,0 +1,95 @@ +# 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 OrderServiceChargeCalculationPhase(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self): + """ + OrderServiceChargeCalculationPhase - 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/renew_token_response.py b/squareconnect/models/renew_token_response.py index db00ea2..4263924 100644 --- a/squareconnect/models/renew_token_response.py +++ b/squareconnect/models/renew_token_response.py @@ -157,7 +157,7 @@ def merchant_id(self, merchant_id): def subscription_id(self): """ Gets the subscription_id of this RenewTokenResponse. - The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. :return: The subscription_id of this RenewTokenResponse. :rtype: str @@ -168,7 +168,7 @@ def subscription_id(self): def subscription_id(self, subscription_id): """ Sets the subscription_id of this RenewTokenResponse. - The ID of the merchant [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) associated with the authorization. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization. :param subscription_id: The subscription_id of this RenewTokenResponse. :type: str @@ -180,7 +180,7 @@ def subscription_id(self, subscription_id): def plan_id(self): """ Gets the plan_id of this RenewTokenResponse. - The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :return: The plan_id of this RenewTokenResponse. :rtype: str @@ -191,7 +191,7 @@ def plan_id(self): def plan_id(self, plan_id): """ Sets the plan_id of this RenewTokenResponse. - The ID of the [subscription](https://docs.connect.squareup.com/api/connect/v1/#navsection-subscriptionmanagement) plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. + __LEGACY FIELD__. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization. :param plan_id: The plan_id of this RenewTokenResponse. :type: str diff --git a/squareconnect/models/retrieve_catalog_object_request.py b/squareconnect/models/retrieve_catalog_object_request.py index 89e00ea..3e439ae 100644 --- a/squareconnect/models/retrieve_catalog_object_request.py +++ b/squareconnect/models/retrieve_catalog_object_request.py @@ -50,7 +50,7 @@ def __init__(self, include_related_objects=None): def include_related_objects(self): """ Gets the include_related_objects of this RetrieveCatalogObjectRequest. - If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` + If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` :return: The include_related_objects of this RetrieveCatalogObjectRequest. :rtype: bool @@ -61,7 +61,7 @@ def include_related_objects(self): def include_related_objects(self, include_related_objects): """ Sets the include_related_objects of this RetrieveCatalogObjectRequest. - If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` + If `true`, the response will include additional objects that are related to the requested object, as follows: If the `object` field of the response contains a [CatalogItem](#type-catalogitem), its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be returned in the `related_objects` field of the response. If the `object` field of the response contains a [CatalogItemVariation](#type-catalogitemvariation), its parent [CatalogItem](#type-catalogitem) will be returned in the `related_objects` field of the response. Default value: `false` :param include_related_objects: The include_related_objects of this RetrieveCatalogObjectRequest. :type: bool diff --git a/squareconnect/models/search_catalog_objects_request.py b/squareconnect/models/search_catalog_objects_request.py index 735b04e..d326ad1 100644 --- a/squareconnect/models/search_catalog_objects_request.py +++ b/squareconnect/models/search_catalog_objects_request.py @@ -137,7 +137,7 @@ def include_deleted_objects(self, include_deleted_objects): def include_related_objects(self): """ Gets the include_related_objects of this SearchCatalogObjectsRequest. - If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. + If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. :return: The include_related_objects of this SearchCatalogObjectsRequest. :rtype: bool @@ -148,7 +148,7 @@ def include_related_objects(self): def include_related_objects(self, include_related_objects): """ Sets the include_related_objects of this SearchCatalogObjectsRequest. - If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. + If `true`, the response will include additional objects that are related to the requested object, as follows: If a [CatalogItem](#type-catalogitem) is returned in the object field of the response, its associated [CatalogCategory](#type-catalogcategory), [CatalogTax](#type-catalogtax)es, [CatalogImage](#type-catalogimage)s and [CatalogModifierList](#type-catalogmodifierlist)s will be included in the `related_objects` field of the response. If a [CatalogItemVariation](#type-catalogitemvariation) is returned in the object field of the response, its parent [CatalogItem](#type-catalogitem) will be included in the `related_objects` field of the response. :param include_related_objects: The include_related_objects of this SearchCatalogObjectsRequest. :type: bool diff --git a/squareconnect/models/standard_unit_description.py b/squareconnect/models/standard_unit_description.py new file mode 100644 index 0000000..94a38a2 --- /dev/null +++ b/squareconnect/models/standard_unit_description.py @@ -0,0 +1,172 @@ +# 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 StandardUnitDescription(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, unit=None, name=None, abbreviation=None): + """ + StandardUnitDescription - 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 = { + 'unit': 'MeasurementUnit', + 'name': 'str', + 'abbreviation': 'str' + } + + self.attribute_map = { + 'unit': 'unit', + 'name': 'name', + 'abbreviation': 'abbreviation' + } + + self._unit = unit + self._name = name + self._abbreviation = abbreviation + + @property + def unit(self): + """ + Gets the unit of this StandardUnitDescription. + Identifies the measurement unit being described. + + :return: The unit of this StandardUnitDescription. + :rtype: MeasurementUnit + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this StandardUnitDescription. + Identifies the measurement unit being described. + + :param unit: The unit of this StandardUnitDescription. + :type: MeasurementUnit + """ + + self._unit = unit + + @property + def name(self): + """ + Gets the name of this StandardUnitDescription. + Display name of the measurement unit. For example, 'Pound'. + + :return: The name of this StandardUnitDescription. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this StandardUnitDescription. + Display name of the measurement unit. For example, 'Pound'. + + :param name: The name of this StandardUnitDescription. + :type: str + """ + + self._name = name + + @property + def abbreviation(self): + """ + Gets the abbreviation of this StandardUnitDescription. + Abbreviation for the measurement unit. For example, 'lb'. + + :return: The abbreviation of this StandardUnitDescription. + :rtype: str + """ + return self._abbreviation + + @abbreviation.setter + def abbreviation(self, abbreviation): + """ + Sets the abbreviation of this StandardUnitDescription. + Abbreviation for the measurement unit. For example, 'lb'. + + :param abbreviation: The abbreviation of this StandardUnitDescription. + :type: str + """ + + self._abbreviation = abbreviation + + 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/standard_unit_description_group.py b/squareconnect/models/standard_unit_description_group.py new file mode 100644 index 0000000..99f590b --- /dev/null +++ b/squareconnect/models/standard_unit_description_group.py @@ -0,0 +1,146 @@ +# 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 StandardUnitDescriptionGroup(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + def __init__(self, standard_unit_descriptions=None, language_code=None): + """ + StandardUnitDescriptionGroup - 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 = { + 'standard_unit_descriptions': 'list[StandardUnitDescription]', + 'language_code': 'str' + } + + self.attribute_map = { + 'standard_unit_descriptions': 'standard_unit_descriptions', + 'language_code': 'language_code' + } + + self._standard_unit_descriptions = standard_unit_descriptions + self._language_code = language_code + + @property + def standard_unit_descriptions(self): + """ + Gets the standard_unit_descriptions of this StandardUnitDescriptionGroup. + List of measurement units in this description group. + + :return: The standard_unit_descriptions of this StandardUnitDescriptionGroup. + :rtype: list[StandardUnitDescription] + """ + return self._standard_unit_descriptions + + @standard_unit_descriptions.setter + def standard_unit_descriptions(self, standard_unit_descriptions): + """ + Sets the standard_unit_descriptions of this StandardUnitDescriptionGroup. + List of measurement units in this description group. + + :param standard_unit_descriptions: The standard_unit_descriptions of this StandardUnitDescriptionGroup. + :type: list[StandardUnitDescription] + """ + + self._standard_unit_descriptions = standard_unit_descriptions + + @property + def language_code(self): + """ + Gets the language_code of this StandardUnitDescriptionGroup. + IETF language tag. + + :return: The language_code of this StandardUnitDescriptionGroup. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this StandardUnitDescriptionGroup. + IETF language tag. + + :param language_code: The language_code of this StandardUnitDescriptionGroup. + :type: str + """ + + self._language_code = language_code + + 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/test/test_aggregation_strategy.py b/test/test_aggregation_strategy.py new file mode 100644 index 0000000..da880bd --- /dev/null +++ b/test/test_aggregation_strategy.py @@ -0,0 +1,48 @@ +# 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_measurement_unit.py b/test/test_catalog_measurement_unit.py new file mode 100644 index 0000000..92f7d57 --- /dev/null +++ b/test/test_catalog_measurement_unit.py @@ -0,0 +1,48 @@ +# 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.catalog_measurement_unit import CatalogMeasurementUnit + + +class TestCatalogMeasurementUnit(unittest.TestCase): + """ CatalogMeasurementUnit unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCatalogMeasurementUnit(self): + """ + Test CatalogMeasurementUnit + """ + model = squareconnect.models.catalog_measurement_unit.CatalogMeasurementUnit() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_catalog_pricing_rule.py b/test/test_catalog_pricing_rule.py new file mode 100644 index 0000000..aad71d1 --- /dev/null +++ b/test/test_catalog_pricing_rule.py @@ -0,0 +1,48 @@ +# 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.catalog_pricing_rule import CatalogPricingRule + + +class TestCatalogPricingRule(unittest.TestCase): + """ CatalogPricingRule unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCatalogPricingRule(self): + """ + Test CatalogPricingRule + """ + model = squareconnect.models.catalog_pricing_rule.CatalogPricingRule() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_catalog_product_set.py b/test/test_catalog_product_set.py new file mode 100644 index 0000000..bf05981 --- /dev/null +++ b/test/test_catalog_product_set.py @@ -0,0 +1,48 @@ +# 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.catalog_product_set import CatalogProductSet + + +class TestCatalogProductSet(unittest.TestCase): + """ CatalogProductSet unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCatalogProductSet(self): + """ + Test CatalogProductSet + """ + model = squareconnect.models.catalog_product_set.CatalogProductSet() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_catalog_time_period.py b/test/test_catalog_time_period.py new file mode 100644 index 0000000..aab4b79 --- /dev/null +++ b/test/test_catalog_time_period.py @@ -0,0 +1,48 @@ +# 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.catalog_time_period import CatalogTimePeriod + + +class TestCatalogTimePeriod(unittest.TestCase): + """ CatalogTimePeriod unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCatalogTimePeriod(self): + """ + Test CatalogTimePeriod + """ + model = squareconnect.models.catalog_time_period.CatalogTimePeriod() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_coordinates.py b/test/test_coordinates.py new file mode 100644 index 0000000..84fafd4 --- /dev/null +++ b/test/test_coordinates.py @@ -0,0 +1,48 @@ +# 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.coordinates import Coordinates + + +class TestCoordinates(unittest.TestCase): + """ Coordinates unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCoordinates(self): + """ + Test Coordinates + """ + model = squareconnect.models.coordinates.Coordinates() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_measurement_unit_generic.py b/test/test_measurement_unit_generic.py new file mode 100644 index 0000000..05ed9a8 --- /dev/null +++ b/test/test_measurement_unit_generic.py @@ -0,0 +1,48 @@ +# 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.measurement_unit_generic import MeasurementUnitGeneric + + +class TestMeasurementUnitGeneric(unittest.TestCase): + """ MeasurementUnitGeneric unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMeasurementUnitGeneric(self): + """ + Test MeasurementUnitGeneric + """ + model = squareconnect.models.measurement_unit_generic.MeasurementUnitGeneric() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order_return_service_charge.py b/test/test_order_return_service_charge.py new file mode 100644 index 0000000..59f27fb --- /dev/null +++ b/test/test_order_return_service_charge.py @@ -0,0 +1,48 @@ +# 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.order_return_service_charge import OrderReturnServiceCharge + + +class TestOrderReturnServiceCharge(unittest.TestCase): + """ OrderReturnServiceCharge unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrderReturnServiceCharge(self): + """ + Test OrderReturnServiceCharge + """ + model = squareconnect.models.order_return_service_charge.OrderReturnServiceCharge() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order_service_charge.py b/test/test_order_service_charge.py new file mode 100644 index 0000000..4fa525b --- /dev/null +++ b/test/test_order_service_charge.py @@ -0,0 +1,48 @@ +# 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.order_service_charge import OrderServiceCharge + + +class TestOrderServiceCharge(unittest.TestCase): + """ OrderServiceCharge unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrderServiceCharge(self): + """ + Test OrderServiceCharge + """ + model = squareconnect.models.order_service_charge.OrderServiceCharge() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order_service_charge_calculation_phase.py b/test/test_order_service_charge_calculation_phase.py new file mode 100644 index 0000000..1ebe918 --- /dev/null +++ b/test/test_order_service_charge_calculation_phase.py @@ -0,0 +1,48 @@ +# 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.order_service_charge_calculation_phase import OrderServiceChargeCalculationPhase + + +class TestOrderServiceChargeCalculationPhase(unittest.TestCase): + """ OrderServiceChargeCalculationPhase unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOrderServiceChargeCalculationPhase(self): + """ + Test OrderServiceChargeCalculationPhase + """ + model = squareconnect.models.order_service_charge_calculation_phase.OrderServiceChargeCalculationPhase() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_standard_unit_description.py b/test/test_standard_unit_description.py new file mode 100644 index 0000000..09d568b --- /dev/null +++ b/test/test_standard_unit_description.py @@ -0,0 +1,48 @@ +# 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.standard_unit_description import StandardUnitDescription + + +class TestStandardUnitDescription(unittest.TestCase): + """ StandardUnitDescription unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStandardUnitDescription(self): + """ + Test StandardUnitDescription + """ + model = squareconnect.models.standard_unit_description.StandardUnitDescription() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_standard_unit_description_group.py b/test/test_standard_unit_description_group.py new file mode 100644 index 0000000..344a5eb --- /dev/null +++ b/test/test_standard_unit_description_group.py @@ -0,0 +1,48 @@ +# 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.standard_unit_description_group import StandardUnitDescriptionGroup + + +class TestStandardUnitDescriptionGroup(unittest.TestCase): + """ StandardUnitDescriptionGroup unit test stubs """ + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStandardUnitDescriptionGroup(self): + """ + Test StandardUnitDescriptionGroup + """ + model = squareconnect.models.standard_unit_description_group.StandardUnitDescriptionGroup() + + +if __name__ == '__main__': + unittest.main()